@viswa-test/test-citation 0.0.379 → 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/CognitiveCompareConstants.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
- package/dist/cjs/features/CognitiveCompare/CognitivePopup.js +1 -1
- package/dist/cjs/features/CognitiveCompare/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/CognitiveCompareConstants.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/CognitiveCompareConstants.d.ts +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareConstants.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +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/CognitivePopup.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/useCompareLayout.d.ts +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.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/CognitiveCompare/utils/normalizeInlineMarkdown.js +0 -2
- package/dist/cjs/features/CognitiveCompare/utils/normalizeInlineMarkdown.js.map +0 -1
- 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/CognitiveCompare/utils/normalizeInlineMarkdown.js +0 -2
- package/dist/features/CognitiveCompare/utils/normalizeInlineMarkdown.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/CognitiveCompare/utils/normalizeInlineMarkdown.d.ts +0 -25
- package/dist/types/src/features/CognitiveCompare/utils/normalizeInlineMarkdown.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
|
-
import{__assign as i}from"tslib";import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import{useMemo as o,useState as l,useCallback as a}from"react";import{Sparkles as r,Globe as s}from"lucide-react";import d from"../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";import u from"./GptWebCitationImageCitation.js";import c from"./GptWebCitationSkeleton.js";import{allowsGptCitationView as v,allowsWebCitationView as
|
|
1
|
+
import{__assign as i}from"tslib";import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import{useMemo as o,useState as l,useCallback as a}from"react";import{Sparkles as r,Globe as s}from"lucide-react";import d from"../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";import u from"./GptWebCitationImageCitation.js";import c from"./GptWebCitationSkeleton.js";import{allowsGptCitationView as v,allowsWebCitationView as p,showsCitationViewToggle as g,CitationType as m}from"./types.js";import{mapCitationDataToDisplay as b,resolveSkeletonVisitUrl as C,getWebCitationImageUrl as w}from"./utils/citationData.utils.js";import{resolveWebCitationVisitLinkStyles as f}from"./utils/styleOverrides.utils.js";import{resolveFixedHeightLayout as h,getFixedPanelStyle as k,getFixedWebContentStyle as y}from"./utils/fixedHeight.utils.js";import x from"./GptWebCitation.module.css.js";import F from"../../assests/svg/NeuralNetworkIcon.js";var I=function(o){var l=o.variant,a=o.disabled,r=o.onClick,d=o.title,u=o.style;return t("button",i({type:"button",className:x.webCitationButton,onClick:r,disabled:a,title:d,style:u},{children:e(n,"gpt"===l?{children:[t(F,{className:x.webCitationButtonIcon}),"View GPT Citation"]}:{children:[t(s,{size:24,className:x.webCitationButtonIcon}),"View Web Citation"]})}))},B=function(n){var s,F,B,S,L=n.gptCitation,H=n.defaultCitationUrl,N=n.citationType,W=n.webCitationData,j=n.topic,T=n.sourceLabel,E=n.relevanceScore,V=n.learnedFrom,z=n.webCitationStatus,G=n.onGenerateWebCitation,A=n.showWebCitation,M=n.onToggleCitationView,U=n.showExpandImageButton,D=void 0===U||U,P=n.showGptMaximizeButton,O=n.iconsConfig,R=n.isFixedHeight,q=void 0!==R&&R,J=n.styles,K=o(function(){return function(t){var e,n,o,l,a,r,s,d,u,c,v;return{container:null==t?void 0:t.container,gptWrapper:i(i({},null===(e=null==t?void 0:t.gptCitation)||void 0===e?void 0:e.wrapper),null==t?void 0:t.gptCitationWrapper),gptFooterAction:i(i({},null===(n=null==t?void 0:t.gptCitation)||void 0===n?void 0:n.footerAction),null==t?void 0:t.footerAction),gptToggleButton:i(i({},null===(o=null==t?void 0:t.gptCitation)||void 0===o?void 0:o.toggleButton),null==t?void 0:t.webCitationButton),webPanel:i(i({},null==t?void 0:t.container),null===(l=null==t?void 0:t.webCitation)||void 0===l?void 0:l.panel),webHeader:null===(a=null==t?void 0:t.webCitation)||void 0===a?void 0:a.header,webContent:null===(r=null==t?void 0:t.webCitation)||void 0===r?void 0:r.content,webFooter:null===(s=null==t?void 0:t.webCitation)||void 0===s?void 0:s.footer,webToggleButton:i(i({},null===(d=null==t?void 0:t.webCitation)||void 0===d?void 0:d.toggleButton),null==t?void 0:t.webCitationButton),webLearnedFrom:null===(u=null==t?void 0:t.webCitation)||void 0===u?void 0:u.learnedFrom,webImage:null===(c=null==t?void 0:t.webCitation)||void 0===c?void 0:c.image,webSkeleton:null===(v=null==t?void 0:t.webCitation)||void 0===v?void 0:v.skeleton,webImageVisitLink:f(null==t?void 0:t.webCitation,"image"),webSkeletonVisitLink:f(null==t?void 0:t.webCitation,"skeleton")}}(J)},[J]),Q=v(N),X=p(N),Y=g(N),Z=o(function(){return q?h(L.bodyHeight,Y):null},[q,L.bodyHeight,Y]),$=o(function(){return Z?k(Z.panelHeight):void 0},[Z]),_=o(function(){var i,t;return{MaximizeIcon:null!==(i=null==O?void 0:O.MaximizeIcon)&&void 0!==i?i:null===(t=L.iconsConfig)||void 0===t?void 0:t.MaximizeIcon,ExternalLinkIcon:null==O?void 0:O.ExternalLinkIcon}},[O,null===(s=L.iconsConfig)||void 0===s?void 0:s.MaximizeIcon]),ii=o(function(){return i(i(i(i({},L),q&&Z?{bodyHeight:Z.gptBodyHeight}:{}),{disableMaximize:void 0!==P?!P:L.disableMaximize}),Y||N===m.WEB?{DocumentTitle:void 0,previewCallback:void 0}:{})},[L,P,Y,N,q,Z]),ti=l(N!==m.GPT),ei=ti[0],ni=ti[1],oi=N!==m.GPT&&(N===m.WEB||(null!=A?A:ei)),li=void 0!==A,ai=o(function(){return W?b(W):null},[W]),ri=null!==(F=null!=j?j:null==ai?void 0:ai.topic)&&void 0!==F?F:"Web Citation",si=null!==(B=null!=E?E:null==ai?void 0:ai.relevanceScore)&&void 0!==B?B:0,di=null!=V?V:null==ai?void 0:ai.learnedFrom,ui=C(null==ai?void 0:ai.highlightedUrl,null!==(S=null==ai?void 0:ai.citationUrl)&&void 0!==S?S:H),ci=w(W),vi=o(function(){return function(i,t,e){return e?"success":i||(t?"error":"pending")}(z,W,ci)},[z,W,ci]),pi=a(function(){M?M():li||ni(!1)},[M,li]),gi=a(function(){M?M():li||ni(!0),ci||"success"===vi||null==G||G()},[M,li,ci,vi,G]),mi=null!=T?T:"Source: Web Citation > ".concat(ri),bi=function(n){var o=!!ii.DocumentTitle,l=[x.gptCitationWrapper,o?x.gptCitationWrapperWithSource:"",q?x.gptCitationWrapperFixedHeight:""].filter(Boolean).join(" ");return e("div",i({className:l,style:i(i({},K.gptWrapper),$)},{children:[t(d,i({},ii,{splitterCustomStyle:!0})),n&&t("div",i(o?{className:x.gptCitationFooterAction,style:K.gptFooterAction}:{className:[x.gptCitationToggleFooter,q?x.gptCitationToggleFooterFixedHeight:""].filter(Boolean).join(" "),style:K.gptFooterAction},{children:n}))]}))};return Q&&!oi?t("div",i({className:x.overlay,style:K.container},{children:bi(Y?t(I,{variant:"web",onClick:gi,title:"View web-based citation for this source.",style:K.gptToggleButton}):void 0)})):X?e("div",i({className:[x.panel,q?x.gptCitationWrapperFixedHeight:""].filter(Boolean).join(" "),style:i(i({},K.webPanel),$)},{children:[e("div",i({className:x.panelHeader,style:K.webHeader},{children:[t("span",i({className:x.panelSource},{children:mi})),t("div",i({className:x.panelHeaderActions},{children:si>0&&e("div",i({className:x.confidenceBadge,title:"Decision strength"},{children:[t(r,{size:14}),si,"%"]}))}))]})),t("div",i({className:[x.panelContent,x.panelContentExpanded,q?x.panelContentFixedHeight:""].filter(Boolean).join(" "),style:i(i({},K.webContent),q?y():void 0)},{children:"pending"===vi?t(c,{status:"pending",citationUrl:ui,ExternalLinkIcon:_.ExternalLinkIcon,styles:K.webSkeleton,visitLinkStyles:K.webSkeletonVisitLink,isFixedHeight:q}):"success"===vi&&ci?t(u,{citationImage:ci,citationUrl:ui,showExpandImageButton:D,iconsConfig:_,styles:K.webImage,visitLinkStyles:K.webImageVisitLink,skeletonStyles:K.webSkeleton,skeletonVisitLinkStyles:K.webSkeletonVisitLink,isFixedHeight:q}):t(c,{status:"error",citationUrl:ui,ExternalLinkIcon:_.ExternalLinkIcon,styles:K.webSkeleton,visitLinkStyles:K.webSkeletonVisitLink,isFixedHeight:q})})),e("div",i({className:x.panelFooter,style:K.webFooter},{children:[Y?t(I,{variant:"gpt",onClick:pi,style:K.webToggleButton}):null,di&&e("span",i({className:x.learnedFrom,style:K.webLearnedFrom},{children:["Learned From ",di]}))]}))]})):t("div",i({className:x.overlay,style:K.container},{children:bi()}))};export{B as default};
|
|
2
2
|
//# sourceMappingURL=GptWebCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i}from"tslib";import{jsxs as e,jsx as
|
|
1
|
+
import{__assign as i}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as n,useEffect as o}from"react";import{Maximize2 as l,ExternalLink as a}from"lucide-react";import r from"./GptWebCitationImageFullScreenView.js";import s from"./GptWebCitationSkeleton.js";import{sanitizeExternalUrl as d}from"./utils/citationData.utils.js";import c from"./GptWebCitation.module.css.js";var m=function(m){var u,v,p=m.citationImage,g=m.citationUrl,f=m.skeletonVisitUrl,C=m.showExpandImageButton,h=void 0===C||C,k=m.iconsConfig,y=m.styles,x=m.visitLinkStyles,w=m.skeletonStyles,I=m.skeletonVisitLinkStyles,b=m.isFixedHeight,j=void 0!==b&&b,L=null!==(u=null==k?void 0:k.MaximizeIcon)&&void 0!==u?u:l,N=null!==(v=null==k?void 0:k.ExternalLinkIcon)&&void 0!==v?v:a,S=n(!1),B=S[0],F=S[1],H=n("loading"),V=H[0],W=H[1];o(function(){var i=!0;W("loading"),F(!1);var e=new Image;return e.onload=function(){i&&W("loaded")},e.onerror=function(){i&&W("error")},e.src=p,function(){i=!1,e.onload=null,e.onerror=null}},[p]);var E="loaded"===V,z=d(g);return e("div",i({className:[c.imageCitationWrapper,j?c.imageCitationWrapperFixedHeight:""].filter(Boolean).join(" "),style:null==y?void 0:y.wrapper},{children:[t("div",i({className:[c.imageCitationCenter,j?c.imageCitationCenterFixedHeight:""].filter(Boolean).join(" "),style:null==y?void 0:y.center},{children:E?e("div",i({className:[c.imageCitationViewport,j?c.imageCitationViewportFixedHeight:""].filter(Boolean).join(" "),style:null==y?void 0:y.viewport},{children:[t("div",i({className:[c.imageCitationScrollContainer,j?c.imageCitationScrollContainerFixedHeight:""].filter(Boolean).join(" "),style:null==y?void 0:y.scrollContainer},{children:t("img",{src:p,alt:"Web citation snapshot",className:[c.citationImage,j?c.citationImageContained:""].filter(Boolean).join(" "),style:null==y?void 0:y.image})})),h&&t("button",i({type:"button",onClick:function(i){i.stopPropagation(),F(!0)},className:c.expandImageButton,style:null==y?void 0:y.expandButton,"aria-label":"View citation image in full screen",title:"Expand image"},{children:t(L,{size:16,strokeWidth:2})}))]})):t(s,{status:"error"===V?"error":"pending",citationUrl:null!=f?f:g,ExternalLinkIcon:null==k?void 0:k.ExternalLinkIcon,styles:w,visitLinkStyles:I,isFixedHeight:j})})),z&&E&&e("div",i({className:c.visitLinkRow,style:null==x?void 0:x.row},{children:[t("span",i({className:c.visitLinkHint,style:null==x?void 0:x.hint},{children:"Open link in new tab to read in detail"})),e("a",i({href:z,target:"_blank",rel:"noreferrer",className:c.visitLink,style:null==x?void 0:x.link},{children:["Visit Link",t(N,{size:16})]}))]})),B&&E&&t(r,{src:p,onClose:function(){return F(!1)},styles:null==y?void 0:y.fullScreen})]}))};export{m as default};
|
|
2
2
|
//# sourceMappingURL=GptWebCitationImageCitation.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e="520px",
|
|
1
|
+
var e="520px",t="3.25rem",n=function(n,i){if(void 0===i&&(i=!0),!i){var o=null!=n?n:e;return{contentHeight:o,gptBodyHeight:o,panelHeight:o}}if(n)return{contentHeight:n,gptBodyHeight:n,panelHeight:"calc(".concat(n," + ").concat(t,")")};var c="calc(".concat(e," - ").concat(t,")");return{contentHeight:c,gptBodyHeight:c,panelHeight:e}},i=function(e){return{height:e,minHeight:e,maxHeight:e,width:"100%",display:"flex",flexDirection:"column",overflow:"hidden",boxSizing:"border-box"}},o=function(){return{flex:1,minHeight:0,maxHeight:"none",overflow:"hidden",display:"flex",flexDirection:"column"}};export{i as getFixedPanelStyle,o as getFixedWebContentStyle,n as resolveFixedHeightLayout};
|
|
2
2
|
//# sourceMappingURL=fixedHeight.utils.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as o,jsx as i}from"react/jsx-runtime";import{ChevronDown as a,ChevronUp as n,Maximize2 as e,X as l,ExternalLink as r}from"lucide-react";import u from"dayjs";import c from"../ScannedDocCitation/ScannedDocCitation.js";import s from"../InstantLearningCitation/InstantLearningCitationComponent.js";import d from"../InstantLearningCitation/SlashLoader.js";import v from"../CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";import m from"../RequirementAiCitations/ImageCitation/ImageCitationContent.js";import g from"../RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";import h from"../ChatCitation/ChatCitationRenderer.js";var _=function(t,o,i){if(!t)throw new Error("[CitationOrchestratorComponent] ".concat(o,': missing required field "').concat(i,'" in customMetaData'))},C=function(t,o){if(!Object.values(t).some(Boolean))throw new Error("[CitationOrchestratorComponent] ".concat(o,': missing one of "').concat(Object.keys(t).join('", "'),'" in customMetaData'))},p=function(p){var D,f,M,b,I,w,S,R,j,k,x,T,y,P,L,U,O,A,F,W,q,z,B,E,G,H,N,$,J,K,Q,V,X,Y,Z,tt,ot,it,at,nt,et,lt,rt=p.href,ut=p.citations,ct=p.children,st=p.isStreaming,dt=p.onCitationToggle,vt=p.chatCitationConfig;if(st)return o("span",t({style:{display:"inline-flex",alignItems:"center",gap:"0.25rem",fontWeight:500,color:"#6D28D9"}},{children:[i("span",{children:ct}),i(d,{})]}));try{var mt=new URL(rt,"http://example.com"),gt=mt.searchParams.get("citationNumber"),ht=mt.searchParams.get("decisionStrength");if(!gt)return null;var _t=(null==ut?void 0:ut.find(function(t){var o;return String(null===(o=null==t?void 0:t.customMetaData)||void 0===o?void 0:o.citation_number)===gt}))||null;if(!_t)return null;var Ct=(null===(D=null==_t?void 0:_t.customMetaData)||void 0===D?void 0:D.citation_type)||((null===(f=_t.customMetaData)||void 0===f?void 0:f.type)||"").replace(/s$/,"");if("scanned_doc_citation"===Ct){var pt=null==_t?void 0:_t.customMetaData.value;if(null==pt?void 0:pt.length)return i(c,{pages:pt,subHeadingText:_t.customMetaData.artifact_title});_(null===(M=null==_t?void 0:_t.customMetaData)||void 0===M?void 0:M.gs_url,"scanned_doc_citation","gs_url");var Dt=[null===(b=null==_t?void 0:_t.customMetaData)||void 0===b?void 0:b.gs_url],ft=(null!==(I=_t.customMetaData.highlighted_coordinates)&&void 0!==I?I:[]).map(function(t,o){return{pageIndex:o,bboxes:[t]}});return i(c,{images:Dt,highlights:ft})}if("IL"===Ct){_(_t.customMetaData.il_learning,"IL","il_learning");var Mt=ct||(null===(w=_t.customMetaData)||void 0===w?void 0:w.link_text)||(null===(S=_t.customMetaData)||void 0===S?void 0:S.citation_source)||String(null!==(R=_t.customMetaData.citation_number)&&void 0!==R?R:1);return i(s,{citation:_t,linkTitle:Mt,onCitationToggle:null!=dt?dt:function(){},decisionStrengthFromUrl:ht||(null===(j=_t.customMetaData)||void 0===j?void 0:j.decision_strength)||""})}if("chat_citation"===Ct){var bt=null!=vt?vt:{},It=null===(T=null!==(x=null===(k=null==_t?void 0:_t.customMetaData)||void 0===k?void 0:k.chat_data)&&void 0!==x?x:[])||void 0===T?void 0:T.map(function(o){return t(t({},o),{timeStamp:u(o.timeStamp)})}),wt=!!(null===(y=null==_t?void 0:_t.customMetaData)||void 0===y?void 0:y.rule_book_content);return i(h,{showRootContainer:null===(P=bt.showRootContainer)||void 0===P||P,reversePanels:bt.reversePanels,isRenderedCustomComponent:bt.isRenderedCustomComponent,modalContainerStyle:bt.modalContainerStyle,additionalData:bt.additionalData,closePreview:bt.closePreview,selectedIdFromReason:null!==(L=bt.selectedIdFromReason)&&void 0!==L?L:void 0,rootContainer:t(t({},bt.rootContainer),{relevanceScore:_t.customMetaData.relevance_score}),chatContainer:t(t({},bt.chatContainer),{chatData:It,summarizedTab:null!==(O=null===(U=bt.chatContainer)||void 0===U?void 0:U.summarizedTab)&&void 0!==O?O:{chip:{isActive:!0,show:!0}},detailedTab:null!==(F=null===(A=bt.chatContainer)||void 0===A?void 0:A.detailedTab)&&void 0!==F?F:{chip:{isActive:!1}}}),ruleBookContainer:wt?t(t({},bt.ruleBookContainer),{data:{content:_t.customMetaData.rule_book_content,highlighted_texts:null!==(W=_t.customMetaData.rule_book_highlights)&&void 0!==W?W:[]}}):void 0})}if("gpt_citation"===Ct){var St=null===(q=_t.customMetaData)||void 0===q?void 0:q.value,Rt=null!==(z=null==St?void 0:St.text)&&void 0!==z?z:null===(E=null===(B=_t.customMetaData)||void 0===B?void 0:B.data_sources)||void 0===E?void 0:E[0],jt=null!==(G=null==St?void 0:St.label)&&void 0!==G?G:null===(N=null===(H=_t.customMetaData)||void 0===H?void 0:H.training_data_title)||void 0===N?void 0:N[0],kt=null!==($=null==St?void 0:St.paraphrase)&&void 0!==$?$:null===(K=null===(J=_t.customMetaData)||void 0===J?void 0:J.paraphrase)||void 0===K?void 0:K[0];return C({data_sources:Rt,training_data_title:jt},"gpt_citation"),i(v,{item:{text:"",dataSource:Rt,trainingDataTitle:jt,paraphrase:kt},headerTitle:"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:a,ChevronUpIcon:n,MaximizeIcon:e,CloseIcon:l}})}if("web_citation"===Ct){!function(t,o,i){_(t,o,i);try{new URL(t)}catch(a){throw new Error("[CitationOrchestratorComponent] ".concat(o,': "').concat(i,'" is not a valid URL: "').concat(t,'"'))}}(null===(Q=_t.customMetaData)||void 0===Q?void 0:Q.link,"web_citation","link");var xt=_t.customMetaData.link,Tt=ct||(null===(V=_t.customMetaData)||void 0===V?void 0:V.citation_source)||xt;return(null===(X=_t.customMetaData)||void 0===X?void 0:X.screenshot_url)?i(g,{url:xt,label:Tt,gsUtilPath:null===(Y=_t.customMetaData)||void 0===Y?void 0:Y.gs_util_path,signedUrl:null===(Z=_t.customMetaData)||void 0===Z?void 0:Z.screenshot_url,relevanceScore:null===(tt=_t.customMetaData)||void 0===tt?void 0:tt.relevance_score,visitIcon:r,PreviewDialogCloseIcon:l}):i("a",t({href:xt,target:"_blank",rel:"noreferrer"},{children:Tt}))}if("image_citation"===Ct)return C({gs_util_path:null===(ot=_t.customMetaData)||void 0===ot?void 0:ot.gs_util_path,signed_url:null===(it=_t.customMetaData)||void 0===it?void 0:it.signed_url},"image_citation"),i(m,{citationTitle:ct||(null===(at=_t.customMetaData)||void 0===at?void 0:at.citation_source),gsUtilPath:null===(nt=_t.customMetaData)||void 0===nt?void 0:nt.gs_util_path,signedUrl:null===(et=_t.customMetaData)||void 0===et?void 0:et.signed_url,relevanceScore:null===(lt=_t.customMetaData)||void 0===lt?void 0:lt.relevance_score})}catch(t){return console.error(t),null}return null};export{p as default};
|
|
2
|
+
//# sourceMappingURL=ParentCitationComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParentCitationComponent.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import{Worker as n,Viewer as t}from"@react-pdf-viewer/core";import{pdfStyles as o}from"./PdfStyle.js";var a="https://unpkg.com/pdfjs-dist@3.11.174/build/pdf.worker.min.js",d=function(d){var i=d.pdfUrl,l=d.plugins,f=d.onLoad,p=d.customStyles,s=d.onPageChange,m=d.defaultScale,u=d.renderPage,c=d.setRenderRange;return r("div",e({style:e(e({},o.pdfConatiner),null==p?void 0:p.pdfContainer)},{children:r(n,e({workerUrl:a},{children:r(t,{fileUrl:i,defaultScale:m,plugins:l,onDocumentLoad:f,onPageChange:s,renderPage:u,setRenderRange:c})}))}))};export{d as default,a as pdfWorker};
|
|
2
2
|
//# sourceMappingURL=PdfContainer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",position:"relative",width:"100%",minWidth:0,boxSizing:"border-box"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"12px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{
|
|
1
|
+
var e={pdfViewer:{borderRadius:"12px",padding:"16px",width:"100%",height:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},card:{border:"2px solid #E5E7EB",backgroundColor:"#FFFFFF",borderRadius:"12px",width:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden"},header:{display:"flex",flexShrink:0,justifyContent:"space-between",alignItems:"center",position:"relative",width:"100%",minWidth:0,boxSizing:"border-box"},title:{fontSize:"14px",fontWeight:600,color:"#60A3F8",fontFamily:'Roboto, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif'},toolbar:{display:"flex",alignItems:"center",gap:"8px",position:"relative"},button:{border:"1px solid #DFE5EC",borderRadius:"6px",padding:"4px 8px",fontSize:"12px",cursor:"pointer",backgroundColor:"#FFFFFF"},buttonDisabled:{opacity:.4,cursor:"not-allowed"},counter:{fontSize:"13px",color:"#64748B",margin:"0 6px"},viewerWrapper:{height:"30rem",overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #DEE4EB",borderRadius:"8px"},emptyState:{fontSize:"14px",color:"#EF4444"},pdfConatiner:{flex:"1 1 0",height:0,minHeight:0,minWidth:0,width:"100%",boxSizing:"border-box",overflow:"hidden",display:"block"}};export{e as pdfStyles};
|
|
2
2
|
//# sourceMappingURL=PdfStyle.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as t,jsx as n}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as t,jsx as n}from"react/jsx-runtime";import o from"react";import{pdfStyles as r}from"./PdfStyle.js";import{DefaultPdfIcon as i,DefaultDownloadIcon as l,DefaultCloseIcon as a}from"../../assests/svg/PdfViewerIcons.js";import c from"@mui/material/Tooltip";import{Minus as d,Plus as s,Expand as p,Info as u}from"lucide-react";import h from"@mui/icons-material/RotateRight";var g=function(g){g.highlightIndex;var f=g.totalHighlights,x=g.controls,m=g.currentPosition,y=g.pdfName,v=g.onClose,b=g.pdfUrl,w=g.viewerRef,k=g.customStyles,S=g.customClasses,C=g.customIcons,F=g.headerAction,I=g.isZoomEnabled,T=void 0===I||I,W=g.showHighlightsAction,E=void 0===W||W,z=g.showFullScreenAction,D=void 0===z||z,R=g.currentSegment,j=g.segmentTooltipText,L=void 0===j?"Details of current segment":j,P=g.currentPage,B=g.totalPages,M=g.onPageNavigate,H=g.onRotatePage,N=g.currentPageRotation,A=void 0===N?0:N,Z=g.showRotateButton,O=void 0===Z||Z,_=x.ZoomPopover,G=x.goToPrevious,V=x.goToNext,q=o.useState(String(P)),K=q[0],U=q[1];o.useEffect(function(){U(String(P))},[P]);var X={padding:"4px",borderRadius:"6px",background:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",flexShrink:0},Y=function(e){return String(e).padStart(2,"0")};return t("div",e({style:e(e(e({marginBottom:"12px",backgroundColor:"#F1F5F9",borderBottom:"1px solid #F3F4F6",borderTopLeftRadius:"12px",borderTopRightRadius:"12px"},r.header),null==k?void 0:k.header),{display:"flex",flexDirection:"column",alignItems:"stretch",gap:"12px"})},{children:[t("div",e({style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",columnGap:"16px",rowGap:"12px",minWidth:0}},{children:[t("div",e({style:{display:"flex",alignItems:"center",gap:"12px",flex:"1 1 180px",minWidth:0}},{children:[n("div",e({style:e(e(e({},{borderRadius:"21px",border:"6px solid #E8F3FF",background:"#D5E8FF",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",boxSizing:"content-box"}),null==k?void 0:k.pdfIconWrapper),{flexShrink:0})},{children:(null==C?void 0:C.pdfIcon)||n(i,{})})),n(c,e({title:y||"",arrow:!0,placement:"top"},{children:n("div",e({style:{flex:1,minWidth:0,overflow:"hidden"}},{children:n("span",e({style:e({display:"block",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontWeight:500,cursor:"default"},null==k?void 0:k.pdfName),className:null==S?void 0:S.pdfName},{children:y}))}))}))]})),t("div",e({style:{display:"flex",alignItems:"center",gap:E?"16px":"2px",color:"#4B5563",flex:"0 1 auto",marginLeft:"auto",whiteSpace:"nowrap",minWidth:0,maxWidth:"100%",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin"}},{children:[B>0&&t("div",e({style:{display:"flex",alignItems:"center",gap:"4px",color:"#475467",flexShrink:0,whiteSpace:"nowrap"}},{children:[n("input",{"aria-label":"Current page",inputMode:"numeric",pattern:"[0-9]*",value:K,onChange:function(e){var t=e.target.value.replace(/\D/g,"");U(t)},onBlur:function(){var e=Number(K);if(!Number.isInteger(e)||e<1)U(String(P));else{var t=B?Math.min(e,B):e;M(t),U(String(t))}},onKeyDown:function(e){"Enter"===e.key&&e.currentTarget.blur(),"Escape"===e.key&&(U(String(P)),e.currentTarget.blur())},style:{width:"40px",height:"28px",border:"1px solid #E5E7EB",borderRadius:"4px",background:"#FFFFFF",color:"#111827",fontSize:"14px",fontWeight:500,textAlign:"center",outline:"none",boxSizing:"border-box"}}),n("span",e({style:{fontSize:"14px",fontWeight:500,color:"#111827"}},{children:"/"})),n("span",e({style:{fontSize:"14px",fontWeight:500,color:"#111827"}},{children:String(B)}))]})),T&&t("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n("button",e({onClick:function(){x&&"function"==typeof x.zoomTo&&x.zoomTo(function(e){return e-.1})},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",color:"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px",transition:"color 0.2s ease"},onMouseEnter:function(e){e.currentTarget&&(e.currentTarget.style.color="#1976d2")},onMouseLeave:function(e){e.currentTarget&&(e.currentTarget.style.color="#475467")},title:"Zoom Out","aria-label":"Zoom out"},{children:n(d,{size:16,strokeWidth:2})})),n("div",e({style:{fontSize:"14px",fontWeight:500,width:"56px",textAlign:"center"}},{children:n(_,{})})),n("button",e({onClick:function(){x&&"function"==typeof x.zoomTo&&x.zoomTo(function(e){return e+.1})},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",color:"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px",transition:"color 0.2s ease"},onMouseEnter:function(e){e.currentTarget&&(e.currentTarget.style.color="#1976d2")},onMouseLeave:function(e){e.currentTarget&&(e.currentTarget.style.color="#475467")},title:"Zoom In","aria-label":"Zoom in"},{children:n(s,{size:16,strokeWidth:2})}))]})),O&&H&&B>0&&n(c,e({title:"Rotate page (".concat(A,"°)")},{children:n("button",e({onClick:function(){H&&"function"==typeof H&&H()},style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",color:0!==A?"#1976d2":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px",transition:"color 0.2s ease"},onMouseEnter:function(e){e.currentTarget&&(e.currentTarget.style.color="#1976d2")},onMouseLeave:function(e){e.currentTarget&&(e.currentTarget.style.color=0!==A?"#1976d2":"#475467")},"aria-label":"Rotate current page"},{children:n(h,{sx:{fontSize:"18px"}})}))})),!!f&&E&&t("div",e({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[t("span",e({style:{fontSize:"14px",color:"#475467",fontWeight:500,lineHeight:1}},{children:[m," of ",f]})),n("button",e({style:{background:"none",border:"none",cursor:m<=1?"not-allowed":"pointer",padding:"2px 4px",color:m<=1?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:G,disabled:m<=1},{children:n("svg",e({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n("path",{d:"M2 8L6 4L10 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))})),n("button",e({style:{background:"none",border:"none",cursor:m===f?"not-allowed":"pointer",padding:"2px 4px",color:m===f?"#D0D5DD":"#475467",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,height:"20px",width:"20px"},onClick:V,disabled:m===f},{children:n("svg",e({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},{children:n("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))}))]})),n("div",{style:{width:"1px",height:"20px",background:"#D1D5DB",margin:"0 4px",flexShrink:0}}),t("div",e({style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0,whiteSpace:"nowrap"}},{children:[!1!==D&&((null==F?void 0:F.icon)&&(null==F?void 0:F.onClick)?n(c,e({title:(null==F?void 0:F.tooltip)||"",arrow:!0,placement:"top"},{children:n("div",e({onClick:F.onClick,style:e({display:"flex",alignItems:"center",cursor:"pointer"},X)},{children:F.icon}))})):n("button",e({onClick:function(){var e=null==w?void 0:w.current;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(function(e){console.error("Error attempting to enable fullscreen: ".concat(e.message))}))},style:X,title:"Full Screen"},{children:(null==C?void 0:C.fullScreenIcon)||n(p,{size:20,color:"#475467",strokeWidth:2})}))),b&&n("a",e({href:b,target:"_blank",rel:"noopener noreferrer",style:X,title:"Open in new tab"},{children:(null==C?void 0:C.downloadIcon)||n(l,{})})),v&&n("button",e({onClick:v,style:X,title:"Close"},{children:(null==C?void 0:C.closeIcon)||n(a,{})}))]}))]}))]})),R&&t("div",e({style:{background:"#EEF2FF",border:"1px solid #A5B4FC",borderRadius:"8px",color:"#4F46E5",display:"flex",alignItems:"center",gap:"12px",minWidth:0,padding:"10px 16px",fontSize:"12px",fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},{children:[n(c,e({title:L,arrow:!0,placement:"top"},{children:n(u,{size:16,color:"#4F46E5",strokeWidth:2,style:{flexShrink:0}})})),n("span",e({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:n(c,e({title:R.title,arrow:!0,placement:"top"},{children:t("span",{children:["Viewing ",R.title," • Pages ",Y(R.start_page),"-",Y(R.end_page)]})}))}))]}))]}))};export{g as default};
|
|
2
2
|
//# sourceMappingURL=PdfToolbar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as n}from"tslib";import{jsx as r,jsxs as i,Fragment as o}from"react/jsx-runtime";import{SpecialZoomLevel as a}from"@react-pdf-viewer/core";import u from"./PdfContainer.js";import l from"./PdfToolbar.js";import{pdfStyles as c}from"./PdfStyle.js";import{PdfHighlightControls as d}from"./usePdfHighlight.js";import{rotationManager as s}from"./rotationManager.js";import"@react-pdf-viewer/zoom/lib/styles/index.css";import"@react-pdf-viewer/page-navigation/lib/styles/index.css";import"@react-pdf-viewer/core/lib/styles/index.css";import"@react-pdf-viewer/search/lib/styles/index.css";import g,{useRef as f,useState as h,useMemo as v,useEffect as m}from"react";import p from"../ScannedDocCitation/ScannedDocCitation.js";var w=function(w){var y=w.pdfUrl,P=w.highlightText,b=w.highlightPages,x=w.highlightCordinatePages,T=w.highlightColor,C=void 0===T?"yellow":T,S=w.activeHighlightColor,A=void 0===S?"#f7dc51":S,R=w.jumpToPageValue,_=void 0===R?0:R,I=w.pdfName,q=w.onClose,L=w.customStyles,F=w.customClasses,H=w.customIcons,N=w.useCoordinates,j=w.fallbackPages,B=w.activeCitationIndex,M=w.onActiveCitationChange,E=w.headerAction,D=w.isZoomEnabled,V=void 0===D||D,W=w.showHighlightsAction,k=void 0===W||W,z=w.defaultScale,O=void 0===z?a.ActualSize:z,U=w.useRange,Z=void 0!==U&&U,J=w.rangeOfPages,K=void 0===J?null:J,G=w.showFullScreenAction,Q=void 0===G||G,X=w.showRotateButton,Y=void 0!==X&&X,$=w.segments,ee=void 0===$?[{title:"Document 2",start_page:52,end_page:52,page_count:1}]:$,te=w.segmentTooltipText,ne=w.onCurrentPageChange,re=w.navigationRequest,ie=w.onNavigationSettled,oe=w.disablePdfAnnotations,ae=void 0!==oe&&oe,ue=w.disablePdfTextLayer,le=void 0!==ue&&ue,ce=w.renderPage,de=w.setRenderRange,se=f(null),ge=function(e){switch(e){case"ActualSize":return a.ActualSize;case"PageFit":return a.PageFit;case"PageWidth":return a.PageWidth;default:return null!=e?e:a.PageWidth}}(O),fe=h(0),he=fe[0],ve=fe[1],me=h(0),pe=me[0],we=me[1],ye=h(0),Pe=ye[0],be=ye[1],xe=f(null),Te=f(null),Ce=f(0),Se=f(null),Ae=v(function(){if(!y)return"";try{return new URL(y,window.location.origin).pathname.split("/").pop()||"default"}catch(e){return"default"}},[y]);m(function(){Ae&&s.setPdfIdentifier(Ae)},[Ae]);m(function(){return s.onRotationChange(function(e,t){e===he+1&&be(t)})},[he]),m(function(){var e=new MutationObserver(function(){var e,t=null===(e=se.current)||void 0===e?void 0:e.querySelectorAll('[data-testid^="core__page-layer-"]'),n=new Set;null==t||t.forEach(function(e){var t,r=null===(t=e.getAttribute("data-testid"))||void 0===t?void 0:t.match(/core__page-layer-(\d+)/);if(r&&r.length>=2){var i=parseInt(r[1],10)+1;n.has(i)||(s.registerPageElement(i,e),n.add(i))}})});return se.current&&(e.observe(se.current,{childList:!0,subtree:!0,attributes:!1}),Se.current=e),function(){e.disconnect(),Se.current=null}},[]),m(function(){return function(){s.clearAll(),Se.current&&Se.current.disconnect()}},[]),m(function(){var e=he+1;be(s.getRotation(e))},[he]);var Re,_e=v(function(){return ae||le?function(t){var n=le?r("div",e({"aria-hidden":"true",style:{display:"none"}},{children:t.textLayer.children})):t.textLayer.children,a=e(e({},t),{annotationLayer:e(e({},t.annotationLayer),{children:ae?null:t.annotationLayer.children}),textLayer:e(e({},t.textLayer),{children:n})});return ce?ce(a):i(o,{children:[t.canvasLayer.children,n,!ae&&t.annotationLayer.children]})}:ce},[ae,le,ce]),Ie=v(function(){if(N)return new Set(x.map(function(e){return e.pageIndex}));var e=new Set;return Object.values(b).forEach(function(t){t>0&&e.add(t-1)}),e},[x,b,N]),qe=(Re=P)&&0!==Re.length?Re.filter(function(e){return!Re.some(function(t){return t!==e&&t.includes(e)})}):Re,Le=d(qe,N?{}:b,se,Ie,N,N?x:[],C,A),Fe=Le.highlightIndex,He=Le.cursorIndex,Ne=Le.setCursorIndex,je=Le.orderedKeys,Be=Le.totalHighlights,Me=Le.getValidPosition,Ee=Le.tryJump,De=Le.jumpToPage,Ve=Le.plugins,We=Le.controls,ke=Le.hideNonTargetHighlights,ze=Le.deduplicateHighlights,Oe=Me(He),Ue=v(function(){var e=he+1;return ee.find(function(t){return e>=t.start_page&&e<=t.end_page})},[he,ee]);m(function(){void 0!==B&&B!==He&&Ne(B)},[B]);var Ze=e(e({},We),{goToNext:function(){He>=Be-1||(We.goToNext(),M&&M(He+1))},goToPrevious:function(){He<=0||(We.goToPrevious(),M&&M(He-1))}}),Je=g.useCallback(function(e,t){Ce.current+=1;var n=Ce.current;null!=Te.current&&window.clearTimeout(Te.current);var r=null,i=0,o=0,a=function(){var u,l;if(Ce.current===n){o+=1;var c=null===(u=se.current)||void 0===u?void 0:u.querySelector(".rpv-core__inner-pages"),d=null===(l=se.current)||void 0===l?void 0:l.querySelector('[data-testid="core__page-layer-'.concat(t-1,'"]'));if(!c||!d)return o>=40?(Te.current=null,void(null==ie||ie({pageNumber:t,requestId:e.requestId}))):void(Te.current=window.setTimeout(a,50));r===c.scrollTop?i+=1:(r=c.scrollTop,i=0);var s=c.getBoundingClientRect(),g=d.getBoundingClientRect(),f=Boolean(s&&g&&g.bottom>s.top&&g.top<s.bottom);if(i>=2&&f||o>=40)return Te.current=null,void(null==ie||ie({pageNumber:t,requestId:e.requestId}));Te.current=window.setTimeout(a,50)}};Te.current=window.setTimeout(a,50)},[ie]);if(m(function(){return function(){Ce.current+=1,null!=Te.current&&window.clearTimeout(Te.current)}},[]),m(function(){var e;if(re&&!(pe<=0)){var t=Math.min(Math.max(Math.trunc(re.pageNumber),1),pe),n="".concat(null!==(e=re.requestId)&&void 0!==e?e:t,":").concat(t);xe.current!==n&&(xe.current=n,ve(t-1),De(t-1),Je(re,t))}},[De,re,pe,Je]),!y)return r(p,{pages:j,activeCitationIndex:B,onActiveCitationChange:M,headerAction:E});return i("div",e({ref:se,className:(null==F?void 0:F.pdfViewerWrapper)||"","data-disable-pdf-annotations":ae?"true":void 0,"data-pdf-page-fit":ge===a.PageFit?"true":void 0,style:e(e(e(e({height:"100%",minHeight:0,minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column"},c.pdfViewer),{display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA"}),null==L?void 0:L.pdfViewer),{backgroundColor:"#F1F5F9"})},{children:[r(l,{highlightIndex:Fe,totalHighlights:Be,controls:Ze,currentPosition:Oe,pdfName:I,onClose:q,pdfUrl:y,viewerRef:se,customStyles:L,customClasses:F,customIcons:H,headerAction:E,isZoomEnabled:V,showHighlightsAction:k,showFullScreenAction:Q,currentSegment:Ue,segmentTooltipText:te,currentPage:he+1,totalPages:pe,onPageNavigate:function(e){var t=Math.min(Math.max(e,1),pe||e);ve(t-1),De(t-1)},onRotatePage:function(){var e=he+1;s.rotatePageBy90(e),be(s.getRotation(e))},currentPageRotation:Pe,showRotateButton:Y}),r(u,{defaultScale:ge,pdfUrl:y,plugins:Ve,customStyles:L,onLoad:function(e){we(e.doc.numPages);var r=!N&&!Z&&_<=0;if(_>0&&!Z){var i=_-1,o=je[i],a=b[o],u=x[i];Ne(i),console.log(u,"cordinateTargetHighlight"),N&&u.pageIndex>0&&De(u.pageIndex),a>0&&(setTimeout(function(){ke(Ie),ze(a-1)},1e3),N||De(a-1))}else if(Z&&K&&2===K.length){t(void 0,void 0,void 0,function(){var e,t,r,i,o;return n(this,function(n){switch(n.label){case 0:e=K[0],t=K[1],r=e,n.label=1;case 1:return r<=t?(De(i=r-1),[4,new Promise(function(e){return setTimeout(e,1e3)})]):[3,4];case 2:if(n.sent(),ke(Ie),(o=ze(i))&&o>0)return[3,4];n.label=3;case 3:return r++,[3,1];case 4:return[2]}})})}else if(!N&&b){var l=je.find(function(e){return b[e]>0});if(void 0!==l){var c=b[l]-1;De(c),setTimeout(function(){ke(Ie),ze(c)},1e3)}}requestAnimationFrame(function(){r&&Ee(),!N&&_>0&&!Z&&function(){if(se.current){var e=_-1,t=je[e],n=b[t],r=n>0?n-1:0,i={};je.forEach(function(e,t){var n=b[e];n>0&&(i[n]||(i[n]=[]),i[n].push(t))});var o=(i[n]||[]).indexOf(e),a=0,u=function(){var e,t;if(!(++a>40)){var n=null===(e=se.current)||void 0===e?void 0:e.querySelector(".rpv-core__inner-pages");if(n){var i=null===(t=se.current)||void 0===t?void 0:t.querySelector('[data-testid="core__page-layer-'.concat(r,'"]'));if(i){var l=n.getBoundingClientRect(),c=i.getBoundingClientRect();if(c.top<l.bottom&&c.bottom>l.top){var d=i.querySelectorAll(".rpv-search__highlight")[o];if(d){var s=d.getBoundingClientRect(),g=n.scrollTop+(s.top-l.top)-n.clientHeight/2+s.height/2;n.scrollTo({top:g,behavior:"smooth"})}else setTimeout(u,100)}else setTimeout(u,100)}else setTimeout(u,100)}else setTimeout(u,100)}};setTimeout(u,500)}}()})},onPageChange:function(e){var t=e.currentPage;ve(t),null==ne||ne(t+1),Ie.has(t)?(ze(t),ke(Ie)):ke(Ie)},renderPage:_e,setRenderRange:de})]}))};export{w as default};
|
|
2
2
|
//# sourceMappingURL=PdfViewer.js.map
|
|
@@ -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 a}from"react";import d from"@mui/icons-material/ChevronRight";import l from"@mui/icons-material/Close";import c from"@mui/icons-material/ExpandMore";import s from"@mui/material/Box";import m from"@mui/material/Button";import u from"@mui/material/ButtonBase";import p from"@mui/material/Divider";import h from"@mui/material/IconButton";import f from"@mui/material/Paper";import x from"@mui/material/Radio";import g from"@mui/material/Stack";import b from"@mui/material/Typography";import v from"./CognitiveIcon.js";import y from"./infoAlert.js";var C=function(e,o){return i([e],Array.isArray(o)?o:null==o?[]:[o],!0)},E=function(e){return"KEEP"===e||"SPLIT_HERE"===e||"MERGE_NEXT"===e||"MERGE_PREVIOUS"===e||"SET_RANGE"===e},S=function(e){return e.user_actions.map(function(i){var o=e.focus_page;switch(i){case"KEEP":return{id:i,title:"Keep as is",description:"Keep the current document boundary unchanged."};case"SPLIT_HERE":return{id:i,title:"Create a separate document",description:o?"Start a new document at page ".concat(o,"."):"Create a new document at this boundary."};case"MERGE_NEXT":return{id:i,title:"Merge into next document",description:o?"Move page ".concat(o," onward into the next document."):"Merge this segment into the next document."};case"MERGE_PREVIOUS":return{id:i,title:"Merge into previous document",description:"Merge this segment into the previous document."};case"SET_RANGE":return{id:i,title:"Adjust page range",description:"Set the start and end pages manually."}}})};function w(i){var w=i.headerName,R=void 0===w?"Boundary Check":w,k=i.title,z=i.pageNo,A=i.content,I=i.cognitiveScore,M=i.config,j=i.metadata,B=i.selectedIndex,T=i.defaultSelectedIndex,_=void 0===T?null:T,F=i.onSelectionChange,N=i.onConfirm,P=i.onActionConfirm,W=i.onCognitiveClick,D=i.onAdjustManually,G=i.onClose,H=i.confirmLabel,L=void 0===H?"Confirm":H,K=i.manualPrompt,O=void 0===K?"Didn't find the right option?":K,U=i.manualActionLabel,V=void 0===U?"Adjust Manually":U,X=i.cognitiveLabel,q=void 0===X?"Cognitive Integrity":X,J=i.showAdjustManually,Q=void 0===J||J,Y=i.showCognitiveIntegrity,Z=void 0===Y||Y,$=i.showCloseButton,ee=void 0===$||$,ie=i.confirmDisabled,oe=void 0!==ie&&ie,te=i.width,re=void 0===te?340:te,ne=i.maxWidth,ae=void 0===ne?340:ne,de=i.className,le=i.styles,ce=n(function(){return null!=M?M:j?S(j):[]},[M,j]),se=a(_),me=se[0],ue=se[1],pe=void 0===B?me:B,he=null==pe?void 0:ce[pe],fe=oe||!he||!0===he.disabled||!N&&!P;return o(f,e({className:de,elevation:4,sx:C({width:re,maxWidth:ae,borderTop:"4px solid",borderColor:"error.light",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==le?void 0:le.root)},{children:t(g,e({spacing:1.5,sx:{p:2}},{children:[t(g,e({direction:"row",alignItems:"center",spacing:1,sx:null==le?void 0:le.header},{children:[o(y,{color:"error"}),o(b,e({sx:{flex:1,color:"error.main",fontSize:16,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:R})),ee&&o(h,e({size:"small",onClick:G,disabled:!G,"aria-label":"Close boundary check",sx:{p:.25,"&.Mui-disabled":{color:"text.secondary"}}},{children:o(l,{sx:{fontSize:20}})}))]})),t(s,{children:[o(b,e({sx:{color:"text.primary",fontSize:18,fontWeight:500}},{children:k})),null!=z&&o(b,e({sx:{mt:.25,color:"text.secondary",fontSize:16}},{children:z})),o(p,{sx:{my:1.25}}),null!=A&&o(b,e({component:"div",sx:{color:"text.secondary",fontSize:15,lineHeight:1.45}},{children:A}))]}),t(g,e({spacing:1,role:"radiogroup","aria-label":"Boundary options"},{children:[ce.map(function(i,r){var n=pe===r;return o(f,e({variant:"outlined",sx:C({borderColor:n?"secondary.main":"divider",borderRadius:2,overflow:"hidden"},null==le?void 0:le.option)},{children:t(u,e({role:"radio","aria-checked":n,disabled:i.disabled,onClick:function(){return function(e,i){i.disabled||(void 0===B&&ue(e),null==F||F(e,i))}(r,i)},sx:{width:"100%",justifyContent:"flex-start",px:1.25,py:1.125,textAlign:"left"}},{children:[o(x,{checked:n,disabled:i.disabled,tabIndex:-1,size:"small",sx:{p:.5,mr:1}}),t(s,e({sx:{minWidth:0}},{children:[o(b,e({sx:{color:"text.primary",fontSize:15,fontWeight:500}},{children:i.title})),null!=i.description&&o(b,e({sx:{mt:.25,color:"text.secondary",fontSize:13}},{children:i.description}))]}))]}))}),i.id)}),o(m,e({variant:"contained",fullWidth:!0,disabled:fe,onClick:function(){!fe&&null!=pe&&he&&(null==N||N(pe,he),P&&E(he.id)&&P(he.id,{selectedIndex:pe,option:he,metadata:j}))},sx:C({minHeight:48,mt:.25,borderRadius:2,fontSize:17,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==le?void 0:le.confirmButton)},{children:L}))]})),t(g,e({spacing:1.25,sx:null==le?void 0:le.footer},{children:[Q&&t(u,e({onClick:D,disabled:!D,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[t(s,{children:[o(b,e({sx:{color:"text.primary",fontSize:14}},{children:O})),o(b,e({sx:{mt:.25,color:"text.primary",fontSize:14}},{children:V}))]}),o(c,{sx:{color:"text.secondary"}})]})),Z&&t(r,{children:[o(p,{}),t(u,e({onClick:W,disabled:!0,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:"not-allowed"}},{children:[t(g,e({direction:"row",alignItems:"center",spacing:1},{children:[o(v,{sx:{color:"text.secondary"}}),o(b,e({sx:{color:"text.primary",fontSize:15}},{children:q}))]})),t(g,e({direction:"row",alignItems:"center",spacing:.5},{children:[null!=I&&o(s,e({sx:{px:1,py:.125,border:"1.5px solid",borderColor:"secondary.main",borderRadius:10,color:"secondary.main",fontSize:14,lineHeight:1.25}},{children:I})),o(d,{sx:{color:"text.secondary"}})]}))]}))]})]}))]}))}))}export{S as createBoundaryCardOptions,w as default,E 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 o}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useState as e,useLayoutEffect as r}from"react";import n from"@mui/material/Box";import i from"@mui/material/Popper";function l(l){var a,m,f=l.anchorRef,u=l.anchorElement,p=l.children,c=l.className,s=l.offset,d=void 0===s?{}:s,v=l.placement,x=void 0===v?"bottom-start":v,h=e(null),E=h[0],b=h[1];return r(function(){var o,t=null!==(o=null!=u?u:null==f?void 0:f.current)&&void 0!==o?o:null;b(function(o){return o===t?o:t})}),t(i,o({open:Boolean(E),anchorEl:E,placement:x,className:c,popperOptions:{strategy:"fixed"},modifiers:[{name:"offset",options:{offset:[null!==(a=d.left)&&void 0!==a?a:0,null!==(m=d.top)&&void 0!==m?m:0]}}],sx:{zIndex:function(o){return o.zIndex.tooltip}}},{children:t(n,o({sx:{maxHeight:"calc(85vh - 10px)",overflowY:"auto",pointerEvents:"auto"}},{children:p}))}))}export{l 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 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 e,__spreadArray as o}from"tslib";import{jsx as i,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/icons-material/ExpandMore";import s from"@mui/material/Box";import u from"@mui/material/Button";import m from"@mui/material/ButtonBase";import p from"@mui/material/Divider";import f from"@mui/material/IconButton";import h from"@mui/material/Paper";import x from"@mui/material/Radio";import b from"@mui/material/Stack";import v from"@mui/material/TextField";import g from"@mui/material/Typography";import C from"./CognitiveIcon.js";import y from"./infoAlert.js";var S=function(e,i){return o([e],Array.isArray(i)?i:null==i?[]:[i],!0)},w=function(e){return e.user_actions.map(function(o){switch(o){case"KEEP_LABEL":return{id:o,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:o,title:"Enter a custom label",description:"Create your own document label",requiresInput:!0,inputPlaceholder:e.current_label?"e.g. ".concat(e.current_label):"Enter a document label"}}})},L=function(e){return"KEEP_LABEL"===e||"SET_CUSTOM_LABEL"===e};function A(o){var A,k=o.headerName,z=void 0===k?"Label Check":k,I=o.title,E=o.pageNo,B=o.content,_=void 0===B?"We're not fully confident about this label. Confirm it, choose a different type, or add a new one.":B,F=o.cognitiveScore,W=o.config,j=o.metadata,T=o.selectedIndex,M=o.defaultSelectedIndex,R=void 0===M?null:M,D=o.onSelectionChange,P=o.customLabel,K=o.defaultCustomLabel,H=o.onCustomLabelChange,N=o.onConfirm,q=o.onActionConfirm,O=o.onCognitiveClick,U=o.onAdjustManually,G=o.onClose,J=o.confirmLabel,Q=void 0===J?"Confirm":J,V=o.customInputAriaLabel,X=void 0===V?"Custom document label":V,Y=o.manualPrompt,Z=void 0===Y?"Didn't find the right option?":Y,$=o.manualActionLabel,ee=void 0===$?"Adjust Manually":$,oe=o.cognitiveLabel,ie=void 0===oe?"Cognitive Integrity":oe,re=o.showAdjustManually,te=void 0===re||re,ne=o.showCognitiveIntegrity,le=void 0===ne||ne,ae=o.showCloseButton,de=void 0===ae||ae,ce=o.confirmDisabled,se=void 0!==ce&&ce,ue=o.width,me=void 0===ue?340:ue,pe=o.maxWidth,fe=void 0===pe?340:pe,he=o.className,xe=o.styles,be=n(function(){return null!=W?W:j?w(j):[]},[W,j]),ve=l(R),ge=ve[0],Ce=ve[1],ye=l(null!==(A=null!=K?K:null==j?void 0:j.custom_label)&&void 0!==A?A:""),Se=ye[0],we=ye[1],Le=void 0===T?ge:T,Ae=void 0===P?Se:P,ke=null==Le?void 0:be[Le],ze=Boolean(null==ke?void 0:ke.requiresInput),Ie=se||!N&&!q||!ke||!0===ke.disabled||ze&&0===Ae.trim().length,Ee=function(){if(!Ie&&null!=Le&&ke){var e=ze?Ae.trim():void 0;null==N||N(Le,ke,e),q&&L(ke.id)&&q(ke.id,{selectedIndex:Le,option:ke,customLabel:e,metadata:j})}};return i(h,e({className:he,elevation:4,sx:S({width:me,maxWidth:fe,borderTop:"4px solid",borderColor:"error.light",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==xe?void 0:xe.root)},{children:r(b,e({spacing:1.5,sx:{p:2}},{children:[r(b,e({direction:"row",alignItems:"center",spacing:1,sx:null==xe?void 0:xe.header},{children:[i(y,{color:"error"}),i(g,e({sx:{flex:1,color:"error.main",fontSize:16,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:z})),de&&i(f,e({size:"small",onClick:G,disabled:!G,"aria-label":"Close label check",sx:{p:.25,"&.Mui-disabled":{color:"text.secondary"}}},{children:i(d,{sx:{fontSize:20}})}))]})),r(s,{children:[i(g,e({sx:{color:"text.primary",fontSize:18,fontWeight:500}},{children:I})),null!=E&&i(g,e({sx:{mt:.25,color:"text.secondary",fontSize:16}},{children:E})),i(p,{sx:{my:1.25}}),null!=_&&i(g,e({component:"div",sx:{color:"text.secondary",fontSize:15,lineHeight:1.45}},{children:_}))]}),r(b,e({spacing:1,role:"radiogroup","aria-label":"Label options"},{children:[be.map(function(o,t){var n=Le===t;return r(h,e({variant:"outlined",sx:S({borderColor:n?"secondary.main":"divider",borderRadius:2,overflow:"hidden"},null==xe?void 0:xe.option)},{children:[r(m,e({role:"radio","aria-checked":n,disabled:o.disabled,onClick:function(){return function(e,o){o.disabled||(void 0===T&&Ce(e),null==D||D(e,o))}(t,o)},sx:{width:"100%",justifyContent:"flex-start",px:1.25,py:1.125,textAlign:"left"}},{children:[i(x,{checked:n,disabled:o.disabled,tabIndex:-1,size:"small",sx:{p:.5,mr:1}}),r(s,e({sx:{minWidth:0}},{children:[i(g,e({sx:{color:"text.primary",fontSize:15,fontWeight:500}},{children:o.title})),null!=o.description&&i(g,e({sx:{mt:.25,color:"text.secondary",fontSize:13}},{children:o.description}))]}))]})),n&&o.requiresInput&&i(s,e({sx:{px:1.75,pb:1.5,pl:5.75}},{children:i(v,{autoFocus:!0,fullWidth:!0,size:"small",value:Ae,placeholder:o.inputPlaceholder,inputProps:{"aria-label":X},onChange:function(e){return o=e.target.value,void 0===P&&we(o),void(null==H||H(o));var o},onKeyDown:function(e){"Enter"===e.key&&Ee()},sx:null==xe?void 0:xe.customInput})}))]}),o.id)}),i(u,e({variant:"contained",fullWidth:!0,disabled:Ie,onClick:Ee,sx:S({minHeight:48,mt:.25,borderRadius:2,fontSize:17,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==xe?void 0:xe.confirmButton)},{children:Q}))]})),r(b,e({spacing:1.25,sx:null==xe?void 0:xe.footer},{children:[te&&r(m,e({onClick:U,disabled:!U,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[r(s,{children:[i(g,e({sx:{color:"text.primary",fontSize:14}},{children:Z})),i(g,e({sx:{mt:.25,color:"text.primary",fontSize:14}},{children:ee}))]}),i(c,{sx:{color:"text.secondary"}})]})),le&&r(t,{children:[i(p,{}),r(m,e({onClick:O,disabled:!O,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[r(b,e({direction:"row",alignItems:"center",spacing:1},{children:[i(C,{sx:{color:"text.secondary"}}),i(g,e({sx:{color:"text.primary",fontSize:15}},{children:ie}))]})),r(b,e({direction:"row",alignItems:"center",spacing:.75},{children:[null!=F&&i(s,e({sx:{px:1,py:.125,border:"1.5px solid",borderColor:"secondary.main",borderRadius:10,color:"secondary.main",fontSize:14,lineHeight:1.25}},{children:F})),i(a,{sx:{color:"text.secondary"}})]}))]}))]})]}))]}))}))}export{w as createLabelCheckOptions,A 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{__spreadArray as e,__awaiter as n,__generator as t,__assign as i}from"tslib";import{jsxs as r,jsx as a}from"react/jsx-runtime";import{useMemo as o,useState as u,useRef as l,useCallback as d,useEffect as c}from"react";import s from"../PdfViewer.js";import v from"./BoundaryCard.js";import f from"./CardWrapper.js";import g from"./LabelCheck.js";import{extractSegmentReviewData as p}from"./reviewStepAdapters.js";var m=function(e){return{reviewId:e.review.id,segment:e.review.segment,pageNumber:e.pageNumber}};function w(w){var b=this,h=w.pdfUrl,y=w.pdfName,C=w.segments,N=w.pdfViewerProps,P=w.showBadges,x=void 0===P||P,A=w.showResolvedBadges,R=void 0!==A&&A,_=w.autoSelectReviewOnPageChange,F=void 0!==_&&_,S=w.autoAdvanceAfterConfirm,k=void 0===S||S,j=w.badgePreloadPages,E=void 0===j?8:j,M=w.badgeOffsetTop,B=void 0===M?20:M,D=w.badgeOffsetRight,L=void 0===D?8:D,z=w.initialReviewId,I=w.onBoundaryAction,O=w.onLabelAction,q=w.onActiveReviewChange,W=w.onCurrentPageChange,T=w.onActionError,H=w.onAdjustManually,U=w.onCognitiveClick,V=w.className,G=w.style,J=w.viewerStyle,K=w.railStyle,Q=o(function(){return p(C)},[C]),X=Q.boundaryReviews,Y=Q.labelReviews,Z=o(function(){return e(e([],X.map(function(e){var n;return{kind:"boundary",pageNumber:null!==(n=e.metadata.focus_page)&&void 0!==n?n:e.segment.start_page,review:e}}),!0),Y.map(function(e){return{kind:"label",pageNumber:e.segment.start_page,review:e}}),!0).sort(function(e,n){return e.pageNumber-n.pageNumber||e.review.id.localeCompare(n.review.id)})},[X,Y]),$=o(function(){return C.map(function(e){return{title:e.label||e.title,start_page:e.start_page,end_page:e.end_page,page_count:e.end_page-e.start_page+1}})},[C]),ee=u(1),ne=ee[0],te=ee[1],ie=u(null!=z?z:null),re=ie[0],ae=ie[1],oe=u(null),ue=oe[0],le=oe[1],de=u(null),ce=de[0],se=de[1],ve=u(function(){return new Set}),fe=ve[0],ge=ve[1],pe=u(null),me=pe[0],we=pe[1],be=l(0),he=l(new Map),ye=l(null),Ce=l(null),Ne=o(function(){var e;return null!==(e=Z.find(function(e){return e.review.id===re}))&&void 0!==e?e:null},[re,Z]),Pe=d(function(e){be.current+=1,se({pageNumber:e,requestId:be.current})},[]),xe=d(function(e,n){var t;ae(e.review.id),le(null!==(t=null!=n?n:he.current.get(e.review.id))&&void 0!==t?t:null),Pe(e.pageNumber),null==q||q(e.review.id)},[q,Pe]),Ae=d(function(){ae(null),le(null),null==q||q(null)},[q]),Re=d(function(e){var n;if(k){var t=Z.findIndex(function(n){return n.review.id===e}),i=null!==(n=Z.find(function(n,i){return i>t&&n.review.id!==e&&!fe.has(n.review.id)}))&&void 0!==n?n:Z.find(function(n){return n.review.id!==e&&!fe.has(n.review.id)});i?requestAnimationFrame(function(){return xe(i)}):Ae()}else Ae()},[k,Ae,fe,Z,xe]),_e=d(function(e,i,r){return n(b,void 0,void 0,function(){var n,a;return t(this,function(t){switch(t.label){case 0:n=m(e),we(e.review.id),t.label=1;case 1:return t.trys.push([1,6,7,8]),"boundary"!==e.kind?[3,3]:[4,null==I?void 0:I(i,r,n)];case 2:return t.sent(),[3,5];case 3:return[4,null==O?void 0:O(i,r,n)];case 4:t.sent(),t.label=5;case 5:return ge(function(n){var t=new Set(n);return t.add(e.review.id),t}),Re(e.review.id),[3,8];case 6:return a=t.sent(),null==T||T(a,n),[3,8];case 7:return we(null),[7];case 8:return[2]}})})},[T,I,O,Re]);c(function(){re&&!Z.some(function(e){return e.review.id===re})&&Ae()},[re,Ae,Z]),c(function(){if(F){var e=Z.find(function(e){return e.pageNumber===ne&&!fe.has(e.review.id)});e&&e.review.id!==re&&xe(e)}},[re,F,ne,fe,Z,xe]);var Fe=R?Z:Z.filter(function(e){return!fe.has(e.review.id)}),Se=o(function(){return new Map(Z.map(function(e,n){return[e.review.id,n+1]}))},[Z]),ke=o(function(){var e=new Map;Fe.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.review.id,t)})}),n},[Fe]),je=d(function(e){return{startPage:Math.max(0,e.startPage-E),endPage:Math.min(e.numPages-1,e.endPage+E)}},[E]),Ee=d(function(){var e=ye.current,n=Ce.current;if(e&&n){var t=e.getBoundingClientRect(),i=n.getBoundingClientRect();Fe.forEach(function(e){var r,a=he.current.get(e.review.id);if(a){var o=n.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(o){var u=o.getBoundingClientRect(),l=u.bottom>i.top&&u.top<i.bottom,d=null!==(r=ke.get(e.review.id))&&void 0!==r?r:0;a.style.top="".concat(u.top-t.top+B+40*d,"px"),a.style.visibility=l?"visible":"hidden"}else a.style.visibility="hidden"}})}},[B,ke,Fe]);return c(function(){var e=Ce.current;if(e&&x){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,Ee()}))};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()}}},[x,Ee]),r("div",i({ref:ye,className:V,style:i({display:"flex",alignItems:"stretch",gap:12,position:"relative",width:"100%",height:"100%",minWidth:0},G)},{children:[a("div",i({ref:Ce,style:i({flex:1,minWidth:0,height:"100%"},J)},{children:a(s,i({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},N,{pdfUrl:h,pdfName:y,segments:$,navigationRequest:ce,setRenderRange:je,onCurrentPageChange:function(e){te(e),Ne&&Ne.pageNumber!==e&&Ae(),null==W||W(e)}}))})),x&&a("aside",i({"aria-label":"Page review badges",style:i({position:"relative",width:112,flex:"0 0 112px",minHeight:0,overflow:"hidden"},K)},{children:Fe.map(function(e){var n,t,o=re===e.review.id,u=fe.has(e.review.id),l=null!==(n=Se.get(e.review.id))&&void 0!==n?n:1,d="".concat(l).concat("boundary"===e.kind?"B":"L");return r("button",i({ref:function(n){n?he.current.set(e.review.id,n):he.current.delete(e.review.id)},type:"button","aria-pressed":o,title:"".concat(e.review.step.type," · Page ").concat(e.pageNumber),onClick:function(n){return xe(e,n.currentTarget)},style:{position:"absolute",top:0,right:L,visibility:"hidden",display:"flex",alignItems:"center",justifyContent:"space-between",gap:4,width:96,minHeight:32,padding:"5px 8px",border:"1px solid ".concat(o?"#5925DC":"#D0D5DD"),borderRadius:16,background:o?"#F4F3FF":"#FFFFFF",color:u?"#98A2B3":o?"#5925DC":"#344054",cursor:"pointer",opacity:u?.65:1,font:"inherit",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:[a("span",i({style:{fontSize:13,fontWeight:600}},{children:d})),a("span",i({style:{fontSize:10}},{children:null!==(t=e.review.step.confidence)&&void 0!==t?t:"—"}))]}),e.review.id)})})),Ne&&ue&&a(f,i({anchorElement:ue,placement:"bottom-end",offset:{top:8}},{children:"boundary"===Ne.kind?a(v,{title:Ne.review.segment.label||Ne.review.segment.title,pageNo:"Page ".concat(Ne.pageNumber),content:Ne.review.step.reason,cognitiveScore:Ne.review.step.confidence,metadata:Ne.review.metadata,confirmDisabled:me===Ne.review.id,onActionConfirm:function(e,n){_e(Ne,e,n)},onAdjustManually:function(){return null==H?void 0:H(m(Ne))},onCognitiveClick:function(){return null==U?void 0:U(m(Ne))},onClose:Ae},Ne.review.id):a(g,{title:Ne.review.metadata.current_label||Ne.review.segment.label||Ne.review.segment.title,pageNo:"Pages ".concat(Ne.review.segment.start_page,"-").concat(Ne.review.segment.end_page),content:Ne.review.step.reason,cognitiveScore:Ne.review.step.confidence,metadata:Ne.review.metadata,confirmDisabled:me===Ne.review.id,onActionConfirm:function(e,n){_e(Ne,e,n)},onAdjustManually:function(){return null==H?void 0:H(m(Ne))},onCognitiveClick:function(){return null==U?void 0:U(m(Ne))},onClose:Ae},Ne.review.id)}))]}))}export{w 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{__assign as r}from"tslib";import{jsx as o}from"react/jsx-runtime";import t from"@mui/material/SvgIcon";function e(e){return o(t,r({},e,{viewBox:"0 0 13 13",sx:r({width:13,height:13},e.sx)},{children:o("path",{d:"M6.33333 3.99996V6.33329M6.33333 8.66663H6.33917M12.1667 6.33329C12.1667 3.11163 9.555 0.499959 6.33333 0.499959C3.11167 0.499959 0.5 3.11163 0.5 6.33329C0.5 9.55495 3.11167 12.1666 6.33333 12.1666C9.555 12.1666 12.1667 9.55495 12.1667 6.33329Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}))}export{e as default};
|
|
2
|
+
//# sourceMappingURL=infoAlert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoAlert.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{isBoundaryReviewAction as e}from"./BoundaryCard.js";import{isLabelReviewAction as t}from"./LabelCheck.js";var r=function(e){return"object"==typeof e&&null!==e?e:{}},n=function(e){return"string"==typeof e?e:null},a=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},u=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},o=function(e){var a=r(e);return{current_label:n(a.current_label),custom_label:n(a.custom_label),group_id:n(a.group_id),user_actions:u(a.user_actions).filter(t)}},i=function(t){var n=[],i=[];return t.forEach(function(t){t.review_steps.forEach(function(c,s){var l;if("Page Boundary Review"===c.type){var f=function(t){var n=r(t);return{focus_page:a(n.focus_page),boundary_margin:a(n.boundary_margin),user_actions:u(n.user_actions).filter(e)}}(c.metadata);n.push({id:"".concat(t.stable_key,":boundary:").concat(null!==(l=f.focus_page)&&void 0!==l?l:s),segment:t,step:c,metadata:f})}"Label Review"===c.type&&i.push({id:"".concat(t.stable_key,":label:").concat(s),segment:t,step:c,metadata:o(c.metadata)})})}),{boundaryReviews:n,labelReviews:i}};export{i as extractSegmentReviewData};
|
|
2
|
+
//# sourceMappingURL=reviewStepAdapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewStepAdapters.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var t=function(){function t(){this.rotations=new WeakMap,this.pageMap=new Map,this.rotationChangeListeners=new Set,this.pdfIdentifier=""}return t.prototype.setPdfIdentifier=function(t){this.pdfIdentifier=t},t.prototype.registerPageElement=function(t,e){this.pageMap.get(t),this.pageMap.set(t,e);var o=this.getPersistedRotation(t);0!==o&&this.applyRotation(e,t,o)},t.prototype.unregisterPageElement=function(t){this.pageMap.delete(t)},t.prototype.getRotation=function(t){var e=this.pageMap.get(t);return e&&this.rotations.get(e)||0},t.prototype.rotatePageBy90=function(t){var e=this.pageMap.get(t);if(e){var o=((this.rotations.get(e)||0)+90)%360;this.applyRotation(e,t,o)}},t.prototype.setRotation=function(t,e){var o=(e%360+360)%360,i=this.pageMap.get(t);i&&this.applyRotation(i,t,o)},t.prototype.applyRotation=function(t,e,o){this.rotations.set(t,o);var i=t.closest(".rpv-core__page-layer");i&&(0===o?(i.style.transform="",i.style.transformOrigin="",i.style.transition=""):(i.style.transform="rotate(".concat(o,"deg)"),i.style.transformOrigin="center center",i.style.transition="transform 0.2s ease")),this.notifyRotationChange(e,o),this.persistRotation(e,o)},t.prototype.onRotationChange=function(t){var e=this;return this.rotationChangeListeners.add(t),function(){e.rotationChangeListeners.delete(t)}},t.prototype.notifyRotationChange=function(t,e){this.rotationChangeListeners.forEach(function(o){try{o(t,e)}catch(t){console.error("Error in rotation change listener:",t)}})},t.prototype.getPersistedRotation=function(t){if(!this.pdfIdentifier)return 0;var e="pdf-rotation-".concat(this.pdfIdentifier,"-").concat(t),o=localStorage.getItem(e);if(null===o)return 0;if(!o)return 0;var i=parseInt(o,10);return Number.isFinite(i)?i:0},t.prototype.persistRotation=function(t,e){if(this.pdfIdentifier){var o="pdf-rotation-".concat(this.pdfIdentifier,"-").concat(t);0===e?localStorage.removeItem(o):localStorage.setItem(o,e.toString())}},t.prototype.loadPersistedRotations=function(t){var e=this;this.pdfIdentifier&&t.forEach(function(t){var o=e.getPersistedRotation(t);if(0!==o){var i=e.pageMap.get(t);i&&e.applyRotation(i,t,o)}})},t.prototype.clearAll=function(){var t=this;this.pageMap.forEach(function(e,o){var i=e.closest(".rpv-core__page-layer");if(i&&(i.style.transform="",i.style.transformOrigin="",i.style.transition=""),t.pdfIdentifier){var n="pdf-rotation-".concat(t.pdfIdentifier,"-").concat(o);localStorage.removeItem(n)}}),this.pageMap.clear(),this.rotations=new WeakMap},t.prototype.resetPage=function(t){var e=this.pageMap.get(t);e&&this.applyRotation(e,t,0)},t.prototype.getRotatedPages=function(){var t=this,e=new Map;return this.pageMap.forEach(function(o,i){var n=t.rotations.get(o);void 0!==n&&0!==n&&e.set(i,n)}),e},t}(),e=new t;export{t as RotationManager,e as rotationManager};
|
|
2
|
+
//# sourceMappingURL=rotationManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rotationManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__assign as t}from"tslib";import{jsx as r,Fragment as n}from"react/jsx-runtime";import{useState as i,useRef as o,useMemo as a}from"react";import{searchPlugin as l}from"@react-pdf-viewer/search";import{pageNavigationPlugin as c}from"@react-pdf-viewer/page-navigation";import{zoomPlugin as u}from"@react-pdf-viewer/zoom";import{highlightPlugin as h}from"@react-pdf-viewer/highlight";var f=function(f,g,s,p,v,d,m,x){void 0===m&&(m="yellow"),void 0===x&&(x="#F6D739");var T=i(0),y=T[0],b=T[1],w=o(!1),M=i(0),I=M[0],_=M[1];o([]);var S=function(e){return e.replace(/[^\S\n]+/g," ").trim()},E=function(e){return(e||"").toLowerCase().replace(/\u00ad/g,"").replace(/[""]/g,'"').replace(/['']/g,"'").replace(/[\u2013\u2014]/g,"-").replace(/-/g," ").replace(/[^\w\s]/g,"").replace(/\s+/g," ").trim()},A=function(e){var t=e.trim(),r=(t=(t=t.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u00A0\u2009\u202F]/g," ")).replace(/^[-•]\s+/,"")).match(/^((\d+(?:\.\d+)*[.)]?)|[A-Za-z][.)]|\([A-Za-z0-9]+\)|(?:i|ii|iii|iv|v|vi|vii|viii|ix|x)[.)])\s*/i);return r?t.slice(r[0].length).trim():t},B=function(e){var t=E(e),r=t.replace(/\s+/g,""),n=new Set;return t&&n.add(t),r&&n.add(r),n},k=function(e){return e.replace(/\\([''])/g,"$1").replace(/\]\s*\n\s*\(/g,"](").replace(/&[#\w]+;/g,function(e){return t=e,(r=document.createElement("textarea")).innerHTML=t,r.value;var t,r}).replace(/<br\s*\/?>/gi,"\n").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/`([^`]+)`/g,"$1")},j=function(e){return e?k(e).split(/\n+/).map(A).flatMap(function(e){var t=e.match(/^\s*\|(.+)\|\s*$/);return t?t[1].split("|").map(function(e){return e.trim()}).filter(Boolean):[e]}).map(function(e){return S(function(e){return e.replace(/(^|\W)[*_]{1,3}([^*_]+)[*_]{1,3}(?=\W|$)/g,"$1$2")}(e))}).filter(Boolean):[]},q=Object.keys(g).map(Number).sort(function(e,t){return e-t}),z=a(function(){return v?d.length:v?0:Object.values(g).filter(function(e){return e>0}).length},[d,g]),C=function(r){if(s.current){var n=s.current.querySelector('[data-testid="search__highlights-'.concat(r,'"]'));if(n){var i=Array.from(n.querySelectorAll(".rpv-search__highlight"));if(0!==i.length){var o=$.map(B),a=P.map(B);if(0!==o.length||0!==a.length){var l=i.map(function(e){var r=function(e){var t=e.getBoundingClientRect();if(t.height>0||t.width>0)return{top:t.top,left:t.left,right:t.right};var r=e.offsetTop,n=e.offsetLeft;return{top:r,left:n,right:n+e.offsetWidth}}(e),n=(e.textContent||"").trim(),i=(e.getAttribute("title")||"").trim();return t({el:e,text:n||i},r)}).filter(function(e){return e.text.length>0}).sort(function(e,t){return e.top-t.top||e.left-t.left});if(0!==l.length){var c=[],u=null,h=[],g=function(){if(u){var e=h.join(" ");u.title=E(e),u.title&&c.push(u),u=null,h=[]}};if(l.forEach(function(e){if(!u)return u={title:"",elements:[e.el],lastTop:e.top,lastRight:e.right},void(h=[e.text]);var t=Math.abs(e.top-u.lastTop)<=5,r=e.left<=u.lastRight+28;t&&r?(u.elements.push(e.el),u.lastTop=e.top,u.lastRight=Math.max(u.lastRight,e.right),h.push(e.text)):(g(),u={title:"",elements:[e.el],lastTop:e.top,lastRight:e.right},h=[e.text])}),g(),0!==c.length){for(var p=function(e,t){if(!e)return!1;if(t.has(e))return!0;for(var r=e.replace(/\s+/g,""),n=0,i=Array.from(t);n<i.length;n++){var o=i[n];if(o){var a=o.replace(/\s+/g,"");if(a===r)return!0;if(o.length>=8&&e.length>=5&&o.includes(e))return!0;if(a.length>=8&&r.length>=5&&a.includes(r))return!0;if(e.length>=10&&o.length>=8&&e.includes(o))return!0;if(r.length>=10&&a.length>=8&&r.includes(a))return!0}}return!1},v=0,d=new Set,m=function(e){if(!e||e.length<8)return null;for(var t=e.replace(/\s+/g,""),r=0;r<c.length;r++)for(var n="",i="",o=new Set,a=r;a<c.length&&a<r+20;a++){var l=c[a].title;if(n=n?"".concat(n," ").concat(l):l,i=i?"".concat(i).concat(l.replace(/\s+/g,"")):l.replace(/\s+/g,""),o.add(a),n.includes(e)||i.includes(t))return o;if(n.length>=15&&(e.includes(n)||t.includes(i)))return o;if(n.length>e.length+150)break}return null},x=0,T=Array.from(new Set(e(e([],$,!0),P,!0).map(E).filter(function(e){return e.length>=8}))).sort(function(e,t){return t.length-e.length});x<T.length;x++){var y=m(T[x]);y&&y.size>0&&(y.forEach(function(e){return d.add(e)}),v=d.size)}if(0===v){var b=function(e){if(0===e.length)return null;for(var t=null,r=0,n=e;r<n.length;r++)for(var i=n[r],o=0,a=Array.from(i);o<a.length;o++){var l=a[o];if(l&&!(l.length<5))for(var u=l.replace(/\s+/g,""),h=0;h<c.length;h++)for(var f="",g="",s=new Set,p=h;p<c.length&&p<h+15;p++){var v=c[p].title;if(f=f?"".concat(f," ").concat(v):v,g=g?"".concat(g).concat(v.replace(/\s+/g,"")):v.replace(/\s+/g,""),s.add(p),f.includes(l)||g.includes(u)){var d=Math.max(0,f.length-l.length);(!t||d<t.extra)&&(t={blocks:new Set(s),extra:d});break}if(f.length>l.length+120)break}}return t?t.blocks:null}(o);b&&b.size>0&&(b.forEach(function(e){return d.add(e)}),v=d.size)}var w=function(e){if(e.length<2)return 40;for(var t=[],r=1;r<e.length;r++){var n=Math.abs(e[r].lastTop-e[r-1].lastTop);n>0&&t.push(n)}if(0===t.length)return 40;t.sort(function(e,t){return e-t});var i=t[Math.floor(t.length/2)],o=Math.round(2.25*i);return Math.min(60,Math.max(24,o))}(c),M=P.map(E).filter(function(e){return e.length>=8}),I=M.map(function(e){return e.split(/\s+/).filter(function(e){return e.length>=2})});if(0===v)for(var _=a,S=0;S<c.length;S++)for(var A=c[S].title,k=0;k<_.length;k++)if(p(A,_[k])){for(var j=0,q=new Set,z=k,C=S-1,R=S;R<c.length&&z<_.length;R++){if(p(c[R].title,_[z])){if(C>=0){var H=c[C].lastTop,F=c[R].lastTop;if(Math.abs(F-H)>w)break}j++,q.add(R),C=R,z++}else if(z>0&&p(c[R].title,_[z-1])){H=c[C].lastTop,F=c[R].lastTop;Math.abs(F-H)<=3&&(q.add(R),C=R)}if(R-C>6)break}j>v&&(v=j,d=q)}if(v<Math.min(3,M.length)&&M.length>0){var N=new Set;c.forEach(function(e,t){var r=e.title.split(/\s+/).filter(function(e){return e.length>=2});if(!(r.length<2))for(var n=new Set(r),i=0,o=I;i<o.length;i++){var a=o[i];if(!(a.length<2)){for(var l=0,c=0,u=a;c<u.length;c++){var h=u[c];n.has(h)&&l++}var f=l/a.length;if(l>=3||f>=.5){N.add(t);break}}}}),N.size>0&&(d=N,v=Math.max(v,N.size))}var Z=new Set;if(O.forEach(function(e){var t=E(e);t&&(Z.add(t),Z.add(t.replace(/\s+/g,"")))}),0===v){var L=new Set;if(c.forEach(function(e,t){var r=e.title.replace(/\s+/g,"");if(Z.has(e.title)||Z.has(r))L.add(t);else for(var n=Array.from(Z),i=0;i<n.length;i++){var o=n[i];if(o.length>=10&&o.includes(e.title)&&e.title.length>=5){L.add(t);break}}}),0===L.size)return 0;d=L}c.forEach(function(e,t){var r=d.has(t);e.elements.forEach(function(e){r?(e.classList.add("verified-match"),e.style.display=""):(e.style.display="none",e.classList.remove("verified-match"))})});var D=[];return c.forEach(function(e,t){d.has(t)&&e.elements.forEach(function(e){return D.push(e)})}),requestAnimationFrame(function(){var e=D.map(function(e){return{el:e,rect:e.getBoundingClientRect()}}).filter(function(e){return e.rect.width>0&&e.rect.height>0}).sort(function(e,t){return t.rect.width*t.rect.height-e.rect.width*e.rect.height}),t=[];e.forEach(function(e){var r=e.el,n=e.rect;t.some(function(e){return t=e.rect,r=n,i=Math.max(0,Math.min(t.right,r.right)-Math.max(t.left,r.left))*Math.max(0,Math.min(t.bottom,r.bottom)-Math.max(t.top,r.top)),((o=Math.min(t.width*t.height,r.width*r.height))>0?i/o:0)>.5;var t,r,i,o})?(r.style.display="none",r.classList.remove("verified-match")):t.push({el:r,rect:n})})}),console.groupCollapsed("[debug: PDF ordered matching - Page ".concat(r,"]")),console.log("input->",f),console.log("processed sentences->",$),console.log("processed lines->",P),console.log("Expected sentence count:",o.length),console.log("Expected line count:",a.length),console.log("Matched sequence length:",v),console.log("blocksToKeep",d,"size",d.size),console.groupEnd(),d.size}}}}}}},R=function(e){s.current&&s.current.querySelectorAll(".rpv-search__highlights").forEach(function(t){var r=t.getAttribute("data-testid"),n=parseInt((null==r?void 0:r.replace(/search__highlights-/g,""))||"-1"),i=t.querySelectorAll(".rpv-search__highlight");e.has(n)||i.forEach(function(e){e.style.display="none"})})},H=f.map(function(e){return function(e){return e?k(e).split(/\n{2,}/).map(function(e){return j(e).join(" ")}).map(function(e){return S(e)}).filter(Boolean):[]}(e)}).flat(),F=f.map(function(e){return j(e)}).flat(),N=H.some(function(e){return e.length>=3})?3:1,$=H.filter(function(e){return e.length>=N}),P=F.filter(function(e){return e.length>=N}),Z=P.flatMap(function(e){return function(e,t,r){void 0===t&&(t=6),void 0===r&&(r=4);var n=e.split(/\s+/).filter(Boolean);if(n.length<=t)return[];for(var i=[],o=0;o+t<=n.length;o+=r)i.push(n.slice(o,o+t).join(" "));return n.length>t&&(n.length-t)%r!==0&&i.push(n.slice(n.length-t).join(" ")),i}(e)}),O=Array.from(new Set(e(e(e([],$,!0),P,!0),Z,!0).flatMap(function(e){var t=S(e.replace(/[\u00A0\u2009\u202F]/g," ").replace(/\u00ad/g,"").replace(/[""]/g,'"').replace(/['']/g,"'"));if(!t)return[];var r=t.replace(/[\u2013\u2014]/g,"-"),n=S(r.replace(/(\w)-\s+(\w)/g,"$1$2")),i=S(r.replace(/-/g," ")),o=S(r.replace(/-/g,"")),a=S(t.replace(/[^\w\s]/g,"")),l=new Set([t,r,n,i,o,a]);return Array.from(l).filter(Boolean)}))).filter(function(e){var t=e.split(/\s+/).filter(Boolean);return!(e.length<N)&&(t.length>=3||e.length>=12)}),L=l({keyword:O}),D=c(),W=u(),K=L.jumpToMatch,J=D.jumpToPage,V=W.zoomTo,G=W.ZoomInButton,Q=W.ZoomOutButton,U=W.ZoomPopover,X=a(function(){return function(r){if(0===r.length)return[];var n=new Map;r.forEach(function(e,r){var i=null!=e.pageNumber?e.pageNumber-1:e.pageIndex;n.has(i)||n.set(i,[]),n.get(i).push(t(t({},e),{originalIndex:r}))});var i=[];return n.forEach(function(t){for(var r=e([],t,!0).sort(function(e,t){return e.top!==t.top?e.top-t.top:e.left-t.left}),n=new Array(r.length).fill(!1),o=0;o<r.length;o++)if(!n[o]){var a=r[o],l=a.left,c=a.top,u=a.width,h=a.height,f=a.pageIndex,g=a.pageNumber,s=l+u,p=c+h,v=[r[o].originalIndex];n[o]=!0;for(var d=!0;d;){d=!1;for(var m=o+1;m<r.length;m++)if(!n[m]){var x=r[m],T=x.left+x.width,y=x.top+x.height,b=Math.max(0,Math.min(s,T)-Math.max(l,x.left))*Math.max(0,Math.min(p,y)-Math.max(c,x.top)),w=Math.max(u*h,1e-4),M=Math.max(x.width*x.height,1e-4),I=Math.min(w,M);(I>0?b/I:0)>=.8&&(l=Math.min(l,x.left),c=Math.min(c,x.top),u=(s=Math.max(s,T))-l,h=(p=Math.max(p,y))-c,v.push(x.originalIndex),n[m]=!0,d=!0)}}i.push({pageIndex:f,pageNumber:g,left:l,top:c,width:u,height:h,originalIndexes:v})}}),i}(d)},[d]),Y=h({renderHighlights:function(e){return r(n,{children:X.filter(function(t){return null!=t.pageNumber?t.pageNumber-1===e.pageIndex:t.pageIndex===e.pageIndex}).map(function(e){var t=e.originalIndexes.includes(I);return r("div",{style:{position:"absolute",left:"".concat(e.left,"%"),top:"".concat(e.top+.08*e.height,"%"),width:"".concat(e.width,"%"),height:"".concat(.95*e.height,"%"),background:t?x:m,opacity:t?.7:.4,transition:"background 0.2s, opacity 0.2s",border:t?"1px solid ".concat("red"):"1px solid transparent"}},e.originalIndexes.join("-"))})})}}),ee=function(){if(!w.current)try{K(0),w.current=!0;var e=d[0];e&&v&&re(e.pageIndex,e.top)}catch(e){requestAnimationFrame(ee)}},te=function(e,t){if(s.current&&s.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var i,o,a=null===(i=s.current)||void 0===i?void 0:i.querySelector(".rpv-core__inner-pages");if(a){if(a.scrollTop!==r)return r=a.scrollTop,void setTimeout(n,100);var l=null===(o=s.current)||void 0===o?void 0:o.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(l){var c=l.querySelectorAll(".rpv-search__highlight")[t];if(c){var u=a.getBoundingClientRect(),h=c.getBoundingClientRect(),f=a.scrollTop+(h.top-u.top)-a.clientHeight/2+h.height/2;a.scrollTo({top:f,behavior:"smooth"})}}}};setTimeout(n,300)}},re=function(e,t,r){if(void 0===r&&(r=0),s.current){var n=0,i=function(){var o,a;if(!(++n>60)){var l=null===(o=s.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(l){var c=null===(a=s.current)||void 0===a?void 0:a.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(c){var u=c.getBoundingClientRect();if(0!==u.height){var h=l.getBoundingClientRect(),f=t/100*u.height,g=r/100*u.height,p=u.top-h.top+f,v=p+g;if(!(p>=80&&v<=l.clientHeight-80)){var d=p<80?l.scrollTop+p-80:l.scrollTop+v-l.clientHeight+80;l.scrollTo({top:d,behavior:"smooth"})}}else setTimeout(i,100)}else setTimeout(i,100)}else setTimeout(i,100)}};setTimeout(i,100)}},ne=a(function(){var e={};return q.forEach(function(t,r){var n=g[t];n>0&&(e[n]||(e[n]=[]),e[n].push(r))}),e},[q,g]),ie=function(e){var t=g[q[e]];return(ne[t]||[]).indexOf(e)},oe=function(e,t,r){if(void 0===r&&(r=0),s.current){var n=-1,i=0,o=function(){var a,l;if(!(++i>60)){var c=null===(a=s.current)||void 0===a?void 0:a.querySelector(".rpv-core__inner-pages");if(c){if(c.scrollTop!==n)return n=c.scrollTop,void setTimeout(o,100);var u=null===(l=s.current)||void 0===l?void 0:l.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(u){var h=u.getBoundingClientRect();if(0!==h.height){var f=c.getBoundingClientRect(),g=t/100*h.height,p=r/100*h.height,v=h.top-f.top+g,d=v+p;if(!(v>=80&&d<=c.clientHeight-80)){var m=v<80?c.scrollTop+v-80:c.scrollTop+d-c.clientHeight+80;c.scrollTo({top:m,behavior:"instant"})}}else setTimeout(o,100)}else setTimeout(o,100)}else setTimeout(o,100)}};setTimeout(o,100)}};return{setHighlightIndex:b,highlightIndex:y,cursorIndex:I,setCursorIndex:_,orderedKeys:q,totalHighlights:z,getValidPosition:function(e){if(v)return e+1;if(!g)return 0;for(var t=0,r=0;r<=e;r++)g[q[r]]>0&&t++;return t},tryJump:ee,jumpToPage:J,zoomTo:V,hideNonTargetHighlights:R,deduplicateHighlights:C,scrollToCoord:re,plugins:[v?Y:L,D,W],controls:{ZoomInButton:G,ZoomOutButton:Q,ZoomPopover:U,goToNext:function(){if(v&&d)for(var e=I+1;e<d.length;e++){var t=d[e],r=d[I];return _(e),void(t.pageIndex!==r.pageIndex?(J(t.pageIndex),oe(t.pageIndex,t.top,t.height)):re(t.pageIndex,t.top,t.height))}else{var n=function(e){var t=q[e];if(g[t]>0){var r=g[t]-1,n=ie(e);return _(e),J(g[t]-1),te(r,n),setTimeout(function(){C(r)},500),1===Object.keys(g).length&&R(p),{value:void 0}}};for(e=I+1;e<q.length;e++){var i=n(e);if("object"==typeof i)return i.value}}},goToPrevious:function(){if(v&&d)for(var e=I-1;e>=0;e--){var t=d[e],r=d[I];return _(e),void(t.pageIndex!==r.pageIndex?(J(t.pageIndex),oe(t.pageIndex,t.top,t.height)):re(t.pageIndex,t.top,t.height))}else{var n=function(e){var t=q[e];if(g[t]>0){var r=g[t]-1,n=ie(e);return _(e),J(g[t]-1),te(r,n),setTimeout(function(){C(r)},500),1===Object.keys(g).length&&R(p),{value:void 0}}};for(e=I-1;e>=0;e--){var i=n(e);if("object"==typeof i)return i.value}}}}}};export{f as PdfHighlightControls};
|
|
1
|
+
import{__spreadArray as e,__assign as t}from"tslib";import{jsx as r,Fragment as n}from"react/jsx-runtime";import{useState as i,useRef as o,useMemo as a}from"react";import{searchPlugin as l}from"@react-pdf-viewer/search";import{pageNavigationPlugin as c}from"@react-pdf-viewer/page-navigation";import{zoomPlugin as u}from"@react-pdf-viewer/zoom";import{highlightPlugin as h}from"@react-pdf-viewer/highlight";var f=function(f,g,s,p,v,d,m,x){void 0===m&&(m="yellow"),void 0===x&&(x="#F6D739");var T=i(0),y=T[0],b=T[1],w=o(!1),M=i(0),I=M[0],_=M[1];o([]);var S=function(e){return e.replace(/[^\S\n]+/g," ").trim()},E=function(e){return(e||"").toLowerCase().replace(/\u00ad/g,"").replace(/[""]/g,'"').replace(/['']/g,"'").replace(/[\u2013\u2014]/g,"-").replace(/-/g," ").replace(/[^\w\s]/g,"").replace(/\s+/g," ").trim()},A=function(e){var t=e.trim(),r=(t=(t=t.replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u00A0\u2009\u202F]/g," ")).replace(/^[-•]\s+/,"")).match(/^((\d+(?:\.\d+)*[.)]?)|[A-Za-z][.)]|\([A-Za-z0-9]+\)|(?:i|ii|iii|iv|v|vi|vii|viii|ix|x)[.)])\s*/i);return r?t.slice(r[0].length).trim():t},B=function(e){var t=E(e),r=t.replace(/\s+/g,""),n=new Set;return t&&n.add(t),r&&n.add(r),n},k=function(e){return e.replace(/\\([''])/g,"$1").replace(/\]\s*\n\s*\(/g,"](").replace(/&[#\w]+;/g,function(e){return t=e,(r=document.createElement("textarea")).innerHTML=t,r.value;var t,r}).replace(/<br\s*\/?>/gi,"\n").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1").replace(/`([^`]+)`/g,"$1")},z=function(e){return e?k(e).split(/\n+/).map(A).flatMap(function(e){var t=e.match(/^\s*\|(.+)\|\s*$/);return t?t[1].split("|").map(function(e){return e.trim()}).filter(Boolean):[e]}).map(function(e){return S(function(e){return e.replace(/(^|\W)[*_]{1,3}([^*_]+)[*_]{1,3}(?=\W|$)/g,"$1$2")}(e))}).filter(Boolean):[]},j=Object.keys(g).map(Number).sort(function(e,t){return e-t}),q=a(function(){return v?d.length:v?0:Object.values(g).filter(function(e){return e>0}).length},[d,g]),C=function(r){if(s.current){var n=s.current.querySelector('[data-testid="search__highlights-'.concat(r,'"]'));if(n){var i=Array.from(n.querySelectorAll(".rpv-search__highlight"));if(0!==i.length){var o=$.map(B),a=P.map(B);if(0!==o.length||0!==a.length){var l=i.map(function(e){var r=function(e){var t=e.getBoundingClientRect();if(t.height>0||t.width>0)return{top:t.top,left:t.left,right:t.right};var r=e.offsetTop,n=e.offsetLeft;return{top:r,left:n,right:n+e.offsetWidth}}(e),n=(e.textContent||"").trim(),i=(e.getAttribute("title")||"").trim();return t({el:e,text:n||i},r)}).filter(function(e){return e.text.length>0}).sort(function(e,t){return e.top-t.top||e.left-t.left});if(0!==l.length){var c=[],u=null,h=[],g=function(){if(u){var e=h.join(" ");u.title=E(e),u.title&&c.push(u),u=null,h=[]}};if(l.forEach(function(e){if(!u)return u={title:"",elements:[e.el],lastTop:e.top,lastRight:e.right},void(h=[e.text]);var t=Math.abs(e.top-u.lastTop)<=5,r=e.left<=u.lastRight+28;t&&r?(u.elements.push(e.el),u.lastTop=e.top,u.lastRight=Math.max(u.lastRight,e.right),h.push(e.text)):(g(),u={title:"",elements:[e.el],lastTop:e.top,lastRight:e.right},h=[e.text])}),g(),0!==c.length){for(var p=function(e,t){if(!e)return!1;if(t.has(e))return!0;for(var r=e.replace(/\s+/g,""),n=0,i=Array.from(t);n<i.length;n++){var o=i[n];if(o){var a=o.replace(/\s+/g,"");if(a===r)return!0;if(o.length>=8&&e.length>=5&&o.includes(e))return!0;if(a.length>=8&&r.length>=5&&a.includes(r))return!0;if(e.length>=10&&o.length>=8&&e.includes(o))return!0;if(r.length>=10&&a.length>=8&&r.includes(a))return!0}}return!1},v=0,d=new Set,m=function(e){if(!e||e.length<8)return null;for(var t=e.replace(/\s+/g,""),r=0;r<c.length;r++)for(var n="",i="",o=new Set,a=r;a<c.length&&a<r+20;a++){var l=c[a].title;if(n=n?"".concat(n," ").concat(l):l,i=i?"".concat(i).concat(l.replace(/\s+/g,"")):l.replace(/\s+/g,""),o.add(a),n.includes(e)||i.includes(t))return o;if(n.length>=15&&(e.includes(n)||t.includes(i)))return o;if(n.length>e.length+150)break}return null},x=0,T=Array.from(new Set(e(e([],$,!0),P,!0).map(E).filter(function(e){return e.length>=8}))).sort(function(e,t){return t.length-e.length});x<T.length;x++){var y=m(T[x]);y&&y.size>0&&(y.forEach(function(e){return d.add(e)}),v=d.size)}if(0===v){var b=function(e){if(0===e.length)return null;for(var t=null,r=0,n=e;r<n.length;r++)for(var i=n[r],o=0,a=Array.from(i);o<a.length;o++){var l=a[o];if(l&&!(l.length<5))for(var u=l.replace(/\s+/g,""),h=0;h<c.length;h++)for(var f="",g="",s=new Set,p=h;p<c.length&&p<h+15;p++){var v=c[p].title;if(f=f?"".concat(f," ").concat(v):v,g=g?"".concat(g).concat(v.replace(/\s+/g,"")):v.replace(/\s+/g,""),s.add(p),f.includes(l)||g.includes(u)){var d=Math.max(0,f.length-l.length);(!t||d<t.extra)&&(t={blocks:new Set(s),extra:d});break}if(f.length>l.length+120)break}}return t?t.blocks:null}(o);b&&b.size>0&&(b.forEach(function(e){return d.add(e)}),v=d.size)}var w=function(e){if(e.length<2)return 40;for(var t=[],r=1;r<e.length;r++){var n=Math.abs(e[r].lastTop-e[r-1].lastTop);n>0&&t.push(n)}if(0===t.length)return 40;t.sort(function(e,t){return e-t});var i=t[Math.floor(t.length/2)],o=Math.round(2.25*i);return Math.min(60,Math.max(24,o))}(c),M=P.map(E).filter(function(e){return e.length>=8}),I=M.map(function(e){return e.split(/\s+/).filter(function(e){return e.length>=2})});if(0===v)for(var _=a,S=0;S<c.length;S++)for(var A=c[S].title,k=0;k<_.length;k++)if(p(A,_[k])){for(var z=0,j=new Set,q=k,C=S-1,R=S;R<c.length&&q<_.length;R++){if(p(c[R].title,_[q])){if(C>=0){var H=c[C].lastTop,F=c[R].lastTop;if(Math.abs(F-H)>w)break}z++,j.add(R),C=R,q++}else if(q>0&&p(c[R].title,_[q-1])){H=c[C].lastTop,F=c[R].lastTop;Math.abs(F-H)<=3&&(j.add(R),C=R)}if(R-C>6)break}z>v&&(v=z,d=j)}if(v<Math.min(3,M.length)&&M.length>0){var N=new Set;c.forEach(function(e,t){var r=e.title.split(/\s+/).filter(function(e){return e.length>=2});if(!(r.length<2))for(var n=new Set(r),i=0,o=I;i<o.length;i++){var a=o[i];if(!(a.length<2)){for(var l=0,c=0,u=a;c<u.length;c++){var h=u[c];n.has(h)&&l++}var f=l/a.length;if(l>=3||f>=.5){N.add(t);break}}}}),N.size>0&&(d=N,v=Math.max(v,N.size))}var Z=new Set;if(O.forEach(function(e){var t=E(e);t&&(Z.add(t),Z.add(t.replace(/\s+/g,"")))}),0===v){var L=new Set;if(c.forEach(function(e,t){var r=e.title.replace(/\s+/g,"");if(Z.has(e.title)||Z.has(r))L.add(t);else for(var n=Array.from(Z),i=0;i<n.length;i++){var o=n[i];if(o.length>=10&&o.includes(e.title)&&e.title.length>=5){L.add(t);break}}}),0===L.size)return 0;d=L}c.forEach(function(e,t){var r=d.has(t);e.elements.forEach(function(e){r?(e.classList.add("verified-match"),e.style.display=""):(e.style.display="none",e.classList.remove("verified-match"))})});var D=[];return c.forEach(function(e,t){d.has(t)&&e.elements.forEach(function(e){return D.push(e)})}),requestAnimationFrame(function(){var e=D.map(function(e){return{el:e,rect:e.getBoundingClientRect()}}).filter(function(e){return e.rect.width>0&&e.rect.height>0}).sort(function(e,t){return t.rect.width*t.rect.height-e.rect.width*e.rect.height}),t=[];e.forEach(function(e){var r=e.el,n=e.rect;t.some(function(e){return t=e.rect,r=n,i=Math.max(0,Math.min(t.right,r.right)-Math.max(t.left,r.left))*Math.max(0,Math.min(t.bottom,r.bottom)-Math.max(t.top,r.top)),((o=Math.min(t.width*t.height,r.width*r.height))>0?i/o:0)>.5;var t,r,i,o})?(r.style.display="none",r.classList.remove("verified-match")):t.push({el:r,rect:n})})}),console.groupCollapsed("[debug: PDF ordered matching - Page ".concat(r,"]")),console.log("input->",f),console.log("processed sentences->",$),console.log("processed lines->",P),console.log("Expected sentence count:",o.length),console.log("Expected line count:",a.length),console.log("Matched sequence length:",v),console.log("blocksToKeep",d,"size",d.size),console.groupEnd(),d.size}}}}}}},R=function(e){s.current&&s.current.querySelectorAll(".rpv-search__highlights").forEach(function(t){var r=t.getAttribute("data-testid"),n=parseInt((null==r?void 0:r.replace(/search__highlights-/g,""))||"-1"),i=t.querySelectorAll(".rpv-search__highlight");e.has(n)||i.forEach(function(e){e.style.display="none"})})},H=f.map(function(e){return function(e){return e?k(e).split(/\n{2,}/).map(function(e){return z(e).join(" ")}).map(function(e){return S(e)}).filter(Boolean):[]}(e)}).flat(),F=f.map(function(e){return z(e)}).flat(),N=H.some(function(e){return e.length>=3})?3:1,$=H.filter(function(e){return e.length>=N}),P=F.filter(function(e){return e.length>=N}),Z=P.flatMap(function(e){return function(e,t,r){void 0===t&&(t=6),void 0===r&&(r=4);var n=e.split(/\s+/).filter(Boolean);if(n.length<=t)return[];for(var i=[],o=0;o+t<=n.length;o+=r)i.push(n.slice(o,o+t).join(" "));return n.length>t&&(n.length-t)%r!==0&&i.push(n.slice(n.length-t).join(" ")),i}(e)}),O=Array.from(new Set(e(e(e([],$,!0),P,!0),Z,!0).flatMap(function(e){var t=S(e.replace(/[\u00A0\u2009\u202F]/g," ").replace(/\u00ad/g,"").replace(/[""]/g,'"').replace(/['']/g,"'"));if(!t)return[];var r=t.replace(/[\u2013\u2014]/g,"-"),n=S(r.replace(/(\w)-\s+(\w)/g,"$1$2")),i=S(r.replace(/-/g," ")),o=S(r.replace(/-/g,"")),a=S(t.replace(/[^\w\s]/g,"")),l=new Set([t,r,n,i,o,a]);return Array.from(l).filter(Boolean)}))).filter(function(e){var t=e.split(/\s+/).filter(Boolean);return!(e.length<N)&&(t.length>=3||e.length>=12)}),L=l({keyword:O}),D=c(),W=u(),K=L.jumpToMatch,J=D.jumpToPage,V=W.zoomTo,G=W.ZoomInButton,Q=W.ZoomOutButton,U=W.ZoomPopover,X=a(function(){return function(r){if(0===r.length)return[];var n=new Map;r.forEach(function(e,r){var i=null!=e.pageNumber?e.pageNumber-1:e.pageIndex;n.has(i)||n.set(i,[]),n.get(i).push(t(t({},e),{originalIndex:r}))});var i=[];return n.forEach(function(t){for(var r=e([],t,!0).sort(function(e,t){return e.top!==t.top?e.top-t.top:e.left-t.left}),n=new Array(r.length).fill(!1),o=0;o<r.length;o++)if(!n[o]){var a=r[o],l=a.left,c=a.top,u=a.width,h=a.height,f=a.pageIndex,g=a.pageNumber,s=l+u,p=c+h,v=[r[o].originalIndex];n[o]=!0;for(var d=!0;d;){d=!1;for(var m=o+1;m<r.length;m++)if(!n[m]){var x=r[m],T=x.left+x.width,y=x.top+x.height,b=Math.max(0,Math.min(s,T)-Math.max(l,x.left))*Math.max(0,Math.min(p,y)-Math.max(c,x.top)),w=Math.max(u*h,1e-4),M=Math.max(x.width*x.height,1e-4),I=Math.min(w,M);(I>0?b/I:0)>=.8&&(l=Math.min(l,x.left),c=Math.min(c,x.top),u=(s=Math.max(s,T))-l,h=(p=Math.max(p,y))-c,v.push(x.originalIndex),n[m]=!0,d=!0)}}i.push({pageIndex:f,pageNumber:g,left:l,top:c,width:u,height:h,originalIndexes:v})}}),i}(d)},[d]),Y=h({renderHighlights:function(e){return r(n,{children:X.filter(function(t){return null!=t.pageNumber?t.pageNumber-1===e.pageIndex:t.pageIndex===e.pageIndex}).map(function(e){var t=e.originalIndexes.includes(I);return r("div",{style:{position:"absolute",left:"".concat(e.left,"%"),top:"".concat(e.top+.08*e.height,"%"),width:"".concat(e.width,"%"),height:"".concat(.95*e.height,"%"),background:t?x:m,opacity:t?.7:.4,transition:"background 0.2s, opacity 0.2s",border:t?"1px solid ".concat("red"):"1px solid transparent"}},e.originalIndexes.join("-"))})})}}),ee=function(){if(!w.current)try{K(0),w.current=!0;var e=d[0];e&&v&&re(e.pageIndex,e.top)}catch(e){requestAnimationFrame(ee)}},te=function(e,t){if(s.current&&s.current.querySelector(".rpv-core__viewer")){var r=-1,n=function(){var i,o,a=null===(i=s.current)||void 0===i?void 0:i.querySelector(".rpv-core__inner-pages");if(a){if(a.scrollTop!==r)return r=a.scrollTop,void setTimeout(n,100);var l=null===(o=s.current)||void 0===o?void 0:o.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(l){var c=l.querySelectorAll(".rpv-search__highlight")[t];if(c){var u=a.getBoundingClientRect(),h=c.getBoundingClientRect(),f=a.scrollTop+(h.top-u.top)-a.clientHeight/2+h.height/2;a.scrollTo({top:f,behavior:"smooth"})}}}};setTimeout(n,300)}},re=function(e,t,r){if(void 0===r&&(r=0),s.current){var n=0,i=function(){var o,a;if(!(++n>60)){var l=null===(o=s.current)||void 0===o?void 0:o.querySelector(".rpv-core__inner-pages");if(l){var c=null===(a=s.current)||void 0===a?void 0:a.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(c){var u=c.getBoundingClientRect();if(0!==u.height){var h=l.getBoundingClientRect(),f=t/100*u.height,g=r/100*u.height,p=u.top-h.top+f,v=p+g;if(!(p>=80&&v<=l.clientHeight-80)){var d=p<80?l.scrollTop+p-80:l.scrollTop+v-l.clientHeight+80;l.scrollTo({top:d,behavior:"smooth"})}}else setTimeout(i,100)}else setTimeout(i,100)}else setTimeout(i,100)}};setTimeout(i,100)}},ne=a(function(){var e={};return j.forEach(function(t,r){var n=g[t];n>0&&(e[n]||(e[n]=[]),e[n].push(r))}),e},[j,g]),ie=function(e){var t=g[j[e]];return(ne[t]||[]).indexOf(e)},oe=function(e,t,r){if(void 0===r&&(r=0),s.current){var n=-1,i=0,o=function(){var a,l;if(!(++i>60)){var c=null===(a=s.current)||void 0===a?void 0:a.querySelector(".rpv-core__inner-pages");if(c){if(c.scrollTop!==n)return n=c.scrollTop,void setTimeout(o,100);var u=null===(l=s.current)||void 0===l?void 0:l.querySelector('[data-testid="core__page-layer-'.concat(e,'"]'));if(u){var h=u.getBoundingClientRect();if(0!==h.height){var f=c.getBoundingClientRect(),g=t/100*h.height,p=r/100*h.height,v=h.top-f.top+g,d=v+p;if(!(v>=80&&d<=c.clientHeight-80)){var m=v<80?c.scrollTop+v-80:c.scrollTop+d-c.clientHeight+80;c.scrollTo({top:m,behavior:"instant"})}}else setTimeout(o,100)}else setTimeout(o,100)}else setTimeout(o,100)}};setTimeout(o,100)}};return{setHighlightIndex:b,highlightIndex:y,cursorIndex:I,setCursorIndex:_,orderedKeys:j,totalHighlights:q,getValidPosition:function(e){if(v)return e+1;if(!g)return 0;for(var t=0,r=0;r<=e;r++)g[j[r]]>0&&t++;return t},tryJump:ee,jumpToPage:J,zoomTo:V,hideNonTargetHighlights:R,deduplicateHighlights:C,scrollToCoord:re,plugins:[v?Y:L,D,W],controls:{ZoomInButton:G,ZoomOutButton:Q,ZoomPopover:U,zoomTo:V,goToNext:function(){if(v&&d)for(var e=I+1;e<d.length;e++){var t=d[e],r=d[I];return _(e),void(t.pageIndex!==r.pageIndex?(J(t.pageIndex),oe(t.pageIndex,t.top,t.height)):re(t.pageIndex,t.top,t.height))}else{var n=function(e){var t=j[e];if(g[t]>0){var r=g[t]-1,n=ie(e);return _(e),J(g[t]-1),te(r,n),setTimeout(function(){C(r)},500),1===Object.keys(g).length&&R(p),{value:void 0}}};for(e=I+1;e<j.length;e++){var i=n(e);if("object"==typeof i)return i.value}}},goToPrevious:function(){if(v&&d)for(var e=I-1;e>=0;e--){var t=d[e],r=d[I];return _(e),void(t.pageIndex!==r.pageIndex?(J(t.pageIndex),oe(t.pageIndex,t.top,t.height)):re(t.pageIndex,t.top,t.height))}else{var n=function(e){var t=j[e];if(g[t]>0){var r=g[t]-1,n=ie(e);return _(e),J(g[t]-1),te(r,n),setTimeout(function(){C(r)},500),1===Object.keys(g).length&&R(p),{value:void 0}}};for(e=I-1;e>=0;e--){var i=n(e);if("object"==typeof i)return i.value}}}}}};export{f as PdfHighlightControls};
|
|
2
2
|
//# sourceMappingURL=usePdfHighlight.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as n,__spreadArray as e}from"tslib";import{jsxs as t,jsx as r,Fragment as o}from"react/jsx-runtime";import{useMemo as i,useRef as l,useState as a,useCallback as d,useEffect as c}from"react";var u=170,s=48,f=["#ede9fe","#e0f2fe","#fef3c7","#dcfce7","#ffe4e6","#f0fdf4","#fef9c3","#e0e7ff","#fce7f3","#f1f5f9"],v=["#7c3aed","#0284c7","#b45309","#16a34a","#e11d48","#15803d","#a16207","#4338ca","#db2777","#475569"],p=["⚙","◈","⟐","✦","◎","⬡","◇","⊕","✶","◉"],g=["#a78bfa","#7dd3fc","#fbbf24","#86efac","#fda4af","#6ee7b7","#fde047","#a5b4fc","#f9a8d4","#94a3b8"],h=["linear-gradient(135deg,#7c3aed,#a78bfa)","linear-gradient(135deg,#0284c7,#38bdf8)","linear-gradient(135deg,#b45309,#fbbf24)","linear-gradient(135deg,#16a34a,#86efac)","linear-gradient(135deg,#e11d48,#fda4af)","linear-gradient(135deg,#15803d,#6ee7b7)","linear-gradient(135deg,#a16207,#fde047)","linear-gradient(135deg,#4338ca,#a5b4fc)","linear-gradient(135deg,#db2777,#f9a8d4)","linear-gradient(135deg,#475569,#94a3b8)"],y=["Context & Inputs","Core Logic & Rules","Outputs & Schema"];function b(t){var r=Array.isArray(null==t?void 0:t.clusters)?t.clusters:[],o=Array.isArray(null==t?void 0:t.nodes)?t.nodes:[],i=Array.isArray(null==t?void 0:t.edges)?t.edges:[],l=function(n,t,r){var o,i=n.length;if(0===i)return new Map;var l={};n.forEach(function(n,e){l[n.id]=e});var a={};n.forEach(function(n){a[n.id]=0});for(var d=0;d<i;d++){for(var c=!1,u=0,s=t;u<s.length;u++){var f=s[u],v=(a[f.source]||0)+1;v>(a[f.target]||0)&&v<i&&(a[f.target]=v,c=!0)}if(!c)break}var p={};r.forEach(function(n,e){p[n.id]=e});var g={};r.forEach(function(n){g[n.id]=[]}),n.forEach(function(n){var e;null===(e=g[n.cluster_id])||void 0===e||e.push(n)}),Object.values(g).forEach(function(n){return n.sort(function(n,e){return(a[n.id]||0)-(a[e.id]||0)})});for(var h=new Float64Array(i),y=new Float64Array(i),b=new Float64Array(i),x=new Float64Array(i),m=function(n){var e=null!==(o=p[n.id])&&void 0!==o?o:0;(g[n.id]||[]).forEach(function(n,t){var r=l[n.id];h[r]=520*e+280,y[r]=200*t+120})},w=0,M=r;w<M.length;w++)m(U=M[w]);for(var k=.0015,S=Math.max.apply(Math,e(e([],n.map(function(n){return a[n.id]||0}),!1),[1],!1)),C=new Float64Array(i),_=0;_<i;_++)C[_]=(a[n[_].id]||0)/S*(200*i*.6)+120;for(var A=0;A<350;A++){var z=Math.max(.015,1-A/350),E=new Float64Array(i),I=new Float64Array(i);for(_=0;_<i;_++)for(var j=_+1;j<i;j++){var R=(X=h[_]-h[j])*X+(H=y[_]-y[j])*H;R<400&&(R=(X=12*(_-j))*X+(H=8*(_+j))*H);var W=X/(L=Math.sqrt(R))*(O=48e4/R),P=H/L*O;E[_]+=W,I[_]+=P,E[j]-=W,I[j]-=P}for(var B=0,Y=t;B<Y.length;B++){f=Y[B];var F=l[f.source],D=l[f.target];if(void 0!==F&&void 0!==D){var L,O,X=h[D]-h[F],H=y[D]-y[F];if(!((L=Math.sqrt(X*X+H*H))<1))W=X/L*(O=.004*(L-380)),P=H/L*O,E[F]+=W,I[F]+=P,E[D]-=W,I[D]-=P}}var N={},T={},q={};for(_=0;_<i;_++)N[U=n[_].cluster_id]=(N[U]||0)+h[_],T[U]=(T[U]||0)+y[_],q[U]=(q[U]||0)+1;for(_=0;_<i;_++){var U=n[_].cluster_id;E[_]+=(N[U]/q[U]-h[_])*k,I[_]+=(T[U]/q[U]-y[_])*k}for(_=0;_<i;_++)I[_]+=.002*(C[_]-y[_]);for(_=0;_<i;_++)b[_]=.84*(b[_]+E[_])*z,x[_]=.84*(x[_]+I[_])*z,h[_]+=b[_],y[_]+=x[_]}for(d=0;d<40;d++){var G=!1;for(_=0;_<i;_++)for(j=_+1;j<i;j++){X=h[_]-h[j],H=y[_]-y[j];var Q=270-Math.abs(X),J=128-Math.abs(H);if(Q>0&&J>0)if(G=!0,Q<J){var K=Q/2+5;h[_]+=X>0?K:-K,h[j]-=X>0?K:-K}else K=J/2+5,y[_]+=H>0?K:-K,y[j]-=H>0?K:-K}if(!G)break}var V=1/0,Z=1/0;for(_=0;_<i;_++)V=Math.min(V,h[_]),Z=Math.min(Z,y[_]);var $=new Map;for(_=0;_<i;_++)$.set(n[_].id,{x:Math.round(h[_]-V+80),y:Math.round(y[_]-Z+80)});return $}(o,i,r),a=o.map(function(e){var t=l.get(e.id)||{x:0,y:0};return n(n({},e),{x:t.x,y:t.y})}),d={};r.forEach(function(n,e){d[n.id]=e});var c={};r.forEach(function(n){c[n.id]=[]}),a.forEach(function(n){var e;null===(e=c[n.cluster_id])||void 0===e||e.push(n)});var f=36,v=r.map(function(n){var e=c[n.id];if(!e.length)return null;var t=Math.min.apply(Math,e.map(function(n){return n.x})),r=Math.min.apply(Math,e.map(function(n){return n.y})),o=Math.max.apply(Math,e.map(function(n){return n.x+u})),i=Math.max.apply(Math,e.map(function(n){return n.y+s}));return{id:n.id,label:n.label,idx:d[n.id],x:t-f,y:r-f,width:o-t+72,height:i-r+72+22}}).filter(function(n){return null!==n});return{nodes:a.map(function(e){var t;return n(n({},e),{cluster:null!==(t=d[e.cluster_id])&&void 0!==t?t:0})}),edges:i,clusterBounds:v,canvasW:Math.max.apply(Math,a.map(function(n){return n.x+u}))+72,canvasH:Math.max.apply(Math,a.map(function(n){return n.y+s}))+72}}function x(n,e,t){var r=e[n.source],o=e[n.target];if(!r||!o)return"";var i=function(n,e){var t=n.x+85,r=n.y+24,o=e.x+85,i=e.y+24;function l(n,e,t,r){var o=t-n,i=r-e;return Math.abs(i)>.4*Math.abs(o)?i>0?{x:n,y:e+24}:{x:n,y:e-24}:o>0?{x:n+85,y:e}:{x:n-85,y:e}}return{source:l(t,r,o,i),target:l(o,i,t,r)}}(r,o),l=i.source,a=i.target,d=a.x-l.x,c=a.y-l.y,u=Math.sqrt(d*d+c*c);if(u<5)return"M ".concat(l.x," ").concat(l.y," L ").concat(a.x," ").concat(a.y);if(o.y+150<r.y&&o.y<r.y-s){var f=Math.min(r.x,o.x)-110;return"M ".concat(l.x," ").concat(l.y," C ").concat(f," ").concat(l.y,", ").concat(f," ").concat(a.y,", ").concat(a.x," ").concat(a.y)}var v=-c/u,p=d/u;if(t.some(function(e){return e.source===n.target&&e.target===n.source})){var g=n.source<n.target?1:-1,h=Math.max(.18*u,40)*g;return"M ".concat(l.x," ").concat(l.y," Q ").concat((l.x+a.x)/2+v*h," ").concat((l.y+a.y)/2+p*h," ").concat(a.x," ").concat(a.y)}var y=Math.min(.12*u,55);return"M ".concat(l.x," ").concat(l.y," Q ").concat((l.x+a.x)/2+v*y," ").concat((l.y+a.y)/2+p*y," ").concat(a.x," ").concat(a.y)}var m=function(e){var m,w,M,k,S,C,_,A,z,E,I,j,R=e.data,W=e.isDarkMode,P=void 0!==W&&W,B=e.height,Y=void 0===B?500:B,F=e.width,D=void 0===F?"100%":F,L=e.styles,O=i(function(){return function(e){if(!e||"object"!=typeof e)return null;if(Array.isArray(e.nodes)&&Array.isArray(e.edges)){var t=e.nodes,r=Array.isArray(e.clusters)&&e.clusters.length>0?e.clusters:null,o=new Set(t.map(function(n){return n.cluster_id}));if(!r||o.size<=1){var i=Math.max(1,Math.min(3,Math.ceil(t.length/3)));r=Array.from({length:i},function(n,e){return{id:"cl_".concat(e+1),label:y[e]||"Group ".concat(e+1)}}),t=t.map(function(e,t){var o=t%i,l=Math.floor(t/i);return n(n({},e),{cluster_id:r[o].id,x:450*o+200,y:180*l+100})})}return{graph_id:e.graph_id||"graph",prompt_id:e.prompt_id||"",last_analyzed_at:e.last_analyzed_at||(new Date).toISOString(),clusters:r,nodes:t,edges:e.edges}}var l=Object.keys(e);if(0===l.length)return null;var a=Math.max(1,Math.min(3,Math.ceil(l.length/3))),d=Array.from({length:a},function(n,e){return{id:"cl_".concat(e+1),label:y[e]||"Group ".concat(e+1)}}),c=[],u=[];return l.forEach(function(n,t){var r=t%a,o=Math.floor(t/a),i=n.split("_").map(function(n){return n.charAt(0).toUpperCase()+n.slice(1)}).join(" "),l="node_".concat(n);c.push({id:l,label:i,cluster_id:d[r].id,x:450*r+200,y:180*o+100,description:"Section: ".concat(i)});var s=e[n];Array.isArray(s)&&s.forEach(function(e,t){var r;if(e&&"object"==typeof e){var o=e.dependent_on;if(o){var i="";"string"==typeof e.reasoning?i=e.reasoning:Array.isArray(e.reasoning)?i=e.reasoning.map(function(n){return"string"==typeof n?n:(null==n?void 0:n.text)||""}).filter(Boolean).join(" "):(null===(r=e.reasoning)||void 0===r?void 0:r.text)&&(i=String(e.reasoning.text)),u.push({id:"e_".concat(n,"_").concat(o,"_").concat(t),source:l,target:"node_".concat(o),reasoning:i||"Depends on ".concat(o),score:"number"==typeof e.Score?e.Score:"number"==typeof e.score?e.score:80,gap:e.gap||"",dependency_type:e.dependency_type||"implicit"})}}})}),0===c.length?null:{graph_id:"converted_graph",prompt_id:"",last_analyzed_at:(new Date).toISOString(),clusters:d,nodes:c,edges:u}}(R)},[R]),X=i(function(){return O?b(O):null},[O]),H=i(function(){var n={};return null==X||X.nodes.forEach(function(e){n[e.id]=e}),n},[X]),N=i(function(){var n={};return null==O||O.clusters.forEach(function(e,t){n[e.id]=t}),n},[O]),T=l(null),q=a({x:0,y:0}),U=q[0],G=q[1],Q=a(.5),J=Q[0],K=Q[1],V=a(!1),Z=V[0],$=V[1],nn=l({x:0,y:0}),en=l({x:0,y:0}),tn=a(null),rn=tn[0],on=tn[1],ln=a(null),an=ln[0],dn=ln[1],cn=a(null),un=cn[0],sn=cn[1],fn=a(null),vn=fn[0],pn=fn[1],gn=i(function(){return vn&&X?new Set(X.edges.filter(function(n){return n.source===vn||n.target===vn}).map(function(n){return n.id})):new Set},[vn,X]),hn=i(function(){if(!vn||!X)return new Set;var n=new Set([vn]);return X.edges.forEach(function(e){e.source===vn&&n.add(e.target),e.target===vn&&n.add(e.source)}),n},[vn,X]);i(function(){return O?new Date(O.last_analyzed_at).toLocaleString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,day:"numeric",month:"short",year:"numeric"}):""},[O]);var yn=d(function(n){n.preventDefault(),K(function(e){return Math.min(2.5,Math.max(.2,e-.001*n.deltaY))})},[]);c(function(){var n=T.current;return n&&n.addEventListener("wheel",yn,{passive:!1}),function(){return null==n?void 0:n.removeEventListener("wheel",yn)}},[yn]);var bn=d(function(e){e.target.closest("[data-edge-hit]")||e.target.closest("[data-node]")||($(!0),nn.current={x:e.clientX,y:e.clientY},en.current=n({},U),e.currentTarget.style.cursor="grabbing")},[U]),xn=d(function(n){Z&&G({x:en.current.x+(n.clientX-nn.current.x),y:en.current.y+(n.clientY-nn.current.y)})},[Z]),mn=d(function(){$(!1),T.current&&(T.current.style.cursor="grab")},[]);var wn=function(n,e){return"string"==typeof n?n:e},Mn=null!==(k=null!==(w=null===(m=null==L?void 0:L.root)||void 0===m?void 0:m.backgroundColor)&&void 0!==w?w:null===(M=null==L?void 0:L.root)||void 0===M?void 0:M.background)&&void 0!==k?k:P?"#090d16":"#ffffff",kn=null!==(C=null===(S=null==L?void 0:L.root)||void 0===S?void 0:S.color)&&void 0!==C?C:P?"#f8fafc":"#1e293b",Sn=null!==(A=null===(_=null==L?void 0:L.subtitle)||void 0===_?void 0:_.color)&&void 0!==A?A:"#94a3b8",Cn=n({width:32,height:32,border:"none",background:"transparent",borderRadius:8,cursor:"pointer",fontSize:16,color:P?"#cbd5e1":"#475569",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500},null==L?void 0:L.controlButton);return X&&O?t("div",n({style:n({width:D,height:Y,position:"relative",background:Mn,color:kn,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",overflow:"hidden"},null==L?void 0:L.root)},{children:[t("div",n({style:n({position:"absolute",top:0,left:0,right:0,zIndex:20,padding:"10px 14px",display:"flex",alignItems:"center",justifyContent:"space-between"},null==L?void 0:L.header)},{children:[r("p",n({style:n({margin:0,fontSize:12,color:Sn},null==L?void 0:L.subtitle)},{children:"· Click a node or connection to explore details."})),t("div",n({style:n({display:"flex",gap:2,background:P?"#1e293b":"#fff",borderRadius:10,padding:3,boxShadow:P?"0 1px 4px rgba(0,0,0,0.4)":"0 1px 4px rgba(0,0,0,0.08)"},null==L?void 0:L.controls)},{children:[r("button",n({onClick:function(){return K(function(n){return Math.max(.2,n-.15)})},style:Cn},{children:"−"})),t("button",n({onClick:function(){K(.5),G({x:0,y:0})},style:n(n({},Cn),{fontSize:11,width:52,fontWeight:600})},{children:[Math.round(100*J),"%"]})),r("button",n({onClick:function(){return K(function(n){return Math.min(2.5,n+.15)})},style:Cn},{children:"+"}))]}))]})),an&&function(){var e,o,i=an.node,l=null!==(e=N[i.cluster_id])&&void 0!==e?e:0;return t("div",n({style:n({position:"absolute",top:50,left:14,zIndex:20,width:"30%",minWidth:280,borderRadius:12,overflow:"hidden",boxShadow:"0 2px 12px rgba(0,0,0,0.07)",border:"1px solid ".concat(P?"#334155":"#e2e8f0"),animation:"cdg-slideDown 0.2s ease-out"},null==L?void 0:L.nodePopup)},{children:[t("div",n({style:n({padding:"10px 14px",background:h[l%h.length],color:"#fff",display:"flex",alignItems:"center",justifyContent:"space-between"},null==L?void 0:L.nodePopupHeader)},{children:[t("div",n({style:{display:"flex",alignItems:"center",gap:10}},{children:[r("span",n({style:{width:28,height:28,borderRadius:8,background:"rgba(255,255,255,0.2)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14}},{children:p[l%p.length]})),t("div",{children:[r("div",n({style:{fontSize:9,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.75}},{children:(null===(o=O.clusters[l])||void 0===o?void 0:o.label)||""})),r("div",n({style:{fontSize:14,fontWeight:700,marginTop:1}},{children:i.label}))]})]})),r("button",n({onClick:function(){dn(null),pn(null)},style:n({background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"},null==L?void 0:L.popupCloseButton)},{children:"×"}))]})),r("div",n({style:n({padding:"10px 14px",fontSize:13,lineHeight:1.6,color:P?"#cbd5e1":"#475569",background:P?"#1e293b":"#fff"},null==L?void 0:L.nodePopupBody)},{children:i.description||"No description available."}))]}))}(),t("div",n({ref:T,onPointerDown:bn,onPointerMove:xn,onPointerUp:mn,onPointerLeave:mn,onClick:function(){on(null),dn(null),pn(null)},style:{width:"100%",height:"100%",cursor:Z?"grabbing":"grab",position:"relative"}},{children:[r("div",n({style:{transform:"translate(".concat(U.x,"px,").concat(U.y,"px) scale(").concat(J,")"),transformOrigin:"top left",position:"absolute",top:50,left:20,transition:Z?"none":"transform 0.08s ease-out"}},{children:t("svg",n({width:X.canvasW,height:X.canvasH,style:{overflow:"visible"}},{children:[X.clusterBounds.map(function(e){var o,i,l,a,d,c,u;return t("g",{children:[r("rect",{x:e.x,y:e.y,width:e.width,height:e.height,rx:"16",fill:wn(null!==(i=null===(o=null==L?void 0:L.cluster)||void 0===o?void 0:o.backgroundColor)&&void 0!==i?i:null===(l=null==L?void 0:L.cluster)||void 0===l?void 0:l.background,P?"rgba(30,41,59,0.35)":"none"),stroke:wn(null!==(d=null===(a=null==L?void 0:L.cluster)||void 0===a?void 0:a.borderColor)&&void 0!==d?d:null===(c=null==L?void 0:L.cluster)||void 0===c?void 0:c.border,P?"#334155":"#e2e8f0"),strokeWidth:"1.5",strokeDasharray:"8 4"}),r("text",n({x:e.x+14,y:e.y+e.height-10,fontSize:"11",fill:wn(null===(u=null==L?void 0:L.clusterLabel)||void 0===u?void 0:u.color,"#94a3b8"),fontFamily:"Inter, sans-serif",fontWeight:"500"},{children:e.label}))]},e.id)}),X.edges.map(function(e){var i,l,a,d,c,u,s,f,v,p,g,h,y,b,m,w,M,k,S=x(e,H,X.edges);if(!S)return null;var C=gn.has(e.id),_=(null==rn?void 0:rn.edge.id)===e.id,A=un===e.id,z=!!vn&&!C,E=C||_?null!==(d=null!==(l=null===(i=null==L?void 0:L.activeEdge)||void 0===i?void 0:i.color)&&void 0!==l?l:null===(a=null==L?void 0:L.activeEdge)||void 0===a?void 0:a.borderColor)&&void 0!==d?d:"#6366f1":A?null!==(u=null===(c=null==L?void 0:L.edge)||void 0===c?void 0:c.color)&&void 0!==u?u:"#818cf8":null!==(p=null!==(f=null===(s=null==L?void 0:L.edge)||void 0===s?void 0:s.borderColor)&&void 0!==f?f:null===(v=null==L?void 0:L.edge)||void 0===v?void 0:v.color)&&void 0!==p?p:P?"#475569":"#cbd5e1",I=C||_?2.5:A?2:1.5;return t("g",n({style:{opacity:z?.1:1,transition:"opacity 0.25s"}},{children:[r("path",{"data-edge-hit":"true",d:S,fill:"none",stroke:"transparent",strokeWidth:18,style:{cursor:"pointer"},onClick:function(n){return function(n,e){n.stopPropagation();var t=T.current.getBoundingClientRect();on({edge:e,screenX:n.clientX-t.left,screenY:n.clientY-t.top}),dn(null),pn(null)}(n,e)},onMouseEnter:function(){return sn(e.id)},onMouseLeave:function(){return sn(null)}}),r("path",{d:S,fill:"none",stroke:E,strokeWidth:I,style:{transition:"stroke 0.2s, stroke-width 0.2s",pointerEvents:"none"}}),(C||_)&&t(o,{children:[r("circle",n({r:4,fill:null!==(b=null!==(h=null===(g=null==L?void 0:L.edgeMarker)||void 0===g?void 0:g.color)&&void 0!==h?h:null===(y=null==L?void 0:L.activeEdge)||void 0===y?void 0:y.color)&&void 0!==b?b:"#6366f1"},{children:r("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:S})})),r("circle",n({r:6,fill:null!==(k=null!==(w=null===(m=null==L?void 0:L.edgeMarker)||void 0===m?void 0:m.color)&&void 0!==w?w:null===(M=null==L?void 0:L.activeEdge)||void 0===M?void 0:M.color)&&void 0!==k?k:"#6366f1",opacity:.2},{children:r("animateMotion",{dur:"1.8s",repeatCount:"indefinite",path:S})}))]})]}),e.id)}),X.nodes.map(function(e){var o,i,l,a,d,c,h,y,b,x,m,w,M,k,S,C,_,A=vn===e.id,z=hn.has(e.id),E=!!vn&&!z,I=(null!==(o=N[e.cluster_id])&&void 0!==o?o:0)%g.length,j=g[I];return r("g",n({"data-node":"true",onClick:function(n){return function(n,e){n.stopPropagation();var t=T.current.getBoundingClientRect();vn===e.id?(pn(null),dn(null)):(pn(e.id),dn({node:e,screenX:n.clientX-t.left,screenY:n.clientY-t.top}),on(null))}(n,e)},style:{cursor:"pointer",opacity:E?.15:1,transition:"opacity 0.25s"}},{children:r("foreignObject",n({x:e.x,y:e.y,width:u,height:s},{children:t("div",n({style:n(n({background:null!==(d=null!==(l=null===(i=null==L?void 0:L.node)||void 0===i?void 0:i.backgroundColor)&&void 0!==l?l:null===(a=null==L?void 0:L.node)||void 0===a?void 0:a.background)&&void 0!==d?d:P?"#1e293b":"#fff",border:A?null!==(h=null===(c=null==L?void 0:L.selectedNode)||void 0===c?void 0:c.border)&&void 0!==h?h:"2.5px solid ".concat(null!==(b=null===(y=null==L?void 0:L.selectedNode)||void 0===y?void 0:y.borderColor)&&void 0!==b?b:j):null!==(m=null===(x=null==L?void 0:L.node)||void 0===x?void 0:x.border)&&void 0!==m?m:"1.5px solid ".concat(null!==(M=null===(w=null==L?void 0:L.node)||void 0===w?void 0:w.borderColor)&&void 0!==M?M:P?"#334155":"#e2e8f0"),borderRadius:10,padding:"8px 14px",fontSize:13,fontWeight:600,color:P?"#f1f5f9":"#334155",fontFamily:"'Inter', sans-serif",display:"flex",alignItems:"center",gap:8,boxShadow:A?null!==(S=null===(k=null==L?void 0:L.selectedNode)||void 0===k?void 0:k.boxShadow)&&void 0!==S?S:"0 0 0 3px ".concat(j,"33, 0 2px 8px rgba(0,0,0,0.4)"):null!==(_=null===(C=null==L?void 0:L.node)||void 0===C?void 0:C.boxShadow)&&void 0!==_?_:P?"0 2px 6px rgba(0,0,0,0.3)":"0 1px 3px rgba(0,0,0,0.05)",whiteSpace:"nowrap",userSelect:"none",height:46,boxSizing:"border-box",transition:"border 0.2s, box-shadow 0.2s"},null==L?void 0:L.node),A?null==L?void 0:L.selectedNode:{})},{children:[r("span",n({style:n({width:22,height:22,borderRadius:6,background:f[I],display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,flexShrink:0,color:v[I]},null==L?void 0:L.nodeIcon)},{children:p[I]})),r("span",n({style:{overflow:"hidden",textOverflow:"ellipsis"}},{children:e.label}))]}))}))}),e.id)})]}))})),rn&&t("div",n({onClick:function(n){return n.stopPropagation()},style:n(n(n({position:"absolute"},function(n,e,t,r){if(!T.current)return{};var o=T.current.getBoundingClientRect(),i=n+14,l=e-r/2;return i+t>o.width&&(i=n-t-14),l<8&&(l=8),l+r>o.height&&(l=o.height-r-8),{left:i,top:l}}(rn.screenX,rn.screenY,320,180)),{width:320,background:P?"#1e293b":"#fff",borderRadius:14,boxShadow:"0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06)",border:"1px solid ".concat(P?"#334155":"#e2e8f0"),zIndex:30,animation:"cdg-popIn 0.18s ease-out",overflow:"hidden"}),null==L?void 0:L.edgePopup)},{children:[t("div",n({style:n({padding:"12px 16px 10px",background:"linear-gradient(135deg,#6366f1,#8b5cf6)",color:"#fff"},null==L?void 0:L.edgePopupHeader)},{children:[r("div",n({style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",opacity:.8}},{children:"Edge Reasoning"})),t("div",n({style:{fontSize:13,fontWeight:600,marginTop:4}},{children:[null!==(E=null===(z=H[rn.edge.source])||void 0===z?void 0:z.label)&&void 0!==E?E:"Source",r("span",n({style:{opacity:.6,margin:"0 6px"}},{children:"→"})),null!==(j=null===(I=H[rn.edge.target])||void 0===I?void 0:I.label)&&void 0!==j?j:"Target"]}))]})),r("div",n({style:n({padding:"12px 16px 14px",fontSize:13,lineHeight:1.6,color:P?"#cbd5e1":"#475569",whiteSpace:"pre-line"},null==L?void 0:L.edgePopupBody)},{children:rn.edge.reasoning||"No reasoning available."})),r("button",n({onClick:function(){return on(null)},style:n({position:"absolute",top:8,right:10,background:"rgba(255,255,255,0.2)",border:"none",color:"#fff",borderRadius:6,width:24,height:24,cursor:"pointer",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"},null==L?void 0:L.popupCloseButton)},{children:"×"}))]}))]})),r("style",{children:"\n @keyframes cdg-popIn { from { opacity:0; transform:scale(0.95) translateY(4px); } to { opacity:1; transform:scale(1) translateY(0); } }\n @keyframes cdg-slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }\n "})]})):null};export{m as default};
|
|
2
|
+
//# sourceMappingURL=CitationDependencyGraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationDependencyGraph.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|