@viswa-test/test-citation 0.0.228 → 0.0.230

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 (664) hide show
  1. package/README.md +284 -45
  2. package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  3. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  4. package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  5. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  6. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  7. package/dist/cjs/features/GptWebCitation/GptWebCitation.js +1 -1
  8. package/dist/cjs/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
  9. package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
  10. package/dist/cjs/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
  11. package/dist/cjs/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
  12. package/dist/cjs/features/GptWebCitation/types.js +2 -0
  13. package/dist/cjs/features/GptWebCitation/types.js.map +1 -0
  14. package/dist/cjs/features/GptWebCitation/utils/citationData.utils.js +1 -1
  15. package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
  16. package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
  17. package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
  18. package/dist/cjs/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
  19. package/dist/cjs/features/IngestionStatus/IngestionStatusComponent.js +1 -1
  20. package/dist/cjs/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  21. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  22. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  23. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  24. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  25. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  26. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  27. package/dist/cjs/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  28. package/dist/cjs/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  29. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  30. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  31. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  32. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  33. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  34. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  35. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  36. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  37. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  38. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  39. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  40. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  41. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  42. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
  43. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
  44. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  45. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  46. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js +2 -0
  47. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js.map +1 -0
  48. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  49. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +2 -0
  50. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js.map +1 -0
  51. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js +2 -0
  52. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js.map +1 -0
  53. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +2 -0
  54. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js.map +1 -0
  55. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
  56. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
  57. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  58. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  59. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
  60. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
  61. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
  62. package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
  63. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  64. package/dist/cjs/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
  65. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +2 -0
  66. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js.map +1 -0
  67. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js +2 -0
  68. package/dist/cjs/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js.map +1 -0
  69. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  70. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  71. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  72. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  73. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  74. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +2 -0
  75. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js.map +1 -0
  76. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  77. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  78. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  79. package/dist/cjs/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  80. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  81. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  82. package/dist/cjs/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  83. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  84. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  85. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  86. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  87. package/dist/cjs/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  88. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  89. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  90. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  91. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  92. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  93. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  94. package/dist/cjs/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  95. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  96. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  97. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  98. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  99. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  100. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  101. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  102. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  103. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  104. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  105. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  106. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  107. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  108. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  109. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  110. package/dist/cjs/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  111. package/dist/cjs/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  112. package/dist/cjs/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  113. package/dist/cjs/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  114. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  115. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  116. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +2 -0
  117. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js.map +1 -0
  118. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +2 -0
  119. package/dist/cjs/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js.map +1 -0
  120. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  121. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  122. package/dist/cjs/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  123. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  124. package/dist/cjs/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  125. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  126. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  127. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  128. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  129. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  130. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  131. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  132. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  133. package/dist/cjs/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  134. package/dist/cjs/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  135. package/dist/cjs/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  136. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  137. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  138. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  139. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  140. package/dist/cjs/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  141. package/dist/cjs/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  142. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  143. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  144. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  145. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  146. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  147. package/dist/cjs/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  148. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  149. package/dist/cjs/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  150. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  151. package/dist/cjs/features/RequirementAI/components/segment/segment-common.css.js +1 -1
  152. package/dist/cjs/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  153. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js +2 -0
  154. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.js.map +1 -0
  155. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +2 -0
  156. package/dist/cjs/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js.map +1 -0
  157. package/dist/cjs/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  158. package/dist/cjs/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  159. package/dist/cjs/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  160. package/dist/cjs/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  161. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  162. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  163. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
  164. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  165. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  166. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  167. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  168. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  169. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  170. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
  171. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  172. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  173. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
  174. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
  175. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js +2 -0
  176. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js.map +1 -0
  177. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js +2 -0
  178. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js.map +1 -0
  179. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  180. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
  181. package/dist/cjs/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  182. package/dist/cjs/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  183. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  184. package/dist/cjs/features/RequirementAI/icons/AiGapIcon.js +1 -1
  185. package/dist/cjs/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  186. package/dist/cjs/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  187. package/dist/cjs/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  188. package/dist/cjs/features/RequirementAI/icons/BrainRed.js +1 -1
  189. package/dist/cjs/features/RequirementAI/icons/CDIcon.js +2 -0
  190. package/dist/cjs/features/RequirementAI/icons/CDIcon.js.map +1 -0
  191. package/dist/cjs/features/RequirementAI/icons/CheckIcon.js +1 -1
  192. package/dist/cjs/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  193. package/dist/cjs/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  194. package/dist/cjs/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  195. package/dist/cjs/features/RequirementAI/icons/Illustration.svg.js +2 -0
  196. package/dist/cjs/features/RequirementAI/icons/Illustration.svg.js.map +1 -0
  197. package/dist/cjs/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  198. package/dist/cjs/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  199. package/dist/cjs/features/RequirementAI/icons/PencilIcon.js +1 -1
  200. package/dist/cjs/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  201. package/dist/cjs/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  202. package/dist/cjs/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  203. package/dist/cjs/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  204. package/dist/cjs/features/RequirementAI/icons/TrashIcon.js +1 -1
  205. package/dist/cjs/features/RequirementAI/shared/Accordian.js +1 -1
  206. package/dist/cjs/features/RequirementAI/shared/AtomicButton.js +1 -1
  207. package/dist/cjs/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  208. package/dist/cjs/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  209. package/dist/cjs/features/RequirementAI/shared/CodeViewer.js +1 -1
  210. package/dist/cjs/features/RequirementAI/shared/ExpandableOl.js +1 -1
  211. package/dist/cjs/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  212. package/dist/cjs/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  213. package/dist/cjs/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  214. package/dist/cjs/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  215. package/dist/cjs/features/RequirementAI/store/markdown-context.js +1 -1
  216. package/dist/cjs/features/RequirementAI/store/ref.context.js +1 -1
  217. package/dist/cjs/features/RequirementAI/utils/css.utils.js +1 -1
  218. package/dist/cjs/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  219. package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
  220. package/dist/cjs/features/RequirementAI/utils/json-helper.js +1 -1
  221. package/dist/cjs/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  222. package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  223. package/dist/cjs/features/RequirementAI/utils/user-story.utils.js +1 -1
  224. package/dist/cjs/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  225. package/dist/cjs/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  226. package/dist/cjs/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  227. package/dist/cjs/features/RulebookCitations/RuleBookCitationApi.js +1 -1
  228. package/dist/cjs/features/RulebookCitations/RuleBookCitationWrapper.js +1 -1
  229. package/dist/cjs/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  230. package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
  231. package/dist/cjs/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  232. package/dist/cjs/features/UserStoryImport/components/BackNav.js +1 -1
  233. package/dist/cjs/features/UserStoryImport/components/Badge.js +1 -1
  234. package/dist/cjs/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  235. package/dist/cjs/features/UserStoryImport/components/CardGrid.js +1 -1
  236. package/dist/cjs/features/UserStoryImport/components/CardProceedButton.js +1 -1
  237. package/dist/cjs/features/UserStoryImport/components/ContentArea.js +1 -1
  238. package/dist/cjs/features/UserStoryImport/components/Footer.js +1 -1
  239. package/dist/cjs/features/UserStoryImport/components/Header.js +1 -1
  240. package/dist/cjs/features/UserStoryImport/components/NavRow.js +1 -1
  241. package/dist/cjs/features/UserStoryImport/components/ProceedButton.js +1 -1
  242. package/dist/cjs/features/UserStoryImport/components/ProjectCard.js +1 -1
  243. package/dist/cjs/features/UserStoryImport/components/ResizeHandle.js +1 -1
  244. package/dist/cjs/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  245. package/dist/cjs/features/UserStoryImport/components/SearchInput.js +1 -1
  246. package/dist/cjs/features/UserStoryImport/components/SectionHeading.js +1 -1
  247. package/dist/cjs/features/UserStoryImport/components/ShowMore.js +1 -1
  248. package/dist/cjs/features/UserStoryImport/components/Sidebar.js +1 -1
  249. package/dist/cjs/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  250. package/dist/cjs/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  251. package/dist/cjs/features/UserStoryImport/components/SidebarSection.js +1 -1
  252. package/dist/cjs/features/UserStoryImport/components/SortDropdown.js +1 -1
  253. package/dist/cjs/features/UserStoryImport/components/SplitLayout.js +1 -1
  254. package/dist/cjs/features/UserStoryImport/components/Toolbar.js +1 -1
  255. package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
  256. package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
  257. package/dist/cjs/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  258. package/dist/cjs/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  259. package/dist/cjs/features/UserStoryImport/components/usePanelResize.js +1 -1
  260. package/dist/cjs/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  261. package/dist/cjs/features/UserStoryImport/hooks/useUSPData.js +1 -1
  262. package/dist/cjs/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  263. package/dist/cjs/features/UserStoryImport/index.js +1 -1
  264. package/dist/cjs/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  265. package/dist/cjs/features/UserStoryImport/lib/Tooltip.js +1 -1
  266. package/dist/cjs/features/UserStoryImport/lib/cn.js +1 -1
  267. package/dist/cjs/features/UserStoryImport/lib/dialog.js +1 -1
  268. package/dist/cjs/index.js +1 -1
  269. package/dist/cjs/service/redlineService.js +2 -0
  270. package/dist/cjs/service/redlineService.js.map +1 -0
  271. package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  272. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  273. package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  274. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  275. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  276. package/dist/features/GptWebCitation/GptWebCitation.js +1 -1
  277. package/dist/features/GptWebCitation/GptWebCitation.module.css.js +1 -1
  278. package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
  279. package/dist/features/GptWebCitation/GptWebCitationImageFullScreenView.js +1 -1
  280. package/dist/features/GptWebCitation/GptWebCitationSkeleton.js +1 -1
  281. package/dist/features/GptWebCitation/types.js +2 -0
  282. package/dist/features/GptWebCitation/types.js.map +1 -0
  283. package/dist/features/GptWebCitation/utils/citationData.utils.js +1 -1
  284. package/dist/features/GptWebCitation/utils/fixedHeight.utils.js +2 -0
  285. package/dist/features/GptWebCitation/utils/fixedHeight.utils.js.map +1 -0
  286. package/dist/features/GptWebCitation/utils/styleOverrides.utils.js +2 -0
  287. package/dist/features/GptWebCitation/utils/styleOverrides.utils.js.map +1 -0
  288. package/dist/features/IngestionStatus/IngestionStatusComponent.js +1 -1
  289. package/dist/features/RequirementAI/components/CustomPopover/CustomPopover.js +1 -1
  290. package/dist/features/RequirementAI/components/GapRiskSidebar/GapRiskSidebar.js +1 -1
  291. package/dist/features/RequirementAI/components/GapRiskSidebar/components/GapItem/GapItem.js +1 -1
  292. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskCategorySection/RiskCategorySection.js +1 -1
  293. package/dist/features/RequirementAI/components/GapRiskSidebar/components/RiskSidebarCategorySection/RiskSidebarCategorySection.js +1 -1
  294. package/dist/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.js +1 -1
  295. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithGap.js +1 -1
  296. package/dist/features/RequirementAI/components/GapRiskSidebar/utils/buildStoryWithRisk.js +1 -1
  297. package/dist/features/RequirementAI/components/RecommendationBlock/RecommendationBlock.js +1 -1
  298. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  299. package/dist/features/RequirementAI/components/RichTextEditor/Editor/Editor.js +1 -1
  300. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Context/ContextMenu.js +1 -1
  301. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorContainer/EditorContainer.js +1 -1
  302. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorPlaceholder/EditorPlaceholder.js +1 -1
  303. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/EditorToolbar.js +1 -1
  304. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarButton/ToolbarButton.js +1 -1
  305. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/ToolbarDivider/ToolbarDivider.js +1 -1
  306. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/EditorToolbar/components/UndoRedo/UndoRedo.js +1 -1
  307. package/dist/features/RequirementAI/components/RichTextEditor/Editor/components/Icons/Icon.js +1 -1
  308. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/editorConfig.js +1 -1
  309. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/objects.js +1 -1
  310. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/CommentPlugin/HTMLNode.js +1 -1
  311. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.js +1 -1
  312. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js +2 -0
  313. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.js.map +1 -0
  314. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
  315. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.js +1 -1
  316. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js +2 -0
  317. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.js.map +1 -0
  318. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/LayoutPlugin.js +1 -1
  319. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +2 -0
  320. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js.map +1 -0
  321. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js +2 -0
  322. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.js.map +1 -0
  323. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +2 -0
  324. package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js.map +1 -0
  325. package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.css.js +1 -1
  326. package/dist/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.js +1 -1
  327. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/getSelectedNode.js +1 -1
  328. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  329. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
  330. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
  331. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
  332. package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
  333. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.js +1 -1
  334. package/dist/features/RequirementAI/components/UserStoryCard/AttachedContext.module.css.js +1 -1
  335. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js +2 -0
  336. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.js.map +1 -0
  337. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js +2 -0
  338. package/dist/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.module.css.js.map +1 -0
  339. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  340. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  341. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/ResizableSplitPane.js +1 -1
  342. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  343. package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  344. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +2 -0
  345. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js.map +1 -0
  346. package/dist/features/RequirementAI/components/UserStoryCard/Popups/PopupDefaults.js +1 -1
  347. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  348. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  349. package/dist/features/RequirementAI/components/UserStoryCard/TitleEditor/TitleEditor.js +1 -1
  350. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  351. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  352. package/dist/features/RequirementAI/components/UserStoryCard/icons/PdfViewerIcons.js +1 -1
  353. package/dist/features/RequirementAI/components/ai-reasoning/AIReasonAccordion.js +1 -1
  354. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  355. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  356. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  357. package/dist/features/RequirementAI/components/ai-reasoning/BigEnoughComponent.js +1 -1
  358. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +1 -1
  359. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationContent.js +1 -1
  360. package/dist/features/RequirementAI/components/citations/appmod-citation/AppmodCitationRenderer.js +1 -1
  361. package/dist/features/RequirementAI/components/citations/appmod-citation/components/CodeLinkHandler.js +1 -1
  362. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/AppmodIcon.js +1 -1
  363. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/ChatBubbleIcon.js +1 -1
  364. package/dist/features/RequirementAI/components/citations/appmod-citation/icons/SparkleIcon.js +1 -1
  365. package/dist/features/RequirementAI/components/citations/appmod-citation/types.js +1 -1
  366. package/dist/features/RequirementAI/components/citations/audio-citation/SearchWaveFromWrapper.js +1 -1
  367. package/dist/features/RequirementAI/components/citations/audio-citation/WaveformCitationRenderer.js +1 -1
  368. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioCitationIcon.js +1 -1
  369. package/dist/features/RequirementAI/components/citations/audio-citation/components/AudioTimeLineSlider.js +1 -1
  370. package/dist/features/RequirementAI/components/citations/audio-citation/components/SegmentByWordsViral.js +1 -1
  371. package/dist/features/RequirementAI/components/citations/audio-citation/components/videoPlayer.js +1 -1
  372. package/dist/features/RequirementAI/components/citations/audio-citation/icons/AudioLinesIcon.js +1 -1
  373. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MaximizeIcon.js +1 -1
  374. package/dist/features/RequirementAI/components/citations/audio-citation/icons/MinimizeIcon.js +1 -1
  375. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PauseIcon.js +1 -1
  376. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlayIcon.js +1 -1
  377. package/dist/features/RequirementAI/components/citations/audio-citation/icons/PlaybackSpeedIcon.js +1 -1
  378. package/dist/features/RequirementAI/components/citations/audio-citation/icons/VideoIcon.js +1 -1
  379. package/dist/features/RequirementAI/components/citations/audio-citation/searchwaveform.js +1 -1
  380. package/dist/features/RequirementAI/components/citations/audio-citation/store/autoplay.wavefrom.js +1 -1
  381. package/dist/features/RequirementAI/components/citations/audio-citation/utils/word-segment-util.js +1 -1
  382. package/dist/features/RequirementAI/components/citations/big-enough/BigEnoughCitationRenderer.js +1 -1
  383. package/dist/features/RequirementAI/components/citations/chat-citation/ChatCitationRenderer.js +1 -1
  384. package/dist/features/RequirementAI/components/citations/file-citation/DocumentCitationIcon.js +1 -1
  385. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  386. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  387. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js +2 -0
  388. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.js.map +1 -0
  389. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js +2 -0
  390. package/dist/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.js.map +1 -0
  391. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationContent.js +1 -1
  392. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationIcon.js +1 -1
  393. package/dist/features/RequirementAI/components/citations/image-citation/ImageCitationRenderer.js +1 -1
  394. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationContent.js +1 -1
  395. package/dist/features/RequirementAI/components/citations/rca-citation/RCACitationRenderer.js +1 -1
  396. package/dist/features/RequirementAI/components/citations/readfile-citation/CustomFileIcon.js +1 -1
  397. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  398. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationRenderer.js +1 -1
  399. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/ExternalLinkIcon.js +1 -1
  400. package/dist/features/RequirementAI/components/citations/readfile-citation/icons/FileCodeIcon.js +1 -1
  401. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeCitationRenderer.js +1 -1
  402. package/dist/features/RequirementAI/components/citations/stormee-citation/StormeeContent.js +1 -1
  403. package/dist/features/RequirementAI/components/citations/stormee-citation/components/GradientButton.js +1 -1
  404. package/dist/features/RequirementAI/components/citations/stormee-citation/components/ProblemStatementCard.js +1 -1
  405. package/dist/features/RequirementAI/components/citations/web-citation/FullScreenIcon.js +1 -1
  406. package/dist/features/RequirementAI/components/citations/web-citation/ImagePreviewDialog.js +1 -1
  407. package/dist/features/RequirementAI/components/citations/web-citation/WebCitation.js +1 -1
  408. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationIcon.js +1 -1
  409. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationRenderer.js +1 -1
  410. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageContent.js +1 -1
  411. package/dist/features/RequirementAI/components/citations/web-citation/WebCitationWithImageRenderer.js +1 -1
  412. package/dist/features/RequirementAI/components/cra/PartialRequirementContent.js +1 -1
  413. package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  414. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  415. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterContentWrapper.js +1 -1
  416. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterItem.js +1 -1
  417. package/dist/features/RequirementAI/components/lsc-reason-gap/gapFilterSvgs.js +1 -1
  418. package/dist/features/RequirementAI/components/segment/ExampleComponentWrapper.js +1 -1
  419. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  420. package/dist/features/RequirementAI/components/segment/SegmentLoader.js +1 -1
  421. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  422. package/dist/features/RequirementAI/components/segment/segment-common.css.js +1 -1
  423. package/dist/features/RequirementAI/components/story-screen/BigEnoughPanel.js +1 -1
  424. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js +2 -0
  425. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.js.map +1 -0
  426. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js +2 -0
  427. package/dist/features/RequirementAI/components/story-screen/CompletionPanel.module.css.js.map +1 -0
  428. package/dist/features/RequirementAI/components/story-screen/ReplaceLearnedTags.js +1 -1
  429. package/dist/features/RequirementAI/components/story-screen/StreamingScreenSidebar.js +1 -1
  430. package/dist/features/RequirementAI/components/story-screen/SubfeatureBlock.js +1 -1
  431. package/dist/features/RequirementAI/components/story-screen/UserStoryScreen.js +1 -1
  432. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.js +1 -1
  433. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  434. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.module.css.js +1 -1
  435. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalBadge/ApprovalBadge.js +1 -1
  436. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebar/ApprovalSidebar.js +1 -1
  437. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalSidebarItem/ApprovalSidebarItem.js +1 -1
  438. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ApprovalStatusBadge/ApprovalStatusBadge.js +1 -1
  439. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentBlock/ContentBlock.js +1 -1
  440. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.js +1 -1
  441. package/dist/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.module.css.js +1 -1
  442. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  443. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  444. package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js +2 -0
  445. package/dist/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.js.map +1 -0
  446. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js +2 -0
  447. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.js.map +1 -0
  448. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js +2 -0
  449. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.module.css.js.map +1 -0
  450. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  451. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.module.css.js +1 -1
  452. package/dist/features/RequirementAI/hooks/useApprovalStatus.js +1 -1
  453. package/dist/features/RequirementAI/hooks/useDiffEditReviewMode.js +1 -1
  454. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  455. package/dist/features/RequirementAI/icons/AiGapIcon.js +1 -1
  456. package/dist/features/RequirementAI/icons/AiReasoningIcon.js +1 -1
  457. package/dist/features/RequirementAI/icons/BigEnoughIcon.js +1 -1
  458. package/dist/features/RequirementAI/icons/BookmarkIcon.js +1 -1
  459. package/dist/features/RequirementAI/icons/BrainRed.js +1 -1
  460. package/dist/features/RequirementAI/icons/CDIcon.js +2 -0
  461. package/dist/features/RequirementAI/icons/CDIcon.js.map +1 -0
  462. package/dist/features/RequirementAI/icons/CheckIcon.js +1 -1
  463. package/dist/features/RequirementAI/icons/ChevronDownIcon.js +1 -1
  464. package/dist/features/RequirementAI/icons/ChevronUpIcon.js +1 -1
  465. package/dist/features/RequirementAI/icons/CognitiveDecision.js +1 -1
  466. package/dist/features/RequirementAI/icons/Illustration.svg.js +2 -0
  467. package/dist/features/RequirementAI/icons/Illustration.svg.js.map +1 -0
  468. package/dist/features/RequirementAI/icons/MeetingHighlightsIcon.js +1 -1
  469. package/dist/features/RequirementAI/icons/MenuUnfoldIcon.js +1 -1
  470. package/dist/features/RequirementAI/icons/PencilIcon.js +1 -1
  471. package/dist/features/RequirementAI/icons/ReasoningBulbIcon.js +1 -1
  472. package/dist/features/RequirementAI/icons/RelevanceScoreIcon.js +1 -1
  473. package/dist/features/RequirementAI/icons/SidebarCloseIcon.js +1 -1
  474. package/dist/features/RequirementAI/icons/SidebarOpenIcon.js +1 -1
  475. package/dist/features/RequirementAI/icons/TrashIcon.js +1 -1
  476. package/dist/features/RequirementAI/shared/Accordian.js +1 -1
  477. package/dist/features/RequirementAI/shared/AtomicButton.js +1 -1
  478. package/dist/features/RequirementAI/shared/CitationAIConfidenceDisplay.js +1 -1
  479. package/dist/features/RequirementAI/shared/CitationLoadingIndicator.js +1 -1
  480. package/dist/features/RequirementAI/shared/CodeViewer.js +1 -1
  481. package/dist/features/RequirementAI/shared/ExpandableOl.js +1 -1
  482. package/dist/features/RequirementAI/shared/GeneratedCodeCitation.js +1 -1
  483. package/dist/features/RequirementAI/shared/ReqAiCitationRenderer.js +1 -1
  484. package/dist/features/RequirementAI/shared/UpdatedAnimationContent.js +1 -1
  485. package/dist/features/RequirementAI/shared/useMarkdownSearch.js +1 -1
  486. package/dist/features/RequirementAI/store/markdown-context.js +1 -1
  487. package/dist/features/RequirementAI/store/ref.context.js +1 -1
  488. package/dist/features/RequirementAI/utils/css.utils.js +1 -1
  489. package/dist/features/RequirementAI/utils/diff-edit.utils.js +1 -1
  490. package/dist/features/RequirementAI/utils/helpers.js +1 -1
  491. package/dist/features/RequirementAI/utils/json-helper.js +1 -1
  492. package/dist/features/RequirementAI/utils/learned-tag.utils.js +1 -1
  493. package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  494. package/dist/features/RequirementAI/utils/user-story.utils.js +1 -1
  495. package/dist/features/RequirementAI/utils/userStoryAttachedContext.utils.js +1 -1
  496. package/dist/features/RequirementAI/utils/userstory-approval-transform.utils.js +1 -1
  497. package/dist/features/RequirementAI/utils/userstory-approval.utils.js +1 -1
  498. package/dist/features/RulebookCitations/RuleBookCitationApi.js +1 -1
  499. package/dist/features/RulebookCitations/RuleBookCitationWrapper.js +1 -1
  500. package/dist/features/UserStoryImport/UserStoryPicker.context.js +1 -1
  501. package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
  502. package/dist/features/UserStoryImport/UserStoryPicker.theme.js +1 -1
  503. package/dist/features/UserStoryImport/components/BackNav.js +1 -1
  504. package/dist/features/UserStoryImport/components/Badge.js +1 -1
  505. package/dist/features/UserStoryImport/components/BrowseProjectsButton.js +1 -1
  506. package/dist/features/UserStoryImport/components/CardGrid.js +1 -1
  507. package/dist/features/UserStoryImport/components/CardProceedButton.js +1 -1
  508. package/dist/features/UserStoryImport/components/ContentArea.js +1 -1
  509. package/dist/features/UserStoryImport/components/Footer.js +1 -1
  510. package/dist/features/UserStoryImport/components/Header.js +1 -1
  511. package/dist/features/UserStoryImport/components/NavRow.js +1 -1
  512. package/dist/features/UserStoryImport/components/ProceedButton.js +1 -1
  513. package/dist/features/UserStoryImport/components/ProjectCard.js +1 -1
  514. package/dist/features/UserStoryImport/components/ResizeHandle.js +1 -1
  515. package/dist/features/UserStoryImport/components/ScopeDropdown.js +1 -1
  516. package/dist/features/UserStoryImport/components/SearchInput.js +1 -1
  517. package/dist/features/UserStoryImport/components/SectionHeading.js +1 -1
  518. package/dist/features/UserStoryImport/components/ShowMore.js +1 -1
  519. package/dist/features/UserStoryImport/components/Sidebar.js +1 -1
  520. package/dist/features/UserStoryImport/components/SidebarFavoritesList.js +1 -1
  521. package/dist/features/UserStoryImport/components/SidebarProjectList.js +1 -1
  522. package/dist/features/UserStoryImport/components/SidebarSection.js +1 -1
  523. package/dist/features/UserStoryImport/components/SortDropdown.js +1 -1
  524. package/dist/features/UserStoryImport/components/SplitLayout.js +1 -1
  525. package/dist/features/UserStoryImport/components/Toolbar.js +1 -1
  526. package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
  527. package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
  528. package/dist/features/UserStoryImport/components/UserStoryImportDialog.js +1 -1
  529. package/dist/features/UserStoryImport/components/UserStoryScopeDropdown.js +1 -1
  530. package/dist/features/UserStoryImport/components/usePanelResize.js +1 -1
  531. package/dist/features/UserStoryImport/hooks/useFilteredItems.js +1 -1
  532. package/dist/features/UserStoryImport/hooks/useUSPData.js +1 -1
  533. package/dist/features/UserStoryImport/hooks/useUserStoryPickerState.js +1 -1
  534. package/dist/features/UserStoryImport/index.js +1 -1
  535. package/dist/features/UserStoryImport/lib/CustomTooltip.js +1 -1
  536. package/dist/features/UserStoryImport/lib/Tooltip.js +1 -1
  537. package/dist/features/UserStoryImport/lib/cn.js +1 -1
  538. package/dist/features/UserStoryImport/lib/dialog.js +1 -1
  539. package/dist/index.js +1 -1
  540. package/dist/service/redlineService.js +2 -0
  541. package/dist/service/redlineService.js.map +1 -0
  542. package/dist/types/src/Background.d.ts +7 -0
  543. package/dist/types/src/Background.d.ts.map +1 -0
  544. package/dist/types/src/DeviationSummaryTest.d.ts +2 -0
  545. package/dist/types/src/DeviationSummaryTest.d.ts.map +1 -0
  546. package/dist/types/src/RedlineEditorTest.d.ts +3 -0
  547. package/dist/types/src/RedlineEditorTest.d.ts.map +1 -0
  548. package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
  549. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +5 -0
  550. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  551. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +9 -1
  552. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
  553. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  554. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
  555. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  556. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
  557. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts +10 -0
  558. package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -1
  559. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +9 -1
  560. package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -1
  561. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts +3 -1
  562. package/dist/types/src/features/GptWebCitation/GptWebCitationImageFullScreenView.d.ts.map +1 -1
  563. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts +12 -1
  564. package/dist/types/src/features/GptWebCitation/GptWebCitationSkeleton.d.ts.map +1 -1
  565. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts +1 -1
  566. package/dist/types/src/features/GptWebCitation/GptWebCitationTest.d.ts.map +1 -1
  567. package/dist/types/src/features/GptWebCitation/WebCitationSampleResponse.d.ts.map +1 -1
  568. package/dist/types/src/features/GptWebCitation/types.d.ts +313 -20
  569. package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -1
  570. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts +2 -0
  571. package/dist/types/src/features/GptWebCitation/utils/citationData.utils.d.ts.map +1 -1
  572. package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts +10 -0
  573. package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts.map +1 -0
  574. package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts +6 -0
  575. package/dist/types/src/features/GptWebCitation/utils/styleOverrides.utils.d.ts.map +1 -0
  576. package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts +2 -0
  577. package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts.map +1 -1
  578. package/dist/types/src/features/IngestionStatus/IngestionStatusComponentTest.d.ts.map +1 -1
  579. package/dist/types/src/features/RequirementAI/components/GapRiskSidebar/components/StoryNode/StoryNode.d.ts.map +1 -1
  580. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +156 -3
  581. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
  582. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts +2 -1
  583. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/Editor.d.ts.map +1 -1
  584. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts +1 -4
  585. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/DeleteNode.d.ts.map +1 -1
  586. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts +44 -0
  587. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/HighlightNode.d.ts.map +1 -0
  588. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
  589. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts +4 -3
  590. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InsertNode.d.ts.map +1 -1
  591. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.d.ts +35 -0
  592. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InvisibleNode.d.ts.map +1 -0
  593. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts +25 -0
  594. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts.map +1 -0
  595. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.d.ts +23 -0
  596. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/PreservedNode.d.ts.map +1 -0
  597. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts +25 -0
  598. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts.map +1 -0
  599. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/PlaygroundEditorTheme.d.ts.map +1 -1
  600. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/theme/theme.d.ts.map +1 -1
  601. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts +9 -1
  602. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  603. package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts +8 -0
  604. package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts.map +1 -0
  605. package/dist/types/src/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.d.ts +29 -0
  606. package/dist/types/src/features/RequirementAI/components/UserStoryCard/ClinicalTrialSection.d.ts.map +1 -0
  607. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +8 -3
  608. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
  609. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +44 -4
  610. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
  611. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts +25 -0
  612. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts.map +1 -0
  613. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +17 -3
  614. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
  615. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +35 -2
  616. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  617. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
  618. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.d.ts +12 -0
  619. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebCitationRenderer.d.ts.map +1 -0
  620. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.d.ts +6 -0
  621. package/dist/types/src/features/RequirementAI/components/citations/gpt-web-citation/GptWebcitationPanel.d.ts.map +1 -0
  622. package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts +1 -0
  623. package/dist/types/src/features/RequirementAI/components/cra/PartialRequirementContent.d.ts.map +1 -1
  624. package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts +15 -0
  625. package/dist/types/src/features/RequirementAI/components/story-screen/CompletionPanel.d.ts.map +1 -0
  626. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +7 -1
  627. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
  628. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts +4 -1
  629. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/components/ContentSegment/ContentSegment.d.ts.map +1 -1
  630. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +14 -1
  631. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  632. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts +11 -0
  633. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/HighlightButtonComponent.d.ts.map +1 -0
  634. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.d.ts +10 -0
  635. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineManualComponent.d.ts.map +1 -0
  636. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +2 -1
  637. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
  638. package/dist/types/src/features/RequirementAI/icons/CDIcon.d.ts +4 -1
  639. package/dist/types/src/features/RequirementAI/icons/CDIcon.d.ts.map +1 -1
  640. package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts +17 -2
  641. package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts.map +1 -1
  642. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +10 -0
  643. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
  644. package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts +4 -1
  645. package/dist/types/src/features/RequirementAI/shared/UpdatedAnimationContent.d.ts.map +1 -1
  646. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +22 -12
  647. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
  648. package/dist/types/src/features/RequirementAI/types/citation.type.d.ts +20 -0
  649. package/dist/types/src/features/RequirementAI/types/citation.type.d.ts.map +1 -1
  650. package/dist/types/src/features/RequirementAI/utils/userStoryAttachedContext.utils.d.ts.map +1 -1
  651. package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts +2 -2
  652. package/dist/types/src/features/RulebookCitations/RuleBookCitationApi.d.ts.map +1 -1
  653. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts +1 -0
  654. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapper.d.ts.map +1 -1
  655. package/dist/types/src/features/RulebookCitations/RuleBookCitationWrapperTest.d.ts.map +1 -1
  656. package/dist/types/src/index.d.ts +3 -2
  657. package/dist/types/src/index.d.ts.map +1 -1
  658. package/dist/types/src/service/redlineService.d.ts +33 -0
  659. package/dist/types/src/service/redlineService.d.ts.map +1 -0
  660. package/package.json +9 -6
  661. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
  662. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
  663. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
  664. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,jsxs as l}from"react/jsx-runtime";import{useRef as r,useMemo as i,useEffect as o}from"react";import a from"react-markdown";import d from"rehype-raw";import t from"./AppModCitationContent.module.css.js";import s from"./components/CodeLinkHandler.js";import{DEFAULT_HIGHLIGHT_THEME as c}from"./types.js";import{renderAIConfidenceDisplay as u}from"../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js";import{SparkleIcon as m}from"./icons/SparkleIcon.js";var h=function(l,r,i,o){var a=(null==r?void 0:r.highlight)||c,d=function(){return l?{backgroundColor:a.background,color:a.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{}},u=function(){return e(e({},d()),{display:"inline"})};return{h1:function(i){var o,a=i.children;return n("h1",e({className:t.heading1,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.heading1},{children:l?n("span",e({style:d()},{children:a})):a}))},h2:function(i){var o,a=i.children;return n("h2",e({className:t.heading2,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.heading2},{children:l?n("span",e({style:d()},{children:a})):a}))},h3:function(i){var o,a=i.children;return n("h3",e({className:t.heading3,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.heading3},{children:l?n("span",e({style:d()},{children:a})):a}))},h4:function(i){var o,a=i.children;return n("h4",e({className:t.heading4,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.heading4},{children:l?n("span",e({style:d()},{children:a})):a}))},h5:function(i){var o,a=i.children;return n("h5",e({className:t.heading5,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.heading5},{children:l?n("span",e({style:d()},{children:a})):a}))},h6:function(i){var o,a=i.children;return n("h6",e({className:t.heading6,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.heading6},{children:l?n("span",e({style:d()},{children:a})):a}))},p:function(i){var o,a=i.children;return n("p",e({className:t.paragraph,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.paragraph},{children:l?n("span",e({style:u()},{children:a})):a}))},ol:function(l){var i,o=l.children;return n("ol",e({className:t.orderedList,style:null===(i=null==r?void 0:r.markdown)||void 0===i?void 0:i.list},{children:o}))},ul:function(l){var i,o=l.children;return n("ul",e({className:t.unorderedList,style:null===(i=null==r?void 0:r.markdown)||void 0===i?void 0:i.list},{children:o}))},li:function(i){var o,a=i.children;return n("li",e({className:t.listItem,style:null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.listItem},{children:l?n("span",e({style:u()},{children:a})):a}))},strong:function(i){var o,a=i.children;return n("strong",e({className:t.strong,style:e(e({},null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.strong),l?d():{})},{children:a}))},em:function(i){var o,a=i.children;return n("em",e({className:t.emphasis,style:e(e({},null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.emphasis),l?d():{})},{children:a}))},a:function(d){var t=d.children,c=d.href;return n(s,e({href:c,codeLinkConfig:o,isHighlighted:l,highlightTheme:a,customStyles:null==r?void 0:r.markdown,customIcon:null==i?void 0:i.appModCitationLinkIcon},{children:t}))},code:function(i){var o,d,s=i.children,c=i.className,u=null==c?void 0:c.includes("language-"),m=l?{backgroundColor:a.codeBackground,color:a.codeText,border:"1px solid ".concat(a.codeBorder)}:{};return u?n("div",{children:n("code",e({className:t.codeBlock,style:e(e({},null===(d=null==r?void 0:r.markdown)||void 0===d?void 0:d.codeBlock),m)},{children:s}))}):n("code",e({className:t.inlineCode,style:e(e({},null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.code),m)},{children:s}))},pre:function(l){var r=l.children;return n("pre",e({className:t.preBlock},{children:r}))},blockquote:function(i){var o,d=i.children;return n("blockquote",e({className:t.blockquote,style:e(e({},null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.blockquote),l?{borderColor:a.border}:{})},{children:l?n("span",e({style:u()},{children:d})):d}))},table:function(i){var o,a=i.children;return n("div",e({className:t.tableWrapper},{children:n("table",e({className:t.table,style:e(e({},null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.table),l?d():{})},{children:a}))}))},thead:function(l){var r=l.children;return n("thead",e({className:t.tableHead},{children:r}))},tbody:function(l){var r=l.children;return n("tbody",e({className:t.tableBody},{children:r}))},tr:function(r){var i=r.children;return n("tr",e({className:t.tableRow,style:l?d():{}},{children:i}))},th:function(i){var o,a=i.children;return n("th",e({className:t.tableHeader,style:e(e({},null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.tableHeader),l?d():{})},{children:a}))},td:function(i){var o,a=i.children;return n("td",e({className:t.tableCell,style:e(e({},null===(o=null==r?void 0:r.markdown)||void 0===o?void 0:o.tableCell),l?d():{})},{children:a}))},details:function(l){var r=l.children;return n("details",e({className:t.details},{children:r}))},summary:function(r){var i=r.children,o=function(e){var n;return"string"==typeof e?e:Array.isArray(e)?e.map(o).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?o(e.props.children):""},a=o(i).replace(/:$/,"").trim();return n("summary",e({className:t.summary,style:l?d():{}},{children:a}))}}},v=function(s){var c,v,p=s.citation,y=s.customStyles,f=s.customIcons,g=s.codeLinkConfig,b=s.isLoading,N=void 0!==b&&b,k=s.shouldAutoScroll,w=void 0!==k&&k,C=r(null),x=r(null),I=p.description||"",q=p.customMetadata.question||"",A=p.customMetadata.highlighted_text,L=p.customMetadata.relevance_score,B=i(function(){return h(!1,y,f,g)},[y,f,g]),T=i(function(){return h(!0,y,f,g)},[y,f,g]);o(function(){if(w&&(null==A?void 0:A.trim())&&(null==I?void 0:I.trim())&&!N){var e=x.current;if(e){var n=function(){e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},l=window.requestAnimationFrame(function(){n(),window.setTimeout(n,120)});return function(){window.cancelAnimationFrame(l)}}}},[I,A,N,w]);var M=(null==f?void 0:f.appModCitationIcon)||n("div",{children:n(m,{className:t.headerIcon})});return l("div",e({ref:C,className:t.container,style:null==y?void 0:y.container},{children:[l("div",e({className:t.header,style:null==y?void 0:y.header},{children:[l("div",e({className:t.headerLeft,style:null==y?void 0:y.headerLeft},{children:[n("span",e({style:null==y?void 0:y.headerIcon},{children:M})),n("span",e({className:t.headerTitle,style:null==y?void 0:y.headerTitle},{children:"AskMod Response"}))]})),u(L,null==y?void 0:y.confidenceDisplay)]})),l("div",e({className:t.questionContainer,style:null==y?void 0:y.questionContainer},{children:[n("p",e({className:t.questionLabel,style:null==y?void 0:y.questionLabel},{children:"Me"})),n("div",e({className:t.questionText,style:null==y?void 0:y.questionText},{children:q||"Ask question to get response"}))]})),n("div",e({className:t.answerIconRow,style:null==y?void 0:y.answerIconRow},{children:l("p",e({className:t.assistantName,style:null==y?void 0:y.assistantName},{children:["Askmod",n("span",e({className:t.assistantNameInner,style:null==y?void 0:y.assistantNameInner},{children:".AI"}))]}))})),n("div",e({className:t.answerContainer,style:null==y?void 0:y.answerContainer},{children:N?n("span",e({className:t.loadingText,style:null===(c=null==y?void 0:y.loading)||void 0===c?void 0:c.text},{children:"Generating..."})):I?function(r,i){var o,s=(void 0===(o=r.replace(/\\n/g,"\n"))&&(o=""),o.replace(/<details\b([^>]*)>/gi,function(e,n){return/\bopen\b/i.test(n)?"<details open>":"<details>"}).replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,function(e,n){return'<summary class="codebase-summary codebasename">From '.concat(n.trim()," codebase</summary>")}).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,function(e,n){return"<codebasename>".concat(n.trim(),"</codebasename>")}).trim());if(i&&s.includes(i)){var c=s.indexOf(i),u=s.substring(0,c),m=s.substring(c,c+i.length),h=s.substring(c+i.length),v=!m.trim();return l("div",e({className:t.markdownContent},{children:[u&&n(a,e({rehypePlugins:[d],components:B},{children:u})),m&&!v&&n("div",e({ref:x,"data-appmod-highlight-anchor":"true"},{children:n(a,e({rehypePlugins:[d],components:T},{children:m}))})),m&&v&&m,h&&n(a,e({rehypePlugins:[d],components:B},{children:h}))]}))}return n(a,e({className:t.markdownContent,rehypePlugins:[d],components:B},{children:s}))}(I,A):n("span",e({className:t.errorText,style:null===(v=null==y?void 0:y.error)||void 0===v?void 0:v.text},{children:"Oops! Can't generate your response now."}))}))]}))};export{v as default};
1
+ import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useRef as n,useMemo as r,useEffect as i}from"react";import a from"react-markdown";import o from"rehype-raw";import d from"./AppModCitationContent.module.css.js";import s from"./components/CodeLinkHandler.js";import{DEFAULT_HIGHLIGHT_THEME as t}from"./types.js";import{renderAIConfidenceDisplay as c}from"../../../../RequirementAiCitations/AiReasoning/components/AIConfidenceDisplay.js";import{SparkleIcon as m}from"./icons/SparkleIcon.js";const h=(l,n,r,i)=>{const a=(null==n?void 0:n.highlight)||t,o=()=>l?{backgroundColor:a.background,color:a.text,padding:"2px 3px",borderRadius:"2px",boxDecorationBreak:"clone",WebkitBoxDecorationBreak:"clone"}:{},c=()=>({...o(),display:"inline"});return{h1:({children:r})=>{var i;return e("h1",{className:d.heading1,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading1,children:l?e("span",{style:o(),children:r}):r})},h2:({children:r})=>{var i;return e("h2",{className:d.heading2,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading2,children:l?e("span",{style:o(),children:r}):r})},h3:({children:r})=>{var i;return e("h3",{className:d.heading3,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading3,children:l?e("span",{style:o(),children:r}):r})},h4:({children:r})=>{var i;return e("h4",{className:d.heading4,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading4,children:l?e("span",{style:o(),children:r}):r})},h5:({children:r})=>{var i;return e("h5",{className:d.heading5,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading5,children:l?e("span",{style:o(),children:r}):r})},h6:({children:r})=>{var i;return e("h6",{className:d.heading6,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.heading6,children:l?e("span",{style:o(),children:r}):r})},p:({children:r})=>{var i;return e("p",{className:d.paragraph,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.paragraph,children:l?e("span",{style:c(),children:r}):r})},ol:({children:l})=>{var r;return e("ol",{className:d.orderedList,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.list,children:l})},ul:({children:l})=>{var r;return e("ul",{className:d.unorderedList,style:null===(r=null==n?void 0:n.markdown)||void 0===r?void 0:r.list,children:l})},li:({children:r})=>{var i;return e("li",{className:d.listItem,style:null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.listItem,children:l?e("span",{style:c(),children:r}):r})},strong:({children:r})=>{var i;return e("strong",{className:d.strong,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.strong,...l?o():{}},children:r})},em:({children:r})=>{var i;return e("em",{className:d.emphasis,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.emphasis,...l?o():{}},children:r})},a:({children:o,href:d})=>e(s,{href:d,codeLinkConfig:i,isHighlighted:l,highlightTheme:a,customStyles:null==n?void 0:n.markdown,customIcon:null==r?void 0:r.appModCitationLinkIcon,children:o}),code:({children:r,className:i})=>{var o,s;const t=null==i?void 0:i.includes("language-"),c=l?{backgroundColor:a.codeBackground,color:a.codeText,border:`1px solid ${a.codeBorder}`}:{};return t?e("div",{children:e("code",{className:d.codeBlock,style:{...null===(s=null==n?void 0:n.markdown)||void 0===s?void 0:s.codeBlock,...c},children:r})}):e("code",{className:d.inlineCode,style:{...null===(o=null==n?void 0:n.markdown)||void 0===o?void 0:o.code,...c},children:r})},pre:({children:l})=>e("pre",{className:d.preBlock,children:l}),blockquote:({children:r})=>{var i;return e("blockquote",{className:d.blockquote,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.blockquote,...l?{borderColor:a.border}:{}},children:l?e("span",{style:c(),children:r}):r})},table:({children:r})=>{var i;return e("div",{className:d.tableWrapper,children:e("table",{className:d.table,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.table,...l?o():{}},children:r})})},thead:({children:l})=>e("thead",{className:d.tableHead,children:l}),tbody:({children:l})=>e("tbody",{className:d.tableBody,children:l}),tr:({children:n})=>e("tr",{className:d.tableRow,style:l?o():{},children:n}),th:({children:r})=>{var i;return e("th",{className:d.tableHeader,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableHeader,...l?o():{}},children:r})},td:({children:r})=>{var i;return e("td",{className:d.tableCell,style:{...null===(i=null==n?void 0:n.markdown)||void 0===i?void 0:i.tableCell,...l?o():{}},children:r})},details:({children:l})=>e("details",{className:d.details,children:l}),summary:({children:n})=>{const r=e=>{var l;return"string"==typeof e?e:Array.isArray(e)?e.map(r).join(""):(null===(l=null==e?void 0:e.props)||void 0===l?void 0:l.children)?r(e.props.children):""},i=r(n).replace(/:$/,"").trim();return e("summary",{className:d.summary,style:l?o():{},children:i})}}},u=({citation:s,customStyles:t,customIcons:u,codeLinkConfig:v,isLoading:p=!1,shouldAutoScroll:y=!1})=>{var g,b;const N=n(null),k=n(null),w=s.description||"",f=s.customMetadata.question||"",C=s.customMetadata.highlighted_text,x=s.customMetadata.relevance_score,I=r(()=>h(!1,t,u,v),[t,u,v]),q=r(()=>h(!0,t,u,v),[t,u,v]);i(()=>{if(!y||!(null==C?void 0:C.trim())||!(null==w?void 0:w.trim())||p)return;const e=k.current;if(!e)return;const l=()=>{e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},n=window.requestAnimationFrame(()=>{l(),window.setTimeout(l,120)});return()=>{window.cancelAnimationFrame(n)}},[w,C,p,y]);const A=(null==u?void 0:u.appModCitationIcon)||e("div",{children:e(m,{className:d.headerIcon})});return l("div",{ref:N,className:d.container,style:null==t?void 0:t.container,children:[l("div",{className:d.header,style:null==t?void 0:t.header,children:[l("div",{className:d.headerLeft,style:null==t?void 0:t.headerLeft,children:[e("span",{style:null==t?void 0:t.headerIcon,children:A}),e("span",{className:d.headerTitle,style:null==t?void 0:t.headerTitle,children:"AskMod Response"})]}),c(x,null==t?void 0:t.confidenceDisplay)]}),l("div",{className:d.questionContainer,style:null==t?void 0:t.questionContainer,children:[e("p",{className:d.questionLabel,style:null==t?void 0:t.questionLabel,children:"Me"}),e("div",{className:d.questionText,style:null==t?void 0:t.questionText,children:f||"Ask question to get response"})]}),e("div",{className:d.answerIconRow,style:null==t?void 0:t.answerIconRow,children:l("p",{className:d.assistantName,style:null==t?void 0:t.assistantName,children:["Askmod",e("span",{className:d.assistantNameInner,style:null==t?void 0:t.assistantNameInner,children:".AI"})]})}),e("div",{className:d.answerContainer,style:null==t?void 0:t.answerContainer,children:p?e("span",{className:d.loadingText,style:null===(g=null==t?void 0:t.loading)||void 0===g?void 0:g.text,children:"Generating..."}):w?((n,r)=>{const i=((e="")=>e.replace(/<details\b([^>]*)>/gi,(e,l)=>/\bopen\b/i.test(l)?"<details open>":"<details>").replace(/<summary\b[^>]*>\s*<codebasename>([^<]*)<\/codebasename>\s*<\/summary>/gi,(e,l)=>`<summary class="codebase-summary codebasename">From ${l.trim()} codebase</summary>`).replace(/<\/summary>/g,"</summary>\n").replace(/```codebasename\s*([\s\S]{0,2000}?)```/gi,(e,l)=>`<codebasename>${l.trim()}</codebasename>`).trim())(n.replace(/\\n/g,"\n"));if(r&&i.includes(r)){const n=i.indexOf(r),s=i.substring(0,n),t=i.substring(n,n+r.length),c=i.substring(n+r.length),m=!t.trim();return l("div",{className:d.markdownContent,children:[s&&e(a,{rehypePlugins:[o],components:I,children:s}),t&&!m&&e("div",{ref:k,"data-appmod-highlight-anchor":"true",children:e(a,{rehypePlugins:[o],components:q,children:t})}),t&&m&&t,c&&e(a,{rehypePlugins:[o],components:I,children:c})]})}return e(a,{className:d.markdownContent,rehypePlugins:[o],components:I,children:i})})(w,C):e("span",{className:d.errorText,style:null===(b=null==t?void 0:t.error)||void 0===b?void 0:b.text,children:"Oops! Can't generate your response now."})})]})};export{u as default};
2
2
  //# sourceMappingURL=AppmodCitationContent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as n,Fragment as i}from"react/jsx-runtime";import{SparkleIcon as o}from"lucide-react";import{useState as e,useCallback as r}from"react";import a from"../../../../CitationRenderer/CitationRenderer.js";import c from"./AppmodCitationContent.js";var l=function(l){var p=l.title,s=l.citation,m=l.customStyles,d=l.customIcons,u=l.codeLinkConfig,f=l.isLoading,g=void 0!==f&&f,C=l.isOpen,h=e(!1),x=h[0],b=h[1],v=void 0!==C,k=v?!!C:x,I=r(function(){v||b(function(t){return!t})},[v]),w=(null==d?void 0:d.appModCitationIcon)||n(o,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}});return n(a,{inLineCitation:!0,citationTitle:p+"⁠",citationIcon:n(i,{}),citationId:"appmod-ai-".concat(s.citation_number),citationComponent:n(c,{citation:s,customStyles:m,customIcons:d,codeLinkConfig:u,isLoading:g,shouldAutoScroll:k}),isOpen:k,onToggle:I,chevronDownComponent:w,chevronUpComponent:w,styles:{pillButton:t({fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none"},null==m?void 0:m.pill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};export{l as default};
1
+ import{jsx as t,Fragment as n}from"react/jsx-runtime";import{SparkleIcon as i}from"lucide-react";import{useState as o,useCallback as e}from"react";import r from"../../../../CitationRenderer/CitationRenderer.js";import a from"./AppmodCitationContent.js";const c=({title:c,citation:l,customStyles:p,customIcons:s,codeLinkConfig:m,isLoading:d=!1,isOpen:u})=>{const[g,f]=o(!1),C=void 0!==u,h=C?!!u:g,x=e(()=>{C||f(t=>!t)},[C]),b=(null==s?void 0:s.appModCitationIcon)||t(i,{className:"inline align-super mb-1 ml-1",style:{width:"12px",height:"12px"}});return t(r,{inLineCitation:!0,citationTitle:c+"⁠",citationIcon:t(n,{}),citationId:`appmod-ai-${l.citation_number}`,citationComponent:t(a,{citation:l,customStyles:p,customIcons:s,codeLinkConfig:m,isLoading:d,shouldAutoScroll:h}),isOpen:h,onToggle:x,chevronDownComponent:b,chevronUpComponent:b,styles:{pillButton:{fontSize:"13px",margin:"0px",padding:"0px 4px",color:"#3b82f6",cursor:"pointer",verticalAlign:"baseline",whiteSpace:"normal",wordBreak:"break-all",display:"inline-flex",alignItems:"unset",background:"transparent",border:"none",...null==p?void 0:p.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})};export{c as default};
2
2
  //# sourceMappingURL=AppmodCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,jsxs as i}from"react/jsx-runtime";import o from"./CodeLinkHandler.module.css.js";import{ExternalLinkIcon as t,ChevronUpIcon as a,ChevronDownIcon as r}from"lucide-react";import{CodeCitation as l}from"@e-llm-studio/citation";import{DEFAULT_HIGHLIGHT_THEME as d}from"../types.js";var s=function(s){var c,m,f=s.href,u=s.children,h=s.codeLinkConfig,p=s.isHighlighted,g=void 0!==p&&p,C=s.highlightTheme,v=void 0===C?d:C,k=s.customStyles,b=s.customIcon;if(!f)return n("span",{children:u});var w,L,x=function(e){try{var n=new URL(e,"http://example.com"),i=n.searchParams.get("startLine"),o=n.searchParams.get("endLine"),t=n.searchParams.get("validation");n.searchParams.delete("startLine"),n.searchParams.delete("endLine"),n.searchParams.delete("validation");var a=n.pathname+n.search;return{filePath:decodeURIComponent(a.replace(/^\//,"")),fullPath:decodeURIComponent(e),startLine:i,endLine:o,validation:t}}catch(n){return{filePath:e,fullPath:e,startLine:null,endLine:null,validation:null}}}(f),y="string"==typeof u?u.split("\n").length>1?"Generated Code":u:(null===(c=null==u?void 0:u.props)||void 0===c?void 0:c.children)||f||"Generated Code";if("vscode"===(null==h?void 0:h.mode)){var P=g?{backgroundColor:v.linkBackground,borderColor:v.linkBorder}:void 0,I=g?{color:v.linkText}:void 0,N=g?{color:v.linkIconColor}:null==k?void 0:k.linkIcon,S=b||n(t,{className:o.linkIcon,style:N});return n("a",e({href:f,title:f,onClick:function(e){e.preventDefault(),(null==h?void 0:h.onCodeLinkClick)&&h.onCodeLinkClick({filePath:x.filePath,startLine:x.startLine,endLine:x.endLine,validation:x.validation})},className:o.linkContainer,style:null==k?void 0:k.link},{children:i("span",e({className:o.linkWrapper,style:P},{children:[S,n("span",e({className:o.linkText,style:I},{children:u}))]}))}))}if("web"===(null==h?void 0:h.mode)&&h.webConfig){var T=(w=x.filePath,(L=/\.(\w+)$/.exec(w))?L[1]:"plaintext");return n(l,{baseUrlForCodeRetrieval:h.baseUrlForCodeRetrieval||"",filepath:x.fullPath,assistantName:h.webConfig.assistantName,organizationName:h.webConfig.organizationName,userId:h.webConfig.userId,taskId:h.webConfig.taskId,repoUrl:h.webConfig.repoUrl,inLineCitation:!0,citationTitle:y,filename:"Generated Code"!==y?x.filePath:".".concat(T),fileSummarySectionTitle:"File Summary",citationContainerTitle:"Code Preview",showFileSummaryIButton:!0,showFullscreenIcon:!0,showThemeToggle:!0,isDarkModeEnabled:null===(m=h.webConfig.isDarkModeEnabled)||void 0===m||m,chevronUpComponent:h.webConfig.chevronUpComponent||n(a,{}),chevronDownComponent:h.webConfig.chevronDownComponent||n(r,{}),isHighlightingEnabled:!0,editorHeight:"95%",editorWidth:"100%",startIndex:x.startLine?Number(x.startLine):void 0,endIndex:x.endLine?Number(x.endLine):void 0,datasource:h.webConfig.datasource,styles:{pillButton:e({display:"inline-flex",alignItems:"center",fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"transparent",padding:"0px",fontSize:"13px",borderRadius:"9999px",cursor:"pointer",color:"#d63384",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},null==k?void 0:k.link),citationWrapper:{justifyContent:"flex-start",width:"100%"},citationContent:{width:"100%",height:"500px",backgroundColor:"#eff6ff",border:"1px solid #000",padding:"8px",borderRadius:"4px"},citationContainerTitle:{fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000",fontSize:"16px",fontWeight:"bold",marginBottom:"8px"}}})}return n("a",e({href:f,target:"_blank",rel:"noopener noreferrer",className:o.regularLink,style:null==k?void 0:k.link},{children:u}))};export{s as default};
1
+ import{jsx as e,jsxs as n}from"react/jsx-runtime";import i from"./CodeLinkHandler.module.css.js";import{ExternalLinkIcon as t,ChevronUpIcon as o,ChevronDownIcon as a}from"lucide-react";import{CodeCitation as r}from"@e-llm-studio/citation";import{DEFAULT_HIGHLIGHT_THEME as l}from"../types.js";const s=({href:s,children:d,codeLinkConfig:c,isHighlighted:m=!1,highlightTheme:h=l,customStyles:u,customIcon:f})=>{var p,g;if(!s)return e("span",{children:d});const C=(e=>{try{const n=new URL(e,"http://example.com"),i=n.searchParams.get("startLine"),t=n.searchParams.get("endLine"),o=n.searchParams.get("validation");n.searchParams.delete("startLine"),n.searchParams.delete("endLine"),n.searchParams.delete("validation");const a=n.pathname+n.search;return{filePath:decodeURIComponent(a.replace(/^\//,"")),fullPath:decodeURIComponent(e),startLine:i,endLine:t,validation:o}}catch(n){return{filePath:e,fullPath:e,startLine:null,endLine:null,validation:null}}})(s),k="string"==typeof d?d.split("\n").length>1?"Generated Code":d:(null===(p=null==d?void 0:d.props)||void 0===p?void 0:p.children)||s||"Generated Code";if("vscode"===(null==c?void 0:c.mode)){const o=e=>{e.preventDefault(),(null==c?void 0:c.onCodeLinkClick)&&c.onCodeLinkClick({filePath:C.filePath,startLine:C.startLine,endLine:C.endLine,validation:C.validation})},a=m?{backgroundColor:h.linkBackground,borderColor:h.linkBorder}:void 0,r=m?{color:h.linkText}:void 0,l=m?{color:h.linkIconColor}:null==u?void 0:u.linkIcon,p=f||e(t,{className:i.linkIcon,style:l});return e("a",{href:s,title:s,onClick:o,className:i.linkContainer,style:null==u?void 0:u.link,children:n("span",{className:i.linkWrapper,style:a,children:[p,e("span",{className:i.linkText,style:r,children:d})]})})}if("web"===(null==c?void 0:c.mode)&&c.webConfig){const n=(e=>{const n=/\.(\w+)$/.exec(e);return n?n[1]:"plaintext"})(C.filePath);return e(r,{baseUrlForCodeRetrieval:c.baseUrlForCodeRetrieval||"",filepath:C.fullPath,assistantName:c.webConfig.assistantName,organizationName:c.webConfig.organizationName,userId:c.webConfig.userId,taskId:c.webConfig.taskId,repoUrl:c.webConfig.repoUrl,inLineCitation:!0,citationTitle:k,filename:"Generated Code"!==k?C.filePath:`.${n}`,fileSummarySectionTitle:"File Summary",citationContainerTitle:"Code Preview",showFileSummaryIButton:!0,showFullscreenIcon:!0,showThemeToggle:!0,isDarkModeEnabled:null===(g=c.webConfig.isDarkModeEnabled)||void 0===g||g,chevronUpComponent:c.webConfig.chevronUpComponent||e(o,{}),chevronDownComponent:c.webConfig.chevronDownComponent||e(a,{}),isHighlightingEnabled:!0,editorHeight:"95%",editorWidth:"100%",startIndex:C.startLine?Number(C.startLine):void 0,endIndex:C.endLine?Number(C.endLine):void 0,datasource:c.webConfig.datasource,styles:{pillButton:{display:"inline-flex",alignItems:"center",fontFamily:"Plus Jakarta Sans, sans-serif",backgroundColor:"transparent",padding:"0px",fontSize:"13px",borderRadius:"9999px",cursor:"pointer",color:"#d63384",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal",...null==u?void 0:u.link},citationWrapper:{justifyContent:"flex-start",width:"100%"},citationContent:{width:"100%",height:"500px",backgroundColor:"#eff6ff",border:"1px solid #000",padding:"8px",borderRadius:"4px"},citationContainerTitle:{fontFamily:"Plus Jakarta Sans, sans-serif",display:"flex",justifyContent:"space-between",alignItems:"center",color:"#000",fontSize:"16px",fontWeight:"bold",marginBottom:"8px"}}})}return e("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:i.regularLink,style:null==u?void 0:u.link,children:d})};export{s as default};
2
2
  //# sourceMappingURL=CodeLinkHandler.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsxs as o,jsx as t}from"react/jsx-runtime";var e=function(e){var n=e.className,s=e.style;return o("svg",r({className:n,style:s,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))};export{e as AppModIcon};
1
+ import{jsxs as o,jsx as r}from"react/jsx-runtime";const e=({className:e,style:t})=>o("svg",{className:e,style:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});export{e as AppModIcon};
2
2
  //# sourceMappingURL=AppmodIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r}from"react/jsx-runtime";var e=function(e){var o=e.className,s=e.style;return r("svg",t({className:o,style:s,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}))};export{e as ChatBubbleIcon};
1
+ import{jsx as t}from"react/jsx-runtime";const e=({className:e,style:s})=>t("svg",{className:e,style:s,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})});export{e as ChatBubbleIcon};
2
2
  //# sourceMappingURL=ChatBubbleIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r}from"react/jsx-runtime";var e=function(e){var s=e.className,i=e.style;return r("svg",t({className:s,style:i,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})}))};export{e as SparkleIcon};
1
+ import{jsx as t}from"react/jsx-runtime";const s=({className:s,style:e})=>t("svg",{className:s,style:e,width:"12",height:"12",viewBox:"0 0 24 24",fill:"#3b82f6",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M12 0L14.59 9.41L24 12L14.59 14.59L12 24L9.41 14.59L0 12L9.41 9.41L12 0Z"})});export{s as SparkleIcon};
2
2
  //# sourceMappingURL=SparkleIcon.js.map
@@ -1,2 +1,2 @@
1
- var d={background:"#fef3c7",text:"#92400e",border:"#fcd34d",linkBackground:"#fef3c7",linkText:"#92400e",linkBorder:"#fcd34d",linkIconColor:"#d97706",codeBackground:"#fef3c7",codeText:"#92400e",codeBorder:"#fcd34d"};export{d as DEFAULT_HIGHLIGHT_THEME};
1
+ const d={background:"#fef3c7",text:"#92400e",border:"#fcd34d",linkBackground:"#fef3c7",linkText:"#92400e",linkBorder:"#fcd34d",linkIconColor:"#d97706",codeBackground:"#fef3c7",codeText:"#92400e",codeBorder:"#fcd34d"};export{d as DEFAULT_HIGHLIGHT_THEME};
2
2
  //# sourceMappingURL=types.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as i}from"tslib";import{jsx as n,jsxs as o}from"react/jsx-runtime";import{memo as a,useState as r,useRef as l,useCallback as d,useEffect as s}from"react";import c from"./searchwaveform.js";import u from"./components/videoPlayer.js";import{sortTopicsByCheckedStatus as m}from"./utils/word-segment-util.js";import v from"./components/SegmentByWordsViral.js";import h from"./SearchWaveFromWrapper.module.css.js";import p from"./icons/AudioLinesIcon.js";import f from"./icons/VideoIcon.js";import{CircularProgress as g}from"@mui/material";import{renderCitationAIConfidenceDisplay as y}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as S}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{AudioPlayProvider as P}from"./store/autoplay.wavefrom.js";var w=function(e){var t=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60),o=function(e){return String(e).padStart(2,"0")};return"".concat(o(t),":").concat(o(i),":").concat(n.toFixed(0))},N=a(function(a){var N=a.title,A=a.segments,U=a.gsUtilPath,L=a.citationNumber,j=a.relevanceScore,B=a.customStyles,b=r(0),k=b[0],C=b[1],M=r(A.length>0),T=M[0],W=M[1],I=r(!1);I[0];var x=I[1],V=r(!1),D=V[0],Q=V[1],q=r(""),E=q[0],G=q[1],O=r(!0),R=O[0],_=O[1],z=r("audio"),F=z[0],H=z[1],$=S().apiCachingConfig,J=$.queryClient,K=$.useGetSignedUrlQuery,X=$.useGetSignedUrlMutation,Y=$.useExtractAudioPeaksMutation,Z=$.useExtractAudioPeaksQuery,ee=$.useGetVideoSignedUrlQuery,te=$.useGetVideoSignedUrlMutation,ie=l(null),ne=U.replace(/\.wav$|\.mp3$/i,".mp4"),oe=["getSignedUrl",U],ae=["extractAudioPeaks",U],re=["getVideoSignedUrl",ne],le=K(U,oe).data,de=Z(U,ae).data,se=ee(ne,re).data,ce=X(U),ue=ce.mutate,me=ce.isPending,ve=Y(U),he=ve.mutate,pe=ve.isPending,fe=te(ne).mutate,ge=d(function(e){C(e)},[]);s(function(){if(U){var e=J.getQueryData(oe),t=J.getQueryData(ae),i=J.getQueryData(re);e||ue({gsUtilPath:U}),t||he({gsUtilPath:U}),i||fe({gsUtilPath:ne})}else console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL")},[U]),s(function(){se&&t(void 0,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:return[4,fetch(se)];case 1:return e=t.sent(),G(e.ok?se:""),[2]}})})},[se]);return n(P,{children:o("div",e({className:h.wrapper,style:null==B?void 0:B.wrapper},{children:[o("div",e({className:h.header,style:null==B?void 0:B.header},{children:[n("h2",e({className:h.title,style:null==B?void 0:B.title},{children:N||"Audio Snippet"})),y(j,!0,null==B?void 0:B.confidenceDisplay)]})),o("div",e({className:h.content,style:null==B?void 0:B.content},{children:["audio"!==F&&E?o("div",e({className:h.videoSection,style:null==B?void 0:B.videoSection},{children:[R&&o("div",e({className:h.videoLoader,style:null==B?void 0:B.videoLoader},{children:[n(g,{size:40}),n("p",{children:"Loading video..."})]})),n("div",e({style:{visibility:R?"hidden":"visible",position:R?"absolute":"relative"}},{children:n(u,{videoSrc:E,currentTime:k,isWaveformPlaying:D,onBufferingStart:function(){x(!0),D&&Q(!1)},onBufferingEnd:function(){x(!1)},onVideoPlayPause:function(e){ie.current?e?D||ie.current.togglePlayPause():D&&ie.current.togglePlayPause():Q(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:function(e){return function(e){_(e)}(e)},isUrlPending:me,isPeaksPending:pe,signedUrl:le,AudioData:de,showOnlyMatched:T,wavesurferRef:ie,handleAudioTimeUpdate:ge,segments:A,setIsAudioPlaying:Q,setShowOnlyMatched:W,customStyles:null==B?void 0:B.videoPlayer,waveformStyles:null==B?void 0:B.waveform},"video-".concat(L))}))]})):n("div",e({className:h.audioSection,style:null==B?void 0:B.audioSection},{children:me||pe?o("div",e({className:h.audioLoader,style:null==B?void 0:B.audioLoader},{children:[n(g,{size:48}),n("span",{children:"Loading audio peaks..."})]})):le&&de&&n(c,{ref:ie,audio_file_name:le,matchedSegments:A,peaks:de.peaks,duration:de.duration,setIsAudioPlaying:Q,onTimeUpdate:ge,currentAudioTime:k,showOnlyMatched:T,setShowOnlyMatched:W,customStyles:null==B?void 0:B.waveform},"audio-".concat(L))})),o("div",e({className:h.controls,style:null==B?void 0:B.controls},{children:[E&&o("div",e({className:h.mediaToggle,style:null==B?void 0:B.mediaToggle},{children:[n("span",e({className:"\n ".concat(h.mediaButton,"\n ").concat("video"===F&&h.mediaButtonActive,"\n "),style:"video"===F?null==B?void 0:B.mediaButtonActive:null==B?void 0:B.mediaButton,onClick:function(){return H("video")}},{children:n(f,{})})),n("span",e({className:"\n ".concat(h.mediaButton,"\n ").concat("audio"===F&&h.mediaButtonActive,"\n "),style:"audio"===F?null==B?void 0:B.mediaButtonActive:null==B?void 0:B.mediaButton,onClick:function(){return H("audio")}},{children:n(p,{})}))]})),n("label",e({className:h.switchLabel,style:null==B?void 0:B.switchLabel},{children:n("span",{children:"play only matched segments"})}))]})),o("div",e({className:h.transcript,style:null==B?void 0:B.transcriptContainer},{children:[n("div",e({className:h.transcriptHeader,style:null==B?void 0:B.transcriptHeader},{children:"Transcript"})),function(t){var i=m(t);return n("div",e({className:h.segmentList,style:null==B?void 0:B.segmentList},{children:null==i?void 0:i.map(function(t){return n("div",e({id:t.segment_id,className:h.segmentItem,style:null==B?void 0:B.transcriptSegment},{children:n(v,{content:t.text,startTime:w(t.start),endTime:w(t.end),words:t.words||[],currentTime:k,containerStyle:null==B?void 0:B.transcriptContainer,customStyles:null==B?void 0:B.segmentWords})}),t.segment_id)})}))}(A)]}))]}))]}))})});export{N as default,w as formatTime};
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{memo as t,useState as o,useRef as a,useCallback as n,useEffect as l}from"react";import r from"./searchwaveform.js";import s from"./components/videoPlayer.js";import{sortTopicsByCheckedStatus as d}from"./utils/word-segment-util.js";import c from"./components/SegmentByWordsViral.js";import u from"./SearchWaveFromWrapper.module.css.js";import m from"./icons/AudioLinesIcon.js";import v from"./icons/VideoIcon.js";import{CircularProgress as p}from"@mui/material";import{renderCitationAIConfidenceDisplay as g}from"../../../shared/CitationAIConfidenceDisplay.js";import{useRequirementAI as h}from"../../RequirementAIWrapper/RequirementAIWrapper.js";import{AudioPlayProvider as y}from"./store/autoplay.wavefrom.js";const f=e=>{const i=Math.floor(e/3600),t=Math.floor(e%3600/60),o=Math.floor(e%60),a=e=>String(e).padStart(2,"0");return`${a(i)}:${a(t)}:${o.toFixed(0)}`},S=t(({title:t,segments:S,gsUtilPath:P,citationNumber:w,relevanceScore:N,customStyles:A})=>{const[U,L]=o(0),[j,B]=o(S.length>0),[$,k]=o(!1),[C,M]=o(!1),[T,W]=o(""),[b,I]=o(!0),[x,V]=o("audio"),{queryClient:D,useGetSignedUrlQuery:Q,useGetSignedUrlMutation:q,useExtractAudioPeaksMutation:E,useExtractAudioPeaksQuery:G,useGetVideoSignedUrlQuery:O,useGetVideoSignedUrlMutation:R}=h().apiCachingConfig,_=a(null),z=P.replace(/\.wav$|\.mp3$/i,".mp4"),F=["getSignedUrl",P],H=["extractAudioPeaks",P],J=["getVideoSignedUrl",z],{data:K}=Q(P,F),{data:X}=G(P,H),{data:Y}=O(z,J),{mutate:Z,isPending:ee}=q(P),{mutate:ie,isPending:te}=E(P),{mutate:oe}=R(z),ae=n(e=>{L(e)},[]);l(()=>{if(!P)return void console.error("Error -> SearchWaveformWrapper: gsUtilPath is required to fetch signed URL");const e=D.getQueryData(F),i=D.getQueryData(H),t=D.getQueryData(J);e||Z({gsUtilPath:P}),i||ie({gsUtilPath:P}),t||oe({gsUtilPath:z})},[P]),l(()=>{Y&&(async()=>{const e=await fetch(Y);W(e.ok?Y:"")})()},[Y]);return e(y,{children:i("div",{className:u.wrapper,style:null==A?void 0:A.wrapper,children:[i("div",{className:u.header,style:null==A?void 0:A.header,children:[e("h2",{className:u.title,style:null==A?void 0:A.title,children:t||"Audio Snippet"}),g(N,!0,null==A?void 0:A.confidenceDisplay)]}),i("div",{className:u.content,style:null==A?void 0:A.content,children:["audio"!==x&&T?i("div",{className:u.videoSection,style:null==A?void 0:A.videoSection,children:[b&&i("div",{className:u.videoLoader,style:null==A?void 0:A.videoLoader,children:[e(p,{size:40}),e("p",{children:"Loading video..."})]}),e("div",{style:{visibility:b?"hidden":"visible",position:b?"absolute":"relative"},children:e(s,{videoSrc:T,currentTime:U,isWaveformPlaying:C,onBufferingStart:()=>{k(!0),C&&M(!1)},onBufferingEnd:()=>{k(!1)},onVideoPlayPause:e=>{_.current?e?C||_.current.togglePlayPause():C&&_.current.togglePlayPause():M(e)},className:"w-full aspect-video rounded-lg overflow-hidden shadow-lg mb-2",onVideoLoadingStateChange:e=>(e=>{I(e)})(e),isUrlPending:ee,isPeaksPending:te,signedUrl:K,AudioData:X,showOnlyMatched:j,wavesurferRef:_,handleAudioTimeUpdate:ae,segments:S,setIsAudioPlaying:M,setShowOnlyMatched:B,customStyles:null==A?void 0:A.videoPlayer,waveformStyles:null==A?void 0:A.waveform},`video-${w}`)})]}):e("div",{className:u.audioSection,style:null==A?void 0:A.audioSection,children:ee||te?i("div",{className:u.audioLoader,style:null==A?void 0:A.audioLoader,children:[e(p,{size:48}),e("span",{children:"Loading audio peaks..."})]}):K&&X&&e(r,{ref:_,audio_file_name:K,matchedSegments:S,peaks:X.peaks,duration:X.duration,setIsAudioPlaying:M,onTimeUpdate:ae,currentAudioTime:U,showOnlyMatched:j,setShowOnlyMatched:B,customStyles:null==A?void 0:A.waveform},`audio-${w}`)}),i("div",{className:u.controls,style:null==A?void 0:A.controls,children:[T&&i("div",{className:u.mediaToggle,style:null==A?void 0:A.mediaToggle,children:[e("span",{className:`\n ${u.mediaButton}\n ${"video"===x&&u.mediaButtonActive}\n `,style:"video"===x?null==A?void 0:A.mediaButtonActive:null==A?void 0:A.mediaButton,onClick:()=>V("video"),children:e(v,{})}),e("span",{className:`\n ${u.mediaButton}\n ${"audio"===x&&u.mediaButtonActive}\n `,style:"audio"===x?null==A?void 0:A.mediaButtonActive:null==A?void 0:A.mediaButton,onClick:()=>V("audio"),children:e(m,{})})]}),e("label",{className:u.switchLabel,style:null==A?void 0:A.switchLabel,children:e("span",{children:"play only matched segments"})})]}),i("div",{className:u.transcript,style:null==A?void 0:A.transcriptContainer,children:[e("div",{className:u.transcriptHeader,style:null==A?void 0:A.transcriptHeader,children:"Transcript"}),(i=>{const t=d(i);return e("div",{className:u.segmentList,style:null==A?void 0:A.segmentList,children:null==t?void 0:t.map(i=>e("div",{id:i.segment_id,className:u.segmentItem,style:null==A?void 0:A.transcriptSegment,children:e(c,{content:i.text,startTime:f(i.start),endTime:f(i.end),words:i.words||[],currentTime:U,containerStyle:null==A?void 0:A.transcriptContainer,customStyles:null==A?void 0:A.segmentWords})},i.segment_id))})})(S)]})]})]})})});export{S as default,f as formatTime};
2
2
  //# sourceMappingURL=SearchWaveFromWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as i}from"react/jsx-runtime";import o from"react";import n from"./components/AudioCitationIcon.js";import e from"./SearchWaveFromWrapper.js";import a from"../../../../CitationRenderer/CitationRenderer.js";var c=function(c){var r,l,m,d,s,u,p,v=(null===(r=c.customIcons)||void 0===r?void 0:r.waveformCitationIcon)||i(n,{});return i(a,{inLineCitation:!0,citationTitle:c.title,citationId:"audio-citation-".concat(c.citation.citation_number),citationComponent:i(e,{citationNumber:c.citation.citation_number,gsUtilPath:"audio_transcript"===c.citation.customMetadata.type?null===(l=c.citation.customMetadata)||void 0===l?void 0:l.gs_util_url:"",relevanceScore:"audio_transcript"===c.citation.customMetadata.type?null===(m=c.citation.customMetadata)||void 0===m?void 0:m.relevance_score:0,title:"audio_transcript"===c.citation.customMetadata.type?null===(d=c.citation.customMetadata)||void 0===d?void 0:d.file_name:"",segments:"audio_transcript"===c.citation.customMetadata.type?null===(s=c.citation.customMetadata)||void 0===s?void 0:s.segments:[],customStyles:c.customStyles}),chevronDownComponent:(null==c?void 0:c.citationIcon)?o.createElement(c.citationIcon):v,chevronUpComponent:(null==c?void 0:c.citationIcon)?o.createElement(c.citationIcon):v,styles:{pillButton:t({margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none"},null===(u=c.customStyles)||void 0===u?void 0:u.pill),citationContent:t({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null===(p=c.customStyles)||void 0===p?void 0:p.content)}})};export{c as default};
1
+ import{jsx as t}from"react/jsx-runtime";import i from"react";import o from"./components/AudioCitationIcon.js";import n from"./SearchWaveFromWrapper.js";import e from"../../../../CitationRenderer/CitationRenderer.js";const a=a=>{var c,r,l,d,s,m,u;const p=(null===(c=a.customIcons)||void 0===c?void 0:c.waveformCitationIcon)||t(o,{});return t(e,{inLineCitation:!0,citationTitle:a.title,citationId:`audio-citation-${a.citation.citation_number}`,citationComponent:t(n,{citationNumber:a.citation.citation_number,gsUtilPath:"audio_transcript"===a.citation.customMetadata.type?null===(r=a.citation.customMetadata)||void 0===r?void 0:r.gs_util_url:"",relevanceScore:"audio_transcript"===a.citation.customMetadata.type?null===(l=a.citation.customMetadata)||void 0===l?void 0:l.relevance_score:0,title:"audio_transcript"===a.citation.customMetadata.type?null===(d=a.citation.customMetadata)||void 0===d?void 0:d.file_name:"",segments:"audio_transcript"===a.citation.customMetadata.type?null===(s=a.citation.customMetadata)||void 0===s?void 0:s.segments:[],customStyles:a.customStyles}),chevronDownComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.citationIcon):p,chevronUpComponent:(null==a?void 0:a.citationIcon)?i.createElement(a.citationIcon):p,styles:{pillButton:{margin:"0px",padding:"0px",fontSize:"14px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",background:"white",border:"none",...null===(m=a.customStyles)||void 0===m?void 0:m.pill},citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content",...null===(u=a.customStyles)||void 0===u?void 0:u.content}}})};export{a as default};
2
2
  //# sourceMappingURL=WaveformCitationRenderer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as i,jsxs as r}from"react/jsx-runtime";var e=function(e){return i("div",t({className:"mb-2"},{children:r("svg",t({width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("path",{d:"M6.00012 4.5C6.00012 3.70435 6.31619 2.94129 6.8788 2.37868C7.44141 1.81607 8.20447 1.5 9.00012 1.5H14.3791C14.9757 1.50053 15.5476 1.73792 15.9691 2.16L20.3416 6.531C20.7631 6.9528 21 7.52468 21.0001 8.121V19.5C21.0001 20.2957 20.684 21.0587 20.1214 21.6213C19.5588 22.1839 18.7958 22.5 18.0001 22.5H10.4561L10.4562 21.063H11.6561L18.0001 21C18.3979 21 18.7795 20.842 19.0608 20.5607C19.3421 20.2794 19.5001 19.8978 19.5001 19.5V9H15.7501C15.1534 9 14.5811 8.76295 14.1591 8.34099C13.7372 7.91903 13.5001 7.34674 13.5001 6.75V3H9.00012C8.60229 3 8.22076 3.15804 7.93946 3.43934C7.65815 3.72064 7.50012 4.10218 7.50012 4.5V8.14383H6.00012V4.5ZM15.7501 7.5H19.1896L15.0001 3.3105V6.75C15.0001 6.94891 15.0791 7.13968 15.2198 7.28033C15.3604 7.42098 15.5512 7.5 15.7501 7.5Z",fill:"#5C75F4"}),i("path",{d:"M10.0691 14.3961V15.3008C10.0691 17.0495 8.65149 18.4672 6.90273 18.4672M3.73633 14.3961V15.3008C3.73633 17.0495 5.15398 18.4672 6.90273 18.4672M6.90273 18.4672V19.8242M5.09336 19.8242H8.71211M6.90273 16.6578C6.15327 16.6578 5.5457 16.0502 5.5457 15.3008V12.1344C5.5457 11.3849 6.15327 10.7773 6.90273 10.7773C7.6522 10.7773 8.25977 11.3849 8.25977 12.1344V15.3008C8.25977 16.0502 7.6522 16.6578 6.90273 16.6578Z",stroke:"#5C75F4","stroke-linecap":"round","stroke-linejoin":"round"}),i("g",t({"clip-path":"url(#clip0_3025_73410)"},{children:i("path",{d:"M11.7012 13.7758L11.7012 14.9758M13.0512 14.0758V14.6758M14.4012 12.5758V16.1758M15.7512 11.6758V17.0758M17.1012 13.7758V14.9758",stroke:"#5C75F4","stroke-width":"0.837402","stroke-linecap":"round","stroke-linejoin":"round"})})),i("defs",{children:i("clipPath",t({id:"clip0_3025_73410"},{children:i("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})}))})]}))}))};export{e as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const i=i=>t("div",{className:"mb-2",children:e("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("path",{d:"M6.00012 4.5C6.00012 3.70435 6.31619 2.94129 6.8788 2.37868C7.44141 1.81607 8.20447 1.5 9.00012 1.5H14.3791C14.9757 1.50053 15.5476 1.73792 15.9691 2.16L20.3416 6.531C20.7631 6.9528 21 7.52468 21.0001 8.121V19.5C21.0001 20.2957 20.684 21.0587 20.1214 21.6213C19.5588 22.1839 18.7958 22.5 18.0001 22.5H10.4561L10.4562 21.063H11.6561L18.0001 21C18.3979 21 18.7795 20.842 19.0608 20.5607C19.3421 20.2794 19.5001 19.8978 19.5001 19.5V9H15.7501C15.1534 9 14.5811 8.76295 14.1591 8.34099C13.7372 7.91903 13.5001 7.34674 13.5001 6.75V3H9.00012C8.60229 3 8.22076 3.15804 7.93946 3.43934C7.65815 3.72064 7.50012 4.10218 7.50012 4.5V8.14383H6.00012V4.5ZM15.7501 7.5H19.1896L15.0001 3.3105V6.75C15.0001 6.94891 15.0791 7.13968 15.2198 7.28033C15.3604 7.42098 15.5512 7.5 15.7501 7.5Z",fill:"#5C75F4"}),t("path",{d:"M10.0691 14.3961V15.3008C10.0691 17.0495 8.65149 18.4672 6.90273 18.4672M3.73633 14.3961V15.3008C3.73633 17.0495 5.15398 18.4672 6.90273 18.4672M6.90273 18.4672V19.8242M5.09336 19.8242H8.71211M6.90273 16.6578C6.15327 16.6578 5.5457 16.0502 5.5457 15.3008V12.1344C5.5457 11.3849 6.15327 10.7773 6.90273 10.7773C7.6522 10.7773 8.25977 11.3849 8.25977 12.1344V15.3008C8.25977 16.0502 7.6522 16.6578 6.90273 16.6578Z",stroke:"#5C75F4","stroke-linecap":"round","stroke-linejoin":"round"}),t("g",{"clip-path":"url(#clip0_3025_73410)",children:t("path",{d:"M11.7012 13.7758L11.7012 14.9758M13.0512 14.0758V14.6758M14.4012 12.5758V16.1758M15.7512 11.6758V17.0758M17.1012 13.7758V14.9758",stroke:"#5C75F4","stroke-width":"0.837402","stroke-linecap":"round","stroke-linejoin":"round"})}),t("defs",{children:t("clipPath",{id:"clip0_3025_73410",children:t("rect",{width:"7.2",height:"7.2",fill:"white",transform:"translate(10.8008 10.7773)"})})})]})});export{i as default};
2
2
  //# sourceMappingURL=AudioCitationIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as r,jsxs as n}from"react/jsx-runtime";import t,{forwardRef as c,useState as u,useRef as i,useEffect as o,useCallback as a}from"react";import l from"wavesurfer.js";import s from"wavesurfer.js/dist/plugins/regions";import{useAudioPlayPause as d}from"../store/autoplay.wavefrom.js";import f from"./AudioTimeLineSlider.module.css.js";var v=c(function(c,v){var m=c.audio_file_name,p=c.matchedSegments,g=c.onTimeUpdate;c.peaks;var h=c.duration,y=c.setIsAudioPlaying,T=c.setChevronIndex,S=c.chevronIndex,w=void 0===S?0:S,k=c.onToggleShowMatched,_=c.topicId,N=c.isVideoBuffering,P=c.playOnlyMatched,M=void 0===P||P,x=c.showOnlyMatched,b=c.setShowOnlyMatched,I=c.customStyles,R=u(!1),C=R[0],D=R[1],j=u(!0);j[0];var O=j[1],q=u(!1),A=q[0],B=q[1],E=u(!1),W=E[0],H=E[1],L=u(!1),U=L[0],X=L[1],z=u(!1);z[0];var F=z[1],G=u(0),V=G[0],J=G[1],K=u(!1);K[0];var Q=K[1],Y=u("00:00:00"),Z=Y[0],$=Y[1],ee=u("00:00:00"),re=ee[0],ne=ee[1],te=u(0),ce=te[0],ue=te[1],ie=u(!1),oe=ie[0],ae=ie[1],le=u(0),se=le[0],de=le[1],fe=u("00:00:00"),ve=fe[0],me=fe[1],pe=i(null),ge=i(!1),he=i(null),ye=i(null),Te=i(null),Se=i(!1),we=i(null),ke=i(null),_e=i(0),Ne=i(0),Pe=u(!1),Me=Pe[0],xe=Pe[1],be=d(),Ie=be.playTopicId,Re=be.resetTrigger,Ce=be.pendingPlayRequest,De=be.setPendingPlayRequest,je=be.triggerPlayForTopic,Oe=i(null),qe=function(e){try{var r=e.split(":"),n=r[0],t=r[1],c=r[2],u=(r[3],parseInt(n).toString().padStart(2,"0")),i=parseInt(t).toString().padStart(2,"0"),o=parseInt(c).toString().padStart(2,"0");return"".concat(u,":").concat(i,":").concat(o)}catch(e){console.log("Error converting formatTimeToHMS",e)}};o(function(){Me&&Ce===_&&(De(null),setTimeout(function(){je(_)},100))},[Me,Ce,_]),o(function(){Me&&Ie===_&&(Oe.current&&(Oe.current.click(),D(!0)),Re())},[Ie,_,Me]),o(function(){return xe(!0),function(){xe(!1)}},[]),o(function(){if(m&&he.current&&!Se.current){O(!0);var e=s.create(),r=l.create({container:he.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ye.current=r,Te.current=r.registerPlugin(e),Se.current=!0,r.on("decode",function(){Q(!0),Be();var e=qe(Ae(h));ne(e||"00:00:00")}),r.on("ready",function(){O(!1)}),r.on("play",function(){D(!0),y&&y(!0)}),r.on("pause",function(){D(!1),y&&y(!1)}),r.on("finish",function(){D(!1),y&&y(!1),A&&(B(!1),H(!1),X(!0))}),r.on("seeking",function(){x||A&&!W&&Ee()}),r.on("error",function(){O(!1)}),r.on("audioprocess",function(e){(g&&g(e),ge.current)||ue(e/h*100);var r=qe(Ae(e));$(r||"00:00:00"),Ne.current=e}),function(){we.current&&clearTimeout(we.current),ke.current,r.destroy(),Se.current=!1,ye.current=null}}},[m]),o(function(){ye.current&&(ye.current.setOptions({interact:!x}),C&&ye.current.pause(),x?(B(!0),_e.current=0):Ee(),k&&k(x))},[x]);var Ae=function(e){var r=Math.floor(e/3600),n=Math.floor(e%3600/60),t=Math.floor(e%60),c=Math.floor(e%1*1e3);return"".concat(String(r).padStart(2,"0"),":").concat(String(n).padStart(2,"0"),":").concat(String(t).padStart(2,"0"),":").concat(String(c).padStart(3,"0"))},Be=a(function(){Te.current&&ye.current&&(Te.current.clearRegions(),p.forEach(function(e,r){Te.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[p]),Ee=a(function(){ye.current&&(B(!1),H(!1),X(!1),F(!1),we.current&&(clearTimeout(we.current),we.current=null),ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null))},[]),We=a(function(e){!x&&ye.current&&(ye.current.seekTo(e/h),ye.current.play(),D(!0),y&&y(!0),$(qe(Ae(e))),B(!1),H(!1),X(!1))},[x,h,y,Ae,qe]),He=i(!1),Le=a(function(){if(!He.current&&ye.current&&p.length){He.current=!0,ye.current.pause();var e=_e.current+1;if(console.log("Current segment:",_e.current),console.log("Next index calculated:",e),console.log("Total segments:",p.length),e<p.length){var r=p[e];$(qe(Ae(r.start_time))),T&&T(e),J(e),_e.current=e;var n=x?0:2e3;we.current=setTimeout(function(){He.current=!1,setTimeout(function(){if(ye.current){ye.current.seekTo(r.start_time/h),ye.current.play();var e=r.end_time,n=function(r){var t;r>=e&&(null===(t=ye.current)||void 0===t||t.un("audioprocess",n),ke.current=null,Le())};ke.current=n,ye.current.on("audioprocess",n)}},100)},n)}else{if(console.log("End of cycle reached, resetting to index 0"),B(x),H(!0),X(!0),_e.current=0,J(0),T&&T(0),p.length>0){var t=p[0];$(qe(Ae(t.start_time))),ye.current.seekTo(t.start_time/h)}ye.current.isPlaying()&&ye.current.pause(),we.current=setTimeout(function(){He.current=!1,ye.current&&ye.current.isPlaying()&&ye.current.pause()},x?0:2e3)}}},[p,h,T,Ae,x]),Ue=a(function(){if(ye.current&&p.length){var e=_e.current;if(e>=p.length)return B(x),void X(!0);var r=p[e];J(e),$(qe(Ae(r.start_time))),T&&T(e),setTimeout(function(){if(ye.current){ye.current.seekTo(r.start_time/h),ye.current.play();var e=r.end_time,n=function(r){var t;r>=e&&(null===(t=ye.current)||void 0===t||t.un("audioprocess",n),ke.current=null,Le())};ke.current=n,ye.current.on("audioprocess",n)}},100)}},[p,h,T,Le,Ae,x]),Xe=a(function(){if(ye.current&&p.length){ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null);var e=p[_e.current];if(e){var r=e.end_time,n=function(e){var t;e>=r&&(null===(t=ye.current)||void 0===t||t.un("audioprocess",n),ke.current=null,Le())};ke.current=n,ye.current.on("audioprocess",n)}}},[p,Le]),ze=a(function(){ye.current&&(x?C?(ye.current.pause(),H(!0)):W?(ye.current.play(),H(!1),Xe()):U?(X(!1),_e.current=0,Ue()):Ue():C?ye.current.pause():ye.current.play())},[C,x,W,U,Ue,Xe]),Fe=a(function(e){if(ye.current&&0!==p.length){var r,n=C;C&&(ye.current.pause(),H(!0)),ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null),r="next"===e?(V+1)%p.length:(V-1+p.length)%p.length,J(r),_e.current=r;var t=p[r];ye.current.seekTo(t.start_time/h),T&&T(r),n&&x&&setTimeout(function(){ye.current&&(ye.current.play(),H(!1),Xe())},50)}},[V,p,T,h,C,x,Xe]),Ge=a(function(e){ye.current&&(x||(A&&Ee(),ye.current.seekTo(e/h)))},[h,A,Ee,x]);o(function(){if(p.length>0&&void 0!==w&&ye.current&&!He.current){if(w===_e.current)return;var e=C;ke.current&&(ye.current.un("audioprocess",ke.current),ke.current=null);var r=p[w];r&&(ye.current.seekTo(r.start_time/h),J(w),_e.current=w,e&&x&&setTimeout(function(){ye.current&&Xe()},50))}},[w,h,p,x,C,Xe]);var Ve=i(!1);o(function(){N&&ye.current&&ye.current.isPlaying()&&(Ve.current=!0,ye.current.pause(),A&&H(!0)),!N&&Ve.current&&ye.current&&ye.current&&(ye.current.play(),Ve.current=!1,A&&W&&(H(!1),Xe()))},[N,A,W,Xe]),t.useImperativeHandle(v,function(){return{waveSurfer:ye.current,navigateSegments:Fe,togglePlayPause:ze,getCurrentSegmentIndex:function(){return V},setCurrentSegmentIndex:J,isPlayingSequence:function(){return A},setPlayingSequence:function(e){return B(e)},seekToTime:Ge,showOnlyMatched:x,setShowOnlyMatched:function(e){return b(e)},handleIndividualSegmentPlay:We,setPlaybackRate:function(e){ye.current&&ye.current.setPlaybackRate(e)}}},[ye.current,Fe,ze,V,A,Ge,x,We]);return r("div",e({className:f.container,style:null==I?void 0:I.container},{children:n("div",e({className:f.inner,style:null==I?void 0:I.inner},{children:[r("div",e({className:f.waveformWrapper,style:null==I?void 0:I.waveformRow},{children:r("div",{ref:he,className:f.waveform,style:null==I?void 0:I.waveform})})),r("div",e({className:f.timeWrapper,style:null==I?void 0:I.timeRow},{children:n("div",e({className:f.timeText,style:null==I?void 0:I.timeText},{children:[r("span",{children:Z}),r("span",{children:"/"}),r("span",{children:re})]}))})),r("div",e({className:f.sliderRow,style:null==I?void 0:I.sliderRow},{children:n("div",e({className:"".concat(f.slider," ").concat([f.sliderBase,x?f.sliderDisabled:f.sliderEnabled,f.sliderGroup].join(" ")),ref:pe,style:null==I?void 0:I.slider,onClick:x?void 0:function(e){var r;if(!x){var n=null===(r=pe.current)||void 0===r?void 0:r.getBoundingClientRect();if(n&&ye.current){var t=(e.clientX-n.left)/n.width*100,c=t/100*h;ue(t),ye.current.seekTo(c/h),A&&Ee()}}},onMouseMove:x?void 0:function(e){if(!x&&pe.current){var r=pe.current.getBoundingClientRect(),n=e.clientX-r.left;if(n>=0&&n<=r.width){var t=n/r.width*100;ae(!0),de(n);var c=qe(Ae(t/100*h));me(c||"00:00:00")}}},onMouseLeave:function(){ae(!1)},onMouseDown:x?void 0:function(){x||(ge.current=!0)},onMouseUp:x?void 0:function(){if(!x&&(ge.current=!1,ye.current)){var e=ce/100*h;ye.current.seekTo(e/h),A&&Ee()}}},{children:[r("div",e({className:f.track,style:null==I?void 0:I.sliderTrack},{children:r("div",{className:f.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})})),p.map(function(e,n){var t=e.start_time/h*100,c=(e.end_time-e.start_time)/h*100,u=n===V&&M;return r("div",{className:"".concat(f.segment," ").concat(u?f.segmentActive:f.segmentInactive),style:{left:"".concat(t,"%"),width:"".concat(c,"%"),opacity:M&&!u?.3:1}},e.segment_id)}),r("div",{className:f.progress,style:e({width:"".concat(ce,"%")},null==I?void 0:I.sliderProgress)}),r("div",e({className:f.thumb,style:e({left:"".concat(ce,"%")},null==I?void 0:I.sliderThumb)},{children:r("div",{className:f.thumbDot,style:null==I?void 0:I.thumbDot})})),oe&&!x&&r("div",e({className:f.tooltip,style:e({left:se},null==I?void 0:I.timeTooltip)},{children:ve}))]}))}))]}))}))});v.displayName="AudioTimelineSlider";export{v as default};
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import t,{forwardRef as n,useState as c,useRef as u,useEffect as s,useCallback as o}from"react";import i from"wavesurfer.js";import l from"wavesurfer.js/dist/plugins/regions";import{useAudioPlayPause as a}from"../store/autoplay.wavefrom.js";import d from"./AudioTimeLineSlider.module.css.js";const m=n(({audio_file_name:n,matchedSegments:m,onTimeUpdate:p,peaks:g,duration:f,setIsAudioPlaying:v,setChevronIndex:h,chevronIndex:y=0,onToggleShowMatched:T,topicId:S,isVideoBuffering:w,playOnlyMatched:k=!0,showOnlyMatched:_,setShowOnlyMatched:N,customStyles:P},M)=>{const[x,$]=c(!1),[I,b]=c(!0),[R,C]=c(!1),[D,j]=c(!1),[O,q]=c(!1),[A,B]=c(!1),[E,W]=c(0),[H,L]=c(!1),[U,X]=c("00:00:00"),[z,F]=c("00:00:00"),[G,V]=c(0),[J,K]=c(!1),[Q,Y]=c(0),[Z,ee]=c("00:00:00"),re=u(null),te=u(!1),ne=u(null),ce=u(null),ue=u(null),se=u(!1),oe=u(null),ie=u(null),le=u(0),ae=u(0),[de,me]=c(!1),{playTopicId:pe,resetTrigger:ge,pendingPlayRequest:fe,setPendingPlayRequest:ve,triggerPlayForTopic:he}=a(),ye=u(null),Te=e=>{try{const[r,t,n,c]=e.split(":"),u=parseInt(r).toString().padStart(2,"0"),s=parseInt(t).toString().padStart(2,"0");return`${u}:${s}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};s(()=>{de&&fe===S&&(ve(null),setTimeout(()=>{he(S)},100))},[de,fe,S]),s(()=>{de&&pe===S&&(ye.current&&(ye.current.click(),$(!0)),ge())},[pe,S,de]),s(()=>(me(!0),()=>{me(!1)}),[]),s(()=>{if(!n||!ne.current||se.current)return;b(!0);const e=l.create(),r=i.create({container:ne.current,waveColor:"#D0D5DD",progressColor:"#ffffffff",cursorColor:"#ffffffff",barWidth:2,barRadius:3});return ce.current=r,ue.current=r.registerPlugin(e),se.current=!0,r.on("decode",()=>{L(!0),we();const e=Te(Se(f));F(e||"00:00:00")}),r.on("ready",()=>{b(!1)}),r.on("play",()=>{$(!0),v&&v(!0)}),r.on("pause",()=>{$(!1),v&&v(!1)}),r.on("finish",()=>{$(!1),v&&v(!1),R&&(C(!1),j(!1),q(!0))}),r.on("seeking",()=>{_||R&&!D&&ke()}),r.on("error",()=>{b(!1)}),r.on("audioprocess",e=>{if(p&&p(e),!te.current){V(e/f*100)}const r=Te(Se(e));X(r||"00:00:00"),ae.current=e}),()=>{oe.current&&clearTimeout(oe.current),ie.current,r.destroy(),se.current=!1,ce.current=null}},[n]),s(()=>{ce.current&&(ce.current.setOptions({interact:!_}),x&&ce.current.pause(),_?(C(!0),le.current=0):ke(),T&&T(_))},[_]);const Se=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),c=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(c).padStart(3,"0")}`},we=o(()=>{ue.current&&ce.current&&(ue.current.clearRegions(),m.forEach((e,r)=>{ue.current.addRegion({start:e.start_time,end:e.end_time,color:"#feef89",drag:!1,resize:!1,id:e.segment_id})}))},[m]),ke=o(()=>{ce.current&&(C(!1),j(!1),q(!1),B(!1),oe.current&&(clearTimeout(oe.current),oe.current=null),ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null))},[]),_e=o(e=>{!_&&ce.current&&(ce.current.seekTo(e/f),ce.current.play(),$(!0),v&&v(!0),X(Te(Se(e))),C(!1),j(!1),q(!1))},[_,f,v,Se,Te]),Ne=u(!1),Pe=o(()=>{if(Ne.current)return;if(!ce.current||!m.length)return;Ne.current=!0,ce.current.pause();const e=le.current+1;if(console.log("Current segment:",le.current),console.log("Next index calculated:",e),console.log("Total segments:",m.length),e<m.length){const r=m[e];X(Te(Se(r.start_time))),h&&h(e),W(e),le.current=e;const t=_?0:2e3;oe.current=setTimeout(()=>{Ne.current=!1,setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),ie.current=null,Pe())};ie.current=t,ce.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),C(_),j(!0),q(!0),le.current=0,W(0),h&&h(0),m.length>0){const e=m[0];X(Te(Se(e.start_time))),ce.current.seekTo(e.start_time/f)}ce.current.isPlaying()&&ce.current.pause(),oe.current=setTimeout(()=>{Ne.current=!1,ce.current&&ce.current.isPlaying()&&ce.current.pause()},_?0:2e3)}},[m,f,h,Se,_]),Me=o(()=>{if(!ce.current||!m.length)return;const e=le.current;if(e>=m.length)return C(_),void q(!0);const r=m[e];W(e),X(Te(Se(r.start_time))),h&&h(e),setTimeout(()=>{if(!ce.current)return;ce.current.seekTo(r.start_time/f),ce.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),ie.current=null,Pe())};ie.current=t,ce.current.on("audioprocess",t)},100)},[m,f,h,Pe,Se,_]),xe=o(()=>{if(!ce.current||!m.length)return;ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null);const e=m[le.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=ce.current)||void 0===n||n.un("audioprocess",t),ie.current=null,Pe())};ie.current=t,ce.current.on("audioprocess",t)},[m,Pe]),$e=o(()=>{ce.current&&(_?x?(ce.current.pause(),j(!0)):D?(ce.current.play(),j(!1),xe()):O?(q(!1),le.current=0,Me()):Me():x?ce.current.pause():ce.current.play())},[x,_,D,O,Me,xe]),Ie=o(e=>{if(!ce.current||0===m.length)return;const r=x;let t;x&&(ce.current.pause(),j(!0)),ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null),t="next"===e?(E+1)%m.length:(E-1+m.length)%m.length,W(t),le.current=t;const n=m[t];ce.current.seekTo(n.start_time/f),h&&h(t),r&&_&&setTimeout(()=>{ce.current&&(ce.current.play(),j(!1),xe())},50)},[E,m,h,f,x,_,xe]),be=o(e=>{ce.current&&(_||(R&&ke(),ce.current.seekTo(e/f)))},[f,R,ke,_]);s(()=>{if(m.length>0&&void 0!==y&&ce.current&&!Ne.current){if(y===le.current)return;const e=x;ie.current&&(ce.current.un("audioprocess",ie.current),ie.current=null);const r=m[y];r&&(ce.current.seekTo(r.start_time/f),W(y),le.current=y,e&&_&&setTimeout(()=>{ce.current&&xe()},50))}},[y,f,m,_,x,xe]);const Re=u(!1);s(()=>{w&&ce.current&&ce.current.isPlaying()&&(Re.current=!0,ce.current.pause(),R&&j(!0)),!w&&Re.current&&ce.current&&ce.current&&(ce.current.play(),Re.current=!1,R&&D&&(j(!1),xe()))},[w,R,D,xe]),t.useImperativeHandle(M,()=>({waveSurfer:ce.current,navigateSegments:Ie,togglePlayPause:$e,getCurrentSegmentIndex:()=>E,setCurrentSegmentIndex:W,isPlayingSequence:()=>R,setPlayingSequence:e=>C(e),seekToTime:be,showOnlyMatched:_,setShowOnlyMatched:e=>N(e),handleIndividualSegmentPlay:_e,setPlaybackRate:e=>{ce.current&&ce.current.setPlaybackRate(e)}}),[ce.current,Ie,$e,E,R,be,_,_e]);return e("div",{className:d.container,style:null==P?void 0:P.container,children:r("div",{className:d.inner,style:null==P?void 0:P.inner,children:[e("div",{className:d.waveformWrapper,style:null==P?void 0:P.waveformRow,children:e("div",{ref:ne,className:d.waveform,style:null==P?void 0:P.waveform})}),e("div",{className:d.timeWrapper,style:null==P?void 0:P.timeRow,children:r("div",{className:d.timeText,style:null==P?void 0:P.timeText,children:[e("span",{children:U}),e("span",{children:"/"}),e("span",{children:z})]})}),e("div",{className:d.sliderRow,style:null==P?void 0:P.sliderRow,children:r("div",{className:`${d.slider} ${[d.sliderBase,_?d.sliderDisabled:d.sliderEnabled,d.sliderGroup].join(" ")}`,ref:re,style:null==P?void 0:P.slider,onClick:_?void 0:e=>{var r;if(_)return;const t=null===(r=re.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!ce.current)return;const n=(e.clientX-t.left)/t.width*100,c=n/100*f;V(n),ce.current.seekTo(c/f),R&&ke()},onMouseMove:_?void 0:e=>{if(!_&&re.current){const r=re.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;K(!0),Y(t);const n=Te(Se(e/100*f));ee(n||"00:00:00")}}},onMouseLeave:()=>{K(!1)},onMouseDown:_?void 0:()=>{_||(te.current=!0)},onMouseUp:_?void 0:()=>{if(!_&&(te.current=!1,ce.current)){const e=G/100*f;ce.current.seekTo(e/f),R&&ke()}},children:[e("div",{className:d.track,style:null==P?void 0:P.sliderTrack,children:e("div",{className:d.trackStripes,style:{backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 4px, #cbd5e1 4px, #cbd5e1 5px)"}})}),m.map((r,t)=>{const n=r.start_time/f*100,c=(r.end_time-r.start_time)/f*100,u=t===E&&k;return e("div",{className:`${d.segment} ${u?d.segmentActive:d.segmentInactive}`,style:{left:`${n}%`,width:`${c}%`,opacity:k&&!u?.3:1}},r.segment_id)}),e("div",{className:d.progress,style:{width:`${G}%`,...null==P?void 0:P.sliderProgress}}),e("div",{className:d.thumb,style:{left:`${G}%`,...null==P?void 0:P.sliderThumb},children:e("div",{className:d.thumbDot,style:null==P?void 0:P.thumbDot})}),J&&!_&&e("div",{className:d.tooltip,style:{left:Q,...null==P?void 0:P.timeTooltip},children:Z})]})})]})})});m.displayName="AudioTimelineSlider";export{m as default};
2
2
  //# sourceMappingURL=AudioTimeLineSlider.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useRef as n,useEffect as o}from"react";import i from"./SegmentByWordsViral.module.css.js";var l=function(l){var s=l.startTime,c=l.endTime,u=l.words,m=l.currentTime,d=l.content;l.containerStyle;var f=l.customStyles,p=n([]),v=n(null),g=a(s),h=a(c),y=m>=g&&m<=h;o(function(){if(y){var e=u.findIndex(function(e){return m>=e.start&&m<=e.end});if(-1!==e&&p.current[e]){var t=p.current[e];if(t&&v.current){var r=v.current.getBoundingClientRect(),n=t.getBoundingClientRect(),o=n.top<r.top,i=n.bottom>r.bottom;(o||i)&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}}},[m,u,y]);return t("div",e({className:i.segmentContainer,style:null==f?void 0:f.segmentContainer},{children:t("div",e({className:i.wrapper,style:null==f?void 0:f.wrapper},{children:t("div",e({className:i.segmentTextContainer,style:null==f?void 0:f.segmentTextContainer,ref:v},{children:u&&0!==u.length?u.map(function(t,n){var o=m>=t.end;return r("span",e({ref:function(e){return p.current[n]=e},className:i.word,style:e({fontWeight:o?"bold":"normal"},null==f?void 0:f.wordText)},{children:[t.text," "]}),n)}):t("span",e({className:i.word,style:null==f?void 0:f.word},{children:d}))}))}))}))};function a(e){if("number"==typeof e)return e;if(!e)return 0;var t=e.split(":"),r=t[0],n=t[1],o=t[2];return 3600*parseInt(r)+60*parseInt(n)+parseFloat(o)}export{l as default};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useRef as n,useEffect as r}from"react";import o from"./SegmentByWordsViral.module.css.js";const s=s=>{const{startTime:l,endTime:a,words:c,currentTime:d,content:m,containerStyle:u,customStyles:p}=s,f=n([]),g=n(null),h=i(l),v=i(a),y=d>=h&&d<=v;r(()=>{if(y){const e=c.findIndex(e=>d>=e.start&&d<=e.end);if(-1!==e&&f.current[e]){const t=f.current[e];if(t&&g.current){const e=g.current.getBoundingClientRect(),n=t.getBoundingClientRect(),r=n.top<e.top,o=n.bottom>e.bottom;(r||o)&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}}}},[d,c,y]);return e("div",{className:o.segmentContainer,style:null==p?void 0:p.segmentContainer,children:e("div",{className:o.wrapper,style:null==p?void 0:p.wrapper,children:e("div",{className:o.segmentTextContainer,style:null==p?void 0:p.segmentTextContainer,ref:g,children:c&&0!==c.length?c.map((e,n)=>{const r=d>=e.end;return t("span",{ref:e=>f.current[n]=e,className:o.word,style:{fontWeight:r?"bold":"normal",...null==p?void 0:p.wordText},children:[e.text," "]},n)}):e("span",{className:o.word,style:null==p?void 0:p.word,children:m})})})})};function i(e){if("number"==typeof e)return e;if(!e)return 0;const[t,n,r]=e.split(":");return 3600*parseInt(t)+60*parseInt(n)+parseFloat(r)}export{s as default};
2
2
  //# sourceMappingURL=SegmentByWordsViral.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import{useRef as l,useState as i,useEffect as r}from"react";import t from"video.js";import"video.js/dist/video-js.css";import c from"./AudioTimeLineSlider.js";import a from"../icons/MaximizeIcon.js";import s from"../icons/MinimizeIcon.js";import d from"../icons/PlayIcon.js";import u from"../icons/PauseIcon.js";import p from"../icons/PlaybackSpeedIcon.js";import v from"./videoPlayer.module.css.js";var m=function(m){var f,y,g=m.videoSrc,h=m.currentTime,S=m.isWaveformPlaying,P=m.onBufferingStart,k=m.onBufferingEnd,V=m.onVideoPlayPause,b=m.videoType,I=void 0===b?"video/mp4":b,j=m.className,J=void 0===j?"":j,x=m.onVideoLoadingStateChange,w=m.isUrlPending,N=m.isPeaksPending,B=m.signedUrl,C=m.AudioData,T=m.showOnlyMatched,M=m.setShowOnlyMatched,R=m.wavesurferRef,A=m.segments,F=m.setIsAudioPlaying,L=m.handleAudioTimeUpdate,O=m.customStyles,U=m.waveformStyles,z=l(null),E=l(null),W=l(null),D=l(!1),H=l(!1),_=i(!1),q=_[0];_[1];var G=i(!0)[0],K=i(!0),Q=K[0],X=K[1],Y=i("1x"),Z=Y[0],$=Y[1],ee=i(!1),ne=ee[0],oe=ee[1],le=function(){oe(function(e){return!e})};r(function(){if(console.log("[VideoJS] useEffect triggered",{videoSrc:g}),z.current){console.log("[VideoJS] Initializing player"),X(!0),null==x||x(!0);var e=t(z.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:g,type:I}]});return e.on("loadstart",function(){console.log("[VideoJS] loadstart"),X(!0),null==x||x(!0)}),e.on("canplay",function(){console.log("[VideoJS] canplay",{isVideoLoading:Q,isBuffering:D.current}),Q&&(console.log("[VideoJS] Video loading finished"),X(!1),null==x||x(!1)),D.current&&(console.log("[VideoJS] Buffering ended"),D.current=!1,setTimeout(function(){console.log("[VideoJS] onBufferingEnd()"),k()},100))}),e.on("waiting",function(){console.log("[VideoJS] waiting (buffering start)"),D.current||(D.current=!0,H.current=S,console.log("[VideoJS] Buffering started",{wasPlaying:H.current}),P())}),e.on("error",function(){console.error("[VideoJS] Player error",e.error()),X(!1),null==x||x(!1)}),E.current=e,console.log("[VideoJS] Player ready"),function(){var e;console.log("[VideoJS] Disposing player"),null===(e=E.current)||void 0===e||e.dispose(),E.current=null}}console.warn("[VideoJS] videoRef is null")},[g]),r(function(){if(E.current){var e=E.current.currentTime();Math.abs(e-h)>.2&&E.current.currentTime(h)}},[h]),r(function(){E.current&&!D.current&&(S&&E.current.paused()?E.current.play().catch(function(){}):S||E.current.paused()||E.current.pause())},[S]),r(function(){var e,n,o,l=parseFloat(Z.replace("x",""));null===(e=E.current)||void 0===e||e.playbackRate(l),null===(o=null===(n=R.current)||void 0===n?void 0:n.setPlaybackRate)||void 0===o||o.call(n,l)},[Z]);return n("div",e({ref:W,className:"".concat(v.container," ").concat(J),style:null==O?void 0:O.container},{children:[o("video",{ref:z,className:"video-js vjs-big-play-centered ".concat(v.video),style:null==O?void 0:O.video,playsInline:!0,muted:!0}),n("div",e({className:"".concat(v.controlsWrapper," ").concat(G?v.visible:v.hidden),style:null==O?void 0:O.controlsWrapper},{children:[ne&&n("div",e({className:v.speedSelector,style:null==O?void 0:O.speedSelector},{children:[o("div",e({className:v.speedHeader,style:null==O?void 0:O.speedHeader},{children:"Playback Speed"})),["0.5x","1x","1.5x","2x"].map(function(n){return o("button",e({onClick:function(){return function(e){var n,o,l;$(e),oe(!1);var i=parseFloat(e.replace("x",""));null===(n=E.current)||void 0===n||n.playbackRate(i),null===(l=null===(o=R.current)||void 0===o?void 0:o.setPlaybackRate)||void 0===l||l.call(o,i)}(n)},className:v.speedItem,style:null==O?void 0:O.speedItem},{children:n}),n)})]})),n("div",e({className:v.controlBar,style:null==O?void 0:O.controlBar},{children:[o("div",{children:o("button",S?e({onClick:function(e){e.stopPropagation(),null==V||V(!1)},style:null==O?void 0:O.pauseIcon},{children:o(u,{})}):e({onClick:function(e){e.stopPropagation(),null==V||V(!0)},style:null==O?void 0:O.playIcon},{children:o(d,{})}))}),n("div",e({className:v.rightControls,style:null==O?void 0:O.rightControls},{children:["1x"!==Z?o("span",e({onClick:le},{children:Z})):o("button",e({onClick:le,style:null==O?void 0:O.playBackSpeedIcon},{children:o(p,{})})),o("button",e({onClick:function(e){var n,o,l;e.stopPropagation(),W.current&&(q?null===(l=document.exitFullscreen)||void 0===l||l.call(document):null===(o=(n=W.current).requestFullscreen)||void 0===o||o.call(n))}},{children:o(q?s:a,{})}))]}))]})),o("div",e({className:v.timeline,style:null==O?void 0:O.timeline},{children:w||N?o("div",e({className:v.loader,style:null==O?void 0:O.loader},{children:o("span",{children:"Loading audio-timeline peaks..."})})):B&&C&&o(c,{ref:R,audio_file_name:B,peaks:null!==(f=C.peaks)&&void 0!==f?f:[],duration:null!==(y=C.duration)&&void 0!==y?y:0,matchedSegments:A,showOnlyMatched:T,setShowOnlyMatched:M,setIsAudioPlaying:F,onTimeUpdate:L,onToggleShowMatched:function(){},customStyles:U})}))]}))]}))};export{m as default};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useRef as l,useState as n,useEffect as r}from"react";import i from"video.js";import"video.js/dist/video-js.css";import t from"./AudioTimeLineSlider.js";import a from"../icons/MaximizeIcon.js";import s from"../icons/MinimizeIcon.js";import d from"../icons/PlayIcon.js";import c from"../icons/PauseIcon.js";import u from"../icons/PlaybackSpeedIcon.js";import p from"./videoPlayer.module.css.js";const m=({videoSrc:m,currentTime:v,isWaveformPlaying:y,onBufferingStart:g,onBufferingEnd:f,onVideoPlayPause:h,videoType:S="video/mp4",className:P="",onVideoLoadingStateChange:k,isUrlPending:V,isPeaksPending:b,signedUrl:I,AudioData:j,showOnlyMatched:J,setShowOnlyMatched:x,wavesurferRef:w,segments:N,setIsAudioPlaying:B,handleAudioTimeUpdate:C,customStyles:T,waveformStyles:M})=>{var R,A;const $=l(null),F=l(null),L=l(null),O=l(!1),U=l(!1),[z,E]=n(!1),[W]=n(!0),[D,H]=n(!0),[_,q]=n("1x"),[G,K]=n(!1),Q=()=>{K(e=>!e)};r(()=>{if(console.log("[VideoJS] useEffect triggered",{videoSrc:m}),!$.current)return void console.warn("[VideoJS] videoRef is null");console.log("[VideoJS] Initializing player"),H(!0),null==k||k(!0);const e=i($.current,{controls:!1,autoplay:!1,preload:"auto",fluid:!0,muted:!0,sources:[{src:m,type:S}]});return e.on("loadstart",()=>{console.log("[VideoJS] loadstart"),H(!0),null==k||k(!0)}),e.on("canplay",()=>{console.log("[VideoJS] canplay",{isVideoLoading:D,isBuffering:O.current}),D&&(console.log("[VideoJS] Video loading finished"),H(!1),null==k||k(!1)),O.current&&(console.log("[VideoJS] Buffering ended"),O.current=!1,setTimeout(()=>{console.log("[VideoJS] onBufferingEnd()"),f()},100))}),e.on("waiting",()=>{console.log("[VideoJS] waiting (buffering start)"),O.current||(O.current=!0,U.current=y,console.log("[VideoJS] Buffering started",{wasPlaying:U.current}),g())}),e.on("error",()=>{console.error("[VideoJS] Player error",e.error()),H(!1),null==k||k(!1)}),F.current=e,console.log("[VideoJS] Player ready"),()=>{var e;console.log("[VideoJS] Disposing player"),null===(e=F.current)||void 0===e||e.dispose(),F.current=null}},[m]),r(()=>{if(!F.current)return;const e=F.current.currentTime();Math.abs(e-v)>.2&&F.current.currentTime(v)},[v]),r(()=>{F.current&&!O.current&&(y&&F.current.paused()?F.current.play().catch(()=>{}):y||F.current.paused()||F.current.pause())},[y]),r(()=>{var e,o,l;const n=parseFloat(_.replace("x",""));null===(e=F.current)||void 0===e||e.playbackRate(n),null===(l=null===(o=w.current)||void 0===o?void 0:o.setPlaybackRate)||void 0===l||l.call(o,n)},[_]);return e("div",{ref:L,className:`${p.container} ${P}`,style:null==T?void 0:T.container,children:[o("video",{ref:$,className:`video-js vjs-big-play-centered ${p.video}`,style:null==T?void 0:T.video,playsInline:!0,muted:!0}),e("div",{className:`${p.controlsWrapper} ${W?p.visible:p.hidden}`,style:null==T?void 0:T.controlsWrapper,children:[G&&e("div",{className:p.speedSelector,style:null==T?void 0:T.speedSelector,children:[o("div",{className:p.speedHeader,style:null==T?void 0:T.speedHeader,children:"Playback Speed"}),["0.5x","1x","1.5x","2x"].map(e=>o("button",{onClick:()=>(e=>{var o,l,n;q(e),K(!1);const r=parseFloat(e.replace("x",""));null===(o=F.current)||void 0===o||o.playbackRate(r),null===(n=null===(l=w.current)||void 0===l?void 0:l.setPlaybackRate)||void 0===n||n.call(l,r)})(e),className:p.speedItem,style:null==T?void 0:T.speedItem,children:e},e))]}),e("div",{className:p.controlBar,style:null==T?void 0:T.controlBar,children:[o("div",{children:o("button",y?{onClick:e=>{e.stopPropagation(),null==h||h(!1)},style:null==T?void 0:T.pauseIcon,children:o(c,{})}:{onClick:e=>{e.stopPropagation(),null==h||h(!0)},style:null==T?void 0:T.playIcon,children:o(d,{})})}),e("div",{className:p.rightControls,style:null==T?void 0:T.rightControls,children:["1x"!==_?o("span",{onClick:Q,children:_}):o("button",{onClick:Q,style:null==T?void 0:T.playBackSpeedIcon,children:o(u,{})}),o("button",{onClick:e=>{var o,l,n;e.stopPropagation(),L.current&&(z?null===(n=document.exitFullscreen)||void 0===n||n.call(document):null===(l=(o=L.current).requestFullscreen)||void 0===l||l.call(o))},children:o(z?s:a,{})})]})]}),o("div",{className:p.timeline,style:null==T?void 0:T.timeline,children:V||b?o("div",{className:p.loader,style:null==T?void 0:T.loader,children:o("span",{children:"Loading audio-timeline peaks..."})}):I&&j&&o(t,{ref:w,audio_file_name:I,peaks:null!==(R=j.peaks)&&void 0!==R?R:[],duration:null!==(A=j.duration)&&void 0!==A?A:0,matchedSegments:N,showOnlyMatched:J,setShowOnlyMatched:x,setIsAudioPlaying:B,onTimeUpdate:C,onToggleShowMatched:()=>{},customStyles:M})})]})]})};export{m as default};
2
2
  //# sourceMappingURL=videoPlayer.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";var o=function(o){var e=o.height,d=void 0===e?24:e,h=o.width;return r("div",{children:i("svg",t({xmlns:"http://www.w3.org/2000/svg",width:void 0===h?24:h,height:d,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},{children:[r("path",{d:"M2 10v3"}),r("path",{d:"M6 6v11"}),r("path",{d:"M10 3v18"}),r("path",{d:"M14 8v7"}),r("path",{d:"M18 5v13"}),r("path",{d:"M22 10v3"})]}))})};export{o as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:h=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:h,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[t("path",{d:"M2 10v3"}),t("path",{d:"M6 6v11"}),t("path",{d:"M10 3v18"}),t("path",{d:"M14 8v7"}),t("path",{d:"M18 5v13"}),t("path",{d:"M22 10v3"})]})});export{r as default};
2
2
  //# sourceMappingURL=AudioLinesIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";var o=function(o){var e=o.height,h=void 0===e?24:e,d=o.width;return r("div",{children:i("svg",t({xmlns:"http://www.w3.org/2000/svg",width:void 0===d?24:d,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[r("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),r("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),r("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),r("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]}))})};export{o as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),t("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),t("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),t("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})});export{h as default};
2
2
  //# sourceMappingURL=MaximizeIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";var o=function(o){var e=o.height,h=void 0===e?24:e,d=o.width;return r("div",{children:i("svg",t({xmlns:"http://www.w3.org/2000/svg",width:void 0===d?24:d,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[r("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),r("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),r("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),r("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}))})};export{o as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const h=({height:h=24,width:r=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),t("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),t("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),t("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]})});export{h as default};
2
2
  //# sourceMappingURL=MinimizeIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";var e=function(e){var o=e.height,h=void 0===o?24:o,n=e.width;return t("div",{children:i("svg",r({xmlns:"http://www.w3.org/2000/svg",width:void 0===n?24:n,height:h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),t("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]}))})};export{e as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}),t("rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"})]})});export{r as default};
2
2
  //# sourceMappingURL=PauseIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";var o=function(o){var i=o.height,e=void 0===i?24:i,n=o.width;return t("svg",r({xmlns:"http://www.w3.org/2000/svg",width:void 0===n?24:n,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:t("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}))};export{o as default};
1
+ import{jsx as t}from"react/jsx-runtime";const e=({height:e=24,width:o=24})=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})});export{e as default};
2
2
  //# sourceMappingURL=PlayIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as C}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";var l=function(){return i("svg",C({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none"},{children:[i("g",C({"clip-path":"url(#clip0_3246_74403)"},{children:[t("path",{d:"M4.80358 0.7585C5.18858 0.671 5.58907 0.625 6.00007 0.625C8.96858 0.625 11.3751 3.0315 11.3751 6C11.3751 8.9685 8.96858 11.375 6.00007 11.375C5.58907 11.375 5.18858 11.329 4.80358 11.2415C4.75554 11.2306 4.71014 11.2103 4.66995 11.1818C4.62975 11.1533 4.59557 11.1172 4.56933 11.0755C4.5431 11.0338 4.52534 10.9874 4.51706 10.9388C4.50878 10.8902 4.51014 10.8405 4.52107 10.7925C4.53201 10.7445 4.55229 10.6991 4.58077 10.6589C4.60926 10.6187 4.64537 10.5845 4.68707 10.5583C4.72876 10.532 4.77521 10.5143 4.82377 10.506C4.87233 10.4977 4.92204 10.4991 4.97007 10.51C5.64726 10.6639 6.35041 10.6633 7.02734 10.5083C7.70427 10.3533 8.33761 10.0479 8.88035 9.61462C9.4231 9.18139 9.86131 8.63149 10.1625 8.00574C10.4636 7.37999 10.62 6.69445 10.62 6C10.62 5.30555 10.4636 4.62001 10.1625 3.99426C9.86131 3.36851 9.4231 2.81861 8.88035 2.38538C8.33761 1.95214 7.70427 1.64668 7.02734 1.49168C6.35041 1.33668 5.64726 1.3361 4.97007 1.49C4.87307 1.51208 4.77127 1.49472 4.68707 1.44174C4.60286 1.38876 4.54315 1.3045 4.52107 1.2075C4.499 1.1105 4.51636 1.0087 4.56933 0.924492C4.62231 0.840289 4.70657 0.780579 4.80358 0.7585Z",fill:"white"}),t("path",{opacity:"0.5",d:"M3.65722 1.56573C3.71017 1.64988 3.72754 1.75161 3.70551 1.84856C3.68347 1.94551 3.62384 2.02974 3.53972 2.08273C2.95168 2.45316 2.45415 2.95069 2.08372 3.53873C2.03075 3.62294 1.94649 3.68265 1.84948 3.70474C1.75248 3.72682 1.65068 3.70946 1.56647 3.65648C1.48227 3.60351 1.42255 3.51925 1.40047 3.42225C1.37839 3.32524 1.39575 3.22344 1.44872 3.13923C1.87921 2.45616 2.4574 1.87832 3.14072 1.44823C3.22487 1.39528 3.3266 1.37792 3.42355 1.39995C3.5205 1.42199 3.60423 1.48162 3.65722 1.56573ZM1.56672 8.34273C1.65087 8.28978 1.7526 8.27242 1.84955 8.29445C1.9465 8.31649 2.03073 8.37612 2.08372 8.46023C2.45409 9.04846 2.95163 9.54616 3.53972 9.91673C3.58264 9.94237 3.61999 9.97632 3.64959 10.0166C3.67919 10.0569 3.70044 10.1027 3.71209 10.1513C3.72374 10.1999 3.72555 10.2503 3.71742 10.2997C3.70929 10.349 3.69139 10.3962 3.66475 10.4385C3.63812 10.4808 3.6033 10.5173 3.56234 10.546C3.52138 10.5746 3.4751 10.5948 3.42623 10.6053C3.37736 10.6158 3.32688 10.6164 3.27777 10.6071C3.22865 10.5979 3.18189 10.5789 3.14022 10.5512C2.45721 10.1209 1.87937 9.54288 1.44922 8.85973C1.39627 8.77559 1.37891 8.67386 1.40094 8.57691C1.42297 8.47996 1.4826 8.39573 1.56672 8.34273Z",fill:"white"}),t("path",{opacity:"0.3",d:"M1.48951 4.96617C1.51159 4.86917 1.49423 4.76736 1.44125 4.68316C1.38827 4.59896 1.30401 4.53925 1.20701 4.51717C1.11001 4.49509 1.00821 4.51245 0.924004 4.56543C0.8398 4.61841 0.780091 4.70267 0.758012 4.79967C0.670512 5.18467 0.624512 5.58517 0.624512 5.99617C0.624512 6.40717 0.670512 6.80717 0.758012 7.19217C0.780025 7.28917 0.83967 7.37346 0.923827 7.42648C1.00798 7.47951 1.10976 7.49693 1.20676 7.47492C1.30376 7.45291 1.38805 7.39326 1.44108 7.3091C1.4941 7.22495 1.51152 7.12317 1.48951 7.02617C1.41292 6.68819 1.37434 6.34271 1.37451 5.99617C1.37451 5.64167 1.41451 5.29717 1.48951 4.96617Z",fill:"white"}),t("path",{d:"M7.707 5.46999C8.0975 5.70099 8.0975 6.29799 7.707 6.52899L5.347 7.92249C4.967 8.14649 4.5 7.85449 4.5 7.39249V4.60649C4.5 4.14449 4.967 3.85299 5.347 4.07699L7.707 5.46999Z",fill:"white"})]})),t("defs",{children:t("clipPath",C({id:"clip0_3246_74403"},{children:t("rect",{width:"12",height:"12",fill:"white"})}))})]}))};export{l as default};
1
+ import{jsxs as C,jsx as i}from"react/jsx-runtime";const t=()=>C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 12 12",fill:"none",children:[C("g",{"clip-path":"url(#clip0_3246_74403)",children:[i("path",{d:"M4.80358 0.7585C5.18858 0.671 5.58907 0.625 6.00007 0.625C8.96858 0.625 11.3751 3.0315 11.3751 6C11.3751 8.9685 8.96858 11.375 6.00007 11.375C5.58907 11.375 5.18858 11.329 4.80358 11.2415C4.75554 11.2306 4.71014 11.2103 4.66995 11.1818C4.62975 11.1533 4.59557 11.1172 4.56933 11.0755C4.5431 11.0338 4.52534 10.9874 4.51706 10.9388C4.50878 10.8902 4.51014 10.8405 4.52107 10.7925C4.53201 10.7445 4.55229 10.6991 4.58077 10.6589C4.60926 10.6187 4.64537 10.5845 4.68707 10.5583C4.72876 10.532 4.77521 10.5143 4.82377 10.506C4.87233 10.4977 4.92204 10.4991 4.97007 10.51C5.64726 10.6639 6.35041 10.6633 7.02734 10.5083C7.70427 10.3533 8.33761 10.0479 8.88035 9.61462C9.4231 9.18139 9.86131 8.63149 10.1625 8.00574C10.4636 7.37999 10.62 6.69445 10.62 6C10.62 5.30555 10.4636 4.62001 10.1625 3.99426C9.86131 3.36851 9.4231 2.81861 8.88035 2.38538C8.33761 1.95214 7.70427 1.64668 7.02734 1.49168C6.35041 1.33668 5.64726 1.3361 4.97007 1.49C4.87307 1.51208 4.77127 1.49472 4.68707 1.44174C4.60286 1.38876 4.54315 1.3045 4.52107 1.2075C4.499 1.1105 4.51636 1.0087 4.56933 0.924492C4.62231 0.840289 4.70657 0.780579 4.80358 0.7585Z",fill:"white"}),i("path",{opacity:"0.5",d:"M3.65722 1.56573C3.71017 1.64988 3.72754 1.75161 3.70551 1.84856C3.68347 1.94551 3.62384 2.02974 3.53972 2.08273C2.95168 2.45316 2.45415 2.95069 2.08372 3.53873C2.03075 3.62294 1.94649 3.68265 1.84948 3.70474C1.75248 3.72682 1.65068 3.70946 1.56647 3.65648C1.48227 3.60351 1.42255 3.51925 1.40047 3.42225C1.37839 3.32524 1.39575 3.22344 1.44872 3.13923C1.87921 2.45616 2.4574 1.87832 3.14072 1.44823C3.22487 1.39528 3.3266 1.37792 3.42355 1.39995C3.5205 1.42199 3.60423 1.48162 3.65722 1.56573ZM1.56672 8.34273C1.65087 8.28978 1.7526 8.27242 1.84955 8.29445C1.9465 8.31649 2.03073 8.37612 2.08372 8.46023C2.45409 9.04846 2.95163 9.54616 3.53972 9.91673C3.58264 9.94237 3.61999 9.97632 3.64959 10.0166C3.67919 10.0569 3.70044 10.1027 3.71209 10.1513C3.72374 10.1999 3.72555 10.2503 3.71742 10.2997C3.70929 10.349 3.69139 10.3962 3.66475 10.4385C3.63812 10.4808 3.6033 10.5173 3.56234 10.546C3.52138 10.5746 3.4751 10.5948 3.42623 10.6053C3.37736 10.6158 3.32688 10.6164 3.27777 10.6071C3.22865 10.5979 3.18189 10.5789 3.14022 10.5512C2.45721 10.1209 1.87937 9.54288 1.44922 8.85973C1.39627 8.77559 1.37891 8.67386 1.40094 8.57691C1.42297 8.47996 1.4826 8.39573 1.56672 8.34273Z",fill:"white"}),i("path",{opacity:"0.3",d:"M1.48951 4.96617C1.51159 4.86917 1.49423 4.76736 1.44125 4.68316C1.38827 4.59896 1.30401 4.53925 1.20701 4.51717C1.11001 4.49509 1.00821 4.51245 0.924004 4.56543C0.8398 4.61841 0.780091 4.70267 0.758012 4.79967C0.670512 5.18467 0.624512 5.58517 0.624512 5.99617C0.624512 6.40717 0.670512 6.80717 0.758012 7.19217C0.780025 7.28917 0.83967 7.37346 0.923827 7.42648C1.00798 7.47951 1.10976 7.49693 1.20676 7.47492C1.30376 7.45291 1.38805 7.39326 1.44108 7.3091C1.4941 7.22495 1.51152 7.12317 1.48951 7.02617C1.41292 6.68819 1.37434 6.34271 1.37451 5.99617C1.37451 5.64167 1.41451 5.29717 1.48951 4.96617Z",fill:"white"}),i("path",{d:"M7.707 5.46999C8.0975 5.70099 8.0975 6.29799 7.707 6.52899L5.347 7.92249C4.967 8.14649 4.5 7.85449 4.5 7.39249V4.60649C4.5 4.14449 4.967 3.85299 5.347 4.07699L7.707 5.46999Z",fill:"white"})]}),i("defs",{children:i("clipPath",{id:"clip0_3246_74403",children:i("rect",{width:"12",height:"12",fill:"white"})})})]});export{t as default};
2
2
  //# sourceMappingURL=PlaybackSpeedIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";var e=function(e){var o=e.height,n=void 0===o?24:o,h=e.width;return t("div",{children:i("svg",r({xmlns:"http://www.w3.org/2000/svg",width:void 0===h?24:h,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},{children:[t("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}),t("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]}))})};export{e as default};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";const r=({height:r=24,width:i=24})=>t("div",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:i,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[t("path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}),t("rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"})]})});export{r as default};
2
2
  //# sourceMappingURL=VideoIcon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as r}from"tslib";import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import u,{forwardRef as c,useState as o,useRef as i,useEffect as a,useCallback as l}from"react";import s from"wavesurfer.js";import d from"wavesurfer.js/dist/plugins/regions";import f from"./searchwaveform.module.css.js";import v from"./icons/PauseIcon.js";import m from"./icons/PlayIcon.js";import{useAudioPlayPause as p}from"./store/autoplay.wavefrom.js";var g=c(function(c,g){var h=c.audio_file_name,y=c.showOnlyMatched,T=c.setShowOnlyMatched,S=c.matchedSegments,w=c.onTimeUpdate;c.currentAudioTime;var N=c.peaks,P=c.duration,k=c.setIsAudioPlaying,I=c.setChevronIndex,M=c.chevronIndex,_=void 0===M?0:M,b=c.onToggleShowMatched,R=c.topicId,x=c.isVideoBuffering,C=c.playOnlyMatched,B=void 0===C||C,j=c.customStyles,O=o(!1),A=O[0],D=O[1],q=o(!0),W=q[0],E=q[1],F=o(!1),z=F[0],H=F[1],L=o(!1),U=L[0],X=L[1],V=o(!1),G=V[0],J=V[1],K=o(!1);K[0];var Q=K[1],Y=o(0),Z=Y[0],$=Y[1],rr=o(!1);rr[0];var er=rr[1],nr=o("00:00:00"),tr=nr[0],ur=nr[1],cr=o("00:00:00"),or=cr[0],ir=cr[1],ar=o(0),lr=ar[0],sr=ar[1],dr=o(!1),fr=dr[0],vr=dr[1],mr=o(0),pr=mr[0],gr=mr[1],hr=o("00:00:00"),yr=hr[0],Tr=hr[1],Sr=i(null),wr=i(!1),Nr=i(null),Pr=i(null),kr=i(null),Ir=i(!1),Mr=i(null),_r=i(null),br=i(0),Rr=i(0),xr=o(!1),Cr=xr[0],Br=xr[1],jr=p(),Or=jr.playTopicId,Ar=jr.resetTrigger,Dr=jr.pendingPlayRequest,qr=jr.setPendingPlayRequest,Wr=jr.triggerPlayForTopic,Er=i(null),Fr=function(r){try{var e=r.split(":"),n=e[0],t=e[1],u=e[2],c=(e[3],parseInt(n).toString().padStart(2,"0")),o=parseInt(t).toString().padStart(2,"0"),i=parseInt(u).toString().padStart(2,"0");return"".concat(c,":").concat(o,":").concat(i)}catch(r){console.log("Error converting formatTimeToHMS",r)}};a(function(){null==T||T(B)},[B]),a(function(){Cr&&Dr===R&&(qr(null),setTimeout(function(){Wr(R)},100))},[Cr,Dr,R]),a(function(){Cr&&Or===R&&(Er.current&&(Er.current.click(),D(!0)),Ar())},[Or,R,Cr]),a(function(){return Br(!0),function(){Br(!1)}},[]),a(function(){if(h&&Nr.current&&!Ir.current){E(!0);var r=d.create(),e=s.create({container:Nr.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(N)],duration:P,url:h});return Pr.current=e,kr.current=e.registerPlugin(r),Ir.current=!0,e.on("decode",function(){er(!0),Hr();var r=Fr(zr(P));ir(r||"00:00:00")}),e.on("ready",function(){E(!1)}),e.on("play",function(){D(!0),k&&k(!0)}),e.on("pause",function(){D(!1),k&&k(!1)}),e.on("finish",function(){D(!1),k&&k(!1),z&&(H(!1),X(!1),J(!0))}),e.on("seeking",function(){y||z&&!U&&Lr()}),e.on("error",function(){E(!1)}),e.on("audioprocess",function(r){(w&&w(r),wr.current)||sr(r/P*100);var e=Fr(zr(r));ur(e||"00:00:00"),Rr.current=r}),function(){Mr.current&&clearTimeout(Mr.current),_r.current,e.destroy(),Ir.current=!1,Pr.current=null}}},[h]),a(function(){Pr.current&&(Pr.current.setOptions({interact:!y}),A&&Pr.current.pause(),y?(H(!0),br.current=0):Lr(),b&&b(y))},[y]);var zr=function(r){var e=Math.floor(r/3600),n=Math.floor(r%3600/60),t=Math.floor(r%60),u=Math.floor(r%1*1e3);return"".concat(String(e).padStart(2,"0"),":").concat(String(n).padStart(2,"0"),":").concat(String(t).padStart(2,"0"),":").concat(String(u).padStart(3,"0"))},Hr=l(function(){kr.current&&Pr.current&&(kr.current.clearRegions(),S.forEach(function(r,e){kr.current.addRegion({start:r.start_time,end:r.end_time,color:"rgba(254, 239, 137, 0.5)",drag:!1,resize:!1,id:r.segment_id})}))},[S]),Lr=l(function(){Pr.current&&(H(!1),X(!1),J(!1),Q(!1),Mr.current&&(clearTimeout(Mr.current),Mr.current=null),_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null))},[]),Ur=l(function(r){!y&&Pr.current&&(Pr.current.seekTo(r/P),Pr.current.play(),D(!0),k&&k(!0),ur(Fr(zr(r))),H(!1),X(!1),J(!1))},[y,P,k,zr,Fr]),Xr=i(!1),Vr=l(function(){if(!Xr.current&&Pr.current&&S.length){Xr.current=!0,Pr.current.pause();var r=br.current+1;if(console.log("Current segment:",br.current),console.log("Next index calculated:",r),console.log("Total segments:",S.length),r<S.length){var e=S[r];ur(Fr(zr(e.start_time))),I&&I(r),$(r),br.current=r;var n=y?0:2e3;Mr.current=setTimeout(function(){Xr.current=!1,setTimeout(function(){if(Pr.current){Pr.current.seekTo(e.start_time/P),Pr.current.play();var r=e.end_time,n=function(e){var t;e>=r&&(null===(t=Pr.current)||void 0===t||t.un("audioprocess",n),_r.current=null,Vr())};_r.current=n,Pr.current.on("audioprocess",n)}},100)},n)}else{if(console.log("End of cycle reached, resetting to index 0"),H(y),X(!0),J(!0),br.current=0,$(0),I&&I(0),S.length>0){var t=S[0];ur(Fr(zr(t.start_time))),Pr.current.seekTo(t.start_time/P)}Pr.current.isPlaying()&&Pr.current.pause(),Mr.current=setTimeout(function(){Xr.current=!1,Pr.current&&Pr.current.isPlaying()&&Pr.current.pause()},y?0:2e3)}}},[S,P,I,zr,y]),Gr=l(function(){if(Pr.current&&S.length){var r=br.current;if(r>=S.length)return H(y),void J(!0);var e=S[r];$(r),ur(Fr(zr(e.start_time))),I&&I(r),setTimeout(function(){if(Pr.current){Pr.current.seekTo(e.start_time/P),Pr.current.play();var r=e.end_time,n=function(e){var t;e>=r&&(null===(t=Pr.current)||void 0===t||t.un("audioprocess",n),_r.current=null,Vr())};_r.current=n,Pr.current.on("audioprocess",n)}},100)}},[S,P,I,Vr,zr,y]),Jr=l(function(){if(Pr.current&&S.length){_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null);var r=S[br.current];if(r){var e=r.end_time,n=function(r){var t;r>=e&&(null===(t=Pr.current)||void 0===t||t.un("audioprocess",n),_r.current=null,Vr())};_r.current=n,Pr.current.on("audioprocess",n)}}},[S,Vr]),Kr=l(function(){Pr.current&&(y?A?(Pr.current.pause(),X(!0)):U?(Pr.current.play(),X(!1),Jr()):G?(J(!1),br.current=0,Gr()):Gr():A?Pr.current.pause():Pr.current.play())},[A,y,U,G,Gr,Jr]),Qr=l(function(r){if(Pr.current&&0!==S.length){var e,n=A;A&&(Pr.current.pause(),X(!0)),_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null),e="next"===r?(Z+1)%S.length:(Z-1+S.length)%S.length,$(e),br.current=e;var t=S[e];Pr.current.seekTo(t.start_time/P),I&&I(e),n&&y&&setTimeout(function(){Pr.current&&(Pr.current.play(),X(!1),Jr())},50)}},[Z,S,I,P,A,y,Jr]),Yr=l(function(r){Pr.current&&(y||(z&&Lr(),Pr.current.seekTo(r/P)))},[P,z,Lr,y]);a(function(){if(S.length>0&&void 0!==_&&Pr.current&&!Xr.current){if(_===br.current)return;var r=A;_r.current&&(Pr.current.un("audioprocess",_r.current),_r.current=null);var e=S[_];e&&(Pr.current.seekTo(e.start_time/P),$(_),br.current=_,r&&y&&setTimeout(function(){Pr.current&&Jr()},50))}},[_,P,S,y,A,Jr]);var Zr=i(!1);a(function(){x&&Pr.current&&Pr.current.isPlaying()&&(Zr.current=!0,Pr.current.pause(),z&&X(!0)),!x&&Zr.current&&Pr.current&&Pr.current&&(Pr.current.play(),Zr.current=!1,z&&U&&(X(!1),Jr()))},[x,z,U,Jr]),u.useImperativeHandle(g,function(){return{waveSurfer:Pr.current,navigateSegments:Qr,togglePlayPause:Kr,getCurrentSegmentIndex:function(){return Z},setCurrentSegmentIndex:$,isPlayingSequence:function(){return z},setPlayingSequence:function(r){return H(r)},seekToTime:Yr,showOnlyMatched:y,setShowOnlyMatched:function(r){return null==T?void 0:T(r)},handleIndividualSegmentPlay:Ur}},[Pr.current,Qr,Kr,Z,z,Yr,y,Ur]);return e("div",r({className:f.container,style:null==j?void 0:j.container},{children:n("div",r({className:f.inner,style:null==j?void 0:j.inner},{children:[n("div",r({className:f.waveformRow,style:null==j?void 0:j.waveformRow},{children:[e("div",r({className:f.playButtonWrapper,style:null==j?void 0:j.playButtonWrapper},{children:e("button",r({ref:Er,onClick:Kr,className:f.playButton,style:null==j?void 0:j.playButton,title:A?"Pause":"Play",disabled:W},{children:W?e(t,{children:"Loading..."}):e("div",A?r({className:f.icon,style:null==j?void 0:j.pauseIcon},{children:e(v,{})}):r({className:f.icon,style:null==j?void 0:j.playIcon},{children:e(m,{})}))}))})),e("div",{ref:Nr,className:f.waveform,style:null==j?void 0:j.waveform})]})),n("div",r({className:f.sliderRow,style:null==j?void 0:j.sliderRow},{children:[e("div",{className:f.buttonSpacer,style:null==j?void 0:j.buttonSpacer}),n("div",r({className:"".concat(f.slider,"\n ").concat(f.group,"\n ").concat(y?f.disabled:f.interactive),ref:Sr,style:null==j?void 0:j.slider,onClick:y?void 0:function(r){var e;if(!y){var n=null===(e=Sr.current)||void 0===e?void 0:e.getBoundingClientRect();if(n&&Pr.current){var t=(r.clientX-n.left)/n.width*100,u=t/100*P;sr(t),Pr.current.seekTo(u/P),z&&Lr()}}},onMouseMove:y?void 0:function(r){if(!y&&Sr.current){var e=Sr.current.getBoundingClientRect(),n=r.clientX-e.left;if(n>=0&&n<=e.width){var t=n/e.width*100;vr(!0),gr(n);var u=Fr(zr(t/100*P));Tr(u||"00:00:00")}}},onMouseLeave:function(){vr(!1)},onMouseDown:y?void 0:function(){y||(wr.current=!0)},onMouseUp:y?void 0:function(){if(!y&&(wr.current=!1,Pr.current)){var r=lr/100*P;Pr.current.seekTo(r/P),z&&Lr()}}},{children:[e("div",{className:f.sliderTrack,style:null==j?void 0:j.sliderTrack}),e("div",{className:f.sliderProgress,style:r({width:"".concat(lr,"%")},null==j?void 0:j.sliderProgress)}),e("div",{className:f.sliderThumb,style:r({left:"".concat(lr,"%")},null==j?void 0:j.sliderThumb)}),fr&&!y&&e("div",r({className:f.timeTooltip,style:r({left:pr},null==j?void 0:j.timeTooltip)},{children:yr}))]}))]})),n("div",r({className:f.timeRow,style:null==j?void 0:j.timeRow},{children:[e("div",{className:f.buttonSpacer,style:null==j?void 0:j.buttonSpacer}),n("div",r({className:f.timeText,style:null==j?void 0:j.timeText},{children:[e("span",{children:tr}),e("span",{children:"/"}),e("span",{children:or})]}))]}))]}))}))});g.displayName="SearchWaveform";export{g as default};
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import n,{forwardRef as u,useState as c,useRef as o,useEffect as l,useCallback as s}from"react";import i from"wavesurfer.js";import a from"wavesurfer.js/dist/plugins/regions";import d from"./searchwaveform.module.css.js";import m from"./icons/PauseIcon.js";import p from"./icons/PlayIcon.js";import{useAudioPlayPause as g}from"./store/autoplay.wavefrom.js";const v=u(({audio_file_name:u,showOnlyMatched:v,setShowOnlyMatched:h,matchedSegments:y,onTimeUpdate:f,currentAudioTime:T,peaks:S,duration:w,setIsAudioPlaying:N,setChevronIndex:P,chevronIndex:k=0,onToggleShowMatched:I,topicId:M,isVideoBuffering:_,playOnlyMatched:R=!0,customStyles:b},x)=>{const[C,$]=c(!1),[B,j]=c(!0),[O,A]=c(!1),[D,q]=c(!1),[W,E]=c(!1),[F,z]=c(!1),[H,L]=c(0),[U,X]=c(!1),[V,G]=c("00:00:00"),[J,K]=c("00:00:00"),[Q,Y]=c(0),[Z,ee]=c(!1),[re,te]=c(0),[ne,ue]=c("00:00:00"),ce=o(null),oe=o(!1),le=o(null),se=o(null),ie=o(null),ae=o(!1),de=o(null),me=o(null),pe=o(0),ge=o(0),[ve,he]=c(!1),{playTopicId:ye,resetTrigger:fe,pendingPlayRequest:Te,setPendingPlayRequest:Se,triggerPlayForTopic:we}=g(),Ne=o(null),Pe=e=>{try{const[r,t,n,u]=e.split(":"),c=parseInt(r).toString().padStart(2,"0"),o=parseInt(t).toString().padStart(2,"0");return`${c}:${o}:${parseInt(n).toString().padStart(2,"0")}`}catch(e){console.log("Error converting formatTimeToHMS",e)}};l(()=>{null==h||h(R)},[R]),l(()=>{ve&&Te===M&&(Se(null),setTimeout(()=>{we(M)},100))},[ve,Te,M]),l(()=>{ve&&ye===M&&(Ne.current&&(Ne.current.click(),$(!0)),fe())},[ye,M,ve]),l(()=>(he(!0),()=>{he(!1)}),[]),l(()=>{if(!u||!le.current||ae.current)return;j(!0);const e=a.create(),r=i.create({container:le.current,waveColor:"#D0D5DD",progressColor:"#9CA3AF",cursorColor:"#6B7280",barWidth:2,barRadius:3,height:64,normalize:!0,peaks:[new Float32Array(S)],duration:w,url:u});return se.current=r,ie.current=r.registerPlugin(e),ae.current=!0,r.on("decode",()=>{X(!0),Ie();const e=Pe(ke(w));K(e||"00:00:00")}),r.on("ready",()=>{j(!1)}),r.on("play",()=>{$(!0),N&&N(!0)}),r.on("pause",()=>{$(!1),N&&N(!1)}),r.on("finish",()=>{$(!1),N&&N(!1),O&&(A(!1),q(!1),E(!0))}),r.on("seeking",()=>{v||O&&!D&&Me()}),r.on("error",()=>{j(!1)}),r.on("audioprocess",e=>{if(f&&f(e),!oe.current){Y(e/w*100)}const r=Pe(ke(e));G(r||"00:00:00"),ge.current=e}),()=>{de.current&&clearTimeout(de.current),me.current,r.destroy(),ae.current=!1,se.current=null}},[u]),l(()=>{se.current&&(se.current.setOptions({interact:!v}),C&&se.current.pause(),v?(A(!0),pe.current=0):Me(),I&&I(v))},[v]);const ke=e=>{const r=Math.floor(e/3600),t=Math.floor(e%3600/60),n=Math.floor(e%60),u=Math.floor(e%1*1e3);return`${String(r).padStart(2,"0")}:${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(u).padStart(3,"0")}`},Ie=s(()=>{ie.current&&se.current&&(ie.current.clearRegions(),y.forEach((e,r)=>{ie.current.addRegion({start:e.start_time,end:e.end_time,color:"rgba(254, 239, 137, 0.5)",drag:!1,resize:!1,id:e.segment_id})}))},[y]),Me=s(()=>{se.current&&(A(!1),q(!1),E(!1),z(!1),de.current&&(clearTimeout(de.current),de.current=null),me.current&&(se.current.un("audioprocess",me.current),me.current=null))},[]),_e=s(e=>{!v&&se.current&&(se.current.seekTo(e/w),se.current.play(),$(!0),N&&N(!0),G(Pe(ke(e))),A(!1),q(!1),E(!1))},[v,w,N,ke,Pe]),Re=o(!1),be=s(()=>{if(Re.current)return;if(!se.current||!y.length)return;Re.current=!0,se.current.pause();const e=pe.current+1;if(console.log("Current segment:",pe.current),console.log("Next index calculated:",e),console.log("Total segments:",y.length),e<y.length){const r=y[e];G(Pe(ke(r.start_time))),P&&P(e),L(e),pe.current=e;const t=v?0:2e3;de.current=setTimeout(()=>{Re.current=!1,setTimeout(()=>{if(!se.current)return;se.current.seekTo(r.start_time/w),se.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=se.current)||void 0===n||n.un("audioprocess",t),me.current=null,be())};me.current=t,se.current.on("audioprocess",t)},100)},t)}else{if(console.log("End of cycle reached, resetting to index 0"),A(v),q(!0),E(!0),pe.current=0,L(0),P&&P(0),y.length>0){const e=y[0];G(Pe(ke(e.start_time))),se.current.seekTo(e.start_time/w)}se.current.isPlaying()&&se.current.pause(),de.current=setTimeout(()=>{Re.current=!1,se.current&&se.current.isPlaying()&&se.current.pause()},v?0:2e3)}},[y,w,P,ke,v]),xe=s(()=>{if(!se.current||!y.length)return;const e=pe.current;if(e>=y.length)return A(v),void E(!0);const r=y[e];L(e),G(Pe(ke(r.start_time))),P&&P(e),setTimeout(()=>{if(!se.current)return;se.current.seekTo(r.start_time/w),se.current.play();const e=r.end_time,t=r=>{var n;r>=e&&(null===(n=se.current)||void 0===n||n.un("audioprocess",t),me.current=null,be())};me.current=t,se.current.on("audioprocess",t)},100)},[y,w,P,be,ke,v]),Ce=s(()=>{if(!se.current||!y.length)return;me.current&&(se.current.un("audioprocess",me.current),me.current=null);const e=y[pe.current];if(!e)return;const r=e.end_time,t=e=>{var n;e>=r&&(null===(n=se.current)||void 0===n||n.un("audioprocess",t),me.current=null,be())};me.current=t,se.current.on("audioprocess",t)},[y,be]),$e=s(()=>{se.current&&(v?C?(se.current.pause(),q(!0)):D?(se.current.play(),q(!1),Ce()):W?(E(!1),pe.current=0,xe()):xe():C?se.current.pause():se.current.play())},[C,v,D,W,xe,Ce]),Be=s(e=>{if(!se.current||0===y.length)return;const r=C;let t;C&&(se.current.pause(),q(!0)),me.current&&(se.current.un("audioprocess",me.current),me.current=null),t="next"===e?(H+1)%y.length:(H-1+y.length)%y.length,L(t),pe.current=t;const n=y[t];se.current.seekTo(n.start_time/w),P&&P(t),r&&v&&setTimeout(()=>{se.current&&(se.current.play(),q(!1),Ce())},50)},[H,y,P,w,C,v,Ce]),je=s(e=>{se.current&&(v||(O&&Me(),se.current.seekTo(e/w)))},[w,O,Me,v]);l(()=>{if(y.length>0&&void 0!==k&&se.current&&!Re.current){if(k===pe.current)return;const e=C;me.current&&(se.current.un("audioprocess",me.current),me.current=null);const r=y[k];r&&(se.current.seekTo(r.start_time/w),L(k),pe.current=k,e&&v&&setTimeout(()=>{se.current&&Ce()},50))}},[k,w,y,v,C,Ce]);const Oe=o(!1);l(()=>{_&&se.current&&se.current.isPlaying()&&(Oe.current=!0,se.current.pause(),O&&q(!0)),!_&&Oe.current&&se.current&&se.current&&(se.current.play(),Oe.current=!1,O&&D&&(q(!1),Ce()))},[_,O,D,Ce]),n.useImperativeHandle(x,()=>({waveSurfer:se.current,navigateSegments:Be,togglePlayPause:$e,getCurrentSegmentIndex:()=>H,setCurrentSegmentIndex:L,isPlayingSequence:()=>O,setPlayingSequence:e=>A(e),seekToTime:je,showOnlyMatched:v,setShowOnlyMatched:e=>null==h?void 0:h(e),handleIndividualSegmentPlay:_e}),[se.current,Be,$e,H,O,je,v,_e]);return e("div",{className:d.container,style:null==b?void 0:b.container,children:r("div",{className:d.inner,style:null==b?void 0:b.inner,children:[r("div",{className:d.waveformRow,style:null==b?void 0:b.waveformRow,children:[e("div",{className:d.playButtonWrapper,style:null==b?void 0:b.playButtonWrapper,children:e("button",{ref:Ne,onClick:$e,className:d.playButton,style:null==b?void 0:b.playButton,title:C?"Pause":"Play",disabled:B,children:B?e(t,{children:"Loading..."}):e("div",C?{className:d.icon,style:null==b?void 0:b.pauseIcon,children:e(m,{})}:{className:d.icon,style:null==b?void 0:b.playIcon,children:e(p,{})})})}),e("div",{ref:le,className:d.waveform,style:null==b?void 0:b.waveform})]}),r("div",{className:d.sliderRow,style:null==b?void 0:b.sliderRow,children:[e("div",{className:d.buttonSpacer,style:null==b?void 0:b.buttonSpacer}),r("div",{className:`${d.slider}\n ${d.group}\n ${v?d.disabled:d.interactive}`,ref:ce,style:null==b?void 0:b.slider,onClick:v?void 0:e=>{var r;if(v)return;const t=null===(r=ce.current)||void 0===r?void 0:r.getBoundingClientRect();if(!t||!se.current)return;const n=(e.clientX-t.left)/t.width*100,u=n/100*w;Y(n),se.current.seekTo(u/w),O&&Me()},onMouseMove:v?void 0:e=>{if(!v&&ce.current){const r=ce.current.getBoundingClientRect(),t=e.clientX-r.left;if(t>=0&&t<=r.width){const e=t/r.width*100;ee(!0),te(t);const n=Pe(ke(e/100*w));ue(n||"00:00:00")}}},onMouseLeave:()=>{ee(!1)},onMouseDown:v?void 0:()=>{v||(oe.current=!0)},onMouseUp:v?void 0:()=>{if(!v&&(oe.current=!1,se.current)){const e=Q/100*w;se.current.seekTo(e/w),O&&Me()}},children:[e("div",{className:d.sliderTrack,style:null==b?void 0:b.sliderTrack}),e("div",{className:d.sliderProgress,style:{width:`${Q}%`,...null==b?void 0:b.sliderProgress}}),e("div",{className:d.sliderThumb,style:{left:`${Q}%`,...null==b?void 0:b.sliderThumb}}),Z&&!v&&e("div",{className:d.timeTooltip,style:{left:re,...null==b?void 0:b.timeTooltip},children:ne})]})]}),r("div",{className:d.timeRow,style:null==b?void 0:b.timeRow,children:[e("div",{className:d.buttonSpacer,style:null==b?void 0:b.buttonSpacer}),r("div",{className:d.timeText,style:null==b?void 0:b.timeText,children:[e("span",{children:V}),e("span",{children:"/"}),e("span",{children:J})]})]})]})})});v.displayName="SearchWaveform";export{v as default};
2
2
  //# sourceMappingURL=searchwaveform.js.map