@viswa-test/test-citation 0.0.378 → 0.0.381
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/README.md +151 -0
- package/dist/assests/icons/InfoAlert.js +2 -0
- package/dist/assests/icons/InfoAlert.js.map +1 -0
- package/dist/cjs/assests/icons/InfoAlert.js +2 -0
- package/dist/cjs/assests/icons/InfoAlert.js.map +1 -0
- package/dist/cjs/features/BPACitationRenderer/BPACitationRenderer.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitiveCompare.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/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/useSideBySide.js +1 -1
- 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/ParentCitationComponent/ParentCitationComponent.js +2 -0
- package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js.map +1 -0
- package/dist/cjs/features/PdfViewer/PdfContainer.js +1 -1
- package/dist/cjs/features/PdfViewer/PdfStyle.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/nyc-components/BoundaryCard.js +2 -0
- package/dist/cjs/features/PdfViewer/nyc-components/BoundaryCard.js.map +1 -0
- package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js +2 -0
- package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js.map +1 -0
- package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js +2 -0
- package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js.map +1 -0
- package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js +2 -0
- package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js.map +1 -0
- package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +2 -0
- package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +1 -0
- package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js +2 -0
- package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js.map +1 -0
- package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js +2 -0
- package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +1 -0
- package/dist/cjs/features/PdfViewer/rotationManager.js +2 -0
- package/dist/cjs/features/PdfViewer/rotationManager.js.map +1 -0
- package/dist/cjs/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/cjs/features/PromptCitation/CitationDependencyGraph.js +2 -0
- package/dist/cjs/features/PromptCitation/CitationDependencyGraph.js.map +1 -0
- package/dist/cjs/features/PromptCitation/PromptCitation.js +2 -0
- package/dist/cjs/features/PromptCitation/PromptCitation.js.map +1 -0
- package/dist/cjs/features/PromptCitation/_components/CodeEditor.js +2 -0
- package/dist/cjs/features/PromptCitation/_components/CodeEditor.js.map +1 -0
- package/dist/cjs/features/PromptCitation/_components/Markdownrenderer.js +2 -0
- package/dist/cjs/features/PromptCitation/_components/Markdownrenderer.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +1 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- 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/ReviewPanel/ReviewPanel.js +2 -0
- package/dist/cjs/features/ReviewPanel/ReviewPanel.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/CardWrapper.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/CardWrapper.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/CognitiveIcon.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/CognitiveIcon.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/CognitiveScoreBadge.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/PageCheck.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/PageCheck.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/PageTypeChoiceCheck.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/PageTypeChoiceCheck.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/RevertCard.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/RevertCard.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/ReviewedBoundaryActions.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/ReviewedBoundaryActions.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/helper.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/helper.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/reviewScore.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/reviewScore.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/service/redlineService.js +1 -1
- package/dist/cjs/utils/tagHelper.js +1 -1
- package/dist/features/BPACitationRenderer/BPACitationRenderer.js +1 -1
- package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
- package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/features/CognitiveCompare/CognitivePopup.js +1 -1
- 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/useSideBySide.js +1 -1
- 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/ParentCitationComponent/ParentCitationComponent.js +2 -0
- package/dist/features/ParentCitationComponent/ParentCitationComponent.js.map +1 -0
- package/dist/features/PdfViewer/PdfContainer.js +1 -1
- package/dist/features/PdfViewer/PdfStyle.js +1 -1
- package/dist/features/PdfViewer/PdfToolbar.js +1 -1
- package/dist/features/PdfViewer/PdfViewer.js +1 -1
- package/dist/features/PdfViewer/nyc-components/BoundaryCard.js +2 -0
- package/dist/features/PdfViewer/nyc-components/BoundaryCard.js.map +1 -0
- package/dist/features/PdfViewer/nyc-components/CardWrapper.js +2 -0
- package/dist/features/PdfViewer/nyc-components/CardWrapper.js.map +1 -0
- package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js +2 -0
- package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js.map +1 -0
- package/dist/features/PdfViewer/nyc-components/LabelCheck.js +2 -0
- package/dist/features/PdfViewer/nyc-components/LabelCheck.js.map +1 -0
- package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +2 -0
- package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +1 -0
- package/dist/features/PdfViewer/nyc-components/infoAlert.js +2 -0
- package/dist/features/PdfViewer/nyc-components/infoAlert.js.map +1 -0
- package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js +2 -0
- package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +1 -0
- package/dist/features/PdfViewer/rotationManager.js +2 -0
- package/dist/features/PdfViewer/rotationManager.js.map +1 -0
- package/dist/features/PdfViewer/usePdfHighlight.js +1 -1
- package/dist/features/PromptCitation/CitationDependencyGraph.js +2 -0
- package/dist/features/PromptCitation/CitationDependencyGraph.js.map +1 -0
- package/dist/features/PromptCitation/PromptCitation.js +2 -0
- package/dist/features/PromptCitation/PromptCitation.js.map +1 -0
- package/dist/features/PromptCitation/_components/CodeEditor.js +2 -0
- package/dist/features/PromptCitation/_components/CodeEditor.js.map +1 -0
- package/dist/features/PromptCitation/_components/Markdownrenderer.js +2 -0
- package/dist/features/PromptCitation/_components/Markdownrenderer.js.map +1 -0
- package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- 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/ReviewPanel/ReviewPanel.js +2 -0
- package/dist/features/ReviewPanel/ReviewPanel.js.map +1 -0
- package/dist/features/SegmentReviewComponents/BoundaryCard.js +2 -0
- package/dist/features/SegmentReviewComponents/BoundaryCard.js.map +1 -0
- package/dist/features/SegmentReviewComponents/CardWrapper.js +2 -0
- package/dist/features/SegmentReviewComponents/CardWrapper.js.map +1 -0
- package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
- package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
- package/dist/features/SegmentReviewComponents/CognitiveIcon.js +2 -0
- package/dist/features/SegmentReviewComponents/CognitiveIcon.js.map +1 -0
- package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js +2 -0
- package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js.map +1 -0
- package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js +2 -0
- package/dist/features/SegmentReviewComponents/CognitiveScoreBadge.js.map +1 -0
- package/dist/features/SegmentReviewComponents/LabelCheck.js +2 -0
- package/dist/features/SegmentReviewComponents/LabelCheck.js.map +1 -0
- package/dist/features/SegmentReviewComponents/PageCheck.js +2 -0
- package/dist/features/SegmentReviewComponents/PageCheck.js.map +1 -0
- package/dist/features/SegmentReviewComponents/PageTypeChoiceCheck.js +2 -0
- package/dist/features/SegmentReviewComponents/PageTypeChoiceCheck.js.map +1 -0
- package/dist/features/SegmentReviewComponents/RevertCard.js +2 -0
- package/dist/features/SegmentReviewComponents/RevertCard.js.map +1 -0
- package/dist/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
- package/dist/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
- package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
- package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
- package/dist/features/SegmentReviewComponents/ReviewedBoundaryActions.js +2 -0
- package/dist/features/SegmentReviewComponents/ReviewedBoundaryActions.js.map +1 -0
- package/dist/features/SegmentReviewComponents/ReviewedCard.js +2 -0
- package/dist/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
- package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +2 -0
- package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js.map +1 -0
- package/dist/features/SegmentReviewComponents/helper.js +2 -0
- package/dist/features/SegmentReviewComponents/helper.js.map +1 -0
- package/dist/features/SegmentReviewComponents/reviewScore.js +2 -0
- package/dist/features/SegmentReviewComponents/reviewScore.js.map +1 -0
- package/dist/features/SegmentReviewComponents/reviewStepAdapters.js +2 -0
- package/dist/features/SegmentReviewComponents/reviewStepAdapters.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/service/redlineService.js +1 -1
- package/dist/types/src/CitationDependencyGraphTest.d.ts +4 -0
- package/dist/types/src/CitationDependencyGraphTest.d.ts.map +1 -0
- package/dist/types/src/RedlineApprovalCardTest.d.ts +1 -0
- package/dist/types/src/RedlineApprovalCardTest.d.ts.map +1 -0
- package/dist/types/src/RedlineEditorTest.d.ts.map +1 -1
- package/dist/types/src/RedlineEditorTest2.d.ts +3 -0
- package/dist/types/src/RedlineEditorTest2.d.ts.map +1 -0
- package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
- package/dist/types/src/assests/icons/ChartSplitIcon.d.ts +3 -0
- package/dist/types/src/assests/icons/ChartSplitIcon.d.ts.map +1 -0
- package/dist/types/src/assests/icons/InfoAlert.d.ts +3 -0
- package/dist/types/src/assests/icons/InfoAlert.d.ts.map +1 -0
- package/dist/types/src/commonConstants.d.ts +31103 -0
- package/dist/types/src/commonConstants.d.ts.map +1 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.d.ts.map +1 -1
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts +1 -0
- package/dist/types/src/features/BPACitationRenderer/BPACitationRenderer.types.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
- 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/CognitiveCompareTypes.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +0 -12
- package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
- 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 +456 -11335
- 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 +1 -14
- 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 +1 -2
- 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/useSideBySide.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts +2 -0
- package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts.map +1 -0
- package/dist/types/src/features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.d.ts +0 -1
- 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 +1 -2
- package/dist/types/src/features/GptWebCitation/GptWebCitationImageCitation.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/types.d.ts +0 -11
- package/dist/types/src/features/GptWebCitation/types.d.ts.map +1 -1
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts +0 -2
- package/dist/types/src/features/GptWebCitation/utils/fixedHeight.utils.d.ts.map +1 -1
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts +128 -0
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts.map +1 -0
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts +13 -0
- package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/PdfContainer.d.ts +4 -2
- package/dist/types/src/features/PdfViewer/PdfContainer.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfStyle.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts +4 -1
- package/dist/types/src/features/PdfViewer/PdfToolbar.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/PdfViewer.d.ts +19 -2
- package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
- package/dist/types/src/features/PdfViewer/coordinateTransformer.d.ts +41 -0
- package/dist/types/src/features/PdfViewer/coordinateTransformer.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts +59 -0
- package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts +19 -0
- package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts +3 -0
- package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts +77 -0
- package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts +47 -0
- package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts +15 -0
- package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts +3 -0
- package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts +36 -0
- package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/rotationManager.d.ts +23 -0
- package/dist/types/src/features/PdfViewer/rotationManager.d.ts.map +1 -0
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts +1 -0
- package/dist/types/src/features/PdfViewer/usePdfHighlight.d.ts.map +1 -1
- package/dist/types/src/features/PromptCitation/CitationDependencyGraph.d.ts +56 -0
- package/dist/types/src/features/PromptCitation/CitationDependencyGraph.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/PromptCitation.d.ts +326 -0
- package/dist/types/src/features/PromptCitation/PromptCitation.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/PromptCitationTest.d.ts +4 -0
- package/dist/types/src/features/PromptCitation/PromptCitationTest.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/CodeEditor.d.ts +30 -0
- package/dist/types/src/features/PromptCitation/_components/CodeEditor.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/HighlightedCodeDetails.d.ts +16 -0
- package/dist/types/src/features/PromptCitation/_components/HighlightedCodeDetails.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/Markdownrenderer.d.ts +23 -0
- package/dist/types/src/features/PromptCitation/_components/Markdownrenderer.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/ThemeToggle.d.ts +12 -0
- package/dist/types/src/features/PromptCitation/_components/ThemeToggle.d.ts.map +1 -0
- package/dist/types/src/features/PromptCitation/_components/TooltipComponent.d.ts +8 -0
- package/dist/types/src/features/PromptCitation/_components/TooltipComponent.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +29 -39
- package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/InitialHtml.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ManualNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/UpdateNode.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- 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 +5439 -84
- 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 +2 -20
- 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 +2 -7
- 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 +1 -15
- 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 +1 -2
- 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 +2 -3
- 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 +0 -1
- 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 +0 -1
- 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/lsc-reason-gap/CustomChatCrRedirection.d.ts +2 -3
- 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 +1 -3
- 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 +1 -2
- 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 +0 -1
- 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 +0 -2
- 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 +1 -2
- 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 +1 -2
- 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 +0 -2
- 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 +0 -7
- 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 +1 -2
- package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/utils/helpers.d.ts +0 -2
- 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 +85 -0
- package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts +26 -0
- package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts +3 -0
- package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/CognitiveIcon.d.ts +3 -0
- package/dist/types/src/features/SegmentReviewComponents/CognitiveIcon.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts +33 -0
- package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts +7 -0
- package/dist/types/src/features/SegmentReviewComponents/CognitiveScoreBadge.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts +87 -0
- package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts +57 -0
- package/dist/types/src/features/SegmentReviewComponents/PageCheck.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/PageTypeChoiceCheck.d.ts +28 -0
- package/dist/types/src/features/SegmentReviewComponents/PageTypeChoiceCheck.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts +37 -0
- package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts +9 -0
- package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts +7 -0
- package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/ReviewedBoundaryActions.d.ts +17 -0
- package/dist/types/src/features/SegmentReviewComponents/ReviewedBoundaryActions.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts +33 -0
- package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts +124 -0
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.d.ts +13 -0
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/helper.d.ts +51 -0
- package/dist/types/src/features/SegmentReviewComponents/helper.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts +2 -0
- package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/index.d.ts +25 -0
- package/dist/types/src/features/SegmentReviewComponents/index.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts +4 -0
- package/dist/types/src/features/SegmentReviewComponents/reviewScore.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts +243 -0
- package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts +2 -0
- package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +8 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/service/redlineService.d.ts.map +1 -1
- package/dist/types/src/utils/tagHelper.d.ts +0 -9
- package/dist/types/src/utils/tagHelper.d.ts.map +1 -1
- package/dist/utils/tagHelper.js +1 -1
- package/package.json +12 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js +0 -2
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +0 -2
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +0 -1
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js +0 -2
- package/dist/cjs/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js.map +0 -1
- package/dist/cjs/features/RequirementAI/utils/exponential-retry.js +0 -2
- package/dist/cjs/features/RequirementAI/utils/exponential-retry.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.js.map +0 -1
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js +0 -2
- package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +0 -1
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +0 -2
- package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +0 -1
- package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js +0 -2
- package/dist/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.js.map +0 -1
- package/dist/features/RequirementAI/utils/exponential-retry.js +0 -2
- package/dist/features/RequirementAI/utils/exponential-retry.js.map +0 -1
- package/dist/types/src/CitationAccordionTest.d.ts +0 -1
- package/dist/types/src/CitationAccordionTest.d.ts.map +0 -1
- package/dist/types/src/MockDeviationSummary.d.ts +0 -1
- package/dist/types/src/MockDeviationSummary.d.ts.map +0 -1
- package/dist/types/src/features/CognitiveCompare/Guidelines/constants/new-guidelines.mockData.d.ts +0 -33
- package/dist/types/src/features/CognitiveCompare/Guidelines/constants/new-guidelines.mockData.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/updateTags.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.d.ts +0 -3
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/ProtectTableCellBoundaries.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/reviewBoundaryLexical.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/plugins/reviewBoundaryLexical.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.d.ts +0 -7
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/manualEditSerialization.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.d.ts +0 -29
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.test.d.ts +0 -2
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownEmphasis.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.d.ts +0 -7
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownLineBreaks.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.d.ts +0 -3
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveMarkdownListFormatting.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.d.ts +0 -86
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.test.d.ts +0 -9
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveReviewBoundaryWhitespace.test.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.d.ts +0 -7
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/preserveTableDelimiters.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.d.ts +0 -5
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/tableBoundaryRedlines.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts +0 -10
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts +0 -17
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts +0 -23
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts +0 -3
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts +0 -12
- package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.d.ts +0 -9
- package/dist/types/src/features/RequirementAI/components/userstory-with-citation/utils/inlineMarkdown.d.ts.map +0 -1
- package/dist/types/src/features/RequirementAI/utils/exponential-retry.d.ts +0 -12
- package/dist/types/src/features/RequirementAI/utils/exponential-retry.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=e=>{const
|
|
1
|
+
const e=e=>{const t=[];try{const n="<BLOCK_STREAM_START>",r="<BLOCK_STREAM_END>";let i=0;for(;;){const o=e.indexOf(n,i);if(-1===o)break;const s=e.indexOf(r,o+n.length);if(-1===s)break;const c=e.slice(o+n.length,s).trim();t.push(JSON.parse(c)),i=s+r.length}}catch(e){console.error("Error in extracting blocks from stream",e)}finally{return t}};function t(e,t,i,o){const s=[];let c="";const a=[];let l="";console.log("RAW INPUT",JSON.stringify(e),JSON.stringify(o));try{const u=e=>e.replace(/<a\s+(?:(table="true")\s+)?href=(\\"|")ai_reasoning\$(\d+)(\\"|")>([\s\S]*?)<\/a>/g,(e,o,c,l,u,f)=>{var d,h,g,p,_;const b=`${l}<BLOCK_NUMBER>${t}<STORY_NUMBER>${i}`,$=function(e){const t=new Map,n="<gpt_citation ",r="</gpt_citation>";let i=0;for(;;){const o=e.indexOf(n,i);if(-1===o)break;const s=e.indexOf(">",o);if(-1===s)break;const c=e.indexOf(r,s);if(-1===c)break;const a=e.slice(o,c+r.length),l=e.slice(o,s+1),u=l.indexOf("id=");if(-1!==u){let e=u+3;"\\"===l[e]&&e++,'"'!==l[e]&&"'"!==l[e]||e++;let n="";for(;e<l.length&&/\d/.test(l[e]);)n+=l[e++];n&&t.set(n,a)}i=c+r.length}return t}(f);console.log("RAW INPUT",$);const m=f.match(/<reason(?:\s+source="([^"]*)")?>([\s\S]*?)<\/reason>/),v=f.match(/<gap(?:\s+source="([^"]*)")?>([\s\S]*?)<\/gap>/),O=f.match(/<relevance_score>([\s\S]*?)<\/relevance_score>/);let T=(null===(d=null==m?void 0:m[2])||void 0===d?void 0:d.trim())||"",S=(null===(h=null==v?void 0:v[2])||void 0===h?void 0:h.trim())||"";T=n(T,b),S=n(S,b),$.forEach((e,t)=>{const n=`${b}<GPT_CITATION_ID>${t}`;a.push(r(e,n))}),s.push({id:b,reason:T,reasonSource:(null===(g=null==m?void 0:m[1])||void 0===g?void 0:g.trim())||"",gap:S,gapSource:(null===(p=null==v?void 0:v[1])||void 0===p?void 0:p.trim())||"",relevance_score:Number(null===(_=null==O?void 0:O[1])||void 0===_?void 0:_.trim())||0});return`<a ${o?'table="true"':""} href=${c}ai_reasoning$${b}${u}>Source</a>`});c=u(e),o&&(l=u(o))}catch(t){console.error("Error in extracting AI Reasoning from this block:",e)}finally{return{outputText:c,reasonings:s,gpt_citation:a,processedDescription:l}}}function n(e,t){if(!e)return e;let n="",r=0;for(;;){const i=e.indexOf("<gpt_citation_here ",r);if(-1===i){n+=e.slice(r);break}n+=e.slice(r,i);const o=e.indexOf(">",i);if(-1===o){n+=e.slice(i);break}const s=e.slice(i,o+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){n+=`<a href="gpt_citation$${`${t}<GPT_CITATION_ID>${a}`}">Source</a>`}r=o+1}return n}function r(e,t){const n=t=>{const n=new RegExp(`<${t}>([\\s\\S]*?)<\\/${t}>`,"gi"),r=[];let i;for(;null!==(i=n.exec(e));)r.push(i[1].trim());return r},r=n("domain"),i=n("paraphrase");return{citation_number:t,customMetadata:{type:"gpt_citation",data_sources:n("data_sources"),training_data_title:r,paraphrase:i}}}const i=(e,t,n)=>{let r=e.includes("<h1><b>Title</b></h1>\n\n")?e:n?`<h1><b>Title</b></h1>\n\n${n} \n${e}`:e;return r=r.includes("<h1><b>Requirement Type</b></h1>\n\n")?r:t?`<h1><b>Requirement Type</b></h1>\n\n${t} \n${r}`:r,r};function o(e){try{const t=/<h2>\s*(?:<b>)?Description(?:<\/b>)?\s*<\/h2>\s*([\s\S]*?)(?=\s*<h2>|$)/i,n=e.match(t);if(n)return n[1].trim()}catch(e){}return null}export{e as extractBlockStreams,o as extractDescription,r as parseGptCitation,t as processAIReasoningFromBlocks,i as processUserStoryValue,n as replaceGptCitation};
|
|
2
2
|
//# sourceMappingURL=proccess-stream.utils.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as r,useRef as n,useEffect as o}from"react";function l(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return e.filter(Boolean).join(" ")}var d=function(){return t("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},{children:t("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2"})}))},c=function(){return t("svg",e({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},{children:t("path",{d:"M18 15l-6-6-6 6",stroke:"currentColor",strokeWidth:"2"})}))},a=function(){return i("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-maximize2-icon lucide-maximize-2 rp-border"},{children:[t("path",{d:"M15 3h6v6"}),t("path",{d:"m21 3-7 7"}),t("path",{d:"m3 21 7-7"}),t("path",{d:"M9 21H3v-6"})]}))},s=function(){return i("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-minimize2-icon lucide-minimize-2 rp-border"},{children:[t("path",{d:"m14 10 7-7"}),t("path",{d:"M20 10h-6V4"}),t("path",{d:"m3 21 7-7"}),t("path",{d:"M4 14h6v6"})]}))},u=function(){return i("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#87c66b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-circle-check-icon lucide-circle-check"},{children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("path",{d:"m9 12 2 2 4-4"})]}))},h={dark:{"--rp-bg":"#000","--rp-text":"#fff","--rp-active-bg":"#1f2930","--rp-muted":"#8c8c8c","--rp-border":"#434343","--rp-success":"#4ade80"},light:{"--rp-bg":"#fff","--rp-text":"#000","--rp-active-bg":"#e5eef5","--rp-muted":"#8c8c8c","--rp-border":"#434343","--rp-success":"#16a34a"}};function v(r){var n,o,d,c,a,s,h=r.item,v=r.index,m=r.isActive,p=r.status,f=void 0===p?"pending":p,g=r.config,w=r.classes,x=g.textKey,k=void 0===x?"text":x,b=g.showStatusIcon,N=void 0===b||b,C=g.showRightBadge,B=void 0===C||C,M=g.rightBadgeText;return i("div",e({className:l("rp-item",m&&"rp-item--active","reviewed"===f&&"rp-item--reviewed",null===(n=null==w?void 0:w.item)||void 0===n?void 0:n.root,m&&(null===(o=null==w?void 0:w.item)||void 0===o?void 0:o.active),"reviewed"===f&&(null===(d=null==w?void 0:w.item)||void 0===d?void 0:d.reviewed))},{children:[N&&"reviewed"===f&&t("span",e({className:null===(c=null==w?void 0:w.item)||void 0===c?void 0:c.icon},{children:t(u,{})})),t("span",e({className:l("rp-item-text",null===(a=null==w?void 0:w.item)||void 0===a?void 0:a.text)},{children:String(h[k])})),B&&M&&t("span",e({className:l("rp-item-badge",null===(s=null==w?void 0:w.item)||void 0===s?void 0:s.rightBadge)},{children:M(h,v)}))]}))}var m=function(u){var m=u.data,p=u.renderItem,f=u.itemConfig,g=u.classes,w=u.keyExtractor,x=void 0===w?function(e,i){return i.toString()}:w,k=u.activeIndex,b=u.onActiveChange,N=u.expanded,C=u.onExpandedChange,B=u.headerLeftSlot,M=u.footerSlot,I=u.headerRightSlot,S=u.getItemStatus,j=u.theme,y=void 0===j?"dark":j,z=u.className,A=r(0),E=A[0],R=A[1],W=r(!1),V=W[0],H=W[1],K=null!=k?k:E,L=null!=N?N:V,T=n([]),q=function(e){null==b||b(e),void 0===k&&R(e)},D=function(e){null==C||C(e),void 0===N&&H(e)};return o(function(){var e;L&&(null===(e=T.current[K])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"nearest"}))},[K,L]),i("div",e({className:l("rp-container",z),style:h[y]},{children:[i("div",e({className:l("rp-header",null==g?void 0:g.header)},{children:[t("div",e({className:"rp-header-left"},{children:B})),I?I({activeIndex:K,total:m.length,setIndex:q,isExpanded:L,setExpanded:D}):i("div",e({className:l("rp-header-right",null==g?void 0:g.headerRight)},{children:[i("span",{children:[K+1," of ",m.length]}),t("button",e({onClick:function(){return q(Math.min(K+1,m.length-1))}},{children:t(d,{})})),t("button",e({onClick:function(){return q(Math.max(K-1,0))}},{children:t(c,{})}))]})),t("button",e({onClick:function(){return D(!L)}},{children:t(L?s:a,{})}))]})),L&&t("div",e({className:l("rp-list",null==g?void 0:g.listWrapper)},{children:m.map(function(i,r){var n=null==S?void 0:S(i,r),o=r===K;return t("div",e({ref:function(e){return T.current[r]=e},onClick:function(){return q(r)}},{children:p?p({item:i,index:r,isActive:o,status:n}):t(v,{item:i,index:r,isActive:o,status:n,config:null!=f?f:{},classes:g})}),x(i,r))})})),M&&t("div",e({className:"rp-footer"},{children:M}))]}))};export{m as ReviewPanel};
|
|
2
|
+
//# sourceMappingURL=ReviewPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewPanel.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +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};
|
|
2
|
+
//# sourceMappingURL=BoundaryCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoundaryCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n}from"react/jsx-runtime";import{useState as t,useRef as i,useLayoutEffect as o}from"react";import l from"@mui/material/Box";import r from"@mui/material/Popper";function a(a){var d,u,c=a.anchorRef,s=a.anchorElement,m=a.children,f=a.className,v=a.offset,h=void 0===v?{}:v,p=a.placement,x=void 0===p?"bottom-start":p,w=a.width,b=a.maxWidth;a.customStyles;var g=a.fallbackMaxHeightVh,z=void 0===g?85:g,y=a.heightBuffer,E=void 0===y?100:y,R=t(null),W=R[0],A=R[1],H=t(!0),O=H[0],S=H[1],B=t(null),F=B[0],L=B[1],M=t(null),C=M[0],I=M[1],N=i(null);return o(function(){var e,n=null!==(e=null!=s?s:null==c?void 0:c.current)&&void 0!==e?e:null;A(function(e){return e===n?e:n})},[s,c]),o(function(){if(W){var e=null,n=function(){var n,t,i=W.getBoundingClientRect(),o=null!==(t=null===(n=window.visualViewport)||void 0===n?void 0:n.height)&&void 0!==t?t:window.innerHeight;S(W.isConnected&&"hidden"!==W.style.visibility),L(Math.max(0,window.innerWidth-i.left-8)),I(Math.max(0,o-i.top-2*i.height)),null!=e&&cancelAnimationFrame(e),e=requestAnimationFrame(function(){var n;e=null,null===(n=N.current)||void 0===n||n.update()})},t=new MutationObserver(n);t.observe(W,{attributes:!0,attributeFilter:["style","class"]});var i="undefined"==typeof ResizeObserver?null:new ResizeObserver(n);return null==i||i.observe(W),window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),n(),function(){t.disconnect(),null==i||i.disconnect(),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0),null!=e&&cancelAnimationFrame(e)}}S(!1)},[W]),n(r,e({open:Boolean(W)&&O,anchorEl:W,popperRef:N,placement:x,className:f,popperOptions:{strategy:"fixed"},modifiers:[{name:"offset",options:{offset:[null!==(d=h.left)&&void 0!==d?d:0,null!==(u=h.top)&&void 0!==u?u:0]}},{name:"flip",enabled:!1},{name:"preventOverflow",options:{mainAxis:!1,altAxis:!0,tether:!1}}],sx:{zIndex:function(e){return e.zIndex.tooltip},width:w,maxWidth:null==F?b:"min(".concat("number"==typeof b?"".concat(b,"px"):null!=b?b:"100vw",", ").concat(F,"px)"),minWidth:0,height:"fit-content",maxHeight:null==C?"calc(".concat(z,"vh - 10px)"):"".concat(C-E,"px"),alignSelf:"flex-start",flex:"0 0 auto",overflowX:"hidden",overflowY:"auto",borderRadius:2,boxShadow:function(e){return e.shadows[4]},boxSizing:"border-box"}},{children:n(l,e({sx:{width:"100%",maxWidth:"100%",minWidth:0,height:"fit-content",minHeight:0,maxHeight:null==C?"calc(".concat(z,"vh - 10px)"):"".concat(C-E,"px"),overflowX:"hidden",overflowY:"auto",pointerEvents:"auto",boxSizing:"border-box"}},{children:m}))}))}export{a as default};
|
|
2
|
+
//# sourceMappingURL=CardWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as r}from"react/jsx-runtime";function o(o){return r("svg",t({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r("path",{d:"M8.9375 1.4375V0.5M11.3996 2.10041L12.0625 1.4375M12.0689 4.5625H13.0064M12.9691 7.375C12.6556 10.5333 9.99084 13 6.75 13C3.29822 13 0.5 10.2018 0.5 6.75C0.5 3.50916 2.96667 0.844437 6.125 0.53086M6.75 4.25H9.25V6.75M9.0123 4.25C7.54083 6.32975 5.11648 7.6875 2.375 7.6875C1.74819 7.6875 1.13795 7.61652 0.551889 7.48216",stroke:"#16A34A","stroke-linecap":"round","stroke-linejoin":"round"})}))}export{o as default};
|
|
2
|
+
//# sourceMappingURL=ChartBreakoutCircle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartBreakoutCircle.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as C}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import i from"@mui/material/SvgIcon";function r(r){return e(i,C({},r,{viewBox:"0 0 12 17",sx:C({width:12,height:17},r.sx)},{children:[t("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.778549 6.35498C0.947509 6.06234 1.14047 5.78701 1.35448 5.53127L1.05841 6.77432C0.87679 7.48466 0.80378 8.17502 1.05378 8.73356C1.09106 8.81682 1.13466 8.8951 1.18403 8.96801C1.17505 9.11859 1.17346 9.27007 1.17938 9.42164C1.21133 10.2394 1.46064 11.0339 1.90165 11.7232C2.34265 12.4126 2.95942 12.9719 3.68845 13.3437C3.78702 13.3948 3.86973 13.4719 3.92758 13.5667C3.98544 13.6614 4.01623 13.7702 4.01664 13.8814V16.3427C4.01664 16.422 4.00103 16.5004 3.97071 16.5736C3.94039 16.6468 3.89595 16.7133 3.83993 16.7693C3.78391 16.8253 3.71741 16.8698 3.64421 16.9001C3.57102 16.9305 3.49257 16.946 3.41335 16.946C3.33412 16.946 3.25567 16.9305 3.18248 16.9001C3.10928 16.8698 3.04278 16.8253 2.98676 16.7693C2.93074 16.7133 2.8863 16.6468 2.85598 16.5736C2.82567 16.5004 2.81006 16.422 2.81006 16.3427V14.2366C1.50675 13.4505 0.563809 12.1847 0.18393 10.7109C-0.195948 9.23705 0.017555 7.67304 0.778549 6.35498ZM2.5956 4.4202C2.58489 4.46583 2.57238 4.51587 2.55818 4.57051L2.10596 6.46709C2.4519 6.00902 2.88178 5.61795 3.37484 5.31587C3.45372 5.26755 3.53389 5.2217 3.61524 5.17836L3.91437 4.02581C3.94069 3.92848 3.96334 3.83471 3.98223 3.74482C3.4887 3.90843 3.02287 4.13636 2.5956 4.4202ZM4.97997 3.50929C4.95187 3.76277 4.89721 4.01844 4.83146 4.26296L4.70096 4.7659C5.02368 4.68809 5.35523 4.64508 5.68997 4.63852C6.50816 4.62249 7.31584 4.82482 8.02986 5.22467C8.74387 5.62452 9.33837 6.20745 9.75227 6.91343C10.1661 7.61942 10.3843 8.42296 10.3845 9.24135V13.029C10.3845 13.1201 10.3483 13.2075 10.2838 13.272C10.2193 13.3365 10.132 13.3726 10.0408 13.3726H8.14698C7.98698 13.3726 7.83353 13.4362 7.72039 13.5493C7.60726 13.6625 7.5437 13.816 7.5437 13.9759V16.3427C7.5437 16.5028 7.60726 16.6562 7.72039 16.7693C7.83353 16.8825 7.98698 16.946 8.14698 16.946C8.30699 16.946 8.46043 16.8825 8.57357 16.7693C8.6867 16.6562 8.75027 16.5028 8.75027 16.3427V14.5792H10.0408C10.2444 14.5792 10.446 14.5391 10.634 14.4612C10.8221 14.3833 10.993 14.2691 11.137 14.1252C11.2809 13.9812 11.3951 13.8103 11.473 13.6223C11.551 13.4342 11.591 13.2326 11.591 13.029V9.24224C11.5909 8.20964 11.3155 7.1957 10.7933 6.30483C10.271 5.41397 9.5209 4.67834 8.61996 4.17369C7.50563 3.55832 6.22659 3.32916 4.97997 3.50929ZM3.31096 7.17824C3.06416 7.47379 2.86777 7.81154 2.73281 8.17818C2.67346 8.33942 2.62681 8.50407 2.59287 8.67068C2.96541 8.66305 3.3259 8.58961 4.09408 7.98043L4.4813 7.65806C4.62698 7.53143 4.68583 7.33671 4.65268 7.14949L4.63322 7.06982C4.53815 6.83998 4.24287 6.77137 4.02738 6.89566C3.80462 7.02416 3.56339 7.12021 3.31096 7.17824ZM5.50956 6.70762C5.39307 6.42581 5.2101 6.22391 4.9955 6.09139C5.4636 5.96152 5.95753 5.9332 6.44355 6.01261C7.21223 6.13821 7.9139 6.52554 8.4298 7.10905C8.7773 7.50191 8.68077 8.0666 8.32362 8.38802C7.27342 9.33691 5.53306 10.5666 3.80331 11.0251C3.36315 11.141 2.88052 10.9286 2.71933 10.4749C2.62076 10.1971 2.55967 9.90972 2.53604 9.62C2.82204 9.61857 3.17908 9.5971 3.63183 9.39587C4.05727 9.20681 4.51985 8.88082 5.10381 8.3732C5.58794 7.95226 5.70675 7.30946 5.5355 6.77894L5.52437 6.74281L5.50956 6.70762Z"}),t("path",{d:"M2.49253 8.67144C1.98274 8.67144 1.60843 8.35663 1.96545 6.97238L2.55084 4.51665C2.65295 4.12345 2.66944 3.96624 2.55084 3.96624C2.1154 4.07601 2.33401 4.00777 1.9654 4.16485L1.71094 3.73988C2.95167 2.68571 2.97363 2.40709 3.58474 2.40709C4.09454 2.40709 4.17978 3.02062 3.92448 3.96464L3.25466 6.54621C3.13565 7.00253 3.18712 7.15973 3.30531 7.15973C3.56398 7.10114 3.81132 7.00404 4.03939 6.87249C4.25773 6.74655 4.55616 6.81591 4.65239 7.04889C4.72106 7.26145 4.66773 7.49745 4.49914 7.64399C3.36616 8.62885 2.9653 8.67144 2.49253 8.67144ZM3.66602 0.00239655C3.7822 -0.00651177 3.89895 0.00947896 4.00846 0.0493006C4.11797 0.0891223 4.21772 0.151858 4.30105 0.233314C4.38438 0.314771 4.44935 0.413073 4.49165 0.521653C4.53394 0.630232 4.55258 0.746588 4.54631 0.862945V0.860752C4.53258 1.15708 4.40525 1.43674 4.19074 1.64164C3.97623 1.84656 3.69104 1.96097 3.39439 1.96112L3.37064 1.96075C3.25288 1.97358 3.13485 1.95962 3.02324 1.91993C2.91164 1.88024 2.81044 1.81584 2.72723 1.73154C2.64402 1.64723 2.58094 1.54522 2.54271 1.43311C2.50477 1.32187 2.49227 1.20356 2.5061 1.08687C2.51738 0.789536 2.64564 0.508673 2.86299 0.305421C3.08056 0.101963 3.36973 -0.00722427 3.66748 0.00166549L3.66602 0.00239655Z"})]}))}export{r as default};
|
|
2
|
+
//# sourceMappingURL=CognitiveIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveIcon.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i,__spreadArray as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import o from"@mui/icons-material/ChevronLeft";import r from"@mui/icons-material/Close";import l from"@mui/material/Box";import a from"@mui/material/Divider";import m from"@mui/material/IconButton";import c from"@mui/material/Paper";import s from"@mui/material/Stack";import h from"@mui/material/Typography";import d from"../CitationRenderer/MarkdownRenderer.js";import f from"./CognitiveIcon.js";import g from"./CognitiveScoreBadge.js";var u=function(i,n){return e([i],Array.isArray(n)?n:null==n?[]:[n],!0)};function p(e){var p=e.reasons,x=e.reason,v=e.gap,y=e.score,H=e.headerName,S=void 0===H?"Cognitive Integrity":H,b=e.onBack,C=e.onClose,z=e.showCloseButton,w=void 0===z||z,k=e.width,W=void 0===k?260:k,D=e.maxWidth,B=void 0===D?260:D,A=e.className,I=e.styles,R=(null!=p?p:[]).filter(function(i){return"evidence"===i.type.trim().toLowerCase()}).map(function(i){return i.text.trim()}).filter(Boolean),j=(null!=p?p:[]).filter(function(i){return"gap"===i.type.trim().toLowerCase()}).map(function(i){return i.text.trim()}).filter(Boolean),F=null==x?void 0:x.trim(),E=null==v?void 0:v.trim();if(0===R.length&&F&&R.push(F),0===j.length&&E&&j.push(E),0===R.length&&0===j.length)return null;var L,M=(L=null==I?void 0:I.markdown,i(i({},L),{containerWrapper:i(i({},null==L?void 0:L.containerWrapper),{display:"block",height:"auto",minHeight:0,maxHeight:"fit-content",flex:"0 0 auto"}),mainCard:i(i({},null==L?void 0:L.mainCard),{height:"auto",minHeight:0,maxHeight:"none",flex:"0 0 auto",padding:0,border:"none",borderRadius:0,boxShadow:"none",backgroundColor:"transparent"}),scrollArea:i({height:"auto",minHeight:0,maxHeight:"none",overflowY:"visible",paddingRight:0,color:"#475467",fontSize:11.5,lineHeight:1.3},null==L?void 0:L.scrollArea),list:i({margin:"0",padding:"0 0 0 18px",fontSize:"11.5px",lineHeight:"1.3"},null==L?void 0:L.list)})),N=i(i({},M),{scrollArea:i(i({},M.scrollArea),{fontSize:"inherit",lineHeight:"inherit"}),summary:i(i({},M.summary),{display:"inline-flex",padding:0,fontSize:"inherit",lineHeight:"inherit"})});return n(c,i({className:A,elevation:4,sx:u({width:W,maxWidth:B,height:"fit-content",minHeight:0,alignSelf:"flex-start",flex:"0 0 auto",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==I?void 0:I.root)},{children:t(s,i({spacing:.75,sx:{p:1,height:"auto",minHeight:0,display:"flex",flexDirection:"column","& > *":{minHeight:0}}},{children:[t(s,i({direction:"row",alignItems:"center",spacing:.75,sx:null==I?void 0:I.header},{children:[b&&n(m,i({size:"small",onClick:b,"aria-label":"Return to review check",sx:{p:0,color:"#6941C6"}},{children:n(o,{sx:{fontSize:17}})})),n(f,{sx:{color:"#6941C6"}}),n(h,i({sx:{flex:1,fontSize:12,fontWeight:500,alignItems:"center",display:"flex",lineHeight:1.25,textTransform:"capitalise"}},{children:S})),n(g,{score:y}),w&&n(m,i({size:"small",onClick:C,disabled:!C,"aria-label":"Close cognitive integrity",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:n(r,{sx:{fontSize:17}})}))]})),n(a,{sx:{m:0}}),n(l,i({sx:u({bgcolor:"#F9FAFB",px:1.5,py:1.25,height:"auto",minHeight:0,flex:"0 0 auto",display:"flex",flexDirection:"column"},null==I?void 0:I.content)},{children:t(s,i({spacing:1.5,sx:{display:"flex",flexDirection:"column",minHeight:0}},{children:[R.length>0&&t(l,i({sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:[n(h,i({sx:{mb:1,color:"#344054",fontSize:12,fontWeight:600,lineHeight:1.4,flexShrink:0}},{children:"Decision Making Factors"})),n(s,i({spacing:.75,sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:R.map(function(e,o){return t(s,i({direction:"row",alignItems:"flex-start",spacing:.75},{children:[t(h,i({component:"span",sx:{flex:"0 0 auto",minWidth:14,color:"#475467",fontSize:11.5,lineHeight:1.65}},{children:[o+1,"."]})),n(l,i({sx:{flex:1,minWidth:0,color:"#667085",fontSize:11.5,lineHeight:1.65,"& p":{m:0,color:"inherit",fontSize:"inherit",lineHeight:"inherit"}}},{children:n(d,{value:"<summary>".concat(e,"</summary>"),styles:N})}))]}),"evidence-".concat(o))})}))]})),R.length>0&&j.length>0&&n(a,{sx:{my:"2px !important",borderColor:"#E4E7EC"}}),j.length>0&&t(l,i({sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:[n(h,i({sx:{mb:1,color:"#344054",fontSize:12,fontWeight:600,lineHeight:1.4,flexShrink:0}},{children:"Gaps in Decision"})),n(s,i({spacing:.75,sx:{minHeight:0,display:"flex",flexDirection:"column"}},{children:j.map(function(e,o){return t(s,i({direction:"row",alignItems:"flex-start",spacing:.75},{children:[t(h,i({component:"span",sx:{flex:"0 0 auto",minWidth:14,color:"#475467",fontSize:11.5,lineHeight:1.65}},{children:[o+1,"."]})),n(l,i({sx:{flex:1,minWidth:0,color:"#667085",fontSize:11.5,lineHeight:1.65,"& p":{m:0,color:"inherit",fontSize:"inherit",lineHeight:"inherit"}}},{children:n(d,{value:"<summary>".concat(e,"</summary>"),styles:N})}))]}),"gap-".concat(o))})}))]}))]}))}))]}))}))}export{p as default};
|
|
2
|
+
//# sourceMappingURL=CognitiveIntegrity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveIntegrity.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as o}from"react/jsx-runtime";import e from"@mui/material/Box";import{getReviewScoreBand as t}from"./reviewScore.js";function i(i){var n=i.score;if(null==n||"string"==typeof n&&""===n.trim())return null;var m="number"==typeof n?"".concat(n,"%"):n,l=t("number"==typeof n||"string"==typeof n?n:null),p="low"===l?"#B91C1C":"medium"===l?"#997800":"high"===l?"#4F9E6C":"#374151";return o(e,r({component:"span",sx:{px:.625,py:0,border:"1.5px solid",borderColor:p,borderRadius:10,color:p,fontSize:11,lineHeight:1.25}},{children:m}))}export{i as default};
|
|
2
|
+
//# sourceMappingURL=CognitiveScoreBadge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CognitiveScoreBadge.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"tslib";import{jsx as o,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useMemo as n,useState as l}from"react";import a from"@mui/icons-material/ChevronRight";import d from"@mui/icons-material/Close";import c from"@mui/material/Box";import u from"@mui/material/Button";import s from"@mui/material/ButtonBase";import m from"@mui/material/Divider";import p from"@mui/material/IconButton";import h from"@mui/material/Paper";import f from"@mui/material/Radio";import b from"@mui/material/Stack";import x from"@mui/material/TextField";import v from"@mui/material/Typography";import g from"./RevertSummaryNotice.js";import C from"./CognitiveIcon.js";import y from"./CognitiveScoreBadge.js";import S from"../../assests/icons/InfoAlert.js";var w,I=function(e,o){return i([e],Array.isArray(o)?o:null==o?[]:[o],!0)};!function(e){e.KEEP_LABEL="KEEP_LABEL",e.SET_CUSTOM_LABEL="SET_CUSTOM_LABEL"}(w||(w={}));var A=function(e){return e.user_actions.map(function(i){switch(i){case"KEEP_LABEL":return{id:i,title:"Keep as is",description:e.current_label?'Label stays "'.concat(e.current_label,'"'):"Keep the current document label"};case"SET_CUSTOM_LABEL":return{id:i,title:"Fix a document title",description:"Correct the page title if it's not right",requiresInput:!0,inputPlaceholder:e.current_label?"e.g. ".concat(e.current_label):"Enter a document label"}}})},L=function(e){return Object.values(w).includes(e)};function E(i){var w,E=i.headerName,k=void 0===E?"Title Check":E,B=i.title,D=i.pageNo,z=i.content,M=void 0===z?"We're not fully confident about this label. Confirm it, choose a different type, or add a new one.":z,_=i.revertSummary,W=i.cognitiveScore,F=i.config,O=i.metadata,T=i.selectedIndex,j=i.defaultSelectedIndex,P=void 0===j?null:j,R=i.onSelectionChange,K=i.customLabel,H=i.defaultCustomLabel,N=i.onCustomLabelChange,q=i.onConfirm,U=i.onActionConfirm,G=i.onCognitiveClick;i.onAdjustManually;var J=i.onClose,Q=i.confirmLabel,V=void 0===Q?"Confirm":Q,X=i.customInputAriaLabel,Y=void 0===X?"Custom document label":X;i.manualPrompt,i.manualActionLabel;var Z=i.cognitiveLabel,$=void 0===Z?"Cognitive Integrity":Z;i.showAdjustManually;var ee=i.showCognitiveIntegrity,ie=void 0===ee||ee,oe=i.showCloseButton,re=void 0===oe||oe,te=i.confirmDisabled,ne=void 0!==te&&te,le=i.confirmationBlocked,ae=void 0!==le&&le,de=i.confirmationWarning,ce=i.disableAllActions,ue=void 0!==ce&&ce,se=i.width,me=void 0===se?260:se,pe=i.maxWidth,he=void 0===pe?260:pe,fe=i.className,be=i.styles,xe=n(function(){return null!=F?F:O?A(O):[]},[F,O]),ve=l(P),ge=ve[0],Ce=ve[1],ye=l(null!==(w=null!=H?H:null==O?void 0:O.custom_label)&&void 0!==w?w:""),Se=ye[0],we=ye[1],Ie=void 0===T?ge:T,Ae=void 0===K?Se:K,Le=null==Ie?void 0:xe[Ie],Ee=Boolean(null==Le?void 0:Le.requiresInput),ke=ae||ue||ne||!q&&!U||!Le||!0===Le.disabled||Ee&&0===Ae.trim().length,Be=function(){if(!ke&&null!=Ie&&Le){var e=Ee?Ae.trim():void 0;null==q||q(Ie,Le,e),U&&L(Le.id)&&U(Le.id,{selectedIndex:Ie,option:Le,customLabel:e,metadata:O})}};return o(h,e({className:fe,elevation:0,sx:I({width:me,maxWidth:he,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",boxSizing:"border-box",boxShadow:"0 8px 16px rgba(16, 24, 40, 0.2)","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==be?void 0:be.root)},{children:o(c,e({sx:{overflow:"hidden"}},{children:r(b,e({spacing:.75,sx:{p:1}},{children:[r(b,e({direction:"row",alignItems:"center",spacing:.75,sx:null==be?void 0:be.header},{children:[o(S,{color:"error",height:16,width:16}),o(v,e({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:k})),re&&o(p,e({size:"small",onClick:J,disabled:!J,"aria-label":"Close label check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:o(d,{sx:{fontSize:17}})}))]})),r(c,{children:[o(v,e({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:B})),null!=D&&o(v,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:D})),o(m,{sx:{my:.625}}),null!=_?o(g,{children:_}):null!=M&&o(v,e({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:M}))]}),r(b,e({spacing:.625,role:"radiogroup","aria-label":"Label options"},{children:[null!=de&&r(b,e({direction:"row",alignItems:"flex-start",spacing:.5,role:"alert",sx:I({px:.75,py:.625,borderRadius:1,bgcolor:"#FEFCE8",color:"#CA8A04"},null==be?void 0:be.confirmationWarning)},{children:[o(S,{color:"inherit",height:15,width:15}),o(v,e({sx:{color:"inherit",fontSize:11.5,lineHeight:1.3}},{children:de}))]})),xe.map(function(i,t){var n=Ie===t;return r(h,e({variant:"outlined",sx:I({borderColor:n?"#1976d2":"divider",borderRadius:2,overflow:"hidden"},null==be?void 0:be.option)},{children:[r(s,e({role:"radio","aria-checked":n,disabled:ne||i.disabled||ae,onClick:function(){return function(e,i){ne||i.disabled||(void 0===T&&Ce(e),null==R||R(e,i))}(t,i)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left",cursor:"pointer","&.Mui-disabled":{cursor:"not-allowed"}}},{children:[o(f,{checked:n,disabled:ne||i.disabled||ae,tabIndex:-1,size:"small",sx:{p:.25,mr:.5,cursor:"pointer","&.Mui-disabled":{cursor:"not-allowed"}}}),r(c,e({sx:{minWidth:0}},{children:[o(v,e({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:i.title})),null!=i.description&&o(v,e({sx:{mt:.125,color:"text.secondary",fontSize:11}},{children:i.description}))]}))]})),n&&i.requiresInput&&o(c,e({sx:{px:1.25,pb:1}},{children:o(x,{autoFocus:!0,fullWidth:!0,size:"small",value:Ae,disabled:ne,placeholder:i.inputPlaceholder,inputProps:{"aria-label":Y},onChange:function(e){return i=e.target.value,void 0===K&&we(i),void(null==N||N(i));var i},onKeyDown:function(e){"Enter"===e.key&&Be()},variant:"outlined",InputProps:{sx:{height:36,borderRadius:2,backgroundColor:"background.paper","& .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD",borderWidth:"1px"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD",borderWidth:"1.5px"},"& .MuiOutlinedInput-input":{height:"100%",boxSizing:"border-box",px:1.25,py:0,fontSize:12,lineHeight:1.25},"& .MuiOutlinedInput-input::placeholder":{color:"#98A2B3",opacity:1}}},sx:null==be?void 0:be.customInput})}))]}),i.id)}),o(u,e({variant:"contained",fullWidth:!0,disabled:ke,onClick:Be,sx:I({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:V}))]})),o(b,e({spacing:.625,sx:null==be?void 0:be.footer},{children:ie&&r(t,{children:[o(m,{}),r(s,e({onClick:G,disabled:!G,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:G?"pointer":"not-allowed"}},{children:[r(b,e({direction:"row",alignItems:"center",spacing:1},{children:[o(C,{sx:{color:"text.secondary"}}),o(v,e({sx:{color:"text.primary",fontSize:12}},{children:$}))]})),r(b,e({direction:"row",alignItems:"center",spacing:.75},{children:[o(y,{score:W}),o(a,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]})}))]}))}))}))}export{w as LabelReviewActionEnum,A as createLabelCheckOptions,E as default,L as isLabelReviewAction};
|
|
2
|
+
//# sourceMappingURL=LabelCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabelCheck.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as o,__spreadArray as e}from"tslib";import{jsx as i,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useCallback as n}from"react";import l from"@mui/icons-material/ChevronRight";import a from"@mui/icons-material/Close";import d from"@mui/material/Box";import c from"@mui/material/Button";import s from"@mui/material/Divider";import m from"@mui/material/IconButton";import u from"@mui/material/Paper";import p from"@mui/material/Stack";import h from"@mui/material/Typography";import f from"./CognitiveIcon.js";import g from"./CognitiveScoreBadge.js";import x from"../../assests/icons/InfoAlert.js";var b,v=function(o,i){return e([o],Array.isArray(i)?i:null==i?[]:[i],!0)};!function(o){o.YES="YES",o.NO="NO"}(b||(b={}));var C=function(o){return Object.values(b).includes(o)};function y(e){var C,y=e.headerName,F=void 0===y?"Page Type Check":y,S=e.title,w=e.pageNo,k=e.content,D=e.cognitiveScore,z=e.pageType,A=e.metadata,I=e.onActionConfirm,B=e.onCognitiveClick,N=e.onClose,T=e.showCognitiveIntegrity,W=void 0===T||T,E=e.showCloseButton,j=void 0===E||E,O=e.confirmDisabled,R=void 0!==O&&O,Y=e.disableAllActions,H=void 0!==Y&&Y,M=e.width,P=void 0===M?260:M,_=e.maxWidth,q=void 0===_?260:_,G=e.className,J=e.styles,K=null!==(C=null!=z?z:null==A?void 0:A.page_type)&&void 0!==C?C:"table",L=null!=k?k:"We're not fully confident about the format of this page. Is this page a ".concat(K,"?"),Q=H||R||!I,U=n(function(){Q||null==I||I(b.YES,{action:b.YES,pageType:K,metadata:A})},[Q,I,K,A]),V=n(function(){Q||null==I||I(b.NO,{action:b.NO,pageType:K,metadata:A})},[Q,I,K,A]);return i(u,o({className:G,elevation:0,sx:v({width:P,maxWidth:q,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",boxSizing:"border-box",boxShadow:"0 8px 16px rgba(16, 24, 40, 0.2)","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==J?void 0:J.root)},{children:i(d,o({sx:{overflow:"hidden"}},{children:r(p,o({spacing:.75,sx:{p:1}},{children:[r(p,o({direction:"row",alignItems:"center",spacing:.75,sx:null==J?void 0:J.header},{children:[i(x,{color:"error",height:16,width:16}),i(h,o({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:F})),j&&i(m,o({size:"small",onClick:N,disabled:!N,"aria-label":"Close page check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i(a,{sx:{fontSize:17}})}))]})),r(d,{children:[i(h,o({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:S})),null!=w&&i(h,o({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:w})),i(s,{sx:{my:.625}}),null!=L&&i(h,o({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:L}))]}),r(p,o({direction:"row",spacing:.75},{children:[i(c,o({variant:"outlined",fullWidth:!0,disabled:Q,onClick:V,sx:v({minHeight:32,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",borderColor:"#D0D5DD",color:"#475569",backgroundColor:"#FFFFFF","&:hover":{backgroundColor:"#F8FAFC",borderColor:"#D0D5DD"},"&.Mui-disabled":{backgroundColor:"#F3F4F6",color:"#9CA3AF",borderColor:"#E5E7EB"}},null==J?void 0:J.noButton)},{children:"No"})),i(c,o({variant:"contained",fullWidth:!0,disabled:Q,onClick:U,sx:v({minHeight:32,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==J?void 0:J.yesButton)},{children:"Yes"}))]})),i(p,o({spacing:.625,sx:null==J?void 0:J.footer},{children:W&&r(t,{children:[i(s,{}),r(d,o({onClick:B,sx:{display:"flex",justifyContent:"space-between",alignItems:"center",borderRadius:1,cursor:B?"pointer":"not-allowed","&:hover":B?{opacity:.8}:{}}},{children:[r(p,o({direction:"row",alignItems:"center",spacing:1},{children:[i(f,{sx:{color:"text.secondary"}}),i(h,o({sx:{color:"text.primary",fontSize:12}},{children:"Cognitive Integrity"}))]})),r(p,o({direction:"row",alignItems:"center",spacing:.75},{children:[i(g,{score:D}),i(l,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]})}))]}))}))}))}export{b as PageCheckActionEnum,y as default,C as isPageCheckAction};
|
|
2
|
+
//# sourceMappingURL=PageCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageCheck.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"tslib";import{jsx as o,jsxs as r}from"react/jsx-runtime";import{useState as t}from"react";import n from"@mui/icons-material/ChevronRight";import a from"@mui/icons-material/Close";import l from"@mui/material/Box";import c from"@mui/material/Button";import d from"@mui/material/ButtonBase";import s from"@mui/material/Checkbox";import m from"@mui/material/Divider";import p from"@mui/material/IconButton";import h from"@mui/material/Paper";import f from"@mui/material/Stack";import g from"@mui/material/Typography";import u from"../../assests/icons/InfoAlert.js";import x from"./CognitiveIcon.js";import b from"./CognitiveScoreBadge.js";var v=function(e,o){return i([e],Array.isArray(o)?o:null==o?[]:[o],!0)};function y(i){var y=i.title,C=i.pageNo,w=i.content,F=void 0===w?"Please check the type of this page.":w,S=i.choices,z=i.cognitiveScore,k=i.onConfirm,B=i.onCognitiveClick,I=i.onClose,A=i.showCognitiveIntegrity,T=void 0===A||A,W=i.showCloseButton,j=void 0===W||W,D=i.confirmDisabled,R=void 0!==D&&D,_=i.width,H=void 0===_?260:_,E=i.maxWidth,P=void 0===E?260:E,M=i.styles,N=t(function(){return new Set}),q=N[0],G=N[1],J=R||!k||0===q.size;return o(h,e({elevation:4,sx:v({width:H,maxWidth:P,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==M?void 0:M.root)},{children:r(f,e({spacing:.75,sx:{p:1}},{children:[r(f,e({direction:"row",alignItems:"center",spacing:.75,sx:null==M?void 0:M.header},{children:[o(u,{color:"error",height:16,width:16}),o(g,e({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:"Page Type Check"})),j&&o(p,e({size:"small",onClick:I,disabled:!I,"aria-label":"Close page type check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:o(a,{sx:{fontSize:17}})}))]})),r(l,{children:[o(g,e({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:y})),null!=C&&o(g,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:C})),o(m,{sx:{my:.625}}),null!=F&&o(g,e({sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:F}))]}),o(f,e({spacing:.625,role:"group","aria-label":"Select page types"},{children:S.map(function(i){var t,n=q.has(i.page_type);return o(h,e({variant:"outlined",sx:v({borderColor:n?"#A5B4FC":"#E2E8F0",borderRadius:2,bgcolor:n?"#F5F3FF":"#FFFFFF",overflow:"hidden"},null==M?void 0:M.option)},{children:r(d,e({disabled:R,onClick:function(){return e=i.page_type,void(R||G(function(i){var o=new Set(i);return o.has(e)?o.delete(e):o.add(e),o}));var e},sx:{width:"100%",minHeight:58,px:.75,py:.625,alignItems:"flex-start",justifyContent:"flex-start",textAlign:"left"}},{children:[o(s,{checked:n,tabIndex:-1,disableRipple:!0,inputProps:{"aria-label":i.page_type},sx:{p:.25,mr:.625,pointerEvents:"none"}}),r(l,e({sx:{minWidth:0,pt:.125}},{children:[o(g,e({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:"table"===i.page_type?"Table":"Drawing"})),o(g,e({sx:{mt:.125,color:"text.secondary",fontSize:11,lineHeight:1.35}},{children:(t=i.page_type,"table"===t?"This page contains tabular data.":"This page contains an engineering drawing.")}))]}))]}))}),i.classification_id)})})),o(c,e({variant:"contained",fullWidth:!0,disabled:J,onClick:function(){return null==k?void 0:k(Array.from(q))},sx:v({minHeight:36,borderRadius:2,bgcolor:"#5925DC",fontSize:13,fontWeight:600,textTransform:"none",boxShadow:"none","&:hover":{bgcolor:"#4A1FB8",boxShadow:"none"},"&.Mui-disabled":{bgcolor:"#D9D6FE",color:"#FFFFFF"}},null==M?void 0:M.confirmButton)},{children:"Confirm"})),T&&r(f,e({spacing:.625,sx:null==M?void 0:M.footer},{children:[o(m,{}),r(d,e({onClick:B,disabled:!B,sx:{width:"100%",justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[r(f,e({direction:"row",alignItems:"center",spacing:1},{children:[o(x,{sx:{color:"text.secondary"}}),o(g,e({sx:{color:"text.primary",fontSize:12}},{children:"Cognitive Integrity"}))]})),r(f,e({direction:"row",alignItems:"center",spacing:.5},{children:[o(b,{score:z}),o(n,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]}))]}))}))}export{y as default};
|
|
2
|
+
//# sourceMappingURL=PageTypeChoiceCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageTypeChoiceCheck.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__awaiter as r,__generator as t}from"tslib";import{jsxs as i,jsx as n}from"react/jsx-runtime";import{useState as o}from"react";import a from"@mui/material/Box";import l from"@mui/material/Button";import c from"@mui/material/ButtonBase";import d from"@mui/material/Divider";import s from"@mui/material/Stack";import h from"@mui/material/Tooltip";import m from"@mui/material/Typography";import{ChevronLeft as f}from"lucide-react";var u=function(e){var r=e.startPage,t=e.endPage;return"Pages ".concat(r,"-").concat(t)},x=function(r){var t=r.segment;return i(a,e({sx:{px:.75,py:.625,minWidth:0}},{children:[n(m,e({sx:{color:"text.secondary",fontSize:11,lineHeight:1.3,overflowWrap:"anywhere"}},{children:t.title})),n(m,e({sx:{color:"text.primary",fontSize:12,fontWeight:400,lineHeight:1.3}},{children:u(t)}))]}))};function p(u){var p=this,v=u.icon,y=u.title,C=u.pageRange,S=u.description,R=u.onRevert,w=u.onRevertComplete,W=u.onRevertError,F=u.revertData,z=u.confirmDisabled,k=void 0!==z&&z,H=u.showDocumentHeader,A=void 0===H||H,B=o(!1),E=B[0],D=B[1],T=o(!1),P=T[0],I=T[1],L=F.previousSegments.length>0,j=function(){return r(p,void 0,void 0,function(){var e,r;return t(this,function(t){switch(t.label){case 0:if(P||k)return[2];I(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,R()];case 2:return e=t.sent(),null==w||w(e),[3,5];case 3:return r=t.sent(),null==W||W(r),[3,5];case 4:return I(!1),[7];case 5:return[2]}})})};return i(s,e({spacing:.875,sx:{minWidth:0}},{children:[A&&i(a,e({sx:{minWidth:0}},{children:[n(m,e({sx:{color:"text.primary",fontSize:14,fontWeight:500,lineHeight:1.4,overflowWrap:"anywhere"}},{children:y})),n(m,e({sx:{color:"text.secondary",fontSize:12,lineHeight:1.4}},{children:C}))]})),S&&i(s,e({direction:"row",alignItems:"flex-start",spacing:.625,sx:{px:.75,py:.625,border:"1px solid #86EFAC",borderRadius:2,bgcolor:"#FFFFFF",color:"#16A34A"}},{children:[n(a,e({"aria-hidden":"true",sx:{display:"flex",flexShrink:0,mt:"1px",fontSize:14}},{children:v})),n(m,e({sx:{minWidth:0,color:"inherit",fontSize:11,lineHeight:1.5,overflowWrap:"anywhere"}},{children:S}))]})),n(d,{sx:{borderStyle:"dashed",borderColor:"#CBD5E1"}}),E?i(s,e({spacing:.75},{children:[i(c,e({onClick:function(){return D(!1)},"aria-label":"Back from revert confirmation",sx:{width:"fit-content",borderRadius:.5,color:"text.primary",fontSize:13,fontWeight:500,lineHeight:1.3,textAlign:"left"}},{children:[n(a,e({component:"span","aria-hidden":"true",sx:{mr:.625,alignItems:"center",display:"flex"}},{children:n(f,{size:16})})),"Revert"]})),i(a,L?e({sx:{p:.75,borderRadius:1,bgcolor:"#F8FAFC"}},{children:[n(m,e({sx:{mb:.375,color:"text.secondary",fontSize:12}},{children:"Current"})),n(a,e({sx:{mb:.75,border:"1px solid #E2E8F0",borderRadius:1,bgcolor:"background.paper"}},{children:n(x,{segment:F.currentSegment})})),n(m,e({sx:{mb:.375,color:"text.secondary",fontSize:12}},{children:"After Revert"})),n(a,e({sx:{border:"1px solid #E2E8F0",borderRadius:1,bgcolor:"background.paper",overflow:"hidden"}},{children:F.previousSegments.map(function(e,r){return i(a,{children:[r>0&&n(d,{sx:{borderColor:"#E2E8F0"}}),n(x,{segment:e})]},"".concat(e.title,"-").concat(e.startPage,"-").concat(e.endPage,"-").concat(r))})})),i(s,e({direction:"row",spacing:1,sx:{mt:.875}},{children:[n(l,e({variant:"outlined",fullWidth:!0,disabled:P,onClick:function(){return D(!1)},sx:g},{children:"Cancel"})),n(h,e({title:k?"Revert data is not present, cannot revert this":"",disableHoverListener:!k,arrow:!0},{children:n("span",e({style:{flex:1}},{children:n(l,e({variant:"contained",fullWidth:!0,disabled:P||k,onClick:function(){j()},sx:b},{children:P?"Reverting…":"Confirm"}))}))}))]}))]}):e({sx:{p:.875,borderRadius:1,bgcolor:"#F8FAFC"}},{children:[n(m,e({sx:{color:"text.secondary",fontSize:12,fontWeight:500}},{children:"Revert approval?"})),n(m,e({sx:{mt:.75,color:"text.secondary",fontSize:13,lineHeight:1.45}},{children:"This document will be moved back to pending review and will need to be confirmed again."})),i(s,e({direction:"row",spacing:1,sx:{mt:1}},{children:[n(l,e({variant:"outlined",fullWidth:!0,disabled:P,onClick:function(){return D(!1)},sx:g},{children:"Cancel"})),n(h,e({title:k?"Revert data is not present, cannot revert this":"",disableHoverListener:!k,arrow:!0},{children:n("span",e({style:{flex:1}},{children:n(l,e({variant:"contained",fullWidth:!0,disabled:P||k,onClick:function(){j()},sx:b},{children:P?"Reverting…":"Confirm"}))}))}))]}))]}))]})):n(l,e({variant:"outlined",fullWidth:!0,onClick:function(){return D(!0)},sx:{minHeight:36,borderColor:"#9B8AFB",color:"#5925DC",borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none","&:hover":{borderColor:"secondary.dark",bgcolor:"rgba(79, 70, 229, 0.04)"}}},{children:"Revert"}))]}))}var g={minHeight:34,borderColor:"#94A3B8",color:"#64748B",borderRadius:"8px",fontSize:12,fontWeight:500,textTransform:"none"},b={minHeight:34,borderRadius:"8px",bgcolor:"#4F46E5",fontSize:12,fontWeight:500,textTransform:"none",boxShadow:"none","&:hover":{bgcolor:"#4338CA",boxShadow:"none"}};export{p as default};
|
|
2
|
+
//# sourceMappingURL=RevertCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RevertCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +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,u=c.reviewLabel,F=void 0===u?"Review":u;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})),h?i(a,r({sx:{mt:.75,color:"#07883F",fontSize:14,lineHeight:1.55}},{children:h})):null]}),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
|
+
//# sourceMappingURL=RevertSuccessCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RevertSuccessCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as r}from"tslib";import{jsxs as o,jsx as e}from"react/jsx-runtime";import i from"@mui/material/Box";import t from"@mui/material/Typography";import{GitMerge as l}from"lucide-react";function a(a){var m=a.children;return o(i,r({sx:{display:"flex",alignItems:"flex-start",gap:1,px:1,py:1.125,border:"1px solid #FACC15",borderRadius:1.5,bgcolor:"#FFFBEB",color:"#D18A00"}},{children:[e(l,{size:18,strokeWidth:2.25,style:{flex:"0 0 auto",marginTop:1}}),e(t,r({component:"div",sx:{color:"inherit",fontSize:12,lineHeight:1.5,overflowWrap:"anywhere"}},{children:m}))]}))}export{a as default};
|
|
2
|
+
//# sourceMappingURL=RevertSummaryNotice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RevertSummaryNotice.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useMemo as r,useState as o}from"react";import n from"@mui/icons-material/ExpandMore";import l from"@mui/material/Box";import d from"@mui/material/Button";import a from"@mui/material/ButtonBase";import s from"@mui/material/Divider";import c from"@mui/material/Paper";import u from"@mui/material/Radio";import m from"@mui/material/Stack";import p from"@mui/material/TextField";import f from"@mui/material/Typography";import{BoundaryReviewActionEnum as h}from"./BoundaryCard.js";import x from"../../assests/icons/InfoAlert.js";var g="MERGE_ADJACENT",b=function(e){return(null==e?void 0:e.additional_decisions)?Array.from(new Set(Object.values(e.additional_decisions).flat())).filter(function(e){return Object.values(h).includes(e)}):[]};function E(E){var C=E.metadata,F=E.reviewAction,v=E.startPage,S=E.endPage,A=E.title,R=void 0===A?"this document":A,y=E.previousSegmentTitle,w=E.nextSegmentTitle,M=E.disabled,T=void 0!==M&&M,z=E.onConfirm,I=r(function(){return b(F)},[F]),_=r(function(){return function(e,i,t,r){var o=i.focus_page,n=null!=o&&o===t,l=null!=o&&(o===r||o===r+1),d=[];if(e.some(function(e){return e.includes("MERGE")})&&d.push(t===r||!n&&!l?{id:g,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}:n?{id:h.MERGE_PREVIOUS,title:"Merge with previous document",description:"Combine this document with the previous document."}:{id:h.MERGE_NEXT,title:"Merge with next document",description:"Combine this document with the next document."}),e.includes(h.SPLIT_HERE)){var a=null!=o&&o>t&&o<r;d.push({id:h.SPLIT_HERE,title:"Split to a separate document",description:a?"Start a new document at page ".concat(o,"."):"A valid page inside the document is required to split it.",disabled:!a})}return d}(I,C,v,S)},[I,S,C,v]),G=o(null),W=G[0],D=G[1],N=o(null),P=N[0],k=N[1],B=o(String(v)),j=B[0],H=B[1],O=o(String(S)),U=O[0],V=O[1],X=o(!1),L=X[0],q=X[1],J=o(!1),$=J[0],K=J[1],Q=I.includes(h.SET_RANGE);if(0===_.length&&!Q)return null;var Y=null==W?void 0:_[W],Z=(null==Y?void 0:Y.id)===g,ee=null!=y,ie=null!=w,te=function(e){return!0===e.disabled||e.id===h.MERGE_PREV&&!ee||e.id===h.MERGE_PREVIOUS&&!ee||e.id===h.MERGE_NEXT&&!ie||e.id===g&&!ee&&!ie},re=Number(j),oe=Number(U),ne=""!==j.trim()&&""!==U.trim()&&Number.isInteger(re)&&Number.isInteger(oe)&&re>0&&re<=oe,le=T||!Y||te(Y)||Z&&null==P;return i(m,e({spacing:.75},{children:[t(s,{}),t(f,e({sx:{color:"text.primary",fontSize:12,fontWeight:600}},{children:"Additional actions"})),t(m,e({spacing:.625,role:"radiogroup","aria-label":"Additional boundary actions"},{children:_.map(function(r,o){var n=W===o,d=te(r);return i(c,e({variant:"outlined",sx:{borderColor:n?"#7F56D9":"divider",borderRadius:2,bgcolor:d?"#F8FAFC":"background.paper",overflow:"hidden"}},{children:[i(a,e({role:"radio","aria-checked":n,disabled:T||d,onClick:function(){D(o),r.id!==g&&k(null)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[t(u,{checked:n,disabled:T||d,tabIndex:-1,size:"small",sx:{p:.25,mr:.5}}),i(l,e({sx:{minWidth:0}},{children:[t(f,e({sx:{color:d?"#94A3B8":"text.primary",fontSize:12.5,fontWeight:500}},{children:r.title})),null!=r.description&&t(f,e({sx:{mt:.125,color:d?"#94A3B8":"text.secondary",fontSize:11}},{children:r.description}))]}))]})),n&&Z&&t(m,e({direction:"row",spacing:.75,sx:{px:.75,pb:.75}},{children:[["previous",null!=y?y:"No previous document",ee],["next",null!=w?w:"No next document",ie]].map(function(i){var r=i[0],o=i[1],n=i[2];return t(a,e({disabled:T||!n,onClick:function(){return k(r)},"aria-pressed":P===r,sx:{flex:1,minWidth:0,minHeight:42,alignItems:"flex-start",justifyContent:"flex-start",p:.625,border:"1px solid",borderColor:P===r?"#7F56D9":"#D0D5DD",borderRadius:1.5,color:n?"text.primary":"#98A2B3",textAlign:"left"}},{children:t(f,e({sx:{color:"inherit",fontSize:11,fontWeight:500,overflowWrap:"anywhere"}},{children:o}))}),r)})}))]}),r.id)})})),t(d,e({variant:"contained",fullWidth:!0,disabled:le,onClick:function(){if(!le&&Y&&null!=W){var i=Z?"previous"===P?h.MERGE_PREVIOUS:h.MERGE_NEXT:Y.id;z(i,{selectedIndex:W,option:e(e({},Y),{id:i}),metadata:C})}},sx:{minHeight:32,borderRadius:2,bgcolor:"#5925DC",fontSize:13,fontWeight:600,textTransform:"none","&:hover":{bgcolor:"#4A1FB8"}}},{children:"Confirm"})),Q&&i(m,e({spacing:.625},{children:[i(a,e({disabled:T,onClick:function(){var e=!L;q(e),K(!1),e&&(D(null),k(null))},"aria-expanded":L,sx:{width:"100%",justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[t(f,e({sx:{color:"text.primary",fontSize:12,fontWeight:600}},{children:"Set a custom boundary"})),t(n,{sx:{color:"text.secondary",fontSize:16,transform:L?"rotate(180deg)":"none",transition:"transform 150ms ease"}})]})),L&&!$&&i(l,e({sx:{pt:.5,fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif'}},{children:[i(l,e({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[t(f,e({sx:{fontSize:"10.5px",lineHeight:"14px",color:"#57697E"}},{children:"Starts"})),t(f,e({sx:{fontSize:"10.5px",lineHeight:"14px",color:"#57697E"}},{children:"Ends"}))]})),t(l,e({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[[j,H],[U,V]].map(function(e,i){var r=e[0],o=e[1];return t(p,{size:"small",type:"text",value:r,disabled:T,error:1===i&&""!==j.trim()&&""!==U.trim()&&re>oe,onChange:function(e){return/^\d*$/.test(e.target.value)&&o(e.target.value)},inputProps:{inputMode:"numeric",pattern:"[0-9]*"},sx:{"& .MuiOutlinedInput-root":{height:"30px",bgcolor:"#FFFFFF","& fieldset":{borderColor:"#C3CFDC",borderRadius:"6px"},"&:hover fieldset":{borderColor:"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{height:"30px",p:"0 10px",color:"#34445A",fontSize:"12px"}}},0===i?"starts":"ends")})})),t(d,e({onClick:function(){return K(!0)},disabled:T||!ne,sx:{height:"30px",px:"12px",bgcolor:"#FFFFFF",border:"1px solid #8E80F3",borderRadius:"6px",color:"#4A24CF",fontSize:"12px",fontWeight:600,textTransform:"none","&:hover":{bgcolor:"#FAF9FF",borderColor:"#7F6FF0"},"&.Mui-disabled":{bgcolor:"#FFFFFF",borderColor:"#C3CFDC",color:"#A0ABBE"}}},{children:"Apply"})),t(l,{sx:{width:"100%",height:"1px",mt:"8px",bgcolor:"#EEF0F2"}})]})),L&&$&&i(m,e({spacing:.75,sx:{p:.75,borderRadius:1.5,bgcolor:"#FFF7ED"}},{children:[i(m,e({direction:"row",alignItems:"center",spacing:.5},{children:[t(x,{color:"warning",height:14,width:14}),t(f,e({sx:{color:"#EA580C",fontSize:11,fontWeight:600}},{children:"Confirm this change?"}))]})),i(f,e({sx:{color:"text.secondary",fontSize:10.5,lineHeight:1.4}},{children:["Pages ",re,"-",oe," will become part of ",R,", including pages from other documents in this range."]})),i(m,e({direction:"row",spacing:.75},{children:[t(d,e({variant:"outlined",fullWidth:!0,onClick:function(){return K(!1)},sx:{minHeight:28,borderRadius:1.5,fontSize:11,textTransform:"none"}},{children:"Cancel"})),t(d,e({variant:"contained",fullWidth:!0,disabled:T,onClick:function(){if(!T&&ne){var e={id:h.SET_RANGE,title:"Set a custom boundary"};z(h.SET_RANGE,{selectedIndex:-1,option:e,metadata:C,startPage:re,endPage:oe})}},sx:{minHeight:28,borderRadius:1.5,bgcolor:"#EA580C",fontSize:11,textTransform:"none","&:hover":{bgcolor:"#C2410C"}}},{children:"Confirm"}))]}))]}))]}))]}))}export{E as default,b as getAdditionalBoundaryActions};
|
|
2
|
+
//# sourceMappingURL=ReviewedBoundaryActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewedBoundaryActions.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as i,__spreadArray as e}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import t from"@mui/icons-material/ChevronRight";import n from"@mui/icons-material/Close";import l from"@mui/material/Box";import a from"@mui/material/ButtonBase";import c from"@mui/material/Divider";import d from"@mui/material/IconButton";import s from"@mui/material/Paper";import m from"@mui/material/Stack";import h from"@mui/material/Typography";import p from"../../assests/icons/InfoAlert.js";import x from"./CognitiveIcon.js";import f from"./CognitiveScoreBadge.js";var u=function(i,o){return e([i],Array.isArray(o)?o:null==o?[]:[o],!0)};function g(e){var g=e.headerName,v=void 0===g?"Reviewed":g,w=e.headerIcon,y=e.title,b=e.pageNo,C=e.summary,W=e.additionalActions,S=e.cognitiveScore,I=e.onCognitiveClick,k=e.onClose,z=e.cognitiveLabel,A=void 0===z?"Cognitive Integrity":z,B=e.showCognitiveIntegrity,j=void 0===B||B,N=e.showCloseButton,R=void 0===N||N,D=e.width,F=void 0===D?260:D,T=e.maxWidth,E=void 0===T?260:T,H=e.className,L=e.styles;return o(s,i({className:H,elevation:4,sx:u({width:F,maxWidth:"min(".concat(E,"number"==typeof E?"px, 100%)":", 100%)"),minWidth:0,flexShrink:1,borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box",boxShadow:"0 8px 16px rgba(16, 24, 40, 0.16)","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==L?void 0:L.root)},{children:[o(m,i({direction:"row",alignItems:"center",spacing:.75,sx:u({minWidth:0,px:1.25,py:1,bgcolor:"#ECFDF5",color:"#16A34A"},null==L?void 0:L.header)},{children:[null!=w?w:r(p,{color:"success",height:16,width:16}),r(h,i({sx:{flex:1,minWidth:0,color:"inherit",fontSize:13,fontWeight:500,lineHeight:1.25,textTransform:"uppercase",overflowWrap:"anywhere"}},{children:v})),R&&r(d,i({size:"small",onClick:k,disabled:!k,"aria-label":"Close reviewed card",sx:{p:0,color:"#475569","&.Mui-disabled":{color:"text.secondary"}}},{children:r(n,{sx:{fontSize:17}})}))]})),o(m,i({spacing:.875,sx:{px:1.25,pt:1.25,pb:1}},{children:[o(l,{children:[r(h,i({sx:{color:"text.primary",fontSize:14,fontWeight:500,overflowWrap:"anywhere"}},{children:y})),null!=b&&r(h,i({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:b}))]}),null!=C&&r(m,i({sx:null==L?void 0:L.content},{children:C})),null!=W&&r(m,{children:W}),j&&o(m,i({spacing:.625,sx:null==L?void 0:L.footer},{children:[r(c,{}),o(a,i({onClick:I,disabled:!I,sx:{width:"100%",minWidth:0,justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:I?"pointer":"not-allowed"}},{children:[o(m,i({direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,flex:1}},{children:[r(x,{sx:{color:"text.secondary"}}),r(h,i({sx:{minWidth:0,color:"text.primary",fontSize:12,overflowWrap:"anywhere"}},{children:A}))]})),o(m,i({direction:"row",alignItems:"center",spacing:.5,sx:{flexShrink:0}},{children:[r(f,{score:S}),r(t,{sx:{color:"text.secondary"}})]}))]}))]}))]}))]}))}export{g as default};
|
|
2
|
+
//# sourceMappingURL=ReviewedCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewedCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as e,__assign as n,__awaiter as t,__generator as i}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as a,useState as l,useEffect as u,useRef as d,useCallback as s}from"react";import{SpecialZoomLevel as c}from"@react-pdf-viewer/core";import v from"../PdfViewer/PdfViewer.js";import g,{BoundaryReviewActionEnum as p,isBoundaryReviewAction as m}from"./BoundaryCard.js";import f from"./CardWrapper.js";import h from"./CognitiveIntegrity.js";import b from"./LabelCheck.js";import w,{PageCheckActionEnum as y}from"./PageCheck.js";import _ from"./PageTypeChoiceCheck.js";import{extractSegmentReviewData as x,getSegmentReviewKey as S}from"./reviewStepAdapters.js";import{CircleCheck as C,Check as E,GitMerge as k}from"lucide-react";import{Typography as P,Tooltip as I,Portal as R,Box as N}from"@mui/material";import M from"./ReviewedCard.js";import A from"./ReviewedBoundaryActions.js";import F from"./RevertCard.js";import T from"./RevertSuccessCard.js";import{getPendingMergeImpactedSegmentKeys as B,hasPolledStructuralAction as W,getOptimisticMergeImpactedSegmentKeys as L,shouldHideStructuralBoundaryReview as z,getResolvedScore as j,getConfidenceColors as q,getBoundaryReviewActionBadgeLabel as G,getTitleReviewActionBadgeLabel as O,isReviewStepResolutionCurrent as D,isReviewStepResolved as V,formatScore as H}from"./helper.js";import U from"./ChartBreakoutCircle.js";import{getReviewScoreBand as X}from"./reviewScore.js";var Y,J,Z=260;!function(e){e.ActualSize="ActualSize",e.PageFit="PageFit",e.PageWidth="PageWidth"}(J||(J={}));var $=((Y={})[J.ActualSize]=c.ActualSize,Y[J.PageFit]=c.PageFit,Y[J.PageWidth]=c.PageWidth,Y),K=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}};function Q(Y){var J,Q,ee,ne,te,ie,re,oe,ae,le,ue,de,se,ce,ve,ge,pe,me,fe,he,be,we,ye,_e,xe,Se,Ce,Ee,ke,Pe,Ie,Re,Ne,Me,Ae,Fe,Te=this,Be=Y.pdfUrl,We=Y.pdfName,Le=Y.segments,ze=Y.totalPages,je=Y.styles,qe=Y.pdfViewerProps,Ge=Y.specialZoomLevel,Oe=Y.showBadges,De=void 0===Oe||Oe,Ve=Y.sortByConfidence,He=void 0===Ve?"low":Ve,Ue=Y.filterByConfidence,Xe=void 0===Ue?"all":Ue,Ye=Y.showBadgeNavigation,Je=void 0===Ye||Ye,Ze=Y.autoSelectReviewOnPageChange,$e=void 0!==Ze&&Ze,Ke=Y.autoAdvanceAfterConfirm,Qe=void 0===Ke||Ke,en=Y.autoAdvanceScoreBand,nn=Y.badgePreloadPages,tn=void 0===nn?8:nn,rn=Y.badgeOffsetTop,on=void 0===rn?20:rn,an=Y.badgeOffsetRight,ln=void 0===an?68:an,un=Y.badgeOffsetLeft,dn=void 0===un?0:un,sn=Y.initialReviewId,cn=Y.manualPrompt,vn=Y.heightBuffer,gn=Y.onBoundaryAction,pn=Y.onLabelAction,mn=Y.onPageAction,fn=Y.onPageTypeRevert,hn=Y.onRevert,bn=Y.onActiveReviewChange,wn=Y.onCurrentPageChange,yn=Y.onActionError,_n=Y.disableAllActions,xn=void 0!==_n&&_n,Sn=Y.disablePdfAnnotations,Cn=void 0!==Sn&&Sn,En=Y.disablePdfTextLayer,kn=void 0===En||En,Pn=Y.disableTitleCheckUntilBoundaryCheckCompleted,In=void 0!==Pn&&Pn,Rn=Y.onAdjustManually,Nn=Y.onCognitiveClick,Mn=Y.className,An=Y.style,Fn=Y.viewerStyle,Tn=Y.railStyle,Bn=Y.redirectionData,Wn=Y.onBadgeSelected;console.log("LOG: TOTAL PAGE IN PARENT",ze);var Ln=a(function(){return x(Le)},[Le]),zn=Ln.boundaryReviews,jn=Ln.labelReviews,qn=Ln.pageReviews,Gn=l(function(){return new Map}),On=Gn[0],Dn=Gn[1],Vn=l(function(){return new Set}),Hn=Vn[0],Un=Vn[1],Xn=a(function(){var e=new Map,n=1;return Le.forEach(function(t,i){var r=S(t,i);e.has(r)||(e.set(r,n),n+=1)}),e},[Le]),Yn=a(function(){return new Set(jn.map(function(e){return S(e.segment)}))},[jn]),Jn=a(function(){return B(Le)},[Le]);u(function(){Dn(function(e){var n=!1,t=new Map(e);return e.forEach(function(e,i){var r=Le.find(function(e){return S(e)===i});r&&!W(r,e)||(t.delete(i),n=!0)}),n?t:e})},[Le]),u(function(){Un(function(e){var n=!1,t=new Set(e);return e.forEach(function(e){On.has(e)||(t.delete(e),n=!0)}),n?t:e})},[On]);var Zn=a(function(){return L(Le,On,Hn)},[Hn,On,Le]),$n=d(null),Kn=a(function(){return e(e(e([],zn.filter(function(e){return!Jn.has(S(e.segment))&&!Zn.has(S(e.segment))&&!z(e.review_step,e.segment,Yn.has(S(e.segment)),On.get(S(e.segment)))}).map(function(e){var t;return n(n({},e),{kind:"boundary",pageNumber:null!==(t=e.metadata.focus_page)&&void 0!==t?t:e.segment.start_page})}),!0),jn.filter(function(e){return!Jn.has(S(e.segment))&&!Zn.has(S(e.segment))}).map(function(e){return n(n({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0),qn.filter(function(e){return!Jn.has(S(e.segment))&&!Zn.has(S(e.segment))}).map(function(e){var t;return n(n({},e),{kind:"page",pageNumber:null!==(t=e.metadata.page_num)&&void 0!==t?t:e.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=Xn.get(S(e.segment)))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(i=Xn.get(S(n.segment)))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-o||e.reviewStepIndex-n.reviewStepIndex||e.id.localeCompare(n.id)})},[zn,jn,qn,Zn,On,Jn,Xn,Yn]),Qn=a(function(){return Le.map(function(e){var t,i;return n(n({},e),{title:(null===(t=e.label)||void 0===t?void 0:t.trim())||e.title,page_count:null!==(i=e.page_count)&&void 0!==i?i:e.end_page-e.start_page+1})})},[Le]),et=l(1),nt=et[0],tt=et[1],it=l(null!=sn?sn:null),rt=it[0],ot=it[1],at=l(null!=sn?sn:null),lt=at[0],ut=at[1],dt=l(!1),st=dt[0],ct=dt[1],vt=l(null),gt=vt[0],pt=vt[1],mt=l(null),ft=mt[0],ht=mt[1],bt=l(function(){return new Set}),wt=bt[0],yt=bt[1],_t=l(null),xt=_t[0],St=_t[1],Ct=l(null),Et=Ct[0],kt=Ct[1],Pt=l(null),It=Pt[0],Rt=Pt[1],Nt=l(!1),Mt=Nt[0],At=Nt[1],Ft=d(0),Tt=d(null),Bt=d(null),Wt=d(new Map),Lt=d(null),zt=d(null),jt=d(null),qt=l(Z),Gt=qt[0],Ot=qt[1],Dt=null!==(Q=null===(J=null==je?void 0:je.aside)||void 0===J?void 0:J.width)&&void 0!==Q?Q:"40%",Vt="min(".concat("number"==typeof Dt?"".concat(Dt,"px"):Dt,", ").concat(Z,"px, 100%)");u(function(){yt(function(e){if(0===e.size)return e;var n=new Set(e),t=!1;return Kn.forEach(function(e){var i;null!=(null===(i=e.review_step.review)||void 0===i?void 0:i.action)&&n.has(e.id)&&(n.delete(e.id),t=!0)}),t?n:e})},[Kn]),u(function(){var e=$n.current;if(e&&De){var n=function(){var n=e.getBoundingClientRect().width;n>0&&Ot(n)};n();var t="undefined"==typeof ResizeObserver?null:new ResizeObserver(n);return null==t||t.observe(e),function(){return null==t?void 0:t.disconnect()}}},[De]);var Ht=a(function(){var e=new Set;return Kn.forEach(function(n){var t;null!=(null===(t=n.review_step.review)||void 0===t?void 0:t.action)&&e.add(n.id)}),e},[Kn]),Ut=a(function(){var e;return null!==(e=Kn.find(function(e){return e.id===rt}))&&void 0!==e?e:null},[rt,Kn]),Xt=a(function(){return!(!In||"label"!==(null==Ut?void 0:Ut.kind))&&zn.some(function(e){if(S(e.segment)!==S(Ut.segment)||Ht.has(e.id))return!1;var n=j(e.review_step.score,e.review_step.confidence);return null==n||n<85})},[Ut,zn,In,Ht]),Yt=null==Ut?-1:Le.findIndex(function(e){return S(e)===S(Ut.segment)}),Jt=Yt>0?Le[Yt-1]:void 0,Zt=Yt>=0?Le[Yt+1]:void 0,$t=(null===(ee=null==Jt?void 0:Jt.label)||void 0===ee?void 0:ee.trim())||(null==Jt?void 0:Jt.title),Kt=(null===(ne=null==Zt?void 0:Zt.label)||void 0===ne?void 0:ne.trim())||(null==Zt?void 0:Zt.title),Qt=q(null==Ut?void 0:Ut.review_step.score,null==Ut?void 0:Ut.review_step.confidence,null===(te=null==Ut?void 0:Ut.segment.confidence)||void 0===te?void 0:te.awaiting_llm),ei=(null===(ie=null==Ut?void 0:Ut.review_step.reasons)||void 0===ie?void 0:ie.length)?Ut.review_step.reasons:null!==(oe=null===(re=null==Ut?void 0:Ut.segment.confidence)||void 0===re?void 0:re.reasons)&&void 0!==oe?oe:[],ni=Boolean(ei.some(function(e){return e.text.trim()&&["evidence","gap"].includes(e.type.trim().toLowerCase())})||(null===(ae=null==Ut?void 0:Ut.review_step.reason)||void 0===ae?void 0:ae.trim())||(null===(le=null==Ut?void 0:Ut.review_step.gap)||void 0===le?void 0:le.trim())),ti=null==Ut?null:"boundary"===Ut.kind?G(Ut.review_step,Ut.segment,On.get(null!==(ue=Ut.segment.stable_key)&&void 0!==ue?ue:"")):O(Ut.review_step,Ut.segment,On.get(null!==(de=Ut.segment.stable_key)&&void 0!==de?de:"")),ii="label"===(null==Ut?void 0:Ut.kind)?[ti,Ut.review_step.human_action_enum,null===(se=Ut.review_step.review)||void 0===se?void 0:se.action,null===(ce=Ut.review_step.human_resolution)||void 0===ce?void 0:ce.action]:[],ri="label"===(null==Ut?void 0:Ut.kind)&&ii.some(function(e){var n,t=null!==(n=null==e?void 0:e.trim().toUpperCase())&&void 0!==n?n:"";return t.includes("MERGE")||t.includes("SPLIT")}),oi=null!=Ut&&Kn.some(function(e){return"boundary"===e.kind&&S(e.segment)===S(Ut.segment)}),ai=ri&&!oi,li=("boundary"===(null==Ut?void 0:Ut.kind)||ai)&&null!=Ut?function(){var e,t,i,r,o,a;if("boundary"===Ut.kind)return Ut;var l=zn.find(function(e){return S(e.segment)===S(Ut.segment)});return l?n(n({},l),{kind:"boundary",pageNumber:null!==(e=l.metadata.focus_page)&&void 0!==e?e:l.segment.start_page}):n(n({},Ut),{kind:"boundary",pageNumber:null!==(i=null===(t=Ut.segment.review_action)||void 0===t?void 0:t.focus_page)&&void 0!==i?i:Ut.segment.start_page,metadata:{focus_page:null!==(o=null===(r=Ut.segment.review_action)||void 0===r?void 0:r.focus_page)&&void 0!==o?o:null,boundary_margin:null!==(a=Ut.segment.boundary_margin)&&void 0!==a?a:null,user_actions:[]}})}():void 0,ui=null==Ut?"":(null===(ve=Ut.segment.label)||void 0===ve?void 0:ve.trim())||Ut.segment.title,di=null==Ut?void 0:Ut.review_step.revert,si=null==Ut?void 0:Ut.segment.revert,ci=function(e){return null==e?void 0:e.trim().toLowerCase()},vi=null==Ut||null===(pe=e([],null!==(ge=Ut.segment.review_steps)&&void 0!==ge?ge:[],!0).reverse().find(function(e){var n,t,i=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===i||"page boundary review"===i)&&"boundary"===ci(null===(t=e.revert)||void 0===t?void 0:t.type)}))||void 0===pe?void 0:pe.revert,gi=null!==(me=null!=di?di:null==Ut?void 0:Ut.segment.revert)&&void 0!==me?me:vi,pi=null==gi?void 0:gi.decision.trim().toUpperCase();null!=ti||(null==pi?void 0:pi.includes("SPLIT"))||null==pi||pi.includes("MERGE");var mi="label"===(null==Ut?void 0:Ut.kind)&&"SET_RANGE"===(null===(fe=null==vi?void 0:vi.decision)||void 0===fe?void 0:fe.trim().toUpperCase())&&vi.current_segment_ids.length!==vi.previous_state.length,fi="Merged"===ti||"Split"===ti||mi,hi=null==Ut?void 0:fi?"boundary"===ci(null==vi?void 0:vi.type)?vi:"boundary"===ci(null==si?void 0:si.type)?si:"boundary"===ci(null==di?void 0:di.type)?di:void 0:"label"===Ut.kind?"label"===ci(null==di?void 0:di.type)?di:void 0:"boundary"===Ut.kind?"boundary"===ci(null==di?void 0:di.type)?di:"boundary"===ci(null==vi?void 0:vi.type)?vi:"boundary"===ci(null==si?void 0:si.type)?si:void 0:void 0,bi=fi&&(null==hi?void 0:hi.operation_id)?Le.flatMap(function(e){var n;return null!==(n=e.review_steps)&&void 0!==n?n:[]}).find(function(e){var n,t,i,r,o,a,l,u=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===u||"page boundary review"===u)&&((null!==(o=null!==(i=null===(t=e.human_resolution)||void 0===t?void 0:t.operation_id)&&void 0!==i?i:null===(r=e.revert)||void 0===r?void 0:r.operation_id)&&void 0!==o?o:e.operation_id)===hi.operation_id&&Boolean(null===(l=null===(a=e.human_resolution)||void 0===a?void 0:a.change_summary)||void 0===l?void 0:l.trim()))}):void 0,wi=(null===(he=null==hi?void 0:hi.summary)||void 0===he?void 0:he.trim())||null,yi=fi?(null===(we=null===(be=null==bi?void 0:bi.human_resolution)||void 0===be?void 0:be.change_summary)||void 0===we?void 0:we.trim())||(null===(ye=null==hi?void 0:hi.summary)||void 0===ye?void 0:ye.trim())||"":(null===(Se=null===(xe=null===(_e=null==Ut?void 0:Ut.review_step)||void 0===_e?void 0:_e.human_resolution)||void 0===xe?void 0:xe.change_summary)||void 0===Se?void 0:Se.trim())||(null===(Ee=null===(Ce=null==Ut?void 0:Ut.review_step)||void 0===Ce?void 0:Ce.summary)||void 0===Ee?void 0:Ee.trim())||"",_i=Ut&&hi?{currentSegment:{title:ui,startPage:Ut.segment.start_page,endPage:Ut.segment.end_page},previousSegments:(null!==(ke=hi.previous_state)&&void 0!==ke?ke:[]).flatMap(function(e){var n,t=null===e.label?"Untitled document":null===(n=e.label)||void 0===n?void 0:n.trim();return t?[{title:t,startPage:e.start_page,endPage:e.end_page}]:[]})}:null,xi="page"===(null==Ut?void 0:Ut.kind)&&null!==(Pe=Ut.metadata.classification_id)&&void 0!==Pe?Pe:null,Si="page"===(null==Ut?void 0:Ut.kind)?Boolean(fn&&xi):Boolean((null==hi?void 0:hi.operation_id)&&(null==hi?void 0:hi.type)&&!1!==(null==hi?void 0:hi.revertable)),Ci=Boolean(_i&&Si&&("page"!==(null==Ut?void 0:Ut.kind)||xi)),Ei=s(function(e,n){Ft.current+=1,Tt.current={requestId:Ft.current,pageNumber:e,reviewId:n},ht({pageNumber:e,requestId:Ft.current})},[]),ki=s(function(e){var n,t;!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)&&(null==Wn||Wn({reviewId:e.id,segment_id:null!==(t=e.segment.segment_id)&&void 0!==t?t:null,reviewStepIndex:e.reviewStepIndex,kind:e.kind,pageNumber:e.pageNumber,metadata:e.metadata}),kt(null),Rt(null),ot(e.id),ut(e.id),ct(!1),pt(null),Ei(e.pageNumber,e.id),null==bn||bn(e.id,e.segment))},[bn,Wn,Ei]);u(function(){if(It){var e=requestAnimationFrame(function(){return At(!0)}),n=window.setTimeout(function(){At(!1)},3500),t=window.setTimeout(function(){Rt(null)},4e3);return function(){cancelAnimationFrame(e),window.clearTimeout(n),window.clearTimeout(t)}}},[It]),u(function(){var e,n,t,i;if(Bn){if("pageGroup"===Bn.type){var r=null!==(e=Bn.pages)&&void 0!==e?e:[],o=null!==(n=Bn.pageIndex)&&void 0!==n?n:0,a=r[o];if(null==a)return;return Pi(),kt({pages:r,index:o,label:null!==(t=Bn.groupLabel)&&void 0!==t?t:""}),Ft.current+=1,void ht({pageNumber:a,requestId:Ft.current})}if(kt(null),Bn.reviewId){var l=Kn.find(function(e){return e.id===Bn.reviewId&&(!Bn.type||e.kind===Bn.type)});if(l)return void ki(l)}if(Bn.classificationId){var u=Kn.find(function(e){var n;return"page"===e.kind&&(e.metadata.classification_id===Bn.classificationId||(null===(n=e.metadata.type_choices)||void 0===n?void 0:n.some(function(e){return e.classification_id===Bn.classificationId})))&&(!Bn.segmentId||e.segment.segment_id===Bn.segmentId)&&(!Bn.type||e.kind===Bn.type)});if(u)return void ki(u)}if(Bn.pageNumber&&Bn.type){var d=Number(Bn.pageNumber);if(Number.isInteger(d)&&!(d<1)){var s=null===(i=Bn.pageType)||void 0===i?void 0:i.trim().toLowerCase(),c=Kn.find(function(e){var n,t="page"===e.kind?e.pageNumber:e.segment.start_page,i="page"!==e.kind||!s||e.metadata.page_type===s||(null===(n=e.metadata.type_choices)||void 0===n?void 0:n.some(function(e){return e.page_type===s}));return(!Bn.segmentId||e.segment.segment_id===Bn.segmentId)&&t===d&&e.kind===Bn.type&&i});c?ki(c):"page"===Bn.type&&(Pi(),Ft.current+=1,ht({pageNumber:d,requestId:Ft.current}))}}}},[Bn,ki,Kn]);var Pi=s(function(){Tt.current=null,ct(!1),ot(null),pt(null),null==bn||bn(null,null)},[bn]),Ii=s(function(e){var n;At(!1),Rt(null);var t=null!==(n=Kn.find(function(n){return!Ht.has(n.id)&&"boundary"===n.kind&&n.segment.start_page===e.startPage&&n.segment.end_page===e.endPage}))&&void 0!==n?n:Kn.find(function(n){return!Ht.has(n.id)&&n.segment.start_page<=e.startPage&&n.segment.end_page>=e.startPage});t?ki(t):(Pi(),Ft.current+=1,ht({pageNumber:e.startPage,requestId:Ft.current}))},[Pi,Ht,Kn,ki]),Ri=s(function(e,n){var t,i=X(e.review_step.score),r=null==en||i===en,o=wt.has(e.id)&&D(e.review_step,e.segment);return e.id!==n&&r&&!0!==(null===(t=e.segment.confidence)||void 0===t?void 0:t.awaiting_llm)&&!V(e.review_step,e.segment)&&!o},[en,wt]),Ni=s(function(e){var n;if(Qe){var t=Kn.findIndex(function(n){return n.id===e}),i=null!==(n=Kn.find(function(n,i){return i>t&&Ri(n,e)}))&&void 0!==n?n:Kn.find(function(n){return Ri(n,e)});i?requestAnimationFrame(function(){return ki(i)}):Pi()}else Pi()},[Qe,Pi,Ri,Kn,ki]),Mi=s(function(n,r){return t(Te,void 0,void 0,function(){var t,o,a,l,u,d,s,c,v,g;return i(this,function(i){switch(i.label){case 0:if(xn||!mn||0===r.length)return[2];if(2!==(t=null!==(g=n.metadata.type_choices)&&void 0!==g?g:[]).length)return[2];o=new Set(r),a=K(n),l=e([],t,!0).sort(function(e,n){var t=o.has(e.page_type);return t===o.has(n.page_type)?0:t?-1:1}),St(n.id),i.label=1;case 1:i.trys.push([1,6,7,8]),u=0,d=l,i.label=2;case 2:return u<d.length?(s=d[u],c=o.has(s.page_type)?y.YES:y.NO,[4,mn(c,{action:c,pageType:s.page_type,metadata:{user_actions:[y.YES,y.NO],page_num:n.metadata.page_num,page_type:s.page_type,classification_id:s.classification_id}},a)]):[3,5];case 3:i.sent(),i.label=4;case 4:return u++,[3,2];case 5:return yt(function(e){var t=new Set(e);return t.add(n.id),t}),Ni(n.id),[3,8];case 6:return v=i.sent(),null==yn||yn(v,a),[3,8];case 7:return St(null),[7];case 8:return[2]}})})},[xn,yn,mn,Ni]),Ai=s(function(e,n,r){return t(Te,void 0,void 0,function(){var t,o,a,l,u,d,s,c,v,g;return i(this,function(i){switch(i.label){case 0:if(xn)return[2];if("boundary"===e.kind&&!gn)return[2];if("label"===e.kind&&!pn)return[2];if("page"===e.kind&&!mn)return[2];t=K(e),a=r,l=(o=n)===p.SET_RANGE?function(){var n=a.startPage,t=a.endPage;if(null==n||null==t)return null;var i=n<e.segment.start_page||t>e.segment.end_page,r=n>e.segment.start_page||t<e.segment.end_page;return i&&!r?n<e.segment.start_page?p.MERGE_PREV:p.MERGE_NEXT:r?p.SPLIT_HERE:null}():o,u="boundary"===e.kind&&null!=gn&&Qe&&(l===p.SPLIT_HERE||l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),d=u?Le.findIndex(function(n){return S(n)===S(e.segment)}):-1,u&&d>=0&&l&&(Bt.current={action:l,originalSegmentIndex:d,segmentSignature:JSON.stringify(Le.map(function(e,n){var t;return{key:S(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}})),ready:!1}),St(e.id),i.label=1;case 1:return i.trys.push([1,8,9,10]),"boundary"!==e.kind?[3,3]:[4,null==gn?void 0:gn(n,r,t)];case 2:return i.sent(),[3,7];case 3:return"label"!==e.kind?[3,5]:[4,null==pn?void 0:pn(n,r,t)];case 4:return i.sent(),[3,7];case 5:return"page"!==e.kind?[3,7]:[4,null==mn?void 0:mn(n,r,t)];case 6:i.sent(),i.label=7;case 7:return yt(function(n){var t=new Set(n);return t.add(e.id),t}),s="boundary"===e.kind&&(l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),("boundary"===e.kind&&l===p.SPLIT_HERE||s)&&l&&(c=S(e.segment),Un(function(e){var n=new Set(e);return o===p.SET_RANGE?n.add(c):n.delete(c),n}),Dn(function(e){var n=new Map(e);return n.set(c,l),n})),Bt.current?(Bt.current.ready=!0,s&&(v=Kn.find(function(n){return"label"===n.kind&&S(n.segment)===S(e.segment)}))&&requestAnimationFrame(function(){return ki(v)})):Ni(e.id),[3,10];case 8:return g=i.sent(),u&&(Bt.current=null),null==yn||yn(g,t),[3,10];case 9:return St(null),[7];case 10:return[2]}})})},[Qe,xn,yn,gn,pn,mn,fn,Kn,Le,ki,Ni]);u(function(){var e=Bt.current;if(null==e?void 0:e.ready){var n=JSON.stringify(Le.map(function(e,n){var t;return{key:S(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}}));if(n!==e.segmentSignature){var t=e.action===p.SPLIT_HERE?e.originalSegmentIndex+1:e.action===p.MERGE_PREV||e.action===p.MERGE_PREVIOUS?Math.max(0,e.originalSegmentIndex-1):e.originalSegmentIndex,i=new Map(Le.map(function(e,n){return[S(e,n),n]})),r=Kn.find(function(e){var n=i.get(S(e.segment));return null!=n&&n>=t&&Ri(e)});if(!r)return Bt.current=null,void Pi();requestAnimationFrame(function(){Bt.current=null,ki(r)})}}},[Pi,Ri,Kn,Le,ki]),u(function(){Bt.current||rt&&!Kn.some(function(e){return e.id===rt})&&Pi()},[rt,Pi,Kn]),u(function(){if($e&&!Bt.current){var e=Kn.find(function(e){return e.pageNumber===nt});e&&e.id!==rt&&ki(e)}},[rt,$e,nt,ki,Kn]),u(function(){Bt.current||rt&&!Kn.some(function(e){var n;return e.id===rt&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)})&&Pi()},[rt,Pi,Kn]);var Fi=a(function(){var n=Kn.filter(function(e){var n;return!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if("all"===Xe)return n;var t=["low","medium","high"].filter(function(e){return e!==He}),i=e([He],t,!0),r=new Map(i.map(function(e,n){return[e,n]}));return n.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var t,o,a,l,u=null===(t=e.item.review_step.confidence)||void 0===t?void 0:t.trim().toLowerCase(),d=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==u?i.length:null!==(a=r.get(u))&&void 0!==a?a:i.length)-(null==d?i.length:null!==(l=r.get(d))&&void 0!==l?l:i.length)||e.index-n.index}).map(function(e){return e.item})},[Xe,He,Kn]),Ti=Fi.findIndex(function(e){return e.id===lt}),Bi=l(null),Wi=Bi[0],Li=Bi[1],zi=l(null),ji=zi[0],qi=zi[1],Gi=d(!1),Oi=s(function(e){var n=Fi[e];n&&ki(n)},[Fi,ki]);s(function(e){if(!(!Et||e<0||e>=Et.pages.length)){var t=Et.pages[e];null!=t&&(Pi(),kt(function(t){return null==t?t:n(n({},t),{index:e})}),Ft.current+=1,ht({pageNumber:t,requestId:Ft.current}))}},[Et,Pi]),u(function(){lt&&!Fi.some(function(e){return e.id===lt})&&ut(null)},[Fi,lt]),u(function(){Gi.current=!1,qi(null),Li(Ti>=0?String(Ti+1):null)},[Ti,Fi.length]),u(function(){if(Gi.current&&null!=Wi){var e=window.setTimeout(function(){var e=Number(Wi.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Fi.length&&(Gi.current=!1,Oi(n))},300);return function(){return window.clearTimeout(e)}}},[Oi,Wi,Fi.length]);var Di=a(function(){var e=new Map;Kn.forEach(function(n){var t,i=null!==(t=e.get(S(n.segment)))&&void 0!==t?t:[];i.push(n),e.set(S(n.segment),i)});var n=new Map;return e.forEach(function(e,t){var i,r=null!==(i=Xn.get(t))&&void 0!==i?i:1;e.sort(function(e,n){return e.reviewStepIndex-n.reviewStepIndex}).forEach(function(e,t){n.set(e.id,"".concat(r).concat(function(e){for(var n=e+1,t="";n>0;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t}(t)))})}),n},[Kn,Xn]),Vi=a(function(){var e=new Map;Kn.forEach(function(n){var t,i=null!==(t=e.get(n.pageNumber))&&void 0!==t?t:[];i.push(n),e.set(n.pageNumber,i)});var n=new Map;return e.forEach(function(e){e.forEach(function(e,t){return n.set(e.id,t)})}),n},[Kn]),Hi=s(function(e){return{startPage:Math.max(0,e.startPage-tn),endPage:Math.min(e.numPages-1,e.endPage+tn)}},[tn]),Ui=s(function(){var e,n=zt.current,t=jt.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();Kn.forEach(function(e){var n,r=Wt.current.get(e.id);if(r){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var l=a.getBoundingClientRect(),u=null!==(n=Vi.get(e.id))&&void 0!==n?n:0,d=l.top+on+40*u,s=d+(r.offsetHeight||32),c=d>=o.top&&s<=o.bottom;r.style.top="".concat(d-i.top,"px"),r.style.visibility=c?"visible":"hidden"}else r.style.visibility="hidden"}});var a=Lt.current;if(a){var l=null==Et?void 0:Et.pages[Et.index],u=null==l?null:t.querySelector('[data-testid="core__page-layer-'.concat(l-1,'"]'));if(Et&&u){var d=u.getBoundingClientRect().top+on,s=d+(a.offsetHeight||25),c=d>=o.top&&s<=o.bottom;a.style.top="".concat(d-i.top,"px"),a.style.visibility=c?"visible":"hidden"}else a.style.visibility="hidden"}if(rt&&null==Tt.current){var v=Wt.current.get(rt);v&&"hidden"!==v.style.visibility&&pt(function(e){return e===v?e:v})}}},[Et,rt,on,Vi,Kn]),Xi=s(function(e){var n=Tt.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Tt.current=null,Ui(),requestAnimationFrame(function(){if(null==Tt.current){var e=Wt.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&pt(e)}}))},[Ui]);return u(function(){var e=jt.current;if(e&&De){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,Ui()}))};e.addEventListener("scroll",t,!0),window.addEventListener("resize",t);var i=new MutationObserver(t);i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]});var r="undefined"==typeof ResizeObserver?null:new ResizeObserver(t);return null==r||r.observe(e),t(),function(){null!=n&&cancelAnimationFrame(n),e.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t),i.disconnect(),null==r||r.disconnect()}}},[De,Ui]),r("div",n({ref:zt,className:Mn,style:n(n({},An),{display:"block",position:"relative",width:"100%",height:"100%",minWidth:0,overflowX:"auto",overflowY:"hidden"})},{children:[r("div",n({className:"segment-review-wrapper__container",style:{display:"flex",alignItems:"stretch",gap:0,width:"100%",minWidth:700,height:"100%"}},{children:[o("div",n({ref:jt,style:n(n({},Fn),{flex:"1 1 auto",width:De?"auto":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:o(v,n({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1,showRotateButton:!0},qe,{defaultScale:void 0===Ge?null!==(Ie=null==qe?void 0:qe.defaultScale)&&void 0!==Ie?Ie:c.PageFit:$[Ge],disablePdfAnnotations:Cn,disablePdfTextLayer:kn,pdfUrl:Be,pdfName:We,segments:Qn,navigationRequest:ft,onNavigationSettled:Xi,setRenderRange:Hi,onCurrentPageChange:function(e){tt(e),null==Tt.current&&Ut&&Ut.pageNumber!==e&&Pi(),null==wn||wn(e)}}))})),De&&r("aside",n({"aria-label":"Page review badges",ref:$n,style:n(n({},Tn),{position:"relative",width:Vt,maxWidth:Z,flex:"0 1 ".concat(Vt),minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[Et&&o("span",n({ref:Lt,style:{position:"absolute",top:0,left:10,visibility:"hidden",zIndex:2,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:4,minHeight:25,padding:"2px 8px",border:"1px solid #E2E8F0",borderRadius:16,backgroundColor:"#F8FAFC",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)",font:"inherit"}},{children:r(P,n({fontFamily:"Inter",sx:{fontSize:11,fontWeight:500,color:"#475569",whiteSpace:"nowrap"}},{children:[Et.label||"Pages"," Pg: ",Et.index+1]}))})),Je&&Fi.length>0&&!Et&&r("nav",n({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:ln||"auto",left:dn||"auto",zIndex:2,display:"flex",alignItems:"center",gap:7,width:128,minHeight:40,padding:"4px 6px",border:"1px solid #CBD5E1",borderRadius:6,backgroundColor:"#FFFFFF",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.06)",font:"inherit"}},{children:[o(I,n({title:"out-of-range"===ji?"Please enter valid number present in the range":"Please enter valid numbers",open:null!=ji,placement:"top",arrow:!0},{children:o("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=Wi?Wi:"-",min:0,max:Fi.length,"aria-label":"Review badge number","aria-invalid":null!=ji,onFocus:function(){null==Wi&&Li("")},onBlur:function(){qi(null);var e=Number(Wi);(null==Wi||""===Wi||!Number.isInteger(e)||e<1||e>Fi.length)&&(Gi.current=!1,Li(Ti>=0?String(Ti+1):null))},onChange:function(e){var n=e.target.value;if(/^\d*$/.test(n)){var t=Number(n),i=""!==n&&(t<1||t>Fi.length);qi(i?"out-of-range":null),Gi.current=!0,Li(n)}else qi("invalid-number")},style:{width:30,height:28,padding:0,border:"1px solid ".concat(ji?"#DC2626":"#A5B4FC"),borderRadius:3,color:"#4F46E5",backgroundColor:"#FFFFFF",textAlign:"center",font:"inherit",fontSize:15,outline:"none"}})})),r("span",n({"aria-label":"".concat(Fi.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Fi.length]})),["previous","next"].map(function(e){var t="previous"===e,i=Ti+(t?-1:1),r=i<0||i>=Fi.length;return o("button",n({type:"button","aria-label":"".concat(t?"Previous":"Next"," review badge"),disabled:r,onClick:function(){return Oi(i)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:r?"#C7D2FE":"#4F46E5",cursor:r?"default":"pointer"}},{children:o("svg",n({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:o("path",{d:t?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e)})]})),!Et&&Kn.map(function(e){var t,i,a=rt===e.id,l=null!==(t=Di.get(e.id))&&void 0!==t?t:"1A",u=e.review_step.score,d=e.review_step.confidence,s=H(u,d),c="boundary"===e.kind?G(e.review_step,e.segment,On.get(S(e.segment))):"label"===e.kind?O(e.review_step,e.segment,On.get(S(e.segment))):null,v=null!=c?c:"N/A"===s?s:"".concat(s,"%"),g=!0===(null===(i=e.segment.confidence)||void 0===i?void 0:i.awaiting_llm),p=q(u,d,g),m=Ht.has(e.id);return o(I,n({title:g?"data is being processed":"",arrow:!0},{children:o("span",n({ref:function(n){n?Wt.current.set(e.id,n):Wt.current.delete(e.id)},style:{position:"absolute",top:0,left:10,visibility:"hidden",display:"inline-flex",cursor:g?"not-allowed":"pointer"}},{children:o("button",n({disabled:g,type:"button","aria-pressed":a,"aria-label":g?"".concat(e.review_step.type," · Page ").concat(e.pageNumber," · Data is being processed"):"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return ki(e)},style:{cursor:"inherit",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:c?m&&!g?115:90:m&&!g?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(m&&!g?"#E2E8F0":p.border),borderRadius:16,backgroundColor:m&&!g?"#F8FAFC":p.background,color:m&&!g?"#475569":p.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:r(P,n({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},m&&!g?{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:v}))]})),r("span",n({style:{fontSize:11,fontWeight:500,display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{display:"flex",marginLeft:"7px",alignItems:"center"}},{children:o(C,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]}:{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:p.divider,strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:v}))]}))]}))}))}))}),e.id)})]}))]})),Ut&>&&r(f,n({anchorElement:gt,placement:"bottom-start",offset:{top:8},width:Math.min(Gt,Z),maxWidth:Z,heightBuffer:null!=vn?vn:25},{children:[st&&o(h,{width:"100%",maxWidth:"100%",score:Ut.review_step.score,reasons:ei,reason:Ut.review_step.reason,gap:Ut.review_step.gap,onBack:function(){return ct(!1)},onClose:Pi}),o("div",n({style:{display:st?"none":"block"}},{children:Ht.has(Ut.id)?o(M,{width:"100%",maxWidth:"100%",headerName:"page"===Ut.kind?"Page format approved":"Split"===ti?"Split approved":"Merged"===ti?"Merge approved":"User approved",headerIcon:"page"===Ut.kind?o(E,{size:18,strokeWidth:2}):"Merged"===ti?o(k,{size:18,strokeWidth:2}):"Split"===ti?o(U,{width:18,height:18}):o(C,{size:18,strokeWidth:2}),title:ui,pageNo:"Page ".concat(Ut.segment.start_page,"-").concat(Ut.segment.end_page),summary:Ci&&_i?o(F,{icon:o(C,{size:14,strokeWidth:2}),title:ui,pageRange:"Page ".concat(Ut.segment.start_page,"-").concat(Ut.segment.end_page),description:null!=yi?yi:null,revertData:_i,confirmDisabled:"page"===Ut.kind?!Si:null==hn||!Si,showDocumentHeader:!1,onRevert:function(){if("page"===Ut.kind){if(!fn||!xi){var e=new Error("SegmentReviewPdfWrapper requires onPageTypeRevert and a classification id to revert a page-type decision.");return null==yn||yn(e,K(Ut)),Promise.reject(e)}return fn({classification_id:xi,human_verdict:"No"},K(Ut))}if(!hn)throw new Error("SegmentReviewPdfWrapper requires onRevert to handle a revert confirmation.");if(!hi)throw new Error("There is no valid revert operation for this review.");var n=fi?"boundary":"label"===Ut.kind?"label":"boundary"===Ut.kind?"boundary":null,t=ci(hi.type);if(n&&t!==n)throw new Error("Cannot use ".concat(null!=t?t:"unknown"," revert metadata for this review. Expected ").concat(n,"."));return hn(hi,K(Ut))},onRevertError:function(e){null==yn||yn(e,K(Ut))},onRevertComplete:function(e){var n,t,i,r,o,a;yt(function(){return new Set}),"page"!==Ut.kind&&(Un(function(){return new Set}),Dn(function(){return new Map})),Ut.id;var l=null!==(n=_i.previousSegments[0])&&void 0!==n?n:_i.currentSegment,u=null==gt?void 0:gt.getBoundingClientRect(),d=null===(t=jt.current)||void 0===t?void 0:t.getBoundingClientRect(),s=Math.min(Z,Math.max(220,Gt)),c=null!==(i=null==u?void 0:u.left)&&void 0!==i?i:(null!==(r=null==d?void 0:d.right)&&void 0!==r?r:window.innerWidth-s-8)+8,v=Math.max(8,Math.min(c,window.innerWidth-s-8)),g=null==(null==u?void 0:u.bottom)?Math.max(8,null!==(o=null==d?void 0:d.top)&&void 0!==o?o:8):u.bottom+8;yt(function(){return new Set}),"page"!==Ut.kind&&(Bt.current=null),At(!1),Rt({title:"Split"===ti?"Split reverted":"Merged"===ti?"Merge reverted":"Approval reverted",description:(null===(a=null==e?void 0:e.message)||void 0===a?void 0:a.trim())||null,segment:l,position:{top:g,left:v,width:s}}),Pi()}},Ut.id):void 0,additionalActions:li?o(A,{metadata:li.metadata,reviewAction:null!==(Re=Ut.segment.review_action)&&void 0!==Re?Re:void 0,startPage:Ut.segment.start_page,endPage:Ut.segment.end_page,title:ui,previousSegmentTitle:$t,nextSegmentTitle:Kt,disabled:xn||!gn||xt===Ut.id,onConfirm:function(e,n){Ai(li,e,n)}}):void 0,cognitiveScore:Ut.review_step.score,styles:{root:{borderColor:"#16A34A"},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:"#16A34A"}}},onCognitiveClick:ni?function(){ct(!0),null==Nn||Nn(K(Ut))}:void 0,onClose:Pi}):"boundary"===Ut.kind?o(g,{width:"100%",maxWidth:"100%",totalPages:ze,title:Ut.segment.label||Ut.segment.title,pageNo:"Page ".concat(Ut.pageNumber),content:null!==(Ne=Ut.review_step.question)&&void 0!==Ne?Ne:null,revertSummary:wi,cognitiveScore:Ut.review_step.score,metadata:Ut.metadata,reviewAction:null!==(Me=Ut.segment.review_action)&&void 0!==Me?Me:void 0,previousSegmentTitle:$t,nextSegmentTitle:Kt,manualPrompt:null!=cn?cn:"Set a custom boundary",defaultStartPage:Ut.segment.start_page,defaultEndPage:Ut.segment.end_page,styles:{root:{borderColor:Qt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Qt.text}}},confirmDisabled:xn||!gn||xt===Ut.id,onConfirm:function(e,n,t){t&&m(n.id)&&Ai(Ut,n.id,t)},onAdjustManually:function(){return null==Rn?void 0:Rn(K(Ut))},onCognitiveClick:ni?function(){ct(!0),null==Nn||Nn(K(Ut))}:void 0,onClose:Pi},Ut.id):"label"===Ut.kind?o(b,{width:"100%",maxWidth:"100%",title:Ut.metadata.current_label||Ut.segment.label||Ut.segment.title,pageNo:"Pages ".concat(Ut.segment.start_page,"-").concat(Ut.segment.end_page),content:null!==(Ae=Ut.review_step.question)&&void 0!==Ae?Ae:null,revertSummary:wi,cognitiveScore:Ut.review_step.score,metadata:Ut.metadata,styles:{root:{borderColor:Qt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Qt.text}}},confirmDisabled:xn||!pn||xt===Ut.id,confirmationBlocked:Xt,confirmationWarning:Xt?"Please confirm the boundary before confirming the title.":void 0,onActionConfirm:function(e,n){Ai(Ut,e,n)},onAdjustManually:function(){return null==Rn?void 0:Rn(K(Ut))},onCognitiveClick:ni?function(){ct(!0),null==Nn||Nn(K(Ut))}:void 0,onClose:Pi},Ut.id):2===(null===(Fe=Ut.metadata.type_choices)||void 0===Fe?void 0:Fe.length)?o(_,{width:"100%",maxWidth:"100%",title:Ut.segment.label||Ut.segment.title,pageNo:"Page ".concat(Ut.pageNumber),content:Ut.review_step.reason,choices:Ut.metadata.type_choices,cognitiveScore:Ut.review_step.score,styles:{root:{borderColor:Qt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Qt.text}}},confirmDisabled:xn||!mn||xt===Ut.id,onConfirm:function(e){Mi(Ut,e)},onCognitiveClick:ni?function(){ct(!0),null==Nn||Nn(K(Ut))}:void 0,onClose:Pi},Ut.id):o(w,{width:"100%",maxWidth:"100%",title:Ut.segment.label||Ut.segment.title,pageNo:"Page ".concat(Ut.pageNumber),content:Ut.review_step.reason,cognitiveScore:Ut.review_step.score,pageType:Ut.metadata.page_type,metadata:Ut.metadata,styles:{root:{borderColor:Qt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Qt.text}}},confirmDisabled:xn||!mn||xt===Ut.id,onActionConfirm:function(e,n){Ai(Ut,e,n)},onCognitiveClick:ni?function(){ct(!0),null==Nn||Nn(K(Ut))}:void 0,onClose:Pi},Ut.id)}))]})),It&&o(R,{children:o(N,n({"aria-live":"polite",sx:{position:"fixed",top:It.position.top,left:It.position.left,zIndex:1600,width:It.position.width,maxWidth:"calc(100vw - 16px)",opacity:Mt?1:0,transform:Mt?"translateY(0)":"translateY(-6px)",transition:"opacity 500ms ease, transform 500ms ease",filter:"drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18))",pointerEvents:Mt?"auto":"none"}},{children:o(T,{title:It.title,description:It.description,onReview:function(){return Ii(It.segment)}})}))})]}))}export{J as SegmentPdfSpecialZoomLevel,Q as default};
|
|
2
|
+
//# sourceMappingURL=SegmentReviewPdfWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentReviewPdfWrapper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as n}from"tslib";import{getSegmentReviewKey as e}from"./reviewStepAdapters.js";import{getNumericScore as r,getReviewScoreBand as t}from"./reviewScore.js";export{getNumericScore,getReviewScoreBand}from"./reviewScore.js";var i=function(n){switch(null==n?void 0:n.trim().toLowerCase()){case"low":return 40;case"medium":return 70;case"high":return 95;default:return null}},u=function(n,e){var t;return null!==(t=r(n))&&void 0!==t?t:i(e)},o=function(n,e){var r=u(n,e);return null==r?"N/A":Number.isInteger(r)?String(r):r.toFixed(2).replace(/\.?0+$/,"")},l=function(n){switch(null==n?void 0:n.trim().toUpperCase()){case"SPLIT":case"SPLIT_HERE":return"Split";case"MERGE":case"MERGE_NEXT":case"MERGE_PREV":case"MERGE_PREVIOUS":return"Merged";default:return null}},a=function(n){var e,r,t,i;if(![n.human_action_enum,null===(e=n.human_resolution)||void 0===e?void 0:e.action,null===(r=n.review)||void 0===r?void 0:r.action].some(function(n){return"SET_RANGE"===(null==n?void 0:n.trim().toUpperCase())}))return null;var u=null===(t=n.human_resolution)||void 0===t?void 0:t.before,o=null===(i=n.human_resolution)||void 0===i?void 0:i.after;if(null==(null==u?void 0:u.start_page)||null==u.end_page||null==(null==o?void 0:o.start_page)||null==o.end_page)return null;var l=o.start_page<u.start_page||o.end_page>u.end_page,a=o.start_page>u.start_page||o.end_page<u.end_page;if(l&&!a)return"Merged";if(a&&!l)return"Split";var d=u.end_page-u.start_page+1,v=o.end_page-o.start_page+1;return v>d?"Merged":v<d?"Split":null},d=function(n){switch(null==n?void 0:n.trim().toUpperCase()){case"SPLIT":case"SPLIT_HERE":return"SPLIT_HERE";case"MERGE_NEXT":return"MERGE_NEXT";case"MERGE_PREV":case"MERGE_PREVIOUS":return"MERGE_PREV";case"SET_RANGE":return"SET_RANGE";default:return null}},v=function(n){var e,r=null===(e=n.type)||void 0===e?void 0:e.trim().toLowerCase();return"page_boundary"===r||"page boundary review"===r},_=function(e){var r,t,i,u=(null!==(r=e.review_steps)&&void 0!==r?r:[]).filter(v);return null!==(i=null!==(t=n([],u,!0).reverse().find(function(n){return null!=l(n.human_action_enum)}))&&void 0!==t?t:n([],u,!0).reverse().find(p))&&void 0!==i?i:u[u.length-1]},s=function(n){var e,r,t,i,u;return null!==(i=null!==(r=null!==(e=a(n))&&void 0!==e?e:l(n.human_action_enum))&&void 0!==r?r:l(null===(t=n.human_resolution)||void 0===t?void 0:t.action))&&void 0!==i?i:l(null===(u=n.review)||void 0===u?void 0:u.action)},c=function(n,e){var r,t=n.type.trim().toLowerCase();if(!("label"===t||"label review"===t))return!0;var i=null===(r=n.human_resolution)||void 0===r?void 0:r.segment_version,u=e.version;return null==i||null==u||i===u},f=function(n,e){var r,t,i;if(!c(n,e))return!1;if(null!=(null===(r=n.review)||void 0===r?void 0:r.action))return!0;var u=null===(i=null===(t=n.human_resolution)||void 0===t?void 0:t.state)||void 0===i?void 0:i.trim().toLowerCase();return"resolved_by_human"===u||"approved"===u||"confirmed"===u},p=function(n){var e,r,t,i;return null!=l(n.human_action_enum)||null!=l(null===(e=n.human_resolution)||void 0===e?void 0:e.action)||null!=l(null===(r=n.review)||void 0===r?void 0:r.action)||!0===(null===(i=null===(t=n.metadata)||void 0===t?void 0:t.performed_actions)||void 0===i?void 0:i.some(function(n){return null!=l(n.action)}))},g=function(e){var r,t,i,u,o,v,s=_(e);if(!s)return null;var c=d(null===(r=s.human_resolution)||void 0===r?void 0:r.action),f=null===(t=s.human_resolution)||void 0===t?void 0:t.after,p=(null==f?void 0:f.start_page)===e.start_page&&(null==f?void 0:f.end_page)===e.end_page,g=a(s);if(g)return p?g:null;if("SPLIT_HERE"===c)return p?null:"Split";if("MERGE_NEXT"===c||"MERGE_PREV"===c)return p?"Merged":null;var E=function(n,e){var r,t,i,u=n.revert,o=e.revert,l="boundary"===(null===(r=null==u?void 0:u.type)||void 0===r?void 0:r.trim().toLowerCase())?u:"boundary"===(null===(t=null==o?void 0:o.type)||void 0===t?void 0:t.trim().toLowerCase())?o:null;if(!l)return null;var a=null===(i=l.decision)||void 0===i?void 0:i.trim().toUpperCase();if(null==a?void 0:a.includes("SPLIT"))return"Split";if(null==a?void 0:a.includes("MERGE"))return"Merged";if("SET_RANGE"===a){if(l.current_segment_ids.length>l.previous_state.length)return"Split";if(l.current_segment_ids.length<l.previous_state.length)return"Merged"}return null}(s,e);if(E)return E;var m=l(s.human_action_enum);if(m)return m;var h=l(null===(i=s.review)||void 0===i?void 0:i.action);if(h)return h;var R=n([],null!==(u=e.human_action_log)&&void 0!==u?u:[],!0).filter(function(n){return null!=l(n.action)}).sort(function(n,e){var r,t;return e.human_revision-n.human_revision||(null===(r=e.performed_at)||void 0===r?void 0:r.localeCompare(null!==(t=n.performed_at)&&void 0!==t?t:""))})[0];if(!R)return null;var S=l(R.action),w=(null===(o=R.after)||void 0===o?void 0:o.start_page)===e.start_page&&(null===(v=R.after)||void 0===v?void 0:v.end_page)===e.end_page;return"Split"===S?w?null:S:w?S:null},E=function(n,e,r){var t=l(r);if(t)return t;var i=s(n);return i||g(e)},m=function(n,e,r){var t,i;return null!==(i=null!==(t=l(r))&&void 0!==t?t:s(n))&&void 0!==i?i:g(e)},h=function(n,e){return null!=l(e)||null!=g(n)},R=function(n,e,r,t){var i=l(t);if("Merged"===i)return r;if("Split"===i)return!0;if(function(n,e){var r,t,i;if("affected"!==(null===(r=e.sensitivity)||void 0===r?void 0:r.trim().toLowerCase()))return!1;var u=null!==(t=n.revert)&&void 0!==t?t:e.revert;if(!u)return!1;var o=null===(i=u.decision)||void 0===i?void 0:i.trim().toUpperCase();return u.current_segment_ids.length>u.previous_state.length&&("SET_RANGE"===o||"SPLIT"===o||"SPLIT_HERE"===o)}(n,e))return!0;var u=s(n);if("Split"===u)return!0;var o=g(e);return"Split"===o||"Merged"===u&&("Merged"!==o||r)},S=function(n,e){var r,t,i,u,o,a,v=d(e),s=_(n),c=null!==(i=null!==(r=d(null==s?void 0:s.human_action_enum))&&void 0!==r?r:d(null===(t=null==s?void 0:s.human_resolution)||void 0===t?void 0:t.action))&&void 0!==i?i:d(null===(u=null==s?void 0:s.review)||void 0===u?void 0:u.action),f=l(e),p=null===(o=null==s?void 0:s.human_resolution)||void 0===o?void 0:o.after,E="SPLIT_HERE"===v&&null!=(null===(a=null==s?void 0:s.human_resolution)||void 0===a?void 0:a.action)&&(null==p?void 0:p.start_page)===n.start_page&&(null==p?void 0:p.end_page)===n.end_page;return null!=v&&c===v&&null!=f&&(E||g(n)===f)},w=function(r,t,i){void 0===i&&(i=new Set);var u=n([],r,!0).sort(function(n,e){return n.start_page-e.start_page||n.end_page-e.end_page}),o=new Set;return t.forEach(function(n,r){if(!i.has(r)){var l=u.findIndex(function(n){return e(n)===r});if(!(l<0)){var a=u[l];if(!S(a,n)){var v=d(n),_=u["MERGE_PREV"===v?l-1:"MERGE_NEXT"===v?l+1:-1];if(_){var s=e(_);h(_,t.get(s))||o.add(s)}}}}}),o},M=function(r){var t=n([],r,!0).sort(function(n,e){return n.start_page-e.start_page||n.end_page-e.end_page}),i=new Set;return t.forEach(function(n,r){var u,o=(null!==(u=n.review_steps)&&void 0!==u?u:[]).find(function(e){var r,t,i;if(!v(e))return!1;var u=d(e.human_action_enum),o=d(null===(r=e.human_resolution)||void 0===r?void 0:r.action),l=null===(t=e.human_resolution)||void 0===t?void 0:t.before,a=null===(i=e.human_resolution)||void 0===i?void 0:i.after,_=null!=(null==l?void 0:l.start_page)&&null!=l.end_page&&null!=(null==a?void 0:a.start_page)&&null!=a.end_page&&(l.start_page!==a.start_page||l.end_page!==a.end_page),s=(null==a?void 0:a.start_page)===n.start_page&&(null==a?void 0:a.end_page)===n.end_page;return("MERGE_NEXT"===u||"MERGE_PREV"===u)&&!(o===u&&_&&s)});if(o){var l=d(o.human_action_enum),a=t["MERGE_PREV"===l?r-1:r+1];a&&!h(a)&&i.add(e(a))}}),i},C=function(n,e,r){var i={border:"#E5E7EB",cardBorder:"#374151",background:"#F9FAFB",text:"#374151",divider:"#D1D5DB"};if(r)return i;switch(t(n)){case"low":return{border:"#FECACA",cardBorder:"#B91C1C",background:"#FEF2F2",text:"#B91C1C",divider:"#FCA5A5"};case"medium":return{border:"#d9cda2",cardBorder:"#997800",background:"#fff1bf",text:"#997800",divider:"#e6b400"};case"high":return{border:"#16A34A",cardBorder:"#4F9E6C",background:"#F0FDF4",text:"#4F9E6C",divider:"#00A43C"}}return i};export{o as formatScore,m as getBoundaryReviewActionBadgeLabel,C as getConfidenceColors,i as getFallbackScore,l as getHumanActionBadgeLabel,w as getOptimisticMergeImpactedSegmentKeys,M as getPendingMergeImpactedSegmentKeys,u as getResolvedScore,s as getReviewStepActionBadgeLabel,g as getStructuralResultBadgeLabel,E as getTitleReviewActionBadgeLabel,S as hasPolledStructuralAction,p as hasStructuralBoundaryAction,c as isReviewStepResolutionCurrent,f as isReviewStepResolved,R as shouldHideStructuralBoundaryReview};
|
|
2
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var r=function(r){if(null==r)return null;if("number"==typeof r)return Number.isFinite(r)?r:null;if("string"!=typeof r)return null;var n=r.trim();if(!n)return null;var u=Number.parseFloat(n);return Number.isFinite(u)?u:null},n=function(n){var u=r(n);if(null==u)return null;return u<60?"low":u<=85?"medium":"high"};export{r as getNumericScore,n as getReviewScoreBand};
|
|
2
|
+
//# sourceMappingURL=reviewScore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewScore.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__spreadArray as i}from"tslib";import{isBoundaryReviewAction as e}from"./BoundaryCard.js";import{isLabelReviewAction as n}from"./LabelCheck.js";import{isPageCheckAction as a,PageCheckActionEnum as o}from"./PageCheck.js";var t=function(i){return"object"==typeof i&&null!==i?i:{}},l=function(i){return"string"==typeof i?i:null},c=function(i){return"number"==typeof i&&Number.isFinite(i)?i:null},r=function(i){return Array.isArray(i)?i.filter(function(i){return"string"==typeof i}):[]},d=function(i){var e="string"==typeof i?i.trim().toLowerCase():"";return"table"===e||"drawing"===e?e:null},u=function(i,e){return void 0===e&&(e=0),i.stable_key||i.segment_id||"".concat(i.start_page,"-").concat(i.end_page,"-").concat(e)},s=function(i){var e=t(i);return{current_label:l(e.current_label),custom_label:l(e.custom_label),group_id:l(e.group_id),user_actions:r(e.user_actions).filter(n)}},v=function(i){var e=t(i),n=Array.isArray(e.type_choices)?e.type_choices.flatMap(function(i){var e,n=t(i),a=d(n.page_type),o=null===(e=l(n.classification_id))||void 0===e?void 0:e.trim();return a&&o?[{page_type:a,classification_id:o}]:[]}):[];return{page_type:d(e.page_type),page_num:c(e.page_num),classification_id:l(e.classification_id),type_choices:n.length>1?n:void 0,user_actions:r(e.user_actions).filter(a)}},p=function(i){var e,n,o=null===(n=null===(e=i.human_action)||void 0===e?void 0:e.verdict)||void 0===n?void 0:n.trim().toUpperCase();return o&&a(o)?o:null},_=function(n){var l=[],_=[],f=[];return n.forEach(function(n,m){var g,h,y=u(n,m),w=null!==(g=n.review_steps)&&void 0!==g?g:[];w.forEach(function(i,a){var o,d,u=(o=i.type,"page_boundary"===(d=o.trim().toLowerCase())||"page boundary review"===d?"boundary":"label"===d||"label review"===d?"label":"page"===d?"page":null);if("boundary"===u){var p=function(i){var n=t(i);return{focus_page:c(n.focus_page),boundary_margin:c(n.boundary_margin),user_actions:r(n.user_actions).filter(e)}}(i.metadata);l.push({id:"".concat(y,":boundary:").concat(a),reviewStepIndex:a,segment:n,review_step:i,metadata:p})}"label"===u&&_.push({id:"".concat(y,":label:").concat(a),reviewStepIndex:a,segment:n,review_step:i,metadata:s(i.metadata)}),"page"===u&&f.push({id:"".concat(y,":page:").concat(a),reviewStepIndex:a,segment:n,review_step:i,metadata:v(i.metadata)})});var b=0;null===(h=n.page_classifications)||void 0===h||h.forEach(function(e,t){var l,c,r=null!==(l=e.page_num)&&void 0!==l?l:null,u=null!==(c=e.questions)&&void 0!==c?c:[],s=u.filter(function(i){return"table"===d(i.page_type)&&"string"==typeof i.id&&i.id.trim().length>0}),_=u.filter(function(i){return"drawing"===d(i.page_type)&&"string"==typeof i.id&&i.id.trim().length>0});if(2===u.length&&1===s.length&&1===_.length){var m=s[0],g=_[0],h=function(e,n,a,t){var l,c,r,d,u,s,v,_,f,m,g,h,y,w,b,S,E,C,k,x,I,Y,P,j,A,N,L,O,R,T=p(n),U=p(a),q=null!=T&&null!=U,B=i(i([],T===o.YES?["table"]:[],!0),U===o.YES?["drawing"]:[],!0),F=1===B.length?B[0]:null,M="drawing"===B[0]?a:n;return{type:"page",confirmed:q,title:"Page Type Check",summary:(null===(l=e.summary)||void 0===l?void 0:l.trim())||void 0,format:"pdf",confidence:null!==(v=null!==(u=null!==(r=null===(c=e.machine_classification)||void 0===c?void 0:c.confidence)&&void 0!==r?r:null===(d=n.machine_classification)||void 0===d?void 0:d.confidence)&&void 0!==u?u:null===(s=a.machine_classification)||void 0===s?void 0:s.confidence)&&void 0!==v?v:null,decided_by:null!==(y=null!==(g=null!==(f=null===(_=e.machine_classification)||void 0===_?void 0:_.decisioning_method)&&void 0!==f?f:null===(m=n.machine_classification)||void 0===m?void 0:m.decisioning_method)&&void 0!==g?g:null===(h=a.machine_classification)||void 0===h?void 0:h.decisioning_method)&&void 0!==y?y:null,human_action_enum:null,reason:"Please check the type of this page.",reasons:(null===(w=e.reasons)||void 0===w?void 0:w.length)?e.reasons:i(i([],null!==(b=n.reasons)&&void 0!==b?b:[],!0),null!==(S=a.reasons)&&void 0!==S?S:[],!0),score:null!==(A=null!==(P=null!==(Y=null!==(x=null!==(k=null!==(E=e.score)&&void 0!==E?E:null===(C=e.machine_classification)||void 0===C?void 0:C.score)&&void 0!==k?k:n.score)&&void 0!==x?x:null===(I=n.machine_classification)||void 0===I?void 0:I.score)&&void 0!==Y?Y:a.score)&&void 0!==P?P:null===(j=a.machine_classification)||void 0===j?void 0:j.score)&&void 0!==A?A:null,review:q?{action:B.length>0?o.YES:o.NO,reviewed_by:null!==(L=null===(N=M.human_action)||void 0===N?void 0:N.reviewed_by)&&void 0!==L?L:"",reviewed_at:null!==(R=null===(O=M.human_action)||void 0===O?void 0:O.reviewed_at)&&void 0!==R?R:""}:null,metadata:{page_type:F,page_num:t,classification_id:null,type_choices:[{page_type:"table",classification_id:n.id},{page_type:"drawing",classification_id:a.id}],user_actions:["YES","NO"]}}}(e,m,g,r);return f.push({id:"".concat(y,":page-classification-choice:").concat(m.id,":").concat(g.id),reviewStepIndex:w.length+b,segment:n,review_step:h,metadata:v(h.metadata)}),void(b+=1)}(u.length>0?u:e.severity?[e]:[]).forEach(function(i,o){var l,c,u,s;if(d(i.page_type)){var p=function(i,e,n,o){var t,l,c,r,u,s,v,p,_,f,m,g,h,y,w,b=d(i.page_type),S=null===(l=null===(t=i.human_action)||void 0===t?void 0:t.verdict)||void 0===l?void 0:l.trim().toUpperCase(),E=S&&a(S)?S:null,C="drawing"===b?"an engineering drawing":b?"a ".concat(b):null;return{type:"page",confirmed:n,title:"Page Type Check",summary:(null==o?void 0:o.trim())||(E&&null!=e&&C?"Page ".concat(e," was confirmed as ").concat("YES"===E?C:"not ".concat(C),"."):void 0),format:"pdf",confidence:null!==(r=null===(c=i.machine_classification)||void 0===c?void 0:c.confidence)&&void 0!==r?r:null,decided_by:null!==(s=null===(u=i.machine_classification)||void 0===u?void 0:u.decisioning_method)&&void 0!==s?s:null,human_action_enum:null,reason:b?"We're not fully confident about the type of this page. Is this page a ".concat(b,"?"):null,reasons:null!==(v=i.reasons)&&void 0!==v?v:[],score:null!==(f=null!==(p=i.score)&&void 0!==p?p:null===(_=i.machine_classification)||void 0===_?void 0:_.score)&&void 0!==f?f:null,review:null==E?null:{action:E,reviewed_by:null!==(g=null===(m=i.human_action)||void 0===m?void 0:m.reviewed_by)&&void 0!==g?g:"",reviewed_at:null!==(y=null===(h=i.human_action)||void 0===h?void 0:h.reviewed_at)&&void 0!==y?y:""},metadata:{page_type:b,page_num:e,classification_id:null!==(w=i.id)&&void 0!==w?w:null,user_actions:["YES","NO"]}}}(i,r,null!==(c=null!==(l=i.confirmed)&&void 0!==l?l:e.confirmed)&&void 0!==c?c:null,null!==(u=e.summary)&&void 0!==u?u:null);f.push({id:"".concat(y,":page-classification:").concat(null!==(s=i.id)&&void 0!==s?s:"".concat(t,"-").concat(o)),reviewStepIndex:w.length+b,segment:n,review_step:p,metadata:v(p.metadata)}),b+=1}})})}),{boundaryReviews:l,labelReviews:_,pageReviews:f}};export{_ as extractSegmentReviewData,u as getSegmentReviewKey};
|
|
2
|
+
//# sourceMappingURL=reviewStepAdapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewStepAdapters.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as SPBAnalysisPanel}from"./features/SPBAnalysisPanel/Spbanalysispanel.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
|
|
1
|
+
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{createBoundaryCardOptions,isBoundaryReviewAction}from"./features/SegmentReviewComponents/BoundaryCard.js";import"tslib";import"react/jsx-runtime";import"react";import"@mui/material/Box";import"@mui/material/Popper";import"@mui/material/SvgIcon";export{default as CognitiveIntegrity}from"./features/SegmentReviewComponents/CognitiveIntegrity.js";export{createLabelCheckOptions,isLabelReviewAction}from"./features/SegmentReviewComponents/LabelCheck.js";export{default as PageCheck,isPageCheckAction}from"./features/SegmentReviewComponents/PageCheck.js";import"@mui/icons-material/ChevronRight";import"@mui/icons-material/Close";import"@mui/material/Button";import"@mui/material/ButtonBase";import"@mui/material/Checkbox";import"@mui/material/Divider";import"@mui/material/IconButton";import"@mui/material/Paper";import"@mui/material/Stack";import"@mui/material/Typography";export{extractSegmentReviewData}from"./features/SegmentReviewComponents/reviewStepAdapters.js";export{default as RevertCard}from"./features/SegmentReviewComponents/RevertCard.js";export{default as RevertSuccessCard}from"./features/SegmentReviewComponents/RevertSuccessCard.js";export{SegmentPdfSpecialZoomLevel,default as SegmentReviewPdfWrapper}from"./features/SegmentReviewComponents/SegmentReviewPdfWrapper.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{ReviewPanel}from"./features/ReviewPanel/ReviewPanel.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as SPBAnalysisPanel}from"./features/SPBAnalysisPanel/Spbanalysispanel.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";export{default as PromptCitation}from"./features/PromptCitation/PromptCitation.js";export{default as CitationDependencyGraph}from"./features/PromptCitation/CitationDependencyGraph.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"axios";const n=async n=>{try{console.log("[getRedlineDocumentId] Request:",n);const
|
|
1
|
+
import e from"axios";const n=async n=>{try{console.log("[getRedlineDocumentId] Request:",n);const{data:o}=await e.get(`${n.baseApiUrl}/book-finder-mode/get_comparison/${n.comparisonId}`);return console.log("[getRedlineDocumentId] Response:",o),o}catch(e){console.log("[getRedlineDocumentId] Error:",e)}return null},o=async(n,o)=>{try{console.log("[createRedlineDocument] Request:",n);const{data:t}=await e.post(`${n.baseApiUrl}/redlining/create`,{user_name:n.userName,user_email:n.userEmail,redline_config_id:n.redlineConfigId,changelog_config_id:n.changelogConfigId,artifact_id:n.artifactId,input_data:n.inputData,document_metadata:{comparison_id:n.comparisonId}},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}});return console.log("[createRedlineDocument] Response:",t),t}catch(e){console.log("[createRedlineDocument] Error:",e)}return null},t=async(n,o)=>{try{console.log("[updateRedlineDocument] Request:",n);const{data:t}=await e.put(`${n.baseApiUrl}/redlining/update-manual`,{document_id:n.documentId,segment_id:n.sectionId,user_name:n.userName,user_email:n.userEmail,new_plain_content:n.updatedContent,redline_config_id:n.redlineConfigId},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}});return console.log("[updateRedlineDocument] Response:",t),t}catch(e){console.log("[updateRedlineDocument] Error:",e)}return null},i=async(n,o)=>{try{console.log("[resolveRedline] Request:",n);const{data:t}=await e.post(`${n.baseApiUrl}/redlining/resolve`,{document_id:n.documentId,user_name:n.userName,user_email:n.userEmail,redline_id:n.redlineId,action:n.action,redline_config_id:n.redlineConfigId},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}});return console.log("[resolveRedline] Response:",t),t}catch(e){console.log("[resolveRedline] Error:",e)}return null},r=async(n,o)=>{try{console.log("[fetchRedlineDocumentSection] Request:",n);const{data:t}=await e.get(`${n.baseApiUrl}/redlining/segment/${n.documentId}/${n.sectionId}?redline_config_id=${n.redlineConfigId}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}});return console.log("[fetchRedlineDocumentSection] Response:",t),t}catch(e){console.log("[fetchRedlineDocumentSection] Error:",e)}return null};export{o as createRedlineDocument,r as fetchRedlineDocumentSection,n as getRedlineDocumentId,i as resolveRedline,t as updateRedlineDocument};
|
|
2
2
|
//# sourceMappingURL=redlineService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationDependencyGraphTest.d.ts","sourceRoot":"","sources":["../../../src/CitationDependencyGraphTest.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA4D1B,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EA6BxC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=RedlineApprovalCardTest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RedlineApprovalCardTest.d.ts","sourceRoot":"","sources":["../../../src/RedlineApprovalCardTest.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedlineEditorTest.d.ts","sourceRoot":"","sources":["../../../src/RedlineEditorTest.tsx"],"names":[],"mappings":"AA6BA,iBAAS,iBAAiB,
|
|
1
|
+
{"version":3,"file":"RedlineEditorTest.d.ts","sourceRoot":"","sources":["../../../src/RedlineEditorTest.tsx"],"names":[],"mappings":"AA6BA,iBAAS,iBAAiB,4CAo3BzB;AAED,eAAe,iBAAiB,CAAA"}
|