@viswa-test/test-citation 0.0.382 → 0.0.383
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.
- package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CitationRenderer.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CitationRendererInner.js +2 -0
- package/dist/cjs/features/CognitiveCompare/CitationRendererInner.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitiveCompareConstants.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitivePopup.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CompareContext.js +1 -1
- package/dist/cjs/features/CognitiveCompare/GptWebCitationPanel.js +2 -0
- package/dist/cjs/features/CognitiveCompare/GptWebCitationPanel.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +1 -1
- package/dist/cjs/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +1 -1
- package/dist/cjs/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
- package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
- package/dist/cjs/features/CognitiveCompare/hooks/useOnDemandCitationCache.js +2 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useOnDemandCitationCache.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/cacheKey.js +2 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/cacheKey.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/contextBuilder.js +2 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/contextBuilder.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/href.js +2 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/href.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/payload.js +2 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/payload.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/response.js +2 -0
- package/dist/cjs/features/CognitiveCompare/onDemandCitations/response.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/utils/normalizeInlineMarkdown.js +2 -0
- package/dist/cjs/features/CognitiveCompare/utils/normalizeInlineMarkdown.js.map +1 -0
- package/dist/cjs/features/CognitiveCompare/utils/onDemandCitations.js +2 -0
- package/dist/cjs/features/CognitiveCompare/utils/onDemandCitations.js.map +1 -0
- package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitation.js +1 -1
- package/dist/cjs/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
- package/dist/cjs/features/GptWebCitation/utils/fixedHeight.utils.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfToolbar.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/cjs/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +2 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/HistoryMenu.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/SocketManager.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
- package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
- package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/helper.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/service/redlineService.js +1 -1
- package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
- package/dist/features/CognitiveCompare/CitationRenderer.js +1 -1
- package/dist/features/CognitiveCompare/CitationRendererInner.js +2 -0
- package/dist/features/CognitiveCompare/CitationRendererInner.js.map +1 -0
- package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveCompareConstants.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/features/CognitiveCompare/CognitivePopup.js +1 -1
- package/dist/features/CognitiveCompare/CompareContext.js +1 -1
- package/dist/features/CognitiveCompare/GptWebCitationPanel.js +2 -0
- package/dist/features/CognitiveCompare/GptWebCitationPanel.js.map +1 -0
- package/dist/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +1 -1
- package/dist/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +1 -1
- package/dist/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +1 -1
- package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
- package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
- package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
- package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
- package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
- package/dist/features/CognitiveCompare/hooks/useOnDemandCitationCache.js +2 -0
- package/dist/features/CognitiveCompare/hooks/useOnDemandCitationCache.js.map +1 -0
- package/dist/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
- package/dist/features/CognitiveCompare/onDemandCitations/cacheKey.js +2 -0
- package/dist/features/CognitiveCompare/onDemandCitations/cacheKey.js.map +1 -0
- package/dist/features/CognitiveCompare/onDemandCitations/contextBuilder.js +2 -0
- package/dist/features/CognitiveCompare/onDemandCitations/contextBuilder.js.map +1 -0
- package/dist/features/CognitiveCompare/onDemandCitations/href.js +2 -0
- package/dist/features/CognitiveCompare/onDemandCitations/href.js.map +1 -0
- package/dist/features/CognitiveCompare/onDemandCitations/payload.js +2 -0
- package/dist/features/CognitiveCompare/onDemandCitations/payload.js.map +1 -0
- package/dist/features/CognitiveCompare/onDemandCitations/response.js +2 -0
- package/dist/features/CognitiveCompare/onDemandCitations/response.js.map +1 -0
- package/dist/features/CognitiveCompare/utils/normalizeInlineMarkdown.js +2 -0
- package/dist/features/CognitiveCompare/utils/normalizeInlineMarkdown.js.map +1 -0
- package/dist/features/CognitiveCompare/utils/onDemandCitations.js +2 -0
- package/dist/features/CognitiveCompare/utils/onDemandCitations.js.map +1 -0
- package/dist/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitation.js +1 -1
- package/dist/features/GptWebCitation/GptWebCitationImageCitation.js +1 -1
- package/dist/features/GptWebCitation/utils/fixedHeight.utils.js +1 -1
- package/dist/features/PdfViewer/PdfToolbar.js +1 -1
- package/dist/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +2 -0
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +1 -0
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +2 -0
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/HistoryMenu.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/cws/SocketManager.js +1 -1
- package/dist/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
- package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.module.css.js +1 -1
- package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
- package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
- package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
- package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
- package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
- package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
- package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
- package/dist/features/RequirementAI/utils/helpers.js +1 -1
- package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
- package/dist/features/SegmentReviewComponents/BoundaryCard.js +1 -1
- package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js +1 -1
- package/dist/features/SegmentReviewComponents/RevertSuccessCard.js +1 -1
- package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
- package/dist/features/SegmentReviewComponents/helper.js +1 -1
- package/dist/features/SegmentReviewComponents/reviewStepAdapters.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/redlineService.js +1 -1
- package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
- package/dist/types/src/RedlineEditorTest.d.ts.map +1 -1
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts +2 -0
- package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts +8 -1
- package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CitationRendererInner.d.ts +13 -0
- package/dist/types/src/features/CognitiveCompare/CitationRendererInner.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +12 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +12 -0
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitivePopup.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts +9 -1
- package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/GptWebCitationPanel.d.ts +6 -0
- package/dist/types/src/features/CognitiveCompare/GptWebCitationPanel.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/Guidelines/components/GuidelinePanel.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/Guidelines/components/WebGptPanel.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts +3028 -891
- package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts +14 -1
- package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts +2 -1
- package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useOnDemandCitationCache.d.ts +10 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useOnDemandCitationCache.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/cacheKey.d.ts +3 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/cacheKey.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/contextBuilder.d.ts +16 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/contextBuilder.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/href.d.ts +6 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/href.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/index.d.ts +7 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/index.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/payload.d.ts +4 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/payload.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/response.d.ts +3 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/response.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/types.d.ts +134 -0
- package/dist/types/src/features/CognitiveCompare/onDemandCitations/types.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/utils/normalizeInlineMarkdown.d.ts +6 -0
- package/dist/types/src/features/CognitiveCompare/utils/normalizeInlineMarkdown.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveCompare/utils/onDemandCitations.d.ts +2 -0
- package/dist/types/src/features/CognitiveCompare/utils/onDemandCitations.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts +1 -0
- package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitation.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts +2 -1
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/types.d.ts +11 -0
- package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts +2 -0
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts +0 -1
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +39 -29
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts +10 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts +17 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts +23 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts +3 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts +84 -5439
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +2 -2
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +19 -2
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.d.ts +7 -2
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/SocketManager.d.ts +15 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/SocketManager.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts +3 -2
- package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationContent.d.ts +1 -0
- package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationRender.d.ts +1 -0
- package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationRender.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts +12 -0
- package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts +3 -2
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +3 -1
- package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts +1 -0
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts +1 -1
- package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +3 -0
- package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +2 -1
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/utils/helpers.d.ts +2 -0
- package/dist/types/src/features/RequirementAI/utils/helpers.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/utils/proccess-stream.utils.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts +0 -6
- package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/helper.d.ts +4 -2
- package/dist/types/src/features/SegmentReviewComponents/helper.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/index.d.ts +1 -3
- package/dist/types/src/features/SegmentReviewComponents/index.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts +1 -2
- package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts.map +1 -1
- package/dist/types/src/service/redlineService.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
- package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
- package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js +0 -2
- package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js.map +0 -1
- package/dist/cjs/features/PdfViewer/nyc-components/BoundaryCard.js +0 -2
- package/dist/cjs/features/PdfViewer/nyc-components/BoundaryCard.js.map +0 -1
- package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js +0 -2
- package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js.map +0 -1
- package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js +0 -2
- package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js.map +0 -1
- package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js +0 -2
- package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js.map +0 -1
- package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +0 -2
- package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +0 -1
- package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js +0 -2
- package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js.map +0 -1
- package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js +0 -2
- package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +0 -1
- package/dist/cjs/features/SegmentReviewComponents/PageTypeChoiceCheck.js +0 -2
- package/dist/cjs/features/SegmentReviewComponents/PageTypeChoiceCheck.js.map +0 -1
- package/dist/cjs/features/SegmentReviewComponents/reviewScore.js +0 -2
- package/dist/cjs/features/SegmentReviewComponents/reviewScore.js.map +0 -1
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +0 -2
- package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +0 -1
- package/dist/features/ParentCitationComponent/ParentCitationComponent.js +0 -2
- package/dist/features/ParentCitationComponent/ParentCitationComponent.js.map +0 -1
- package/dist/features/PdfViewer/nyc-components/BoundaryCard.js +0 -2
- package/dist/features/PdfViewer/nyc-components/BoundaryCard.js.map +0 -1
- package/dist/features/PdfViewer/nyc-components/CardWrapper.js +0 -2
- package/dist/features/PdfViewer/nyc-components/CardWrapper.js.map +0 -1
- package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js +0 -2
- package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js.map +0 -1
- package/dist/features/PdfViewer/nyc-components/LabelCheck.js +0 -2
- package/dist/features/PdfViewer/nyc-components/LabelCheck.js.map +0 -1
- package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +0 -2
- package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +0 -1
- package/dist/features/PdfViewer/nyc-components/infoAlert.js +0 -2
- package/dist/features/PdfViewer/nyc-components/infoAlert.js.map +0 -1
- package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js +0 -2
- package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +0 -1
- package/dist/features/SegmentReviewComponents/PageTypeChoiceCheck.js +0 -2
- package/dist/features/SegmentReviewComponents/PageTypeChoiceCheck.js.map +0 -1
- package/dist/features/SegmentReviewComponents/reviewScore.js +0 -2
- package/dist/features/SegmentReviewComponents/reviewScore.js.map +0 -1
- package/dist/types/node_modules/react-markdown/lib/complex-types.d.ts +0 -23
- package/dist/types/node_modules/react-markdown/lib/complex-types.d.ts.map +0 -1
- package/dist/types/src/Background.d.ts +0 -7
- package/dist/types/src/Background.d.ts.map +0 -1
- package/dist/types/src/RedlineApprovalCardTest.d.ts +0 -1
- package/dist/types/src/RedlineApprovalCardTest.d.ts.map +0 -1
- package/dist/types/src/RedlineEditorTest2.d.ts +0 -3
- package/dist/types/src/RedlineEditorTest2.d.ts.map +0 -1
- package/dist/types/src/commonConstants.d.ts +0 -31103
- package/dist/types/src/commonConstants.d.ts.map +0 -1
- package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts +0 -2
- package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts.map +0 -1
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts +0 -128
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts.map +0 -1
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts +0 -13
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts +0 -59
- package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts +0 -19
- package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts +0 -3
- package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts +0 -77
- package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts +0 -47
- package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts +0 -15
- package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts +0 -3
- package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts.map +0 -1
- package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts +0 -36
- package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts.map +0 -1
- package/dist/types/src/features/SegmentReviewComponents/PageTypeChoiceCheck.d.ts +0 -28
- package/dist/types/src/features/SegmentReviewComponents/PageTypeChoiceCheck.d.ts.map +0 -1
- package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts +0 -2
- package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts.map +0 -1
- package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts +0 -4
- package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts.map +0 -1
- package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts +0 -2
- package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts.map +0 -1
package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,Fragment as n,jsxs as i}from"react/jsx-runtime";import o,{createContext as t,useRef as l,useState as r,useCallback as d,useMemo as a,useEffect as s,useContext as c}from"react";import u from"react-markdown";import p from"rehype-raw";import g from"./UserStoryWithCitation.module.css.js";import{useMarkdownSearch as h}from"../../shared/useMarkdownSearch.js";import{Info as v}from"lucide-react";import{Tooltip as m}from"@mui/material";import C from"dompurify";import f from"../../shared/UpdatedAnimationContent.js";import y from"../../shared/GeneratedCodeCitation.js";import w from"../../shared/CitationLoadingIndicator.js";import{useRequirementAI as I}from"../RequirementAIWrapper/RequirementAIWrapper.js";import S from"../../icons/CognitiveDecision.js";import b from"../../icons/BrainRed.js";import R,{SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING as $}from"../ai-reasoning/AiReasoningCitation.js";import x from"../../icons/RelevanceScoreIcon.js";import N from"../RecommendationBlock/RecommendationBlock.js";import k from"../UserStoryCard/AttachedContext.js";import A from"../ai-reasoning/AiReasoningCitationContent.js";import j from"./components/InlineUpdatedComponent.js";import U from"../segment/SegmentWrapper.js";import{MarkdownContextProvider as E}from"../../store/markdown-context.js";import L from"./components/InlineManualComponent.js";import M from"./components/HighlightButtonComponent.js";import{escapeTagIds as T,splitTagAcrossParagraphs as P}from"../../../../utils/tagHelper.js";const D=t(!1),_=t({expandedInfo:null,setExpanded:()=>{},reasonToRow:{current:new Map}}),H=t({rowId:""}),F=({aiReason:n,isHighConfidence:o,customStyle:t,customIcons:l})=>{var r;const{expandedInfo:d,setExpanded:a,reasonToRow:s}=c(_),{rowId:u}=c(H),p=String(n.id);u&&s.current.set(p,u);const h=(null===(r=null==d?void 0:d.aiReason)||void 0===r?void 0:r.id)===n.id,v=o?(null==l?void 0:l.highConfidence)||e(S,{}):(null==l?void 0:l.lowConfidence)||e(b,{});return i("button",{className:g.aiReasoningButton,style:t,onClick:e=>{e.stopPropagation(),e.preventDefault(),a(h?null:u,h?null:n)},children:[v,e("i",h?{className:`pi pi-angle-up ${o?g.aiReasoningIconHighConfidence:g.aiReasoningIconLowConfidence}`}:{className:`pi pi-angle-down ${o?g.aiReasoningIconHighConfidence:g.aiReasoningIconLowConfidence}`})]})},B=({children:n,node:o,customStyles:t,customIcons:r})=>{var d,a;const s=l(Math.random().toString(36).slice(2)).current,{expandedInfo:u}=c(_),p=(null==u?void 0:u.rowId)===s,h=Array.isArray(null==o?void 0:o.children)?o.children.filter(e=>"element"===e.type).length:1,v=null!==(a=null===(d=null==o?void 0:o.properties)||void 0===d?void 0:d.style)&&void 0!==a?a:void 0;return i(H.Provider,{value:{rowId:s},children:[e("tr",{style:v?{cssText:v}:void 0,children:n}),p&&(null==u?void 0:u.aiReason)&&e("tr",{style:{width:"100%"},children:e("td",{colSpan:h||1,className:g.tableExpandedCell,children:e("div",{className:g.tableExpandedCellInner,children:e("div",{className:g.tableExpandedCellContent,children:e(A,{aiReason:u.aiReason,customIcons:r,customStyles:{aiReasoningContent:null==t?void 0:t.aiReasoningContent,aiReasoningAccordion:null==t?void 0:t.aiReasoningAccordion,aiReasoningMarkdown:null==t?void 0:t.aiReasoningMarkdown,aiReasoningPill:null==t?void 0:t.aiReasoningPill,webCitation:null==t?void 0:t.webCitation,stormeeCitation:null==t?void 0:t.stormeeCitation,waveformCitation:null==t?void 0:t.waveformCitation,imageCitation:null==t?void 0:t.imageCitation,fileCitation:null==t?void 0:t.fileCitation,appModCitation:null==t?void 0:t.appModCitation,rcaCitation:null==t?void 0:t.rcaCitation,readFileCitation:null==t?void 0:t.readFileCitation,loadingCitations:null==t?void 0:t.loadingCitations,chatCitation:null==t?void 0:t.chatCitation}})})})})})]})};const W=["del","ins"];function O(e){return function(e,n,i){const o=n.join("|");return e.replace(new RegExp(`<(${o})>([\\s\\S]*?)<\\/\\1>`,"gi"),(e,n,o)=>`<${n}>${i(o)}</${n}>`)}(e,W,e=>e.split(/(<[^>]+>)/g).map(e=>!e||/^<[^>]+>$/.test(e)?e:function(e){if(!e)return e;const n=[];return e.replace(/`([^`\n]+)`/g,(e,i)=>`@@CODE_SPAN_${n.push(i)-1}@@`).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,(e,i)=>{var o;return`<code>${t=null!==(o=n[Number(i)])&&void 0!==o?o:"",t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}</code>`;var t})}(e)).join(""))}const V=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function q(e,n){const i=[],t=new Set(n.map(e=>e.toLowerCase())),l=e=>{var n,r;try{if(null==e||"boolean"==typeof e)return null;if("string"==typeof e||"number"==typeof e)return e;if(Array.isArray(e))return e.map(e=>l(e)).flat().filter(e=>null!=e);if(!o.isValidElement(e))return e;const d="string"==typeof e.type?e.type.toLowerCase():"";if(t.has(d))return i.push(e),null;if(V.has(d))return e;const a=null===(r=o.Children.map(null===(n=e.props)||void 0===n?void 0:n.children,l))||void 0===r?void 0:r.flat().filter(e=>null!=e);return a&&0!==a.length?o.cloneElement(e,void 0,a):null}catch(n){return console.error("splitNestedDiffNodes failed while processing node:",n),e}};try{return{cleanedChildren:l(e),extractedNodes:i}}catch(n){return console.error("splitNestedDiffNodes failed:",n),{cleanedChildren:e,extractedNodes:[]}}}const z=({message:t,noMarkdownContent:S,useMarkdown:b=!0,isParent:A,scenario:H,showUserStoryDiff:W=!1,aiReasoningsForBlock:V,isCitationLoadingDisplay:z=!1,className:G,highConfidenceIcon:Q,lowConfidenceIcon:J,customStyles:K,customIcons:X,contextVariant:Y,aiReasoningDiffView:Z,userStoryCitations:ee,artifactId:ne,isCraflow:ie,onCraAccept:oe,onCraReject:te,craFlowConfig:le,isDisplayHighlightControl:re=!1,showConfidenceScore:de=!0,CDNeededInChip:ae,blockId:se,showWaitingIconInChip:ce})=>{var ue;console.log("userstorywithcitation blockid ",se);const pe=l(null),{userStory:ge,inlineUpdateComponentConfig:he,getAvgScoreForStory:ve,setUserStory:me,aiReasoning:Ce,setAiReasoning:fe,customIcons:ye,searchQueryList:we,searchQueryReasoningIdList:Ie,currentHighlightIndex:Se,segmentComponentConfig:be,inlineManualComponentConfig:Re,diffEditConfig:$e}=I(),xe=null!=X?X:null==ye?void 0:ye.userStoryIcons;null==K||K.searchHighlight;const{search:Ne,clear:ke}=h(pe),[Ae,je]=r("1"),[Ue,Ee]=r(null),Le=l(new Map),[Me,Te]=r(new Set),Pe=d((e,n)=>{Ee(e&&n?{rowId:e,aiReason:n}:null)},[]),De=ne?ve(ne):0,[_e,He]=r([]),Fe=d(e=>{Te(n=>{const i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i})},[]),Be=e=>null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(Be).join(""):o.isValidElement(e)?Be(e.props.children):"",We=e=>{let n=e;return n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>`<deleted>${n.replace(/ai_reasoning\$(\d+)/g,(e,n)=>`ai_reasoning$${n}-legacy`)}</deleted>`),n=n.replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,(e,n,i)=>`\n\n<generatedCode${n} data-raw="${btoa(encodeURIComponent(i.trim()))}"></generatedCode>\n\n`),n=n.replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2"),n=n.replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,(e,n,i,o,t)=>{const l=o.match(/<table[\s\S]*?<\/table>/i);if(l){return`<segment${i} data-table="${btoa(encodeURIComponent(l[0]))}"></segment>`}return e}),n=n.replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,(e,n,i)=>{if(/<table[\s>]/i.test(i)){return`<updatedsegment${n} data-raw="${btoa(encodeURIComponent(i))}"></updatedsegment>`}return e}),n=n.replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,(e,i,o,t)=>{const l=n.substring(0,t),r=l.lastIndexOf("\n"),d=/^\s+[-*]\s/.test(l.substring(r+1))||/^\s+\d+\.\s/.test(l.substring(r+1)),a=/^\s*(\d+\.|\s*[-*])\s+$/.test(l.substring(r+1));if(d||a){let e=o;return e=e.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),`<updated${i}>${e}</updated>`}return e}),n=function(e){const n=/<updated[^>]*>[\s\S]*?<\/updated>/gi,i=[];let o;const t=new RegExp(n.source,n.flags);for(;null!==(o=t.exec(e));){const e=o[0],n=e.match(/<deleted>([\s\S]*?)<\/deleted>/i),t=e.match(/<changed>([\s\S]*?)<\/changed>/i),l=e=>(e.match(/^\s*\d+\.\s/gm)||[]).length;i.push({index:o.index,endIndex:o.index+o[0].length,deletedItemCount:l((null==n?void 0:n[1])||""),changedItemCount:l((null==t?void 0:t[1])||"")})}if(0===i.length)return e;let l=e;for(let e=i.length-1;e>=0;e--){const n=i[e],o=n.changedItemCount-n.deletedItemCount;if(0===o)continue;const t=l.substring(0,n.index).split("\n").reverse();let r=!1;for(const e of t){const n=e.trim();if(""!==n){/^\d+\.\s/.test(n)&&(r=!0);break}}if(!r)continue;const d=n.endIndex,a=e+1<i.length?i[e+1].index:l.length;let s=l.substring(d,a);s=s.replace(/^(\s*)(\d+)\.\s/gm,(e,n,i)=>`${n}${parseInt(i,10)+o}. `),l=l.substring(0,d)+s+l.substring(a)}return l}(n),n=function(e){let n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),`<deleted>${i}</deleted>`});return n=n.replace(/<changed>([\s\S]*?)<\/changed>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),`<changed>${i}</changed>`}),n}(n),n=O(n),n},Oe=a(()=>t?We(t):t,[t]);s(()=>{He(V||Ce)},[V,Ce]);const Ve=a(()=>({span:({node:n,children:i,...o})=>{var t,l,r,d,a;const s=null!==(l=null===(t=null==n?void 0:n.properties)||void 0===t?void 0:t["highlight-id"])&&void 0!==l?l:null==o?void 0:o["highlight-id"],c="string"==typeof s&&Me.has(s),u=null!==(d=null===(r=null==n?void 0:n.properties)||void 0===r?void 0:r["highlight-color"])&&void 0!==d?d:null==o?void 0:o["highlight-color"];return e("span",{style:{...null!==(a=null==K?void 0:K.span)&&void 0!==a?a:{},...c?{backgroundColor:u||"#fef08a"}:{}},children:i})},button:({node:i,children:o,...t})=>{var l,r,d,a,s,c;const u=null!==(r=null===(l=null==i?void 0:i.properties)||void 0===l?void 0:l.action)&&void 0!==r?r:null==t?void 0:t.action,p=null!==(a=null===(d=null==i?void 0:i.properties)||void 0===d?void 0:d["highlight-id"])&&void 0!==a?a:null==t?void 0:t["highlight-id"],g=null!==(c=null===(s=null==i?void 0:i.properties)||void 0===s?void 0:s["highlight-type"])&&void 0!==c?c:null==t?void 0:t["highlight-type"];return"highlight"===u?e(M,{highlightId:p,handleHighlightSpan:Fe,icon:"web"===g?null==xe?void 0:xe.webCitationIcon:"doc"===g?null==xe?void 0:xe.fileCitationIcon:e(n,{}),customStyles:"web"===g?null==K?void 0:K.webButton:"doc"===g?null==K?void 0:K.docButton:{}}):null},upt:({node:i,children:o,...t})=>{var l,r;const d=null==t?void 0:t.id,a=d?null===(r=null===(l=d.split("$"))||void 0===l?void 0:l[1])||void 0===r?void 0:r.replaceAll("@","<").replaceAll("#",">"):null,s=Ce.find(e=>e.id.toString()===a);if(!s)return o||e(n,{});const c="data-main"in t,u=t["data-status"];return e(n,{children:e(j,{aiReason:s,customStyles:null==K?void 0:K.inlineUpdatedComponent,handleClickCognitiveDecision:null==he?void 0:he.handleClickCognitiveDecision,handleClickUpdatedPill:null==he?void 0:he.handleClickUpdatedPill,handleClickOutputValue:null==he?void 0:he.handleClickOutputValue,customIcons:null==he?void 0:he.customIcons,CDNeededInChip:ae,showWaitingIconInChip:ce,showChip:c,status:u,children:o||e(n,{})})})},del:({node:o,children:t,...l})=>{var r;const{cleanedChildren:d,extractedNodes:a}=q(t,["ins"]);return i(n,{children:[e("span",{className:g.deleted,style:null!==(r=null==K?void 0:K.deleted)&&void 0!==r?r:{},...l,onClick:()=>{l.onclick&&l.onclick()},children:d}),a]})},ins:({children:o,...t})=>{var l;const{cleanedChildren:r,extractedNodes:d}=q(o,["del"]);return i(n,{children:[e("span",{className:g.inserted,style:null!==(l=null==K?void 0:K.inserted)&&void 0!==l?l:{},...t,onClick:()=>{t.onclick&&t.onclick()},children:r}),d]})},preserved:({children:n,...i})=>e("span",{className:g.preserved,style:null==K?void 0:K.preserved,...i,children:n}),manual:({children:i,...o})=>{var t;const l=null===(t=null==o?void 0:o.id)||void 0===t?void 0:t.replaceAll("@","<").replaceAll("#",">"),r=Ce.find(e=>e.id.toString()===l),d=o["data-status"];return r?e(L,{aiReason:r,handleClick:null==Re?void 0:Re.handleClick,status:d,children:i}):i||e(n,{})},invisible:({children:i,...o})=>e(n,{}),h1:({node:n,...i})=>e("h1",{className:g.heading1,style:null==K?void 0:K.heading1,children:i.children}),h2:({node:n,...i})=>e("h2",{className:g.heading2,style:null==K?void 0:K.heading2,children:i.children}),h3:({node:n,...i})=>e("h3",{className:g.heading3,style:null==K?void 0:K.heading3,children:i.children}),b:({node:n,...i})=>e("b",{className:g.bold,style:null==K?void 0:K.bold,children:null==i?void 0:i.children}),p:({node:n,...i})=>e("p",{...i,className:g.paragraph,style:null==K?void 0:K.paragraph,children:i.children}),updated:({node:n,...i})=>e(f,{...i,showUserStoryDiff:W,currentUpdatedTagId:Ae,setCurrentUpdatedTagId:je,userStory:ge,setUserStory:me,setAiReasoning:fe,node:n,isCraflow:ie,onCraAccept:oe,onCraReject:te,diffEditConfig:$e,customStyles:null==K?void 0:K.updatedContent,craFlowConfig:le}),ol:({node:n,...i})=>{var o,t,l;const r=null!==(l=null!==(t=null===(o=null==n?void 0:n.properties)||void 0===o?void 0:o.start)&&void 0!==t?t:null==i?void 0:i.start)&&void 0!==l?l:void 0;return e("ol",{className:g.orderedList,style:null==K?void 0:K.olist,...r?{start:Number(r)}:{},children:null==i?void 0:i.children})},ul:({node:n,...i})=>e("ul",{className:g.unorderedList,style:null==K?void 0:K.ulist,children:null==i?void 0:i.children}),table:({children:n})=>e("div",{className:g.tableWrapper,children:e("table",{className:g.table,style:null==K?void 0:K.table,children:n})}),tr:({node:n,children:i})=>e(B,{node:n,children:i,customStyles:K}),td:({node:n,children:i})=>{var o;const{style:t,...l}=null!==(o=null==n?void 0:n.properties)&&void 0!==o?o:{};return e(D.Provider,{value:!0,children:e("td",{...l,style:t?{cssText:t}:void 0,children:i})})},th:({node:n,children:i})=>{var o;const{style:t,...l}=null!==(o=null==n?void 0:n.properties)&&void 0!==o?o:{};return e(D.Provider,{value:!0,children:e("th",{...l,style:t?{cssText:t}:void 0,children:i})})},recommendation:({node:n,...i})=>{var o;const t=`The AI has selected this content based on: ${(null===(o=null==i?void 0:i.children)||void 0===o?void 0:o[0])||""}`;return e(N,{...i,customStyles:null==K?void 0:K.recommendationBlock,label:t})},a:({inline:n,children:i,node:o,...t})=>{var l,r,d;const a=c(D)||"true"==(null==t?void 0:t.table),s=`${null==t?void 0:t.href}`,u=null===(l=s.split("$"))||void 0===l?void 0:l[0],p=null===(r=s.split("$"))||void 0===r?void 0:r[1];if("ai_reasoning"===u){const n=(null!==(d=W?Z:Ce)&&void 0!==d?d:[]).find(e=>e.id.toString()===decodeURIComponent(p)),o=Ie.includes(p);if(n){if(a)return e(F,{aiReason:n,customStyle:null==K?void 0:K.tableAiReasoning,customIcons:xe,isHighConfidence:n.relevance_score>=$});const t=Be(i),l="source"!==t.trim().toLowerCase();return e(R,{aiReason:n,isSourceHasHighlight:o,inlineLabel:t,isInlineCitation:l,customIcons:xe,customStyles:{aiReasoningContent:null==K?void 0:K.aiReasoningContent,aiReasoningAccordion:null==K?void 0:K.aiReasoningAccordion,aiReasoningMarkdown:null==K?void 0:K.aiReasoningMarkdown,aiReasoningPill:null==K?void 0:K.aiReasoningPill,webCitation:null==K?void 0:K.webCitation,stormeeCitation:null==K?void 0:K.stormeeCitation,waveformCitation:null==K?void 0:K.waveformCitation,imageCitation:null==K?void 0:K.imageCitation,fileCitation:null==K?void 0:K.fileCitation,appModCitation:null==K?void 0:K.appModCitation,rcaCitation:null==K?void 0:K.rcaCitation,readFileCitation:null==K?void 0:K.readFileCitation,loadingCitations:null==K?void 0:K.loadingCitations,chatCitation:null==K?void 0:K.chatCitation,bigEnoughCitation:null==K?void 0:K.bigEnoughCitation}})}}return null},code:({inline:n,children:i,className:o,node:t,...l})=>/language-(\w+)/.exec(o||"")||(null==o?void 0:o.includes("language-"))?e("div",{children:e("code",{className:g.blockCode,style:null==K?void 0:K.code,children:i})}):e("code",{className:g.inlineCode,style:null==K?void 0:K.code,children:i}),learned:({children:n})=>e(m,{title:n,placement:"top",children:e(v,{size:16,className:g.learned})}),generatedcode:({node:n,...i})=>{const o=(null==i?void 0:i.language)||"python",t=(e=>{let n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{const i=e=>{var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n})(i);return e(y,{title:"Generated Code",code:t,language:o,customStyles:{pill:null==K?void 0:K.generatedCodePill,content:null==K?void 0:K.generatedCodeContent}})},updatedsegment:({node:n,children:i,...o})=>{var t,l,r,d;const a=`${null===(t=n.position)||void 0===t?void 0:t.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(r=n.position)||void 0===r?void 0:r.end.line}-${null===(d=n.position)||void 0===d?void 0:d.end.column}`,s=(e=>{if(!e["data-raw"])return null;try{return decodeURIComponent(atob(e["data-raw"]))}catch(e){return console.error("Error decoding segment raw content:",e),null}})(o),c=e("div",s?{dangerouslySetInnerHTML:{__html:C.sanitize(s)}}:{children:i});return e(U,{id:a,node:n,children:c,props:o,segmentComponentConfig:be,customStyles:K,customIcons:X,extractText:Be,isUpdatedSegment:!0})},segment:({node:n,children:i,...o})=>{var t,l,r,d;const a=`${null===(t=n.position)||void 0===t?void 0:t.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(r=n.position)||void 0===r?void 0:r.end.line}-${null===(d=n.position)||void 0===d?void 0:d.end.column}`;return e(U,{id:a,node:n,children:i,props:o,segmentComponentConfig:be,customStyles:K,customIcons:X,extractText:Be,blockId:se})}}),[_e,le,Ce,ee,Ae,W,t,X,we,Ie,K,be,Me,Fe,se]),qe=a(()=>{let e=T(Oe,["manual","upt"]);return["del","ins","preserved","manual","upt"].forEach(n=>{e=P(e,n,"upt"===n)}),e},[Oe]);return s(()=>{if(!pe.current)return;if(!we.length)return void ke();let e;if(0===Ie.length||re)requestAnimationFrame(()=>{Ne([we[Se].replace(/\*/g,"")])});else{const n=pe.current,i=new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{i.disconnect(),requestAnimationFrame(()=>{Ne([we[Se].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return()=>{clearTimeout(e)}},[we,Ie,Se,re]),e(_.Provider,{value:{expandedInfo:Ue,setExpanded:Pe,reasonToRow:Le},children:i("div",{ref:pe,className:`${g.container} ${"approving"!==H?g.wrapper:""} ${G||""}`,style:null==K?void 0:K.container,children:[b?e(E,{children:e(u,{components:Ve,rehypePlugins:[p],children:qe})}):S,De>0&&de&&e("div",{className:g.confidenceScoreContainer,style:null==K?void 0:K.confidenceScoreContainer,children:i("span",{className:g.confidenceScore,style:null==K?void 0:K.confidenceScore,children:[e(x,{size:14,color:(null==K?void 0:K.confidenceScoreIconColor)||"#166534"}),De,"%"]})}),z&&e("div",{className:g.citationLoader,style:null==K?void 0:K.citationLoaderContainer,children:e(w,{customStyles:{container:null==K?void 0:K.citationLoadingContainer,icon:null==K?void 0:K.citationLoadingIcon,text:null==K?void 0:K.citationLoadingText}})}),A&&e("div",{style:{...null===(ue=null==K?void 0:K.attachedContext)||void 0===ue?void 0:ue.wrapper},className:"flex mt-5",children:e(k,{customStyles:null==K?void 0:K.attachedContext,variant:Y})})]})})};export{z as default,q as splitNestedDiffNodes};
|
|
1
|
+
import{jsx as e,Fragment as n,jsxs as i}from"react/jsx-runtime";import t,{createContext as o,useRef as l,useState as r,useCallback as d,useMemo as a,useEffect as s,useContext as c}from"react";import u from"react-markdown";import p from"rehype-raw";import h from"./UserStoryWithCitation.module.css.js";import{useMarkdownSearch as g}from"../../shared/useMarkdownSearch.js";import{Info as m}from"lucide-react";import{Tooltip as v}from"@mui/material";import f from"dompurify";import C from"../../shared/UpdatedAnimationContent.js";import y from"../../shared/GeneratedCodeCitation.js";import w from"../../shared/CitationLoadingIndicator.js";import{useRequirementAI as b}from"../RequirementAIWrapper/RequirementAIWrapper.js";import I from"../../icons/CognitiveDecision.js";import S from"../../icons/BrainRed.js";import R,{SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING as $}from"../ai-reasoning/AiReasoningCitation.js";import x from"../../icons/RelevanceScoreIcon.js";import N from"../RecommendationBlock/RecommendationBlock.js";import k from"../UserStoryCard/AttachedContext.js";import A from"../ai-reasoning/AiReasoningCitationContent.js";import j from"./components/InlineUpdatedComponent.js";import L from"../segment/SegmentWrapper.js";import{MarkdownContextProvider as U}from"../../store/markdown-context.js";import E from"./components/InlineManualComponent.js";import M from"./components/HighlightButtonComponent.js";import{escapeTagIds as P,splitTagAcrossParagraphs as T}from"../../../../utils/tagHelper.js";import{normalizeRedlineMarkdown as D}from"../RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js";const _=o(!1),H=o({expandedInfo:null,setExpanded:()=>{},reasonToRow:{current:new Map}}),W=o({rowId:""}),B=({aiReason:n,isHighConfidence:t,customStyle:o,customIcons:l})=>{var r;const{expandedInfo:d,setExpanded:a,reasonToRow:s}=c(H),{rowId:u}=c(W),p=String(n.id);u&&s.current.set(p,u);const g=(null===(r=null==d?void 0:d.aiReason)||void 0===r?void 0:r.id)===n.id,m=t?(null==l?void 0:l.highConfidence)||e(I,{}):(null==l?void 0:l.lowConfidence)||e(S,{});return i("button",{className:h.aiReasoningButton,style:o,onClick:e=>{e.stopPropagation(),e.preventDefault(),a(g?null:u,g?null:n)},children:[m,e("i",g?{className:`pi pi-angle-up ${t?h.aiReasoningIconHighConfidence:h.aiReasoningIconLowConfidence}`}:{className:`pi pi-angle-down ${t?h.aiReasoningIconHighConfidence:h.aiReasoningIconLowConfidence}`})]})},F=({children:n,node:t,customStyles:o,customIcons:r})=>{var d,a;const s=l(Math.random().toString(36).slice(2)).current,{expandedInfo:u}=c(H),p=(null==u?void 0:u.rowId)===s,g=Array.isArray(null==t?void 0:t.children)?t.children.filter(e=>"element"===e.type).length:1,m=null!==(a=null===(d=null==t?void 0:t.properties)||void 0===d?void 0:d.style)&&void 0!==a?a:void 0;return i(W.Provider,{value:{rowId:s},children:[e("tr",{style:m?{cssText:m}:void 0,children:n}),p&&(null==u?void 0:u.aiReason)&&e("tr",{style:{width:"100%"},children:e("td",{colSpan:g||1,className:h.tableExpandedCell,children:e("div",{className:h.tableExpandedCellInner,children:e("div",{className:h.tableExpandedCellContent,children:e(A,{aiReason:u.aiReason,customIcons:r,customStyles:{aiReasoningContent:null==o?void 0:o.aiReasoningContent,aiReasoningAccordion:null==o?void 0:o.aiReasoningAccordion,aiReasoningMarkdown:null==o?void 0:o.aiReasoningMarkdown,aiReasoningPill:null==o?void 0:o.aiReasoningPill,webCitation:null==o?void 0:o.webCitation,stormeeCitation:null==o?void 0:o.stormeeCitation,waveformCitation:null==o?void 0:o.waveformCitation,imageCitation:null==o?void 0:o.imageCitation,fileCitation:null==o?void 0:o.fileCitation,appModCitation:null==o?void 0:o.appModCitation,rcaCitation:null==o?void 0:o.rcaCitation,readFileCitation:null==o?void 0:o.readFileCitation,loadingCitations:null==o?void 0:o.loadingCitations,chatCitation:null==o?void 0:o.chatCitation}})})})})})]})};const O=["del","ins"];function V(e){if(!e)return e;const n=[];return e.replace(/`([^`\n]+)`/g,(e,i)=>`@@CODE_SPAN_${n.push(i)-1}@@`).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,(e,i)=>{var t;const o=null!==(t=n[Number(i)])&&void 0!==t?t:"";return`<code>${l=o,l.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}</code>`;var l})}function q(e){return function(e,n,i){const t=n.join("|");return e.replace(new RegExp(`<(${t})>([\\s\\S]*?)<\\/\\1>`,"gi"),(e,n,t)=>`<${n}>${i(t)}</${n}>`)}(e,O,e=>e.split(/(<[^>]+>)/g).map(e=>!e||/^<[^>]+>$/.test(e)?e:V(e)).join(""))}function z(e){let n=e.trim();n.startsWith("|")&&(n=n.slice(1)),n.endsWith("|")&&(n=n.slice(0,-1));const i=[];let t="",o=!1;for(const e of n)o?(t+=e,o=!1):"\\"!==e?"|"!==e?t+=e:(i.push(t.trim()),t=""):(t+=e,o=!0);return i.push(t.trim()),i}function G(e){return e.trim().includes("|")&&z(e).length>1}function Q(e){const n=z(e);return n.length>1&&n.every(e=>/^:?-{3,}:?$/.test(e.replace(/\s+/g,"")))}function J(e){if(!e)return;const n=e.replace(/\s+/g,"");return n.startsWith(":")&&n.endsWith(":")?"center":n.endsWith(":")?"right":"left"}function K(e,n){return Array.from({length:n},(n,i)=>{var t;return null!==(t=e[i])&&void 0!==t?t:""})}function X(e,n,i){return`<${e}${function(e){return e?` align="${e}"`:""}(i)}>${V(n)}</${e}>`}function Y(e,n,i){const t=Math.max(e.length,n.length,...i.map(e=>e.length)),o=K(e,t),l=K(n,t).map(J);return`\n\n<table>${`<thead><tr>${o.map((e,n)=>X("th",e,l[n])).join("")}</tr></thead>`}${i.length?`<tbody>${i.map(e=>`<tr>${K(e,t).map((e,n)=>X("td",e,l[n])).join("")}</tr>`).join("")}</tbody>`:""}</table>\n\n`}const Z=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function ee(e,n){const i=[],o=new Set(n.map(e=>e.toLowerCase())),l=e=>{var n,r;try{if(null==e||"boolean"==typeof e)return null;if("string"==typeof e||"number"==typeof e)return e;if(Array.isArray(e))return e.map(e=>l(e)).flat().filter(e=>null!=e);if(!t.isValidElement(e))return e;const d="string"==typeof e.type?e.type.toLowerCase():"";if(o.has(d))return i.push(e),null;if(Z.has(d))return e;const a=null===(r=t.Children.map(null===(n=e.props)||void 0===n?void 0:n.children,l))||void 0===r?void 0:r.flat().filter(e=>null!=e);return a&&0!==a.length?t.cloneElement(e,void 0,a):null}catch(n){return console.error("splitNestedDiffNodes failed while processing node:",n),e}};try{return{cleanedChildren:l(e),extractedNodes:i}}catch(n){return console.error("splitNestedDiffNodes failed:",n),{cleanedChildren:e,extractedNodes:[]}}}const ne=({message:o,noMarkdownContent:I,useMarkdown:S=!0,isParent:A,scenario:W,showUserStoryDiff:O=!1,aiReasoningsForBlock:V,isCitationLoadingDisplay:J=!1,className:K,highConfidenceIcon:X,lowConfidenceIcon:Z,customStyles:ne,customIcons:ie,contextVariant:te,aiReasoningDiffView:oe,userStoryCitations:le,artifactId:re,isCraflow:de,onCraAccept:ae,onCraReject:se,craFlowConfig:ce,isDisplayHighlightControl:ue=!1,showConfidenceScore:pe=!0,CDNeededInChip:he,blockId:ge,storyId:me,showWaitingIconInChip:ve})=>{var fe;console.log("userstorywithcitation blockid ",ge);const Ce=l(null),{userStory:ye,inlineUpdateComponentConfig:we,getAvgScoreForStory:be,setUserStory:Ie,aiReasoning:Se,setAiReasoning:Re,customIcons:$e,searchQueryList:xe,searchQueryReasoningIdList:Ne,currentHighlightIndex:ke,segmentComponentConfig:Ae,inlineManualComponentConfig:je,diffEditConfig:Le,customSectionConfig:Ue}=b(),Ee=null!=ie?ie:null==$e?void 0:$e.userStoryIcons;null==ne||ne.searchHighlight;const{search:Me,clear:Pe}=g(Ce),[Te,De]=r("1"),[_e,He]=r(null),We=l(new Map),[Be,Fe]=r(new Set),Oe=d((e,n)=>{He(e&&n?{rowId:e,aiReason:n}:null)},[]),Ve=re?be(re):0,[qe,ze]=r([]),Ge=d(e=>{Fe(n=>{const i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i})},[]),Qe=d((e,n)=>{var i,t,o,l,r,d;const a=n["data-upt-id"];if("string"!=typeof a)return;let s=a;try{s=decodeURIComponent(a)}catch(e){}const c=null===(t=null===(i=s.split("$"))||void 0===i?void 0:i[1])||void 0===t?void 0:t.replaceAll("@","<").replaceAll("#",">"),u=Se.find(e=>e.id.toString()===c);if(!u)return;e.preventDefault(),e.stopPropagation();const p=null!==(r=Array.from(null!==(l=null===(o=Ce.current)||void 0===o?void 0:o.querySelectorAll("[data-ai-reason-id]"))&&void 0!==l?l:[]).find(e=>e.dataset.aiReasonId===u.id.toString()))&&void 0!==r?r:e.currentTarget;null===(d=null==we?void 0:we.handleClickUpdatedPill)||void 0===d||d.call(we,p,u)},[Se,null==we?void 0:we.handleClickUpdatedPill]),Je=e=>null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(Je).join(""):t.isValidElement(e)?Je(e.props.children):"",Ke=e=>{let n=function(e){const n=e.split("\n"),i=[];let t=!1;for(let e=0;e<n.length;e++){const o=n[e];if(/^\s*(```|~~~)/.test(o)){t=!t,i.push(o);continue}const l=n[e+1];if(!t&&void 0!==l&&G(o)&&Q(l)){const t=z(o),r=z(l),d=[];for(e+=2;e<n.length&&G(n[e])&&!Q(n[e]);)d.push(z(n[e])),e++;e--,i.push(Y(t,r,d));continue}i.push(o)}return i.join("\n")}(D(function(e){return e.replace(/\\r\\n|\\n|\\r/g,"\n")}(e)));return n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>`<deleted>${n.replace(/ai_reasoning\$(\d+)/g,(e,n)=>`ai_reasoning$${n}-legacy`)}</deleted>`),n=n.replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,(e,n,i)=>`\n\n<generatedCode${n} data-raw="${btoa(encodeURIComponent(i.trim()))}"></generatedCode>\n\n`),n=n.replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2"),n=n.replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,(e,n,i,t,o)=>{const l=t.match(/<table[\s\S]*?<\/table>/i);if(l){return`<segment${i} data-table="${btoa(encodeURIComponent(l[0]))}"></segment>`}return e}),n=n.replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,(e,n,i)=>{if(/<table[\s>]/i.test(i)){return`<updatedsegment${n} data-raw="${btoa(encodeURIComponent(i))}"></updatedsegment>`}return e}),n=n.replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,(e,i,t,o)=>{const l=n.substring(0,o),r=l.lastIndexOf("\n"),d=/^\s+[-*]\s/.test(l.substring(r+1))||/^\s+\d+\.\s/.test(l.substring(r+1)),a=/^\s*(\d+\.|\s*[-*])\s+$/.test(l.substring(r+1));if(d||a){let e=t;return e=e.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),`<updated${i}>${e}</updated>`}return e}),n=function(e){const n=/<updated[^>]*>[\s\S]*?<\/updated>/gi,i=[];let t;const o=new RegExp(n.source,n.flags);for(;null!==(t=o.exec(e));){const e=t[0],n=e.match(/<deleted>([\s\S]*?)<\/deleted>/i),o=e.match(/<changed>([\s\S]*?)<\/changed>/i),l=e=>(e.match(/^\s*\d+\.\s/gm)||[]).length;i.push({index:t.index,endIndex:t.index+t[0].length,deletedItemCount:l((null==n?void 0:n[1])||""),changedItemCount:l((null==o?void 0:o[1])||"")})}if(0===i.length)return e;let l=e;for(let e=i.length-1;e>=0;e--){const n=i[e],t=n.changedItemCount-n.deletedItemCount;if(0===t)continue;const o=l.substring(0,n.index).split("\n").reverse();let r=!1;for(const e of o){const n=e.trim();if(""!==n){/^\d+\.\s/.test(n)&&(r=!0);break}}if(!r)continue;const d=n.endIndex,a=e+1<i.length?i[e+1].index:l.length;let s=l.substring(d,a);s=s.replace(/^(\s*)(\d+)\.\s/gm,(e,n,i)=>`${n}${parseInt(i,10)+t}. `),l=l.substring(0,d)+s+l.substring(a)}return l}(n),n=function(e){let n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),`<deleted>${i}</deleted>`});return n=n.replace(/<changed>([\s\S]*?)<\/changed>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),`<changed>${i}</changed>`}),n}(n),n=q(n),n},Xe=a(()=>o?Ke(o):o,[o]);s(()=>{ze(V||Se)},[V,Se]);const Ye=a(()=>{const o=Boolean(null==Ue?void 0:Ue.negateList),l=(e,n)=>{let i=0;return t.Children.map(e,e=>{if(!t.isValidElement(e))return e;const o=n(i);return i+=1,t.cloneElement(e,{"data-list-marker":o})})};return{span:({node:n,children:i,...t})=>{var o,l,r,d,a;const s=null!==(l=null===(o=null==n?void 0:n.properties)||void 0===o?void 0:o["highlight-id"])&&void 0!==l?l:null==t?void 0:t["highlight-id"],c="string"==typeof s&&Be.has(s),u=null!==(d=null===(r=null==n?void 0:n.properties)||void 0===r?void 0:r["highlight-color"])&&void 0!==d?d:null==t?void 0:t["highlight-color"];return e("span",{style:{...null!==(a=null==ne?void 0:ne.span)&&void 0!==a?a:{},...c?{backgroundColor:u||"#fef08a"}:{}},children:i})},button:({node:i,children:t,...o})=>{var l,r,d,a,s,c;const u=null!==(r=null===(l=null==i?void 0:i.properties)||void 0===l?void 0:l.action)&&void 0!==r?r:null==o?void 0:o.action,p=null!==(a=null===(d=null==i?void 0:i.properties)||void 0===d?void 0:d["highlight-id"])&&void 0!==a?a:null==o?void 0:o["highlight-id"],h=null!==(c=null===(s=null==i?void 0:i.properties)||void 0===s?void 0:s["highlight-type"])&&void 0!==c?c:null==o?void 0:o["highlight-type"];return"highlight"===u?e(M,{highlightId:p,handleHighlightSpan:Ge,icon:"web"===h?null==Ee?void 0:Ee.webCitationIcon:"doc"===h?null==Ee?void 0:Ee.fileCitationIcon:e(n,{}),customStyles:"web"===h?null==ne?void 0:ne.webButton:"doc"===h?null==ne?void 0:ne.docButton:{}}):null},upt:({node:i,children:t,...o})=>{var l,r;const d=null==o?void 0:o.id,a=d?null===(r=null===(l=d.split("$"))||void 0===l?void 0:l[1])||void 0===r?void 0:r.replaceAll("@","<").replaceAll("#",">"):null,s=Se.find(e=>e.id.toString()===a);if(!s)return t||e(n,{});const c="data-main"in o,u=o["data-status"];return e(n,{children:e(j,{aiReason:s,customStyles:null==ne?void 0:ne.inlineUpdatedComponent,handleClickCognitiveDecision:null==we?void 0:we.handleClickCognitiveDecision,handleClickUpdatedPill:null==we?void 0:we.handleClickUpdatedPill,handleClickOutputValue:null==we?void 0:we.handleClickOutputValue,customIcons:null==we?void 0:we.customIcons,CDNeededInChip:he,showWaitingIconInChip:ve,showChip:c,status:u,containerRef:Ce,children:t||e(n,{})})})},del:({node:t,children:o,...l})=>{var r;const{cleanedChildren:d,extractedNodes:a}=ee(o,["ins"]);return i(n,{children:[e("span",{className:h.deleted,style:null!==(r=null==ne?void 0:ne.deleted)&&void 0!==r?r:{},...l,onClick:()=>{l.onclick&&l.onclick()},children:d}),a]})},ins:({children:t,...o})=>{var l;const{cleanedChildren:r,extractedNodes:d}=ee(t,["del"]);return console.log("LOG: Printing ins props",o),i(n,{children:[e("span",{className:h.inserted,style:null!==(l=null==ne?void 0:ne.inserted)&&void 0!==l?l:{},...o,onClick:()=>{o.onclick&&o.onclick()},children:r}),d]})},deleted:({children:n,...i})=>e("span",{style:{textDecorationLine:"line-through",textDecorationColor:"#dc2626",cursor:"pointer"},...i,onClick:e=>Qe(e,i),children:n}),changed:({children:n,...i})=>e("span",{style:{backgroundColor:"#f3e8ff",color:"#1e3a8a",padding:"1px 2px",borderRadius:"2px",cursor:"pointer"},...i,onClick:e=>Qe(e,i),children:n}),preserved:({children:n,...i})=>e("span",{className:h.preserved,style:null==ne?void 0:ne.preserved,...i,children:n}),manual:({children:i,...t})=>{var o;const l=null===(o=null==t?void 0:t.id)||void 0===o?void 0:o.replaceAll("@","<").replaceAll("#",">"),r=Se.find(e=>e.id.toString()===l),d=t["data-status"];return r?e(E,{aiReason:r,handleClick:null==je?void 0:je.handleClick,status:d,children:i}):i||e(n,{})},invisible:({children:i,...t})=>e(n,{}),h1:({node:n,...i})=>e("h1",{className:h.heading1,style:null==ne?void 0:ne.heading1,children:i.children}),h2:({node:n,...i})=>e("h2",{className:h.heading2,style:null==ne?void 0:ne.heading2,children:i.children}),h3:({node:n,...i})=>e("h3",{className:h.heading3,style:null==ne?void 0:ne.heading3,children:i.children}),b:({node:n,...i})=>e("b",{className:h.bold,style:null==ne?void 0:ne.bold,children:null==i?void 0:i.children}),p:({node:n,...i})=>e("p",{...i,className:h.paragraph,style:null==ne?void 0:ne.paragraph,children:i.children}),updated:({node:n,...i})=>e(C,{...i,showUserStoryDiff:O,currentUpdatedTagId:Te,setCurrentUpdatedTagId:De,userStory:ye,setUserStory:Ie,setAiReasoning:Re,node:n,isCraflow:de,onCraAccept:ae,onCraReject:se,diffEditConfig:Le,customStyles:null==ne?void 0:ne.updatedContent,craFlowConfig:ce}),ol:({node:n,...i})=>{var t,r,d;const a=null!==(d=null!==(r=null===(t=null==n?void 0:n.properties)||void 0===t?void 0:t.start)&&void 0!==r?r:null==i?void 0:i.start)&&void 0!==d?d:void 0,s=Number(null!=a?a:1);return o?e("div",{role:"list",className:h.negatedOrderedList,style:null==ne?void 0:ne.olist,children:l(i.children,e=>`${s+e}.`)}):e("ol",{className:h.orderedList,style:null==ne?void 0:ne.olist,...a?{start:Number(a)}:{},children:null==i?void 0:i.children})},ul:({node:n,...i})=>o?e("div",{role:"list",className:h.negatedUnorderedList,style:null==ne?void 0:ne.ulist,children:l(i.children,()=>"•")}):e("ul",{className:h.unorderedList,style:null==ne?void 0:ne.ulist,children:null==i?void 0:i.children}),li:({node:n,...t})=>{if(o){const e=t["data-list-marker"],{children:n,"data-list-marker":o,...l}=t;return i("div",{...l,role:"listitem",className:`${h.paragraph} ${h.negatedListItem}`,style:null==ne?void 0:ne.paragraph,children:[e&&i("span",{className:h.negatedListMarker,children:[e," "]}),n]})}return e("li",{children:null==t?void 0:t.children})},table:({children:n})=>e("div",{className:h.tableWrapper,children:e("table",{className:h.table,style:null==ne?void 0:ne.table,children:n})}),tr:({node:n,children:i})=>e(F,{node:n,children:i,customStyles:ne}),td:({node:n,children:i})=>{var t;const{style:o,...l}=null!==(t=null==n?void 0:n.properties)&&void 0!==t?t:{};return e(_.Provider,{value:!0,children:e("td",{...l,style:o?{cssText:o}:void 0,children:i})})},th:({node:n,children:i})=>{var t;const{style:o,...l}=null!==(t=null==n?void 0:n.properties)&&void 0!==t?t:{};return e(_.Provider,{value:!0,children:e("th",{...l,style:o?{cssText:o}:void 0,children:i})})},recommendation:({node:n,...i})=>{var t;const o=`The AI has selected this content based on: ${(null===(t=null==i?void 0:i.children)||void 0===t?void 0:t[0])||""}`;return e(N,{...i,customStyles:null==ne?void 0:ne.recommendationBlock,label:o})},a:({inline:n,children:i,node:t,...o})=>{var l;const r=c(_)||"true"===(null==o?void 0:o.table),d=`${null==o?void 0:o.href}`,[a,s]=d.split("$"),u=null==s?void 0:s.split("?")[0];if("ai_reasoning"===a){const n=(null!==(l=O?oe:Se)&&void 0!==l?l:[]).find(e=>e.id.toString()===decodeURIComponent(u)),t=Ne.includes(u);if(n){if(r)return e(B,{aiReason:n,customStyle:null==ne?void 0:ne.tableAiReasoning,customIcons:Ee,isHighConfidence:n.relevance_score>=$});const o=Je(i),l="source"!==o.trim().toLowerCase();return e(R,{aiReason:n,isSourceHasHighlight:t,inlineLabel:o,isInlineCitation:l,customIcons:Ee,customStyles:{aiReasoningContent:null==ne?void 0:ne.aiReasoningContent,aiReasoningAccordion:null==ne?void 0:ne.aiReasoningAccordion,aiReasoningMarkdown:null==ne?void 0:ne.aiReasoningMarkdown,aiReasoningPill:null==ne?void 0:ne.aiReasoningPill,webCitation:null==ne?void 0:ne.webCitation,stormeeCitation:null==ne?void 0:ne.stormeeCitation,waveformCitation:null==ne?void 0:ne.waveformCitation,imageCitation:null==ne?void 0:ne.imageCitation,fileCitation:null==ne?void 0:ne.fileCitation,appModCitation:null==ne?void 0:ne.appModCitation,rcaCitation:null==ne?void 0:ne.rcaCitation,readFileCitation:null==ne?void 0:ne.readFileCitation,loadingCitations:null==ne?void 0:ne.loadingCitations,chatCitation:null==ne?void 0:ne.chatCitation,bigEnoughCitation:null==ne?void 0:ne.bigEnoughCitation}})}}return null},code:({inline:n,children:i,className:t,node:o,...l})=>/language-(\w+)/.exec(t||"")||(null==t?void 0:t.includes("language-"))?e("div",{children:e("code",{className:h.blockCode,style:null==ne?void 0:ne.code,children:i})}):e("code",{className:h.inlineCode,style:null==ne?void 0:ne.code,children:i}),learned:({children:n})=>e(v,{title:n,placement:"top",children:e(m,{size:16,className:h.learned})}),generatedcode:({node:n,...i})=>{const t=(null==i?void 0:i.language)||"python",o=(e=>{let n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{const i=e=>{var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n})(i);return e(y,{title:"Generated Code",code:o,language:t,customStyles:{pill:null==ne?void 0:ne.generatedCodePill,content:null==ne?void 0:ne.generatedCodeContent}})},updatedsegment:({node:n,children:i,...t})=>{var o,l,r,d;const a=`${null===(o=n.position)||void 0===o?void 0:o.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(r=n.position)||void 0===r?void 0:r.end.line}-${null===(d=n.position)||void 0===d?void 0:d.end.column}`,s=(e=>{if(!e["data-raw"])return null;try{return decodeURIComponent(atob(e["data-raw"]))}catch(e){return console.error("Error decoding segment raw content:",e),null}})(t),c=e("div",s?{dangerouslySetInnerHTML:{__html:f.sanitize(s)}}:{children:i});return e(L,{id:a,node:n,children:c,props:t,segmentComponentConfig:Ae,customStyles:ne,customIcons:ie,extractText:Je,isUpdatedSegment:!0})},segment:({node:n,children:i,...t})=>{var o,l,r,d;const a=`${null===(o=n.position)||void 0===o?void 0:o.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(r=n.position)||void 0===r?void 0:r.end.line}-${null===(d=n.position)||void 0===d?void 0:d.end.column}`;return e(L,{id:a,node:n,children:i,props:t,segmentComponentConfig:Ae,customStyles:ne,customIcons:ie,extractText:Je,blockId:ge,storyId:me})}}},[qe,ce,Se,le,Te,O,o,ie,xe,Ne,ne,Ae,Be,Ge,Qe,ge,me,null==Ue?void 0:Ue.negateList]),Ze=a(()=>{let e=P(Xe,["manual","upt"]);return["del","ins","preserved","manual","upt"].forEach(n=>{e=T(e,n,"upt"===n)}),e},[Xe]);return s(()=>{if(!Ce.current)return;if(!xe.length)return void Pe();let e;if(0===Ne.length||ue)requestAnimationFrame(()=>{Me([xe[ke].replace(/\*/g,"")])});else{const n=Ce.current,i=new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{i.disconnect(),requestAnimationFrame(()=>{Me([xe[ke].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return()=>{clearTimeout(e)}},[xe,Ne,ke,ue]),e(H.Provider,{value:{expandedInfo:_e,setExpanded:Oe,reasonToRow:We},children:i("div",{ref:Ce,className:`${h.container} ${"approving"!==W?h.wrapper:""} ${K||""}`,style:null==ne?void 0:ne.container,children:[S?e(U,{children:e(u,{components:Ye,rehypePlugins:[p],children:Ze})}):I,Ve>0&&pe&&e("div",{className:h.confidenceScoreContainer,style:null==ne?void 0:ne.confidenceScoreContainer,children:i("span",{className:h.confidenceScore,style:null==ne?void 0:ne.confidenceScore,children:[e(x,{size:14,color:(null==ne?void 0:ne.confidenceScoreIconColor)||"#166534"}),Ve,"%"]})}),J&&e("div",{className:h.citationLoader,style:null==ne?void 0:ne.citationLoaderContainer,children:e(w,{customStyles:{container:null==ne?void 0:ne.citationLoadingContainer,icon:null==ne?void 0:ne.citationLoadingIcon,text:null==ne?void 0:ne.citationLoadingText}})}),A&&e("div",{style:{...null===(fe=null==ne?void 0:ne.attachedContext)||void 0===fe?void 0:fe.wrapper},className:"flex mt-5",children:e(k,{customStyles:null==ne?void 0:ne.attachedContext,variant:te})})]})})};export{ne as default,ee as splitNestedDiffNodes};
|
|
2
2
|
//# sourceMappingURL=UserStoryWithCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var t={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC",negatedOrderedList:"UserStoryWithCitation-module_negatedOrderedList__RZDGe",negatedUnorderedList:"UserStoryWithCitation-module_negatedUnorderedList__ZTOPu",negatedListItem:"UserStoryWithCitation-module_negatedListItem__pcJY9",negatedListMarker:"UserStoryWithCitation-module_negatedListMarker__yWtUn"};!function(){if("undefined"==typeof document)return;const t=document.createElement("style");t.type="text/css";const e=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#f0f2f5;border-radius:.3rem;box-sizing:border-box;color:#323232;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{-webkit-overflow-scrolling:touch;box-sizing:border-box;margin:16px 0;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border:1px solid #d1d5db;border-collapse:collapse;box-sizing:border-box;font-family:Inter,sans-serif;font-size:.95rem;line-height:1.45rem;margin:0;min-width:100%;table-layout:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd td,.UserStoryWithCitation-module_table__tEyKd th{border:1px solid #d1d5db;color:#111827;overflow-wrap:break-word;padding:8px 10px;vertical-align:top;white-space:normal;word-break:normal}.UserStoryWithCitation-module_table__tEyKd th{background:#f3f4f6;font-weight:700;white-space:nowrap}.UserStoryWithCitation-module_table__tEyKd td[align=center],.UserStoryWithCitation-module_table__tEyKd th[align=center]{text-align:center}.UserStoryWithCitation-module_table__tEyKd td[align=right],.UserStoryWithCitation-module_table__tEyKd th[align=right]{text-align:right}.UserStoryWithCitation-module_table__tEyKd tr:nth-child(2n) td{background:#fafafa}.UserStoryWithCitation-module_table__tEyKd p{margin:0}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{background-color:#fff;text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{background-color:#fff;text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}.UserStoryWithCitation-module_negatedOrderedList__RZDGe,.UserStoryWithCitation-module_negatedUnorderedList__ZTOPu{margin:0;padding:0}.UserStoryWithCitation-module_negatedListItem__pcJY9{display:block;margin:0;padding:0}.UserStoryWithCitation-module_negatedListMarker__yWtUn{display:inline;font:inherit}.UserStoryWithCitation-module_negatedListItem__pcJY9>p:first-of-type{display:inline;margin:0}.UserStoryWithCitation-module_negatedListItem__pcJY9>.UserStoryWithCitation-module_negatedListMarker__yWtUn+span{display:inline!important;margin:0!important;width:auto!important}.UserStoryWithCitation-module_negatedListItem__pcJY9>.UserStoryWithCitation-module_negatedListMarker__yWtUn+span>span:not([class*=_hoverActions_]){display:inline!important;width:auto!important}'));const i=document.head||document.getElementsByTagName("head")[0]||document.documentElement;i&&i.appendChild(t)}();export{t as default};
|
|
2
2
|
//# sourceMappingURL=UserStoryWithCitation.module.css.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as l,Fragment as n}from"react/jsx-runtime";import{Divider as o,CircularProgress as i}from"@mui/material";import{hexToOpacity as t}from"../../../utils/css.utils.js";import r from"./InlineUpdatedComponent.module.css.js";import d from"../../../icons/CognitiveDecision.js";import{Check as a,X as s,Undo2 as c,Hourglass as u,ChevronDown as v}from"lucide-react";import{useRef as p,useState as m,useCallback as g,useLayoutEffect as
|
|
1
|
+
import{jsx as e,jsxs as l,Fragment as n}from"react/jsx-runtime";import{Divider as o,CircularProgress as i}from"@mui/material";import{hexToOpacity as t}from"../../../utils/css.utils.js";import r from"./InlineUpdatedComponent.module.css.js";import d from"../../../icons/CognitiveDecision.js";import{Check as a,X as s,Undo2 as c,Hourglass as u,ChevronDown as v}from"lucide-react";import{useRef as p,useState as m,useCallback as g,useLayoutEffect as f}from"react";const h=({aiReason:h,children:C,customStyles:y,handleClickCognitiveDecision:w,handleClickUpdatedPill:b,handleClickOutputValue:N,customIcons:S,CDNeededInChip:k=!0,showWaitingIconInChip:I=!1,showChip:D,status:P,containerRef:_})=>{var W,$,z,A,R,j,x,L,T,E,M,O,U,q,B,F,H,V,G;const J=p(null),K=p(null),[Q,X]=m(null),Y=g(()=>{var e;const l=K.current,n=(null===(e=J.current)||void 0===e?void 0:e.offsetParent)||(null==l?void 0:l.offsetParent);if(!(l&&n instanceof HTMLElement))return;const o=l.getBoundingClientRect(),i=n.getBoundingClientRect(),t=o.top-i.top+o.height/2;X(e=>null!==e&&Math.abs(e-t)<.5?e:t)},[]);f(()=>{Y()}),f(()=>{var e,l;if("undefined"==typeof window)return;const n=window.requestAnimationFrame(Y);window.addEventListener("resize",Y);const o="undefined"!=typeof ResizeObserver?new ResizeObserver(Y):null;K.current&&(null==o||o.observe(K.current));const i=(null===(e=J.current)||void 0===e?void 0:e.offsetParent)||(null===(l=K.current)||void 0===l?void 0:l.offsetParent);return i instanceof HTMLElement&&(null==o||o.observe(i)),()=>{window.cancelAnimationFrame(n),window.removeEventListener("resize",Y),null==o||o.disconnect()}},[Y]);const Z="pending"!==P?"#303030":null===(z=null===($=null===(W=h.redlining_details)||void 0===W?void 0:W.evaluation_outputs)||void 0===$?void 0:$.metadata)||void 0===z?void 0:z.label_color,ee={color:Z||"#000000",background:t(Z||"#000000",25),border:`1px solid ${t(Z||"#000000",75)}`},le=Z||"#000000",ne=t(Z||"#000000",25),oe={background:t(Z||"#000000",75),...null==y?void 0:y.dividerStyle};let ie=null;"accepted"===P?ie=null!==(A=null==S?void 0:S.accepted)&&void 0!==A?A:e(a,{color:"#16A34A"}):"rejected"===P?ie=null!==(R=null==S?void 0:S.rejected)&&void 0!==R?R:e(s,{color:"#DC2626"}):"reverted"===P&&(ie=null!==(j=null==S?void 0:S.reverted)&&void 0!==j?j:e(c,{color:"#475569"}));const te=null===Q?{}:{"--inline-update-anchor-top":`${Q}px`},re=null===Q?"":` ${r.anchorAligned}`;return l("span",{className:r.inlineUpdatedWrapper,children:[D&&l(n,{children:[ie&&e("span",{className:`${r.resolvedStatus}${re}`,style:{...te,...null==y?void 0:y.resolvedIcon},children:ie}),e("span",{ref:J,id:h.id.toString(),"data-ai-reason-id":h.id.toString(),onClick:e=>{e.stopPropagation(),null==b||b(e.currentTarget,h)},className:`${r.pillWrapper}${re}`,style:{...te,...null==y?void 0:y.pillStyleWrapper},children:l("span",{className:r.pillComponent,style:{...ee,...null===(x=null==y?void 0:y.pillComponent)||void 0===x?void 0:x.commonStyle},children:[e("span",{children:(null===(E=null===(T=null===(L=h.redlining_details)||void 0===L?void 0:L.evaluation_outputs)||void 0===T?void 0:T.metadata)||void 0===E?void 0:E.label_text)||""}),e(o,{className:r.dividerStyle,style:oe}),I&&"pending"===P&&l(n,{children:[e("span",{className:r.waitingIconWrapper,style:{color:Z},title:"Waiting",children:e(u,{size:16})}),e(o,{className:r.dividerStyle,style:oe})]}),e("span",{className:r["output-container"],onClick:e=>{N&&(e.stopPropagation(),null==N||N(e.currentTarget,h))},children:h.resolving?e(i,{size:(null===(M=null==y?void 0:y.loader)||void 0===M?void 0:M.size)||18,"aria-label":"Loading…",sx:{color:(null===(O=null==y?void 0:y.loader)||void 0===O?void 0:O.color)||Z}}):"pending"!==P?ie:null===(q=null===(U=null==h?void 0:h.redlining_details)||void 0===U?void 0:U.evaluation_outputs)||void 0===q?void 0:q.output_value}),k&&l(n,{children:[e(o,{className:r.dividerStyle,style:oe}),e("span",{onClick:e=>{e.stopPropagation(),null==w||w(e.currentTarget,h)},className:r.cognitiveDecisionWrapper,style:null===(B=null==y?void 0:y.cognitiveDecisionIcon)||void 0===B?void 0:B.wrapper,children:e(d,{color:(null===(F=null==y?void 0:y.cognitiveDecisionIcon)||void 0===F?void 0:F.color)||le,backgroundColor:(null===(H=null==y?void 0:y.cognitiveDecisionIcon)||void 0===H?void 0:H.backgroundColor)||ne})}),e("span",{className:r.chevronWrapper,style:null===(V=null==y?void 0:y.Chevron)||void 0===V?void 0:V.wrapper,children:e(v,{color:(null===(G=null==y?void 0:y.Chevron)||void 0===G?void 0:G.color)||Z})})]})]})})]}),e("span",{ref:K,className:r[`upt-${P}`],onClick:e=>{var l,n,o;e.preventDefault(),e.stopPropagation();const i=h.id.toString(),t=null!==(l=J.current)&&void 0!==l?l:Array.from(null!==(o=null===(n=_.current)||void 0===n?void 0:n.querySelectorAll("[data-ai-reason-id]"))&&void 0!==o?o:[]).find(e=>e.dataset.aiReasonId===i);t&&(null==b||b(t,h))},children:C})]})};export{h as default};
|
|
2
2
|
//# sourceMappingURL=InlineUpdatedComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useRef as
|
|
1
|
+
import{useState as e,useRef as i,useEffect as t}from"react";import{processAIReasoningFromBlocks as o}from"../utils/proccess-stream.utils.js";function n({setUserStory:n,setAiReasoning:r,setUserStoryCitations:s,onStreamingCompleted:a,isGraphQLCallInProgress:l,knowledgeBase:u,projectAnalyserSummary:c,dataSourceFiles:d,aiReasoning:p,setRedisValue:_,fetchCitationByBlock:m}){const[g,f]=e({finalGap:"",finalRisk:"",status:"in-progress"}),b=i(new Set),v=i(new Set),h=i(null),k=i(null),y=i({gap_items_prompt:"",risk_items_prompt:""}),N=i(new Set);return t(()=>{"complete"!==g.status||l||(a(g.finalGap,g.finalRisk),b.current.clear(),v.current.clear(),h.current=null,k.current=null,y.current={gap_items_prompt:"",risk_items_prompt:""},N.current.clear(),f({finalGap:"",finalRisk:"",status:"in-progress"}))},[g,l]),{processStreamContent:function(e,i,t){try{const a=JSON.stringify(e);if(k.current===a)return;k.current=a;let l=[],g=[];e=e.map(e=>{var t;const n=`${(e={...e,subBlockNumber:null!==(t=e.subBlockNumber)&&void 0!==t?t:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(N.current.has(n))return null;N.current.add(n);let{outputText:a,reasonings:u,gpt_citation:c,processedDescription:d}=o(e.value,e.blockNumber,e.storyNumber,e.description);s(e=>{var i;return c.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(i=e.gpt_citations)||void 0===i||i.push(...c)),{...e}}),l.push(...u),g.push([...u]);const p=u.filter(e=>e.on_demand).flatMap(e=>[...e.reason.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g),...e.gap.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g)].map(e=>{const[i,t]=e[1].split("$");return"book_citation_doc"!==i&&"book_citation_pdf"!==i&&"document_citation"!==i?null:{citation_number:t,customMetadata:{type:"document_citation"===i?"book_citation_pdf":i,file_name:"",fileType:"",gcs_upload_url:""}}}).filter(Boolean));p.length&&s(e=>{var i;return{...e,file_citations:[...null!==(i=e.file_citations)&&void 0!==i?i:[],...p]}});let _=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return b.current.has(_)||(!async function(e,i,t){var o,n;let a="",l="";try{const u=await m(e,t,i);r(e=>{var i;const t=[...e];return null===(i=u.response.ai_reasonings)||void 0===i||i.forEach(e=>{const i=t.findIndex(i=>i.id===e.id);-1!==i&&e.gap.length>0&&e.reason.length>0&&(t[i]={...e})}),t}),a=(null===(o=u.response)||void 0===o?void 0:o.gap_items_prompt)||"",l=(null===(n=u.response)||void 0===n?void 0:n.risk_items_prompt)||"",(a||l)&&(y.current={gap_items_prompt:a,risk_items_prompt:l}),s(e=>{var i,t,o,n,r,s,a,l,c,d,p,_,m,g;return{...e,appmod_citations:[...null!==(i=e.appmod_citations)&&void 0!==i?i:[],...null!==(t=u.response.appmod_citations)&&void 0!==t?t:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=u.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(r=e.file_citations)&&void 0!==r?r:[],...null!==(s=u.response.file_citations)&&void 0!==s?s:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=u.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=u.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=u.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=u.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(i){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,i)}finally{let i=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(v.current.add(i),v.current.size===b.current.size){const e=a||y.current.gap_items_prompt,i=l||y.current.risk_items_prompt;f({finalGap:e,finalRisk:i,status:"complete"})}}}({...e,value:a,description:d},u,i),b.current.add(_)),{...e,value:a,description:d}}).filter(Boolean),l.forEach(e=>{r(i=>(i.find(i=>i.id===e.id)||i.push(e),[...i]))}),e.length>0&&e.map(({title:e,section:i,value:o,storyNumber:r,description:s,blockNumber:a,big_enough:l,big_enough_decision_factors:m,gapValue:f,confidenceScore:b,metadata:v},k)=>{n(n=>{var y,N,S,R,B,$,C,w;const O=n.findIndex(e=>e.storyNumber===r);if("intro"===i)-1===O?n.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,description:s,storyNumber:r,sub_features:[],section:i,blockNumber:a,aiReasoning:g[k],big_enough:l,big_enough_decision_factors:m,gapValue:f,confidenceScore:b,metadata:v}):(n[O].value+=o,n[O].aiReasoning=n[O].aiReasoning||[],null===(N=null===(y=n[O])||void 0===y?void 0:y.aiReasoning)||void 0===N||N.push(...g[k]),n[O].big_enough=l,n[O].big_enough_decision_factors=m,n[O].gapValue=f,n[O].confidenceScore=b,n[O].metadata=v);else{n[O].sub_features||(n[O].sub_features=[]);const t=(null===(R=null===(S=n[O])||void 0===S?void 0:S.sub_features)||void 0===R?void 0:R.findIndex(e=>e.blockNumber===a))||-1;if(-1===t)null===($=null===(B=n[O])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${r}-${a}`,title:e,value:o,storyNumber:r,blockNumber:a,section:i,aiReasoning:g[k],big_enough:l,big_enough_decision_factors:m,gapValue:f,confidenceScore:b,metadata:v});else{let e=null===(w=null===(C=null==n?void 0:n[O])||void 0===C?void 0:C.sub_features)||void 0===w?void 0:w[t];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...g[k]),e.big_enough=l,e.big_enough_decision_factors=m,e.gapValue=f,e.confidenceScore=b,e.metadata=v}}const E=JSON.stringify(n);return h.current!==E&&(_({key:`streaming-redis-key-${t}`,value:{mmvf_list:n,knowledgeBase:u,projectAnalyserSummary:c,dataSources_files:d,ai_reasonings:p}}),h.current=E),[...n]})})}catch(e){console.error("Error in processing Stream Content",e)}}}}export{n as useStreamContentHandler};
|
|
2
2
|
//# sourceMappingURL=useStreamContentHandler.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
function r(r){try{return r}catch(r){console.error("Error in formatMarkdown",r)}}function e(r){return r.includes("Acceptance Criteria")?r=null==(r=null==(r=null==(r=null==r?void 0:r.replace(/\\n/g,"\n"))?void 0:r.replace(/(\*\*.+?\*\*)\s*:/g,"\n$1:\n"))?void 0:r.replace(/(?<!\d)(\d+(?:\.\d+)+)\./g,(r,e)=>{const n=e.split(".");return`${" ".repeat(n.length-1)}${e}.`}))?void 0:r.replace(/([^\n])\n(?![\n\*#])/g,"$1<br>\n"):r}const n=r=>{if(!r)return"";r=(r=(r=(r=(r=r.replace(/%&&%[\s\S]*?%&&%/g,"")).replace(/<!--[\s\S]*?-->/g,"")).replace(/<crredirection[^>]*>[\s\S]*?<\/crredirection>/gi,"")).replace(/<answerExample[^>]*>[\s\S]*?<\/answerExample>/gi,"")).replace(/<a\s+data-cognitive-reasoning[^>]*>[\s\S]*?<\/a>/gi,"");return["b","strong","i","em","u","ol","ul","li","p","div","span","h1","h2","h3","h4","h5","h6","highlight","br","hr"].forEach(e=>{const n=new RegExp(`</?${e}[^>]*>`,"gi");r=r.replace(n,"")}),r=(r=(r=(r=(r=r.replace("ð","")).replace(/\*\*/g,"")).replace(/\n/g," ")).replace(/\s+/g," ")).trim()},t=r=>{const e=(new DOMParser).parseFromString(r,"text/html");return Array.from(e.querySelectorAll('a[href^="ai_reasoning$"]')).map(r=>r.getAttribute("href").replace("ai_reasoning$",""))},a=r=>{const e=(new DOMParser).parseFromString(r,"text/html");return e.querySelectorAll('a[href^="ai_reasoning$"]').forEach(r=>{r.remove()}),e.body.innerHTML.trim()},i=(r="",e)=>{const n=r.split("?")[1]||"";if(!n)return"";try{return new URLSearchParams(n).get(e)||""}catch(r){return console.error("Failed to parse citation href query params",r),""}},o=["rulebook_citation","il_rulebook_citation","rulebook_chunk"];export{t as extractAllAiReasoningIds,r as formatMarkdown,i as getHrefQueryParam,o as guidelineCitationTypes,e as indentMarkdown,a as stripAiReasoningAnchors,n as stripHtmlAndMetadata};
|
|
2
2
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=e=>{const
|
|
1
|
+
const e=e=>{const n=[];try{const t="<BLOCK_STREAM_START>",i="<BLOCK_STREAM_END>";let o=0;for(;;){const r=e.indexOf(t,o);if(-1===r)break;const s=e.indexOf(i,r+t.length);if(-1===s)break;const c=e.slice(r+t.length,s).trim();n.push(JSON.parse(c)),o=s+i.length}}catch(e){console.error("Error in extracting blocks from stream",e)}finally{return n}},n=e=>e.replace(/<onDemandCitation\s+type=(?:\\"|")([^"]+)(?:\\"|")\s+citationNo=(?:\\"|")(\d+)(?:\\"|")\s*(?:\/>|><\/onDemandCitation>)/g,(e,n,t)=>`<a href="${n}$${t}?type=on_demand">Source</a>`);function t(e,t,r,s){const c=[];let a="";const l=[];let u="";console.log("RAW INPUT",JSON.stringify(e),JSON.stringify(s));try{const d=e=>e.replace(/<a\s+(?:(table="true")\s+)?href=(\\"|")ai_reasoning\$(\d+)(\?[^\\"]*)?(\\"|")>([\s\S]*?)<\/a>/g,(e,s,a,u,d,f,h)=>{var p,g,_,m,$;const b=`${u}<BLOCK_NUMBER>${t}<STORY_NUMBER>${r}`,v=!!d&&d.includes("type=on_demand"),O=function(e){const n=new Map,t="<gpt_citation ",i="</gpt_citation>";let o=0;for(;;){const r=e.indexOf(t,o);if(-1===r)break;const s=e.indexOf(">",r);if(-1===s)break;const c=e.indexOf(i,s);if(-1===c)break;const a=e.slice(r,c+i.length),l=e.slice(r,s+1),u=l.indexOf("id=");if(-1!==u){let e=u+3;"\\"===l[e]&&e++,'"'!==l[e]&&"'"!==l[e]||e++;let t="";for(;e<l.length&&/\d/.test(l[e]);)t+=l[e++];t&&n.set(t,a)}o=c+i.length}return n}(h);console.log("RAW INPUT",O);const S=h.match(/<reason(?:\s+source="([^"]*)")?>([\s\S]*?)<\/reason>/),T=h.match(/<gap(?:\s+source="([^"]*)")?>([\s\S]*?)<\/gap>/),x=h.match(/<relevance_score>([\s\S]*?)<\/relevance_score>/);let y=(null===(p=null==S?void 0:S[2])||void 0===p?void 0:p.trim())||"",N=(null===(g=null==T?void 0:T[2])||void 0===g?void 0:g.trim())||"";y=n(y),N=n(N),y=i(y,b),N=i(N,b),O.forEach((e,n)=>{const t=`${b}<GPT_CITATION_ID>${n}`;l.push(o(e,t))}),c.push({id:b,reason:y,reasonSource:(null===(_=null==S?void 0:S[1])||void 0===_?void 0:_.trim())||"",gap:N,gapSource:(null===(m=null==T?void 0:T[1])||void 0===m?void 0:m.trim())||"",relevance_score:Number(null===($=null==x?void 0:x[1])||void 0===$?void 0:$.trim())||0,on_demand:v});return`<a ${s?'table="true"':""} href=${a}ai_reasoning$${b}${d||""}${f}>Source</a>`});a=d(e),s&&(u=d(s))}catch(n){console.error("Error in extracting AI Reasoning from this block:",e)}finally{return{outputText:a,reasonings:c,gpt_citation:l,processedDescription:u}}}function i(e,n){if(!e)return e;let t="",i=0;for(;;){const o=e.indexOf("<gpt_citation_here ",i);if(-1===o){t+=e.slice(i);break}t+=e.slice(i,o);const r=e.indexOf(">",o);if(-1===r){t+=e.slice(o);break}const s=e.slice(o,r+1),c=s.indexOf("id=");let a="";if(-1!==c){let e=c+3;for("\\"===s[e]&&e++,'"'!==s[e]&&"'"!==s[e]||e++;e<s.length&&/\d/.test(s[e]);)a+=s[e++]}if(a){t+=`<a href="gpt_citation$${`${n}<GPT_CITATION_ID>${a}`}">Source</a>`}i=r+1}return t}function o(e,n){const t=n=>{const t=new RegExp(`<${n}>([\\s\\S]*?)<\\/${n}>`,"gi"),i=[];let o;for(;null!==(o=t.exec(e));)i.push(o[1].trim());return i},i=t("domain"),o=t("paraphrase");return{citation_number:n,customMetadata:{type:"gpt_citation",data_sources:t("data_sources"),training_data_title:i,paraphrase:o}}}const r=(e,n,t)=>{let i=e.includes("<h1><b>Title</b></h1>\n\n")?e:t?`<h1><b>Title</b></h1>\n\n${t} \n${e}`:e;return i=i.includes("<h1><b>Requirement Type</b></h1>\n\n")?i:n?`<h1><b>Requirement Type</b></h1>\n\n${n} \n${i}`:i,i};function s(e){try{const n=/<h2>\s*(?:<b>)?Description(?:<\/b>)?\s*<\/h2>\s*([\s\S]*?)(?=\s*<h2>|$)/i,t=e.match(n);if(t)return t[1].trim()}catch(e){}return null}export{e as extractBlockStreams,s as extractDescription,o as parseGptCitation,t as processAIReasoningFromBlocks,r as processUserStoryValue,i as replaceGptCitation};
|
|
2
2
|
//# sourceMappingURL=proccess-stream.utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as i}from"tslib";import{jsx as o,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useMemo as n,useState as l}from"react";import d from"@mui/icons-material/ChevronRight";import a from"@mui/icons-material/Close";import c from"@mui/icons-material/ExpandMore";import s from"@mui/material/Box";import u from"@mui/material/Button";import p from"@mui/material/ButtonBase";import m from"@mui/material/Divider";import h from"@mui/material/IconButton";import g from"@mui/material/Paper";import x from"@mui/material/Radio";import f from"@mui/material/Stack";import b from"@mui/material/TextField";import E from"@mui/material/Typography";import C from"./RevertSummaryNotice.js";import v from"./CognitiveIcon.js";import F from"./CognitiveScoreBadge.js";import S from"../../assests/icons/InfoAlert.js";var y,w=function(e,o){return i([e],Array.isArray(o)?o:null==o?[]:[o],!0)},R="MERGE_ADJACENT";!function(e){e.KEEP="KEEP",e.SPLIT_HERE="SPLIT_HERE",e.MERGE_NEXT="MERGE_NEXT",e.MERGE_PREV="MERGE_PREV",e.MERGE_PREVIOUS="MERGE_PREVIOUS",e.SET_RANGE="SET_RANGE"}(y||(y={}));var M=function(e){return Object.values(y).includes(e)},A=function(e,o,t,r){if(!o||!e)return[];var n=o.additional_decisions,l=Array.isArray(n)?n:n?Object.values(n).flat():[],d=Array.from(new Set(i(i([],o.allowed_decisions,!0),l,!0)));return d.flatMap(function(i){var o=e.focus_page,n=d.find(function(e){return e.toLowerCase().includes("merge")}),l=null!=o&&null!=t&&null!=r&&o===t&&o===r,a=null!=o&&null!=t&&o===t,c=null!=o&&null!=r&&(o===r||o===r+1),s=a||c||!(null!=o&&(!(null!=t&&null!=r)||o>t&&o<r));switch(i){case y.SET_RANGE:return[];case"KEEP":return[{id:i,title:"Keep as is",description:"Keep the current document boundary unchanged."}];case"SPLIT_HERE":return[{id:i,title:"Split to a separate document",description:s?"A valid page inside the document is required to split it.":o?"Start a new document at page ".concat(o,"."):"Create a new document at this boundary.",disabled:s}];case"MERGE_PREV":case"MERGE_NEXT":case"MERGE_PREVIOUS":return i!==n?[]:l?[{id:R,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]:a?[{id:y.MERGE_PREVIOUS,title:"Merge with previous document",description:"Combine this document with the previous document."}]:c?[{id:y.MERGE_NEXT,title:"Merge with next document",description:"Combine this document with the next document."}]:[{id:R,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]}return[]})};function I(i){var I=i.headerName,T=void 0===I?"Boundary Check":I,z=i.title,W=i.pageNo,k=i.content,P=i.revertSummary,_=i.cognitiveScore,N=i.config,G=i.metadata,B=i.previousSegmentTitle,D=i.nextSegmentTitle,H=i.selectedIndex,j=i.defaultSelectedIndex,O=void 0===j?null:j,V=i.defaultStartPage,L=i.defaultEndPage,U=i.onSelectionChange,X=i.onConfirm,K=i.onActionConfirm,$=i.onCognitiveClick,q=i.onAdjustManually,J=i.onClose,Y=i.confirmLabel,Q=void 0===Y?"Confirm":Y,Z=i.manualPrompt,ee=void 0===Z?"Didn't find the right option?":Z,ie=i.manualActionLabel,oe=void 0===ie?"Adjust Manually":ie,te=i.cognitiveLabel,re=void 0===te?"Cognitive Integrity":te,ne=i.showAdjustManually,le=void 0===ne||ne,de=i.showCognitiveIntegrity,ae=void 0===de||de,ce=i.showCloseButton,se=void 0===ce||ce,ue=i.confirmDisabled,pe=void 0!==ue&&ue,me=i.width,he=void 0===me?260:me,ge=i.maxWidth,xe=void 0===ge?260:ge,fe=i.className,be=i.styles,Ee=i.reviewAction,Ce=i.totalPages;console.log("LOG: Total pages",Ce);var ve=n(function(){return(null!=N?N:G?A(G,Ee,V,L):[]).filter(function(e){return e.id!==y.SET_RANGE})},[N,L,V,G,Ee]),Fe=l(O),Se=Fe[0],ye=Fe[1],we=l(null==V?"":String(V)),Re=we[0],Me=we[1],Ae=l(null==L?"":String(L)),Ie=Ae[0],Te=Ae[1],ze=l(!1),We=ze[0],ke=ze[1],Pe=l(!1),_e=Pe[0],Ne=Pe[1],Ge=l(null),Be=Ge[0],De=Ge[1],He=l(!1),je=He[0],Oe=He[1],Ve=void 0===H?Se:H,Le=null==Ve?void 0:ve[Ve],Ue=(null==Le?void 0:Le.id)===R,Xe=null!=B,Ke=null!=D,$e=function(e){return!0===e.disabled||e.id===y.MERGE_PREV&&!Xe||e.id===y.MERGE_PREVIOUS&&!Xe||e.id===y.MERGE_NEXT&&!Ke||e.id===R&&!Xe&&!Ke},qe=Number(Re),Je=Number(Ie),Ye=Re.trim().length>0&&Ie.trim().length>0&&Number.isInteger(qe)&&Number.isInteger(Je)&&qe>0&&Je>0,Qe=null!=Ce&&qe>Ce,Ze=null!=Ce&&Je>Ce,ei=Re.trim().length>0&&Ie.trim().length>0&&Number.isInteger(qe)&&Number.isInteger(Je)&&qe>Je,ii=Ye&&qe<=Je&&!Qe&&!Ze,oi=ii&&qe===V&&Je===L,ti=pe||!Le||$e(Le)||Ue&&null==Be||!X&&!K;return o(g,e({className:fe,elevation:4,sx:w({width:he,maxWidth:xe,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==be?void 0:be.root)},{children:t(f,e({spacing:.75,sx:{p:1}},{children:[t(f,e({direction:"row",alignItems:"center",spacing:.75,sx:null==be?void 0:be.header},{children:[o(S,{color:"error",height:16,width:16}),o(E,e({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:T})),se&&o(h,e({size:"small",onClick:J,disabled:!J,"aria-label":"Close boundary check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:o(a,{sx:{fontSize:17}})}))]})),t(s,{children:[o(E,e({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:z})),null!=W&&o(E,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:W})),o(m,{sx:{my:.625}}),null!=P?o(C,{children:P}):null!=k&&o(E,e({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:k}))]}),t(f,e({spacing:.625,role:"radiogroup","aria-label":"Boundary options"},{children:[ve.map(function(i,r){var n=Ve===r,l=$e(i);return t(g,e({variant:"outlined",sx:w({borderColor:n?"#1976d2":"divider",borderRadius:2,bgcolor:l?"#F8FAFC":"background.paper",overflow:"hidden"},null==be?void 0:be.option)},{children:[t(p,e({role:"radio","aria-checked":n,disabled:pe||l,onClick:function(){return function(e,i){pe||$e(i)||(void 0===H&&ye(e),i.id!==R&&De(null),We&&(ke(!1),Ne(!1)),null==U||U(e,i))}(r,i)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[o(x,{checked:n,disabled:pe||l,tabIndex:-1,size:"small",sx:{p:.25,mr:.5,"&.Mui-disabled":{color:"#CBD5E1"}}}),t(s,e({sx:{minWidth:0}},{children:[o(E,e({sx:{color:l?"#94A3B8":"text.primary",fontSize:12.5,fontWeight:500}},{children:i.title})),null!=i.description&&o(E,e({sx:{mt:.125,color:l?"#94A3B8":"text.secondary",fontSize:11}},{children:i.description}))]}))]})),n&&i.id===R&&o(f,e({direction:"row",spacing:.75,sx:w({px:.75,pb:.75},null==be?void 0:be.adjacentSelector)},{children:[{direction:"previous",title:null!=B?B:"No Previous document",caption:"← Merge into Previous",available:Xe},{direction:"next",title:null!=D?D:"No Next document",caption:"Merge into Next →",available:Ke}].map(function(i){var r=Be===i.direction;return t(f,e({sx:{flex:1,minWidth:0}},{children:[o(p,e({disabled:pe||!i.available,onClick:function(){return De(i.direction)},"aria-pressed":r,sx:{width:"100%",minWidth:0,minHeight:46,alignItems:"flex-start",justifyContent:"flex-start",p:.625,border:"1px solid",borderColor:r?"#7F56D9":"#D0D5DD",borderRadius:1.5,bgcolor:r?"#E0E7FF":"background.paper",color:r?"#7F56D9":i.available?"text.primary":"#98A2B3",textAlign:"left","&.Mui-disabled":{color:"#98A2B3",bgcolor:"#F8FAFC"}}},{children:o(E,e({sx:{color:"inherit",fontSize:11,fontWeight:500,lineHeight:1.25,overflowWrap:"anywhere"}},{children:i.title}))})),o(E,e({sx:{mt:.5,color:r?"#5925DC":"text.secondary",fontSize:9.5,lineHeight:1.2,whiteSpace:"nowrap",textAlign:"next"===i.direction?"right":"left"}},{children:i.caption}))]}),i.direction)})}))]}),i.id)}),Ue&&null!=Be&&t(f,e({direction:"row",alignItems:"flex-start",spacing:.625,sx:w({p:.75,border:"1px solid #FCA5A5",borderRadius:1.5,bgcolor:"#FEF2F2"},null==be?void 0:be.impactWarning)},{children:[o(S,{color:"error",height:14,width:14,sx:{mt:.125}}),t(E,e({sx:{color:"#DC2626",fontSize:10.5,lineHeight:1.4}},{children:["This will impact the ",Be," document. Its content and page range will change."]}))]})),o(u,e({variant:"contained",fullWidth:!0,disabled:ti,onClick:function(){if(!ti&&null!=Ve&&Le){var i=Ue?"previous"===Be?y.MERGE_PREVIOUS:y.MERGE_NEXT:Le.id,o=Ue?e(e({},Le),{id:i}):Le,t={selectedIndex:Ve,option:o,metadata:G};null==X||X(Ve,o,t),K&&M(i)&&K(i,t)}},sx:w({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==be?void 0:be.confirmButton)},{children:Q}))]})),le&&t(f,e({spacing:.625,sx:null==be?void 0:be.manualSection},{children:[t(p,e({disabled:pe,onClick:function(){var e=!We;ke(e),Ne(!1),e&&(void 0===H&&ye(null),null==q||q())},"aria-expanded":We,sx:{width:"100%",justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[o(s,{children:o(E,e({sx:{color:"text.primary",fontSize:12,fontWeight:600}},{children:ee}))}),o(c,{sx:{color:"text.secondary",fontSize:16,transform:We?"rotate(180deg)":"none",transition:"transform 150ms ease"}})]})),We&&!_e&&t(s,e({sx:{pt:.5,fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif'}},{children:[t(s,e({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[o(E,e({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Starts"})),o(E,e({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Ends"}))]})),t(s,e({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[t(s,{children:[o(b,{size:"small",type:"text",value:Re,disabled:pe,error:Qe||ei,onChange:function(e){var i=e.target.value;/^\d*$/.test(i)&&Me(i)},inputProps:{inputMode:"numeric",pattern:"[0-9]*"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:Qe||ei?"#EF4444":"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:Qe||ei?"#EF4444":"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:Qe||ei?"#EF4444":"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"}}}),Qe&&t(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:["Must be ≤ ",Ce," (total pages)"]})),ei&&!Qe&&o(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:"Must be ≤ end page"}))]}),t(s,{children:[o(b,{size:"small",type:"text",value:Ie,disabled:pe,error:Ze||ei,onChange:function(e){var i=e.target.value;/^\d*$/.test(i)&&Te(i)},inputProps:{inputMode:"numeric",pattern:"[0-9]*"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:Ze||ei?"#EF4444":"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:Ze||ei?"#EF4444":"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:Ze||ei?"#EF4444":"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"}}}),Ze&&t(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:["Must be ≤ ",Ce," (total pages)"]})),ei&&!Ze&&o(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:"Must be ≥ start page"}))]})]})),o(s,{children:o(u,e({onClick:function(){ii&&(oi?Oe(!0):Ne(!0))},disabled:pe||!ii||oi,sx:{height:"30px",padding:"0 12px",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",backgroundColor:"#FFFFFF",border:"1px solid #8E80F3",borderRadius:"6px",fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif',fontSize:"12px",fontWeight:600,lineHeight:"1",color:"#4A24CF",outline:"none",cursor:"pointer",textTransform:"none",transition:"all 150ms ease-in-out","&:hover":!ii||oi?{}:{backgroundColor:"#FAF9FF",borderColor:"#7F6FF0"},"&:active":!ii||oi?{}:{transform:"translateY(1px)"},"&.Mui-disabled":{backgroundColor:"#FFFFFF",borderColor:"#C3CFDC",color:"#A0ABBE",cursor:"not-allowed"}}},{children:"Apply"}))}),oi&&je&&o(s,e({sx:{backgroundColor:"#FEF3C7",border:"1px solid #FBBF24",borderRadius:"6px",padding:"8px 10px",marginTop:"4px"}},{children:o(E,e({sx:{fontSize:"10px",color:"#B45309",fontWeight:500,lineHeight:1.4}},{children:"Please change the boundary to change the document boundary as no changes will be applied."}))})),o(s,{sx:{width:"100%",height:"1px",marginTop:"8px",backgroundColor:"#EEF0F2",border:"0"}})]})),We&&_e&&t(f,e({spacing:.75,sx:w({p:.75,borderRadius:1.5,bgcolor:"#FFF7ED"},null==be?void 0:be.manualConfirmation)},{children:[t(f,e({direction:"row",alignItems:"center",spacing:.5},{children:[o(S,{color:"warning",height:14,width:14}),o(E,e({sx:{color:"#EA580C",fontSize:11,fontWeight:600}},{children:"Confirm this change?"}))]})),t(E,e({sx:{color:"text.secondary",fontSize:10.5,lineHeight:1.4}},{children:["Pages ",qe,"-",Je," will become part of ",z,", including pages from other documents in this range."]})),t(f,e({direction:"row",spacing:.75},{children:[o(u,e({variant:"outlined",fullWidth:!0,onClick:function(){return Ne(!1)},sx:{minHeight:28,borderRadius:1.5,fontSize:11,textTransform:"none"}},{children:"Cancel"})),o(u,e({variant:"contained",fullWidth:!0,disabled:pe||!X||!ii||oi,onClick:function(){if(ii&&!oi&&X){var e={id:y.SET_RANGE,title:oe};X(-1,e,{selectedIndex:-1,option:e,startPage:qe,endPage:Je,metadata:G})}},sx:{minHeight:28,borderRadius:1.5,bgcolor:"#EA580C",fontSize:11,textTransform:"none","&:hover":{bgcolor:"#C2410C"}}},{children:"Confirm"}))]}))]}))]})),o(f,e({spacing:.625,sx:null==be?void 0:be.footer},{children:ae&&t(r,{children:[o(m,{}),t(p,e({onClick:$,disabled:!$,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:$?"pointer":"not-allowed"}},{children:[t(f,e({direction:"row",alignItems:"center",spacing:1},{children:[o(v,{sx:{color:"text.secondary"}}),o(E,e({sx:{color:"text.primary",fontSize:12}},{children:re}))]})),t(f,e({direction:"row",alignItems:"center",spacing:.5},{children:[o(F,{score:_}),o(d,{sx:{color:"text.secondary"}})]}))]}))]})}))]}))}))}export{y as BoundaryReviewActionEnum,A as createBoundaryCardOptions,I as default,M as isBoundaryReviewAction};
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"tslib";import{jsx as o,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useMemo as n,useState as l}from"react";import d from"@mui/icons-material/ChevronRight";import a from"@mui/icons-material/Close";import c from"@mui/icons-material/ExpandMore";import s from"@mui/material/Box";import u from"@mui/material/Button";import p from"@mui/material/ButtonBase";import m from"@mui/material/Divider";import h from"@mui/material/IconButton";import g from"@mui/material/Paper";import x from"@mui/material/Radio";import f from"@mui/material/Stack";import b from"@mui/material/TextField";import E from"@mui/material/Typography";import C from"./RevertSummaryNotice.js";import v from"./CognitiveIcon.js";import F from"./CognitiveScoreBadge.js";import S from"../../assests/icons/InfoAlert.js";var y,w=function(e,o){return i([e],Array.isArray(o)?o:null==o?[]:[o],!0)},R="MERGE_ADJACENT";!function(e){e.KEEP="KEEP",e.SPLIT_HERE="SPLIT_HERE",e.MERGE_NEXT="MERGE_NEXT",e.MERGE_PREV="MERGE_PREV",e.MERGE_PREVIOUS="MERGE_PREVIOUS",e.SET_RANGE="SET_RANGE"}(y||(y={}));var M=function(e){return Object.values(y).includes(e)},A=function(e,o,t,r){if(!o||!e)return[];var n=o.additional_decisions,l=Array.isArray(n)?n:n?Object.values(n).flat():[],d=Array.from(new Set(i(i([],o.allowed_decisions,!0),l,!0)));return d.flatMap(function(i){var o=e.focus_page,n=d.find(function(e){return e.toLowerCase().includes("merge")}),l=null!=o&&null!=t&&null!=r&&o===t&&o===r,a=null!=o&&null!=t&&o===t,c=null!=o&&null!=r&&(o===r||o===r+1),s=a||c||!(null!=o&&(!(null!=t&&null!=r)||o>t&&o<r));switch(i){case y.SET_RANGE:return[];case"KEEP":return[{id:i,title:"Keep as is",description:"Keep the current document boundary unchanged."}];case"SPLIT_HERE":return[{id:i,title:"Split to a separate document",description:s?"A valid page inside the document is required to split it.":o?"Start a new document at page ".concat(o,"."):"Create a new document at this boundary.",disabled:s}];case"MERGE_PREV":case"MERGE_NEXT":case"MERGE_PREVIOUS":return i!==n?[]:l?[{id:R,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]:a?[{id:y.MERGE_PREVIOUS,title:"Merge with previous document",description:"Combine this document with the previous document."}]:c?[{id:y.MERGE_NEXT,title:"Merge with next document",description:"Combine this document with the next document."}]:[{id:R,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]}return[]})};function I(i){var I=i.headerName,T=void 0===I?"Boundary Check":I,z=i.title,W=i.pageNo,k=i.content,P=i.revertSummary,_=i.cognitiveScore,N=i.config,G=i.metadata,B=i.previousSegmentTitle,D=i.nextSegmentTitle,H=i.selectedIndex,j=i.defaultSelectedIndex,O=void 0===j?null:j,V=i.defaultStartPage,L=i.defaultEndPage,U=i.onSelectionChange,X=i.onConfirm,K=i.onActionConfirm,$=i.onCognitiveClick,q=i.onAdjustManually,J=i.onClose,Y=i.confirmLabel,Q=void 0===Y?"Confirm":Y,Z=i.manualPrompt,ee=void 0===Z?"Didn't find the right option?":Z,ie=i.manualActionLabel,oe=void 0===ie?"Adjust Manually":ie,te=i.cognitiveLabel,re=void 0===te?"Cognitive Integrity":te,ne=i.showAdjustManually,le=void 0===ne||ne,de=i.showCognitiveIntegrity,ae=void 0===de||de,ce=i.showCloseButton,se=void 0===ce||ce,ue=i.confirmDisabled,pe=void 0!==ue&&ue,me=i.width,he=void 0===me?260:me,ge=i.maxWidth,xe=void 0===ge?260:ge,fe=i.className,be=i.styles,Ee=i.reviewAction,Ce=i.totalPages;console.log("LOG: Total pages",Ce);var ve=n(function(){return(null!=N?N:G?A(G,Ee,V,L):[]).filter(function(e){return e.id!==y.SET_RANGE})},[N,L,V,G,Ee]),Fe=l(O),Se=Fe[0],ye=Fe[1],we=l(null==V?"":String(V)),Re=we[0],Me=we[1],Ae=l(null==L?"":String(L)),Ie=Ae[0],Te=Ae[1],ze=l(!1),We=ze[0],ke=ze[1],Pe=l(!1),_e=Pe[0],Ne=Pe[1],Ge=l(null),Be=Ge[0],De=Ge[1],He=l(!1),je=He[0],Oe=He[1],Ve=void 0===H?Se:H,Le=null==Ve?void 0:ve[Ve],Ue=(null==Le?void 0:Le.id)===R,Xe=null!=B,Ke=null!=D,$e=function(e){return!0===e.disabled||e.id===y.MERGE_PREV&&!Xe||e.id===y.MERGE_PREVIOUS&&!Xe||e.id===y.MERGE_NEXT&&!Ke||e.id===R&&!Xe&&!Ke},qe=Number(Re),Je=Number(Ie),Ye=Re.trim().length>0&&Ie.trim().length>0&&Number.isInteger(qe)&&Number.isInteger(Je)&&qe>0&&Je>0,Qe=null!=Ce&&qe>Ce,Ze=null!=Ce&&Je>Ce,ei=Re.trim().length>0&&Ie.trim().length>0&&Number.isInteger(qe)&&Number.isInteger(Je)&&qe>Je,ii=Ye&&qe<=Je&&!Qe&&!Ze,oi=ii&&qe===V&&Je===L,ti=pe||!Le||$e(Le)||Ue&&null==Be||!X&&!K;return o(g,e({className:fe,elevation:4,sx:w({width:he,maxWidth:xe,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==be?void 0:be.root)},{children:t(f,e({spacing:.75,sx:{p:1}},{children:[t(f,e({direction:"row",alignItems:"center",spacing:.75,sx:null==be?void 0:be.header},{children:[o(S,{color:"error",height:16,width:16}),o(E,e({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:T})),se&&o(h,e({size:"small",onClick:J,disabled:!J,"aria-label":"Close boundary check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:o(a,{sx:{fontSize:17}})}))]})),t(s,{children:[o(E,e({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:z})),null!=W&&o(E,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:W})),o(m,{sx:{my:.625}}),null!=P?o(C,{children:P}):null!=k&&o(E,e({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:k}))]}),t(f,e({spacing:.625,role:"radiogroup","aria-label":"Boundary options"},{children:[ve.map(function(i,r){var n=Ve===r,l=$e(i);return t(g,e({variant:"outlined",sx:w({borderColor:n?"#1976d2":"divider",borderRadius:2,bgcolor:l?"#F8FAFC":"background.paper",overflow:"hidden"},null==be?void 0:be.option)},{children:[t(p,e({role:"radio","aria-checked":n,disabled:pe||l,onClick:function(){return function(e,i){pe||$e(i)||(void 0===H&&ye(e),i.id!==R&&De(null),We&&(ke(!1),Ne(!1)),null==U||U(e,i))}(r,i)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[o(x,{checked:n,disabled:pe||l,tabIndex:-1,size:"small",sx:{p:.25,mr:.5,"&.Mui-disabled":{color:"#CBD5E1"}}}),t(s,e({sx:{minWidth:0}},{children:[o(E,e({sx:{color:l?"#94A3B8":"text.primary",fontSize:12.5,fontWeight:500}},{children:i.title})),null!=i.description&&o(E,e({sx:{mt:.125,color:l?"#94A3B8":"text.secondary",fontSize:11}},{children:i.description}))]}))]})),n&&i.id===R&&o(f,e({direction:"row",spacing:.75,sx:w({px:.75,pb:.75},null==be?void 0:be.adjacentSelector)},{children:[{direction:"previous",title:null!=B?B:"No Previous document",caption:"← Merge into Previous",available:Xe},{direction:"next",title:null!=D?D:"No Next document",caption:"Merge into Next →",available:Ke}].map(function(i){var r=Be===i.direction;return t(f,e({sx:{flex:1,minWidth:0}},{children:[o(p,e({disabled:pe||!i.available,onClick:function(){return De(i.direction)},"aria-pressed":r,sx:{width:"100%",minWidth:0,minHeight:46,alignItems:"flex-start",justifyContent:"flex-start",p:.625,border:"1px solid",borderColor:r?"#7F56D9":"#D0D5DD",borderRadius:1.5,bgcolor:r?"#E0E7FF":"background.paper",color:r?"#7F56D9":i.available?"text.primary":"#98A2B3",textAlign:"left","&.Mui-disabled":{color:"#98A2B3",bgcolor:"#F8FAFC"}}},{children:o(E,e({sx:{color:"inherit",fontSize:11,fontWeight:500,lineHeight:1.25,overflowWrap:"anywhere"}},{children:i.title}))})),o(E,e({sx:{mt:.5,color:r?"#5925DC":"text.secondary",fontSize:9.5,lineHeight:1.2,whiteSpace:"nowrap",textAlign:"next"===i.direction?"right":"left"}},{children:i.caption}))]}),i.direction)})}))]}),i.id)}),Ue&&null!=Be&&t(f,e({direction:"row",alignItems:"flex-start",spacing:.625,sx:w({p:.75,border:"1px solid #FCA5A5",borderRadius:1.5,bgcolor:"#FEF2F2"},null==be?void 0:be.impactWarning)},{children:[o(S,{color:"error",height:14,width:14,sx:{mt:.125}}),t(E,e({sx:{color:"#DC2626",fontSize:10.5,lineHeight:1.4}},{children:["This will impact the ",Be," document. Its content and page range will change."]}))]})),o(u,e({variant:"contained",fullWidth:!0,disabled:ti,onClick:function(){if(!ti&&null!=Ve&&Le){var i=Ue?"previous"===Be?y.MERGE_PREVIOUS:y.MERGE_NEXT:Le.id,o=Ue?e(e({},Le),{id:i}):Le,t={selectedIndex:Ve,option:o,metadata:G};null==X||X(Ve,o,t),K&&M(i)&&K(i,t)}},sx:w({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==be?void 0:be.confirmButton)},{children:Q}))]})),le&&t(f,e({spacing:.625,sx:null==be?void 0:be.manualSection},{children:[t(p,e({disabled:pe,onClick:function(){var e=!We;ke(e),Ne(!1),e&&(void 0===H&&ye(null),null==q||q())},"aria-expanded":We,sx:{width:"100%",justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[o(s,{children:o(E,e({sx:{color:"text.primary",fontSize:12,fontWeight:600}},{children:ee}))}),o(c,{sx:{color:"text.secondary",fontSize:16,transform:We?"rotate(180deg)":"none",transition:"transform 150ms ease"}})]})),We&&!_e&&t(s,e({sx:{pt:.5,fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif'}},{children:[t(s,e({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[o(E,e({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Starts"})),o(E,e({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Ends"}))]})),t(s,e({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[t(s,{children:[o(b,{size:"small",type:"text",value:Re,disabled:pe,error:Qe||ei,onChange:function(e){var i=e.target.value;/^\d*$/.test(i)&&Me(i)},inputProps:{inputMode:"numeric",pattern:"[0-9]*"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:Qe||ei?"#EF4444":"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:Qe||ei?"#EF4444":"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:Qe||ei?"#EF4444":"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"}}}),Qe&&t(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:["Must be ≤ ",Ce," (total pages)"]})),ei&&!Qe&&o(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:"Must be ≤ end page"}))]}),t(s,{children:[o(b,{size:"small",type:"text",value:Ie,disabled:pe,error:Ze||ei,onChange:function(e){var i=e.target.value;/^\d*$/.test(i)&&Te(i)},inputProps:{inputMode:"numeric",pattern:"[0-9]*"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:Ze||ei?"#EF4444":"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:Ze||ei?"#EF4444":"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:Ze||ei?"#EF4444":"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"}}}),Ze&&t(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:["Must be ≤ ",Ce," (total pages)"]})),ei&&!Ze&&o(E,e({sx:{fontSize:"10px",color:"#EF4444",marginTop:"2px",fontWeight:500}},{children:"Must be ≥ start page"}))]})]})),o(s,{children:o(u,e({onClick:function(){ii&&(oi?Oe(!0):Ne(!0))},disabled:pe||!ii,sx:{height:"30px",padding:"0 12px",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",backgroundColor:"#FFFFFF",border:"1px solid #8E80F3",borderRadius:"6px",fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif',fontSize:"12px",fontWeight:600,lineHeight:"1",color:"#4A24CF",outline:"none",cursor:"pointer",textTransform:"none",transition:"all 150ms ease-in-out","&:hover":ii?{backgroundColor:"#FAF9FF",borderColor:"#7F6FF0"}:{},"&:active":ii?{transform:"translateY(1px)"}:{},"&.Mui-disabled":{backgroundColor:"#FFFFFF",borderColor:"#C3CFDC",color:"#A0ABBE",cursor:"not-allowed"}}},{children:"Apply"}))}),oi&&je&&o(s,e({sx:{backgroundColor:"#FEF3C7",border:"1px solid #FBBF24",borderRadius:"6px",padding:"8px 10px",marginTop:"4px"}},{children:o(E,e({sx:{fontSize:"10px",color:"#B45309",fontWeight:500,lineHeight:1.4}},{children:"Please change the boundary to change the document boundary as no changes will be applied."}))})),o(s,{sx:{width:"100%",height:"1px",marginTop:"8px",backgroundColor:"#EEF0F2",border:"0"}})]})),We&&_e&&t(f,e({spacing:.75,sx:w({p:.75,borderRadius:1.5,bgcolor:"#FFF7ED"},null==be?void 0:be.manualConfirmation)},{children:[t(f,e({direction:"row",alignItems:"center",spacing:.5},{children:[o(S,{color:"warning",height:14,width:14}),o(E,e({sx:{color:"#EA580C",fontSize:11,fontWeight:600}},{children:"Confirm this change?"}))]})),t(E,e({sx:{color:"text.secondary",fontSize:10.5,lineHeight:1.4}},{children:["Pages ",qe,"-",Je," will become part of ",z,", including pages from other documents in this range."]})),t(f,e({direction:"row",spacing:.75},{children:[o(u,e({variant:"outlined",fullWidth:!0,onClick:function(){return Ne(!1)},sx:{minHeight:28,borderRadius:1.5,fontSize:11,textTransform:"none"}},{children:"Cancel"})),o(u,e({variant:"contained",fullWidth:!0,disabled:pe||!X,onClick:function(){if(ii&&X){var e={id:y.SET_RANGE,title:oe};X(-1,e,{selectedIndex:-1,option:e,startPage:qe,endPage:Je,metadata:G})}},sx:{minHeight:28,borderRadius:1.5,bgcolor:"#EA580C",fontSize:11,textTransform:"none","&:hover":{bgcolor:"#C2410C"}}},{children:"Confirm"}))]}))]}))]})),o(f,e({spacing:.625,sx:null==be?void 0:be.footer},{children:ae&&t(r,{children:[o(m,{}),t(p,e({onClick:$,disabled:!$,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:$?"pointer":"not-allowed"}},{children:[t(f,e({direction:"row",alignItems:"center",spacing:1},{children:[o(v,{sx:{color:"text.secondary"}}),o(E,e({sx:{color:"text.primary",fontSize:12}},{children:re}))]})),t(f,e({direction:"row",alignItems:"center",spacing:.5},{children:[o(F,{score:_}),o(d,{sx:{color:"text.secondary"}})]}))]}))]})}))]}))}))}export{y as BoundaryReviewActionEnum,A as createBoundaryCardOptions,I as default,M as isBoundaryReviewAction};
|
|
2
2
|
//# sourceMappingURL=BoundaryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{jsx as o}from"react/jsx-runtime";import e from"@mui/material/Box";
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as o}from"react/jsx-runtime";import e from"@mui/material/Box";function n(n){var t=n.score;if(null==t||"string"==typeof t&&""===t.trim())return null;var i="number"==typeof t?"".concat(t,"%"):t;return o(e,r({component:"span",sx:{px:.625,py:0,border:"1.5px solid",borderColor:"secondary.main",borderRadius:10,color:"secondary.main",fontSize:11,lineHeight:1.25}},{children:i}))}export{n as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveScoreBadge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{jsx as i,jsxs as o}from"react/jsx-runtime";import e from"@mui/icons-material/ArrowForward";import t from"@mui/material/Box";import l from"@mui/material/Button";import n from"@mui/material/Paper";import m from"@mui/material/Stack";import a from"@mui/material/Typography";import{CheckCircleIcon as d}from"lucide-react";function c(c){var s=c.title,h=c.description,p=c.onReview,
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as i,jsxs as o}from"react/jsx-runtime";import e from"@mui/icons-material/ArrowForward";import t from"@mui/material/Box";import l from"@mui/material/Button";import n from"@mui/material/Paper";import m from"@mui/material/Stack";import a from"@mui/material/Typography";import{CheckCircleIcon as d}from"lucide-react";function c(c){var s=c.title,h=c.description,p=c.onReview,F=c.reviewLabel,f=void 0===F?"Review":F;return i(n,r({elevation:0,role:"status",sx:{width:"100%",px:1.5,py:1.5,border:"1.5px solid #86EFAC",borderRadius:2,bgcolor:"#F0FDF4",boxSizing:"border-box"}},{children:o(m,r({alignItems:"center",spacing:1.5,sx:{textAlign:"center"}},{children:[i(t,r({sx:{display:"grid",placeItems:"center",width:58,height:58,border:"8px solid rgba(255, 255, 255, 0.9)",borderRadius:"50%",bgcolor:"#DCFCE7",color:"#0A9B49"}},{children:i(d,{height:36,width:36})})),o(t,{children:[i(a,r({sx:{color:"#166534",fontSize:15,fontWeight:600,lineHeight:1.4}},{children:s})),i(a,r({sx:{mt:.75,color:"#07883F",fontSize:14,lineHeight:1.55}},{children:h}))]}),i(l,r({variant:"outlined",fullWidth:!0,onClick:p,endIcon:i(e,{}),sx:{minHeight:42,border:"1.5px solid #CBD5E1",borderRadius:2,bgcolor:"#FFFFFF",color:"#475569",fontSize:16,fontWeight:700,textTransform:"none","&:hover":{borderColor:"#94A3B8",bgcolor:"#FFFFFF"}}},{children:f}))]}))}))}export{c as default};
|
|
2
2
|
//# sourceMappingURL=RevertSuccessCard.js.map
|