@viswa-test/test-citation 0.0.335 → 0.0.337

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/guidelineTargets.js +2 -0
  2. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/guidelineTargets.js.map +1 -0
  3. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/resolveGuidelineSelection.js +2 -0
  4. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/resolveGuidelineSelection.js.map +1 -0
  5. package/dist/cjs/features/CognitiveCompare/components/GuidelineSkeletonLoader.js +2 -0
  6. package/dist/cjs/features/CognitiveCompare/components/GuidelineSkeletonLoader.js.map +1 -0
  7. package/dist/cjs/features/CognitiveCompare/utils/normalizeRedlineMarkdown.js +2 -0
  8. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
  9. package/dist/cjs/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
  10. package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js +2 -0
  11. package/dist/cjs/features/ParentCitationComponent/ParentCitationComponent.js.map +1 -0
  12. package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
  13. package/dist/cjs/features/PdfViewer/nyc-components/BoundaryCard.js +2 -0
  14. package/dist/cjs/features/PdfViewer/nyc-components/BoundaryCard.js.map +1 -0
  15. package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js +2 -0
  16. package/dist/cjs/features/PdfViewer/nyc-components/CardWrapper.js.map +1 -0
  17. package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js +2 -0
  18. package/dist/cjs/features/PdfViewer/nyc-components/CognitiveIcon.js.map +1 -0
  19. package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js +2 -0
  20. package/dist/cjs/features/PdfViewer/nyc-components/LabelCheck.js.map +1 -0
  21. package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +2 -0
  22. package/dist/cjs/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +1 -0
  23. package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js +2 -0
  24. package/dist/cjs/features/PdfViewer/nyc-components/infoAlert.js.map +1 -0
  25. package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js +2 -0
  26. package/dist/cjs/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +1 -0
  27. package/dist/cjs/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  28. package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  29. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  30. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  31. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  32. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/HistoryMenu.js +1 -1
  33. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +1 -1
  34. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  35. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  36. package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  37. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.js +1 -1
  38. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.js +1 -1
  39. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/SocketManager.js +1 -1
  40. package/dist/cjs/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.js +1 -1
  41. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  42. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  43. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  44. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationContent.module.css.js +1 -1
  45. package/dist/cjs/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  46. package/dist/cjs/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  47. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  48. package/dist/cjs/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  49. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  50. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  51. package/dist/cjs/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  52. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  53. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  54. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  55. package/dist/cjs/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  56. package/dist/cjs/features/RequirementAI/utils/helpers.js +1 -1
  57. package/dist/cjs/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  58. package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js +1 -1
  59. package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
  60. package/dist/cjs/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
  61. package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js +1 -1
  62. package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js +1 -1
  63. package/dist/cjs/features/SegmentReviewComponents/RevertCard.js +2 -0
  64. package/dist/cjs/features/SegmentReviewComponents/RevertCard.js.map +1 -0
  65. package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
  66. package/dist/cjs/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
  67. package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
  68. package/dist/cjs/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
  69. package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js +2 -0
  70. package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
  71. package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
  72. package/dist/cjs/index.js +1 -1
  73. package/dist/cjs/service/redlineService.js +1 -1
  74. package/dist/features/CognitiveCompare/Guidelines/utils/guidelineTargets.js +2 -0
  75. package/dist/features/CognitiveCompare/Guidelines/utils/guidelineTargets.js.map +1 -0
  76. package/dist/features/CognitiveCompare/Guidelines/utils/resolveGuidelineSelection.js +2 -0
  77. package/dist/features/CognitiveCompare/Guidelines/utils/resolveGuidelineSelection.js.map +1 -0
  78. package/dist/features/CognitiveCompare/components/GuidelineSkeletonLoader.js +2 -0
  79. package/dist/features/CognitiveCompare/components/GuidelineSkeletonLoader.js.map +1 -0
  80. package/dist/features/CognitiveCompare/utils/normalizeRedlineMarkdown.js +2 -0
  81. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js +2 -0
  82. package/dist/features/GptWebCitation/GptWebCitationMarkdown.js.map +1 -0
  83. package/dist/features/ParentCitationComponent/ParentCitationComponent.js +2 -0
  84. package/dist/features/ParentCitationComponent/ParentCitationComponent.js.map +1 -0
  85. package/dist/features/PdfViewer/PdfViewer.js +1 -1
  86. package/dist/features/PdfViewer/nyc-components/BoundaryCard.js +2 -0
  87. package/dist/features/PdfViewer/nyc-components/BoundaryCard.js.map +1 -0
  88. package/dist/features/PdfViewer/nyc-components/CardWrapper.js +2 -0
  89. package/dist/features/PdfViewer/nyc-components/CardWrapper.js.map +1 -0
  90. package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js +2 -0
  91. package/dist/features/PdfViewer/nyc-components/CognitiveIcon.js.map +1 -0
  92. package/dist/features/PdfViewer/nyc-components/LabelCheck.js +2 -0
  93. package/dist/features/PdfViewer/nyc-components/LabelCheck.js.map +1 -0
  94. package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js +2 -0
  95. package/dist/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.js.map +1 -0
  96. package/dist/features/PdfViewer/nyc-components/infoAlert.js +2 -0
  97. package/dist/features/PdfViewer/nyc-components/infoAlert.js.map +1 -0
  98. package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js +2 -0
  99. package/dist/features/PdfViewer/nyc-components/reviewStepAdapters.js.map +1 -0
  100. package/dist/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.js +1 -1
  101. package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
  102. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.js +1 -1
  103. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  104. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  105. package/dist/features/RequirementAI/components/UserStoryCard/Popups/HistoryMenu.js +1 -1
  106. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.js +1 -1
  107. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  108. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
  109. package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.module.css.js +1 -1
  110. package/dist/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.js +1 -1
  111. package/dist/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.js +1 -1
  112. package/dist/features/RequirementAI/components/UserStoryCard/cws/SocketManager.js +1 -1
  113. package/dist/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.js +1 -1
  114. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  115. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.js +1 -1
  116. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.js +1 -1
  117. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationContent.module.css.js +1 -1
  118. package/dist/features/RequirementAI/components/citations/file-citation/FileCitationRender.js +1 -1
  119. package/dist/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.js +1 -1
  120. package/dist/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.js +1 -1
  121. package/dist/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.js +1 -1
  122. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  123. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  124. package/dist/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.js +1 -1
  125. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  126. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.module.css.js +1 -1
  127. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  128. package/dist/features/RequirementAI/hooks/useStreamContentHandler.js +1 -1
  129. package/dist/features/RequirementAI/utils/helpers.js +1 -1
  130. package/dist/features/RequirementAI/utils/proccess-stream.utils.js +1 -1
  131. package/dist/features/SegmentReviewComponents/BoundaryCard.js +1 -1
  132. package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js +2 -0
  133. package/dist/features/SegmentReviewComponents/ChartBreakoutCircle.js.map +1 -0
  134. package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js +1 -1
  135. package/dist/features/SegmentReviewComponents/LabelCheck.js +1 -1
  136. package/dist/features/SegmentReviewComponents/RevertCard.js +2 -0
  137. package/dist/features/SegmentReviewComponents/RevertCard.js.map +1 -0
  138. package/dist/features/SegmentReviewComponents/RevertSuccessCard.js +2 -0
  139. package/dist/features/SegmentReviewComponents/RevertSuccessCard.js.map +1 -0
  140. package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js +2 -0
  141. package/dist/features/SegmentReviewComponents/RevertSummaryNotice.js.map +1 -0
  142. package/dist/features/SegmentReviewComponents/ReviewedCard.js +2 -0
  143. package/dist/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
  144. package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
  145. package/dist/index.js +1 -1
  146. package/dist/service/redlineService.js +1 -1
  147. package/dist/types/node_modules/react-markdown/lib/complex-types.d.ts +23 -0
  148. package/dist/types/node_modules/react-markdown/lib/complex-types.d.ts.map +1 -0
  149. package/dist/types/src/Background.d.ts +7 -0
  150. package/dist/types/src/Background.d.ts.map +1 -0
  151. package/dist/types/src/RedlineApprovalCardTest.d.ts +1 -0
  152. package/dist/types/src/RedlineApprovalCardTest.d.ts.map +1 -0
  153. package/dist/types/src/RedlineEditorTest.d.ts.map +1 -1
  154. package/dist/types/src/RedlineEditorTest2.d.ts +3 -0
  155. package/dist/types/src/RedlineEditorTest2.d.ts.map +1 -0
  156. package/dist/types/src/RequirementAiTest.d.ts.map +1 -1
  157. package/dist/types/src/assests/icons/ChartSplitIcon.d.ts +3 -0
  158. package/dist/types/src/assests/icons/ChartSplitIcon.d.ts.map +1 -0
  159. package/dist/types/src/commonConstants.d.ts +31103 -0
  160. package/dist/types/src/commonConstants.d.ts.map +1 -0
  161. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/guidelineTargets.d.ts +3 -0
  162. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/guidelineTargets.d.ts.map +1 -0
  163. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/resolveGuidelineSelection.d.ts +19 -0
  164. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/resolveGuidelineSelection.d.ts.map +1 -0
  165. package/dist/types/src/features/CognitiveCompare/components/GuidelineSkeletonLoader.d.ts +8 -0
  166. package/dist/types/src/features/CognitiveCompare/components/GuidelineSkeletonLoader.d.ts.map +1 -0
  167. package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts +2 -0
  168. package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.test.d.ts.map +1 -0
  169. package/dist/types/src/features/CognitiveCompare/utils/normalizeRedlineMarkdown.d.ts +6 -0
  170. package/dist/types/src/features/CognitiveCompare/utils/normalizeRedlineMarkdown.d.ts.map +1 -0
  171. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts +128 -0
  172. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponent.d.ts.map +1 -0
  173. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts +13 -0
  174. package/dist/types/src/features/ParentCitationComponent/ParentCitationComponentTest.d.ts.map +1 -0
  175. package/dist/types/src/features/PdfViewer/PdfViewer.d.ts.map +1 -1
  176. package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts +59 -0
  177. package/dist/types/src/features/PdfViewer/nyc-components/BoundaryCard.d.ts.map +1 -0
  178. package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts +19 -0
  179. package/dist/types/src/features/PdfViewer/nyc-components/CardWrapper.d.ts.map +1 -0
  180. package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts +3 -0
  181. package/dist/types/src/features/PdfViewer/nyc-components/CognitiveIcon.d.ts.map +1 -0
  182. package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts +77 -0
  183. package/dist/types/src/features/PdfViewer/nyc-components/LabelCheck.d.ts.map +1 -0
  184. package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts +47 -0
  185. package/dist/types/src/features/PdfViewer/nyc-components/SegmentReviewPdfWrapper.d.ts.map +1 -0
  186. package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts +15 -0
  187. package/dist/types/src/features/PdfViewer/nyc-components/index.d.ts.map +1 -0
  188. package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts +3 -0
  189. package/dist/types/src/features/PdfViewer/nyc-components/infoAlert.d.ts.map +1 -0
  190. package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts +36 -0
  191. package/dist/types/src/features/PdfViewer/nyc-components/reviewStepAdapters.d.ts.map +1 -0
  192. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts +29 -39
  193. package/dist/types/src/features/RequirementAI/components/RequirementAIWrapper/RequirementAIWrapper.d.ts.map +1 -1
  194. package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
  195. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CitationAnchor.d.ts.map +1 -1
  196. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +1 -1
  197. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
  198. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts +5439 -84
  199. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/userstory.mock.data.d.ts.map +1 -1
  200. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +1 -1
  201. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
  202. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts +1 -1
  203. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ManualEditPopup.d.ts.map +1 -1
  204. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +2 -2
  205. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
  206. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts +2 -19
  207. package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
  208. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.d.ts +2 -7
  209. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEvent.d.ts.map +1 -1
  210. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/CwsEventProvider.d.ts.map +1 -1
  211. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/SocketManager.d.ts +1 -15
  212. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/SocketManager.d.ts.map +1 -1
  213. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.d.ts +1 -2
  214. package/dist/types/src/features/RequirementAI/components/UserStoryCard/cws/useCwsEvent.d.ts.map +1 -1
  215. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts +2 -3
  216. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
  217. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitationContent.d.ts.map +1 -1
  218. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationContent.d.ts +0 -1
  219. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationContent.d.ts.map +1 -1
  220. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationRender.d.ts +0 -1
  221. package/dist/types/src/features/RequirementAI/components/citations/file-citation/FileCitationRender.d.ts.map +1 -1
  222. package/dist/types/src/features/RequirementAI/components/citations/readfile-citation/ReadFileCitationContent.d.ts.map +1 -1
  223. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts +2 -3
  224. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/CustomChatCrRedirection.d.ts.map +1 -1
  225. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts +1 -1
  226. package/dist/types/src/features/RequirementAI/components/lsc-reason-gap/GapFilterBlock.d.ts.map +1 -1
  227. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +1 -3
  228. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
  229. package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts +1 -2
  230. package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
  231. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts +0 -1
  232. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalContext.d.ts.map +1 -1
  233. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts +0 -2
  234. package/dist/types/src/features/RequirementAI/components/userstory-approval-screen/UserStoryApprovalScreen.d.ts.map +1 -1
  235. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +1 -2
  236. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  237. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts +1 -2
  238. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.d.ts.map +1 -1
  239. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts +1 -1
  240. package/dist/types/src/features/RequirementAI/hooks/useStreamContentHandler.d.ts.map +1 -1
  241. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts +0 -2
  242. package/dist/types/src/features/RequirementAI/interfaces/userstory.interface.d.ts.map +1 -1
  243. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +0 -3
  244. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
  245. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts +1 -2
  246. package/dist/types/src/features/RequirementAI/types/segment.type.d.ts.map +1 -1
  247. package/dist/types/src/features/RequirementAI/utils/helpers.d.ts +0 -2
  248. package/dist/types/src/features/RequirementAI/utils/helpers.d.ts.map +1 -1
  249. package/dist/types/src/features/RequirementAI/utils/proccess-stream.utils.d.ts.map +1 -1
  250. package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts +3 -1
  251. package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts.map +1 -1
  252. package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts +3 -0
  253. package/dist/types/src/features/SegmentReviewComponents/ChartBreakoutCircle.d.ts.map +1 -0
  254. package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts +3 -1
  255. package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts.map +1 -1
  256. package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts +37 -0
  257. package/dist/types/src/features/SegmentReviewComponents/RevertCard.d.ts.map +1 -0
  258. package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts +9 -0
  259. package/dist/types/src/features/SegmentReviewComponents/RevertSuccessCard.d.ts.map +1 -0
  260. package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts +7 -0
  261. package/dist/types/src/features/SegmentReviewComponents/RevertSummaryNotice.d.ts.map +1 -0
  262. package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts +2 -1
  263. package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts.map +1 -1
  264. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts +16 -2
  265. package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts.map +1 -1
  266. package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts +2 -0
  267. package/dist/types/src/features/SegmentReviewComponents/helper.test.d.ts.map +1 -0
  268. package/dist/types/src/features/SegmentReviewComponents/index.d.ts +6 -2
  269. package/dist/types/src/features/SegmentReviewComponents/index.d.ts.map +1 -1
  270. package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts +34 -0
  271. package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts.map +1 -1
  272. package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts +2 -0
  273. package/dist/types/src/features/SegmentReviewComponents/segmentReviewEdgeCases.test.d.ts.map +1 -0
  274. package/dist/types/src/index.d.ts +2 -2
  275. package/dist/types/src/index.d.ts.map +1 -1
  276. package/dist/types/src/service/redlineService.d.ts.map +1 -1
  277. package/package.json +2 -7
  278. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js +0 -2
  279. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js.map +0 -1
  280. package/dist/cjs/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
  281. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +0 -2
  282. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +0 -1
  283. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +0 -2
  284. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +0 -1
  285. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +0 -2
  286. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +0 -1
  287. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +0 -2
  288. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +0 -1
  289. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +0 -2
  290. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +0 -1
  291. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +0 -2
  292. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +0 -1
  293. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +0 -2
  294. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +0 -1
  295. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js +0 -2
  296. package/dist/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.js.map +0 -1
  297. package/dist/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js +0 -2
  298. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js +0 -2
  299. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.css.js.map +0 -1
  300. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js +0 -2
  301. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.js.map +0 -1
  302. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js +0 -2
  303. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.css.js.map +0 -1
  304. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js +0 -2
  305. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.js.map +0 -1
  306. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js +0 -2
  307. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.css.js.map +0 -1
  308. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js +0 -2
  309. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.js.map +0 -1
  310. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js +0 -2
  311. package/dist/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.js.map +0 -1
  312. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.d.ts +0 -2
  313. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/constants/changeTags.d.ts.map +0 -1
  314. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts +0 -2
  315. package/dist/types/src/features/RequirementAI/components/RichTextEditor/Editor/utils/normalizeRedlineMarkdown.d.ts.map +0 -1
  316. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts +0 -10
  317. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/Avatar.d.ts.map +0 -1
  318. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts +0 -17
  319. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsGroup.d.ts.map +0 -1
  320. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts +0 -23
  321. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/CollaboratorsPopup.d.ts.map +0 -1
  322. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts +0 -3
  323. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Avatar/avatarUtils.d.ts.map +0 -1
  324. package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts +0 -12
  325. package/dist/types/src/features/RequirementAI/components/common/onDemandCitationButton.d.ts.map +0 -1
  326. /package/dist/cjs/features/{RequirementAI/components/RichTextEditor/Editor → CognitiveCompare}/utils/normalizeRedlineMarkdown.js.map +0 -0
  327. /package/dist/features/{RequirementAI/components/RichTextEditor/Editor → CognitiveCompare}/utils/normalizeRedlineMarkdown.js.map +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("react-markdown"),i=require("rehype-raw"),l=require("./UserStoryWithCitation.module.css.js"),o=require("../../shared/useMarkdownSearch.js"),r=require("lucide-react"),d=require("@mui/material"),a=require("dompurify"),s=require("../../shared/UpdatedAnimationContent.js"),c=require("../../shared/GeneratedCodeCitation.js"),u=require("../../shared/CitationLoadingIndicator.js"),g=require("../RequirementAIWrapper/RequirementAIWrapper.js"),h=require("../../icons/CognitiveDecision.js"),p=require("../../icons/BrainRed.js"),v=require("../ai-reasoning/AiReasoningCitation.js"),f=require("../../icons/RelevanceScoreIcon.js"),m=require("../RecommendationBlock/RecommendationBlock.js"),C=require("../UserStoryCard/AttachedContext.js"),x=require("../ai-reasoning/AiReasoningCitationContent.js"),y=require("./components/InlineUpdatedComponent.js"),j=require("../segment/SegmentWrapper.js"),S=require("../../store/markdown-context.js"),I=require("./components/InlineManualComponent.js"),b=require("./components/HighlightButtonComponent.js"),w=require("../../../../utils/tagHelper.js"),R=require("../RichTextEditor/Editor/utils/normalizeRedlineMarkdown.js");function $(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var N=$(n),k=$(t),A=$(i),q=$(a);const E=n.createContext(!1),L=n.createContext({expandedInfo:null,setExpanded:()=>{},reasonToRow:{current:new Map}}),M=n.createContext({rowId:""}),U=({aiReason:t,isHighConfidence:i,customStyle:o,customIcons:r})=>{var d;const{expandedInfo:a,setExpanded:s,reasonToRow:c}=n.useContext(L),{rowId:u}=n.useContext(M),g=String(t.id);u&&c.current.set(g,u);const v=(null===(d=null==a?void 0:a.aiReason)||void 0===d?void 0:d.id)===t.id,f=i?(null==r?void 0:r.highConfidence)||e.jsx(h.default,{}):(null==r?void 0:r.lowConfidence)||e.jsx(p.default,{});return e.jsxs("button",{className:l.default.aiReasoningButton,style:o,onClick:e=>{e.stopPropagation(),e.preventDefault(),s(v?null:u,v?null:t)},children:[f,v?e.jsx("i",{className:`pi pi-angle-up ${i?l.default.aiReasoningIconHighConfidence:l.default.aiReasoningIconLowConfidence}`}):e.jsx("i",{className:`pi pi-angle-down ${i?l.default.aiReasoningIconHighConfidence:l.default.aiReasoningIconLowConfidence}`})]})},T=({children:t,node:i,customStyles:o,customIcons:r})=>{var d,a;const s=n.useRef(Math.random().toString(36).slice(2)).current,{expandedInfo:c}=n.useContext(L),u=(null==c?void 0:c.rowId)===s,g=Array.isArray(null==i?void 0:i.children)?i.children.filter(e=>"element"===e.type).length:1,h=null!==(a=null===(d=null==i?void 0:i.properties)||void 0===d?void 0:d.style)&&void 0!==a?a:void 0;return e.jsxs(M.Provider,{value:{rowId:s},children:[e.jsx("tr",{style:h?{cssText:h}:void 0,children:t}),u&&(null==c?void 0:c.aiReason)&&e.jsx("tr",{style:{width:"100%"},children:e.jsx("td",{colSpan:g||1,className:l.default.tableExpandedCell,children:e.jsx("div",{className:l.default.tableExpandedCellInner,children:e.jsx("div",{className:l.default.tableExpandedCellContent,children:e.jsx(x.default,{aiReason:c.aiReason,customIcons:r,customStyles:{aiReasoningContent:null==o?void 0:o.aiReasoningContent,aiReasoningAccordion:null==o?void 0:o.aiReasoningAccordion,aiReasoningMarkdown:null==o?void 0:o.aiReasoningMarkdown,aiReasoningPill:null==o?void 0:o.aiReasoningPill,webCitation:null==o?void 0:o.webCitation,stormeeCitation:null==o?void 0:o.stormeeCitation,waveformCitation:null==o?void 0:o.waveformCitation,imageCitation:null==o?void 0:o.imageCitation,fileCitation:null==o?void 0:o.fileCitation,appModCitation:null==o?void 0:o.appModCitation,rcaCitation:null==o?void 0:o.rcaCitation,readFileCitation:null==o?void 0:o.readFileCitation,loadingCitations:null==o?void 0:o.loadingCitations,chatCitation:null==o?void 0:o.chatCitation}})})})})})]})};const P=["del","ins"];function _(e){if(!e)return e;const n=[];return e.replace(/`([^`\n]+)`/g,(e,t)=>`@@CODE_SPAN_${n.push(t)-1}@@`).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,(e,t)=>{var i;const l=null!==(i=n[Number(t)])&&void 0!==i?i:"";return`<code>${o=l,o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}</code>`;var o})}function D(e){return function(e,n,t){const i=n.join("|");return e.replace(new RegExp(`<(${i})>([\\s\\S]*?)<\\/\\1>`,"gi"),(e,n,i)=>`<${n}>${t(i)}</${n}>`)}(e,P,e=>e.split(/(<[^>]+>)/g).map(e=>!e||/^<[^>]+>$/.test(e)?e:_(e)).join(""))}function F(e){let n=e.trim();n.startsWith("|")&&(n=n.slice(1)),n.endsWith("|")&&(n=n.slice(0,-1));const t=[];let i="",l=!1;for(const e of n)l?(i+=e,l=!1):"\\"!==e?"|"!==e?i+=e:(t.push(i.trim()),i=""):(i+=e,l=!0);return t.push(i.trim()),t}function H(e){return e.trim().includes("|")&&F(e).length>1}function O(e){const n=F(e);return n.length>1&&n.every(e=>/^:?-{3,}:?$/.test(e.replace(/\s+/g,"")))}function W(e){if(!e)return;const n=e.replace(/\s+/g,"");return n.startsWith(":")&&n.endsWith(":")?"center":n.endsWith(":")?"right":"left"}function B(e,n){return Array.from({length:n},(n,t)=>{var i;return null!==(i=e[t])&&void 0!==i?i:""})}function z(e,n,t){return`<${e}${function(e){return e?` align="${e}"`:""}(t)}>${_(n)}</${e}>`}function V(e,n,t){const i=Math.max(e.length,n.length,...t.map(e=>e.length)),l=B(e,i),o=B(n,i).map(W);return`\n\n<table>${`<thead><tr>${l.map((e,n)=>z("th",e,o[n])).join("")}</tr></thead>`}${t.length?`<tbody>${t.map(e=>`<tr>${B(e,i).map((e,n)=>z("td",e,o[n])).join("")}</tr>`).join("")}</tbody>`:""}</table>\n\n`}const G=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Q(e,n){const t=[],i=new Set(n.map(e=>e.toLowerCase())),l=e=>{var n,o;try{if(null==e||"boolean"==typeof e)return null;if("string"==typeof e||"number"==typeof e)return e;if(Array.isArray(e))return e.map(e=>l(e)).flat().filter(e=>null!=e);if(!N.default.isValidElement(e))return e;const r="string"==typeof e.type?e.type.toLowerCase():"";if(i.has(r))return t.push(e),null;if(G.has(r))return e;const d=null===(o=N.default.Children.map(null===(n=e.props)||void 0===n?void 0:n.children,l))||void 0===o?void 0:o.flat().filter(e=>null!=e);return d&&0!==d.length?N.default.cloneElement(e,void 0,d):null}catch(n){return console.error("splitNestedDiffNodes failed while processing node:",n),e}};try{return{cleanedChildren:l(e),extractedNodes:t}}catch(n){return console.error("splitNestedDiffNodes failed:",n),{cleanedChildren:e,extractedNodes:[]}}}exports.default=({message:t,noMarkdownContent:i,useMarkdown:a=!0,isParent:h,scenario:p,showUserStoryDiff:x=!1,aiReasoningsForBlock:$,isCitationLoadingDisplay:M=!1,className:P,highConfidenceIcon:_,lowConfidenceIcon:W,customStyles:B,customIcons:z,contextVariant:G,aiReasoningDiffView:J,userStoryCitations:K,artifactId:X,isCraflow:Y,onCraAccept:Z,onCraReject:ee,craFlowConfig:ne,isDisplayHighlightControl:te=!1,showConfidenceScore:ie=!0,CDNeededInChip:le,blockId:oe,storyId:re,showWaitingIconInChip:de})=>{var ae;console.log("userstorywithcitation blockid ",oe);const se=n.useRef(null),{userStory:ce,inlineUpdateComponentConfig:ue,getAvgScoreForStory:ge,setUserStory:he,aiReasoning:pe,setAiReasoning:ve,customIcons:fe,searchQueryList:me,searchQueryReasoningIdList:Ce,currentHighlightIndex:xe,segmentComponentConfig:ye,inlineManualComponentConfig:je,diffEditConfig:Se,customSectionConfig:Ie}=g.useRequirementAI(),be=null!=z?z:null==fe?void 0:fe.userStoryIcons;null==B||B.searchHighlight;const{search:we,clear:Re}=o.useMarkdownSearch(se),[$e,Ne]=n.useState("1"),[ke,Ae]=n.useState(null),qe=n.useRef(new Map),[Ee,Le]=n.useState(new Set),Me=n.useCallback((e,n)=>{Ae(e&&n?{rowId:e,aiReason:n}:null)},[]),Ue=X?ge(X):0,[Te,Pe]=n.useState([]),_e=n.useCallback(e=>{Le(n=>{const t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t})},[]),De=n.useCallback((e,n)=>{var t,i,l,o,r,d;const a=n["data-upt-id"];if("string"!=typeof a)return;let s=a;try{s=decodeURIComponent(a)}catch(e){}const c=null===(i=null===(t=s.split("$"))||void 0===t?void 0:t[1])||void 0===i?void 0:i.replaceAll("@","<").replaceAll("#",">"),u=pe.find(e=>e.id.toString()===c);if(!u)return;e.preventDefault(),e.stopPropagation();const g=null!==(r=Array.from(null!==(o=null===(l=se.current)||void 0===l?void 0:l.querySelectorAll("[data-ai-reason-id]"))&&void 0!==o?o:[]).find(e=>e.dataset.aiReasonId===u.id.toString()))&&void 0!==r?r:e.currentTarget;null===(d=null==ue?void 0:ue.handleClickUpdatedPill)||void 0===d||d.call(ue,g,u)},[pe,null==ue?void 0:ue.handleClickUpdatedPill]),Fe=e=>null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(Fe).join(""):N.default.isValidElement(e)?Fe(e.props.children):"",He=e=>{let n=function(e){const n=e.split("\n"),t=[];let i=!1;for(let e=0;e<n.length;e++){const l=n[e];if(/^\s*(```|~~~)/.test(l)){i=!i,t.push(l);continue}const o=n[e+1];if(!i&&void 0!==o&&H(l)&&O(o)){const i=F(l),r=F(o),d=[];for(e+=2;e<n.length&&H(n[e])&&!O(n[e]);)d.push(F(n[e])),e++;e--,t.push(V(i,r,d));continue}t.push(l)}return t.join("\n")}(R.normalizeRedlineMarkdown(function(e){return e.replace(/\\r\\n|\\n|\\r/g,"\n")}(e)));return n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>`<deleted>${n.replace(/ai_reasoning\$(\d+)/g,(e,n)=>`ai_reasoning$${n}-legacy`)}</deleted>`),n=n.replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,(e,n,t)=>`\n\n<generatedCode${n} data-raw="${btoa(encodeURIComponent(t.trim()))}"></generatedCode>\n\n`),n=n.replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2"),n=n.replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,(e,n,t,i,l)=>{const o=i.match(/<table[\s\S]*?<\/table>/i);if(o){return`<segment${t} data-table="${btoa(encodeURIComponent(o[0]))}"></segment>`}return e}),n=n.replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,(e,n,t)=>{if(/<table[\s>]/i.test(t)){return`<updatedsegment${n} data-raw="${btoa(encodeURIComponent(t))}"></updatedsegment>`}return e}),n=n.replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,(e,t,i,l)=>{const o=n.substring(0,l),r=o.lastIndexOf("\n"),d=/^\s+[-*]\s/.test(o.substring(r+1))||/^\s+\d+\.\s/.test(o.substring(r+1)),a=/^\s*(\d+\.|\s*[-*])\s+$/.test(o.substring(r+1));if(d||a){let e=i;return e=e.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),`<updated${t}>${e}</updated>`}return e}),n=function(e){const n=/<updated[^>]*>[\s\S]*?<\/updated>/gi,t=[];let i;const l=new RegExp(n.source,n.flags);for(;null!==(i=l.exec(e));){const e=i[0],n=e.match(/<deleted>([\s\S]*?)<\/deleted>/i),l=e.match(/<changed>([\s\S]*?)<\/changed>/i),o=e=>(e.match(/^\s*\d+\.\s/gm)||[]).length;t.push({index:i.index,endIndex:i.index+i[0].length,deletedItemCount:o((null==n?void 0:n[1])||""),changedItemCount:o((null==l?void 0:l[1])||"")})}if(0===t.length)return e;let o=e;for(let e=t.length-1;e>=0;e--){const n=t[e],i=n.changedItemCount-n.deletedItemCount;if(0===i)continue;const l=o.substring(0,n.index).split("\n").reverse();let r=!1;for(const e of l){const n=e.trim();if(""!==n){/^\d+\.\s/.test(n)&&(r=!0);break}}if(!r)continue;const d=n.endIndex,a=e+1<t.length?t[e+1].index:o.length;let s=o.substring(d,a);s=s.replace(/^(\s*)(\d+)\.\s/gm,(e,n,t)=>`${n}${parseInt(t,10)+i}. `),o=o.substring(0,d)+s+o.substring(a)}return o}(n),n=function(e){let n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>{const t=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:t!==n}),`<deleted>${t}</deleted>`});return n=n.replace(/<changed>([\s\S]*?)<\/changed>/gi,(e,n)=>{const t=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:t!==n,preview:n.substring(0,120)}),`<changed>${t}</changed>`}),n}(n),n=D(n),n},Oe=n.useMemo(()=>t?He(t):t,[t]);n.useEffect(()=>{Pe($||pe)},[$,pe]);const We=n.useMemo(()=>{const t=Boolean(null==Ie?void 0:Ie.negateList),i=(e,n)=>{let t=0;return N.default.Children.map(e,e=>{if(!N.default.isValidElement(e))return e;const i=n(t);return t+=1,N.default.cloneElement(e,{"data-list-marker":i})})};return{span:({node:n,children:t,...i})=>{var l,o,r,d,a;const s=null!==(o=null===(l=null==n?void 0:n.properties)||void 0===l?void 0:l["highlight-id"])&&void 0!==o?o:null==i?void 0:i["highlight-id"],c="string"==typeof s&&Ee.has(s),u=null!==(d=null===(r=null==n?void 0:n.properties)||void 0===r?void 0:r["highlight-color"])&&void 0!==d?d:null==i?void 0:i["highlight-color"];return e.jsx("span",{style:{...null!==(a=null==B?void 0:B.span)&&void 0!==a?a:{},...c?{backgroundColor:u||"#fef08a"}:{}},children:t})},button:({node:n,children:t,...i})=>{var l,o,r,d,a,s;const c=null!==(o=null===(l=null==n?void 0:n.properties)||void 0===l?void 0:l.action)&&void 0!==o?o:null==i?void 0:i.action,u=null!==(d=null===(r=null==n?void 0:n.properties)||void 0===r?void 0:r["highlight-id"])&&void 0!==d?d:null==i?void 0:i["highlight-id"],g=null!==(s=null===(a=null==n?void 0:n.properties)||void 0===a?void 0:a["highlight-type"])&&void 0!==s?s:null==i?void 0:i["highlight-type"];return"highlight"===c?e.jsx(b.default,{highlightId:u,handleHighlightSpan:_e,icon:"web"===g?null==be?void 0:be.webCitationIcon:"doc"===g?null==be?void 0:be.fileCitationIcon:e.jsx(e.Fragment,{}),customStyles:"web"===g?null==B?void 0:B.webButton:"doc"===g?null==B?void 0:B.docButton:{}}):null},upt:({node:n,children:t,...i})=>{var l,o;const r=null==i?void 0:i.id,d=r?null===(o=null===(l=r.split("$"))||void 0===l?void 0:l[1])||void 0===o?void 0:o.replaceAll("@","<").replaceAll("#",">"):null,a=pe.find(e=>e.id.toString()===d);if(!a)return t||e.jsx(e.Fragment,{});const s="data-main"in i,c=i["data-status"];return e.jsx(e.Fragment,{children:e.jsx(y.default,{aiReason:a,customStyles:null==B?void 0:B.inlineUpdatedComponent,handleClickCognitiveDecision:null==ue?void 0:ue.handleClickCognitiveDecision,handleClickUpdatedPill:null==ue?void 0:ue.handleClickUpdatedPill,handleClickOutputValue:null==ue?void 0:ue.handleClickOutputValue,customIcons:null==ue?void 0:ue.customIcons,CDNeededInChip:le,showWaitingIconInChip:de,showChip:s,status:c,containerRef:se,children:t||e.jsx(e.Fragment,{})})})},del:({node:n,children:t,...i})=>{var o;const{cleanedChildren:r,extractedNodes:d}=Q(t,["ins"]);return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:l.default.deleted,style:null!==(o=null==B?void 0:B.deleted)&&void 0!==o?o:{},...i,onClick:()=>{i.onclick&&i.onclick()},children:r}),d]})},ins:({children:n,...t})=>{var i;const{cleanedChildren:o,extractedNodes:r}=Q(n,["del"]);return console.log("LOG: Printing ins props",t),e.jsxs(e.Fragment,{children:[e.jsx("span",{className:l.default.inserted,style:null!==(i=null==B?void 0:B.inserted)&&void 0!==i?i:{},...t,onClick:()=>{t.onclick&&t.onclick()},children:o}),r]})},deleted:({children:n,...t})=>e.jsx("span",{style:{textDecorationLine:"line-through",textDecorationColor:"#dc2626",cursor:"pointer"},...t,onClick:e=>De(e,t),children:n}),changed:({children:n,...t})=>e.jsx("span",{style:{backgroundColor:"#f3e8ff",color:"#1e3a8a",padding:"1px 2px",borderRadius:"2px",cursor:"pointer"},...t,onClick:e=>De(e,t),children:n}),preserved:({children:n,...t})=>e.jsx("span",{className:l.default.preserved,style:null==B?void 0:B.preserved,...t,children:n}),manual:({children:n,...t})=>{var i;const l=null===(i=null==t?void 0:t.id)||void 0===i?void 0:i.replaceAll("@","<").replaceAll("#",">"),o=pe.find(e=>e.id.toString()===l),r=t["data-status"];return o?e.jsx(I.default,{aiReason:o,handleClick:null==je?void 0:je.handleClick,status:r,children:n}):n||e.jsx(e.Fragment,{})},invisible:({children:n,...t})=>e.jsx(e.Fragment,{}),h1:({node:n,...t})=>e.jsx("h1",{className:l.default.heading1,style:null==B?void 0:B.heading1,children:t.children}),h2:({node:n,...t})=>e.jsx("h2",{className:l.default.heading2,style:null==B?void 0:B.heading2,children:t.children}),h3:({node:n,...t})=>e.jsx("h3",{className:l.default.heading3,style:null==B?void 0:B.heading3,children:t.children}),b:({node:n,...t})=>e.jsx("b",{className:l.default.bold,style:null==B?void 0:B.bold,children:null==t?void 0:t.children}),p:({node:n,...t})=>e.jsx("p",{...t,className:l.default.paragraph,style:null==B?void 0:B.paragraph,children:t.children}),updated:({node:n,...t})=>e.jsx(s.default,{...t,showUserStoryDiff:x,currentUpdatedTagId:$e,setCurrentUpdatedTagId:Ne,userStory:ce,setUserStory:he,setAiReasoning:ve,node:n,isCraflow:Y,onCraAccept:Z,onCraReject:ee,diffEditConfig:Se,customStyles:null==B?void 0:B.updatedContent,craFlowConfig:ne}),ol:({node:n,...o})=>{var r,d,a;const s=null!==(a=null!==(d=null===(r=null==n?void 0:n.properties)||void 0===r?void 0:r.start)&&void 0!==d?d:null==o?void 0:o.start)&&void 0!==a?a:void 0,c=Number(null!=s?s:1);return t?e.jsx("div",{role:"list",className:l.default.negatedOrderedList,style:null==B?void 0:B.olist,children:i(o.children,e=>`${c+e}.`)}):e.jsx("ol",{className:l.default.orderedList,style:null==B?void 0:B.olist,...s?{start:Number(s)}:{},children:null==o?void 0:o.children})},ul:({node:n,...o})=>t?e.jsx("div",{role:"list",className:l.default.negatedUnorderedList,style:null==B?void 0:B.ulist,children:i(o.children,()=>"•")}):e.jsx("ul",{className:l.default.unorderedList,style:null==B?void 0:B.ulist,children:null==o?void 0:o.children}),li:({node:n,...i})=>{if(t){const n=i["data-list-marker"],{children:t,"data-list-marker":o,...r}=i;return e.jsxs("div",{...r,role:"listitem",className:`${l.default.paragraph} ${l.default.negatedListItem}`,style:null==B?void 0:B.paragraph,children:[n&&e.jsxs("span",{className:l.default.negatedListMarker,children:[n," "]}),t]})}return e.jsx("li",{children:null==i?void 0:i.children})},table:({children:n})=>e.jsx("div",{className:l.default.tableWrapper,children:e.jsx("table",{className:l.default.table,style:null==B?void 0:B.table,children:n})}),tr:({node:n,children:t})=>e.jsx(T,{node:n,children:t,customStyles:B}),td:({node:n,children:t})=>{var i;const{style:l,...o}=null!==(i=null==n?void 0:n.properties)&&void 0!==i?i:{};return e.jsx(E.Provider,{value:!0,children:e.jsx("td",{...o,style:l?{cssText:l}:void 0,children:t})})},th:({node:n,children:t})=>{var i;const{style:l,...o}=null!==(i=null==n?void 0:n.properties)&&void 0!==i?i:{};return e.jsx(E.Provider,{value:!0,children:e.jsx("th",{...o,style:l?{cssText:l}:void 0,children:t})})},recommendation:({node:n,...t})=>{var i;const l=`The AI has selected this content based on: ${(null===(i=null==t?void 0:t.children)||void 0===i?void 0:i[0])||""}`;return e.jsx(m.default,{...t,customStyles:null==B?void 0:B.recommendationBlock,label:l})},a:({inline:t,children:i,node:l,...o})=>{var r;const d=n.useContext(E)||"true"===(null==o?void 0:o.table),a=`${null==o?void 0:o.href}`,[s,c]=a.split("$"),u=null==c?void 0:c.split("?")[0];if("ai_reasoning"===s){const n=(null!==(r=x?J:pe)&&void 0!==r?r:[]).find(e=>e.id.toString()===decodeURIComponent(u)),t=Ce.includes(u);if(n){if(d)return e.jsx(U,{aiReason:n,customStyle:null==B?void 0:B.tableAiReasoning,customIcons:be,isHighConfidence:n.relevance_score>=v.SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING});const l=Fe(i),o="source"!==l.trim().toLowerCase();return e.jsx(v.default,{aiReason:n,isSourceHasHighlight:t,inlineLabel:l,isInlineCitation:o,customIcons:be,customStyles:{aiReasoningContent:null==B?void 0:B.aiReasoningContent,aiReasoningAccordion:null==B?void 0:B.aiReasoningAccordion,aiReasoningMarkdown:null==B?void 0:B.aiReasoningMarkdown,aiReasoningPill:null==B?void 0:B.aiReasoningPill,webCitation:null==B?void 0:B.webCitation,stormeeCitation:null==B?void 0:B.stormeeCitation,waveformCitation:null==B?void 0:B.waveformCitation,imageCitation:null==B?void 0:B.imageCitation,fileCitation:null==B?void 0:B.fileCitation,appModCitation:null==B?void 0:B.appModCitation,rcaCitation:null==B?void 0:B.rcaCitation,readFileCitation:null==B?void 0:B.readFileCitation,loadingCitations:null==B?void 0:B.loadingCitations,chatCitation:null==B?void 0:B.chatCitation,bigEnoughCitation:null==B?void 0:B.bigEnoughCitation}})}}return null},code:({inline:n,children:t,className:i,node:o,...r})=>/language-(\w+)/.exec(i||"")||(null==i?void 0:i.includes("language-"))?e.jsx("div",{children:e.jsx("code",{className:l.default.blockCode,style:null==B?void 0:B.code,children:t})}):e.jsx("code",{className:l.default.inlineCode,style:null==B?void 0:B.code,children:t}),learned:({children:n})=>e.jsx(d.Tooltip,{title:n,placement:"top",children:e.jsx(r.Info,{size:16,className:l.default.learned})}),generatedcode:({node:n,...t})=>{const i=(null==t?void 0:t.language)||"python",l=(e=>{let n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{const t=e=>{var n;return"string"==typeof e?e:Array.isArray(e)?e.map(t).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?t(e.props.children):""};n=t(e.children)}}catch(t){console.error("Error decoding generated code:",t),n=String(e.children)}return n})(t);return e.jsx(c.default,{title:"Generated Code",code:l,language:i,customStyles:{pill:null==B?void 0:B.generatedCodePill,content:null==B?void 0:B.generatedCodeContent}})},updatedsegment:({node:n,children:t,...i})=>{var l,o,r,d;const a=`${null===(l=n.position)||void 0===l?void 0:l.start.line}-${null===(o=n.position)||void 0===o?void 0:o.start.column}-${null===(r=n.position)||void 0===r?void 0:r.end.line}-${null===(d=n.position)||void 0===d?void 0:d.end.column}`,s=(e=>{if(!e["data-raw"])return null;try{return decodeURIComponent(atob(e["data-raw"]))}catch(e){return console.error("Error decoding segment raw content:",e),null}})(i),c=s?e.jsx("div",{dangerouslySetInnerHTML:{__html:q.default.sanitize(s)}}):e.jsx("div",{children:t});return e.jsx(j.default,{id:a,node:n,children:c,props:i,segmentComponentConfig:ye,customStyles:B,customIcons:z,extractText:Fe,isUpdatedSegment:!0})},segment:({node:n,children:t,...i})=>{var l,o,r,d;const a=`${null===(l=n.position)||void 0===l?void 0:l.start.line}-${null===(o=n.position)||void 0===o?void 0:o.start.column}-${null===(r=n.position)||void 0===r?void 0:r.end.line}-${null===(d=n.position)||void 0===d?void 0:d.end.column}`;return e.jsx(j.default,{id:a,node:n,children:t,props:i,segmentComponentConfig:ye,customStyles:B,customIcons:z,extractText:Fe,blockId:oe,storyId:re})}}},[Te,ne,pe,K,$e,x,t,z,me,Ce,B,ye,Ee,_e,De,oe,re,null==Ie?void 0:Ie.negateList]),Be=n.useMemo(()=>{let e=w.escapeTagIds(Oe,["manual","upt"]);return["del","ins","preserved","manual","upt"].forEach(n=>{e=w.splitTagAcrossParagraphs(e,n,"upt"===n)}),e},[Oe]);return n.useEffect(()=>{if(!se.current)return;if(!me.length)return void Re();let e;if(0===Ce.length||te)requestAnimationFrame(()=>{we([me[xe].replace(/\*/g,"")])});else{const n=se.current,t=new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{t.disconnect(),requestAnimationFrame(()=>{we([me[xe].replace(/\*/g,"")])})},50)});t.observe(n,{childList:!0,subtree:!0})}return()=>{clearTimeout(e)}},[me,Ce,xe,te]),e.jsx(L.Provider,{value:{expandedInfo:ke,setExpanded:Me,reasonToRow:qe},children:e.jsxs("div",{ref:se,className:`${l.default.container} ${"approving"!==p?l.default.wrapper:""} ${P||""}`,style:null==B?void 0:B.container,children:[a?e.jsx(S.MarkdownContextProvider,{children:e.jsx(k.default,{components:We,rehypePlugins:[A.default],children:Be})}):i,Ue>0&&ie&&e.jsx("div",{className:l.default.confidenceScoreContainer,style:null==B?void 0:B.confidenceScoreContainer,children:e.jsxs("span",{className:l.default.confidenceScore,style:null==B?void 0:B.confidenceScore,children:[e.jsx(f.default,{size:14,color:(null==B?void 0:B.confidenceScoreIconColor)||"#166534"}),Ue,"%"]})}),M&&e.jsx("div",{className:l.default.citationLoader,style:null==B?void 0:B.citationLoaderContainer,children:e.jsx(u.default,{customStyles:{container:null==B?void 0:B.citationLoadingContainer,icon:null==B?void 0:B.citationLoadingIcon,text:null==B?void 0:B.citationLoadingText}})}),h&&e.jsx("div",{style:{...null===(ae=null==B?void 0:B.attachedContext)||void 0===ae?void 0:ae.wrapper},className:"flex mt-5",children:e.jsx(C.default,{customStyles:null==B?void 0:B.attachedContext,variant:G})})]})})},exports.splitNestedDiffNodes=Q;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),i=require("react-markdown"),t=require("rehype-raw"),o=require("./UserStoryWithCitation.module.css.js"),l=require("../../shared/useMarkdownSearch.js"),d=require("lucide-react"),a=require("@mui/material"),r=require("dompurify"),s=require("../../shared/UpdatedAnimationContent.js"),c=require("../../shared/GeneratedCodeCitation.js"),u=require("../../shared/CitationLoadingIndicator.js"),g=require("../RequirementAIWrapper/RequirementAIWrapper.js"),h=require("../../icons/CognitiveDecision.js"),p=require("../../icons/BrainRed.js"),v=require("../ai-reasoning/AiReasoningCitation.js"),m=require("../../icons/RelevanceScoreIcon.js"),f=require("../RecommendationBlock/RecommendationBlock.js"),C=require("../UserStoryCard/AttachedContext.js"),x=require("../ai-reasoning/AiReasoningCitationContent.js"),j=require("./components/InlineUpdatedComponent.js"),y=require("../segment/SegmentWrapper.js"),S=require("../../store/markdown-context.js"),w=require("./components/InlineManualComponent.js"),I=require("./components/HighlightButtonComponent.js"),b=require("../../../../utils/tagHelper.js");function R(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var N=R(n),$=R(i),k=R(t),A=R(r);const q=n.createContext(!1),E=n.createContext({expandedInfo:null,setExpanded:()=>{},reasonToRow:{current:new Map}}),M=n.createContext({rowId:""}),T=({aiReason:i,isHighConfidence:t,customStyle:l,customIcons:d})=>{var a;const{expandedInfo:r,setExpanded:s,reasonToRow:c}=n.useContext(E),{rowId:u}=n.useContext(M),g=String(i.id);u&&c.current.set(g,u);const v=(null===(a=null==r?void 0:r.aiReason)||void 0===a?void 0:a.id)===i.id,m=t?(null==d?void 0:d.highConfidence)||e.jsx(h.default,{}):(null==d?void 0:d.lowConfidence)||e.jsx(p.default,{});return e.jsxs("button",{className:o.default.aiReasoningButton,style:l,onClick:e=>{e.stopPropagation(),e.preventDefault(),s(v?null:u,v?null:i)},children:[m,v?e.jsx("i",{className:`pi pi-angle-up ${t?o.default.aiReasoningIconHighConfidence:o.default.aiReasoningIconLowConfidence}`}):e.jsx("i",{className:`pi pi-angle-down ${t?o.default.aiReasoningIconHighConfidence:o.default.aiReasoningIconLowConfidence}`})]})},_=({children:i,node:t,customStyles:l,customIcons:d})=>{var a,r;const s=n.useRef(Math.random().toString(36).slice(2)).current,{expandedInfo:c}=n.useContext(E),u=(null==c?void 0:c.rowId)===s,g=Array.isArray(null==t?void 0:t.children)?t.children.filter(e=>"element"===e.type).length:1,h=null!==(r=null===(a=null==t?void 0:t.properties)||void 0===a?void 0:a.style)&&void 0!==r?r:void 0;return e.jsxs(M.Provider,{value:{rowId:s},children:[e.jsx("tr",{style:h?{cssText:h}:void 0,children:i}),u&&(null==c?void 0:c.aiReason)&&e.jsx("tr",{style:{width:"100%"},children:e.jsx("td",{colSpan:g||1,className:o.default.tableExpandedCell,children:e.jsx("div",{className:o.default.tableExpandedCellInner,children:e.jsx("div",{className:o.default.tableExpandedCellContent,children:e.jsx(x.default,{aiReason:c.aiReason,customIcons:d,customStyles:{aiReasoningContent:null==l?void 0:l.aiReasoningContent,aiReasoningAccordion:null==l?void 0:l.aiReasoningAccordion,aiReasoningMarkdown:null==l?void 0:l.aiReasoningMarkdown,aiReasoningPill:null==l?void 0:l.aiReasoningPill,webCitation:null==l?void 0:l.webCitation,stormeeCitation:null==l?void 0:l.stormeeCitation,waveformCitation:null==l?void 0:l.waveformCitation,imageCitation:null==l?void 0:l.imageCitation,fileCitation:null==l?void 0:l.fileCitation,appModCitation:null==l?void 0:l.appModCitation,rcaCitation:null==l?void 0:l.rcaCitation,readFileCitation:null==l?void 0:l.readFileCitation,loadingCitations:null==l?void 0:l.loadingCitations,chatCitation:null==l?void 0:l.chatCitation}})})})})})]})};const U=["del","ins"];function L(e){return function(e,n,i){const t=n.join("|");return e.replace(new RegExp(`<(${t})>([\\s\\S]*?)<\\/\\1>`,"gi"),(e,n,t)=>`<${n}>${i(t)}</${n}>`)}(e,U,e=>e.split(/(<[^>]+>)/g).map(e=>!e||/^<[^>]+>$/.test(e)?e:function(e){if(!e)return e;const n=[];return e.replace(/`([^`\n]+)`/g,(e,i)=>`@@CODE_SPAN_${n.push(i)-1}@@`).replace(/\*\*([\s\S]+?)\*\*/g,"<strong>$1</strong>").replace(/__([\s\S]+?)__/g,"<strong>$1</strong>").replace(/@@CODE_SPAN_(\d+)@@/g,(e,i)=>{var t;return`<code>${o=null!==(t=n[Number(i)])&&void 0!==t?t:"",o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}</code>`;var o})}(e)).join(""))}const F=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function P(e,n){const i=[],t=new Set(n.map(e=>e.toLowerCase())),o=e=>{var n,l;try{if(null==e||"boolean"==typeof e)return null;if("string"==typeof e||"number"==typeof e)return e;if(Array.isArray(e))return e.map(e=>o(e)).flat().filter(e=>null!=e);if(!N.default.isValidElement(e))return e;const d="string"==typeof e.type?e.type.toLowerCase():"";if(t.has(d))return i.push(e),null;if(F.has(d))return e;const a=null===(l=N.default.Children.map(null===(n=e.props)||void 0===n?void 0:n.children,o))||void 0===l?void 0:l.flat().filter(e=>null!=e);return a&&0!==a.length?N.default.cloneElement(e,void 0,a):null}catch(n){return console.error("splitNestedDiffNodes failed while processing node:",n),e}};try{return{cleanedChildren:o(e),extractedNodes:i}}catch(n){return console.error("splitNestedDiffNodes failed:",n),{cleanedChildren:e,extractedNodes:[]}}}exports.default=({message:i,noMarkdownContent:t,useMarkdown:r=!0,isParent:h,scenario:p,showUserStoryDiff:x=!1,aiReasoningsForBlock:R,isCitationLoadingDisplay:M=!1,className:U,highConfidenceIcon:F,lowConfidenceIcon:D,customStyles:H,customIcons:O,contextVariant:B,aiReasoningDiffView:W,userStoryCitations:V,artifactId:z,isCraflow:G,onCraAccept:Q,onCraReject:J,craFlowConfig:K,isDisplayHighlightControl:X=!1,showConfidenceScore:Y=!0,CDNeededInChip:Z,blockId:ee,showWaitingIconInChip:ne})=>{var ie;console.log("userstorywithcitation blockid ",ee);const te=n.useRef(null),{userStory:oe,inlineUpdateComponentConfig:le,getAvgScoreForStory:de,setUserStory:ae,aiReasoning:re,setAiReasoning:se,customIcons:ce,searchQueryList:ue,searchQueryReasoningIdList:ge,currentHighlightIndex:he,segmentComponentConfig:pe,inlineManualComponentConfig:ve,diffEditConfig:me}=g.useRequirementAI(),fe=null!=O?O:null==ce?void 0:ce.userStoryIcons;null==H||H.searchHighlight;const{search:Ce,clear:xe}=l.useMarkdownSearch(te),[je,ye]=n.useState("1"),[Se,we]=n.useState(null),Ie=n.useRef(new Map),[be,Re]=n.useState(new Set),Ne=n.useCallback((e,n)=>{we(e&&n?{rowId:e,aiReason:n}:null)},[]),$e=z?de(z):0,[ke,Ae]=n.useState([]),qe=n.useCallback(e=>{Re(n=>{const i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i})},[]),Ee=e=>null==e?"":"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(Ee).join(""):N.default.isValidElement(e)?Ee(e.props.children):"",Me=e=>{let n=e;return n=n.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>`<deleted>${n.replace(/ai_reasoning\$(\d+)/g,(e,n)=>`ai_reasoning$${n}-legacy`)}</deleted>`),n=n.replace(/<generatedCode([^>]*)>([\s\S]*?)<\/generatedCode>/gi,(e,n,i)=>`\n\n<generatedCode${n} data-raw="${btoa(encodeURIComponent(i.trim()))}"></generatedCode>\n\n`),n=n.replace(/^(\s*[-*]|\s*\d+\.)\s*\n?\s*(<updated\b)/gm,"$1 $2"),n=n.replace(/(<segment\b([^>]*)>)([\s\S]*?)(<\/segment>)/gi,(e,n,i,t,o)=>{const l=t.match(/<table[\s\S]*?<\/table>/i);if(l){return`<segment${i} data-table="${btoa(encodeURIComponent(l[0]))}"></segment>`}return e}),n=n.replace(/<updatedsegment([^>]*)>([\s\S]*?)<\/updatedsegment>/gi,(e,n,i)=>{if(/<table[\s>]/i.test(i)){return`<updatedsegment${n} data-raw="${btoa(encodeURIComponent(i))}"></updatedsegment>`}return e}),n=n.replace(/<updated([^>]*)>([\s\S]*?)<\/updated>/gi,(e,i,t,o)=>{const l=n.substring(0,o),d=l.lastIndexOf("\n"),a=/^\s+[-*]\s/.test(l.substring(d+1))||/^\s+\d+\.\s/.test(l.substring(d+1)),r=/^\s*(\d+\.|\s*[-*])\s+$/.test(l.substring(d+1));if(a||r){let e=t;return e=e.replace(/(<deleted>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*[-*]\s+/gi,"$1\n"),e=e.replace(/(<deleted>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),e=e.replace(/(<changed>)\s*\n?\s*\d+\.\s+/gi,"$1\n"),`<updated${i}>${e}</updated>`}return e}),n=function(e){const n=/<updated[^>]*>[\s\S]*?<\/updated>/gi,i=[];let t;const o=new RegExp(n.source,n.flags);for(;null!==(t=o.exec(e));){const e=t[0],n=e.match(/<deleted>([\s\S]*?)<\/deleted>/i),o=e.match(/<changed>([\s\S]*?)<\/changed>/i),l=e=>(e.match(/^\s*\d+\.\s/gm)||[]).length;i.push({index:t.index,endIndex:t.index+t[0].length,deletedItemCount:l((null==n?void 0:n[1])||""),changedItemCount:l((null==o?void 0:o[1])||"")})}if(0===i.length)return e;let l=e;for(let e=i.length-1;e>=0;e--){const n=i[e],t=n.changedItemCount-n.deletedItemCount;if(0===t)continue;const o=l.substring(0,n.index).split("\n").reverse();let d=!1;for(const e of o){const n=e.trim();if(""!==n){/^\d+\.\s/.test(n)&&(d=!0);break}}if(!d)continue;const a=n.endIndex,r=e+1<i.length?i[e+1].index:l.length;let s=l.substring(a,r);s=s.replace(/^(\s*)(\d+)\.\s/gm,(e,n,i)=>`${n}${parseInt(i,10)+t}. `),l=l.substring(0,a)+s+l.substring(r)}return l}(n),n=function(e){let n=e.replace(/<deleted>([\s\S]*?)<\/deleted>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <deleted>",{hadChange:i!==n}),`<deleted>${i}</deleted>`});return n=n.replace(/<changed>([\s\S]*?)<\/changed>/gi,(e,n)=>{const i=n.replace(/\n{2,}/g,"\n");return console.log("[normalizeCustomTags] collapseNewlines in <changed>",{hadChange:i!==n,preview:n.substring(0,120)}),`<changed>${i}</changed>`}),n}(n),n=L(n),n},Te=n.useMemo(()=>i?Me(i):i,[i]);n.useEffect(()=>{Ae(R||re)},[R,re]);const _e=n.useMemo(()=>({span:({node:n,children:i,...t})=>{var o,l,d,a,r;const s=null!==(l=null===(o=null==n?void 0:n.properties)||void 0===o?void 0:o["highlight-id"])&&void 0!==l?l:null==t?void 0:t["highlight-id"],c="string"==typeof s&&be.has(s),u=null!==(a=null===(d=null==n?void 0:n.properties)||void 0===d?void 0:d["highlight-color"])&&void 0!==a?a:null==t?void 0:t["highlight-color"];return e.jsx("span",{style:{...null!==(r=null==H?void 0:H.span)&&void 0!==r?r:{},...c?{backgroundColor:u||"#fef08a"}:{}},children:i})},button:({node:n,children:i,...t})=>{var o,l,d,a,r,s;const c=null!==(l=null===(o=null==n?void 0:n.properties)||void 0===o?void 0:o.action)&&void 0!==l?l:null==t?void 0:t.action,u=null!==(a=null===(d=null==n?void 0:n.properties)||void 0===d?void 0:d["highlight-id"])&&void 0!==a?a:null==t?void 0:t["highlight-id"],g=null!==(s=null===(r=null==n?void 0:n.properties)||void 0===r?void 0:r["highlight-type"])&&void 0!==s?s:null==t?void 0:t["highlight-type"];return"highlight"===c?e.jsx(I.default,{highlightId:u,handleHighlightSpan:qe,icon:"web"===g?null==fe?void 0:fe.webCitationIcon:"doc"===g?null==fe?void 0:fe.fileCitationIcon:e.jsx(e.Fragment,{}),customStyles:"web"===g?null==H?void 0:H.webButton:"doc"===g?null==H?void 0:H.docButton:{}}):null},upt:({node:n,children:i,...t})=>{var o,l;const d=null==t?void 0:t.id,a=d?null===(l=null===(o=d.split("$"))||void 0===o?void 0:o[1])||void 0===l?void 0:l.replaceAll("@","<").replaceAll("#",">"):null,r=re.find(e=>e.id.toString()===a);if(!r)return i||e.jsx(e.Fragment,{});const s="data-main"in t,c=t["data-status"];return e.jsx(e.Fragment,{children:e.jsx(j.default,{aiReason:r,customStyles:null==H?void 0:H.inlineUpdatedComponent,handleClickCognitiveDecision:null==le?void 0:le.handleClickCognitiveDecision,handleClickUpdatedPill:null==le?void 0:le.handleClickUpdatedPill,handleClickOutputValue:null==le?void 0:le.handleClickOutputValue,customIcons:null==le?void 0:le.customIcons,CDNeededInChip:Z,showWaitingIconInChip:ne,showChip:s,status:c,children:i||e.jsx(e.Fragment,{})})})},del:({node:n,children:i,...t})=>{var l;const{cleanedChildren:d,extractedNodes:a}=P(i,["ins"]);return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:o.default.deleted,style:null!==(l=null==H?void 0:H.deleted)&&void 0!==l?l:{},...t,onClick:()=>{t.onclick&&t.onclick()},children:d}),a]})},ins:({children:n,...i})=>{var t;const{cleanedChildren:l,extractedNodes:d}=P(n,["del"]);return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:o.default.inserted,style:null!==(t=null==H?void 0:H.inserted)&&void 0!==t?t:{},...i,onClick:()=>{i.onclick&&i.onclick()},children:l}),d]})},preserved:({children:n,...i})=>e.jsx("span",{className:o.default.preserved,style:null==H?void 0:H.preserved,...i,children:n}),manual:({children:n,...i})=>{var t;const o=null===(t=null==i?void 0:i.id)||void 0===t?void 0:t.replaceAll("@","<").replaceAll("#",">"),l=re.find(e=>e.id.toString()===o),d=i["data-status"];return l?e.jsx(w.default,{aiReason:l,handleClick:null==ve?void 0:ve.handleClick,status:d,children:n}):n||e.jsx(e.Fragment,{})},invisible:({children:n,...i})=>e.jsx(e.Fragment,{}),h1:({node:n,...i})=>e.jsx("h1",{className:o.default.heading1,style:null==H?void 0:H.heading1,children:i.children}),h2:({node:n,...i})=>e.jsx("h2",{className:o.default.heading2,style:null==H?void 0:H.heading2,children:i.children}),h3:({node:n,...i})=>e.jsx("h3",{className:o.default.heading3,style:null==H?void 0:H.heading3,children:i.children}),b:({node:n,...i})=>e.jsx("b",{className:o.default.bold,style:null==H?void 0:H.bold,children:null==i?void 0:i.children}),p:({node:n,...i})=>e.jsx("p",{...i,className:o.default.paragraph,style:null==H?void 0:H.paragraph,children:i.children}),updated:({node:n,...i})=>e.jsx(s.default,{...i,showUserStoryDiff:x,currentUpdatedTagId:je,setCurrentUpdatedTagId:ye,userStory:oe,setUserStory:ae,setAiReasoning:se,node:n,isCraflow:G,onCraAccept:Q,onCraReject:J,diffEditConfig:me,customStyles:null==H?void 0:H.updatedContent,craFlowConfig:K}),ol:({node:n,...i})=>{var t,l,d;const a=null!==(d=null!==(l=null===(t=null==n?void 0:n.properties)||void 0===t?void 0:t.start)&&void 0!==l?l:null==i?void 0:i.start)&&void 0!==d?d:void 0;return e.jsx("ol",{className:o.default.orderedList,style:null==H?void 0:H.olist,...a?{start:Number(a)}:{},children:null==i?void 0:i.children})},ul:({node:n,...i})=>e.jsx("ul",{className:o.default.unorderedList,style:null==H?void 0:H.ulist,children:null==i?void 0:i.children}),table:({children:n})=>e.jsx("div",{className:o.default.tableWrapper,children:e.jsx("table",{className:o.default.table,style:null==H?void 0:H.table,children:n})}),tr:({node:n,children:i})=>e.jsx(_,{node:n,children:i,customStyles:H}),td:({node:n,children:i})=>{var t;const{style:o,...l}=null!==(t=null==n?void 0:n.properties)&&void 0!==t?t:{};return e.jsx(q.Provider,{value:!0,children:e.jsx("td",{...l,style:o?{cssText:o}:void 0,children:i})})},th:({node:n,children:i})=>{var t;const{style:o,...l}=null!==(t=null==n?void 0:n.properties)&&void 0!==t?t:{};return e.jsx(q.Provider,{value:!0,children:e.jsx("th",{...l,style:o?{cssText:o}:void 0,children:i})})},recommendation:({node:n,...i})=>{var t;const o=`The AI has selected this content based on: ${(null===(t=null==i?void 0:i.children)||void 0===t?void 0:t[0])||""}`;return e.jsx(f.default,{...i,customStyles:null==H?void 0:H.recommendationBlock,label:o})},a:({inline:i,children:t,node:o,...l})=>{var d,a,r;const s=n.useContext(q)||"true"==(null==l?void 0:l.table),c=`${null==l?void 0:l.href}`,u=null===(d=c.split("$"))||void 0===d?void 0:d[0],g=null===(a=c.split("$"))||void 0===a?void 0:a[1];if("ai_reasoning"===u){const n=(null!==(r=x?W:re)&&void 0!==r?r:[]).find(e=>e.id.toString()===decodeURIComponent(g)),i=ge.includes(g);if(n){if(s)return e.jsx(T,{aiReason:n,customStyle:null==H?void 0:H.tableAiReasoning,customIcons:fe,isHighConfidence:n.relevance_score>=v.SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING});const o=Ee(t),l="source"!==o.trim().toLowerCase();return e.jsx(v.default,{aiReason:n,isSourceHasHighlight:i,inlineLabel:o,isInlineCitation:l,customIcons:fe,customStyles:{aiReasoningContent:null==H?void 0:H.aiReasoningContent,aiReasoningAccordion:null==H?void 0:H.aiReasoningAccordion,aiReasoningMarkdown:null==H?void 0:H.aiReasoningMarkdown,aiReasoningPill:null==H?void 0:H.aiReasoningPill,webCitation:null==H?void 0:H.webCitation,stormeeCitation:null==H?void 0:H.stormeeCitation,waveformCitation:null==H?void 0:H.waveformCitation,imageCitation:null==H?void 0:H.imageCitation,fileCitation:null==H?void 0:H.fileCitation,appModCitation:null==H?void 0:H.appModCitation,rcaCitation:null==H?void 0:H.rcaCitation,readFileCitation:null==H?void 0:H.readFileCitation,loadingCitations:null==H?void 0:H.loadingCitations,chatCitation:null==H?void 0:H.chatCitation,bigEnoughCitation:null==H?void 0:H.bigEnoughCitation}})}}return null},code:({inline:n,children:i,className:t,node:l,...d})=>/language-(\w+)/.exec(t||"")||(null==t?void 0:t.includes("language-"))?e.jsx("div",{children:e.jsx("code",{className:o.default.blockCode,style:null==H?void 0:H.code,children:i})}):e.jsx("code",{className:o.default.inlineCode,style:null==H?void 0:H.code,children:i}),learned:({children:n})=>e.jsx(a.Tooltip,{title:n,placement:"top",children:e.jsx(d.Info,{size:16,className:o.default.learned})}),generatedcode:({node:n,...i})=>{const t=(null==i?void 0:i.language)||"python",o=(e=>{let n="";try{if(e["data-raw"])n=decodeURIComponent(atob(e["data-raw"]));else{const i=e=>{var n;return"string"==typeof e?e:Array.isArray(e)?e.map(i).join(""):(null===(n=null==e?void 0:e.props)||void 0===n?void 0:n.children)?i(e.props.children):""};n=i(e.children)}}catch(i){console.error("Error decoding generated code:",i),n=String(e.children)}return n})(i);return e.jsx(c.default,{title:"Generated Code",code:o,language:t,customStyles:{pill:null==H?void 0:H.generatedCodePill,content:null==H?void 0:H.generatedCodeContent}})},updatedsegment:({node:n,children:i,...t})=>{var o,l,d,a;const r=`${null===(o=n.position)||void 0===o?void 0:o.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(d=n.position)||void 0===d?void 0:d.end.line}-${null===(a=n.position)||void 0===a?void 0:a.end.column}`,s=(e=>{if(!e["data-raw"])return null;try{return decodeURIComponent(atob(e["data-raw"]))}catch(e){return console.error("Error decoding segment raw content:",e),null}})(t),c=s?e.jsx("div",{dangerouslySetInnerHTML:{__html:A.default.sanitize(s)}}):e.jsx("div",{children:i});return e.jsx(y.default,{id:r,node:n,children:c,props:t,segmentComponentConfig:pe,customStyles:H,customIcons:O,extractText:Ee,isUpdatedSegment:!0})},segment:({node:n,children:i,...t})=>{var o,l,d,a;const r=`${null===(o=n.position)||void 0===o?void 0:o.start.line}-${null===(l=n.position)||void 0===l?void 0:l.start.column}-${null===(d=n.position)||void 0===d?void 0:d.end.line}-${null===(a=n.position)||void 0===a?void 0:a.end.column}`;return e.jsx(y.default,{id:r,node:n,children:i,props:t,segmentComponentConfig:pe,customStyles:H,customIcons:O,extractText:Ee,blockId:ee})}}),[ke,K,re,V,je,x,i,O,ue,ge,H,pe,be,qe,ee]),Ue=n.useMemo(()=>{let e=b.escapeTagIds(Te,["manual","upt"]);return["del","ins","preserved","manual","upt"].forEach(n=>{e=b.splitTagAcrossParagraphs(e,n,"upt"===n)}),e},[Te]);return n.useEffect(()=>{if(!te.current)return;if(!ue.length)return void xe();let e;if(0===ge.length||X)requestAnimationFrame(()=>{Ce([ue[he].replace(/\*/g,"")])});else{const n=te.current,i=new MutationObserver(()=>{clearTimeout(e),e=setTimeout(()=>{i.disconnect(),requestAnimationFrame(()=>{Ce([ue[he].replace(/\*/g,"")])})},50)});i.observe(n,{childList:!0,subtree:!0})}return()=>{clearTimeout(e)}},[ue,ge,he,X]),e.jsx(E.Provider,{value:{expandedInfo:Se,setExpanded:Ne,reasonToRow:Ie},children:e.jsxs("div",{ref:te,className:`${o.default.container} ${"approving"!==p?o.default.wrapper:""} ${U||""}`,style:null==H?void 0:H.container,children:[r?e.jsx(S.MarkdownContextProvider,{children:e.jsx($.default,{components:_e,rehypePlugins:[k.default],children:Ue})}):t,$e>0&&Y&&e.jsx("div",{className:o.default.confidenceScoreContainer,style:null==H?void 0:H.confidenceScoreContainer,children:e.jsxs("span",{className:o.default.confidenceScore,style:null==H?void 0:H.confidenceScore,children:[e.jsx(m.default,{size:14,color:(null==H?void 0:H.confidenceScoreIconColor)||"#166534"}),$e,"%"]})}),M&&e.jsx("div",{className:o.default.citationLoader,style:null==H?void 0:H.citationLoaderContainer,children:e.jsx(u.default,{customStyles:{container:null==H?void 0:H.citationLoadingContainer,icon:null==H?void 0:H.citationLoadingIcon,text:null==H?void 0:H.citationLoadingText}})}),h&&e.jsx("div",{style:{...null===(ie=null==H?void 0:H.attachedContext)||void 0===ie?void 0:ie.wrapper},className:"flex mt-5",children:e.jsx(C.default,{customStyles:null==H?void 0:H.attachedContext,variant:B})})]})})},exports.splitNestedDiffNodes=P;
2
2
  //# sourceMappingURL=UserStoryWithCitation.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const t=document.createElement("style");t.type="text/css";const e=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#f0f2f5;border-radius:.3rem;box-sizing:border-box;color:#323232;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{-webkit-overflow-scrolling:touch;box-sizing:border-box;margin:16px 0;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border:1px solid #d1d5db;border-collapse:collapse;box-sizing:border-box;font-family:Inter,sans-serif;font-size:.95rem;line-height:1.45rem;margin:0;min-width:100%;table-layout:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd td,.UserStoryWithCitation-module_table__tEyKd th{border:1px solid #d1d5db;color:#111827;overflow-wrap:break-word;padding:8px 10px;vertical-align:top;white-space:normal;word-break:normal}.UserStoryWithCitation-module_table__tEyKd th{background:#f3f4f6;font-weight:700;white-space:nowrap}.UserStoryWithCitation-module_table__tEyKd td[align=center],.UserStoryWithCitation-module_table__tEyKd th[align=center]{text-align:center}.UserStoryWithCitation-module_table__tEyKd td[align=right],.UserStoryWithCitation-module_table__tEyKd th[align=right]{text-align:right}.UserStoryWithCitation-module_table__tEyKd tr:nth-child(2n) td{background:#fafafa}.UserStoryWithCitation-module_table__tEyKd p{margin:0}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{background-color:#fff;text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{background-color:#fff;text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}.UserStoryWithCitation-module_negatedOrderedList__RZDGe,.UserStoryWithCitation-module_negatedUnorderedList__ZTOPu{margin:0;padding:0}.UserStoryWithCitation-module_negatedListItem__pcJY9{display:block;margin:0;padding:0}.UserStoryWithCitation-module_negatedListMarker__yWtUn{display:inline;font:inherit}.UserStoryWithCitation-module_negatedListItem__pcJY9>p:first-of-type{display:inline;margin:0}.UserStoryWithCitation-module_negatedListItem__pcJY9>.UserStoryWithCitation-module_negatedListMarker__yWtUn+span{display:inline!important;margin:0!important;width:auto!important}.UserStoryWithCitation-module_negatedListItem__pcJY9>.UserStoryWithCitation-module_negatedListMarker__yWtUn+span>span:not([class*=_hoverActions_]){display:inline!important;width:auto!important}'));const i=document.head||document.getElementsByTagName("head")[0]||document.documentElement;i&&i.appendChild(t)}(),exports.default={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC",negatedOrderedList:"UserStoryWithCitation-module_negatedOrderedList__RZDGe",negatedUnorderedList:"UserStoryWithCitation-module_negatedUnorderedList__ZTOPu",negatedListItem:"UserStoryWithCitation-module_negatedListItem__pcJY9",negatedListMarker:"UserStoryWithCitation-module_negatedListMarker__yWtUn"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const t=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;t&&e.setAttribute("nonce",t),e.appendChild(document.createTextNode('.UserStoryWithCitation-module_container__YRdbR{box-sizing:border-box;position:relative;width:100%}.UserStoryWithCitation-module_wrapper__wbnqg{border:1px solid #d5d5d5;border-radius:16px;padding:20px}.UserStoryWithCitation-module_heading1__KsWUO{color:#000;font-family:Inter,sans-serif;font-size:1.5rem;margin:.75rem 0 .25rem;padding:0}.UserStoryWithCitation-module_heading2__GHshw{color:#000;font-family:Inter,sans-serif;font-size:1.25rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_heading3__Jm9Xb{color:#000;font-family:Inter,sans-serif;font-size:1.125rem;margin:10px 0 0;padding:0}.UserStoryWithCitation-module_bold__HenfX{font-family:Inter,sans-serif;font-weight:700}.UserStoryWithCitation-module_paragraph__a1-pc{word-wrap:break-word;display:block;flex-wrap:wrap;font-family:Inter,sans-serif;font-size:1rem;line-height:1.75rem;margin:0;max-width:100%;overflow:hidden;overflow:visible;overflow-wrap:break-word;text-align:justify;white-space:normal;word-break:break-word}.UserStoryWithCitation-module_orderedList__E5PQa{font-family:Inter,sans-serif;list-style-type:decimal;margin-left:1rem}.UserStoryWithCitation-module_unorderedList__SFvpc{font-family:Inter,sans-serif;list-style-type:disc;margin-left:1rem}.UserStoryWithCitation-module_inlineCode__5014y{background-color:#d633840d;border-radius:.3rem;box-sizing:border-box;color:#d63384;font-family:Source Code Pro,monospace;font-size:.95em;overflow-wrap:break-word;padding:.2rem .5rem;white-space:pre-wrap;width:100%;word-break:break-word}.UserStoryWithCitation-module_blockCode__pmHG5{color:#d63384;display:block;overflow:hidden;white-space:pre-wrap;word-break:break-words}.UserStoryWithCitation-module_learned__0US6d{color:#3b82f6;cursor:pointer;display:inline-block;margin-left:.25rem;margin-right:.25rem}.UserStoryWithCitation-module_linkText__5kBNv:hover{color:#1d4ed8}.UserStoryWithCitation-module_tableWrapper__r94Fx{box-sizing:border-box;max-width:100%;overflow-x:auto;width:100%}.UserStoryWithCitation-module_table__tEyKd{border-collapse:collapse;box-sizing:border-box;margin:20px 0;table-layout:fixed;width:100%}.UserStoryWithCitation-module_scrollContainer__S-BtW{overflow:hidden}.UserStoryWithCitation-module_citationLoader__Op7Sm{bottom:0;left:0;margin-top:12px}.UserStoryWithCitation-module_aiReasoningButton__-tprH{align-items:center;background:#0000;border:none;cursor:pointer;display:inline-flex;gap:2px;padding:2px 4px;vertical-align:middle}.UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6{color:#4b5563;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz{color:#cf4343;font-size:12px;transform:translateY(5px)}.UserStoryWithCitation-module_confidenceScoreContainer__zOE-E{position:absolute;right:12px;top:12px;z-index:10}.UserStoryWithCitation-module_confidenceScore__lhT4p{align-items:center;background-color:#f0fdf4;border:1px solid #bbf7d0;border-radius:9999px;box-shadow:0 1px 2px #0000000d;color:#166534;display:inline-flex;font-family:Inter,sans-serif;font-size:12px;font-weight:700;gap:4px;padding:4px 8px}.UserStoryWithCitation-module_orderedList__E5PQa{counter-reset:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa>li{counter-increment:parentItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:childItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:childItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc{counter-reset:grandchildItem;list-style-type:none!important}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li{align-items:baseline;counter-increment:grandchildItem}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li:before{content:counter(parentItem) "." counter(childItem) "." counter(grandchildItem) " ";flex-shrink:0;margin-right:4px}.UserStoryWithCitation-module_orderedList__E5PQa li>.UserStoryWithCitation-module_unorderedList__SFvpc li>.UserStoryWithCitation-module_unorderedList__SFvpc>li>.UserStoryWithCitation-module_paragraph__a1-pc{display:inline}.UserStoryWithCitation-module_inserted__66gBL{background-color:#8cbeff}.UserStoryWithCitation-module_deleted__mzR4t{background-color:#fff;text-decoration:line-through;text-decoration-color:#dc2626}.UserStoryWithCitation-module_preserved__ND8uC{background-color:#fff;text-decoration:underline;text-decoration-color:#d3d3d3}[class*=_upt-]>[class*=_inserted_]{background-color:#f3e8ff}[class^=_manual-]>[class^=_inserted_]{background-color:#8cbeff}'));const o=document.head||document.getElementsByTagName("head")[0]||document.documentElement;o&&o.appendChild(e)}(),exports.default={container:"UserStoryWithCitation-module_container__YRdbR",wrapper:"UserStoryWithCitation-module_wrapper__wbnqg",heading1:"UserStoryWithCitation-module_heading1__KsWUO",heading2:"UserStoryWithCitation-module_heading2__GHshw",heading3:"UserStoryWithCitation-module_heading3__Jm9Xb",bold:"UserStoryWithCitation-module_bold__HenfX",paragraph:"UserStoryWithCitation-module_paragraph__a1-pc",orderedList:"UserStoryWithCitation-module_orderedList__E5PQa",unorderedList:"UserStoryWithCitation-module_unorderedList__SFvpc",inlineCode:"UserStoryWithCitation-module_inlineCode__5014y",blockCode:"UserStoryWithCitation-module_blockCode__pmHG5",learned:"UserStoryWithCitation-module_learned__0US6d",linkText:"UserStoryWithCitation-module_linkText__5kBNv",tableWrapper:"UserStoryWithCitation-module_tableWrapper__r94Fx",table:"UserStoryWithCitation-module_table__tEyKd",scrollContainer:"UserStoryWithCitation-module_scrollContainer__S-BtW",citationLoader:"UserStoryWithCitation-module_citationLoader__Op7Sm",aiReasoningButton:"UserStoryWithCitation-module_aiReasoningButton__-tprH",aiReasoningIconHighConfidence:"UserStoryWithCitation-module_aiReasoningIconHighConfidence__FmXx6",aiReasoningIconLowConfidence:"UserStoryWithCitation-module_aiReasoningIconLowConfidence__TfkJz",confidenceScoreContainer:"UserStoryWithCitation-module_confidenceScoreContainer__zOE-E",confidenceScore:"UserStoryWithCitation-module_confidenceScore__lhT4p",inserted:"UserStoryWithCitation-module_inserted__66gBL",deleted:"UserStoryWithCitation-module_deleted__mzR4t",preserved:"UserStoryWithCitation-module_preserved__ND8uC"};
2
2
  //# sourceMappingURL=UserStoryWithCitation.module.css.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("@mui/material"),n=require("../../../utils/css.utils.js"),i=require("./InlineUpdatedComponent.module.css.js"),o=require("../../../icons/CognitiveDecision.js"),t=require("lucide-react"),r=require("react");exports.default=({aiReason:d,children:a,customStyles:s,handleClickCognitiveDecision:u,handleClickUpdatedPill:c,handleClickOutputValue:v,customIcons:p,CDNeededInChip:f=!0,showWaitingIconInChip:g=!1,showChip:h,status:m,containerRef:x})=>{var j,y,C,w,b,k,D,N,S,I,P,_,q,R,T,O,W,$,z;const A=r.useRef(null),L=r.useRef(null),[E,F]=r.useState(null),M=r.useCallback(()=>{var e;const l=L.current,n=(null===(e=A.current)||void 0===e?void 0:e.offsetParent)||(null==l?void 0:l.offsetParent);if(!(l&&n instanceof HTMLElement))return;const i=l.getBoundingClientRect(),o=n.getBoundingClientRect(),t=i.top-o.top+i.height/2;F(e=>null!==e&&Math.abs(e-t)<.5?e:t)},[]);r.useLayoutEffect(()=>{M()}),r.useLayoutEffect(()=>{var e,l;if("undefined"==typeof window)return;const n=window.requestAnimationFrame(M);window.addEventListener("resize",M);const i="undefined"!=typeof ResizeObserver?new ResizeObserver(M):null;L.current&&(null==i||i.observe(L.current));const o=(null===(e=A.current)||void 0===e?void 0:e.offsetParent)||(null===(l=L.current)||void 0===l?void 0:l.offsetParent);return o instanceof HTMLElement&&(null==i||i.observe(o)),()=>{window.cancelAnimationFrame(n),window.removeEventListener("resize",M),null==i||i.disconnect()}},[M]);const U="pending"!==m?"#303030":null===(C=null===(y=null===(j=d.redlining_details)||void 0===j?void 0:j.evaluation_outputs)||void 0===y?void 0:y.metadata)||void 0===C?void 0:C.label_color,H={color:U||"#000000",background:n.hexToOpacity(U||"#000000",25),border:`1px solid ${n.hexToOpacity(U||"#000000",75)}`},B=U||"#000000",V=n.hexToOpacity(U||"#000000",25),X={background:n.hexToOpacity(U||"#000000",75),...null==s?void 0:s.dividerStyle};let G=null;"accepted"===m?G=null!==(w=null==p?void 0:p.accepted)&&void 0!==w?w:e.jsx(t.Check,{color:"#16A34A"}):"rejected"===m?G=null!==(b=null==p?void 0:p.rejected)&&void 0!==b?b:e.jsx(t.X,{color:"#DC2626"}):"reverted"===m&&(G=null!==(k=null==p?void 0:p.reverted)&&void 0!==k?k:e.jsx(t.Undo2,{color:"#475569"}));const J=null===E?{}:{"--inline-update-anchor-top":`${E}px`},K=null===E?"":` ${i.default.anchorAligned}`;return e.jsxs("span",{className:i.default.inlineUpdatedWrapper,children:[h&&e.jsxs(e.Fragment,{children:[G&&e.jsx("span",{className:`${i.default.resolvedStatus}${K}`,style:{...J,...null==s?void 0:s.resolvedIcon},children:G}),e.jsx("span",{ref:A,id:d.id.toString(),"data-ai-reason-id":d.id.toString(),onClick:e=>{e.stopPropagation(),null==c||c(e.currentTarget,d)},className:`${i.default.pillWrapper}${K}`,style:{...J,...null==s?void 0:s.pillStyleWrapper},children:e.jsxs("span",{className:i.default.pillComponent,style:{...H,...null===(D=null==s?void 0:s.pillComponent)||void 0===D?void 0:D.commonStyle},children:[e.jsx("span",{children:(null===(I=null===(S=null===(N=d.redlining_details)||void 0===N?void 0:N.evaluation_outputs)||void 0===S?void 0:S.metadata)||void 0===I?void 0:I.label_text)||""}),e.jsx(l.Divider,{className:i.default.dividerStyle,style:X}),g&&"pending"===m&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:i.default.waitingIconWrapper,style:{color:U},title:"Waiting",children:e.jsx(t.Hourglass,{size:16})}),e.jsx(l.Divider,{className:i.default.dividerStyle,style:X})]}),e.jsx("span",{className:i.default["output-container"],onClick:e=>{v&&(e.stopPropagation(),null==v||v(e.currentTarget,d))},children:d.resolving?e.jsx(l.CircularProgress,{size:(null===(P=null==s?void 0:s.loader)||void 0===P?void 0:P.size)||18,"aria-label":"Loading…",sx:{color:(null===(_=null==s?void 0:s.loader)||void 0===_?void 0:_.color)||U}}):"pending"!==m?G:null===(R=null===(q=null==d?void 0:d.redlining_details)||void 0===q?void 0:q.evaluation_outputs)||void 0===R?void 0:R.output_value}),f&&e.jsxs(e.Fragment,{children:[e.jsx(l.Divider,{className:i.default.dividerStyle,style:X}),e.jsx("span",{onClick:e=>{e.stopPropagation(),null==u||u(e.currentTarget,d)},className:i.default.cognitiveDecisionWrapper,style:null===(T=null==s?void 0:s.cognitiveDecisionIcon)||void 0===T?void 0:T.wrapper,children:e.jsx(o.default,{color:(null===(O=null==s?void 0:s.cognitiveDecisionIcon)||void 0===O?void 0:O.color)||B,backgroundColor:(null===(W=null==s?void 0:s.cognitiveDecisionIcon)||void 0===W?void 0:W.backgroundColor)||V})}),e.jsx("span",{className:i.default.chevronWrapper,style:null===($=null==s?void 0:s.Chevron)||void 0===$?void 0:$.wrapper,children:e.jsx(t.ChevronDown,{color:(null===(z=null==s?void 0:s.Chevron)||void 0===z?void 0:z.color)||U})})]})]})})]}),e.jsx("span",{ref:L,className:i.default[`upt-${m}`],onClick:e=>{var l,n,i;e.preventDefault(),e.stopPropagation();const o=d.id.toString(),t=null!==(l=A.current)&&void 0!==l?l:Array.from(null!==(i=null===(n=x.current)||void 0===n?void 0:n.querySelectorAll("[data-ai-reason-id]"))&&void 0!==i?i:[]).find(e=>e.dataset.aiReasonId===o);t&&(null==c||c(t,d))},children:a})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("@mui/material"),n=require("../../../utils/css.utils.js"),i=require("./InlineUpdatedComponent.module.css.js"),o=require("../../../icons/CognitiveDecision.js"),t=require("lucide-react"),r=require("react");exports.default=({aiReason:d,children:s,customStyles:a,handleClickCognitiveDecision:u,handleClickUpdatedPill:c,handleClickOutputValue:v,customIcons:p,CDNeededInChip:f=!0,showWaitingIconInChip:g=!1,showChip:h,status:m})=>{var x,j,C,y,w,b,k,D,N,P,_,I,S,T,q,O,W,$,z;const L=r.useRef(null),R=r.useRef(null),[E,A]=r.useState(null),F=r.useCallback(()=>{var e;const l=R.current,n=(null===(e=L.current)||void 0===e?void 0:e.offsetParent)||(null==l?void 0:l.offsetParent);if(!(l&&n instanceof HTMLElement))return;const i=l.getBoundingClientRect(),o=n.getBoundingClientRect(),t=i.top-o.top+i.height/2;A(e=>null!==e&&Math.abs(e-t)<.5?e:t)},[]);r.useLayoutEffect(()=>{F()}),r.useLayoutEffect(()=>{var e,l;if("undefined"==typeof window)return;const n=window.requestAnimationFrame(F);window.addEventListener("resize",F);const i="undefined"!=typeof ResizeObserver?new ResizeObserver(F):null;R.current&&(null==i||i.observe(R.current));const o=(null===(e=L.current)||void 0===e?void 0:e.offsetParent)||(null===(l=R.current)||void 0===l?void 0:l.offsetParent);return o instanceof HTMLElement&&(null==i||i.observe(o)),()=>{window.cancelAnimationFrame(n),window.removeEventListener("resize",F),null==i||i.disconnect()}},[F]);const M="pending"!==m?"#303030":null===(C=null===(j=null===(x=d.redlining_details)||void 0===x?void 0:x.evaluation_outputs)||void 0===j?void 0:j.metadata)||void 0===C?void 0:C.label_color,U={color:M||"#000000",background:n.hexToOpacity(M||"#000000",25),border:`1px solid ${n.hexToOpacity(M||"#000000",75)}`},H=M||"#000000",B=n.hexToOpacity(M||"#000000",25),V={background:n.hexToOpacity(M||"#000000",75),...null==a?void 0:a.dividerStyle};let X=null;"accepted"===m?X=null!==(y=null==p?void 0:p.accepted)&&void 0!==y?y:e.jsx(t.Check,{color:"#16A34A"}):"rejected"===m?X=null!==(w=null==p?void 0:p.rejected)&&void 0!==w?w:e.jsx(t.X,{color:"#DC2626"}):"reverted"===m&&(X=null!==(b=null==p?void 0:p.reverted)&&void 0!==b?b:e.jsx(t.Undo2,{color:"#475569"}));const G=null===E?{}:{"--inline-update-anchor-top":`${E}px`},J=null===E?"":` ${i.default.anchorAligned}`;return e.jsxs("span",{className:i.default.inlineUpdatedWrapper,children:[h&&e.jsxs(e.Fragment,{children:[X&&e.jsx("span",{className:`${i.default.resolvedStatus}${J}`,style:{...G,...null==a?void 0:a.resolvedIcon},children:X}),e.jsx("span",{ref:L,id:d.id.toString(),onClick:e=>{e.stopPropagation(),null==c||c(e.currentTarget,d)},className:`${i.default.pillWrapper}${J}`,style:{...G,...null==a?void 0:a.pillStyleWrapper},children:e.jsxs("span",{className:i.default.pillComponent,style:{...U,...null===(k=null==a?void 0:a.pillComponent)||void 0===k?void 0:k.commonStyle},children:[e.jsx("span",{children:(null===(P=null===(N=null===(D=d.redlining_details)||void 0===D?void 0:D.evaluation_outputs)||void 0===N?void 0:N.metadata)||void 0===P?void 0:P.label_text)||""}),e.jsx(l.Divider,{className:i.default.dividerStyle,style:V}),g&&"pending"===m&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:i.default.waitingIconWrapper,style:{color:M},title:"Waiting",children:e.jsx(t.Hourglass,{size:16})}),e.jsx(l.Divider,{className:i.default.dividerStyle,style:V})]}),e.jsx("span",{className:i.default["output-container"],onClick:e=>{v&&(e.stopPropagation(),null==v||v(e.currentTarget,d))},children:d.resolving?e.jsx(l.CircularProgress,{size:(null===(_=null==a?void 0:a.loader)||void 0===_?void 0:_.size)||18,"aria-label":"Loading…",sx:{color:(null===(I=null==a?void 0:a.loader)||void 0===I?void 0:I.color)||M}}):"pending"!==m?X:null===(T=null===(S=null==d?void 0:d.redlining_details)||void 0===S?void 0:S.evaluation_outputs)||void 0===T?void 0:T.output_value}),f&&e.jsxs(e.Fragment,{children:[e.jsx(l.Divider,{className:i.default.dividerStyle,style:V}),e.jsx("span",{onClick:e=>{e.stopPropagation(),null==u||u(e.currentTarget,d)},className:i.default.cognitiveDecisionWrapper,style:null===(q=null==a?void 0:a.cognitiveDecisionIcon)||void 0===q?void 0:q.wrapper,children:e.jsx(o.default,{color:(null===(O=null==a?void 0:a.cognitiveDecisionIcon)||void 0===O?void 0:O.color)||H,backgroundColor:(null===(W=null==a?void 0:a.cognitiveDecisionIcon)||void 0===W?void 0:W.backgroundColor)||B})}),e.jsx("span",{className:i.default.chevronWrapper,style:null===($=null==a?void 0:a.Chevron)||void 0===$?void 0:$.wrapper,children:e.jsx(t.ChevronDown,{color:(null===(z=null==a?void 0:a.Chevron)||void 0===z?void 0:z.color)||M})})]})]})})]}),e.jsx("span",{ref:R,className:i.default[`upt-${m}`],onClick:e=>{e.preventDefault(),e.stopPropagation(),L.current&&(null==c||c(L.current,d))},children:s})]})};
2
2
  //# sourceMappingURL=InlineUpdatedComponent.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../utils/proccess-stream.utils.js");exports.useStreamContentHandler=function({setUserStory:i,setAiReasoning:o,setUserStoryCitations:n,onStreamingCompleted:r,isGraphQLCallInProgress:s,knowledgeBase:a,projectAnalyserSummary:l,dataSourceFiles:u,aiReasoning:c,setRedisValue:d,fetchCitationByBlock:p}){const[_,m]=e.useState({finalGap:"",finalRisk:"",status:"in-progress"}),f=e.useRef(new Set),g=e.useRef(new Set),b=e.useRef(null),v=e.useRef(null),h=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),k=e.useRef(new Set);return e.useEffect(()=>{"complete"!==_.status||s||(r(_.finalGap,_.finalRisk),f.current.clear(),g.current.clear(),b.current=null,v.current=null,h.current={gap_items_prompt:"",risk_items_prompt:""},k.current.clear(),m({finalGap:"",finalRisk:"",status:"in-progress"}))},[_,s]),{processStreamContent:function(e,r,s){try{const _=JSON.stringify(e);if(v.current===_)return;v.current=_;let y=[],R=[];e=e.map(e=>{var i;const s=`${(e={...e,subBlockNumber:null!==(i=e.subBlockNumber)&&void 0!==i?i:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(k.current.has(s))return null;k.current.add(s);let{outputText:a,reasonings:l,gpt_citation:u,processedDescription:c}=t.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var t;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(t=e.gpt_citations)||void 0===t||t.push(...u)),{...e}}),y.push(...l),R.push([...l]);const d=l.filter(e=>e.on_demand).flatMap(e=>[...e.reason.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g),...e.gap.matchAll(/<a[^>]*href="([^"]+)\?type=on_demand"/g)].map(e=>{const[t,i]=e[1].split("$");return"book_citation_doc"!==t&&"book_citation_pdf"!==t&&"document_citation"!==t?null:{citation_number:i,customMetadata:{type:"document_citation"===t?"book_citation_pdf":t,file_name:"",fileType:"",gcs_upload_url:""}}}).filter(Boolean));d.length&&n(e=>{var t;return{...e,file_citations:[...null!==(t=e.file_citations)&&void 0!==t?t:[],...d]}});let _=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return f.current.has(_)||(!async function(e,t,i){var r,s;let a="",l="";try{const u=await p(e,i,t);o(e=>{var t;const i=[...e];return null===(t=u.response.ai_reasonings)||void 0===t||t.forEach(e=>{const t=i.findIndex(t=>t.id===e.id);-1!==t&&e.gap.length>0&&e.reason.length>0&&(i[t]={...e})}),i}),a=(null===(r=u.response)||void 0===r?void 0:r.gap_items_prompt)||"",l=(null===(s=u.response)||void 0===s?void 0:s.risk_items_prompt)||"",(a||l)&&(h.current={gap_items_prompt:a,risk_items_prompt:l}),n(e=>{var t,i,o,n,r,s,a,l,c,d,p,_,m,f;return{...e,appmod_citations:[...null!==(t=e.appmod_citations)&&void 0!==t?t:[],...null!==(i=u.response.appmod_citations)&&void 0!==i?i:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=u.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(r=e.file_citations)&&void 0!==r?r:[],...null!==(s=u.response.file_citations)&&void 0!==s?s:[]],image_citations:[...null!==(a=e.image_citations)&&void 0!==a?a:[],...null!==(l=u.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=u.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(p=e.web_citations)&&void 0!==p?p:[],...null!==(_=u.response.web_citations)&&void 0!==_?_:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(f=u.response.readfile_citations)&&void 0!==f?f:[]]}})}catch(t){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,t)}finally{let t=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(g.current.add(t),g.current.size===f.current.size){const e=a||h.current.gap_items_prompt,t=l||h.current.risk_items_prompt;m({finalGap:e,finalRisk:t,status:"complete"})}}}({...e,value:a,description:c},l,r),f.current.add(_)),{...e,value:a,description:c}}).filter(Boolean),y.forEach(e=>{o(t=>(t.find(t=>t.id===e.id)||t.push(e),[...t]))}),e.length>0&&e.map(({title:e,section:t,value:o,storyNumber:n,description:r,blockNumber:p,big_enough:_,big_enough_decision_factors:m,gapValue:f,confidenceScore:g,metadata:v},h)=>{i(i=>{var k,y,N,S,B,$,C,O;const w=i.findIndex(e=>e.storyNumber===n);if("intro"===t)-1===w?i.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,description:r,storyNumber:n,sub_features:[],section:t,blockNumber:p,aiReasoning:R[h],big_enough:_,big_enough_decision_factors:m,gapValue:f,confidenceScore:g,metadata:v}):(i[w].value+=o,i[w].aiReasoning=i[w].aiReasoning||[],null===(y=null===(k=i[w])||void 0===k?void 0:k.aiReasoning)||void 0===y||y.push(...R[h]),i[w].big_enough=_,i[w].big_enough_decision_factors=m,i[w].gapValue=f,i[w].confidenceScore=g,i[w].metadata=v);else{i[w].sub_features||(i[w].sub_features=[]);const r=(null===(S=null===(N=i[w])||void 0===N?void 0:N.sub_features)||void 0===S?void 0:S.findIndex(e=>e.blockNumber===p))||-1;if(-1===r)null===($=null===(B=i[w])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${n}-${p}`,title:e,value:o,storyNumber:n,blockNumber:p,section:t,aiReasoning:R[h],big_enough:_,big_enough_decision_factors:m,gapValue:f,confidenceScore:g,metadata:v});else{let e=null===(O=null===(C=null==i?void 0:i[w])||void 0===C?void 0:C.sub_features)||void 0===O?void 0:O[r];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...R[h]),e.big_enough=_,e.big_enough_decision_factors=m,e.gapValue=f,e.confidenceScore=g,e.metadata=v}}const E=JSON.stringify(i);return b.current!==E&&(d({key:`streaming-redis-key-${s}`,value:{mmvf_list:i,knowledgeBase:a,projectAnalyserSummary:l,dataSources_files:u,ai_reasonings:c}}),b.current=E),[...i]})})}catch(e){console.error("Error in processing Stream Content",e)}}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),i=require("../utils/proccess-stream.utils.js");exports.useStreamContentHandler=function({setUserStory:t,setAiReasoning:o,setUserStoryCitations:n,onStreamingCompleted:r,isGraphQLCallInProgress:s,knowledgeBase:a,projectAnalyserSummary:u,dataSourceFiles:l,aiReasoning:c,setRedisValue:d,fetchCitationByBlock:_}){const p=e.useRef(new Set),m=e.useRef(new Set),g=e.useRef(null),b=e.useRef(null),v=e.useRef({gap_items_prompt:"",risk_items_prompt:""}),f=e.useRef(new Set);async function h(e,i,t){var a,u;let l="",c="";try{const r=await _(e,t,i);o(e=>{var i;const t=[...e];return null===(i=r.response.ai_reasonings)||void 0===i||i.forEach(e=>{const i=t.findIndex(i=>i.id===e.id);-1!==i&&e.gap.length>0&&e.reason.length>0&&(t[i]={...e})}),t}),l=(null===(a=r.response)||void 0===a?void 0:a.gap_items_prompt)||"",c=(null===(u=r.response)||void 0===u?void 0:u.risk_items_prompt)||"",(l||c)&&(v.current={gap_items_prompt:l,risk_items_prompt:c}),n(e=>{var i,t,o,n,s,a,u,l,c,d,_,p,m,g;return{...e,appmod_citations:[...null!==(i=e.appmod_citations)&&void 0!==i?i:[],...null!==(t=r.response.appmod_citations)&&void 0!==t?t:[]],audio_citations:[...null!==(o=e.audio_citations)&&void 0!==o?o:[],...null!==(n=r.response.audio_citations)&&void 0!==n?n:[]],file_citations:[...null!==(s=e.file_citations)&&void 0!==s?s:[],...null!==(a=r.response.file_citations)&&void 0!==a?a:[]],image_citations:[...null!==(u=e.image_citations)&&void 0!==u?u:[],...null!==(l=r.response.image_citations)&&void 0!==l?l:[]],rca_citations:[...null!==(c=e.rca_citations)&&void 0!==c?c:[],...null!==(d=r.response.rca_citations)&&void 0!==d?d:[]],web_citations:[...null!==(_=e.web_citations)&&void 0!==_?_:[],...null!==(p=r.response.web_citations)&&void 0!==p?p:[]],readfile_citations:[...null!==(m=e.readfile_citations)&&void 0!==m?m:[],...null!==(g=r.response.readfile_citations)&&void 0!==g?g:[]]}})}catch(i){console.error("[liblogs] processCitationsByBlock error — story:%s block:%s",e.storyNumber,e.blockNumber,i)}finally{let i=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}`;if(m.current.add(i),m.current.size===p.current.size&&!s.current){const e=l||v.current.gap_items_prompt,i=c||v.current.risk_items_prompt;await r(e,i),p.current.clear(),m.current.clear(),g.current=null,b.current=null,v.current={gap_items_prompt:"",risk_items_prompt:""},f.current.clear()}}}return{processStreamContent:function(e,r,s){try{const _=JSON.stringify(e);if(b.current===_)return;b.current=_;let m=[],v=[];e=e.map(e=>{var t;const o=`${(e={...e,subBlockNumber:null!==(t=e.subBlockNumber)&&void 0!==t?t:"1"}).storyNumber}-${e.blockNumber}-${e.subBlockNumber}`;if(f.current.has(o))return null;f.current.add(o);let{outputText:s,reasonings:a,gpt_citation:u,processedDescription:l}=i.processAIReasoningFromBlocks(e.value,e.blockNumber,e.storyNumber,e.description);n(e=>{var i;return u.length>0&&((null==e?void 0:e.gpt_citations)||(e.gpt_citations=[]),null===(i=e.gpt_citations)||void 0===i||i.push(...u)),{...e}}),m.push(...a),v.push([...a]);let c=`<STORY_NUMBER>${e.storyNumber}<BLOCK_NUMBER>${e.blockNumber}<SUB_BLOCK>${e.subBlockNumber}`;return p.current.has(c)||(h({...e,value:s,description:l},a,r),p.current.add(c)),{...e,value:s,description:l}}).filter(Boolean),m.forEach(e=>{o(i=>(i.find(i=>i.id===e.id)||i.push(e),[...i]))}),e.length>0&&e.map(({title:e,section:i,value:o,storyNumber:n,description:r,blockNumber:_,big_enough:p,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h},N)=>{t(t=>{var y,k,R,S,B,$,C,w;const O=t.findIndex(e=>e.storyNumber===n);if("intro"===i)-1===O?t.push({artifactId:`STORY-${n}-${_}`,title:e,value:o,description:r,storyNumber:n,sub_features:[],section:i,blockNumber:_,aiReasoning:v[N],big_enough:p,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h}):(t[O].value+=o,t[O].aiReasoning=t[O].aiReasoning||[],null===(k=null===(y=t[O])||void 0===y?void 0:y.aiReasoning)||void 0===k||k.push(...v[N]),t[O].big_enough=p,t[O].big_enough_decision_factors=m,t[O].gapValue=b,t[O].confidenceScore=f,t[O].metadata=h);else{t[O].sub_features||(t[O].sub_features=[]);const r=(null===(S=null===(R=t[O])||void 0===R?void 0:R.sub_features)||void 0===S?void 0:S.findIndex(e=>e.blockNumber===_))||-1;if(-1===r)null===($=null===(B=t[O])||void 0===B?void 0:B.sub_features)||void 0===$||$.push({artifactId:`STORY-${n}-${_}`,title:e,value:o,storyNumber:n,blockNumber:_,section:i,aiReasoning:v[N],big_enough:p,big_enough_decision_factors:m,gapValue:b,confidenceScore:f,metadata:h});else{let e=null===(w=null===(C=null==t?void 0:t[O])||void 0===C?void 0:C.sub_features)||void 0===w?void 0:w[r];e.value=(e.value||"")+o,e.aiReasoning=e.aiReasoning||[],e.aiReasoning.push(...v[N]),e.big_enough=p,e.big_enough_decision_factors=m,e.gapValue=b,e.confidenceScore=f,e.metadata=h}}const E=JSON.stringify(t);return g.current!==E&&(d({key:`streaming-redis-key-${s}`,value:{mmvf_list:t,knowledgeBase:a,projectAnalyserSummary:u,dataSources_files:l,ai_reasonings:c}}),g.current=E),[...t]})})}catch(e){console.error("Error in processing Stream Content",e)}}}};
2
2
  //# sourceMappingURL=useStreamContentHandler.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.extractAllAiReasoningIds=e=>{const r=(new DOMParser).parseFromString(e,"text/html");return Array.from(r.querySelectorAll('a[href^="ai_reasoning$"]')).map(e=>e.getAttribute("href").replace("ai_reasoning$",""))},exports.formatMarkdown=function(e){try{return e}catch(e){console.error("Error in formatMarkdown",e)}},exports.getHrefQueryParam=(e="",r)=>{const t=e.split("?")[1]||"";if(!t)return"";try{return new URLSearchParams(t).get(r)||""}catch(e){return console.error("Failed to parse citation href query params",e),""}},exports.guidelineCitationTypes=["rulebook_citation","il_rulebook_citation","rulebook_chunk"],exports.indentMarkdown=function(e){return e.includes("Acceptance Criteria")?e=null==(e=null==(e=null==(e=null==e?void 0:e.replace(/\\n/g,"\n"))?void 0:e.replace(/(\*\*.+?\*\*)\s*:/g,"\n$1:\n"))?void 0:e.replace(/(?<!\d)(\d+(?:\.\d+)+)\./g,(e,r)=>{const t=r.split(".");return`${" ".repeat(t.length-1)}${r}.`}))?void 0:e.replace(/([^\n])\n(?![\n\*#])/g,"$1<br>\n"):e},exports.stripAiReasoningAnchors=e=>{const r=(new DOMParser).parseFromString(e,"text/html");return r.querySelectorAll('a[href^="ai_reasoning$"]').forEach(e=>{e.remove()}),r.body.innerHTML.trim()},exports.stripHtmlAndMetadata=e=>{if(!e)return"";e=(e=(e=(e=(e=e.replace(/%&&%[\s\S]*?%&&%/g,"")).replace(/<!--[\s\S]*?-->/g,"")).replace(/<crredirection[^>]*>[\s\S]*?<\/crredirection>/gi,"")).replace(/<answerExample[^>]*>[\s\S]*?<\/answerExample>/gi,"")).replace(/<a\s+data-cognitive-reasoning[^>]*>[\s\S]*?<\/a>/gi,"");return["b","strong","i","em","u","ol","ul","li","p","div","span","h1","h2","h3","h4","h5","h6","highlight","br","hr"].forEach(r=>{const t=new RegExp(`</?${r}[^>]*>`,"gi");e=e.replace(t,"")}),e=(e=(e=(e=(e=e.replace("ð","")).replace(/\*\*/g,"")).replace(/\n/g," ")).replace(/\s+/g," ")).trim()};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.extractAllAiReasoningIds=e=>{const r=(new DOMParser).parseFromString(e,"text/html");return Array.from(r.querySelectorAll('a[href^="ai_reasoning$"]')).map(e=>e.getAttribute("href").replace("ai_reasoning$",""))},exports.formatMarkdown=function(e){try{return e}catch(e){console.error("Error in formatMarkdown",e)}},exports.indentMarkdown=function(e){return e.includes("Acceptance Criteria")?e=null==(e=null==(e=null==(e=null==e?void 0:e.replace(/\\n/g,"\n"))?void 0:e.replace(/(\*\*.+?\*\*)\s*:/g,"\n$1:\n"))?void 0:e.replace(/(?<!\d)(\d+(?:\.\d+)+)\./g,(e,r)=>{const n=r.split(".");return`${" ".repeat(n.length-1)}${r}.`}))?void 0:e.replace(/([^\n])\n(?![\n\*#])/g,"$1<br>\n"):e},exports.stripAiReasoningAnchors=e=>{const r=(new DOMParser).parseFromString(e,"text/html");return r.querySelectorAll('a[href^="ai_reasoning$"]').forEach(e=>{e.remove()}),r.body.innerHTML.trim()},exports.stripHtmlAndMetadata=e=>{if(!e)return"";e=(e=(e=(e=(e=e.replace(/%&&%[\s\S]*?%&&%/g,"")).replace(/<!--[\s\S]*?-->/g,"")).replace(/<crredirection[^>]*>[\s\S]*?<\/crredirection>/gi,"")).replace(/<answerExample[^>]*>[\s\S]*?<\/answerExample>/gi,"")).replace(/<a\s+data-cognitive-reasoning[^>]*>[\s\S]*?<\/a>/gi,"");return["b","strong","i","em","u","ol","ul","li","p","div","span","h1","h2","h3","h4","h5","h6","highlight","br","hr"].forEach(r=>{const n=new RegExp(`</?${r}[^>]*>`,"gi");e=e.replace(n,"")}),e=(e=(e=(e=(e=e.replace("ð","")).replace(/\*\*/g,"")).replace(/\n/g," ")).replace(/\s+/g," ")).trim()};
2
2
  //# sourceMappingURL=helpers.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=e=>e.replace(/<onDemandCitation\s+type=(?:\\"|")([^"]+)(?:\\"|")\s+citationNo=(?:\\"|")(\d+)(?:\\"|")\s*(?:\/>|><\/onDemandCitation>)/g,(e,t,n)=>`<a href="${t}$${n}?type=on_demand">Source</a>`);function t(e,t){if(!e)return e;let n="",r=0;for(;;){const o=e.indexOf("<gpt_citation_here ",r);if(-1===o){n+=e.slice(r);break}n+=e.slice(r,o);const i=e.indexOf(">",o);if(-1===i){n+=e.slice(o);break}const s=e.slice(o,i+1),c=s.indexOf("id=");let a="";if(-1!==c){let e=c+3;for("\\"===s[e]&&e++,'"'!==s[e]&&"'"!==s[e]||e++;e<s.length&&/\d/.test(s[e]);)a+=s[e++]}if(a){n+=`<a href="gpt_citation$${`${t}<GPT_CITATION_ID>${a}`}">Source</a>`}r=i+1}return n}function n(e,t){const n=t=>{const n=new RegExp(`<${t}>([\\s\\S]*?)<\\/${t}>`,"gi"),r=[];let o;for(;null!==(o=n.exec(e));)r.push(o[1].trim());return r},r=n("domain"),o=n("paraphrase");return{citation_number:t,customMetadata:{type:"gpt_citation",data_sources:n("data_sources"),training_data_title:r,paraphrase:o}}}exports.extractBlockStreams=e=>{const t=[];try{const n="<BLOCK_STREAM_START>",r="<BLOCK_STREAM_END>";let o=0;for(;;){const i=e.indexOf(n,o);if(-1===i)break;const s=e.indexOf(r,i+n.length);if(-1===s)break;const c=e.slice(i+n.length,s).trim();t.push(JSON.parse(c)),o=s+r.length}}catch(e){console.error("Error in extracting blocks from stream",e)}finally{return t}},exports.extractDescription=function(e){try{const t=/<h2>\s*(?:<b>)?Description(?:<\/b>)?\s*<\/h2>\s*([\s\S]*?)(?=\s*<h2>|$)/i,n=e.match(t);if(n)return n[1].trim()}catch(e){}return null},exports.parseGptCitation=n,exports.processAIReasoningFromBlocks=function(r,o,i,s){const c=[];let a="";const l=[];let u="";console.log("RAW INPUT",JSON.stringify(r),JSON.stringify(s));try{const d=r=>r.replace(/<a\s+(?:(table="true")\s+)?href=(\\"|")ai_reasoning\$(\d+)(\?[^\\"]*)?(\\"|")>([\s\S]*?)<\/a>/g,(r,s,a,u,d,p,f)=>{var h,g,_,m,$;const b=`${u}<BLOCK_NUMBER>${o}<STORY_NUMBER>${i}`,x=!!d&&d.includes("type=on_demand"),v=function(e){const t=new Map,n="<gpt_citation ",r="</gpt_citation>";let o=0;for(;;){const i=e.indexOf(n,o);if(-1===i)break;const s=e.indexOf(">",i);if(-1===s)break;const c=e.indexOf(r,s);if(-1===c)break;const a=e.slice(i,c+r.length),l=e.slice(i,s+1),u=l.indexOf("id=");if(-1!==u){let e=u+3;"\\"===l[e]&&e++,'"'!==l[e]&&"'"!==l[e]||e++;let n="";for(;e<l.length&&/\d/.test(l[e]);)n+=l[e++];n&&t.set(n,a)}o=c+r.length}return t}(f);console.log("RAW INPUT",v);const S=f.match(/<reason(?:\s+source="([^"]*)")?>([\s\S]*?)<\/reason>/),O=f.match(/<gap(?:\s+source="([^"]*)")?>([\s\S]*?)<\/gap>/),T=f.match(/<relevance_score>([\s\S]*?)<\/relevance_score>/);let y=(null===(h=null==S?void 0:S[2])||void 0===h?void 0:h.trim())||"",R=(null===(g=null==O?void 0:O[2])||void 0===g?void 0:g.trim())||"";y=e(y),R=e(R),y=t(y,b),R=t(R,b),v.forEach((e,t)=>{const r=`${b}<GPT_CITATION_ID>${t}`;l.push(n(e,r))}),c.push({id:b,reason:y,reasonSource:(null===(_=null==S?void 0:S[1])||void 0===_?void 0:_.trim())||"",gap:R,gapSource:(null===(m=null==O?void 0:O[1])||void 0===m?void 0:m.trim())||"",relevance_score:Number(null===($=null==T?void 0:T[1])||void 0===$?void 0:$.trim())||0,on_demand:x});return`<a ${s?'table="true"':""} href=${a}ai_reasoning$${b}${d||""}${p}>Source</a>`});a=d(r),s&&(u=d(s))}catch(e){console.error("Error in extracting AI Reasoning from this block:",r)}finally{return{outputText:a,reasonings:c,gpt_citation:l,processedDescription:u}}},exports.processUserStoryValue=(e,t,n)=>{let r=e.includes("<h1><b>Title</b></h1>\n\n")?e:n?`<h1><b>Title</b></h1>\n\n${n} \n${e}`:e;return r=r.includes("<h1><b>Requirement Type</b></h1>\n\n")?r:t?`<h1><b>Requirement Type</b></h1>\n\n${t} \n${r}`:r,r},exports.replaceGptCitation=t;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});function e(e,t){if(!e)return e;let n="",r=0;for(;;){const o=e.indexOf("<gpt_citation_here ",r);if(-1===o){n+=e.slice(r);break}n+=e.slice(r,o);const i=e.indexOf(">",o);if(-1===i){n+=e.slice(o);break}const s=e.slice(o,i+1),c=s.indexOf("id=");let a="";if(-1!==c){let e=c+3;for("\\"===s[e]&&e++,'"'!==s[e]&&"'"!==s[e]||e++;e<s.length&&/\d/.test(s[e]);)a+=s[e++]}if(a){n+=`<a href="gpt_citation$${`${t}<GPT_CITATION_ID>${a}`}">Source</a>`}r=i+1}return n}function t(e,t){const n=t=>{const n=new RegExp(`<${t}>([\\s\\S]*?)<\\/${t}>`,"gi"),r=[];let o;for(;null!==(o=n.exec(e));)r.push(o[1].trim());return r},r=n("domain"),o=n("paraphrase");return{citation_number:t,customMetadata:{type:"gpt_citation",data_sources:n("data_sources"),training_data_title:r,paraphrase:o}}}exports.extractBlockStreams=e=>{const t=[];try{const n="<BLOCK_STREAM_START>",r="<BLOCK_STREAM_END>";let o=0;for(;;){const i=e.indexOf(n,o);if(-1===i)break;const s=e.indexOf(r,i+n.length);if(-1===s)break;const c=e.slice(i+n.length,s).trim();t.push(JSON.parse(c)),o=s+r.length}}catch(e){console.error("Error in extracting blocks from stream",e)}finally{return t}},exports.extractDescription=function(e){try{const t=/<h2>\s*(?:<b>)?Description(?:<\/b>)?\s*<\/h2>\s*([\s\S]*?)(?=\s*<h2>|$)/i,n=e.match(t);if(n)return n[1].trim()}catch(e){}return null},exports.parseGptCitation=t,exports.processAIReasoningFromBlocks=function(n,r,o,i){const s=[];let c="";const a=[];let l="";console.log("RAW INPUT",JSON.stringify(n),JSON.stringify(i));try{const u=n=>n.replace(/<a\s+(?:(table="true")\s+)?href=(\\"|")ai_reasoning\$(\d+)(\\"|")>([\s\S]*?)<\/a>/g,(n,i,c,l,u,p)=>{var f,d,h,g,_;const b=`${l}<BLOCK_NUMBER>${r}<STORY_NUMBER>${o}`,m=function(e){const t=new Map,n="<gpt_citation ",r="</gpt_citation>";let o=0;for(;;){const i=e.indexOf(n,o);if(-1===i)break;const s=e.indexOf(">",i);if(-1===s)break;const c=e.indexOf(r,s);if(-1===c)break;const a=e.slice(i,c+r.length),l=e.slice(i,s+1),u=l.indexOf("id=");if(-1!==u){let e=u+3;"\\"===l[e]&&e++,'"'!==l[e]&&"'"!==l[e]||e++;let n="";for(;e<l.length&&/\d/.test(l[e]);)n+=l[e++];n&&t.set(n,a)}o=c+r.length}return t}(p);console.log("RAW INPUT",m);const x=p.match(/<reason(?:\s+source="([^"]*)")?>([\s\S]*?)<\/reason>/),$=p.match(/<gap(?:\s+source="([^"]*)")?>([\s\S]*?)<\/gap>/),v=p.match(/<relevance_score>([\s\S]*?)<\/relevance_score>/);let O=(null===(f=null==x?void 0:x[2])||void 0===f?void 0:f.trim())||"",S=(null===(d=null==$?void 0:$[2])||void 0===d?void 0:d.trim())||"";O=e(O,b),S=e(S,b),m.forEach((e,n)=>{const r=`${b}<GPT_CITATION_ID>${n}`;a.push(t(e,r))}),s.push({id:b,reason:O,reasonSource:(null===(h=null==x?void 0:x[1])||void 0===h?void 0:h.trim())||"",gap:S,gapSource:(null===(g=null==$?void 0:$[1])||void 0===g?void 0:g.trim())||"",relevance_score:Number(null===(_=null==v?void 0:v[1])||void 0===_?void 0:_.trim())||0});return`<a ${i?'table="true"':""} href=${c}ai_reasoning$${b}${u}>Source</a>`});c=u(n),i&&(l=u(i))}catch(e){console.error("Error in extracting AI Reasoning from this block:",n)}finally{return{outputText:c,reasonings:s,gpt_citation:a,processedDescription:l}}},exports.processUserStoryValue=(e,t,n)=>{let r=e.includes("<h1><b>Title</b></h1>\n\n")?e:n?`<h1><b>Title</b></h1>\n\n${n} \n${e}`:e;return r=r.includes("<h1><b>Requirement Type</b></h1>\n\n")?r:t?`<h1><b>Requirement Type</b></h1>\n\n${t} \n${r}`:r,r},exports.replaceGptCitation=e;
2
2
  //# sourceMappingURL=proccess-stream.utils.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@mui/icons-material/ChevronRight"),r=require("@mui/icons-material/Close"),o=require("@mui/icons-material/ExpandMore"),a=require("@mui/material/Box"),s=require("@mui/material/Button"),l=require("@mui/material/ButtonBase"),d=require("@mui/material/Divider"),u=require("@mui/material/IconButton"),c=require("@mui/material/Paper"),x=require("@mui/material/Radio"),p=require("@mui/material/Stack"),g=require("@mui/material/TextField"),f=require("@mui/material/Typography"),m=require("./CognitiveIcon.js"),h=require("./CognitiveScoreBadge.js"),b=require("../../assests/icons/InfoAlert.js");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E,v=_(n),C=_(r),y=_(o),j=_(a),F=_(s),w=_(l),A=_(d),S=_(u),R=_(c),M=_(x),I=_(p),B=_(g),k=_(f),z=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)},T="MERGE_ADJACENT";exports.BoundaryReviewActionEnum=void 0,(E=exports.BoundaryReviewActionEnum||(exports.BoundaryReviewActionEnum={})).KEEP="KEEP",E.SPLIT_HERE="SPLIT_HERE",E.MERGE_NEXT="MERGE_NEXT",E.MERGE_PREV="MERGE_PREV",E.MERGE_PREVIOUS="MERGE_PREVIOUS",E.SET_RANGE="SET_RANGE";var W=function(e){return Object.values(exports.BoundaryReviewActionEnum).includes(e)},P=function(i,t,n,r){if(!t||!i)return[];var o=t.additional_decisions,a=Array.isArray(o)?o:o?Object.values(o).flat():[],s=Array.from(new Set(e.__spreadArray(e.__spreadArray([],t.allowed_decisions,!0),a,!0)));return s.flatMap(function(e){var t=i.focus_page,o=s.find(function(e){return e.toLowerCase().includes("merge")}),a=null!=t&&null!=n&&null!=r&&t===n&&t===r,l=null!=t&&null!=n&&t===n,d=null!=t&&null!=r&&(t===r||t===r+1),u=l||d||!(null!=t&&(!(null!=n&&null!=r)||t>n&&t<r));switch(e){case exports.BoundaryReviewActionEnum.SET_RANGE:return[];case"KEEP":return[{id:e,title:"Keep as is",description:"Keep the current document boundary unchanged."}];case"SPLIT_HERE":return[{id:e,title:"Split to a separate document",description:u?"A valid page inside the document is required to split it.":t?"Start a new document at page ".concat(t,"."):"Create a new document at this boundary.",disabled:u}];case"MERGE_PREV":case"MERGE_NEXT":case"MERGE_PREVIOUS":return e!==o?[]:a?[{id:T,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]:l?[{id:exports.BoundaryReviewActionEnum.MERGE_PREVIOUS,title:"Merge with previous document",description:"Combine this document with the previous document."}]:d?[{id:exports.BoundaryReviewActionEnum.MERGE_NEXT,title:"Merge with next document",description:"Combine this document with the next document."}]:[{id:T,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]}return[]})};exports.createBoundaryCardOptions=P,exports.default=function(n){var r=n.headerName,o=void 0===r?"Boundary Check":r,a=n.title,s=n.pageNo,l=n.content,d=n.cognitiveScore,u=n.config,c=n.metadata,x=n.previousSegmentTitle,p=n.nextSegmentTitle,g=n.selectedIndex,f=n.defaultSelectedIndex,_=void 0===f?null:f,E=n.defaultStartPage,G=n.defaultEndPage,N=n.onSelectionChange,D=n.onConfirm,q=n.onActionConfirm,H=n.onCognitiveClick,O=n.onAdjustManually,V=n.onClose,U=n.confirmLabel,L=void 0===U?"Confirm":U,X=n.manualPrompt,K=void 0===X?"Didn't find the right option?":X,J=n.manualActionLabel,Y=void 0===J?"Adjust Manually":J,Q=n.cognitiveLabel,Z=void 0===Q?"Cognitive Integrity":Q,$=n.showAdjustManually,ee=void 0===$||$,ie=n.showCognitiveIntegrity,te=void 0===ie||ie,ne=n.showCloseButton,re=void 0===ne||ne,oe=n.confirmDisabled,ae=void 0!==oe&&oe,se=n.width,le=void 0===se?260:se,de=n.maxWidth,ue=void 0===de?260:de,ce=n.className,xe=n.styles,pe=n.reviewAction,ge=t.useMemo(function(){return(null!=u?u:c?P(c,pe,E,G):[]).filter(function(e){return e.id!==exports.BoundaryReviewActionEnum.SET_RANGE})},[u,G,E,c,pe]),fe=t.useState(_),me=fe[0],he=fe[1],be=t.useState(null==E?"":String(E)),_e=be[0],Ee=be[1],ve=t.useState(null==G?"":String(G)),Ce=ve[0],ye=ve[1],je=t.useState(!1),Fe=je[0],we=je[1],Ae=t.useState(!1),Se=Ae[0],Re=Ae[1],Me=t.useState(null),Ie=Me[0],Be=Me[1],ke=void 0===g?me:g,ze=null==ke?void 0:ge[ke],Te=(null==ze?void 0:ze.id)===T,We=null!=x,Pe=null!=p,Ge=function(e){return!0===e.disabled||e.id===exports.BoundaryReviewActionEnum.MERGE_PREV&&!We||e.id===exports.BoundaryReviewActionEnum.MERGE_PREVIOUS&&!We||e.id===exports.BoundaryReviewActionEnum.MERGE_NEXT&&!Pe||e.id===T&&!We&&!Pe},Ne=Number(_e),De=Number(Ce),qe=_e.trim().length>0&&Ce.trim().length>0&&Number.isInteger(Ne)&&Number.isInteger(De)&&Ne>0&&De>0&&Ne<=De,He=ae||!ze||Ge(ze)||Te&&null==Ie||!D&&!q;return i.jsx(R.default,e.__assign({className:ce,elevation:4,sx:z({width:le,maxWidth:ue,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==xe?void 0:xe.root)},{children:i.jsxs(I.default,e.__assign({spacing:.75,sx:{p:1}},{children:[i.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==xe?void 0:xe.header},{children:[i.jsx(b.default,{color:"error",height:16,width:16}),i.jsx(k.default,e.__assign({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:o})),re&&i.jsx(S.default,e.__assign({size:"small",onClick:V,disabled:!V,"aria-label":"Close boundary check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(C.default,{sx:{fontSize:17}})}))]})),i.jsxs(j.default,{children:[i.jsx(k.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:a})),null!=s&&i.jsx(k.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:s})),i.jsx(A.default,{sx:{my:.625}}),null!=l&&i.jsx(k.default,e.__assign({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:l}))]}),i.jsxs(I.default,e.__assign({spacing:.625,role:"radiogroup","aria-label":"Boundary options"},{children:[ge.map(function(t,n){var r=ke===n,o=Ge(t);return i.jsxs(R.default,e.__assign({variant:"outlined",sx:z({borderColor:r?"#1976d2":"divider",borderRadius:2,bgcolor:o?"#F8FAFC":"background.paper",overflow:"hidden"},null==xe?void 0:xe.option)},{children:[i.jsxs(w.default,e.__assign({role:"radio","aria-checked":r,disabled:ae||o,onClick:function(){return function(e,i){ae||Ge(i)||(void 0===g&&he(e),i.id!==T&&Be(null),Fe&&(we(!1),Re(!1)),null==N||N(e,i))}(n,t)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[i.jsx(M.default,{checked:r,disabled:ae||o,tabIndex:-1,size:"small",sx:{p:.25,mr:.5,"&.Mui-disabled":{color:"#CBD5E1"}}}),i.jsxs(j.default,e.__assign({sx:{minWidth:0}},{children:[i.jsx(k.default,e.__assign({sx:{color:o?"#94A3B8":"text.primary",fontSize:12.5,fontWeight:500}},{children:t.title})),null!=t.description&&i.jsx(k.default,e.__assign({sx:{mt:.125,color:o?"#94A3B8":"text.secondary",fontSize:11}},{children:t.description}))]}))]})),r&&t.id===T&&i.jsx(I.default,e.__assign({direction:"row",spacing:.75,sx:z({px:.75,pb:.75},null==xe?void 0:xe.adjacentSelector)},{children:[{direction:"previous",title:null!=x?x:"No Previous document",caption:"← Merge into Previous",available:We},{direction:"next",title:null!=p?p:"No Next document",caption:"Merge into Next →",available:Pe}].map(function(t){var n=Ie===t.direction;return i.jsxs(I.default,e.__assign({sx:{flex:1,minWidth:0}},{children:[i.jsx(w.default,e.__assign({disabled:ae||!t.available,onClick:function(){return Be(t.direction)},"aria-pressed":n,sx:{width:"100%",minWidth:0,minHeight:46,alignItems:"flex-start",justifyContent:"flex-start",p:.625,border:"1px solid",borderColor:n?"#7F56D9":"#D0D5DD",borderRadius:1.5,bgcolor:n?"#E0E7FF":"background.paper",color:n?"#7F56D9":t.available?"text.primary":"#98A2B3",textAlign:"left","&.Mui-disabled":{color:"#98A2B3",bgcolor:"#F8FAFC"}}},{children:i.jsx(k.default,e.__assign({sx:{color:"inherit",fontSize:11,fontWeight:500,lineHeight:1.25,overflowWrap:"anywhere"}},{children:t.title}))})),i.jsx(k.default,e.__assign({sx:{mt:.5,color:n?"#5925DC":"text.secondary",fontSize:9.5,lineHeight:1.2,whiteSpace:"nowrap",textAlign:"next"===t.direction?"right":"left"}},{children:t.caption}))]}),t.direction)})}))]}),t.id)}),Te&&null!=Ie&&i.jsxs(I.default,e.__assign({direction:"row",alignItems:"flex-start",spacing:.625,sx:z({p:.75,border:"1px solid #FCA5A5",borderRadius:1.5,bgcolor:"#FEF2F2"},null==xe?void 0:xe.impactWarning)},{children:[i.jsx(b.default,{color:"error",height:14,width:14,sx:{mt:.125}}),i.jsxs(k.default,e.__assign({sx:{color:"#DC2626",fontSize:10.5,lineHeight:1.4}},{children:["This will impact the ",Ie," document. Its content and page range will change."]}))]})),i.jsx(F.default,e.__assign({variant:"contained",fullWidth:!0,disabled:He,onClick:function(){if(!He&&null!=ke&&ze){var i=Te?"previous"===Ie?exports.BoundaryReviewActionEnum.MERGE_PREVIOUS:exports.BoundaryReviewActionEnum.MERGE_NEXT:ze.id,t=Te?e.__assign(e.__assign({},ze),{id:i}):ze,n={selectedIndex:ke,option:t,metadata:c};null==D||D(ke,t,n),q&&W(i)&&q(i,n)}},sx:z({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==xe?void 0:xe.confirmButton)},{children:L}))]})),ee&&i.jsxs(I.default,e.__assign({spacing:.625,sx:null==xe?void 0:xe.manualSection},{children:[i.jsxs(w.default,e.__assign({disabled:ae,onClick:function(){var e=!Fe;we(e),Re(!1),e&&(void 0===g&&he(null),null==O||O())},"aria-expanded":Fe,sx:{width:"100%",justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[i.jsxs(j.default,{children:[i.jsx(k.default,e.__assign({sx:{color:"text.primary",fontSize:11}},{children:K})),i.jsx(k.default,e.__assign({sx:{mt:.125,color:"text.primary",fontSize:11}},{children:Y}))]}),i.jsx(y.default,{sx:{color:"text.secondary",fontSize:16,transform:Fe?"rotate(180deg)":"none",transition:"transform 150ms ease"}})]})),Fe&&!Se&&i.jsxs(j.default,e.__assign({sx:{pt:.5,fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif'}},{children:[i.jsxs(j.default,e.__assign({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[i.jsx(k.default,e.__assign({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Starts"})),i.jsx(k.default,e.__assign({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Ends"}))]})),i.jsxs(j.default,e.__assign({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[i.jsx(B.default,{size:"small",type:"number",value:_e,disabled:ae,onChange:function(e){return Ee(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"},"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}},onWheel:function(e){return e.currentTarget.blur()}}),i.jsx(B.default,{size:"small",type:"number",value:Ce,disabled:ae,error:_e.trim().length>0&&Ce.trim().length>0&&Ne>De,onChange:function(e){return ye(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"},"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}},onWheel:function(e){return e.currentTarget.blur()}})]})),i.jsx(j.default,{children:i.jsx(F.default,e.__assign({onClick:function(){qe&&Re(!0)},disabled:ae||!qe,sx:{height:"30px",padding:"0 12px",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",backgroundColor:"#FFFFFF",border:"1px solid #8E80F3",borderRadius:"6px",fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif',fontSize:"12px",fontWeight:600,lineHeight:"1",color:"#4A24CF",outline:"none",cursor:"pointer",textTransform:"none",transition:"all 150ms ease-in-out","&:hover":qe?{backgroundColor:"#FAF9FF",borderColor:"#7F6FF0"}:{},"&:active":qe?{transform:"translateY(1px)"}:{},"&.Mui-disabled":{backgroundColor:"#FFFFFF",borderColor:"#C3CFDC",color:"#A0ABBE",cursor:"not-allowed"}}},{children:"Apply"}))}),i.jsx(j.default,{sx:{width:"100%",height:"1px",marginTop:"8px",backgroundColor:"#EEF0F2",border:"0"}})]})),Fe&&Se&&i.jsxs(I.default,e.__assign({spacing:.75,sx:z({p:.75,borderRadius:1.5,bgcolor:"#FFF7ED"},null==xe?void 0:xe.manualConfirmation)},{children:[i.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:.5},{children:[i.jsx(b.default,{color:"warning",height:14,width:14}),i.jsx(k.default,e.__assign({sx:{color:"#EA580C",fontSize:11,fontWeight:600}},{children:"Confirm this change?"}))]})),i.jsxs(k.default,e.__assign({sx:{color:"text.secondary",fontSize:10.5,lineHeight:1.4}},{children:["Pages ",Ne,"-",De," will become part of ",a,", including pages from other documents in this range."]})),i.jsxs(I.default,e.__assign({direction:"row",spacing:.75},{children:[i.jsx(F.default,e.__assign({variant:"outlined",fullWidth:!0,onClick:function(){return Re(!1)},sx:{minHeight:28,borderRadius:1.5,fontSize:11,textTransform:"none"}},{children:"Cancel"})),i.jsx(F.default,e.__assign({variant:"contained",fullWidth:!0,disabled:ae||!D,onClick:function(){if(qe&&D){var e={id:exports.BoundaryReviewActionEnum.SET_RANGE,title:Y};D(-1,e,{selectedIndex:-1,option:e,startPage:Ne,endPage:De,metadata:c})}},sx:{minHeight:28,borderRadius:1.5,bgcolor:"#EA580C",fontSize:11,textTransform:"none","&:hover":{bgcolor:"#C2410C"}}},{children:"Confirm"}))]}))]}))]})),i.jsx(I.default,e.__assign({spacing:.625,sx:null==xe?void 0:xe.footer},{children:te&&i.jsxs(i.Fragment,{children:[i.jsx(A.default,{}),i.jsxs(w.default,e.__assign({onClick:H,disabled:!H,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:H?"pointer":"not-allowed"}},{children:[i.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:1},{children:[i.jsx(m.default,{sx:{color:"text.secondary"}}),i.jsx(k.default,e.__assign({sx:{color:"text.primary",fontSize:12}},{children:Z}))]})),i.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:.5},{children:[i.jsx(h.default,{score:d}),i.jsx(v.default,{sx:{color:"text.secondary"}})]}))]}))]})}))]}))}))},exports.isBoundaryReviewAction=W;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@mui/icons-material/ChevronRight"),r=require("@mui/icons-material/Close"),o=require("@mui/icons-material/ExpandMore"),a=require("@mui/material/Box"),s=require("@mui/material/Button"),l=require("@mui/material/ButtonBase"),d=require("@mui/material/Divider"),u=require("@mui/material/IconButton"),c=require("@mui/material/Paper"),x=require("@mui/material/Radio"),p=require("@mui/material/Stack"),g=require("@mui/material/TextField"),f=require("@mui/material/Typography"),m=require("./RevertSummaryNotice.js"),h=require("./CognitiveIcon.js"),b=require("./CognitiveScoreBadge.js"),_=require("../../assests/icons/InfoAlert.js");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v,C=E(n),y=E(r),j=E(o),F=E(a),w=E(s),S=E(l),A=E(d),R=E(u),M=E(c),I=E(x),B=E(p),k=E(g),z=E(f),T=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)},W="MERGE_ADJACENT";exports.BoundaryReviewActionEnum=void 0,(v=exports.BoundaryReviewActionEnum||(exports.BoundaryReviewActionEnum={})).KEEP="KEEP",v.SPLIT_HERE="SPLIT_HERE",v.MERGE_NEXT="MERGE_NEXT",v.MERGE_PREV="MERGE_PREV",v.MERGE_PREVIOUS="MERGE_PREVIOUS",v.SET_RANGE="SET_RANGE";var P=function(e){return Object.values(exports.BoundaryReviewActionEnum).includes(e)},N=function(i,t,n,r){if(!t||!i)return[];var o=t.additional_decisions,a=Array.isArray(o)?o:o?Object.values(o).flat():[],s=Array.from(new Set(e.__spreadArray(e.__spreadArray([],t.allowed_decisions,!0),a,!0)));return s.flatMap(function(e){var t=i.focus_page,o=s.find(function(e){return e.toLowerCase().includes("merge")}),a=null!=t&&null!=n&&null!=r&&t===n&&t===r,l=null!=t&&null!=n&&t===n,d=null!=t&&null!=r&&(t===r||t===r+1),u=l||d||!(null!=t&&(!(null!=n&&null!=r)||t>n&&t<r));switch(e){case exports.BoundaryReviewActionEnum.SET_RANGE:return[];case"KEEP":return[{id:e,title:"Keep as is",description:"Keep the current document boundary unchanged."}];case"SPLIT_HERE":return[{id:e,title:"Split to a separate document",description:u?"A valid page inside the document is required to split it.":t?"Start a new document at page ".concat(t,"."):"Create a new document at this boundary.",disabled:u}];case"MERGE_PREV":case"MERGE_NEXT":case"MERGE_PREVIOUS":return e!==o?[]:a?[{id:W,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]:l?[{id:exports.BoundaryReviewActionEnum.MERGE_PREVIOUS,title:"Merge with previous document",description:"Combine this document with the previous document."}]:d?[{id:exports.BoundaryReviewActionEnum.MERGE_NEXT,title:"Merge with next document",description:"Combine this document with the next document."}]:[{id:W,title:"Merge with an adjacent document",description:"Choose to merge with the previous or next document."}]}return[]})};exports.createBoundaryCardOptions=N,exports.default=function(n){var r=n.headerName,o=void 0===r?"Boundary Check":r,a=n.title,s=n.pageNo,l=n.content,d=n.revertSummary,u=n.cognitiveScore,c=n.config,x=n.metadata,p=n.previousSegmentTitle,g=n.nextSegmentTitle,f=n.selectedIndex,E=n.defaultSelectedIndex,v=void 0===E?null:E,G=n.defaultStartPage,D=n.defaultEndPage,q=n.onSelectionChange,H=n.onConfirm,O=n.onActionConfirm,V=n.onCognitiveClick,U=n.onAdjustManually,L=n.onClose,X=n.confirmLabel,K=void 0===X?"Confirm":X,J=n.manualPrompt,Y=void 0===J?"Didn't find the right option?":J,Q=n.manualActionLabel,Z=void 0===Q?"Adjust Manually":Q,$=n.cognitiveLabel,ee=void 0===$?"Cognitive Integrity":$,ie=n.showAdjustManually,te=void 0===ie||ie,ne=n.showCognitiveIntegrity,re=void 0===ne||ne,oe=n.showCloseButton,ae=void 0===oe||oe,se=n.confirmDisabled,le=void 0!==se&&se,de=n.width,ue=void 0===de?260:de,ce=n.maxWidth,xe=void 0===ce?260:ce,pe=n.className,ge=n.styles,fe=n.reviewAction,me=t.useMemo(function(){return(null!=c?c:x?N(x,fe,G,D):[]).filter(function(e){return e.id!==exports.BoundaryReviewActionEnum.SET_RANGE})},[c,D,G,x,fe]),he=t.useState(v),be=he[0],_e=he[1],Ee=t.useState(null==G?"":String(G)),ve=Ee[0],Ce=Ee[1],ye=t.useState(null==D?"":String(D)),je=ye[0],Fe=ye[1],we=t.useState(!1),Se=we[0],Ae=we[1],Re=t.useState(!1),Me=Re[0],Ie=Re[1],Be=t.useState(null),ke=Be[0],ze=Be[1],Te=void 0===f?be:f,We=null==Te?void 0:me[Te],Pe=(null==We?void 0:We.id)===W,Ne=null!=p,Ge=null!=g,De=function(e){return!0===e.disabled||e.id===exports.BoundaryReviewActionEnum.MERGE_PREV&&!Ne||e.id===exports.BoundaryReviewActionEnum.MERGE_PREVIOUS&&!Ne||e.id===exports.BoundaryReviewActionEnum.MERGE_NEXT&&!Ge||e.id===W&&!Ne&&!Ge},qe=Number(ve),He=Number(je),Oe=ve.trim().length>0&&je.trim().length>0&&Number.isInteger(qe)&&Number.isInteger(He)&&qe>0&&He>0&&qe<=He,Ve=le||!We||De(We)||Pe&&null==ke||!H&&!O;return i.jsx(M.default,e.__assign({className:pe,elevation:4,sx:T({width:ue,maxWidth:xe,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==ge?void 0:ge.root)},{children:i.jsxs(B.default,e.__assign({spacing:.75,sx:{p:1}},{children:[i.jsxs(B.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==ge?void 0:ge.header},{children:[i.jsx(_.default,{color:"error",height:16,width:16}),i.jsx(z.default,e.__assign({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:o})),ae&&i.jsx(R.default,e.__assign({size:"small",onClick:L,disabled:!L,"aria-label":"Close boundary check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(y.default,{sx:{fontSize:17}})}))]})),i.jsxs(F.default,{children:[i.jsx(z.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:a})),null!=s&&i.jsx(z.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:s})),i.jsx(A.default,{sx:{my:.625}}),null!=d?i.jsx(m.default,{children:d}):null!=l&&i.jsx(z.default,e.__assign({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:l}))]}),i.jsxs(B.default,e.__assign({spacing:.625,role:"radiogroup","aria-label":"Boundary options"},{children:[me.map(function(t,n){var r=Te===n,o=De(t);return i.jsxs(M.default,e.__assign({variant:"outlined",sx:T({borderColor:r?"#1976d2":"divider",borderRadius:2,bgcolor:o?"#F8FAFC":"background.paper",overflow:"hidden"},null==ge?void 0:ge.option)},{children:[i.jsxs(S.default,e.__assign({role:"radio","aria-checked":r,disabled:le||o,onClick:function(){return function(e,i){le||De(i)||(void 0===f&&_e(e),i.id!==W&&ze(null),Se&&(Ae(!1),Ie(!1)),null==q||q(e,i))}(n,t)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[i.jsx(I.default,{checked:r,disabled:le||o,tabIndex:-1,size:"small",sx:{p:.25,mr:.5,"&.Mui-disabled":{color:"#CBD5E1"}}}),i.jsxs(F.default,e.__assign({sx:{minWidth:0}},{children:[i.jsx(z.default,e.__assign({sx:{color:o?"#94A3B8":"text.primary",fontSize:12.5,fontWeight:500}},{children:t.title})),null!=t.description&&i.jsx(z.default,e.__assign({sx:{mt:.125,color:o?"#94A3B8":"text.secondary",fontSize:11}},{children:t.description}))]}))]})),r&&t.id===W&&i.jsx(B.default,e.__assign({direction:"row",spacing:.75,sx:T({px:.75,pb:.75},null==ge?void 0:ge.adjacentSelector)},{children:[{direction:"previous",title:null!=p?p:"No Previous document",caption:"← Merge into Previous",available:Ne},{direction:"next",title:null!=g?g:"No Next document",caption:"Merge into Next →",available:Ge}].map(function(t){var n=ke===t.direction;return i.jsxs(B.default,e.__assign({sx:{flex:1,minWidth:0}},{children:[i.jsx(S.default,e.__assign({disabled:le||!t.available,onClick:function(){return ze(t.direction)},"aria-pressed":n,sx:{width:"100%",minWidth:0,minHeight:46,alignItems:"flex-start",justifyContent:"flex-start",p:.625,border:"1px solid",borderColor:n?"#7F56D9":"#D0D5DD",borderRadius:1.5,bgcolor:n?"#E0E7FF":"background.paper",color:n?"#7F56D9":t.available?"text.primary":"#98A2B3",textAlign:"left","&.Mui-disabled":{color:"#98A2B3",bgcolor:"#F8FAFC"}}},{children:i.jsx(z.default,e.__assign({sx:{color:"inherit",fontSize:11,fontWeight:500,lineHeight:1.25,overflowWrap:"anywhere"}},{children:t.title}))})),i.jsx(z.default,e.__assign({sx:{mt:.5,color:n?"#5925DC":"text.secondary",fontSize:9.5,lineHeight:1.2,whiteSpace:"nowrap",textAlign:"next"===t.direction?"right":"left"}},{children:t.caption}))]}),t.direction)})}))]}),t.id)}),Pe&&null!=ke&&i.jsxs(B.default,e.__assign({direction:"row",alignItems:"flex-start",spacing:.625,sx:T({p:.75,border:"1px solid #FCA5A5",borderRadius:1.5,bgcolor:"#FEF2F2"},null==ge?void 0:ge.impactWarning)},{children:[i.jsx(_.default,{color:"error",height:14,width:14,sx:{mt:.125}}),i.jsxs(z.default,e.__assign({sx:{color:"#DC2626",fontSize:10.5,lineHeight:1.4}},{children:["This will impact the ",ke," document. Its content and page range will change."]}))]})),i.jsx(w.default,e.__assign({variant:"contained",fullWidth:!0,disabled:Ve,onClick:function(){if(!Ve&&null!=Te&&We){var i=Pe?"previous"===ke?exports.BoundaryReviewActionEnum.MERGE_PREVIOUS:exports.BoundaryReviewActionEnum.MERGE_NEXT:We.id,t=Pe?e.__assign(e.__assign({},We),{id:i}):We,n={selectedIndex:Te,option:t,metadata:x};null==H||H(Te,t,n),O&&P(i)&&O(i,n)}},sx:T({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==ge?void 0:ge.confirmButton)},{children:K}))]})),te&&i.jsxs(B.default,e.__assign({spacing:.625,sx:null==ge?void 0:ge.manualSection},{children:[i.jsxs(S.default,e.__assign({disabled:le,onClick:function(){var e=!Se;Ae(e),Ie(!1),e&&(void 0===f&&_e(null),null==U||U())},"aria-expanded":Se,sx:{width:"100%",justifyContent:"space-between",borderRadius:1,textAlign:"left"}},{children:[i.jsxs(F.default,{children:[i.jsx(z.default,e.__assign({sx:{color:"text.primary",fontSize:11}},{children:Y})),i.jsx(z.default,e.__assign({sx:{mt:.125,color:"text.primary",fontSize:11}},{children:Z}))]}),i.jsx(j.default,{sx:{color:"text.secondary",fontSize:16,transform:Se?"rotate(180deg)":"none",transition:"transform 150ms ease"}})]})),Se&&!Me&&i.jsxs(F.default,e.__assign({sx:{pt:.5,fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif'}},{children:[i.jsxs(F.default,e.__assign({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[i.jsx(z.default,e.__assign({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Starts"})),i.jsx(z.default,e.__assign({sx:{fontSize:"10.5px",fontWeight:400,lineHeight:"14px",color:"#57697E",margin:0}},{children:"Ends"}))]})),i.jsxs(F.default,e.__assign({sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"8px",mb:"4px"}},{children:[i.jsx(k.default,{size:"small",type:"number",value:ve,disabled:le,onChange:function(e){return Ce(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"},"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}},onWheel:function(e){return e.currentTarget.blur()}}),i.jsx(k.default,{size:"small",type:"number",value:je,disabled:le,error:ve.trim().length>0&&je.trim().length>0&&qe>He,onChange:function(e){return Fe(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:{"& .MuiOutlinedInput-root":{height:"30px",backgroundColor:"#FFFFFF","& fieldset":{borderColor:"#C3CFDC",borderWidth:"1px",borderRadius:"6px"},"&:hover fieldset":{borderColor:"#C3CFDC"},"&.Mui-focused fieldset":{borderColor:"#9488F6",borderWidth:"1px"}},"& .MuiOutlinedInput-input":{fontSize:"12px",fontWeight:400,lineHeight:"1",color:"#34445A",padding:"0 10px",height:"30px"},"& input[type=number]":{MozAppearance:"textfield"},"& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0}},onWheel:function(e){return e.currentTarget.blur()}})]})),i.jsx(F.default,{children:i.jsx(w.default,e.__assign({onClick:function(){Oe&&Ie(!0)},disabled:le||!Oe,sx:{height:"30px",padding:"0 12px",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",backgroundColor:"#FFFFFF",border:"1px solid #8E80F3",borderRadius:"6px",fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif',fontSize:"12px",fontWeight:600,lineHeight:"1",color:"#4A24CF",outline:"none",cursor:"pointer",textTransform:"none",transition:"all 150ms ease-in-out","&:hover":Oe?{backgroundColor:"#FAF9FF",borderColor:"#7F6FF0"}:{},"&:active":Oe?{transform:"translateY(1px)"}:{},"&.Mui-disabled":{backgroundColor:"#FFFFFF",borderColor:"#C3CFDC",color:"#A0ABBE",cursor:"not-allowed"}}},{children:"Apply"}))}),i.jsx(F.default,{sx:{width:"100%",height:"1px",marginTop:"8px",backgroundColor:"#EEF0F2",border:"0"}})]})),Se&&Me&&i.jsxs(B.default,e.__assign({spacing:.75,sx:T({p:.75,borderRadius:1.5,bgcolor:"#FFF7ED"},null==ge?void 0:ge.manualConfirmation)},{children:[i.jsxs(B.default,e.__assign({direction:"row",alignItems:"center",spacing:.5},{children:[i.jsx(_.default,{color:"warning",height:14,width:14}),i.jsx(z.default,e.__assign({sx:{color:"#EA580C",fontSize:11,fontWeight:600}},{children:"Confirm this change?"}))]})),i.jsxs(z.default,e.__assign({sx:{color:"text.secondary",fontSize:10.5,lineHeight:1.4}},{children:["Pages ",qe,"-",He," will become part of ",a,", including pages from other documents in this range."]})),i.jsxs(B.default,e.__assign({direction:"row",spacing:.75},{children:[i.jsx(w.default,e.__assign({variant:"outlined",fullWidth:!0,onClick:function(){return Ie(!1)},sx:{minHeight:28,borderRadius:1.5,fontSize:11,textTransform:"none"}},{children:"Cancel"})),i.jsx(w.default,e.__assign({variant:"contained",fullWidth:!0,disabled:le||!H,onClick:function(){if(Oe&&H){var e={id:exports.BoundaryReviewActionEnum.SET_RANGE,title:Z};H(-1,e,{selectedIndex:-1,option:e,startPage:qe,endPage:He,metadata:x})}},sx:{minHeight:28,borderRadius:1.5,bgcolor:"#EA580C",fontSize:11,textTransform:"none","&:hover":{bgcolor:"#C2410C"}}},{children:"Confirm"}))]}))]}))]})),i.jsx(B.default,e.__assign({spacing:.625,sx:null==ge?void 0:ge.footer},{children:re&&i.jsxs(i.Fragment,{children:[i.jsx(A.default,{}),i.jsxs(S.default,e.__assign({onClick:V,disabled:!V,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:V?"pointer":"not-allowed"}},{children:[i.jsxs(B.default,e.__assign({direction:"row",alignItems:"center",spacing:1},{children:[i.jsx(h.default,{sx:{color:"text.secondary"}}),i.jsx(z.default,e.__assign({sx:{color:"text.primary",fontSize:12}},{children:ee}))]})),i.jsxs(B.default,e.__assign({direction:"row",alignItems:"center",spacing:.5},{children:[i.jsx(b.default,{score:u}),i.jsx(C.default,{sx:{color:"text.secondary"}})]}))]}))]})}))]}))}))},exports.isBoundaryReviewAction=P;
2
2
  //# sourceMappingURL=BoundaryCard.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime");exports.default=function(t){return r.jsx("svg",e.__assign({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:r.jsx("path",{d:"M8.9375 1.4375V0.5M11.3996 2.10041L12.0625 1.4375M12.0689 4.5625H13.0064M12.9691 7.375C12.6556 10.5333 9.99084 13 6.75 13C3.29822 13 0.5 10.2018 0.5 6.75C0.5 3.50916 2.96667 0.844437 6.125 0.53086M6.75 4.25H9.25V6.75M9.0123 4.25C7.54083 6.32975 5.11648 7.6875 2.375 7.6875C1.74819 7.6875 1.13795 7.61652 0.551889 7.48216",stroke:"#16A34A","stroke-linecap":"round","stroke-linejoin":"round"})}))};
2
+ //# sourceMappingURL=ChartBreakoutCircle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartBreakoutCircle.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("@mui/icons-material/ChevronLeft"),n=require("@mui/icons-material/Close"),a=require("@mui/material/Box"),r=require("@mui/material/Divider"),s=require("@mui/material/IconButton"),l=require("@mui/material/Paper"),o=require("@mui/material/Stack"),u=require("@mui/material/Typography"),d=require("../CitationRenderer/MarkdownRenderer.js"),c=require("./CognitiveIcon.js"),g=require("./CognitiveScoreBadge.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(t),x=m(n),f=m(a),_=m(r),p=m(s),v=m(l),y=m(o),j=m(u),b=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)};exports.default=function(t){var n=t.reasons,a=t.reason,r=t.gap,s=t.score,l=t.headerName,o=void 0===l?"Cognitive Integrity":l,u=t.onBack,m=t.onClose,S=t.showCloseButton,C=void 0===S||S,H=t.width,w=void 0===H?260:H,z=t.maxWidth,q=void 0===z?260:z,k=t.className,W=t.styles,A=(null!=n?n:[]).filter(function(e){return"evidence"===e.type.trim().toLowerCase()}).map(function(e){return e.text.trim()}).filter(Boolean),B=(null!=n?n:[]).filter(function(e){return"gap"===e.type.trim().toLowerCase()}).map(function(e){return e.text.trim()}).filter(Boolean),R=null==a?void 0:a.trim(),I=null==r?void 0:r.trim();if(0===A.length&&R&&A.push(R),0===B.length&&I&&B.push(I),0===A.length&&0===B.length)return null;var M,T=(M=null==W?void 0:W.markdown,e.__assign(e.__assign({},M),{containerWrapper:e.__assign(e.__assign({},null==M?void 0:M.containerWrapper),{display:"block",height:"auto",minHeight:0,maxHeight:"none",flex:"0 0 auto"}),mainCard:e.__assign(e.__assign({},null==M?void 0:M.mainCard),{height:"auto",minHeight:0,maxHeight:"none",flex:"0 0 auto",padding:0,border:"none",borderRadius:0,boxShadow:"none",backgroundColor:"transparent"}),scrollArea:e.__assign({height:"auto",minHeight:0,maxHeight:"none",overflowY:"visible",paddingRight:0,color:"#475467",fontSize:11.5,lineHeight:1.3},null==M?void 0:M.scrollArea),list:e.__assign({margin:"0",padding:"0 0 0 18px",fontSize:"11.5px",lineHeight:"1.3"},null==M?void 0:M.list)})),L=e.__assign(e.__assign({},T),{scrollArea:e.__assign(e.__assign({},T.scrollArea),{fontSize:"inherit",lineHeight:"inherit"}),summary:e.__assign(e.__assign({},T.summary),{display:"inline-flex",padding:0,fontSize:"inherit",lineHeight:"inherit"})}),N={m:0,pl:2.25,listStyleType:"decimal",listStylePosition:"outside",fontSize:11.5,lineHeight:1.3,"& > li":{pl:.25,fontSize:"inherit",lineHeight:"inherit"},"& > li::marker":{fontSize:"1em",fontWeight:"inherit"}};return i.jsx(v.default,e.__assign({className:k,elevation:4,sx:b({width:w,maxWidth:q,height:"fit-content",minHeight:0,alignSelf:"flex-start",flex:"0 0 auto",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==W?void 0:W.root)},{children:i.jsxs(y.default,e.__assign({spacing:.75,sx:{p:1,height:"auto",minHeight:0}},{children:[i.jsxs(y.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==W?void 0:W.header},{children:[u&&i.jsx(p.default,e.__assign({size:"small",onClick:u,"aria-label":"Return to review check",sx:{p:0,color:"#6941C6"}},{children:i.jsx(h.default,{sx:{fontSize:17}})})),i.jsx(c.default,{sx:{color:"#6941C6"}}),i.jsx(j.default,e.__assign({sx:{flex:1,fontSize:12,fontWeight:500,alignItems:"center",display:"flex",lineHeight:1.25,textTransform:"capitalise"}},{children:o})),i.jsx(g.default,{score:s}),C&&i.jsx(p.default,e.__assign({size:"small",onClick:m,disabled:!m,"aria-label":"Close cognitive integrity",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(x.default,{sx:{fontSize:17}})}))]})),i.jsxs(y.default,e.__assign({spacing:.75,sx:b({height:"auto",minHeight:0,flex:"0 0 auto"},null==W?void 0:W.content)},{children:[A.length>0&&i.jsxs(f.default,e.__assign({sx:{marginTop:4}},{children:[i.jsx(j.default,e.__assign({sx:{mt:1,mb:.25,color:"text.primary",fontSize:12,fontWeight:500}},{children:"Decision Making Factors"})),i.jsx(_.default,{sx:{my:.625}}),i.jsx(f.default,e.__assign({component:"ol",sx:N,style:T.list},{children:A.map(function(t,n){return i.jsx(f.default,e.__assign({component:"li",sx:{mb:.5}},{children:i.jsx(d.default,{value:"<summary>".concat(t,"</summary>"),styles:L})}),"evidence-".concat(n))})}))]})),B.length>0&&i.jsxs(f.default,e.__assign({sx:null==W?void 0:W.section},{children:[i.jsx(j.default,e.__assign({sx:{mb:.25,color:"text.primary",fontSize:12,fontWeight:500}},{children:"Gap"})),i.jsx(_.default,{sx:{my:.625}}),i.jsx(f.default,e.__assign({component:"ol",sx:N,style:T.list},{children:B.map(function(t,n){return i.jsx(f.default,e.__assign({component:"li",sx:{mb:.5}},{children:i.jsx(d.default,{value:"<summary>".concat(t,"</summary>"),styles:L})}),"gap-".concat(n))})}))]}))]}))]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("@mui/icons-material/ChevronLeft"),n=require("@mui/icons-material/Close"),a=require("@mui/material/Box"),r=require("@mui/material/Divider"),s=require("@mui/material/IconButton"),l=require("@mui/material/Paper"),o=require("@mui/material/Stack"),u=require("@mui/material/Typography"),d=require("../CitationRenderer/MarkdownRenderer.js"),c=require("./CognitiveIcon.js"),g=require("./CognitiveScoreBadge.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(t),x=m(n),f=m(a),_=m(r),p=m(s),v=m(l),y=m(o),j=m(u),b=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)};exports.default=function(t){var n=t.reasons,a=t.reason,r=t.gap,s=t.score,l=t.headerName,o=void 0===l?"Cognitive Integrity":l,u=t.onBack,m=t.onClose,S=t.showCloseButton,C=void 0===S||S,H=t.width,w=void 0===H?260:H,z=t.maxWidth,q=void 0===z?260:z,k=t.className,W=t.styles,A=(null!=n?n:[]).filter(function(e){return"evidence"===e.type.trim().toLowerCase()}).map(function(e){return e.text.trim()}).filter(Boolean),B=(null!=n?n:[]).filter(function(e){return"gap"===e.type.trim().toLowerCase()}).map(function(e){return e.text.trim()}).filter(Boolean),R=null==a?void 0:a.trim(),I=null==r?void 0:r.trim();if(0===A.length&&R&&A.push(R),0===B.length&&I&&B.push(I),0===A.length&&0===B.length)return null;var M,T=(M=null==W?void 0:W.markdown,e.__assign(e.__assign({},M),{containerWrapper:e.__assign(e.__assign({},null==M?void 0:M.containerWrapper),{display:"block",height:"auto",minHeight:0,maxHeight:"fit-content",flex:"0 0 auto"}),mainCard:e.__assign(e.__assign({},null==M?void 0:M.mainCard),{height:"auto",minHeight:0,maxHeight:"none",flex:"0 0 auto",padding:0,border:"none",borderRadius:0,boxShadow:"none",backgroundColor:"transparent"}),scrollArea:e.__assign({height:"auto",minHeight:0,maxHeight:"none",overflowY:"visible",paddingRight:0,color:"#475467",fontSize:11.5,lineHeight:1.3},null==M?void 0:M.scrollArea),list:e.__assign({margin:"0",padding:"0 0 0 18px",fontSize:"11.5px",lineHeight:"1.3"},null==M?void 0:M.list)})),L=e.__assign(e.__assign({},T),{scrollArea:e.__assign(e.__assign({},T.scrollArea),{fontSize:"inherit",lineHeight:"inherit"}),summary:e.__assign(e.__assign({},T.summary),{display:"inline-flex",padding:0,fontSize:"inherit",lineHeight:"inherit"})}),N={m:0,pl:2.25,listStyleType:"decimal",listStylePosition:"outside",fontSize:11.5,lineHeight:1.3,"& > li":{pl:.25,fontSize:"inherit",lineHeight:"inherit"},"& > li::marker":{fontSize:"1em",fontWeight:"inherit"}};return i.jsx(v.default,e.__assign({className:k,elevation:4,sx:b({width:w,maxWidth:q,height:"fit-content",minHeight:0,alignSelf:"flex-start",flex:"0 0 auto",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==W?void 0:W.root)},{children:i.jsxs(y.default,e.__assign({spacing:.75,sx:{p:1,height:"auto",minHeight:0}},{children:[i.jsxs(y.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==W?void 0:W.header},{children:[u&&i.jsx(p.default,e.__assign({size:"small",onClick:u,"aria-label":"Return to review check",sx:{p:0,color:"#6941C6"}},{children:i.jsx(h.default,{sx:{fontSize:17}})})),i.jsx(c.default,{sx:{color:"#6941C6"}}),i.jsx(j.default,e.__assign({sx:{flex:1,fontSize:12,fontWeight:500,alignItems:"center",display:"flex",lineHeight:1.25,textTransform:"capitalise"}},{children:o})),i.jsx(g.default,{score:s}),C&&i.jsx(p.default,e.__assign({size:"small",onClick:m,disabled:!m,"aria-label":"Close cognitive integrity",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(x.default,{sx:{fontSize:17}})}))]})),i.jsxs(y.default,e.__assign({spacing:.75,sx:b({height:"auto",minHeight:0,flex:"0 0 auto"},null==W?void 0:W.content)},{children:[A.length>0&&i.jsxs(f.default,e.__assign({sx:{marginTop:4}},{children:[i.jsx(j.default,e.__assign({sx:{mt:1,mb:.25,color:"text.primary",fontSize:12,fontWeight:500}},{children:"Decision Making Factors"})),i.jsx(_.default,{sx:{my:.625}}),i.jsx(f.default,e.__assign({component:"ol",sx:N,style:T.list},{children:A.map(function(t,n){return i.jsx(f.default,e.__assign({component:"li",sx:{mb:.5}},{children:i.jsx(d.default,{value:"<summary>".concat(t,"</summary>"),styles:L})}),"evidence-".concat(n))})}))]})),B.length>0&&i.jsxs(f.default,e.__assign({sx:null==W?void 0:W.section},{children:[i.jsx(j.default,e.__assign({sx:{mb:.25,color:"text.primary",fontSize:12,fontWeight:500}},{children:"Gap"})),i.jsx(_.default,{sx:{my:.625}}),i.jsx(f.default,e.__assign({component:"ol",sx:N,style:T.list},{children:B.map(function(t,n){return i.jsx(f.default,e.__assign({component:"li",sx:{mb:.5}},{children:i.jsx(d.default,{value:"<summary>".concat(t,"</summary>"),styles:L})}),"gap-".concat(n))})}))]}))]}))]}))}))};
2
2
  //# sourceMappingURL=CognitiveIntegrity.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@mui/icons-material/ChevronRight"),o=require("@mui/icons-material/Close"),r=require("@mui/material/Box"),l=require("@mui/material/Button"),a=require("@mui/material/ButtonBase"),s=require("@mui/material/Divider"),d=require("@mui/material/IconButton"),u=require("@mui/material/Paper"),c=require("@mui/material/Radio"),x=require("@mui/material/Stack"),f=require("@mui/material/TextField"),h=require("@mui/material/Typography"),p=require("./CognitiveIcon.js"),m=require("./CognitiveScoreBadge.js"),g=require("../../assests/icons/InfoAlert.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v,_=b(n),j=b(o),C=b(r),y=b(l),w=b(a),A=b(s),L=b(d),S=b(u),E=b(c),I=b(x),q=b(f),k=b(h),B=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)};exports.LabelReviewActionEnum=void 0,(v=exports.LabelReviewActionEnum||(exports.LabelReviewActionEnum={})).KEEP_LABEL="KEEP_LABEL",v.SET_CUSTOM_LABEL="SET_CUSTOM_LABEL";var D=function(e){return e.user_actions.map(function(i){switch(i){case"KEEP_LABEL":return{id:i,title:"Keep as is",description:e.current_label?'Label stays "'.concat(e.current_label,'"'):"Keep the current document label"};case"SET_CUSTOM_LABEL":return{id:i,title:"Fix a document title",description:"Correct the page title if it's not right",requiresInput:!0,inputPlaceholder:e.current_label?"e.g. ".concat(e.current_label):"Enter a document label"}}})},z=function(e){return Object.values(exports.LabelReviewActionEnum).includes(e)};exports.createLabelCheckOptions=D,exports.default=function(n){var o,r=n.headerName,l=void 0===r?"Title Check":r,a=n.title,s=n.pageNo,d=n.content,u=void 0===d?"We're not fully confident about this label. Confirm it, choose a different type, or add a new one.":d,c=n.cognitiveScore,x=n.config,f=n.metadata,h=n.selectedIndex,b=n.defaultSelectedIndex,v=void 0===b?null:b,M=n.onSelectionChange,F=n.customLabel,O=n.defaultCustomLabel,W=n.onCustomLabelChange,R=n.onConfirm,T=n.onActionConfirm,P=n.onCognitiveClick;n.onAdjustManually;var K=n.onClose,H=n.confirmLabel,N=void 0===H?"Confirm":H,U=n.customInputAriaLabel,G=void 0===U?"Custom document label":U;n.manualPrompt,n.manualActionLabel;var J=n.cognitiveLabel,Q=void 0===J?"Cognitive Integrity":J;n.showAdjustManually;var V=n.showCognitiveIntegrity,X=void 0===V||V,Y=n.showCloseButton,Z=void 0===Y||Y,$=n.confirmDisabled,ee=void 0!==$&&$,ie=n.confirmationBlocked,te=void 0!==ie&&ie,ne=n.confirmationWarning,oe=n.disableAllActions,re=void 0!==oe&&oe,le=n.width,ae=void 0===le?260:le,se=n.maxWidth,de=void 0===se?260:se,ue=n.className,ce=n.styles,xe=t.useMemo(function(){return null!=x?x:f?D(f):[]},[x,f]),fe=t.useState(v),he=fe[0],pe=fe[1],me=t.useState(null!==(o=null!=O?O:null==f?void 0:f.custom_label)&&void 0!==o?o:""),ge=me[0],be=me[1],ve=void 0===h?he:h,_e=void 0===F?ge:F,je=null==ve?void 0:xe[ve],Ce=Boolean(null==je?void 0:je.requiresInput),ye=te||re||ee||!R&&!T||!je||!0===je.disabled||Ce&&0===_e.trim().length,we=function(){if(!ye&&null!=ve&&je){var e=Ce?_e.trim():void 0;null==R||R(ve,je,e),T&&z(je.id)&&T(je.id,{selectedIndex:ve,option:je,customLabel:e,metadata:f})}};return i.jsx(S.default,e.__assign({className:ue,elevation:0,sx:B({width:ae,maxWidth:de,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",boxSizing:"border-box",boxShadow:"0 8px 16px rgba(16, 24, 40, 0.2)","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==ce?void 0:ce.root)},{children:i.jsx(C.default,e.__assign({sx:{overflow:"hidden"}},{children:i.jsxs(I.default,e.__assign({spacing:.75,sx:{p:1}},{children:[i.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==ce?void 0:ce.header},{children:[i.jsx(g.default,{color:"error",height:16,width:16}),i.jsx(k.default,e.__assign({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:l})),Z&&i.jsx(L.default,e.__assign({size:"small",onClick:K,disabled:!K,"aria-label":"Close label check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(j.default,{sx:{fontSize:17}})}))]})),i.jsxs(C.default,{children:[i.jsx(k.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:a})),null!=s&&i.jsx(k.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:s})),i.jsx(A.default,{sx:{my:.625}}),null!=u&&i.jsx(k.default,e.__assign({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:u}))]}),i.jsxs(I.default,e.__assign({spacing:.625,role:"radiogroup","aria-label":"Label options"},{children:[xe.map(function(t,n){var o=ve===n;return i.jsxs(S.default,e.__assign({variant:"outlined",sx:B({borderColor:o?"#1976d2":"divider",borderRadius:2,overflow:"hidden"},null==ce?void 0:ce.option)},{children:[i.jsxs(w.default,e.__assign({role:"radio","aria-checked":o,disabled:ee||t.disabled||te,onClick:function(){return function(e,i){ee||i.disabled||(void 0===h&&pe(e),null==M||M(e,i))}(n,t)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left",cursor:"pointer","&.Mui-disabled":{cursor:"not-allowed"}}},{children:[i.jsx(E.default,{checked:o,disabled:ee||t.disabled||te,tabIndex:-1,size:"small",sx:{p:.25,mr:.5,cursor:"pointer","&.Mui-disabled":{cursor:"not-allowed"}}}),i.jsxs(C.default,e.__assign({sx:{minWidth:0}},{children:[i.jsx(k.default,e.__assign({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:t.title})),null!=t.description&&i.jsx(k.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:11}},{children:t.description}))]}))]})),o&&t.requiresInput&&i.jsx(C.default,e.__assign({sx:{px:1.25,pb:1}},{children:i.jsx(q.default,{autoFocus:!0,fullWidth:!0,size:"small",value:_e,disabled:ee,placeholder:t.inputPlaceholder,inputProps:{"aria-label":G},onChange:function(e){return i=e.target.value,void 0===F&&be(i),void(null==W||W(i));var i},onKeyDown:function(e){"Enter"===e.key&&we()},variant:"outlined",InputProps:{sx:{height:36,borderRadius:2,backgroundColor:"background.paper","& .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD",borderWidth:"1px"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD",borderWidth:"1.5px"},"& .MuiOutlinedInput-input":{height:"100%",boxSizing:"border-box",px:1.25,py:0,fontSize:12,lineHeight:1.25},"& .MuiOutlinedInput-input::placeholder":{color:"#98A2B3",opacity:1}}},sx:null==ce?void 0:ce.customInput})}))]}),t.id)}),null!=ne&&i.jsxs(I.default,e.__assign({direction:"row",alignItems:"flex-start",spacing:.5,role:"alert",sx:B({px:.75,py:.625,borderRadius:1,bgcolor:"#FEFCE8",color:"#CA8A04"},null==ce?void 0:ce.confirmationWarning)},{children:[i.jsx(g.default,{color:"inherit",height:15,width:15}),i.jsx(k.default,e.__assign({sx:{color:"inherit",fontSize:11.5,lineHeight:1.3}},{children:ne}))]})),i.jsx(y.default,e.__assign({variant:"contained",fullWidth:!0,disabled:ye,onClick:we,sx:B({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==ce?void 0:ce.confirmButton)},{children:N}))]})),i.jsx(I.default,e.__assign({spacing:.625,sx:null==ce?void 0:ce.footer},{children:X&&i.jsxs(i.Fragment,{children:[i.jsx(A.default,{}),i.jsxs(w.default,e.__assign({onClick:P,disabled:!P,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:P?"pointer":"not-allowed"}},{children:[i.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:1},{children:[i.jsx(p.default,{sx:{color:"text.secondary"}}),i.jsx(k.default,e.__assign({sx:{color:"text.primary",fontSize:12}},{children:Q}))]})),i.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:.75},{children:[i.jsx(m.default,{score:c}),i.jsx(_.default,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]})}))]}))}))}))},exports.isLabelReviewAction=z;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),r=require("@mui/icons-material/ChevronRight"),n=require("@mui/icons-material/Close"),o=require("@mui/material/Box"),l=require("@mui/material/Button"),a=require("@mui/material/ButtonBase"),s=require("@mui/material/Divider"),d=require("@mui/material/IconButton"),u=require("@mui/material/Paper"),c=require("@mui/material/Radio"),x=require("@mui/material/Stack"),f=require("@mui/material/TextField"),h=require("@mui/material/Typography"),m=require("./RevertSummaryNotice.js"),p=require("./CognitiveIcon.js"),g=require("./CognitiveScoreBadge.js"),b=require("../../assests/icons/InfoAlert.js");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _,j=v(r),C=v(n),y=v(o),w=v(l),S=v(a),A=v(s),L=v(d),E=v(u),I=v(c),q=v(x),k=v(f),B=v(h),D=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)};exports.LabelReviewActionEnum=void 0,(_=exports.LabelReviewActionEnum||(exports.LabelReviewActionEnum={})).KEEP_LABEL="KEEP_LABEL",_.SET_CUSTOM_LABEL="SET_CUSTOM_LABEL";var z=function(e){return e.user_actions.map(function(i){switch(i){case"KEEP_LABEL":return{id:i,title:"Keep as is",description:e.current_label?'Label stays "'.concat(e.current_label,'"'):"Keep the current document label"};case"SET_CUSTOM_LABEL":return{id:i,title:"Fix a document title",description:"Correct the page title if it's not right",requiresInput:!0,inputPlaceholder:e.current_label?"e.g. ".concat(e.current_label):"Enter a document label"}}})},M=function(e){return Object.values(exports.LabelReviewActionEnum).includes(e)};exports.createLabelCheckOptions=z,exports.default=function(r){var n,o=r.headerName,l=void 0===o?"Title Check":o,a=r.title,s=r.pageNo,d=r.content,u=void 0===d?"We're not fully confident about this label. Confirm it, choose a different type, or add a new one.":d,c=r.revertSummary,x=r.cognitiveScore,f=r.config,h=r.metadata,v=r.selectedIndex,_=r.defaultSelectedIndex,F=void 0===_?null:_,O=r.onSelectionChange,R=r.customLabel,W=r.defaultCustomLabel,T=r.onCustomLabelChange,P=r.onConfirm,K=r.onActionConfirm,H=r.onCognitiveClick;r.onAdjustManually;var N=r.onClose,U=r.confirmLabel,G=void 0===U?"Confirm":U,J=r.customInputAriaLabel,Q=void 0===J?"Custom document label":J;r.manualPrompt,r.manualActionLabel;var V=r.cognitiveLabel,X=void 0===V?"Cognitive Integrity":V;r.showAdjustManually;var Y=r.showCognitiveIntegrity,Z=void 0===Y||Y,$=r.showCloseButton,ee=void 0===$||$,ie=r.confirmDisabled,te=void 0!==ie&&ie,re=r.confirmationBlocked,ne=void 0!==re&&re,oe=r.confirmationWarning,le=r.disableAllActions,ae=void 0!==le&&le,se=r.width,de=void 0===se?260:se,ue=r.maxWidth,ce=void 0===ue?260:ue,xe=r.className,fe=r.styles,he=t.useMemo(function(){return null!=f?f:h?z(h):[]},[f,h]),me=t.useState(F),pe=me[0],ge=me[1],be=t.useState(null!==(n=null!=W?W:null==h?void 0:h.custom_label)&&void 0!==n?n:""),ve=be[0],_e=be[1],je=void 0===v?pe:v,Ce=void 0===R?ve:R,ye=null==je?void 0:he[je],we=Boolean(null==ye?void 0:ye.requiresInput),Se=ne||ae||te||!P&&!K||!ye||!0===ye.disabled||we&&0===Ce.trim().length,Ae=function(){if(!Se&&null!=je&&ye){var e=we?Ce.trim():void 0;null==P||P(je,ye,e),K&&M(ye.id)&&K(ye.id,{selectedIndex:je,option:ye,customLabel:e,metadata:h})}};return i.jsx(E.default,e.__assign({className:xe,elevation:0,sx:D({width:de,maxWidth:ce,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",boxSizing:"border-box",boxShadow:"0 8px 16px rgba(16, 24, 40, 0.2)","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==fe?void 0:fe.root)},{children:i.jsx(y.default,e.__assign({sx:{overflow:"hidden"}},{children:i.jsxs(q.default,e.__assign({spacing:.75,sx:{p:1}},{children:[i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==fe?void 0:fe.header},{children:[i.jsx(b.default,{color:"error",height:16,width:16}),i.jsx(B.default,e.__assign({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:l})),ee&&i.jsx(L.default,e.__assign({size:"small",onClick:N,disabled:!N,"aria-label":"Close label check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(C.default,{sx:{fontSize:17}})}))]})),i.jsxs(y.default,{children:[i.jsx(B.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:a})),null!=s&&i.jsx(B.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:s})),i.jsx(A.default,{sx:{my:.625}}),null!=c?i.jsx(m.default,{children:c}):null!=u&&i.jsx(B.default,e.__assign({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:u}))]}),i.jsxs(q.default,e.__assign({spacing:.625,role:"radiogroup","aria-label":"Label options"},{children:[he.map(function(t,r){var n=je===r;return i.jsxs(E.default,e.__assign({variant:"outlined",sx:D({borderColor:n?"#1976d2":"divider",borderRadius:2,overflow:"hidden"},null==fe?void 0:fe.option)},{children:[i.jsxs(S.default,e.__assign({role:"radio","aria-checked":n,disabled:te||t.disabled||ne,onClick:function(){return function(e,i){te||i.disabled||(void 0===v&&ge(e),null==O||O(e,i))}(r,t)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left",cursor:"pointer","&.Mui-disabled":{cursor:"not-allowed"}}},{children:[i.jsx(I.default,{checked:n,disabled:te||t.disabled||ne,tabIndex:-1,size:"small",sx:{p:.25,mr:.5,cursor:"pointer","&.Mui-disabled":{cursor:"not-allowed"}}}),i.jsxs(y.default,e.__assign({sx:{minWidth:0}},{children:[i.jsx(B.default,e.__assign({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:t.title})),null!=t.description&&i.jsx(B.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:11}},{children:t.description}))]}))]})),n&&t.requiresInput&&i.jsx(y.default,e.__assign({sx:{px:1.25,pb:1}},{children:i.jsx(k.default,{autoFocus:!0,fullWidth:!0,size:"small",value:Ce,disabled:te,placeholder:t.inputPlaceholder,inputProps:{"aria-label":Q},onChange:function(e){return i=e.target.value,void 0===R&&_e(i),void(null==T||T(i));var i},onKeyDown:function(e){"Enter"===e.key&&Ae()},variant:"outlined",InputProps:{sx:{height:36,borderRadius:2,backgroundColor:"background.paper","& .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD",borderWidth:"1px"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#D0D5DD",borderWidth:"1.5px"},"& .MuiOutlinedInput-input":{height:"100%",boxSizing:"border-box",px:1.25,py:0,fontSize:12,lineHeight:1.25},"& .MuiOutlinedInput-input::placeholder":{color:"#98A2B3",opacity:1}}},sx:null==fe?void 0:fe.customInput})}))]}),t.id)}),null!=oe&&i.jsxs(q.default,e.__assign({direction:"row",alignItems:"flex-start",spacing:.5,role:"alert",sx:D({px:.75,py:.625,borderRadius:1,bgcolor:"#FEFCE8",color:"#CA8A04"},null==fe?void 0:fe.confirmationWarning)},{children:[i.jsx(b.default,{color:"inherit",height:15,width:15}),i.jsx(B.default,e.__assign({sx:{color:"inherit",fontSize:11.5,lineHeight:1.3}},{children:oe}))]})),i.jsx(w.default,e.__assign({variant:"contained",fullWidth:!0,disabled:Se,onClick:Ae,sx:D({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==fe?void 0:fe.confirmButton)},{children:G}))]})),i.jsx(q.default,e.__assign({spacing:.625,sx:null==fe?void 0:fe.footer},{children:Z&&i.jsxs(i.Fragment,{children:[i.jsx(A.default,{}),i.jsxs(S.default,e.__assign({onClick:H,disabled:!H,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:H?"pointer":"not-allowed"}},{children:[i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:1},{children:[i.jsx(p.default,{sx:{color:"text.secondary"}}),i.jsx(B.default,e.__assign({sx:{color:"text.primary",fontSize:12}},{children:X}))]})),i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:.75},{children:[i.jsx(g.default,{score:x}),i.jsx(j.default,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]})}))]}))}))}))},exports.isLabelReviewAction=M;
2
2
  //# sourceMappingURL=LabelCheck.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react"),n=require("@mui/material/Box"),i=require("@mui/material/Button"),s=require("@mui/material/ButtonBase"),a=require("@mui/material/Divider"),o=require("@mui/material/Stack"),l=require("@mui/material/Tooltip"),d=require("@mui/material/Typography"),c=require("lucide-react");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=u(n),x=u(i),g=u(s),h=u(a),_=u(o),m=u(l),p=u(d),b=function(e){var r=e.startPage,t=e.endPage;return"Pages ".concat(r,"-").concat(t)},v=function(t){var n=t.segment;return r.jsxs(f.default,e.__assign({sx:{px:.75,py:.625,minWidth:0}},{children:[r.jsx(p.default,e.__assign({sx:{color:"text.secondary",fontSize:11,lineHeight:1.3,overflowWrap:"anywhere"}},{children:n.title})),r.jsx(p.default,e.__assign({sx:{color:"text.primary",fontSize:12,fontWeight:400,lineHeight:1.3}},{children:b(n)}))]}))};var j={minHeight:34,borderColor:"#94A3B8",color:"#64748B",borderRadius:"8px",fontSize:12,fontWeight:500,textTransform:"none"},y={minHeight:34,borderRadius:"8px",bgcolor:"#4F46E5",fontSize:12,fontWeight:500,textTransform:"none",boxShadow:"none","&:hover":{bgcolor:"#4338CA",boxShadow:"none"}};exports.default=function(n){var i=this,s=n.icon,a=n.title,o=n.pageRange,l=n.description,d=n.onRevert,u=n.onRevertComplete,b=n.onRevertError,C=n.revertData,S=n.confirmDisabled,w=void 0!==S&&S,R=n.showDocumentHeader,W=void 0===R||R,F=t.useState(!1),z=F[0],k=F[1],H=t.useState(!1),q=H[0],A=H[1],B=C.previousSegments.length>0,E=function(){return e.__awaiter(i,void 0,void 0,function(){var r,t;return e.__generator(this,function(e){switch(e.label){case 0:if(q||w)return[2];A(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,d()];case 2:return r=e.sent(),null==u||u(r),[3,5];case 3:return t=e.sent(),null==b||b(t),[3,5];case 4:return A(!1),[7];case 5:return[2]}})})};return r.jsxs(_.default,e.__assign({spacing:.875,sx:{minWidth:0}},{children:[W&&r.jsxs(f.default,e.__assign({sx:{minWidth:0}},{children:[r.jsx(p.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500,lineHeight:1.4,overflowWrap:"anywhere"}},{children:a})),r.jsx(p.default,e.__assign({sx:{color:"text.secondary",fontSize:12,lineHeight:1.4}},{children:o}))]})),r.jsxs(_.default,e.__assign({direction:"row",alignItems:"flex-start",spacing:.625,sx:{px:.75,py:.625,border:"1px solid #86EFAC",borderRadius:2,bgcolor:"#FFFFFF",color:"#16A34A"}},{children:[r.jsx(f.default,e.__assign({"aria-hidden":"true",sx:{display:"flex",flexShrink:0,mt:"1px",fontSize:14}},{children:s})),r.jsx(p.default,e.__assign({sx:{minWidth:0,color:"inherit",fontSize:11,lineHeight:1.5,overflowWrap:"anywhere"}},{children:l}))]})),r.jsx(h.default,{sx:{borderStyle:"dashed",borderColor:"#CBD5E1"}}),z?r.jsxs(_.default,e.__assign({spacing:.75},{children:[r.jsxs(g.default,e.__assign({onClick:function(){return k(!1)},"aria-label":"Back from revert confirmation",sx:{width:"fit-content",borderRadius:.5,color:"text.primary",fontSize:13,fontWeight:500,lineHeight:1.3,textAlign:"left"}},{children:[r.jsx(f.default,e.__assign({component:"span","aria-hidden":"true",sx:{mr:.625,alignItems:"center",display:"flex"}},{children:r.jsx(c.ChevronLeft,{size:16})})),"Revert"]})),B?r.jsxs(f.default,e.__assign({sx:{p:.75,borderRadius:1,bgcolor:"#F8FAFC"}},{children:[r.jsx(p.default,e.__assign({sx:{mb:.375,color:"text.secondary",fontSize:12}},{children:"Current"})),r.jsx(f.default,e.__assign({sx:{mb:.75,border:"1px solid #E2E8F0",borderRadius:1,bgcolor:"background.paper"}},{children:r.jsx(v,{segment:C.currentSegment})})),r.jsx(p.default,e.__assign({sx:{mb:.375,color:"text.secondary",fontSize:12}},{children:"After Revert"})),r.jsx(f.default,e.__assign({sx:{border:"1px solid #E2E8F0",borderRadius:1,bgcolor:"background.paper",overflow:"hidden"}},{children:C.previousSegments.map(function(e,t){return r.jsxs(f.default,{children:[t>0&&r.jsx(h.default,{sx:{borderColor:"#E2E8F0"}}),r.jsx(v,{segment:e})]},"".concat(e.title,"-").concat(e.startPage,"-").concat(e.endPage,"-").concat(t))})})),r.jsxs(_.default,e.__assign({direction:"row",spacing:1,sx:{mt:.875}},{children:[r.jsx(x.default,e.__assign({variant:"outlined",fullWidth:!0,disabled:q,onClick:function(){return k(!1)},sx:j},{children:"Cancel"})),r.jsx(m.default,e.__assign({title:w?"Revert data is not present, cannot revert this":"",disableHoverListener:!w,arrow:!0},{children:r.jsx("span",e.__assign({style:{flex:1}},{children:r.jsx(x.default,e.__assign({variant:"contained",fullWidth:!0,disabled:q||w,onClick:function(){E()},sx:y},{children:q?"Reverting…":"Confirm"}))}))}))]}))]})):r.jsxs(f.default,e.__assign({sx:{p:.875,borderRadius:1,bgcolor:"#F8FAFC"}},{children:[r.jsx(p.default,e.__assign({sx:{color:"text.secondary",fontSize:12,fontWeight:500}},{children:"Revert approval?"})),r.jsx(p.default,e.__assign({sx:{mt:.75,color:"text.secondary",fontSize:13,lineHeight:1.45}},{children:"This document will be moved back to pending review and will need to be confirmed again."})),r.jsxs(_.default,e.__assign({direction:"row",spacing:1,sx:{mt:1}},{children:[r.jsx(x.default,e.__assign({variant:"outlined",fullWidth:!0,disabled:q,onClick:function(){return k(!1)},sx:j},{children:"Cancel"})),r.jsx(m.default,e.__assign({title:w?"Revert data is not present, cannot revert this":"",disableHoverListener:!w,arrow:!0},{children:r.jsx("span",e.__assign({style:{flex:1}},{children:r.jsx(x.default,e.__assign({variant:"contained",fullWidth:!0,disabled:q||w,onClick:function(){E()},sx:y},{children:q?"Reverting…":"Confirm"}))}))}))]}))]}))]})):r.jsx(x.default,e.__assign({variant:"outlined",fullWidth:!0,onClick:function(){return k(!0)},sx:{minHeight:36,borderColor:"#9B8AFB",color:"#5925DC",borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none","&:hover":{borderColor:"secondary.dark",bgcolor:"rgba(79, 70, 229, 0.04)"}}},{children:"Revert"}))]}))};
2
+ //# sourceMappingURL=RevertCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RevertCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),i=require("@mui/icons-material/ArrowForward"),t=require("@mui/material/Box"),o=require("@mui/material/Button"),l=require("@mui/material/Paper"),a=require("@mui/material/Stack"),n=require("@mui/material/Typography"),s=require("lucide-react");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(i),c=d(t),x=d(o),g=d(l),h=d(a),f=d(n);exports.default=function(i){var t=i.title,o=i.description,l=i.onReview,a=i.reviewLabel,n=void 0===a?"Review":a;return r.jsx(g.default,e.__assign({elevation:0,role:"status",sx:{width:"100%",px:1.5,py:1.5,border:"1.5px solid #86EFAC",borderRadius:2,bgcolor:"#F0FDF4",boxSizing:"border-box"}},{children:r.jsxs(h.default,e.__assign({alignItems:"center",spacing:1.5,sx:{textAlign:"center"}},{children:[r.jsx(c.default,e.__assign({sx:{display:"grid",placeItems:"center",width:58,height:58,border:"8px solid rgba(255, 255, 255, 0.9)",borderRadius:"50%",bgcolor:"#DCFCE7",color:"#0A9B49"}},{children:r.jsx(s.CheckCircleIcon,{height:36,width:36})})),r.jsxs(c.default,{children:[r.jsx(f.default,e.__assign({sx:{color:"#166534",fontSize:15,fontWeight:600,lineHeight:1.4}},{children:t})),r.jsx(f.default,e.__assign({sx:{mt:.75,color:"#07883F",fontSize:14,lineHeight:1.55}},{children:o}))]}),r.jsx(x.default,e.__assign({variant:"outlined",fullWidth:!0,onClick:l,endIcon:r.jsx(u.default,{}),sx:{minHeight:42,border:"1.5px solid #CBD5E1",borderRadius:2,bgcolor:"#FFFFFF",color:"#475569",fontSize:16,fontWeight:700,textTransform:"none","&:hover":{borderColor:"#94A3B8",bgcolor:"#FFFFFF"}}},{children:n}))]}))}))};
2
+ //# sourceMappingURL=RevertSuccessCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RevertSuccessCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),i=require("@mui/material/Box"),t=require("@mui/material/Typography"),a=require("lucide-react");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=o(i),s=o(t);exports.default=function(i){var t=i.children;return r.jsxs(l.default,e.__assign({sx:{display:"flex",alignItems:"flex-start",gap:1,px:1,py:1.125,border:"1px solid #FACC15",borderRadius:1.5,bgcolor:"#FFFBEB",color:"#D18A00"}},{children:[r.jsx(a.GitMerge,{size:18,strokeWidth:2.25,style:{flex:"0 0 auto",marginTop:1}}),r.jsx(s.default,e.__assign({component:"div",sx:{color:"inherit",fontSize:12,lineHeight:1.5,overflowWrap:"anywhere"}},{children:t}))]}))};
2
+ //# sourceMappingURL=RevertSummaryNotice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RevertSummaryNotice.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("@mui/icons-material/ChevronRight"),t=require("@mui/icons-material/Close"),s=require("@mui/material/Box"),a=require("@mui/material/ButtonBase"),n=require("@mui/material/Divider"),o=require("@mui/material/IconButton"),l=require("@mui/material/Paper"),d=require("@mui/material/Stack"),c=require("@mui/material/Typography"),u=require("../../assests/icons/InfoAlert.js"),x=require("./CognitiveIcon.js"),f=require("./CognitiveScoreBadge.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=h(r),m=h(t),p=h(s),v=h(a),_=h(n),j=h(o),w=h(l),y=h(d),b=h(c),C=function(i,r){return e.__spreadArray([i],Array.isArray(r)?r:null==r?[]:[r],!0)};exports.default=function(r){var t=r.headerName,s=void 0===t?"Reviewed":t,a=r.headerIcon,n=r.title,o=r.pageNo,l=r.summary,d=r.cognitiveScore,c=r.onCognitiveClick,h=r.onClose,q=r.cognitiveLabel,W=void 0===q?"Cognitive Integrity":q,S=r.showCognitiveIntegrity,I=void 0===S||S,k=r.showCloseButton,z=void 0===k||k,A=r.width,B=void 0===A?260:A,N=r.maxWidth,R=void 0===N?260:N,D=r.className,F=r.styles;return i.jsxs(w.default,e.__assign({className:D,elevation:4,sx:C({width:B,maxWidth:"min(".concat(R,"number"==typeof R?"px, 100%)":", 100%)"),minWidth:0,flexShrink:1,borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box",boxShadow:"0 8px 16px rgba(16, 24, 40, 0.16)","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==F?void 0:F.root)},{children:[i.jsxs(y.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:C({minWidth:0,px:1.25,py:1,bgcolor:"#ECFDF5",color:"#16A34A"},null==F?void 0:F.header)},{children:[null!=a?a:i.jsx(u.default,{color:"success",height:16,width:16}),i.jsx(b.default,e.__assign({sx:{flex:1,minWidth:0,color:"inherit",fontSize:13,fontWeight:500,lineHeight:1.25,textTransform:"uppercase",overflowWrap:"anywhere"}},{children:s})),z&&i.jsx(j.default,e.__assign({size:"small",onClick:h,disabled:!h,"aria-label":"Close reviewed card",sx:{p:0,color:"#475569","&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(m.default,{sx:{fontSize:17}})}))]})),i.jsxs(y.default,e.__assign({spacing:.875,sx:{px:1.25,pt:1.25,pb:1}},{children:[i.jsxs(p.default,{children:[i.jsx(b.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500,overflowWrap:"anywhere"}},{children:n})),null!=o&&i.jsx(b.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:o}))]}),null!=l&&i.jsx(y.default,e.__assign({sx:null==F?void 0:F.content},{children:l})),I&&i.jsxs(y.default,e.__assign({spacing:.625,sx:null==F?void 0:F.footer},{children:[i.jsx(_.default,{}),i.jsxs(v.default,e.__assign({onClick:c,disabled:!c,sx:{width:"100%",minWidth:0,justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:c?"pointer":"not-allowed"}},{children:[i.jsxs(y.default,e.__assign({direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,flex:1}},{children:[i.jsx(x.default,{sx:{color:"text.secondary"}}),i.jsx(b.default,e.__assign({sx:{minWidth:0,color:"text.primary",fontSize:12,overflowWrap:"anywhere"}},{children:W}))]})),i.jsxs(y.default,e.__assign({direction:"row",alignItems:"center",spacing:.5,sx:{flexShrink:0}},{children:[i.jsx(f.default,{score:d}),i.jsx(g.default,{sx:{color:"text.secondary"}})]}))]}))]}))]}))]}))};
2
+ //# sourceMappingURL=ReviewedCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReviewedCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}