@viswa-test/test-citation 0.0.384 → 0.0.385

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 (501) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +2 -0
  2. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/dist/_virtual/index.js +2 -0
  4. package/dist/_virtual/index.js.map +1 -0
  5. package/dist/_virtual/index2.js +2 -0
  6. package/dist/_virtual/index2.js.map +1 -0
  7. package/dist/_virtual/index3.js +2 -0
  8. package/dist/_virtual/index3.js.map +1 -0
  9. package/dist/_virtual/index4.js +2 -0
  10. package/dist/_virtual/index4.js.map +1 -0
  11. package/dist/_virtual/index5.js +2 -0
  12. package/dist/_virtual/index5.js.map +1 -0
  13. package/dist/_virtual/react-is.development.js +2 -0
  14. package/dist/_virtual/react-is.development.js.map +1 -0
  15. package/dist/_virtual/react-is.development2.js +2 -0
  16. package/dist/_virtual/react-is.development2.js.map +1 -0
  17. package/dist/_virtual/react-is.production.js +2 -0
  18. package/dist/_virtual/react-is.production.js.map +1 -0
  19. package/dist/_virtual/react-is.production.min.js +2 -0
  20. package/dist/_virtual/react-is.production.min.js.map +1 -0
  21. package/dist/assests/svg/chevronDownArrow.svg.js.map +1 -1
  22. package/dist/assests/svg/chevronUp.svg.js.map +1 -1
  23. package/dist/cjs/_virtual/_commonjsHelpers.js +2 -0
  24. package/dist/cjs/_virtual/_commonjsHelpers.js.map +1 -0
  25. package/dist/cjs/_virtual/index.js +2 -0
  26. package/dist/cjs/_virtual/index.js.map +1 -0
  27. package/dist/cjs/_virtual/index2.js +2 -0
  28. package/dist/cjs/_virtual/index2.js.map +1 -0
  29. package/dist/cjs/_virtual/index3.js +2 -0
  30. package/dist/cjs/_virtual/index3.js.map +1 -0
  31. package/dist/cjs/_virtual/index4.js +2 -0
  32. package/dist/cjs/_virtual/index4.js.map +1 -0
  33. package/dist/cjs/_virtual/index5.js +2 -0
  34. package/dist/cjs/_virtual/index5.js.map +1 -0
  35. package/dist/cjs/_virtual/react-is.development.js +2 -0
  36. package/dist/cjs/_virtual/react-is.development.js.map +1 -0
  37. package/dist/cjs/_virtual/react-is.development2.js +2 -0
  38. package/dist/cjs/_virtual/react-is.development2.js.map +1 -0
  39. package/dist/cjs/_virtual/react-is.production.js +2 -0
  40. package/dist/cjs/_virtual/react-is.production.js.map +1 -0
  41. package/dist/cjs/_virtual/react-is.production.min.js +2 -0
  42. package/dist/cjs/_virtual/react-is.production.min.js.map +1 -0
  43. package/dist/cjs/assests/svg/chevronDownArrow.svg.js.map +1 -1
  44. package/dist/cjs/assests/svg/chevronUp.svg.js.map +1 -1
  45. package/dist/cjs/features/Bookemon/BookDetailsCard/BookDetailsCard.js +1 -1
  46. package/dist/cjs/features/Bookemon/BookDetailsCard/BookDetailsCard.js.map +1 -1
  47. package/dist/cjs/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
  48. package/dist/cjs/features/Bookemon/BookElementsCard/BookElementsCard.js.map +1 -1
  49. package/dist/cjs/features/Bookemon/BookOverviewCard/BookOverviewCard.js +1 -1
  50. package/dist/cjs/features/Bookemon/BookOverviewCard/BookOverviewCard.js.map +1 -1
  51. package/dist/cjs/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.js +1 -1
  52. package/dist/cjs/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.js.map +1 -1
  53. package/dist/cjs/features/Bookemon/BookPreview/BookPreview.js +1 -1
  54. package/dist/cjs/features/Bookemon/BookPreview/BookPreview.js.map +1 -1
  55. package/dist/cjs/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
  56. package/dist/cjs/features/ChatCitation/InternalChatCitationRenderer.js.map +1 -1
  57. package/dist/cjs/features/ChatCitation/assets/cw_chat.svg.js.map +1 -1
  58. package/dist/cjs/features/ChatCitation/assets/message-chat-square.svg.js.map +1 -1
  59. package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js +1 -1
  60. package/dist/cjs/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
  61. package/dist/cjs/features/ExcelCitation/ExcelCitations.js +1 -1
  62. package/dist/cjs/features/ExcelCitation/ExcelCitations.js.map +1 -1
  63. package/dist/cjs/features/PdfViewer/PdfViewer.js +1 -1
  64. package/dist/cjs/features/PdfViewer/PdfViewer.js.map +1 -1
  65. package/dist/cjs/features/ReviewPanel/ReviewPanel.js +1 -1
  66. package/dist/cjs/features/ReviewPanel/ReviewPanel.js.map +1 -1
  67. package/dist/cjs/features/SPBAnalysisPanel/Cognitivereasoningpanel.js +1 -1
  68. package/dist/cjs/features/SPBAnalysisPanel/Cognitivereasoningpanel.js.map +1 -1
  69. package/dist/cjs/features/TableCitation/TableCitationContent.js +1 -1
  70. package/dist/cjs/features/TableCitation/TableCitationContent.js.map +1 -1
  71. package/dist/cjs/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +2 -0
  72. package/dist/cjs/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js.map +1 -0
  73. package/dist/cjs/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +2 -0
  74. package/dist/cjs/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -0
  75. package/dist/cjs/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +2 -0
  76. package/dist/cjs/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js.map +1 -0
  77. package/dist/cjs/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +2 -0
  78. package/dist/cjs/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +1 -0
  79. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js +2 -0
  80. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js.map +1 -0
  81. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/nested.js +2 -0
  82. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/nested.js.map +1 -0
  83. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/ThemeContext.js +2 -0
  84. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/ThemeContext.js.map +1 -0
  85. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/useTheme.js +2 -0
  86. package/dist/cjs/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/useTheme.js.map +1 -0
  87. package/dist/cjs/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js +2 -0
  88. package/dist/cjs/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js.map +1 -0
  89. package/dist/cjs/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +2 -0
  90. package/dist/cjs/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js.map +1 -0
  91. package/dist/cjs/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/index.js +9 -0
  92. package/dist/cjs/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/index.js.map +1 -0
  93. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/Box.js +2 -0
  94. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/Box.js.map +1 -0
  95. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/boxClasses.js +2 -0
  96. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/boxClasses.js.map +1 -0
  97. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/Container.js +2 -0
  98. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/Container.js.map +1 -0
  99. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/containerClasses.js +2 -0
  100. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/containerClasses.js.map +1 -0
  101. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/createContainer.js +2 -0
  102. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/createContainer.js.map +1 -0
  103. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js +2 -0
  104. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js.map +1 -0
  105. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js +2 -0
  106. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js.map +1 -0
  107. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/Grid.js +2 -0
  108. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/Grid.js.map +1 -0
  109. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/createGrid.js +2 -0
  110. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/createGrid.js.map +1 -0
  111. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/deleteLegacyGridProps.js +2 -0
  112. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/deleteLegacyGridProps.js.map +1 -0
  113. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridClasses.js +2 -0
  114. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridClasses.js.map +1 -0
  115. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridGenerator.js +2 -0
  116. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridGenerator.js.map +1 -0
  117. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/traverseBreakpoints.js +2 -0
  118. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/traverseBreakpoints.js.map +1 -0
  119. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/RtlProvider/index.js +2 -0
  120. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/RtlProvider/index.js.map +1 -0
  121. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/Stack.js +2 -0
  122. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/Stack.js.map +1 -0
  123. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/createStack.js +2 -0
  124. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/createStack.js.map +1 -0
  125. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/stackClasses.js +2 -0
  126. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/stackClasses.js.map +1 -0
  127. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +2 -0
  128. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js.map +1 -0
  129. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js +2 -0
  130. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js.map +1 -0
  131. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/borders/borders.js +2 -0
  132. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/borders/borders.js.map +1 -0
  133. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/breakpoints/breakpoints.js +2 -0
  134. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/breakpoints/breakpoints.js.map +1 -0
  135. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/compose/compose.js +2 -0
  136. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/compose/compose.js.map +1 -0
  137. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBox/createBox.js +2 -0
  138. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBox/createBox.js.map +1 -0
  139. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js +2 -0
  140. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js.map +1 -0
  141. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createStyled/createStyled.js +2 -0
  142. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createStyled/createStyled.js.map +1 -0
  143. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/applyStyles.js +2 -0
  144. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/applyStyles.js.map +1 -0
  145. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createSpacing.js +2 -0
  146. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createSpacing.js.map +1 -0
  147. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createTheme.js +2 -0
  148. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createTheme.js.map +1 -0
  149. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/shape.js +2 -0
  150. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/shape.js.map +1 -0
  151. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js +2 -0
  152. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js.map +1 -0
  153. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssGrid/cssGrid.js +2 -0
  154. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssGrid/cssGrid.js.map +1 -0
  155. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/display/display.js +2 -0
  156. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/display/display.js.map +1 -0
  157. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/flexbox/flexbox.js +2 -0
  158. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/flexbox/flexbox.js.map +1 -0
  159. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/getThemeValue/getThemeValue.js +2 -0
  160. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/getThemeValue/getThemeValue.js.map +1 -0
  161. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/memoize/memoize.js +2 -0
  162. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/memoize/memoize.js.map +1 -0
  163. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/merge/merge.js +2 -0
  164. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/merge/merge.js.map +1 -0
  165. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/palette/palette.js +2 -0
  166. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/palette/palette.js.map +1 -0
  167. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/positions/positions.js +2 -0
  168. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/positions/positions.js.map +1 -0
  169. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/preprocessStyles.js +2 -0
  170. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/preprocessStyles.js.map +1 -0
  171. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/responsivePropType/responsivePropType.js +2 -0
  172. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/responsivePropType/responsivePropType.js.map +1 -0
  173. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/shadows/shadows.js +2 -0
  174. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/shadows/shadows.js.map +1 -0
  175. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/sizing/sizing.js +2 -0
  176. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/sizing/sizing.js.map +1 -0
  177. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/spacing/spacing.js +2 -0
  178. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/spacing/spacing.js.map +1 -0
  179. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/style/style.js +2 -0
  180. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/style/style.js.map +1 -0
  181. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +2 -0
  182. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js.map +1 -0
  183. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js +2 -0
  184. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js.map +1 -0
  185. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +2 -0
  186. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js.map +1 -0
  187. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styled/styled.js +2 -0
  188. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styled/styled.js.map +1 -0
  189. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/typography/typography.js +2 -0
  190. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/typography/typography.js.map +1 -0
  191. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useTheme/useTheme.js +2 -0
  192. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useTheme/useTheme.js.map +1 -0
  193. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js +2 -0
  194. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js.map +1 -0
  195. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js +2 -0
  196. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js.map +1 -0
  197. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js +2 -0
  198. package/dist/cjs/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js.map +1 -0
  199. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js +2 -0
  200. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js.map +1 -0
  201. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/capitalize/capitalize.js +2 -0
  202. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/capitalize/capitalize.js.map +1 -0
  203. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js +2 -0
  204. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js.map +1 -0
  205. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +2 -0
  206. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/composeClasses/composeClasses.js.map +1 -0
  207. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +2 -0
  208. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/deepmerge/deepmerge.js.map +1 -0
  209. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementAcceptingRef/elementAcceptingRef.js +2 -0
  210. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementAcceptingRef/elementAcceptingRef.js.map +1 -0
  211. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementTypeAcceptingRef/elementTypeAcceptingRef.js +2 -0
  212. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementTypeAcceptingRef/elementTypeAcceptingRef.js.map +1 -0
  213. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/exactProp/exactProp.js +2 -0
  214. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/exactProp/exactProp.js.map +1 -0
  215. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js +2 -0
  216. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js.map +1 -0
  217. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +2 -0
  218. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js.map +1 -0
  219. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js +2 -0
  220. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js.map +1 -0
  221. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js +2 -0
  222. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js.map +1 -0
  223. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/integerPropType/integerPropType.js +2 -0
  224. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/integerPropType/integerPropType.js.map +1 -0
  225. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/isMuiElement/isMuiElement.js +2 -0
  226. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/isMuiElement/isMuiElement.js.map +1 -0
  227. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ponyfillGlobal/ponyfillGlobal.js +2 -0
  228. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ponyfillGlobal/ponyfillGlobal.js.map +1 -0
  229. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/refType/refType.js +2 -0
  230. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/refType/refType.js.map +1 -0
  231. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/resolveProps/resolveProps.js +2 -0
  232. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/resolveProps/resolveProps.js.map +1 -0
  233. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js +2 -0
  234. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js.map +1 -0
  235. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useId/useId.js +2 -0
  236. package/dist/cjs/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useId/useId.js.map +1 -0
  237. package/dist/cjs/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs.js +2 -0
  238. package/dist/cjs/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs.js.map +1 -0
  239. package/dist/cjs/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +8 -0
  240. package/dist/cjs/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js.map +1 -0
  241. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +2 -0
  242. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js.map +1 -0
  243. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +2 -0
  244. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
  245. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +2 -0
  246. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
  247. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +2 -0
  248. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js.map +1 -0
  249. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +2 -0
  250. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
  251. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +2 -0
  252. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js.map +1 -0
  253. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +10 -0
  254. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  255. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +10 -0
  256. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  257. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +2 -0
  258. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js.map +1 -0
  259. package/dist/cjs/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.development.js +11 -0
  260. package/dist/cjs/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  261. package/dist/cjs/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.production.js +11 -0
  262. package/dist/cjs/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.production.js.map +1 -0
  263. package/dist/cjs/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/index.js +2 -0
  264. package/dist/cjs/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/index.js.map +1 -0
  265. package/dist/cjs/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js +2 -0
  266. package/dist/cjs/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js.map +1 -0
  267. package/dist/cjs/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  268. package/dist/cjs/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  269. package/dist/cjs/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js +2 -0
  270. package/dist/cjs/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
  271. package/dist/cjs/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js +2 -0
  272. package/dist/cjs/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js.map +1 -0
  273. package/dist/features/Bookemon/BookDetailsCard/BookDetailsCard.js +1 -1
  274. package/dist/features/Bookemon/BookDetailsCard/BookDetailsCard.js.map +1 -1
  275. package/dist/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
  276. package/dist/features/Bookemon/BookElementsCard/BookElementsCard.js.map +1 -1
  277. package/dist/features/Bookemon/BookOverviewCard/BookOverviewCard.js +1 -1
  278. package/dist/features/Bookemon/BookOverviewCard/BookOverviewCard.js.map +1 -1
  279. package/dist/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.js +1 -1
  280. package/dist/features/Bookemon/BookPeopleAwardsCard/BookPeopleAwardsCard.js.map +1 -1
  281. package/dist/features/Bookemon/BookPreview/BookPreview.js +1 -1
  282. package/dist/features/Bookemon/BookPreview/BookPreview.js.map +1 -1
  283. package/dist/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
  284. package/dist/features/ChatCitation/InternalChatCitationRenderer.js.map +1 -1
  285. package/dist/features/ChatCitation/assets/cw_chat.svg.js.map +1 -1
  286. package/dist/features/ChatCitation/assets/message-chat-square.svg.js.map +1 -1
  287. package/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
  288. package/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
  289. package/dist/features/ExcelCitation/ExcelCitations.js +1 -1
  290. package/dist/features/ExcelCitation/ExcelCitations.js.map +1 -1
  291. package/dist/features/PdfViewer/PdfViewer.js +1 -1
  292. package/dist/features/PdfViewer/PdfViewer.js.map +1 -1
  293. package/dist/features/ReviewPanel/ReviewPanel.js +1 -1
  294. package/dist/features/ReviewPanel/ReviewPanel.js.map +1 -1
  295. package/dist/features/SPBAnalysisPanel/Cognitivereasoningpanel.js +1 -1
  296. package/dist/features/SPBAnalysisPanel/Cognitivereasoningpanel.js.map +1 -1
  297. package/dist/features/TableCitation/TableCitationContent.js +1 -1
  298. package/dist/features/TableCitation/TableCitationContent.js.map +1 -1
  299. package/dist/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js +2 -0
  300. package/dist/node_modules/.pnpm/@emotion_hash@0.9.2/node_modules/@emotion/hash/dist/emotion-hash.esm.js.map +1 -0
  301. package/dist/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +2 -0
  302. package/dist/node_modules/.pnpm/@emotion_memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -0
  303. package/dist/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +2 -0
  304. package/dist/node_modules/.pnpm/@emotion_serialize@1.3.3/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js.map +1 -0
  305. package/dist/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +2 -0
  306. package/dist/node_modules/.pnpm/@emotion_unitless@0.10.0/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +1 -0
  307. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js +2 -0
  308. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js.map +1 -0
  309. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/nested.js +2 -0
  310. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/nested.js.map +1 -0
  311. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/ThemeContext.js +2 -0
  312. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/ThemeContext.js.map +1 -0
  313. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/useTheme.js +2 -0
  314. package/dist/node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/useTheme.js.map +1 -0
  315. package/dist/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js +2 -0
  316. package/dist/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js.map +1 -0
  317. package/dist/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js +2 -0
  318. package/dist/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js.map +1 -0
  319. package/dist/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/index.js +9 -0
  320. package/dist/node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/index.js.map +1 -0
  321. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/Box.js +2 -0
  322. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/Box.js.map +1 -0
  323. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/boxClasses.js +2 -0
  324. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/boxClasses.js.map +1 -0
  325. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/Container.js +2 -0
  326. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/Container.js.map +1 -0
  327. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/containerClasses.js +2 -0
  328. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/containerClasses.js.map +1 -0
  329. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/createContainer.js +2 -0
  330. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/createContainer.js.map +1 -0
  331. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js +2 -0
  332. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js.map +1 -0
  333. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js +2 -0
  334. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js.map +1 -0
  335. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/Grid.js +2 -0
  336. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/Grid.js.map +1 -0
  337. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/createGrid.js +2 -0
  338. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/createGrid.js.map +1 -0
  339. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/deleteLegacyGridProps.js +2 -0
  340. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/deleteLegacyGridProps.js.map +1 -0
  341. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridClasses.js +2 -0
  342. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridClasses.js.map +1 -0
  343. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridGenerator.js +2 -0
  344. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridGenerator.js.map +1 -0
  345. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/traverseBreakpoints.js +2 -0
  346. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/traverseBreakpoints.js.map +1 -0
  347. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/RtlProvider/index.js +2 -0
  348. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/RtlProvider/index.js.map +1 -0
  349. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/Stack.js +2 -0
  350. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/Stack.js.map +1 -0
  351. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/createStack.js +2 -0
  352. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/createStack.js.map +1 -0
  353. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/stackClasses.js +2 -0
  354. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/stackClasses.js.map +1 -0
  355. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +2 -0
  356. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js.map +1 -0
  357. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js +2 -0
  358. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/useLayerOrder.js.map +1 -0
  359. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/borders/borders.js +2 -0
  360. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/borders/borders.js.map +1 -0
  361. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/breakpoints/breakpoints.js +2 -0
  362. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/breakpoints/breakpoints.js.map +1 -0
  363. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/compose/compose.js +2 -0
  364. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/compose/compose.js.map +1 -0
  365. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBox/createBox.js +2 -0
  366. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBox/createBox.js.map +1 -0
  367. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js +2 -0
  368. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js.map +1 -0
  369. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createStyled/createStyled.js +2 -0
  370. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createStyled/createStyled.js.map +1 -0
  371. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/applyStyles.js +2 -0
  372. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/applyStyles.js.map +1 -0
  373. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createSpacing.js +2 -0
  374. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createSpacing.js.map +1 -0
  375. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createTheme.js +2 -0
  376. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/createTheme.js.map +1 -0
  377. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/shape.js +2 -0
  378. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createTheme/shape.js.map +1 -0
  379. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js +2 -0
  380. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js.map +1 -0
  381. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssGrid/cssGrid.js +2 -0
  382. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssGrid/cssGrid.js.map +1 -0
  383. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/display/display.js +2 -0
  384. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/display/display.js.map +1 -0
  385. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/flexbox/flexbox.js +2 -0
  386. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/flexbox/flexbox.js.map +1 -0
  387. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/getThemeValue/getThemeValue.js +2 -0
  388. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/getThemeValue/getThemeValue.js.map +1 -0
  389. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/memoize/memoize.js +2 -0
  390. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/memoize/memoize.js.map +1 -0
  391. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/merge/merge.js +2 -0
  392. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/merge/merge.js.map +1 -0
  393. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/palette/palette.js +2 -0
  394. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/palette/palette.js.map +1 -0
  395. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/positions/positions.js +2 -0
  396. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/positions/positions.js.map +1 -0
  397. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/preprocessStyles.js +2 -0
  398. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/preprocessStyles.js.map +1 -0
  399. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/responsivePropType/responsivePropType.js +2 -0
  400. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/responsivePropType/responsivePropType.js.map +1 -0
  401. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/shadows/shadows.js +2 -0
  402. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/shadows/shadows.js.map +1 -0
  403. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/sizing/sizing.js +2 -0
  404. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/sizing/sizing.js.map +1 -0
  405. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/spacing/spacing.js +2 -0
  406. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/spacing/spacing.js.map +1 -0
  407. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/style/style.js +2 -0
  408. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/style/style.js.map +1 -0
  409. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +2 -0
  410. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js.map +1 -0
  411. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js +2 -0
  412. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js.map +1 -0
  413. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +2 -0
  414. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js.map +1 -0
  415. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styled/styled.js +2 -0
  416. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styled/styled.js.map +1 -0
  417. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/typography/typography.js +2 -0
  418. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/typography/typography.js.map +1 -0
  419. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useTheme/useTheme.js +2 -0
  420. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useTheme/useTheme.js.map +1 -0
  421. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js +2 -0
  422. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js.map +1 -0
  423. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js +2 -0
  424. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js.map +1 -0
  425. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js +2 -0
  426. package/dist/node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js.map +1 -0
  427. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js +2 -0
  428. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js.map +1 -0
  429. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/capitalize/capitalize.js +2 -0
  430. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/capitalize/capitalize.js.map +1 -0
  431. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js +2 -0
  432. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js.map +1 -0
  433. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +2 -0
  434. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/composeClasses/composeClasses.js.map +1 -0
  435. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +2 -0
  436. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/deepmerge/deepmerge.js.map +1 -0
  437. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementAcceptingRef/elementAcceptingRef.js +2 -0
  438. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementAcceptingRef/elementAcceptingRef.js.map +1 -0
  439. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementTypeAcceptingRef/elementTypeAcceptingRef.js +2 -0
  440. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/elementTypeAcceptingRef/elementTypeAcceptingRef.js.map +1 -0
  441. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/exactProp/exactProp.js +2 -0
  442. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/exactProp/exactProp.js.map +1 -0
  443. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js +2 -0
  444. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js.map +1 -0
  445. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +2 -0
  446. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js.map +1 -0
  447. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js +2 -0
  448. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js.map +1 -0
  449. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js +2 -0
  450. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js.map +1 -0
  451. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/integerPropType/integerPropType.js +2 -0
  452. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/integerPropType/integerPropType.js.map +1 -0
  453. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/isMuiElement/isMuiElement.js +2 -0
  454. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/isMuiElement/isMuiElement.js.map +1 -0
  455. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ponyfillGlobal/ponyfillGlobal.js +2 -0
  456. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/ponyfillGlobal/ponyfillGlobal.js.map +1 -0
  457. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/refType/refType.js +2 -0
  458. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/refType/refType.js.map +1 -0
  459. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/resolveProps/resolveProps.js +2 -0
  460. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/resolveProps/resolveProps.js.map +1 -0
  461. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js +2 -0
  462. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js.map +1 -0
  463. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useId/useId.js +2 -0
  464. package/dist/node_modules/.pnpm/@mui_utils@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/utils/esm/useId/useId.js.map +1 -0
  465. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs.js +2 -0
  466. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs.js.map +1 -0
  467. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +7 -0
  468. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js.map +1 -0
  469. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +2 -0
  470. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js.map +1 -0
  471. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +2 -0
  472. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
  473. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +2 -0
  474. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
  475. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +2 -0
  476. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js.map +1 -0
  477. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +2 -0
  478. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
  479. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +2 -0
  480. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js.map +1 -0
  481. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +10 -0
  482. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  483. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +10 -0
  484. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  485. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +2 -0
  486. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js.map +1 -0
  487. package/dist/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.development.js +11 -0
  488. package/dist/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  489. package/dist/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.production.js +11 -0
  490. package/dist/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/cjs/react-is.production.js.map +1 -0
  491. package/dist/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/index.js +2 -0
  492. package/dist/node_modules/.pnpm/react-is@19.2.8/node_modules/react-is/index.js.map +1 -0
  493. package/dist/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js +2 -0
  494. package/dist/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js.map +1 -0
  495. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js +2 -0
  496. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  497. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js +2 -0
  498. package/dist/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
  499. package/dist/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js +2 -0
  500. package/dist/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js.map +1 -0
  501. package/package.json +287 -142
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownRenderer.js","sources":["../../../src/features/CitationRenderer/MarkdownRenderer.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport Markdown from 'react-markdown';\nimport { CSSProperties } from 'react';\n\nimport rehypeRaw from 'rehype-raw';\nimport remarkGfm from 'remark-gfm';\nimport { visit } from 'unist-util-visit';\nimport defaultStyles from './MarkdownRenderer.module.css';\n\nexport interface MarkdownRendererStyles {\n containerWrapper?: CSSProperties;\n mainCard?: CSSProperties;\n scrollArea?: CSSProperties;\n customHighlight?: CSSProperties;\n popup?: CSSProperties;\n summary?: CSSProperties;\n list?: CSSProperties;\n detailsBlock?: CSSProperties;\n detailsInline?: CSSProperties;\n detailsTarget?: CSSProperties;\n checkGreen?: CSSProperties;\n}\n\ntype Props = {\n value: string;\n highlightedText?: string;\n highlightKeys?: any[];\n scrollTo?: 'center' | 'start' | 'end';\n styles?: MarkdownRendererStyles;\n};\n\n/** ✓ → green in preview (inline with following text) */\nfunction rehypeGreenChecks() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'text', (node: any, index: number, parent: any) => {\n if (!parent || typeof node.value !== 'string') return;\n if (!node.value.includes('✓')) return;\n\n const parts = node.value.split('✓');\n const newChildren: any[] = [];\n for (let i = 0; i < parts.length; i++) {\n const text = parts[i];\n if (text) newChildren.push({ type: 'text', value: text });\n if (i < parts.length - 1) {\n newChildren.push({\n type: 'element',\n tagName: 'span',\n properties: {\n 'data-green-check': 'true',\n className: [defaultStyles.checkGreen],\n },\n children: [{ type: 'text', value: '✓' }],\n });\n }\n }\n parent.children.splice(index, 1, ...newChildren);\n return index + newChildren.length;\n });\n };\n}\n\n/** Unwrap <p><details>…</details></p> → <details>…</details> */\nfunction rehypeUnwrapParagraphDetails() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'element', (node: any, i: number, parent: any) => {\n if (!parent || node.tagName !== 'p') return;\n if (\n node.children &&\n node.children.length === 1 &&\n node.children[0].type === 'element' &&\n node.children[0].tagName === 'details'\n ) {\n parent.children.splice(i, 1, node.children[0]);\n return i;\n }\n });\n };\n}\n\n/** helper: treat whitespace-only text as ignorable */\nconst isWhitespaceText = (n: any) => n?.type === 'text' && /^\\s*$/.test(n.value ?? '');\n\nfunction rehypeWrapTargetContent() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'element', (node: any) => {\n if (node.tagName !== 'details') return;\n const props = node.properties || {};\n if (!('data-target' in props)) return;\n\n const children = node.children || [];\n let startIdx = 0;\n if (children[0]?.type === 'element' && children[0]?.tagName === 'summary') {\n startIdx = 1;\n }\n const rest = children.slice(startIdx);\n const meaningful = rest.filter((c: any) => !isWhitespaceText(c));\n\n if (\n meaningful.length === 1 &&\n meaningful[0].type === 'element' &&\n meaningful[0].properties &&\n ('data-popup' in meaningful[0].properties ||\n meaningful[0].properties['data-popup'] !== undefined)\n ) {\n return;\n }\n\n if (\n meaningful.some(\n (c: any) =>\n c?.type === 'element' &&\n c?.properties &&\n ('data-popup' in c.properties || c.properties['data-popup'] !== undefined),\n )\n ) {\n return;\n }\n\n const popupDiv = {\n type: 'element',\n tagName: 'div',\n properties: { 'data-popup': '' },\n children: rest,\n };\n node.children = children.slice(0, startIdx).concat([popupDiv]);\n });\n };\n}\n\nfunction rehypeWrapAnyDetailsBody() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'element', (node: any) => {\n if (node.tagName !== 'details') return;\n const props = node.properties || {};\n if ('data-inline' in props || 'data-target' in props) return;\n\n const children = node.children || [];\n let startIdx = 0;\n if (children[0]?.type === 'element' && children[0]?.tagName === 'summary') {\n startIdx = 1;\n }\n const rest = children.slice(startIdx);\n const meaningful = rest.filter((c: any) => !isWhitespaceText(c));\n\n if (\n meaningful.length === 1 &&\n meaningful[0].type === 'element' &&\n meaningful[0].properties &&\n ('data-popup' in meaningful[0].properties ||\n meaningful[0].properties['data-popup'] !== undefined)\n ) {\n return;\n }\n if (\n meaningful.some(\n (c: any) =>\n c?.type === 'element' &&\n c?.properties &&\n ('data-popup' in c.properties || c.properties['data-popup'] !== undefined),\n )\n ) {\n return;\n }\n\n const popupDiv = {\n type: 'element',\n tagName: 'div',\n properties: { 'data-popup': '' },\n children: rest,\n };\n node.children = children.slice(0, startIdx).concat([popupDiv]);\n });\n };\n}\n\nconst renderWithHighlights = (\n text: string, \n highlightedText?: string, \n customHighlightStyle?: CSSProperties\n): React.ReactNode => {\n if (!highlightedText || !highlightedText.trim()) return text;\n\n const escapeRegExp = (str: string) => str.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n const regex = new RegExp(`(${escapeRegExp(highlightedText)})`, 'gi');\n \n const parts = text.split(regex);\n\n return parts.map((part, i) => \n regex.test(part) ? (\n <mark \n key={i} \n className={defaultStyles.customHighlight} \n id=\"customHighlight\"\n style={customHighlightStyle} // Apply custom style\n >\n {part}\n </mark>\n ) : (\n part\n )\n );\n};\n\nconst MarkdownRenderer: React.FC<Props> = ({\n value,\n highlightedText,\n scrollTo,\n styles = {}, // Default to empty object\n}) => {\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const scrollRef = React.useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (highlightedText) {\n const timer = setTimeout(() => {\n if (scrollRef.current) {\n const highlightElement = scrollRef.current.querySelector('#customHighlight');\n\n if (highlightElement) {\n highlightElement.scrollIntoView({\n behavior: 'smooth',\n block: scrollTo ? scrollTo : 'center',\n });\n }\n }\n }, 225);\n return () => clearTimeout(timer);\n }\n }, [highlightedText, value]);\n\n const handleInlineToggle = (e: React.SyntheticEvent<HTMLDetailsElement>) => {\n const trigger = e.currentTarget;\n const id = trigger.getAttribute('data-inline');\n if (!id || !rootRef.current) return;\n\n const target = rootRef.current.querySelector<HTMLDetailsElement>(\n `details[data-target=\"${id}\"]`,\n );\n if (target) {\n target.open = trigger.open;\n }\n };\n\n return (\n <div \n ref={rootRef} // Attached to outer wrapper to help scope queries\n className={defaultStyles.containerWrapper} \n style={styles.containerWrapper}\n >\n <div \n className={defaultStyles.mainCard} \n style={styles.mainCard}\n >\n <div \n ref={scrollRef} \n className={defaultStyles.scrollArea} \n style={styles.scrollArea}\n >\n <Markdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={[\n rehypeRaw as any,\n rehypeUnwrapParagraphDetails,\n rehypeGreenChecks,\n rehypeWrapTargetContent,\n rehypeWrapAnyDetailsBody,\n ]}\n components={{\n details: ({ node, ...props }) => {\n const isInline = !!(props as any)['data-inline'];\n const isTarget = !!(props as any)['data-target'];\n \n let className = defaultStyles.detailsBlock;\n let style = styles.detailsBlock;\n\n if (isInline) {\n className = defaultStyles.detailsInline;\n style = styles.detailsInline;\n }\n if (isTarget) {\n className = defaultStyles.detailsTarget;\n style = styles.detailsTarget;\n }\n\n return (\n <details\n {...props}\n className={className}\n style={{ ...style, ...props.style }} // Merge with Markdown props if any\n onToggle={(e) => {\n e.stopPropagation();\n if (isInline) handleInlineToggle(e);\n }}\n >\n {isTarget && <summary className={defaultStyles.targetDummySummary} aria-hidden=\"true\" />}\n {props.children}\n </details>\n );\n },\n summary: ({ node, ...props }) => (\n <summary \n className={defaultStyles.summary} \n style={styles.summary}\n onClick={(e) => e.stopPropagation()} \n {...props}\n >\n {props.children}\n </summary>\n ),\n\n ul: (props) => <ul className={defaultStyles.list} style={styles.list} {...props} />,\n ol: (props) => <ol className={defaultStyles.list} style={styles.list} {...props} />,\n \n div: ({ node, ...props }) => {\n const isPopup = (node as any)?.properties && 'data-popup' in (node as any).properties;\n return (\n <div \n {...props} \n className={isPopup ? defaultStyles.popup : props.className} \n style={isPopup ? styles.popup : props.style}\n />\n );\n },\n \n // Handle the Green check that rehypeGreenChecks created\n span: ({node, ...props}) => {\n const isGreenCheck = (node as any)?.properties?.['data-green-check'] === 'true';\n if (isGreenCheck) {\n return <span {...props} style={styles.checkGreen} />;\n }\n return <span {...props} />;\n },\n\n p: function ({ children }) {\n const childArray = Array.isArray(children) ? children : [children];\n return (\n <p>\n {childArray.map((child, i) =>\n typeof child === 'string' ? (\n renderWithHighlights(child, highlightedText, styles.customHighlight)\n ) : (\n <React.Fragment key={i}>{child}</React.Fragment>\n ),\n )}\n </p>\n );\n },\n li: ({ children }) => {\n try {\n const childArray = children == null\n ? []\n : Array.isArray(children)\n ? children\n : [children];\n\n return (\n <li style={{ marginBottom: '4px' }}>\n {childArray?.map((child, index) =>\n typeof child === 'string'\n ? renderWithHighlights(child, highlightedText, styles.customHighlight)\n : <React.Fragment key={index}>{child}</React.Fragment>\n )}\n </li>\n );\n } catch (e) {\n console.error('Error rendering <li>:', e);\n return <li>{children}</li>;\n }\n },\n code: ({ children, ...props }) => (\n <code {...props}>\n {React.Children.map(children, (child) =>\n typeof child === 'string'\n ? renderWithHighlights(child, highlightedText, styles.customHighlight)\n : child,\n )}\n </code>\n ),\n }}\n >\n {value}\n </Markdown>\n </div>\n </div>\n </div>\n );\n};\n\nexport default MarkdownRenderer;\n"],"names":["rehypeGreenChecks","tree","visit","node","index","parent","value","includes","parts","split","newChildren","i","length","text","push","type","tagName","properties","className","defaultStyles","checkGreen","children","splice","rehypeUnwrapParagraphDetails","isWhitespaceText","n","test","rehypeWrapTargetContent","startIdx","rest","slice","meaningful","filter","c","some","popupDiv","concat","rehypeWrapAnyDetailsBody","props","renderWithHighlights","highlightedText","customHighlightStyle","trim","regex","RegExp","str","replace","map","part","jsx","customHighlight","id","style","MarkdownRenderer","scrollTo","styles","rootRef","React","useRef","scrollRef","useEffect","timer","setTimeout","current","highlightElement","querySelector","scrollIntoView","behavior","block","clearTimeout","ref","containerWrapper","mainCard","scrollArea","Markdown","remarkPlugins","remarkGfm","rehypePlugins","rehypeRaw","components","details","isInline","isTarget","detailsBlock","detailsInline","detailsTarget","jsxs","onToggle","e","stopPropagation","trigger","currentTarget","getAttribute","target","open","targetDummySummary","summary","onClick","ul","list","ol","div","isPopup","popup","span","p","childArray","Array","isArray","child","Fragment","li","marginBottom","console","error","code","Children"],"mappings":"kQAgCA,SAASA,IACP,OAAQC,IAENC,EAAMD,EAAM,OAAQ,CAACE,EAAWC,EAAeC,KAC7C,IAAKA,GAAgC,iBAAfF,EAAKG,MAAoB,OAC/C,IAAKH,EAAKG,MAAMC,SAAS,KAAM,OAE/B,MAAMC,EAAQL,EAAKG,MAAMG,MAAM,KACzBC,EAAqB,GAC3B,IAAA,IAASC,EAAI,EAAGA,EAAIH,EAAMI,OAAQD,IAAK,CAC/B,MAAAE,EAAOL,EAAMG,GACfE,KAAkBC,KAAK,CAAEC,KAAM,OAAQT,MAAOO,IAC9CF,EAAIH,EAAMI,OAAS,GACrBF,EAAYI,KAAK,CACfC,KAAM,UACNC,QAAS,OACTC,WAAY,CACV,mBAAoB,OACpBC,UAAW,CAACC,EAAcC,aAE5BC,SAAU,CAAC,CAAEN,KAAM,OAAQT,MAAO,OAGxC,CAEA,OADAD,EAAOgB,SAASC,OAAOlB,EAAO,KAAMM,GAC7BN,EAAQM,EAAYE,SAGj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AAOL,iBACpDD,EAACQ,EAAMqD,SAAN,CAA4BzF,YAARjB,YAIlCoF,GAEE,OADCyB,QAAAC,MAAM,wBAAyB1B,GAChCvC,EAAC,MAAI5B,YAChB,GAEJ8F,KAAM,EAAG9F,cAAaiB,KAClBW,EAAC,OAAM,IAAGX,EACPjB,SAAAoC,EAAM2D,SAASrE,IAAI1B,EAAWwF,GACZ,iBAAVA,EACHtE,EAAqBsE,EAAOrE,EAAiBe,EAAOL,iBACpD2D,MAMXxF,SAAAf"}
1
+ {"version":3,"file":"MarkdownRenderer.js","sources":["../../../src/features/CitationRenderer/MarkdownRenderer.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport Markdown from 'react-markdown';\nimport { CSSProperties } from 'react';\n\nimport rehypeRaw from 'rehype-raw';\nimport remarkGfm from 'remark-gfm';\nimport { visit } from 'unist-util-visit';\nimport defaultStyles from './MarkdownRenderer.module.css';\n\nexport interface MarkdownRendererStyles {\n containerWrapper?: CSSProperties;\n mainCard?: CSSProperties;\n scrollArea?: CSSProperties;\n customHighlight?: CSSProperties;\n popup?: CSSProperties;\n summary?: CSSProperties;\n list?: CSSProperties;\n detailsBlock?: CSSProperties;\n detailsInline?: CSSProperties;\n detailsTarget?: CSSProperties;\n checkGreen?: CSSProperties;\n}\n\ntype Props = {\n value: string;\n highlightedText?: string;\n highlightKeys?: any[];\n scrollTo?: 'center' | 'start' | 'end';\n styles?: MarkdownRendererStyles;\n};\n\n/** ✓ → green in preview (inline with following text) */\nfunction rehypeGreenChecks() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'text', (node: any, index: number, parent: any) => {\n if (!parent || typeof node.value !== 'string') return;\n if (!node.value.includes('✓')) return;\n\n const parts = node.value.split('✓');\n const newChildren: any[] = [];\n for (let i = 0; i < parts.length; i++) {\n const text = parts[i];\n if (text) newChildren.push({ type: 'text', value: text });\n if (i < parts.length - 1) {\n newChildren.push({\n type: 'element',\n tagName: 'span',\n properties: {\n 'data-green-check': 'true',\n className: [defaultStyles.checkGreen],\n },\n children: [{ type: 'text', value: '✓' }],\n });\n }\n }\n parent.children.splice(index, 1, ...newChildren);\n return index + newChildren.length;\n });\n };\n}\n\n/** Unwrap <p><details>…</details></p> → <details>…</details> */\nfunction rehypeUnwrapParagraphDetails() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'element', (node: any, i: number, parent: any) => {\n if (!parent || node.tagName !== 'p') return;\n if (\n node.children &&\n node.children.length === 1 &&\n node.children[0].type === 'element' &&\n node.children[0].tagName === 'details'\n ) {\n parent.children.splice(i, 1, node.children[0]);\n return i;\n }\n });\n };\n}\n\n/** helper: treat whitespace-only text as ignorable */\nconst isWhitespaceText = (n: any) => n?.type === 'text' && /^\\s*$/.test(n.value ?? '');\n\nfunction rehypeWrapTargetContent() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'element', (node: any) => {\n if (node.tagName !== 'details') return;\n const props = node.properties || {};\n if (!('data-target' in props)) return;\n\n const children = node.children || [];\n let startIdx = 0;\n if (children[0]?.type === 'element' && children[0]?.tagName === 'summary') {\n startIdx = 1;\n }\n const rest = children.slice(startIdx);\n const meaningful = rest.filter((c: any) => !isWhitespaceText(c));\n\n if (\n meaningful.length === 1 &&\n meaningful[0].type === 'element' &&\n meaningful[0].properties &&\n ('data-popup' in meaningful[0].properties ||\n meaningful[0].properties['data-popup'] !== undefined)\n ) {\n return;\n }\n\n if (\n meaningful.some(\n (c: any) =>\n c?.type === 'element' &&\n c?.properties &&\n ('data-popup' in c.properties || c.properties['data-popup'] !== undefined),\n )\n ) {\n return;\n }\n\n const popupDiv = {\n type: 'element',\n tagName: 'div',\n properties: { 'data-popup': '' },\n children: rest,\n };\n node.children = children.slice(0, startIdx).concat([popupDiv]);\n });\n };\n}\n\nfunction rehypeWrapAnyDetailsBody() {\n return (tree: any) => {\n // @ts-ignore\n visit(tree, 'element', (node: any) => {\n if (node.tagName !== 'details') return;\n const props = node.properties || {};\n if ('data-inline' in props || 'data-target' in props) return;\n\n const children = node.children || [];\n let startIdx = 0;\n if (children[0]?.type === 'element' && children[0]?.tagName === 'summary') {\n startIdx = 1;\n }\n const rest = children.slice(startIdx);\n const meaningful = rest.filter((c: any) => !isWhitespaceText(c));\n\n if (\n meaningful.length === 1 &&\n meaningful[0].type === 'element' &&\n meaningful[0].properties &&\n ('data-popup' in meaningful[0].properties ||\n meaningful[0].properties['data-popup'] !== undefined)\n ) {\n return;\n }\n if (\n meaningful.some(\n (c: any) =>\n c?.type === 'element' &&\n c?.properties &&\n ('data-popup' in c.properties || c.properties['data-popup'] !== undefined),\n )\n ) {\n return;\n }\n\n const popupDiv = {\n type: 'element',\n tagName: 'div',\n properties: { 'data-popup': '' },\n children: rest,\n };\n node.children = children.slice(0, startIdx).concat([popupDiv]);\n });\n };\n}\n\nconst renderWithHighlights = (\n text: string, \n highlightedText?: string, \n customHighlightStyle?: CSSProperties\n): React.ReactNode => {\n if (!highlightedText || !highlightedText.trim()) return text;\n\n const escapeRegExp = (str: string) => str.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n const regex = new RegExp(`(${escapeRegExp(highlightedText)})`, 'gi');\n \n const parts = text.split(regex);\n\n return parts.map((part, i) => \n regex.test(part) ? (\n <mark \n key={i} \n className={defaultStyles.customHighlight} \n id=\"customHighlight\"\n style={customHighlightStyle} // Apply custom style\n >\n {part}\n </mark>\n ) : (\n part\n )\n );\n};\n\nconst MarkdownRenderer: React.FC<Props> = ({\n value,\n highlightedText,\n scrollTo,\n styles = {}, // Default to empty object\n}) => {\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const scrollRef = React.useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (highlightedText) {\n const timer = setTimeout(() => {\n if (scrollRef.current) {\n const highlightElement = scrollRef.current.querySelector('#customHighlight');\n\n if (highlightElement) {\n highlightElement.scrollIntoView({\n behavior: 'smooth',\n block: scrollTo ? scrollTo : 'center',\n });\n }\n }\n }, 225);\n return () => clearTimeout(timer);\n }\n }, [highlightedText, value]);\n\n const handleInlineToggle = (e: React.SyntheticEvent<HTMLDetailsElement>) => {\n const trigger = e.currentTarget;\n const id = trigger.getAttribute('data-inline');\n if (!id || !rootRef.current) return;\n\n const target = rootRef.current.querySelector<HTMLDetailsElement>(\n `details[data-target=\"${id}\"]`,\n );\n if (target) {\n target.open = trigger.open;\n }\n };\n\n return (\n <div \n ref={rootRef} // Attached to outer wrapper to help scope queries\n className={defaultStyles.containerWrapper} \n style={styles.containerWrapper}\n >\n <div \n className={defaultStyles.mainCard} \n style={styles.mainCard}\n >\n <div \n ref={scrollRef} \n className={defaultStyles.scrollArea} \n style={styles.scrollArea}\n >\n <Markdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={[\n rehypeRaw as any,\n rehypeUnwrapParagraphDetails,\n rehypeGreenChecks,\n rehypeWrapTargetContent,\n rehypeWrapAnyDetailsBody,\n ]}\n components={{\n details: ({ node, ...props }) => {\n const isInline = !!(props as any)['data-inline'];\n const isTarget = !!(props as any)['data-target'];\n \n let className = defaultStyles.detailsBlock;\n let style = styles.detailsBlock;\n\n if (isInline) {\n className = defaultStyles.detailsInline;\n style = styles.detailsInline;\n }\n if (isTarget) {\n className = defaultStyles.detailsTarget;\n style = styles.detailsTarget;\n }\n\n return (\n <details\n {...props}\n className={className}\n style={{ ...style, ...props.style }} // Merge with Markdown props if any\n onToggle={(e) => {\n e.stopPropagation();\n if (isInline) handleInlineToggle(e);\n }}\n >\n {isTarget && <summary className={defaultStyles.targetDummySummary} aria-hidden=\"true\" />}\n {props.children}\n </details>\n );\n },\n summary: ({ node, ...props }) => (\n <summary \n className={defaultStyles.summary} \n style={styles.summary}\n onClick={(e) => e.stopPropagation()} \n {...props}\n >\n {props.children}\n </summary>\n ),\n\n ul: (props) => <ul className={defaultStyles.list} style={styles.list} {...props} />,\n ol: (props) => <ol className={defaultStyles.list} style={styles.list} {...props} />,\n \n div: ({ node, ...props }) => {\n const isPopup = (node as any)?.properties && 'data-popup' in (node as any).properties;\n return (\n <div \n {...props} \n className={isPopup ? defaultStyles.popup : props.className} \n style={isPopup ? styles.popup : props.style}\n />\n );\n },\n \n // Handle the Green check that rehypeGreenChecks created\n span: ({node, ...props}) => {\n const isGreenCheck = (node as any)?.properties?.['data-green-check'] === 'true';\n if (isGreenCheck) {\n return <span {...props} style={styles.checkGreen} />;\n }\n return <span {...props} />;\n },\n\n p: function ({ children }) {\n const childArray = Array.isArray(children) ? children : [children];\n return (\n <p>\n {childArray.map((child, i) =>\n typeof child === 'string' ? (\n renderWithHighlights(child, highlightedText, styles.customHighlight)\n ) : (\n <React.Fragment key={i}>{child}</React.Fragment>\n ),\n )}\n </p>\n );\n },\n li: ({ children }) => {\n try {\n const childArray = children == null\n ? []\n : Array.isArray(children)\n ? children\n : [children];\n\n return (\n <li style={{ marginBottom: '4px' }}>\n {childArray?.map((child, index) =>\n typeof child === 'string'\n ? renderWithHighlights(child, highlightedText, styles.customHighlight)\n : <React.Fragment key={index}>{child}</React.Fragment>\n )}\n </li>\n );\n } catch (e) {\n console.error('Error rendering <li>:', e);\n return <li>{children}</li>;\n }\n },\n code: ({ children, ...props }) => (\n <code {...props}>\n {React.Children.map(children, (child) =>\n typeof child === 'string'\n ? renderWithHighlights(child, highlightedText, styles.customHighlight)\n : child,\n )}\n </code>\n ),\n }}\n >\n {value}\n </Markdown>\n </div>\n </div>\n </div>\n );\n};\n\nexport default MarkdownRenderer;\n"],"names":["rehypeGreenChecks","tree","visit","node","index","parent","value","includes","parts","split","newChildren","i","length","text","push","type","tagName","properties","className","defaultStyles","checkGreen","children","splice","rehypeUnwrapParagraphDetails","isWhitespaceText","n","test","rehypeWrapTargetContent","startIdx","rest","slice","meaningful","filter","c","some","popupDiv","concat","rehypeWrapAnyDetailsBody","props","renderWithHighlights","highlightedText","customHighlightStyle","trim","regex","RegExp","str","replace","map","part","jsx","customHighlight","id","style","MarkdownRenderer","scrollTo","styles","rootRef","React","useRef","scrollRef","useEffect","timer","setTimeout","current","highlightElement","querySelector","scrollIntoView","behavior","block","clearTimeout","ref","containerWrapper","mainCard","scrollArea","Markdown","remarkPlugins","remarkGfm","rehypePlugins","rehypeRaw","components","details","isInline","isTarget","detailsBlock","detailsInline","detailsTarget","jsxs","onToggle","e","stopPropagation","trigger","currentTarget","getAttribute","target","open","targetDummySummary","summary","onClick","ul","list","ol","div","isPopup","popup","span","p","childArray","Array","isArray","child","Fragment","li","marginBottom","console","error","code","Children"],"mappings":"4UAgCA,SAASA,IACP,OAAQC,IAENC,EAAMD,EAAM,OAAQ,CAACE,EAAWC,EAAeC,KAC7C,IAAKA,GAAgC,iBAAfF,EAAKG,MAAoB,OAC/C,IAAKH,EAAKG,MAAMC,SAAS,KAAM,OAE/B,MAAMC,EAAQL,EAAKG,MAAMG,MAAM,KACzBC,EAAqB,GAC3B,IAAA,IAASC,EAAI,EAAGA,EAAIH,EAAMI,OAAQD,IAAK,CAC/B,MAAAE,EAAOL,EAAMG,GACfE,KAAkBC,KAAK,CAAEC,KAAM,OAAQT,MAAOO,IAC9CF,EAAIH,EAAMI,OAAS,GACrBF,EAAYI,KAAK,CACfC,KAAM,UACNC,QAAS,OACTC,WAAY,CACV,mBAAoB,OACpBC,UAAW,CAACC,EAAcC,aAE5BC,SAAU,CAAC,CAAEN,KAAM,OAAQT,MAAO,OAGxC,CAEA,OADAD,EAAOgB,SAASC,OAAOlB,EAAO,KAAMM,GAC7BN,EAAQM,EAAYE,SAGjC,CAGA,SAASW,IACP,OAAQtB,IAENC,EAAMD,EAAM,UAAW,CAACE,EAAWQ,EAAWN,KAC5C,GAAKA,GAA2B,MAAjBF,EAAKa,QACpB,OACEb,EAAKkB,UACoB,IAAzBlB,EAAKkB,SAAST,QACY,YAA1BT,EAAKkB,SAAS,GAAGN,MACY,YAA7BZ,EAAKkB,SAAS,GAAGL,SAEjBX,EAAOgB,SAASC,OAAOX,EAAG,EAAGR,EAAKkB,SAAS,IACpCV,QAPT,IAWN,CAGA,MAAMa,EAAoBC,GAAuB,SAAZ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jsxs as e,jsx as r}from"react/jsx-runtime";import{useRef as t,useEffect as o}from"react";import{highlightMatch as i}from"./utils/helper.js";import"./css/excel-citation.css.js";const n=({data:n,highlightRow:l,loading:d,highlightText:a,isErrored:s})=>{const c=t(null);if(o(()=>{if(!l||!a||d)return;const e=setTimeout(()=>{const e=c.current;if(!e)return;const r=e.querySelector('[data-highlight="true"]');r&&r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},200);return()=>clearTimeout(e)},[l,a,d,n]),d)return e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.7)",backdropFilter:"blur(4px)"},children:[r("div",{style:{height:"2rem",width:"2rem",borderRadius:"9999px",border:"3px solid #d1d5db",borderTopColor:"#3b82f6",animation:"excel-citation-loader-spin 1s linear infinite"}}),r("span",{style:{marginTop:"0.5rem",fontSize:"0.875rem",color:"#4b5563"},children:"Fetching citations…"})]});if(s)return r("div",{style:{padding:"0.75rem 1rem",fontSize:"0.875rem",color:"#4b5563",backgroundColor:"white",border:"1px solid #e5e7eb",borderRadius:"2px"},children:"We are having trouble fetching the citations."});const h=Object.values(n??{}).reduce((e,r)=>Math.max(e,r.length),0);return r("div",{style:{padding:"0.5rem 1rem",backgroundColor:"white"},children:r("div",{ref:c,style:{position:"relative",maxHeight:"500px",overflow:"auto",border:"1px solid #d1d5db",borderRadius:"2px",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:r("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"0.875rem"},children:r("tbody",{children:Object.entries(n??{}).map(([t,o])=>{const n=Number(t),d=1===n,s=n===l,c=s&&!!a&&o.some(e=>e.toLowerCase().includes(a.toLowerCase()));return e("tr",{"data-highlight":s?"true":"false",style:{transition:"background-color 0.2s",position:d?"sticky":"static",top:d?0:"auto",zIndex:d?9:"auto",fontWeight:d?"bold":"normal",backgroundColor:d?"white":"transparent",boxShadow:d?"0 1px 2px 0 rgba(0, 0, 0, 0.05)":"none"},children:[r("td",{style:{position:"sticky",left:0,zIndex:8,width:"3rem",textAlign:"center",border:"1px solid #e5e7eb",minWidth:"0.5rem",padding:"0 0.5rem",backgroundColor:n!==l||c?"#f1f5f9":"#fef08a"},children:d?null:n}),o.map((e,t)=>r("td",{style:{padding:"0.5rem 0.75rem",border:"1px solid #e5e7eb",color:"#374151",whiteSpace:"nowrap",backgroundColor:!c&&s?"#fef08a":"transparent"},children:a&&s&&c?i(e,a):e},t)),o.length<h&&Array.from({length:h-o.length}).map((e,t)=>r("td",{style:{border:"1px solid #e5e7eb",backgroundColor:"rgba(249, 250, 251, 0.3)"}},`empty-${t}`))]},n)})})})})})};export{n as default};
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useRef as t,useEffect as o}from"react";import{highlightMatch as i}from"./utils/helper.js";const n=({data:n,highlightRow:l,loading:d,highlightText:a,isErrored:s})=>{const c=t(null);if(o(()=>{if(!l||!a||d)return;const e=setTimeout(()=>{const e=c.current;if(!e)return;const r=e.querySelector('[data-highlight="true"]');r&&r.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},200);return()=>clearTimeout(e)},[l,a,d,n]),d)return e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.7)",backdropFilter:"blur(4px)"},children:[r("div",{style:{height:"2rem",width:"2rem",borderRadius:"9999px",border:"3px solid #d1d5db",borderTopColor:"#3b82f6",animation:"excel-citation-loader-spin 1s linear infinite"}}),r("span",{style:{marginTop:"0.5rem",fontSize:"0.875rem",color:"#4b5563"},children:"Fetching citations…"})]});if(s)return r("div",{style:{padding:"0.75rem 1rem",fontSize:"0.875rem",color:"#4b5563",backgroundColor:"white",border:"1px solid #e5e7eb",borderRadius:"2px"},children:"We are having trouble fetching the citations."});const h=Object.values(n??{}).reduce((e,r)=>Math.max(e,r.length),0);return r("div",{style:{padding:"0.5rem 1rem",backgroundColor:"white"},children:r("div",{ref:c,style:{position:"relative",maxHeight:"500px",overflow:"auto",border:"1px solid #d1d5db",borderRadius:"2px",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:r("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"0.875rem"},children:r("tbody",{children:Object.entries(n??{}).map(([t,o])=>{const n=Number(t),d=1===n,s=n===l,c=s&&!!a&&o.some(e=>e.toLowerCase().includes(a.toLowerCase()));return e("tr",{"data-highlight":s?"true":"false",style:{transition:"background-color 0.2s",position:d?"sticky":"static",top:d?0:"auto",zIndex:d?9:"auto",fontWeight:d?"bold":"normal",backgroundColor:d?"white":"transparent",boxShadow:d?"0 1px 2px 0 rgba(0, 0, 0, 0.05)":"none"},children:[r("td",{style:{position:"sticky",left:0,zIndex:8,width:"3rem",textAlign:"center",border:"1px solid #e5e7eb",minWidth:"0.5rem",padding:"0 0.5rem",backgroundColor:n!==l||c?"#f1f5f9":"#fef08a"},children:d?null:n}),o.map((e,t)=>r("td",{style:{padding:"0.5rem 0.75rem",border:"1px solid #e5e7eb",color:"#374151",whiteSpace:"nowrap",backgroundColor:!c&&s?"#fef08a":"transparent"},children:a&&s&&c?i(e,a):e},t)),o.length<h&&Array.from({length:h-o.length}).map((e,t)=>r("td",{style:{border:"1px solid #e5e7eb",backgroundColor:"rgba(249, 250, 251, 0.3)"}},`empty-${t}`))]},n)})})})})})};export{n as default};
2
2
  //# sourceMappingURL=ExcelCitations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExcelCitations.js","sources":["../../../src/features/ExcelCitation/ExcelCitations.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\nimport { highlightMatch } from \"./utils/helper\";\nimport \"./css/excel-citation.css\";\n\nexport interface DataDict {\n [key: number]: string[];\n}\n\ninterface ExcelCitationProps {\n data: DataDict;\n highlightRow?: number;\n loading: boolean;\n isErrored: boolean;\n highlightText?: string | null;\n}\n\nconst ExcelCitation: React.FC<ExcelCitationProps> = ({\n data,\n highlightRow,\n loading,\n highlightText,\n isErrored,\n}) => {\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!highlightRow || !highlightText || loading) return;\n\n const timeout = setTimeout(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const highlightedEl = container.querySelector(\n '[data-highlight=\"true\"]',\n ) as HTMLElement | null;\n\n if (highlightedEl) {\n highlightedEl.scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n inline: \"center\",\n });\n }\n }, 200);\n\n return () => clearTimeout(timeout);\n }, [highlightRow, highlightText, loading, data]);\n\n // Loading State\n if (loading) {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(255, 255, 255, 0.7)\",\n backdropFilter: \"blur(4px)\",\n }}\n >\n <div\n style={{\n height: \"2rem\",\n width: \"2rem\",\n borderRadius: \"9999px\",\n border: \"3px solid #d1d5db\",\n borderTopColor: \"#3b82f6\",\n animation: \"excel-citation-loader-spin 1s linear infinite\",\n }}\n />\n\n <span\n style={{\n marginTop: \"0.5rem\",\n fontSize: \"0.875rem\",\n color: \"#4b5563\",\n }}\n >\n Fetching citations…\n </span>\n </div>\n );\n }\n\n // Error State\n if (isErrored) {\n return (\n <div\n style={{\n padding: \"0.75rem 1rem\",\n fontSize: \"0.875rem\",\n color: \"#4b5563\",\n backgroundColor: \"white\",\n border: \"1px solid #e5e7eb\",\n borderRadius: \"2px\",\n }}\n >\n We are having trouble fetching the citations.\n </div>\n );\n }\n\n const maxCols = Object.values(data ?? {}).reduce(\n (max, arr) => Math.max(max, arr.length),\n 0,\n );\n\n return (\n <div style={{ padding: \"0.5rem 1rem\", backgroundColor: \"white\" }}>\n <div\n ref={containerRef}\n style={{\n position: \"relative\",\n maxHeight: \"500px\",\n overflow: \"auto\",\n border: \"1px solid #d1d5db\",\n borderRadius: \"2px\",\n boxShadow: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n }}\n >\n <table\n style={{\n width: \"100%\",\n borderCollapse: \"collapse\",\n fontSize: \"0.875rem\",\n }}\n >\n <tbody>\n {Object.entries(data ?? {}).map(([key, values]) => {\n const rowId = Number(key);\n const isHeaderRow = rowId === 1;\n const isHighlighted = rowId === highlightRow;\n const rowHasMatch =\n isHighlighted &&\n !!highlightText &&\n values.some((cell: string) =>\n cell.toLowerCase().includes(highlightText.toLowerCase()),\n );\n\n return (\n <tr\n key={rowId}\n data-highlight={isHighlighted ? \"true\" : \"false\"}\n style={{\n transition: \"background-color 0.2s\",\n position: isHeaderRow ? \"sticky\" : \"static\",\n top: isHeaderRow ? 0 : \"auto\",\n zIndex: isHeaderRow ? 9 : \"auto\",\n fontWeight: isHeaderRow ? \"bold\" : \"normal\",\n backgroundColor: isHeaderRow ? \"white\" : \"transparent\",\n boxShadow: isHeaderRow\n ? \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\"\n : \"none\",\n }}\n >\n {/* Row Number Column */}\n <td\n style={{\n position: \"sticky\",\n left: 0,\n zIndex: 8,\n width: \"3rem\",\n textAlign: \"center\",\n border: \"1px solid #e5e7eb\",\n minWidth: \"0.5rem\",\n padding: \"0 0.5rem\",\n backgroundColor:\n rowId === highlightRow && !rowHasMatch\n ? \"#fef08a\"\n : \"#f1f5f9\",\n }}\n >\n {isHeaderRow ? null : rowId}\n </td>\n\n {/* Data Cells */}\n {values.map((cell: string, idx: number) => (\n <td\n key={idx}\n style={{\n padding: \"0.5rem 0.75rem\",\n border: \"1px solid #e5e7eb\",\n color: \"#374151\",\n whiteSpace: \"nowrap\",\n backgroundColor:\n !rowHasMatch && isHighlighted\n ? \"#fef08a\"\n : \"transparent\",\n }}\n >\n {!highlightText || !isHighlighted || !rowHasMatch\n ? cell\n : highlightMatch(cell, highlightText)}\n </td>\n ))}\n\n {/* Fill empty columns if row is shorter than max */}\n {values.length < maxCols &&\n Array.from({ length: maxCols - values.length }).map(\n (_, i) => (\n <td\n key={`empty-${i}`}\n style={{\n border: \"1px solid #e5e7eb\",\n backgroundColor: \"rgba(249, 250, 251, 0.3)\",\n }}\n />\n ),\n )}\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n </div>\n );\n};\n\nexport default ExcelCitation;\n"],"names":["ExcelCitation","data","highlightRow","loading","highlightText","isErrored","containerRef","useRef","useEffect","timeout","setTimeout","container","current","highlightedEl","querySelector","scrollIntoView","behavior","block","inline","clearTimeout","jsxs","style","display","flexDirection","alignItems","justifyContent","backgroundColor","backdropFilter","children","jsx","height","width","borderRadius","border","borderTopColor","animation","marginTop","fontSize","color","padding","maxCols","Object","values","reduce","max","arr","Math","length","ref","position","maxHeight","overflow","boxShadow","borderCollapse","entries","map","key","rowId","Number","isHeaderRow","isHighlighted","rowHasMatch","some","cell","toLowerCase","includes","transition","top","zIndex","fontWeight","left","textAlign","minWidth","idx","whiteSpace","highlightMatch","Array","from","_","i"],"mappings":"uLAgBA,MAAMA,EAA8C,EAClDC,OACAC,eACAC,UACAC,gBACAC,gBAEM,MAAAC,EAAeC,EAA8B,MA0BnD,GAxBAC,EAAU,KACR,IAAKN,IAAiBE,GAAiBD,EAAS,OAE1C,MAAAM,EAAUC,WAAW,KACzB,MAAMC,EAAYL,EAAaM,QAC/B,IAAKD,EAAW,OAEhB,MAAME,EAAgBF,EAAUG,cAC9B,2BAGED,GACFA,EAAcE,eAAe,CAC3BC,SAAU,SACVC,MAAO,SACPC,OAAQ,YAGX,KAEI,MAAA,IAAMC,aAAaV,IACzB,CAACP,EAAcE,EAAeD,EAASF,IAGtCE,EAEA,OAAAiB,EAAC,MAAA,CACCC,MAAO,CACLC,QAAS,OACTC,cAAe,SACfC,WAAY,SACZC,eAAgB,SAChBC,gBAAiB,2BACjBC,eAAgB,aAGlBC,SAAA,CAAAC,EAAC,MAAA,CACCR,MAAO,CACLS,OAAQ,OACRC,MAAO,OACPC,aAAc,SACdC,OAAQ,oBACRC,eAAgB,UAChBC,UAAW,mDAIfN,EAAC,OAAA,CACCR,MAAO,CACLe,UAAW,SACXC,SAA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ACTb,gBACE+B,IAAUvD,GAAiB2D,EAEvB,UADA,WAIPjC,WAAc,KAAO6B,IAIvBf,EAAOa,IAAI,CAACQ,EAAcU,IACzB5C,EAAC,KAAA,CAECR,MAAO,CACLkB,QAAS,iBACTN,OAAQ,oBACRK,MAAO,UACPoC,WAAY,SACZhD,iBACGmC,GAAeD,EACZ,UACA,eAGPhC,SAACxB,GAAkBwD,GAAkBC,EAElCc,EAAeZ,EAAM3D,GADrB2D,GAbCU,IAmBR/B,EAAOK,OAASP,GACfoC,MAAMC,KAAK,CAAE9B,OAAQP,EAAUE,EAAOK,SAAUQ,IAC9C,CAACuB,EAAGC,IACFlD,EAAC,KAAA,CAECR,MAAO,CACLY,OAAQ,oBACRP,gBAAiB,6BAHd,SAASqD,QA5DjBtB"}
1
+ {"version":3,"file":"ExcelCitations.js","sources":["../../../src/features/ExcelCitation/ExcelCitations.tsx"],"sourcesContent":["import React, { useEffect, useRef } from \"react\";\nimport { highlightMatch } from \"./utils/helper\";\nimport \"./css/excel-citation.css\";\n\nexport interface DataDict {\n [key: number]: string[];\n}\n\ninterface ExcelCitationProps {\n data: DataDict;\n highlightRow?: number;\n loading: boolean;\n isErrored: boolean;\n highlightText?: string | null;\n}\n\nconst ExcelCitation: React.FC<ExcelCitationProps> = ({\n data,\n highlightRow,\n loading,\n highlightText,\n isErrored,\n}) => {\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!highlightRow || !highlightText || loading) return;\n\n const timeout = setTimeout(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const highlightedEl = container.querySelector(\n '[data-highlight=\"true\"]',\n ) as HTMLElement | null;\n\n if (highlightedEl) {\n highlightedEl.scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n inline: \"center\",\n });\n }\n }, 200);\n\n return () => clearTimeout(timeout);\n }, [highlightRow, highlightText, loading, data]);\n\n // Loading State\n if (loading) {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: \"rgba(255, 255, 255, 0.7)\",\n backdropFilter: \"blur(4px)\",\n }}\n >\n <div\n style={{\n height: \"2rem\",\n width: \"2rem\",\n borderRadius: \"9999px\",\n border: \"3px solid #d1d5db\",\n borderTopColor: \"#3b82f6\",\n animation: \"excel-citation-loader-spin 1s linear infinite\",\n }}\n />\n\n <span\n style={{\n marginTop: \"0.5rem\",\n fontSize: \"0.875rem\",\n color: \"#4b5563\",\n }}\n >\n Fetching citations…\n </span>\n </div>\n );\n }\n\n // Error State\n if (isErrored) {\n return (\n <div\n style={{\n padding: \"0.75rem 1rem\",\n fontSize: \"0.875rem\",\n color: \"#4b5563\",\n backgroundColor: \"white\",\n border: \"1px solid #e5e7eb\",\n borderRadius: \"2px\",\n }}\n >\n We are having trouble fetching the citations.\n </div>\n );\n }\n\n const maxCols = Object.values(data ?? {}).reduce(\n (max, arr) => Math.max(max, arr.length),\n 0,\n );\n\n return (\n <div style={{ padding: \"0.5rem 1rem\", backgroundColor: \"white\" }}>\n <div\n ref={containerRef}\n style={{\n position: \"relative\",\n maxHeight: \"500px\",\n overflow: \"auto\",\n border: \"1px solid #d1d5db\",\n borderRadius: \"2px\",\n boxShadow: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n }}\n >\n <table\n style={{\n width: \"100%\",\n borderCollapse: \"collapse\",\n fontSize: \"0.875rem\",\n }}\n >\n <tbody>\n {Object.entries(data ?? {}).map(([key, values]) => {\n const rowId = Number(key);\n const isHeaderRow = rowId === 1;\n const isHighlighted = rowId === highlightRow;\n const rowHasMatch =\n isHighlighted &&\n !!highlightText &&\n values.some((cell: string) =>\n cell.toLowerCase().includes(highlightText.toLowerCase()),\n );\n\n return (\n <tr\n key={rowId}\n data-highlight={isHighlighted ? \"true\" : \"false\"}\n style={{\n transition: \"background-color 0.2s\",\n position: isHeaderRow ? \"sticky\" : \"static\",\n top: isHeaderRow ? 0 : \"auto\",\n zIndex: isHeaderRow ? 9 : \"auto\",\n fontWeight: isHeaderRow ? \"bold\" : \"normal\",\n backgroundColor: isHeaderRow ? \"white\" : \"transparent\",\n boxShadow: isHeaderRow\n ? \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\"\n : \"none\",\n }}\n >\n {/* Row Number Column */}\n <td\n style={{\n position: \"sticky\",\n left: 0,\n zIndex: 8,\n width: \"3rem\",\n textAlign: \"center\",\n border: \"1px solid #e5e7eb\",\n minWidth: \"0.5rem\",\n padding: \"0 0.5rem\",\n backgroundColor:\n rowId === highlightRow && !rowHasMatch\n ? \"#fef08a\"\n : \"#f1f5f9\",\n }}\n >\n {isHeaderRow ? null : rowId}\n </td>\n\n {/* Data Cells */}\n {values.map((cell: string, idx: number) => (\n <td\n key={idx}\n style={{\n padding: \"0.5rem 0.75rem\",\n border: \"1px solid #e5e7eb\",\n color: \"#374151\",\n whiteSpace: \"nowrap\",\n backgroundColor:\n !rowHasMatch && isHighlighted\n ? \"#fef08a\"\n : \"transparent\",\n }}\n >\n {!highlightText || !isHighlighted || !rowHasMatch\n ? cell\n : highlightMatch(cell, highlightText)}\n </td>\n ))}\n\n {/* Fill empty columns if row is shorter than max */}\n {values.length < maxCols &&\n Array.from({ length: maxCols - values.length }).map(\n (_, i) => (\n <td\n key={`empty-${i}`}\n style={{\n border: \"1px solid #e5e7eb\",\n backgroundColor: \"rgba(249, 250, 251, 0.3)\",\n }}\n />\n ),\n )}\n </tr>\n );\n })}\n </tbody>\n </table>\n </div>\n </div>\n );\n};\n\nexport default ExcelCitation;\n"],"names":["ExcelCitation","data","highlightRow","loading","highlightText","isErrored","containerRef","useRef","useEffect","timeout","setTimeout","container","current","highlightedEl","querySelector","scrollIntoView","behavior","block","inline","clearTimeout","jsxs","style","display","flexDirection","alignItems","justifyContent","backgroundColor","backdropFilter","children","jsx","height","width","borderRadius","border","borderTopColor","animation","marginTop","fontSize","color","padding","maxCols","Object","values","reduce","max","arr","Math","length","ref","position","maxHeight","overflow","boxShadow","borderCollapse","entries","map","key","rowId","Number","isHeaderRow","isHighlighted","rowHasMatch","some","cell","toLowerCase","includes","transition","top","zIndex","fontWeight","left","textAlign","minWidth","idx","whiteSpace","highlightMatch","Array","from","_","i"],"mappings":"mJAgBA,MAAMA,EAA8C,EAClDC,OACAC,eACAC,UACAC,gBACAC,gBAEM,MAAAC,EAAeC,EAA8B,MA0BnD,GAxBAC,EAAU,KACR,IAAKN,IAAiBE,GAAiBD,EAAS,OAE1C,MAAAM,EAAUC,WAAW,KACzB,MAAMC,EAAYL,EAAaM,QAC/B,IAAKD,EAAW,OAEhB,MAAME,EAAgBF,EAAUG,cAC9B,2BAGED,GACFA,EAAcE,eAAe,CAC3BC,SAAU,SACVC,MAAO,SACPC,OAAQ,YAGX,KAEI,MAAA,IAAMC,aAAaV,IACzB,CAACP,EAAcE,EAAeD,EAASF,IAGtCE,EAEA,OAAAiB,EAAC,MAAA,CACCC,MAAO,CACLC,QAAS,OACTC,cAAe,SACfC,WAAY,SACZC,eAAgB,SAChBC,gBAAiB,2BACjBC,eAAgB,aAGlBC,SAAA,CAAAC,EAAC,MAAA,CACCR,MAAO,CACLS,OAAQ,OACRC,MAAO,OACPC,aAAc,SACdC,OAAQ,oBACRC,eAAgB,UAChBC,UAAW,mDAIfN,EAAC,OAAA,CACCR,MAAO,CACLe,UAAW,SACXC,SAAU,WACVC,MAAO,WAEVV,SAAA,2BAQP,GAAIvB,EAEA,OAAAwB,EAAC,MAAA,CACCR,MAAO,CACLkB,QAAS,eACTF,SAAU,WACVC,MAAO,UACPZ,gBAAiB,QACjBO,OAAQ,oBACRD,aAAc,OAEjBJ,SAAA,kDAML,MAAMY,EAAUC,OAAOC,OAAOzC,GAAQ,CAAA,GAAI0C,OACxC,CAACC,EAAKC,IAAQC,KAAKF,IAAIA,EAAKC,EAAIE,QAChC,GAIA,OAAAlB,EAAC,OAAIR,MAAO,CAAEkB,QAAS,cAAeb,gBAAiB,SACrDE,SAAAC,EAAC,MAAA,CACCmB,IAAK1C,EACLe,M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C,KAAA,CAECR,MAAO,CACLY,OAAQ,oBACRP,gBAAiB,6BAHd,SAASqD,QA5DjBtB"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{SpecialZoomLevel as r}from"@react-pdf-viewer/core";import n from"./PdfContainer.js";import i from"./PdfToolbar.js";import{pdfStyles as a}from"./PdfStyle.js";import{PdfHighlightControls as s}from"./usePdfHighlight.js";import{rotationManager as c}from"./rotationManager.js";import"@react-pdf-viewer/zoom/lib/styles/index.css";import"@react-pdf-viewer/page-navigation/lib/styles/index.css";import"@react-pdf-viewer/core/lib/styles/index.css";import"@react-pdf-viewer/search/lib/styles/index.css";import l,{useRef as u,useState as d,useMemo as g,useEffect as h}from"react";import m from"../ScannedDocCitation/ScannedDocCitation.js";import"./PdfViewer.css.js";const p=({pdfUrl:p,highlightText:f,highlightPages:v,highlightCordinatePages:w,highlightColor:y="yellow",activeHighlightColor:P="#f7dc51",jumpToPageValue:T=0,pdfName:x,onClose:C,customStyles:b,customClasses:S,customIcons:A,useCoordinates:R,fallbackPages:I,activeCitationIndex:_,onActiveCitationChange:q,headerAction:L,isZoomEnabled:F=!0,showHighlightsAction:H=!0,defaultScale:j=r.ActualSize,useRange:N=!1,rangeOfPages:B=null,showFullScreenAction:M=!0,showRotateButton:E=!1,segments:V=[{title:"Document 2",start_page:52,end_page:52,page_count:1}],segmentTooltipText:k,onCurrentPageChange:z,navigationRequest:D,onNavigationSettled:W,disablePdfAnnotations:O=!1,disablePdfTextLayer:U=!1,renderPage:$,setRenderRange:Z})=>{const J=u(null),K=(e=>{switch(e){case"ActualSize":return r.ActualSize;case"PageFit":return r.PageFit;case"PageWidth":return r.PageWidth;default:return e??r.PageWidth}})(j),[G,Q]=d(0),[X,Y]=d(0),[ee,te]=d(0),oe=u(null),re=u(null),ne=u(0),ie=u(null),ae=g(()=>{if(!p)return"";try{return new URL(p,window.location.origin).pathname.split("/").pop()||"default"}catch{return"default"}},[p]);h(()=>{ae&&c.setPdfIdentifier(ae)},[ae]);h(()=>c.onRotationChange((e,t)=>{e===G+1&&te(t)}),[G]),h(()=>{const e=new MutationObserver(()=>{const e=J.current?.querySelectorAll('[data-testid^="core__page-layer-"]'),t=new Set;e?.forEach(e=>{const o=e.getAttribute("data-testid")?.match(/core__page-layer-(\d+)/);if(o&&o.length>=2){const r=parseInt(o[1],10)+1;t.has(r)||(c.registerPageElement(r,e),t.add(r))}})});return J.current&&(e.observe(J.current,{childList:!0,subtree:!0,attributes:!1}),ie.current=e),()=>{e.disconnect(),ie.current=null}},[]),h(()=>()=>{c.clearAll(),ie.current&&ie.current.disconnect()},[]),h(()=>{const e=G+1;te(c.getRotation(e))},[G]);const se=g(()=>O||U?r=>{const n=U?e("div",{"aria-hidden":"true",style:{display:"none"},children:r.textLayer.children}):r.textLayer.children,i={...r,annotationLayer:{...r.annotationLayer,children:O?null:r.annotationLayer.children},textLayer:{...r.textLayer,children:n}};return $?$(i):t(o,{children:[r.canvasLayer.children,n,!O&&r.annotationLayer.children]})}:$,[O,U,$]),ce=g(()=>{if(R)return new Set(w.map(e=>e.pageIndex));{const e=new Set;return Object.values(v).forEach(t=>{t>0&&e.add(t-1)}),e}},[w,v,R]),le=(ue=f)&&0!==ue.length?ue.filter(e=>!ue.some(t=>t!==e&&t.includes(e))):ue;var ue;const{highlightIndex:de,setHighlightIndex:ge,cursorIndex:he,setCursorIndex:me,orderedKeys:pe,totalHighlights:fe,getValidPosition:ve,tryJump:we,jumpToPage:ye,zoomTo:Pe,plugins:Te,controls:xe,hideNonTargetHighlights:Ce,deduplicateHighlights:be,scrollToCoord:Se}=s(le,R?{}:v,J,ce,R,R?w:[],y,P),Ae=ve(he),Re=g(()=>{const e=G+1;return V.find(t=>e>=t.start_page&&e<=t.end_page)},[G,V]);h(()=>{void 0!==_&&_!==he&&me(_)},[_]);const Ie={...xe,goToNext:()=>{he>=fe-1||(xe.goToNext(),q&&q(he+1))},goToPrevious:()=>{he<=0||(xe.goToPrevious(),q&&q(he-1))}},_e=l.useCallback((e,t)=>{ne.current+=1;const o=ne.current;null!=re.current&&window.clearTimeout(re.current);let r=null,n=0,i=0;const a=()=>{if(ne.current!==o)return;i+=1;const s=J.current?.querySelector(".rpv-core__inner-pages"),c=J.current?.querySelector(`[data-testid="core__page-layer-${t-1}"]`);if(!s||!c)return i>=40?(re.current=null,void W?.({pageNumber:t,requestId:e.requestId})):void(re.current=window.setTimeout(a,50));r===s.scrollTop?n+=1:(r=s.scrollTop,n=0);const l=s.getBoundingClientRect(),u=c.getBoundingClientRect(),d=Boolean(l&&u&&u.bottom>l.top&&u.top<l.bottom);if(n>=2&&d||i>=40)return re.current=null,void W?.({pageNumber:t,requestId:e.requestId});re.current=window.setTimeout(a,50)};re.current=window.setTimeout(a,50)},[W]);if(h(()=>()=>{ne.current+=1,null!=re.current&&window.clearTimeout(re.current)},[]),h(()=>{if(!D||X<=0)return;const e=Math.min(Math.max(Math.trunc(D.pageNumber),1),X),t=`${D.requestId??e}:${e}`;oe.current!==t&&(oe.current=t,Q(e-1),ye(e-1),_e(D,e))},[ye,D,X,_e]),!p)return e(m,{pages:I,activeCitationIndex:_,onActiveCitationChange:q,headerAction:L});return t("div",{ref:J,className:S?.pdfViewerWrapper||"","data-disable-pdf-annotations":O?"true":void 0,"data-pdf-page-fit":K===r.PageFit?"true":void 0,style:{height:"100%",minHeight:0,minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",...a.pdfViewer,display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA",...b?.pdfViewer,backgroundColor:"#F1F5F9"},children:[e(i,{highlightIndex:de,totalHighlights:fe,controls:Ie,currentPosition:Ae,pdfName:x,onClose:C,pdfUrl:p,viewerRef:J,customStyles:b,customClasses:S,customIcons:A,headerAction:L,isZoomEnabled:F,showHighlightsAction:H,showFullScreenAction:M,currentSegment:Re,segmentTooltipText:k,currentPage:G+1,totalPages:X,onPageNavigate:e=>{const t=Math.min(Math.max(e,1),X||e);Q(t-1),ye(t-1)},onRotatePage:()=>{const e=G+1;c.rotatePageBy90(e),te(c.getRotation(e))},currentPageRotation:ee,showRotateButton:E}),e(n,{defaultScale:K,pdfUrl:p,plugins:Te,customStyles:b,onLoad:e=>{Y(e.doc.numPages);const t=!R&&!N&&T<=0;if(T>0&&!N){const e=T-1,t=pe[e],o=v[t],r=w[e];me(e),console.log(r,"cordinateTargetHighlight"),R&&r.pageIndex>0&&ye(r.pageIndex),o>0&&(setTimeout(()=>{Ce(ce),be(o-1)},1e3),R||ye(o-1))}else if(N&&B&&2===B.length){(async()=>{const[e,t]=B;for(let o=e;o<=t;o++){const e=o-1;ye(e),await new Promise(e=>setTimeout(e,1e3)),Ce(ce);const t=be(e);if(t&&t>0)break}})()}else if(!R&&v){const e=pe.find(e=>v[e]>0);if(void 0!==e){const t=v[e]-1;ye(t),setTimeout(()=>{Ce(ce),be(t)},1e3)}}requestAnimationFrame(()=>{t&&we(),!R&&T>0&&!N&&(()=>{if(!J.current)return;const e=T-1,t=pe[e],o=v[t],r=o>0?o-1:0,n={};pe.forEach((e,t)=>{const o=v[e];o>0&&(n[o]||(n[o]=[]),n[o].push(t))});const i=(n[o]||[]).indexOf(e);let a=0;const s=()=>{if(a++,a>40)return;const e=J.current?.querySelector(".rpv-core__inner-pages");if(!e)return void setTimeout(s,100);const t=J.current?.querySelector(`[data-testid="core__page-layer-${r}"]`);if(!t)return void setTimeout(s,100);const o=e.getBoundingClientRect(),n=t.getBoundingClientRect();if(!(n.top<o.bottom&&n.bottom>o.top))return void setTimeout(s,100);const c=t.querySelectorAll(".rpv-search__highlight")[i];if(!c)return void setTimeout(s,100);const l=c.getBoundingClientRect(),u=e.scrollTop+(l.top-o.top)-e.clientHeight/2+l.height/2;e.scrollTo({top:u,behavior:"smooth"})};setTimeout(s,500)})()})},onPageChange:e=>{const t=e.currentPage;Q(t),z?.(t+1),ce.has(t)?(be(t),Ce(ce)):Ce(ce)},renderPage:se,setRenderRange:Z})]})};export{p as default};
1
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{SpecialZoomLevel as n}from"@react-pdf-viewer/core";import r from"./PdfContainer.js";import i from"./PdfToolbar.js";import{pdfStyles as a}from"./PdfStyle.js";import{PdfHighlightControls as s}from"./usePdfHighlight.js";import{rotationManager as c}from"./rotationManager.js";import"@react-pdf-viewer/zoom/lib/styles/index.css";import"@react-pdf-viewer/page-navigation/lib/styles/index.css";import"@react-pdf-viewer/core/lib/styles/index.css";import"@react-pdf-viewer/search/lib/styles/index.css";import l,{useRef as u,useState as d,useMemo as g,useEffect as h}from"react";import m from"../ScannedDocCitation/ScannedDocCitation.js";const p=({pdfUrl:p,highlightText:f,highlightPages:v,highlightCordinatePages:y,highlightColor:w="yellow",activeHighlightColor:P="#f7dc51",jumpToPageValue:T=0,pdfName:x,onClose:C,customStyles:b,customClasses:S,customIcons:A,useCoordinates:R,fallbackPages:I,activeCitationIndex:_,onActiveCitationChange:q,headerAction:L,isZoomEnabled:F=!0,showHighlightsAction:H=!0,defaultScale:N=n.ActualSize,useRange:j=!1,rangeOfPages:B=null,showFullScreenAction:M=!0,showRotateButton:E=!1,segments:k=[{title:"Document 2",start_page:52,end_page:52,page_count:1}],segmentTooltipText:z,onCurrentPageChange:D,navigationRequest:V,onNavigationSettled:W,disablePdfAnnotations:O=!1,disablePdfTextLayer:U=!1,renderPage:$,setRenderRange:Z})=>{const J=u(null),K=(e=>{switch(e){case"ActualSize":return n.ActualSize;case"PageFit":return n.PageFit;case"PageWidth":return n.PageWidth;default:return e??n.PageWidth}})(N),[G,Q]=d(0),[X,Y]=d(0),[ee,te]=d(0),oe=u(null),ne=u(null),re=u(0),ie=u(null),ae=g(()=>{if(!p)return"";try{return new URL(p,window.location.origin).pathname.split("/").pop()||"default"}catch{return"default"}},[p]);h(()=>{ae&&c.setPdfIdentifier(ae)},[ae]);h(()=>c.onRotationChange((e,t)=>{e===G+1&&te(t)}),[G]),h(()=>{const e=new MutationObserver(()=>{const e=J.current?.querySelectorAll('[data-testid^="core__page-layer-"]'),t=new Set;e?.forEach(e=>{const o=e.getAttribute("data-testid")?.match(/core__page-layer-(\d+)/);if(o&&o.length>=2){const n=parseInt(o[1],10)+1;t.has(n)||(c.registerPageElement(n,e),t.add(n))}})});return J.current&&(e.observe(J.current,{childList:!0,subtree:!0,attributes:!1}),ie.current=e),()=>{e.disconnect(),ie.current=null}},[]),h(()=>()=>{c.clearAll(),ie.current&&ie.current.disconnect()},[]),h(()=>{const e=G+1;te(c.getRotation(e))},[G]);const se=g(()=>O||U?n=>{const r=U?e("div",{"aria-hidden":"true",style:{display:"none"},children:n.textLayer.children}):n.textLayer.children,i={...n,annotationLayer:{...n.annotationLayer,children:O?null:n.annotationLayer.children},textLayer:{...n.textLayer,children:r}};return $?$(i):t(o,{children:[n.canvasLayer.children,r,!O&&n.annotationLayer.children]})}:$,[O,U,$]),ce=g(()=>{if(R)return new Set(y.map(e=>e.pageIndex));{const e=new Set;return Object.values(v).forEach(t=>{t>0&&e.add(t-1)}),e}},[y,v,R]),le=(ue=f)&&0!==ue.length?ue.filter(e=>!ue.some(t=>t!==e&&t.includes(e))):ue;var ue;const{highlightIndex:de,setHighlightIndex:ge,cursorIndex:he,setCursorIndex:me,orderedKeys:pe,totalHighlights:fe,getValidPosition:ve,tryJump:ye,jumpToPage:we,zoomTo:Pe,plugins:Te,controls:xe,hideNonTargetHighlights:Ce,deduplicateHighlights:be,scrollToCoord:Se}=s(le,R?{}:v,J,ce,R,R?y:[],w,P),Ae=ve(he),Re=g(()=>{const e=G+1;return k.find(t=>e>=t.start_page&&e<=t.end_page)},[G,k]);h(()=>{void 0!==_&&_!==he&&me(_)},[_]);const Ie={...xe,goToNext:()=>{he>=fe-1||(xe.goToNext(),q&&q(he+1))},goToPrevious:()=>{he<=0||(xe.goToPrevious(),q&&q(he-1))}},_e=l.useCallback((e,t)=>{re.current+=1;const o=re.current;null!=ne.current&&window.clearTimeout(ne.current);let n=null,r=0,i=0;const a=()=>{if(re.current!==o)return;i+=1;const s=J.current?.querySelector(".rpv-core__inner-pages"),c=J.current?.querySelector(`[data-testid="core__page-layer-${t-1}"]`);if(!s||!c)return i>=40?(ne.current=null,void W?.({pageNumber:t,requestId:e.requestId})):void(ne.current=window.setTimeout(a,50));n===s.scrollTop?r+=1:(n=s.scrollTop,r=0);const l=s.getBoundingClientRect(),u=c.getBoundingClientRect(),d=Boolean(l&&u&&u.bottom>l.top&&u.top<l.bottom);if(r>=2&&d||i>=40)return ne.current=null,void W?.({pageNumber:t,requestId:e.requestId});ne.current=window.setTimeout(a,50)};ne.current=window.setTimeout(a,50)},[W]);if(h(()=>()=>{re.current+=1,null!=ne.current&&window.clearTimeout(ne.current)},[]),h(()=>{if(!V||X<=0)return;const e=Math.min(Math.max(Math.trunc(V.pageNumber),1),X),t=`${V.requestId??e}:${e}`;oe.current!==t&&(oe.current=t,Q(e-1),we(e-1),_e(V,e))},[we,V,X,_e]),!p)return e(m,{pages:I,activeCitationIndex:_,onActiveCitationChange:q,headerAction:L});return t("div",{ref:J,className:S?.pdfViewerWrapper||"","data-disable-pdf-annotations":O?"true":void 0,"data-pdf-page-fit":K===n.PageFit?"true":void 0,style:{height:"100%",minHeight:0,minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",...a.pdfViewer,display:"flex",flexDirection:"column",height:"100%",width:"100%",backgroundColor:"#FAFAFA",...b?.pdfViewer,backgroundColor:"#F1F5F9"},children:[e(i,{highlightIndex:de,totalHighlights:fe,controls:Ie,currentPosition:Ae,pdfName:x,onClose:C,pdfUrl:p,viewerRef:J,customStyles:b,customClasses:S,customIcons:A,headerAction:L,isZoomEnabled:F,showHighlightsAction:H,showFullScreenAction:M,currentSegment:Re,segmentTooltipText:z,currentPage:G+1,totalPages:X,onPageNavigate:e=>{const t=Math.min(Math.max(e,1),X||e);Q(t-1),we(t-1)},onRotatePage:()=>{const e=G+1;c.rotatePageBy90(e),te(c.getRotation(e))},currentPageRotation:ee,showRotateButton:E}),e(r,{defaultScale:K,pdfUrl:p,plugins:Te,customStyles:b,onLoad:e=>{Y(e.doc.numPages);const t=!R&&!j&&T<=0;if(T>0&&!j){const e=T-1,t=pe[e],o=v[t],n=y[e];me(e),console.log(n,"cordinateTargetHighlight"),R&&n.pageIndex>0&&we(n.pageIndex),o>0&&(setTimeout(()=>{Ce(ce),be(o-1)},1e3),R||we(o-1))}else if(j&&B&&2===B.length){(async()=>{const[e,t]=B;for(let o=e;o<=t;o++){const e=o-1;we(e),await new Promise(e=>setTimeout(e,1e3)),Ce(ce);const t=be(e);if(t&&t>0)break}})()}else if(!R&&v){const e=pe.find(e=>v[e]>0);if(void 0!==e){const t=v[e]-1;we(t),setTimeout(()=>{Ce(ce),be(t)},1e3)}}requestAnimationFrame(()=>{t&&ye(),!R&&T>0&&!j&&(()=>{if(!J.current)return;const e=T-1,t=pe[e],o=v[t],n=o>0?o-1:0,r={};pe.forEach((e,t)=>{const o=v[e];o>0&&(r[o]||(r[o]=[]),r[o].push(t))});const i=(r[o]||[]).indexOf(e);let a=0;const s=()=>{if(a++,a>40)return;const e=J.current?.querySelector(".rpv-core__inner-pages");if(!e)return void setTimeout(s,100);const t=J.current?.querySelector(`[data-testid="core__page-layer-${n}"]`);if(!t)return void setTimeout(s,100);const o=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(!(r.top<o.bottom&&r.bottom>o.top))return void setTimeout(s,100);const c=t.querySelectorAll(".rpv-search__highlight")[i];if(!c)return void setTimeout(s,100);const l=c.getBoundingClientRect(),u=e.scrollTop+(l.top-o.top)-e.clientHeight/2+l.height/2;e.scrollTo({top:u,behavior:"smooth"})};setTimeout(s,500)})()})},onPageChange:e=>{const t=e.currentPage;Q(t),D?.(t+1),ce.has(t)?(be(t),Ce(ce)):Ce(ce)},renderPage:se,setRenderRange:Z})]})};export{p as default};
2
2
  //# sourceMappingURL=PdfViewer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PdfViewer.js","sources":["../../../src/features/PdfViewer/PdfViewer.tsx"],"sourcesContent":["import { DocumentLoadEvent, PageChangeEvent, RenderPage, SetRenderRange, SpecialZoomLevel } from \"@react-pdf-viewer/core\";\nimport PdfContainer from \"./PdfContainer\";\nimport PdfToolbar from \"./PdfToolbar\";\nimport { pdfStyles } from \"./PdfStyle\";\nimport { PdfHighlightControls } from \"./usePdfHighlight\";\nimport { rotationManager } from \"./rotationManager\";\nimport \"@react-pdf-viewer/zoom/lib/styles/index.css\";\nimport \"@react-pdf-viewer/page-navigation/lib/styles/index.css\";\nimport \"@react-pdf-viewer/core/lib/styles/index.css\";\nimport \"@react-pdf-viewer/search/lib/styles/index.css\";\nimport React, { useMemo, useRef, useEffect, useState } from \"react\";\nimport ScannedDocCitation, { CitationPage } from \"../ScannedDocCitation/ScannedDocCitation\";\nimport \"./PdfViewer.css\";\n\nexport type CustomIconsType = {\n pdfIcon?: React.ReactNode;\n fullScreenIcon?: React.ReactNode;\n downloadIcon?: React.ReactNode;\n closeIcon?: React.ReactNode;\n};\n\nexport type CustomStylesType = {\n pdfViewer?: React.CSSProperties;\n header?: React.CSSProperties;\n pdfIconWrapper?: React.CSSProperties;\n pdfName?: React.CSSProperties;\n pdfContainer?: React.CSSProperties;\n emptyState?: React.CSSProperties;\n};\n\nexport type CustomClassesType = {\n header?: string;\n pdfName?: string;\n actionButton?: string;\n pdfViewerWrapper?: string;\n};\n\nexport type PdfSegment = {\n title: string;\n start_page: number;\n end_page: number;\n page_count: number;\n};\n\ntype PdfScaleOption =\n | \"ActualSize\"\n | \"PageFit\"\n | \"PageWidth\"\n | number;\nexport interface PdfNavigationRequest {\n pageNumber: number;\n /** Change this value to navigate to the same page more than once. */\n requestId?: string | number;\n}\n\nexport interface PdfNavigationSettledEvent extends PdfNavigationRequest {\n pageNumber: number;\n}\n\nexport interface PdfViewerProps {\n pdfUrl?: string;\n highlightText: string[];\n highlightPages?: any;\n highlightCordinatePages: HighlightArea[];\n highlightColor?: string;\n activeHighlightColor?: string;\n jumpToPageValue?: number;\n pdfName?: string;\n onClose?: () => void;\n item?: any;\n customStyles?: CustomStylesType;\n customClasses?: CustomClassesType;\n customIcons?: CustomIconsType;\n useCoordinates: boolean;\n fallbackPages?: CitationPage[];\n activeCitationIndex?: number;\n onActiveCitationChange?: (index: number) => void;\n headerAction?: {\n icon?: React.ReactNode;\n onClick?: () => void;\n tooltip?: string;\n };\n isZoomEnabled?: boolean;\n showHighlightsAction?: boolean;\n defaultScale?: PdfScaleOption;\n useRange?: boolean; //\n rangeOfPages?: number[] | null;\n showFullScreenAction?: boolean;\n showRotateButton?: boolean;\n segments?: PdfSegment[];\n segmentTooltipText?: string;\n onCurrentPageChange?: (pageNumber: number) => void;\n navigationRequest?: PdfNavigationRequest | null;\n onNavigationSettled?: (event: PdfNavigationSettledEvent) => void;\n disablePdfAnnotations?: boolean;\n disablePdfTextLayer?: boolean;\n renderPage?: RenderPage;\n setRenderRange?: SetRenderRange;\n}\n\nconst getResolvedScale = (\n scale?: PdfScaleOption\n): SpecialZoomLevel | number => {\n switch (scale) {\n case \"ActualSize\":\n return SpecialZoomLevel.ActualSize;\n\n case \"PageFit\":\n return SpecialZoomLevel.PageFit;\n\n case \"PageWidth\":\n return SpecialZoomLevel.PageWidth;\n\n default:\n return scale ?? SpecialZoomLevel.PageWidth;\n }\n};\n\nexport type HighlightArea = {\n pageIndex: number;\n left: number;\n top: number;\n width: number;\n height: number;\n pageNumber?: number;\n};\n\nconst PdfViewer = ({\n pdfUrl,\n highlightText,\n highlightPages,\n highlightCordinatePages,\n highlightColor = \"yellow\",\n activeHighlightColor = \"#f7dc51\",\n jumpToPageValue = 0,\n pdfName,\n onClose,\n customStyles,\n customClasses,\n customIcons,\n useCoordinates,\n fallbackPages,\n activeCitationIndex,\n onActiveCitationChange,\n headerAction,\n isZoomEnabled = true,\n showHighlightsAction = true,\n defaultScale = SpecialZoomLevel.ActualSize,\n useRange = false,\n rangeOfPages = null,\n showFullScreenAction=true,\n showRotateButton = false,\n segments = [\n {\n title: \"Document 2\",\n start_page: 52,\n end_page: 52,\n page_count: 1,\n },\n ],\n segmentTooltipText,\n onCurrentPageChange,\n navigationRequest,\n onNavigationSettled,\n disablePdfAnnotations = false,\n disablePdfTextLayer = false,\n renderPage,\n setRenderRange,\n}: PdfViewerProps) => {\n\n const viewerRef = useRef<HTMLDivElement | null>(null);\n const resolvedDefaultScale = getResolvedScale(defaultScale);\n const [currentPage, setCurrentPage] = useState(0);\n const [totalPages, setTotalPages] = useState(0);\n const [currentPageRotation, setCurrentPageRotation] = useState(0);\n const lastNavigationRequestRef = useRef<string | null>(null);\n const navigationSettleTimerRef = useRef<number | null>(null);\n const navigationSettleSequenceRef = useRef(0);\n const mutationObserverRef = useRef<MutationObserver | null>(null);\n\n // Generate PDF identifier for localStorage from URL\n const pdfIdentifier = useMemo(() => {\n if (!pdfUrl) return '';\n // Use last part of URL or hash it\n try {\n const url = new URL(pdfUrl, window.location.origin);\n return url.pathname.split('/').pop() || 'default';\n } catch {\n return 'default';\n }\n }, [pdfUrl]);\n\n // Set up rotation manager with PDF identifier\n useEffect(() => {\n if (pdfIdentifier) {\n rotationManager.setPdfIdentifier(pdfIdentifier);\n }\n }, [pdfIdentifier]);\n\n // Handler for rotating current page (no state update)\n const handleRotatePage = () => {\n const pageNumber = currentPage + 1;\n rotationManager.rotatePageBy90(pageNumber);\n // Manually update state to reflect rotation in UI\n setCurrentPageRotation(rotationManager.getRotation(pageNumber));\n };\n\n // Subscribe to rotation changes to sync UI state\n useEffect(() => {\n const unsubscribe = rotationManager.onRotationChange((pageNum, angle) => {\n // Only update state if current page rotated\n if (pageNum === currentPage + 1) {\n setCurrentPageRotation(angle);\n }\n });\n\n return unsubscribe;\n }, [currentPage]);\n\n // Register page elements with rotation manager\n useEffect(() => {\n const observer = new MutationObserver(() => {\n // Find all newly rendered page elements\n const pageElements = viewerRef.current?.querySelectorAll(\n '[data-testid^=\"core__page-layer-\"]'\n );\n\n const registeredPages = new Set<number>();\n\n pageElements?.forEach((pageElement) => {\n const match = (pageElement as HTMLElement)\n .getAttribute('data-testid')\n ?.match(/core__page-layer-(\\d+)/);\n if (match && match.length >= 2) {\n const pageIndex = parseInt(match[1], 10);\n const pageNumber = pageIndex + 1;\n\n // Only register once per page\n if (!registeredPages.has(pageNumber)) {\n rotationManager.registerPageElement(pageNumber, pageElement as HTMLElement);\n registeredPages.add(pageNumber);\n }\n }\n });\n });\n\n if (viewerRef.current) {\n observer.observe(viewerRef.current, {\n childList: true,\n subtree: true,\n attributes: false,\n });\n mutationObserverRef.current = observer;\n }\n\n return () => {\n observer.disconnect();\n mutationObserverRef.current = null;\n };\n }, []);\n\n // Clean up when unmounting\n useEffect(() => {\n return () => {\n rotationManager.clearAll();\n if (mutationObserverRef.current) {\n mutationObserverRef.current.disconnect();\n }\n };\n }, []);\n\n // Update current page rotation when page changes\n useEffect(() => {\n const pageNumber = currentPage + 1;\n setCurrentPageRotation(rotationManager.getRotation(pageNumber));\n }, [currentPage]);\n const resolvedRenderPage = useMemo<RenderPage | undefined>(() => {\n if (!disablePdfAnnotations && !disablePdfTextLayer) return renderPage;\n\n return (props) => {\n const resolvedTextLayerChildren = disablePdfTextLayer ? (\n <div aria-hidden=\"true\" style={{ display: \"none\" }}>\n {props.textLayer.children}\n </div>\n ) : props.textLayer.children;\n const resolvedProps = {\n ...props,\n annotationLayer: {\n ...props.annotationLayer,\n children: disablePdfAnnotations ? null : props.annotationLayer.children,\n },\n textLayer: {\n ...props.textLayer,\n children: resolvedTextLayerChildren,\n },\n };\n\n const renderedPage = renderPage\n ? renderPage(resolvedProps)\n : (\n <>\n {props.canvasLayer.children}\n {resolvedTextLayerChildren}\n {!disablePdfAnnotations && props.annotationLayer.children}\n </>\n );\n\n return renderedPage;\n };\n }, [disablePdfAnnotations, disablePdfTextLayer, renderPage]);\n\n const cleanHighlightTexts = (texts: string[]): string[] => {\n if (!texts || texts.length === 0) return texts;\n return texts.filter((text) => {\n return !texts.some(\n (otherText) => otherText !== text && otherText.includes(text)\n );\n });\n };\n\n const highlightPageSet = useMemo(() => {\n if (useCoordinates) {\n return new Set(highlightCordinatePages.map((h: any) => h.pageIndex));\n } else {\n const set = new Set<number>();\n Object.values(highlightPages).forEach((p: any) => {\n if (p > 0) set.add(p - 1);\n });\n return set;\n }\n }, [highlightCordinatePages, highlightPages, useCoordinates]);\n\n const removeRedundantHighlightTexts = cleanHighlightTexts(highlightText);\n\n const {\n highlightIndex,\n setHighlightIndex,\n cursorIndex,\n setCursorIndex,\n orderedKeys,\n totalHighlights,\n getValidPosition,\n tryJump,\n jumpToPage,\n zoomTo,\n plugins,\n controls,\n hideNonTargetHighlights,\n deduplicateHighlights,\n scrollToCoord,\n } = PdfHighlightControls(\n removeRedundantHighlightTexts,\n !useCoordinates ? highlightPages : {},\n viewerRef,\n highlightPageSet,\n useCoordinates,\n useCoordinates ? highlightCordinatePages : [],\n highlightColor,\n activeHighlightColor\n );\n\n const currentPosition = getValidPosition(cursorIndex);\n const currentSegment = useMemo(() => {\n const pageNumber = currentPage + 1;\n return segments.find(\n (segment) =>\n pageNumber >= segment.start_page && pageNumber <= segment.end_page\n );\n }, [currentPage, segments]);\n\n // sync external activeCitationIndex → cursorIndex\n useEffect(() => {\n if (activeCitationIndex === undefined) return;\n if (activeCitationIndex === cursorIndex) return;\n setCursorIndex(activeCitationIndex);\n }, [activeCitationIndex]);\n\n // wrap controls to fire onActiveCitationChange\n const handleGoToNext = () => {\n if (cursorIndex >= totalHighlights - 1) return;\n controls.goToNext();\n if (onActiveCitationChange) onActiveCitationChange(cursorIndex + 1);\n };\n\n const handleGoToPrevious = () => {\n if (cursorIndex <= 0) return;\n controls.goToPrevious();\n if (onActiveCitationChange) onActiveCitationChange(cursorIndex - 1);\n };\n\n const modifiedControls = {\n ...controls,\n goToNext: handleGoToNext,\n goToPrevious: handleGoToPrevious,\n };\n\n const handlePageNavigate = (pageNumber: number) => {\n const nextPage = Math.min(Math.max(pageNumber, 1), totalPages || pageNumber);\n setCurrentPage(nextPage - 1);\n jumpToPage(nextPage - 1);\n };\n\n const waitForNavigationToSettle = React.useCallback((\n request: PdfNavigationRequest,\n pageNumber: number\n ) => {\n navigationSettleSequenceRef.current += 1;\n const settleSequence = navigationSettleSequenceRef.current;\n if (navigationSettleTimerRef.current != null) {\n window.clearTimeout(navigationSettleTimerRef.current);\n }\n\n let previousScrollTop: number | null = null;\n let stableChecks = 0;\n let attempts = 0;\n\n const checkScrollPosition = () => {\n if (navigationSettleSequenceRef.current !== settleSequence) return;\n\n attempts += 1;\n\n const scrollContainer = viewerRef.current?.querySelector(\n '.rpv-core__inner-pages'\n ) as HTMLElement | null;\n const targetPage = viewerRef.current?.querySelector(\n `[data-testid=\"core__page-layer-${pageNumber - 1}\"]`\n ) as HTMLElement | null;\n\n // Virtualized page layers are not guaranteed to be mounted on the first\n // check after jumpToPage. Keep polling so navigation completion is not\n // lost while React PDF Viewer is creating the target page DOM.\n if (!scrollContainer || !targetPage) {\n if (attempts >= 40) {\n navigationSettleTimerRef.current = null;\n onNavigationSettled?.({\n pageNumber,\n requestId: request.requestId,\n });\n return;\n }\n\n navigationSettleTimerRef.current = window.setTimeout(checkScrollPosition, 50);\n return;\n }\n\n if (previousScrollTop === scrollContainer.scrollTop) {\n stableChecks += 1;\n } else {\n previousScrollTop = scrollContainer.scrollTop;\n stableChecks = 0;\n }\n\n const scrollRect = scrollContainer.getBoundingClientRect();\n const pageRect = targetPage.getBoundingClientRect();\n const isTargetVisible = Boolean(\n scrollRect &&\n pageRect &&\n pageRect.bottom > scrollRect.top &&\n pageRect.top < scrollRect.bottom\n );\n const hasSettled = stableChecks >= 2 && isTargetVisible;\n const reachedTimeout = attempts >= 40;\n\n if (hasSettled || reachedTimeout) {\n navigationSettleTimerRef.current = null;\n onNavigationSettled?.({\n pageNumber,\n requestId: request.requestId,\n });\n return;\n }\n\n navigationSettleTimerRef.current = window.setTimeout(checkScrollPosition, 50);\n };\n\n navigationSettleTimerRef.current = window.setTimeout(checkScrollPosition, 50);\n }, [onNavigationSettled]);\n\n useEffect(() => () => {\n navigationSettleSequenceRef.current += 1;\n if (navigationSettleTimerRef.current != null) {\n window.clearTimeout(navigationSettleTimerRef.current);\n }\n }, []);\n\n useEffect(() => {\n if (!navigationRequest || totalPages <= 0) return;\n\n const nextPage = Math.min(\n Math.max(Math.trunc(navigationRequest.pageNumber), 1),\n totalPages\n );\n const requestKey = `${navigationRequest.requestId ?? nextPage}:${nextPage}`;\n if (lastNavigationRequestRef.current === requestKey) return;\n\n lastNavigationRequestRef.current = requestKey;\n setCurrentPage(nextPage - 1);\n jumpToPage(nextPage - 1);\n waitForNavigationToSettle(navigationRequest, nextPage);\n }, [jumpToPage, navigationRequest, totalPages, waitForNavigationToSettle]);\n\n if (!pdfUrl) {\n return (\n <ScannedDocCitation\n pages={fallbackPages}\n activeCitationIndex={activeCitationIndex}\n onActiveCitationChange={onActiveCitationChange}\n headerAction={headerAction}\n />\n );\n }\n\n const defaultViewerStyles: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n width: \"100%\",\n backgroundColor: \"#FAFAFA\",\n };\n\n const scrollToHighlight = () => {\n if (!viewerRef.current) return;\n\n const index = jumpToPageValue - 1;\n const key = orderedKeys[index];\n const page = highlightPages[key];\n const targetPage = page > 0 ? page - 1 : 0;\n\n const pageVisitMap: Record<number, number[]> = {};\n orderedKeys.forEach((k, i) => {\n const p = highlightPages[k];\n if (p > 0) {\n if (!pageVisitMap[p]) pageVisitMap[p] = [];\n pageVisitMap[p].push(i);\n }\n });\n const visits = pageVisitMap[page] || [];\n const occurrence = visits.indexOf(index);\n\n let attempts = 0;\n const maxAttempts = 40;\n\n const doScrollToHighlight = () => {\n attempts++;\n if (attempts > maxAttempts) return;\n\n const scrollContainer = viewerRef.current?.querySelector(\n \".rpv-core__inner-pages\"\n ) as HTMLElement;\n if (!scrollContainer) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const pageElement = viewerRef.current?.querySelector(\n `[data-testid=\"core__page-layer-${targetPage}\"]`\n );\n if (!pageElement) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const scrollContainerRect = scrollContainer.getBoundingClientRect();\n const pageRect = pageElement.getBoundingClientRect();\n const isPageVisible =\n pageRect.top < scrollContainerRect.bottom &&\n pageRect.bottom > scrollContainerRect.top;\n\n if (!isPageVisible) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const allHighlights = pageElement.querySelectorAll(\".rpv-search__highlight\");\n const target = allHighlights[occurrence] as HTMLElement;\n\n if (!target) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const highlightRect = target.getBoundingClientRect();\n const scrollTop =\n scrollContainer.scrollTop +\n (highlightRect.top - scrollContainerRect.top) -\n scrollContainer.clientHeight / 2 +\n highlightRect.height / 2;\n\n scrollContainer.scrollTo({ top: scrollTop, behavior: \"smooth\" });\n };\n\n setTimeout(doScrollToHighlight, 500);\n };\n\n return (\n <div\n ref={viewerRef}\n className={customClasses?.pdfViewerWrapper || \"\"}\n data-disable-pdf-annotations={\n disablePdfAnnotations ? \"true\" : undefined\n }\n data-pdf-page-fit={\n resolvedDefaultScale === SpecialZoomLevel.PageFit ? \"true\" : undefined\n }\n style={{\n height: \"100%\",\n minHeight: 0,\n minWidth: 0,\n overflow: \"hidden\",\n display: \"flex\",\n flexDirection: \"column\",\n ...pdfStyles.pdfViewer,\n ...defaultViewerStyles,\n ...customStyles?.pdfViewer,\n backgroundColor: \"#F1F5F9\",\n }}\n >\n <PdfToolbar\n highlightIndex={highlightIndex}\n totalHighlights={totalHighlights}\n controls={modifiedControls}\n currentPosition={currentPosition}\n pdfName={pdfName}\n onClose={onClose}\n pdfUrl={pdfUrl}\n viewerRef={viewerRef}\n customStyles={customStyles}\n customClasses={customClasses}\n customIcons={customIcons}\n headerAction={headerAction}\n isZoomEnabled={isZoomEnabled}\n showHighlightsAction={showHighlightsAction}\n showFullScreenAction={showFullScreenAction} \n currentSegment={currentSegment}\n segmentTooltipText={segmentTooltipText}\n currentPage={currentPage + 1}\n totalPages={totalPages}\n onPageNavigate={handlePageNavigate}\n onRotatePage={handleRotatePage}\n currentPageRotation={currentPageRotation}\n showRotateButton={showRotateButton}\n />\n <PdfContainer\n defaultScale={resolvedDefaultScale}\n pdfUrl={pdfUrl}\n plugins={plugins}\n customStyles={customStyles}\n onLoad={(e: DocumentLoadEvent) => {\n setTotalPages(e.doc.numPages);\n\n const shouldAutoJumpToFirstMatch =\n !useCoordinates && !useRange && jumpToPageValue <= 0;\n\n if (jumpToPageValue > 0 && !useRange) {\n const index = jumpToPageValue - 1;\n const key = orderedKeys[index];\n const page = highlightPages[key];\n const cordinateTargetHighlight = highlightCordinatePages[index];\n setCursorIndex(index);\n\n console.log(cordinateTargetHighlight, \"cordinateTargetHighlight\");\n if (useCoordinates && cordinateTargetHighlight.pageIndex > 0)\n jumpToPage(cordinateTargetHighlight.pageIndex);\n\n if (page > 0) {\n setTimeout(() => {\n hideNonTargetHighlights(highlightPageSet);\n deduplicateHighlights(page - 1);\n }, 1000);\n if (!useCoordinates) {\n jumpToPage(page - 1);\n }\n }\n } else if (useRange && rangeOfPages && rangeOfPages.length === 2) {\n \n // Async function to handle sequential jumping and waiting\n const scanRangeSequence = async () => {\n const [startPage, endPage] = rangeOfPages;\n \n for (let p = startPage; p <= endPage; p++) {\n const targetPageIndex = p - 1;\n \n jumpToPage(targetPageIndex);\n \n // Pause execution for 1 second to let the DOM render the highlights\n await new Promise((resolve) => setTimeout(resolve, 1000));\n \n hideNonTargetHighlights(highlightPageSet);\n const matchSize = deduplicateHighlights(targetPageIndex);\n \n // If the returned size is greater than 0, a match was found. Stop the loop.\n if (matchSize && matchSize > 0) {\n break; \n }\n }\n };\n\n scanRangeSequence();\n\n } else if (!useCoordinates && highlightPages) {\n const firstKey = orderedKeys.find(k => highlightPages[k] > 0);\n if (firstKey !== undefined) {\n const firstPage = highlightPages[firstKey] - 1;\n jumpToPage(firstPage);\n setTimeout(() => {\n hideNonTargetHighlights(highlightPageSet);\n deduplicateHighlights(firstPage);\n }, 1000);\n }\n }\n\n requestAnimationFrame(() => {\n if (shouldAutoJumpToFirstMatch) {\n tryJump();\n }\n if (!useCoordinates && jumpToPageValue > 0 && !useRange) {\n scrollToHighlight();\n }\n });\n }}\n onPageChange={(e: PageChangeEvent) => {\n const currentPage = e.currentPage;\n setCurrentPage(currentPage);\n onCurrentPageChange?.(currentPage + 1);\n if (!highlightPageSet.has(currentPage)) {\n hideNonTargetHighlights(highlightPageSet);\n return;\n }\n deduplicateHighlights(currentPage);\n hideNonTargetHighlights(highlightPageSet);\n }}\n renderPage={resolvedRenderPage}\n setRenderRange={setRenderRange}\n />\n </div>\n );\n};\n\nexport default PdfViewer;\n"],"names":["PdfViewer","pdfUrl","highlightText","highlightPages","highlightCordinatePages","highlightColor","activeHighlightColor","jumpToPageValue","pdfName","onClose","customStyles","customClasses","customIcons","useCoordinates","fallbackPages","activeCitationIndex","onActiveCitationChange","headerAction","isZoomEnabled","showHighlightsAction","defaultScale","SpecialZoomLevel","ActualSize","useRange","rangeOfPages","showFullScreenAction","showRotateButton","segments","title","start_page","end_page","page_count","segmentTooltipText","onCurrentPageChange","navigationRequest","onNavigationSettled","disablePdfAnnotations","disablePdfTextLayer","renderPage","setRenderRange","viewerRef","useRef","resolvedDefaultScale","scale","PageFit","PageWidth","getResolvedScale","currentPage","setCurrentPage","useState","totalPages","setTotalPages","currentPageRotation","setCurrentPageRotation","lastNavigationRequestRef","navigationSettleTimerRef","navigationSettleSequenceRef","mutationObserverRef","pdfIdentifier","useMemo","URL","window","location","origin","pathname","split","pop","useEffect","rotationManager","setPdfIdentifier","onRotationChange","pageNum","angle","observer","MutationObserver","pageElements","current","querySelectorAll","registeredPages","Set","forEach","pageElement","match","getAttribute","length","pageNumber","parseInt","has","registerPageElement","add","observe","childList","subtree","attributes","disconnect","clearAll","getRotation","resolvedRenderPage","props","resolvedTextLayerChildren","jsx","style","display","children","textLayer","resolvedProps","annotationLayer","jsxs","Fragment","canvasLayer","highlightPageSet","map","h","pageIndex","set","Object","values","p","removeRedundantHighlightTexts","texts","filter","text","some","otherText","includes","highlightIndex","setHighlightIndex","cursorIndex","setCursorIndex","orderedKeys","totalHighlights","getValidPosition","tryJump","jumpToPage","zoomTo","plugins","controls","hideNonTargetHighlights","deduplicateHighlights","scrollToCoord","PdfHighlightControls","currentPosition","currentSegment","find","segment","modifiedControls","goToNext","goToPrevious","waitForNavigationToSettle","React","useCallback","request","settleSequence","clearTimeout","previousScrollTop","stableChecks","attempts","checkScrollPosition","scrollContainer","querySelector","targetPage","requestId","setTimeout","scrollTop","scrollRect","getBoundingClientRect","pageRect","isTargetVisible","Boolean","bottom","top","nextPage","Math","min","max","trunc","requestKey","ScannedDocCitation","pages","ref","className","pdfViewerWrapper","height","minHeight","minWidth","overflow","flexDirection","pdfStyles","pdfViewer","width","backgroundColor","PdfToolbar","onPageNavigate","onRotatePage","rotatePageBy90","PdfContainer","onLoad","e","doc","numPages","shouldAutoJumpToFirstMatch","index","key","page","cordinateTargetHighlight","console","log","async","startPage","endPage","targetPageIndex","Promise","resolve","matchSize","scanRangeSequence","firstKey","k","firstPage","requestAnimationFrame","pageVisitMap","i","push","occurrence","indexOf","doScrollToHighlight","scrollContainerRect","target","highlightRect","clientHeight","scrollTo","behavior","scrollToHighlight","onPageChange"],"mappings":"stBAoGA,MA2BMA,EAAY,EAChBC,SACAC,gBACAC,iBACAC,0BACAC,iBAAiB,SACjBC,uBAAuB,UACvBC,kBAAkB,EAClBC,UACAC,UACAC,eACAC,gBACAC,cACAC,iBACAC,gBACAC,sBACAC,yBACAC,eACAC,iBAAgB,EAChBC,wBAAuB,EACvBC,eAAeC,EAAiBC,WAChCC,YAAW,EACXC,eAAe,KACfC,wBAAqB,EACrBC,oBAAmB,EACnBC,WAAW,CACT,CACEC,MAAO,aACPC,WAAY,GACZC,SAAU,GACVC,WAAY,IAGhBC,qBACAC,sBACAC,oBACAC,sBACAC,yBAAwB,EACxBC,uBAAsB,EACtBC,aACAC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,KAI5B,MACAE,EADgBjJ,EAAYJ,iBAAiB,0BACtBiJ,GAE7B,IAAKI,EAEH,YADAhE,WAAW8D,EAAqB,KAI5B,MAAAG,EAAgBD,EAAO7D,wBACvBF,EACJL,EAAgBK,WACfgE,EAAczD,IAAMuD,EAAoBvD,KACzCZ,EAAgBsE,aAAe,EAC/BD,EAAc7C,OAAS,EAEzBxB,EAAgBuE,SAAS,CAAE3D,IAAKP,EAAWmE,SAAU,YAGvDpE,WAAW8D,EAAqB,MA6HJO,MAIxBC,aAAenC,IACb,MAAMtJ,EAAcsJ,EAAEtJ,YACtBC,EAAeD,GACfd,IAAsBc,EAAc,GAC/B+D,GAAiBvB,IAAIxC,IAI1B2F,GAAsB3F,GACtB0F,GAAwB3B,KAJtB2B,GAAwB3B,KAM5BxE,WAAY2D,GACZ1D"}
1
+ {"version":3,"file":"PdfViewer.js","sources":["../../../src/features/PdfViewer/PdfViewer.tsx"],"sourcesContent":["import { DocumentLoadEvent, PageChangeEvent, RenderPage, SetRenderRange, SpecialZoomLevel } from \"@react-pdf-viewer/core\";\nimport PdfContainer from \"./PdfContainer\";\nimport PdfToolbar from \"./PdfToolbar\";\nimport { pdfStyles } from \"./PdfStyle\";\nimport { PdfHighlightControls } from \"./usePdfHighlight\";\nimport { rotationManager } from \"./rotationManager\";\nimport \"@react-pdf-viewer/zoom/lib/styles/index.css\";\nimport \"@react-pdf-viewer/page-navigation/lib/styles/index.css\";\nimport \"@react-pdf-viewer/core/lib/styles/index.css\";\nimport \"@react-pdf-viewer/search/lib/styles/index.css\";\nimport React, { useMemo, useRef, useEffect, useState } from \"react\";\nimport ScannedDocCitation, { CitationPage } from \"../ScannedDocCitation/ScannedDocCitation\";\nimport \"./PdfViewer.css\";\n\nexport type CustomIconsType = {\n pdfIcon?: React.ReactNode;\n fullScreenIcon?: React.ReactNode;\n downloadIcon?: React.ReactNode;\n closeIcon?: React.ReactNode;\n};\n\nexport type CustomStylesType = {\n pdfViewer?: React.CSSProperties;\n header?: React.CSSProperties;\n pdfIconWrapper?: React.CSSProperties;\n pdfName?: React.CSSProperties;\n pdfContainer?: React.CSSProperties;\n emptyState?: React.CSSProperties;\n};\n\nexport type CustomClassesType = {\n header?: string;\n pdfName?: string;\n actionButton?: string;\n pdfViewerWrapper?: string;\n};\n\nexport type PdfSegment = {\n title: string;\n start_page: number;\n end_page: number;\n page_count: number;\n};\n\ntype PdfScaleOption =\n | \"ActualSize\"\n | \"PageFit\"\n | \"PageWidth\"\n | number;\nexport interface PdfNavigationRequest {\n pageNumber: number;\n /** Change this value to navigate to the same page more than once. */\n requestId?: string | number;\n}\n\nexport interface PdfNavigationSettledEvent extends PdfNavigationRequest {\n pageNumber: number;\n}\n\nexport interface PdfViewerProps {\n pdfUrl?: string;\n highlightText: string[];\n highlightPages?: any;\n highlightCordinatePages: HighlightArea[];\n highlightColor?: string;\n activeHighlightColor?: string;\n jumpToPageValue?: number;\n pdfName?: string;\n onClose?: () => void;\n item?: any;\n customStyles?: CustomStylesType;\n customClasses?: CustomClassesType;\n customIcons?: CustomIconsType;\n useCoordinates: boolean;\n fallbackPages?: CitationPage[];\n activeCitationIndex?: number;\n onActiveCitationChange?: (index: number) => void;\n headerAction?: {\n icon?: React.ReactNode;\n onClick?: () => void;\n tooltip?: string;\n };\n isZoomEnabled?: boolean;\n showHighlightsAction?: boolean;\n defaultScale?: PdfScaleOption;\n useRange?: boolean; //\n rangeOfPages?: number[] | null;\n showFullScreenAction?: boolean;\n showRotateButton?: boolean;\n segments?: PdfSegment[];\n segmentTooltipText?: string;\n onCurrentPageChange?: (pageNumber: number) => void;\n navigationRequest?: PdfNavigationRequest | null;\n onNavigationSettled?: (event: PdfNavigationSettledEvent) => void;\n disablePdfAnnotations?: boolean;\n disablePdfTextLayer?: boolean;\n renderPage?: RenderPage;\n setRenderRange?: SetRenderRange;\n}\n\nconst getResolvedScale = (\n scale?: PdfScaleOption\n): SpecialZoomLevel | number => {\n switch (scale) {\n case \"ActualSize\":\n return SpecialZoomLevel.ActualSize;\n\n case \"PageFit\":\n return SpecialZoomLevel.PageFit;\n\n case \"PageWidth\":\n return SpecialZoomLevel.PageWidth;\n\n default:\n return scale ?? SpecialZoomLevel.PageWidth;\n }\n};\n\nexport type HighlightArea = {\n pageIndex: number;\n left: number;\n top: number;\n width: number;\n height: number;\n pageNumber?: number;\n};\n\nconst PdfViewer = ({\n pdfUrl,\n highlightText,\n highlightPages,\n highlightCordinatePages,\n highlightColor = \"yellow\",\n activeHighlightColor = \"#f7dc51\",\n jumpToPageValue = 0,\n pdfName,\n onClose,\n customStyles,\n customClasses,\n customIcons,\n useCoordinates,\n fallbackPages,\n activeCitationIndex,\n onActiveCitationChange,\n headerAction,\n isZoomEnabled = true,\n showHighlightsAction = true,\n defaultScale = SpecialZoomLevel.ActualSize,\n useRange = false,\n rangeOfPages = null,\n showFullScreenAction=true,\n showRotateButton = false,\n segments = [\n {\n title: \"Document 2\",\n start_page: 52,\n end_page: 52,\n page_count: 1,\n },\n ],\n segmentTooltipText,\n onCurrentPageChange,\n navigationRequest,\n onNavigationSettled,\n disablePdfAnnotations = false,\n disablePdfTextLayer = false,\n renderPage,\n setRenderRange,\n}: PdfViewerProps) => {\n\n const viewerRef = useRef<HTMLDivElement | null>(null);\n const resolvedDefaultScale = getResolvedScale(defaultScale);\n const [currentPage, setCurrentPage] = useState(0);\n const [totalPages, setTotalPages] = useState(0);\n const [currentPageRotation, setCurrentPageRotation] = useState(0);\n const lastNavigationRequestRef = useRef<string | null>(null);\n const navigationSettleTimerRef = useRef<number | null>(null);\n const navigationSettleSequenceRef = useRef(0);\n const mutationObserverRef = useRef<MutationObserver | null>(null);\n\n // Generate PDF identifier for localStorage from URL\n const pdfIdentifier = useMemo(() => {\n if (!pdfUrl) return '';\n // Use last part of URL or hash it\n try {\n const url = new URL(pdfUrl, window.location.origin);\n return url.pathname.split('/').pop() || 'default';\n } catch {\n return 'default';\n }\n }, [pdfUrl]);\n\n // Set up rotation manager with PDF identifier\n useEffect(() => {\n if (pdfIdentifier) {\n rotationManager.setPdfIdentifier(pdfIdentifier);\n }\n }, [pdfIdentifier]);\n\n // Handler for rotating current page (no state update)\n const handleRotatePage = () => {\n const pageNumber = currentPage + 1;\n rotationManager.rotatePageBy90(pageNumber);\n // Manually update state to reflect rotation in UI\n setCurrentPageRotation(rotationManager.getRotation(pageNumber));\n };\n\n // Subscribe to rotation changes to sync UI state\n useEffect(() => {\n const unsubscribe = rotationManager.onRotationChange((pageNum, angle) => {\n // Only update state if current page rotated\n if (pageNum === currentPage + 1) {\n setCurrentPageRotation(angle);\n }\n });\n\n return unsubscribe;\n }, [currentPage]);\n\n // Register page elements with rotation manager\n useEffect(() => {\n const observer = new MutationObserver(() => {\n // Find all newly rendered page elements\n const pageElements = viewerRef.current?.querySelectorAll(\n '[data-testid^=\"core__page-layer-\"]'\n );\n\n const registeredPages = new Set<number>();\n\n pageElements?.forEach((pageElement) => {\n const match = (pageElement as HTMLElement)\n .getAttribute('data-testid')\n ?.match(/core__page-layer-(\\d+)/);\n if (match && match.length >= 2) {\n const pageIndex = parseInt(match[1], 10);\n const pageNumber = pageIndex + 1;\n\n // Only register once per page\n if (!registeredPages.has(pageNumber)) {\n rotationManager.registerPageElement(pageNumber, pageElement as HTMLElement);\n registeredPages.add(pageNumber);\n }\n }\n });\n });\n\n if (viewerRef.current) {\n observer.observe(viewerRef.current, {\n childList: true,\n subtree: true,\n attributes: false,\n });\n mutationObserverRef.current = observer;\n }\n\n return () => {\n observer.disconnect();\n mutationObserverRef.current = null;\n };\n }, []);\n\n // Clean up when unmounting\n useEffect(() => {\n return () => {\n rotationManager.clearAll();\n if (mutationObserverRef.current) {\n mutationObserverRef.current.disconnect();\n }\n };\n }, []);\n\n // Update current page rotation when page changes\n useEffect(() => {\n const pageNumber = currentPage + 1;\n setCurrentPageRotation(rotationManager.getRotation(pageNumber));\n }, [currentPage]);\n const resolvedRenderPage = useMemo<RenderPage | undefined>(() => {\n if (!disablePdfAnnotations && !disablePdfTextLayer) return renderPage;\n\n return (props) => {\n const resolvedTextLayerChildren = disablePdfTextLayer ? (\n <div aria-hidden=\"true\" style={{ display: \"none\" }}>\n {props.textLayer.children}\n </div>\n ) : props.textLayer.children;\n const resolvedProps = {\n ...props,\n annotationLayer: {\n ...props.annotationLayer,\n children: disablePdfAnnotations ? null : props.annotationLayer.children,\n },\n textLayer: {\n ...props.textLayer,\n children: resolvedTextLayerChildren,\n },\n };\n\n const renderedPage = renderPage\n ? renderPage(resolvedProps)\n : (\n <>\n {props.canvasLayer.children}\n {resolvedTextLayerChildren}\n {!disablePdfAnnotations && props.annotationLayer.children}\n </>\n );\n\n return renderedPage;\n };\n }, [disablePdfAnnotations, disablePdfTextLayer, renderPage]);\n\n const cleanHighlightTexts = (texts: string[]): string[] => {\n if (!texts || texts.length === 0) return texts;\n return texts.filter((text) => {\n return !texts.some(\n (otherText) => otherText !== text && otherText.includes(text)\n );\n });\n };\n\n const highlightPageSet = useMemo(() => {\n if (useCoordinates) {\n return new Set(highlightCordinatePages.map((h: any) => h.pageIndex));\n } else {\n const set = new Set<number>();\n Object.values(highlightPages).forEach((p: any) => {\n if (p > 0) set.add(p - 1);\n });\n return set;\n }\n }, [highlightCordinatePages, highlightPages, useCoordinates]);\n\n const removeRedundantHighlightTexts = cleanHighlightTexts(highlightText);\n\n const {\n highlightIndex,\n setHighlightIndex,\n cursorIndex,\n setCursorIndex,\n orderedKeys,\n totalHighlights,\n getValidPosition,\n tryJump,\n jumpToPage,\n zoomTo,\n plugins,\n controls,\n hideNonTargetHighlights,\n deduplicateHighlights,\n scrollToCoord,\n } = PdfHighlightControls(\n removeRedundantHighlightTexts,\n !useCoordinates ? highlightPages : {},\n viewerRef,\n highlightPageSet,\n useCoordinates,\n useCoordinates ? highlightCordinatePages : [],\n highlightColor,\n activeHighlightColor\n );\n\n const currentPosition = getValidPosition(cursorIndex);\n const currentSegment = useMemo(() => {\n const pageNumber = currentPage + 1;\n return segments.find(\n (segment) =>\n pageNumber >= segment.start_page && pageNumber <= segment.end_page\n );\n }, [currentPage, segments]);\n\n // sync external activeCitationIndex → cursorIndex\n useEffect(() => {\n if (activeCitationIndex === undefined) return;\n if (activeCitationIndex === cursorIndex) return;\n setCursorIndex(activeCitationIndex);\n }, [activeCitationIndex]);\n\n // wrap controls to fire onActiveCitationChange\n const handleGoToNext = () => {\n if (cursorIndex >= totalHighlights - 1) return;\n controls.goToNext();\n if (onActiveCitationChange) onActiveCitationChange(cursorIndex + 1);\n };\n\n const handleGoToPrevious = () => {\n if (cursorIndex <= 0) return;\n controls.goToPrevious();\n if (onActiveCitationChange) onActiveCitationChange(cursorIndex - 1);\n };\n\n const modifiedControls = {\n ...controls,\n goToNext: handleGoToNext,\n goToPrevious: handleGoToPrevious,\n };\n\n const handlePageNavigate = (pageNumber: number) => {\n const nextPage = Math.min(Math.max(pageNumber, 1), totalPages || pageNumber);\n setCurrentPage(nextPage - 1);\n jumpToPage(nextPage - 1);\n };\n\n const waitForNavigationToSettle = React.useCallback((\n request: PdfNavigationRequest,\n pageNumber: number\n ) => {\n navigationSettleSequenceRef.current += 1;\n const settleSequence = navigationSettleSequenceRef.current;\n if (navigationSettleTimerRef.current != null) {\n window.clearTimeout(navigationSettleTimerRef.current);\n }\n\n let previousScrollTop: number | null = null;\n let stableChecks = 0;\n let attempts = 0;\n\n const checkScrollPosition = () => {\n if (navigationSettleSequenceRef.current !== settleSequence) return;\n\n attempts += 1;\n\n const scrollContainer = viewerRef.current?.querySelector(\n '.rpv-core__inner-pages'\n ) as HTMLElement | null;\n const targetPage = viewerRef.current?.querySelector(\n `[data-testid=\"core__page-layer-${pageNumber - 1}\"]`\n ) as HTMLElement | null;\n\n // Virtualized page layers are not guaranteed to be mounted on the first\n // check after jumpToPage. Keep polling so navigation completion is not\n // lost while React PDF Viewer is creating the target page DOM.\n if (!scrollContainer || !targetPage) {\n if (attempts >= 40) {\n navigationSettleTimerRef.current = null;\n onNavigationSettled?.({\n pageNumber,\n requestId: request.requestId,\n });\n return;\n }\n\n navigationSettleTimerRef.current = window.setTimeout(checkScrollPosition, 50);\n return;\n }\n\n if (previousScrollTop === scrollContainer.scrollTop) {\n stableChecks += 1;\n } else {\n previousScrollTop = scrollContainer.scrollTop;\n stableChecks = 0;\n }\n\n const scrollRect = scrollContainer.getBoundingClientRect();\n const pageRect = targetPage.getBoundingClientRect();\n const isTargetVisible = Boolean(\n scrollRect &&\n pageRect &&\n pageRect.bottom > scrollRect.top &&\n pageRect.top < scrollRect.bottom\n );\n const hasSettled = stableChecks >= 2 && isTargetVisible;\n const reachedTimeout = attempts >= 40;\n\n if (hasSettled || reachedTimeout) {\n navigationSettleTimerRef.current = null;\n onNavigationSettled?.({\n pageNumber,\n requestId: request.requestId,\n });\n return;\n }\n\n navigationSettleTimerRef.current = window.setTimeout(checkScrollPosition, 50);\n };\n\n navigationSettleTimerRef.current = window.setTimeout(checkScrollPosition, 50);\n }, [onNavigationSettled]);\n\n useEffect(() => () => {\n navigationSettleSequenceRef.current += 1;\n if (navigationSettleTimerRef.current != null) {\n window.clearTimeout(navigationSettleTimerRef.current);\n }\n }, []);\n\n useEffect(() => {\n if (!navigationRequest || totalPages <= 0) return;\n\n const nextPage = Math.min(\n Math.max(Math.trunc(navigationRequest.pageNumber), 1),\n totalPages\n );\n const requestKey = `${navigationRequest.requestId ?? nextPage}:${nextPage}`;\n if (lastNavigationRequestRef.current === requestKey) return;\n\n lastNavigationRequestRef.current = requestKey;\n setCurrentPage(nextPage - 1);\n jumpToPage(nextPage - 1);\n waitForNavigationToSettle(navigationRequest, nextPage);\n }, [jumpToPage, navigationRequest, totalPages, waitForNavigationToSettle]);\n\n if (!pdfUrl) {\n return (\n <ScannedDocCitation\n pages={fallbackPages}\n activeCitationIndex={activeCitationIndex}\n onActiveCitationChange={onActiveCitationChange}\n headerAction={headerAction}\n />\n );\n }\n\n const defaultViewerStyles: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n width: \"100%\",\n backgroundColor: \"#FAFAFA\",\n };\n\n const scrollToHighlight = () => {\n if (!viewerRef.current) return;\n\n const index = jumpToPageValue - 1;\n const key = orderedKeys[index];\n const page = highlightPages[key];\n const targetPage = page > 0 ? page - 1 : 0;\n\n const pageVisitMap: Record<number, number[]> = {};\n orderedKeys.forEach((k, i) => {\n const p = highlightPages[k];\n if (p > 0) {\n if (!pageVisitMap[p]) pageVisitMap[p] = [];\n pageVisitMap[p].push(i);\n }\n });\n const visits = pageVisitMap[page] || [];\n const occurrence = visits.indexOf(index);\n\n let attempts = 0;\n const maxAttempts = 40;\n\n const doScrollToHighlight = () => {\n attempts++;\n if (attempts > maxAttempts) return;\n\n const scrollContainer = viewerRef.current?.querySelector(\n \".rpv-core__inner-pages\"\n ) as HTMLElement;\n if (!scrollContainer) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const pageElement = viewerRef.current?.querySelector(\n `[data-testid=\"core__page-layer-${targetPage}\"]`\n );\n if (!pageElement) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const scrollContainerRect = scrollContainer.getBoundingClientRect();\n const pageRect = pageElement.getBoundingClientRect();\n const isPageVisible =\n pageRect.top < scrollContainerRect.bottom &&\n pageRect.bottom > scrollContainerRect.top;\n\n if (!isPageVisible) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const allHighlights = pageElement.querySelectorAll(\".rpv-search__highlight\");\n const target = allHighlights[occurrence] as HTMLElement;\n\n if (!target) {\n setTimeout(doScrollToHighlight, 100);\n return;\n }\n\n const highlightRect = target.getBoundingClientRect();\n const scrollTop =\n scrollContainer.scrollTop +\n (highlightRect.top - scrollContainerRect.top) -\n scrollContainer.clientHeight / 2 +\n highlightRect.height / 2;\n\n scrollContainer.scrollTo({ top: scrollTop, behavior: \"smooth\" });\n };\n\n setTimeout(doScrollToHighlight, 500);\n };\n\n return (\n <div\n ref={viewerRef}\n className={customClasses?.pdfViewerWrapper || \"\"}\n data-disable-pdf-annotations={\n disablePdfAnnotations ? \"true\" : undefined\n }\n data-pdf-page-fit={\n resolvedDefaultScale === SpecialZoomLevel.PageFit ? \"true\" : undefined\n }\n style={{\n height: \"100%\",\n minHeight: 0,\n minWidth: 0,\n overflow: \"hidden\",\n display: \"flex\",\n flexDirection: \"column\",\n ...pdfStyles.pdfViewer,\n ...defaultViewerStyles,\n ...customStyles?.pdfViewer,\n backgroundColor: \"#F1F5F9\",\n }}\n >\n <PdfToolbar\n highlightIndex={highlightIndex}\n totalHighlights={totalHighlights}\n controls={modifiedControls}\n currentPosition={currentPosition}\n pdfName={pdfName}\n onClose={onClose}\n pdfUrl={pdfUrl}\n viewerRef={viewerRef}\n customStyles={customStyles}\n customClasses={customClasses}\n customIcons={customIcons}\n headerAction={headerAction}\n isZoomEnabled={isZoomEnabled}\n showHighlightsAction={showHighlightsAction}\n showFullScreenAction={showFullScreenAction} \n currentSegment={currentSegment}\n segmentTooltipText={segmentTooltipText}\n currentPage={currentPage + 1}\n totalPages={totalPages}\n onPageNavigate={handlePageNavigate}\n onRotatePage={handleRotatePage}\n currentPageRotation={currentPageRotation}\n showRotateButton={showRotateButton}\n />\n <PdfContainer\n defaultScale={resolvedDefaultScale}\n pdfUrl={pdfUrl}\n plugins={plugins}\n customStyles={customStyles}\n onLoad={(e: DocumentLoadEvent) => {\n setTotalPages(e.doc.numPages);\n\n const shouldAutoJumpToFirstMatch =\n !useCoordinates && !useRange && jumpToPageValue <= 0;\n\n if (jumpToPageValue > 0 && !useRange) {\n const index = jumpToPageValue - 1;\n const key = orderedKeys[index];\n const page = highlightPages[key];\n const cordinateTargetHighlight = highlightCordinatePages[index];\n setCursorIndex(index);\n\n console.log(cordinateTargetHighlight, \"cordinateTargetHighlight\");\n if (useCoordinates && cordinateTargetHighlight.pageIndex > 0)\n jumpToPage(cordinateTargetHighlight.pageIndex);\n\n if (page > 0) {\n setTimeout(() => {\n hideNonTargetHighlights(highlightPageSet);\n deduplicateHighlights(page - 1);\n }, 1000);\n if (!useCoordinates) {\n jumpToPage(page - 1);\n }\n }\n } else if (useRange && rangeOfPages && rangeOfPages.length === 2) {\n \n // Async function to handle sequential jumping and waiting\n const scanRangeSequence = async () => {\n const [startPage, endPage] = rangeOfPages;\n \n for (let p = startPage; p <= endPage; p++) {\n const targetPageIndex = p - 1;\n \n jumpToPage(targetPageIndex);\n \n // Pause execution for 1 second to let the DOM render the highlights\n await new Promise((resolve) => setTimeout(resolve, 1000));\n \n hideNonTargetHighlights(highlightPageSet);\n const matchSize = deduplicateHighlights(targetPageIndex);\n \n // If the returned size is greater than 0, a match was found. Stop the loop.\n if (matchSize && matchSize > 0) {\n break; \n }\n }\n };\n\n scanRangeSequence();\n\n } else if (!useCoordinates && highlightPages) {\n const firstKey = orderedKeys.find(k => highlightPages[k] > 0);\n if (firstKey !== undefined) {\n const firstPage = highlightPages[firstKey] - 1;\n jumpToPage(firstPage);\n setTimeout(() => {\n hideNonTargetHighlights(highlightPageSet);\n deduplicateHighlights(firstPage);\n }, 1000);\n }\n }\n\n requestAnimationFrame(() => {\n if (shouldAutoJumpToFirstMatch) {\n tryJump();\n }\n if (!useCoordinates && jumpToPageValue > 0 && !useRange) {\n scrollToHighlight();\n }\n });\n }}\n onPageChange={(e: PageChangeEvent) => {\n const currentPage = e.currentPage;\n setCurrentPage(currentPage);\n onCurrentPageChange?.(currentPage + 1);\n if (!highlightPageSet.has(currentPage)) {\n hideNonTargetHighlights(highlightPageSet);\n return;\n }\n deduplicateHighlights(currentPage);\n hideNonTargetHighlights(highlightPageSet);\n }}\n renderPage={resolvedRenderPage}\n setRenderRange={setRenderRange}\n />\n </div>\n );\n};\n\nexport default PdfViewer;\n"],"names":["PdfViewer","pdfUrl","highlightText","highlightPages","highlightCordinatePages","highlightColor","activeHighlightColor","jumpToPageValue","pdfName","onClose","customStyles","customClasses","customIcons","useCoordinates","fallbackPages","activeCitationIndex","onActiveCitationChange","headerAction","isZoomEnabled","showHighlightsAction","defaultScale","SpecialZoomLevel","ActualSize","useRange","rangeOfPages","showFullScreenAction","showRotateButton","segments","title","start_page","end_page","page_count","segmentTooltipText","onCurrentPageChange","navigationRequest","onNavigationSettled","disablePdfAnnotations","disablePdfTextLayer","renderPage","setRenderRange","viewerRef","useRef","resolvedDefaultScale","scale","PageFit","PageWidth","getResolvedScale","currentPage","setCurrentPage","useState","totalPages","setTotalPages","currentPageRotation","setCurrentPageRotation","lastNavigationRequestRef","navigationSettleTimerRef","navigationSettleSequenceRef","mutationObserverRef","pdfIdentifier","useMemo","URL","window","location","origin","pathname","split","pop","useEffect","rotationManager","setPdfIdentifier","onRotationChange","pageNum","angle","observer","MutationObserver","pageElements","current","querySelectorAll","registeredPages","Set","forEach","pageElement","match","getAttribute","length","pageNumber","parseInt","has","registerPageElement","add","observe","childList","subtree","attributes","disconnect","clearAll","getRotation","resolvedRenderPage","props","resolvedTextLayerChildren","jsx","style","display","children","textLayer","resolvedProps","annotationLayer","jsxs","Fragment","canvasLayer","highlightPageSet","map","h","pageIndex","set","Object","values","p","removeRedundantHighlightTexts","texts","filter","text","some","otherText","includes","highlightIndex","setHighlightIndex","cursorIndex","setCursorIndex","orderedKeys","totalHighlights","getValidPosition","tryJump","jumpToPage","zoomTo","plugins","controls","hideNonTargetHighlights","deduplicateHighlights","scrollToCoord","PdfHighlightControls","currentPosition","currentSegment","find","segment","modifiedControls","goToNext","goToPrevious","waitForNavigationToSettle","React","useCallback","request","settleSequence","clearTimeout","previousScrollTop","stableChecks","attempts","checkScrollPosition","scrollContainer","querySelector","targetPage","requestId","setTimeout","scrollTop","scrollRect","getBoundingClientRect","pageRect","isTargetVisible","Boolean","bottom","top","nextPage","Math","min","max","trunc","requestKey","ScannedDocCitation","pages","ref","className","pdfViewerWrapper","height","minHeight","minWidth","overflow","flexDirection","pdfStyles","pdfViewer","width","backgroundColor","PdfToolbar","onPageNavigate","onRotatePage","rotatePageBy90","PdfContainer","onLoad","e","doc","numPages","shouldAutoJumpToFirstMatch","index","key","page","cordinateTargetHighlight","console","log","async","startPage","endPage","targetPageIndex","Promise","resolve","matchSize","scanRangeSequence","firstKey","k","firstPage","requestAnimationFrame","pageVisitMap","i","push","occurrence","indexOf","doScrollToHighlight","scrollContainerRect","target","highlightRect","clientHeight","scrollTo","behavior","scrollToHighlight","onPageChange"],"mappings":"2rBAoGA,MA2BMA,EAAY,EAChBC,SACAC,gBACAC,iBACAC,0BACAC,iBAAiB,SACjBC,uBAAuB,UACvBC,kBAAkB,EAClBC,UACAC,UACAC,eACAC,gBACAC,cACAC,iBACAC,gBACAC,sBACAC,yBACAC,eACAC,iBAAgB,EAChBC,wBAAuB,EACvBC,eAAeC,EAAiBC,WAChCC,YAAW,EACXC,eAAe,KACfC,wBAAqB,EACrBC,oBAAmB,EACnBC,WAAW,CACT,CACEC,MAAO,aACPC,WAAY,GACZC,SAAU,GACVC,WAAY,IAGhBC,qBACAC,sBACAC,oBACAC,sBACAC,yBAAwB,EACxBC,uBAAsB,EACtBC,aACAC,qBAGM,MAAAC,EAAYC,EAA8B,MAC1CC,EAvEiB,CACvBC,IAEA,OAAQA,GACN,IAAK,aACH,OAAOtB,EAAiBC,WAE1B,IAAK,UACH,OAAOD,EAAiBuB,QAE1B,IAAK,YACH,OAAOvB,EAAiBwB,UAE1B,QACE,OAAOF,GAAStB,EAAiBwB,YAyDRC,CAAiB1B,IACvC2B,EAAaC,GAAkBC,EAAS,IACxCC,EAAYC,GAAiBF,EAAS,IACtCG,GAAqBC,IAA0BJ,EAAS,GACzDK,GAA2Bb,EAAsB,MACjDc,GAA2Bd,EAAsB,MACjDe,GAA8Bf,EAAO,GACrCgB,GAAsBhB,EAAgC,MAGtDiB,GAAgBC,EAAQ,KACxB,IAAC1D,EAAe,MAAA,GAEhB,IAEF,OADY,IAAI2D,IAAI3D,EAAQ4D,OAAOC,SAASC,QACjCC,SAASC,MAAM,KAAKC,OAAS,SAAA,CAClC,MACC,MAAA,SACT,GACC,CAACjE,IAGJkE,EAAU,KACJT,IACFU,EAAgBC,iBAAiBX,KAElC,CAACA,KAWJS,E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B,MAAAvG,EAAIlH,EAAeqN,GACrBnG,EAAI,IACDsG,EAAatG,KAAiBsG,EAAAtG,GAAK,IAC3BsG,EAAAtG,GAAGwG,KAAKD,MAGzB,MACME,GADSH,EAAahB,IAAS,IACXoB,QAAQtB,GAElC,IAAI7C,EAAW,EACf,MAEMoE,EAAsB,KAE1B,GADApE,IACIA,EAJc,GAIU,OAEtB,MAAAE,EAAkBtH,EAAUoC,SAASmF,cACzC,0BAEF,IAAKD,EAEH,YADAI,WAAW8D,EAAqB,KAI5B,MAAA/I,EAAczC,EAAUoC,SAASmF,cACrC,kCAAkCC,OAEpC,IAAK/E,EAEH,YADAiF,WAAW8D,EAAqB,KAI5B,MAAAC,EAAsBnE,EAAgBO,wBACtCC,EAAWrF,EAAYoF,wBAK7B,KAHEC,EAASI,IAAMuD,EAAoBxD,QACnCH,EAASG,OAASwD,EAAoBvD,KAItC,YADAR,WAAW8D,EAAqB,KAI5B,MACAE,EADgBjJ,EAAYJ,iBAAiB,0BACtBiJ,GAE7B,IAAKI,EAEH,YADAhE,WAAW8D,EAAqB,KAI5B,MAAAG,EAAgBD,EAAO7D,wBACvBF,EACJL,EAAgBK,WACfgE,EAAczD,IAAMuD,EAAoBvD,KACzCZ,EAAgBsE,aAAe,EAC/BD,EAAc7C,OAAS,EAEzBxB,EAAgBuE,SAAS,CAAE3D,IAAKP,EAAWmE,SAAU,YAGvDpE,WAAW8D,EAAqB,MA6HJO,MAIxBC,aAAenC,IACb,MAAMtJ,EAAcsJ,EAAEtJ,YACtBC,EAAeD,GACfd,IAAsBc,EAAc,GAC/B+D,GAAiBvB,IAAIxC,IAI1B2F,GAAsB3F,GACtB0F,GAAwB3B,KAJtB2B,GAAwB3B,KAM5BxE,WAAY2D,GACZ1D"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as i,useRef as r,useEffect as n}from"react";import"./ReviewPanel.css.js";function c(...e){return e.filter(Boolean).join(" ")}const d=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:t("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2"})}),o=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:t("path",{d:"M18 15l-6-6-6 6",stroke:"currentColor",strokeWidth:"2"})}),s=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-maximize2-icon lucide-maximize-2 rp-border",children:[t("path",{d:"M15 3h6v6"}),t("path",{d:"m21 3-7 7"}),t("path",{d:"m3 21 7-7"}),t("path",{d:"M9 21H3v-6"})]}),a=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-minimize2-icon lucide-minimize-2 rp-border",children:[t("path",{d:"m14 10 7-7"}),t("path",{d:"M20 10h-6V4"}),t("path",{d:"m3 21 7-7"}),t("path",{d:"M4 14h6v6"})]}),l=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#87c66b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-circle-check-icon lucide-circle-check",children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("path",{d:"m9 12 2 2 4-4"})]}),h={dark:{"--rp-bg":"#000","--rp-text":"#fff","--rp-active-bg":"#1f2930","--rp-muted":"#8c8c8c","--rp-border":"#434343","--rp-success":"#4ade80"},light:{"--rp-bg":"#fff","--rp-text":"#000","--rp-active-bg":"#e5eef5","--rp-muted":"#8c8c8c","--rp-border":"#434343","--rp-success":"#16a34a"}};function m({item:i,index:r,isActive:n,status:d="pending",config:o,classes:s}){const{textKey:a="text",showStatusIcon:h=!0,showRightBadge:m=!0,rightBadgeText:p}=o;return e("div",{className:c("rp-item",n&&"rp-item--active","reviewed"===d&&"rp-item--reviewed",s?.item?.root,n&&s?.item?.active,"reviewed"===d&&s?.item?.reviewed),children:[h&&"reviewed"===d&&t("span",{className:s?.item?.icon,children:t(l,{})}),t("span",{className:c("rp-item-text",s?.item?.text),children:String(i[a])}),m&&p&&t("span",{className:c("rp-item-badge",s?.item?.rightBadge),children:p(i,r)})]})}const p=({data:l,renderItem:p,itemConfig:g,classes:v,keyExtractor:u=(e,t)=>t.toString(),activeIndex:w,onActiveChange:x,expanded:f,onExpandedChange:k,headerLeftSlot:b,footerSlot:N,headerRightSlot:C,getItemStatus:B,theme:M="dark",className:I})=>{const[S,j]=i(0),[y,z]=i(!1),A=w??S,E=f??y,R=r([]),W=e=>{x?.(e),void 0===w&&j(e)},V=e=>{k?.(e),void 0===f&&z(e)};return n(()=>{E&&R.current[A]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[A,E]),e("div",{className:c("rp-container",I),style:h[M],children:[e("div",{className:c("rp-header",v?.header),children:[t("div",{className:"rp-header-left",children:b}),C?C({activeIndex:A,total:l.length,setIndex:W,isExpanded:E,setExpanded:V}):e("div",{className:c("rp-header-right",v?.headerRight),children:[e("span",{children:[A+1," of ",l.length]}),t("button",{onClick:()=>W(Math.min(A+1,l.length-1)),children:t(d,{})}),t("button",{onClick:()=>W(Math.max(A-1,0)),children:t(o,{})})]}),t("button",{onClick:()=>V(!E),children:t(E?a:s,{})})]}),E&&t("div",{className:c("rp-list",v?.listWrapper),children:l.map((e,i)=>{const r=B?.(e,i),n=i===A;return t("div",{ref:e=>R.current[i]=e,onClick:()=>W(i),children:p?p({item:e,index:i,isActive:n,status:r}):t(m,{item:e,index:i,isActive:n,status:r,config:g??{},classes:v})},u(e,i))})}),N&&t("div",{className:"rp-footer",children:N})]})};export{p as ReviewPanel};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as i,useRef as r,useEffect as n}from"react";function c(...e){return e.filter(Boolean).join(" ")}const d=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:t("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2"})}),o=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:t("path",{d:"M18 15l-6-6-6 6",stroke:"currentColor",strokeWidth:"2"})}),s=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-maximize2-icon lucide-maximize-2 rp-border",children:[t("path",{d:"M15 3h6v6"}),t("path",{d:"m21 3-7 7"}),t("path",{d:"m3 21 7-7"}),t("path",{d:"M9 21H3v-6"})]}),a=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-minimize2-icon lucide-minimize-2 rp-border",children:[t("path",{d:"m14 10 7-7"}),t("path",{d:"M20 10h-6V4"}),t("path",{d:"m3 21 7-7"}),t("path",{d:"M4 14h6v6"})]}),l=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#87c66b","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",className:"lucide lucide-circle-check-icon lucide-circle-check",children:[t("circle",{cx:"12",cy:"12",r:"10"}),t("path",{d:"m9 12 2 2 4-4"})]}),h={dark:{"--rp-bg":"#000","--rp-text":"#fff","--rp-active-bg":"#1f2930","--rp-muted":"#8c8c8c","--rp-border":"#434343","--rp-success":"#4ade80"},light:{"--rp-bg":"#fff","--rp-text":"#000","--rp-active-bg":"#e5eef5","--rp-muted":"#8c8c8c","--rp-border":"#434343","--rp-success":"#16a34a"}};function m({item:i,index:r,isActive:n,status:d="pending",config:o,classes:s}){const{textKey:a="text",showStatusIcon:h=!0,showRightBadge:m=!0,rightBadgeText:p}=o;return e("div",{className:c("rp-item",n&&"rp-item--active","reviewed"===d&&"rp-item--reviewed",s?.item?.root,n&&s?.item?.active,"reviewed"===d&&s?.item?.reviewed),children:[h&&"reviewed"===d&&t("span",{className:s?.item?.icon,children:t(l,{})}),t("span",{className:c("rp-item-text",s?.item?.text),children:String(i[a])}),m&&p&&t("span",{className:c("rp-item-badge",s?.item?.rightBadge),children:p(i,r)})]})}const p=({data:l,renderItem:p,itemConfig:g,classes:v,keyExtractor:u=(e,t)=>t.toString(),activeIndex:w,onActiveChange:x,expanded:f,onExpandedChange:k,headerLeftSlot:b,footerSlot:N,headerRightSlot:C,getItemStatus:B,theme:M="dark",className:I})=>{const[S,j]=i(0),[y,z]=i(!1),A=w??S,E=f??y,R=r([]),W=e=>{x?.(e),void 0===w&&j(e)},V=e=>{k?.(e),void 0===f&&z(e)};return n(()=>{E&&R.current[A]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[A,E]),e("div",{className:c("rp-container",I),style:h[M],children:[e("div",{className:c("rp-header",v?.header),children:[t("div",{className:"rp-header-left",children:b}),C?C({activeIndex:A,total:l.length,setIndex:W,isExpanded:E,setExpanded:V}):e("div",{className:c("rp-header-right",v?.headerRight),children:[e("span",{children:[A+1," of ",l.length]}),t("button",{onClick:()=>W(Math.min(A+1,l.length-1)),children:t(d,{})}),t("button",{onClick:()=>W(Math.max(A-1,0)),children:t(o,{})})]}),t("button",{onClick:()=>V(!E),children:t(E?a:s,{})})]}),E&&t("div",{className:c("rp-list",v?.listWrapper),children:l.map((e,i)=>{const r=B?.(e,i),n=i===A;return t("div",{ref:e=>R.current[i]=e,onClick:()=>W(i),children:p?p({item:e,index:i,isActive:n,status:r}):t(m,{item:e,index:i,isActive:n,status:r,config:g??{},classes:v})},u(e,i))})}),N&&t("div",{className:"rp-footer",children:N})]})};export{p as ReviewPanel};
2
2
  //# sourceMappingURL=ReviewPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReviewPanel.js","sources":["../../../src/features/ReviewPanel/ReviewPanel.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport \"./ReviewPanel.css\";\n\n/* =======================\n Utils\n======================= */\n\nfunction cn(...args: Array<string | false | undefined>) {\n return args.filter(Boolean).join(\" \");\n}\n\n/* =======================\n SVG Icons\n======================= */\n\nconst ChevronDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M6 9l6 6 6-6\" stroke=\"currentColor\" strokeWidth=\"2\" />\n </svg>\n);\n\nconst ChevronUpIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 15l-6-6-6 6\" stroke=\"currentColor\" strokeWidth=\"2\" />\n </svg>\n);\n\nconst ExpandIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n className=\"lucide lucide-maximize2-icon lucide-maximize-2 rp-border\"\n >\n <path d=\"M15 3h6v6\" />\n <path d=\"m21 3-7 7\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M9 21H3v-6\" />\n </svg>\n);\n\nconst CollapseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n className=\"lucide lucide-minimize2-icon lucide-minimize-2 rp-border\"\n >\n <path d=\"m14 10 7-7\" />\n <path d=\"M20 10h-6V4\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M4 14h6v6\" />\n </svg>\n);\n\nconst CheckIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#87c66b\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n className=\"lucide lucide-circle-check-icon lucide-circle-check\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n);\n\n/* =======================\n Theme (CSS Variables)\n======================= */\n\nconst REVIEW_PANEL_THEME = {\n dark: {\n \"--rp-bg\": \"#000\",\n \"--rp-text\": \"#fff\",\n \"--rp-active-bg\": \"#1f2930\",\n \"--rp-muted\": \"#8c8c8c\",\n \"--rp-border\": \"#434343\",\n \"--rp-success\": \"#4ade80\",\n },\n light: {\n \"--rp-bg\": \"#fff\",\n \"--rp-text\": \"#000\",\n \"--rp-active-bg\": \"#e5eef5\",\n \"--rp-muted\": \"#8c8c8c\",\n \"--rp-border\": \"#434343\",\n \"--rp-success\": \"#16a34a\",\n },\n} as const;\n\n/* =======================\n Types\n======================= */\n\nexport type ReviewStatus = \"pending\" | \"reviewed\" | \"rejected\";\n\nexport interface ReviewPanelClasses {\n header?: string;\n headerRight?: string;\n listWrapper?: string;\n item?: {\n root?: string;\n active?: string;\n reviewed?: string;\n text?: string;\n rightBadge?: string;\n icon?: string;\n };\n}\n\nexport interface DefaultItemConfig<T> {\n textKey?: keyof T;\n showStatusIcon?: boolean;\n showRightBadge?: boolean;\n rightBadgeText?: (item: T, index: number) => React.ReactNode;\n}\n\nexport interface ReviewPanelProps<T> {\n data: T[];\n renderItem?: (params: {\n item: T;\n index: number;\n isActive: boolean;\n status?: ReviewStatus;\n }) => React.ReactNode;\n itemConfig?: DefaultItemConfig<T>;\n classes?: ReviewPanelClasses;\n keyExtractor?: (item: T, index: number) => string;\n activeIndex?: number;\n onActiveChange?: (index: number) => void;\n expanded?: boolean;\n onExpandedChange?: (expanded: boolean) => void;\n headerLeftSlot?: React.ReactNode;\n footerSlot?: React.ReactNode;\n headerRightSlot?: (params: {\n activeIndex: number;\n total: number;\n setIndex: (i: number) => void;\n isExpanded: boolean;\n setExpanded: (v: boolean) => void;\n }) => React.ReactNode;\n getItemStatus?: (item: T, index: number) => ReviewStatus;\n theme?: \"dark\" | \"light\";\n className?: string;\n}\n\n/* =======================\n Default Item Renderer\n======================= */\n\nfunction DefaultReviewItem<T>({\n item,\n index,\n isActive,\n status = \"pending\",\n config,\n classes,\n}: {\n item: T;\n index: number;\n isActive: boolean;\n status?: ReviewStatus;\n config: DefaultItemConfig<T>;\n classes?: ReviewPanelClasses;\n}) {\n const {\n textKey = \"text\" as keyof T,\n showStatusIcon = true,\n showRightBadge = true,\n rightBadgeText,\n } = config;\n\n return (\n <div\n className={cn(\n \"rp-item\",\n isActive && \"rp-item--active\",\n status === \"reviewed\" && \"rp-item--reviewed\",\n classes?.item?.root,\n isActive && classes?.item?.active,\n status === \"reviewed\" && classes?.item?.reviewed,\n )}\n >\n {showStatusIcon && status === \"reviewed\" && (\n <span className={classes?.item?.icon}>\n <CheckIcon />\n </span>\n )}\n\n <span className={cn(\"rp-item-text\", classes?.item?.text)}>\n {String((item as any)[textKey])}\n </span>\n\n {showRightBadge && rightBadgeText && (\n <span className={cn(\"rp-item-badge\", classes?.item?.rightBadge)}>\n {rightBadgeText(item, index)}\n </span>\n )}\n </div>\n );\n}\n\n/* =======================\n ReviewPanel Component\n======================= */\n\nexport const ReviewPanel = <T,>({\n data,\n renderItem,\n itemConfig,\n classes,\n keyExtractor = (_, i) => i.toString(),\n activeIndex: controlledIndex,\n onActiveChange,\n expanded: controlledExpanded,\n onExpandedChange,\n headerLeftSlot,\n footerSlot,\n headerRightSlot,\n getItemStatus,\n theme = \"dark\",\n className,\n}: ReviewPanelProps<T>) => {\n const [internalIndex, setInternalIndex] = useState(0);\n const [internalExpanded, setInternalExpanded] = useState(false);\n\n const activeIndex = controlledIndex ?? internalIndex;\n const isExpanded = controlledExpanded ?? internalExpanded;\n\n const itemRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n const setIndex = (i: number) => {\n onActiveChange?.(i);\n if (controlledIndex === undefined) setInternalIndex(i);\n };\n\n const setExpanded = (v: boolean) => {\n onExpandedChange?.(v);\n if (controlledExpanded === undefined) setInternalExpanded(v);\n };\n\n useEffect(() => {\n if (!isExpanded) return;\n itemRefs.current[activeIndex]?.scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\",\n });\n }, [activeIndex, isExpanded]);\n\n return (\n <div\n className={cn(\"rp-container\", className)}\n style={REVIEW_PANEL_THEME[theme] as React.CSSProperties}\n >\n {/* Header */}\n <div className={cn(\"rp-header\", classes?.header)}>\n <div className=\"rp-header-left\">{headerLeftSlot}</div>\n\n {headerRightSlot ? (\n headerRightSlot({\n activeIndex,\n total: data.length,\n setIndex,\n isExpanded,\n setExpanded,\n })\n ) : (\n <div className={cn(\"rp-header-right\", classes?.headerRight)}>\n <span>\n {activeIndex + 1} of {data.length}\n </span>\n <button\n onClick={() =>\n setIndex(Math.min(activeIndex + 1, data.length - 1))\n }\n >\n <ChevronDownIcon />\n </button>\n <button onClick={() => setIndex(Math.max(activeIndex - 1, 0))}>\n <ChevronUpIcon />\n </button>\n </div>\n )}\n\n <button onClick={() => setExpanded(!isExpanded)}>\n {isExpanded ? <CollapseIcon /> : <ExpandIcon />}\n </button>\n </div>\n\n {isExpanded && (\n <div className={cn(\"rp-list\", classes?.listWrapper)}>\n {data.map((item, index) => {\n const status = getItemStatus?.(item, index);\n const isActive = index === activeIndex;\n\n return (\n <div\n key={keyExtractor(item, index)}\n ref={(el) => (itemRefs.current[index] = el)}\n onClick={() => setIndex(index)}\n >\n {renderItem ? (\n renderItem({ item, index, isActive, status })\n ) : (\n <DefaultReviewItem\n item={item}\n index={index}\n isActive={isActive}\n status={status}\n config={itemConfig ?? {}}\n classes={classes}\n />\n )}\n </div>\n );\n })}\n </div>\n )}\n\n {footerSlot && <div className=\"rp-footer\">{footerSlot}</div>}\n </div>\n );\n};"],"names":["cn","args","filter","Boolean","join","ChevronDownIcon","jsx","width","height","viewBox","fill","children","d","stroke","strokeWidth","ChevronUpIcon","ExpandIcon","jsxs","xmlns","className","CollapseIcon","CheckIcon","cx","cy","r","REVIEW_PANEL_THEME","dark","light","DefaultReviewItem","item","index","isActive","status","config","classes","textKey","showStatusIcon","showRightBadge","rightBadgeText","root","active","reviewed","icon","text","String","rightBadge","ReviewPanel","data","renderItem","itemConfig","keyExtractor","_","i","toString","activeIndex","controlledIndex","onActiveChange","expanded","controlledExpanded","onExpandedChange","headerLeftSlot","footerSlot","headerRightSlot","getItemStatus","theme","internalIndex","setInternalIndex","useState","internalExpanded","setInternalExpanded","isExpanded","itemRefs","useRef","setIndex","setExpanded","v","useEffect","current","scrollIntoView","behavior","block","style","header","total","length","headerRight","onClick","Math","min","max","listWrapper","map","ref","el"],"mappings":"2IAOA,SAASA,KAAMC,GACb,OAAOA,EAAKC,OAAOC,SAASC,KAAK,IACnC,CAMA,MAAMC,EAAkB,IACrBC,EAAA,MAAA,CAAIC,MAAM,KAAKC,OAAO,KAAKC,QAAQ,YAAYC,KAAK,OACnDC,SAAAL,EAAC,QAAKM,EAAE,eAAeC,OAAO,eAAeC,YAAY,QAIvDC,EAAgB,IACnBT,EAAA,MAAA,CAAIC,MAAM,KAAKC,OAAO,KAAKC,QAAQ,YAAYC,KAAK,OACnDC,SAAAL,EAAC,QAAKM,EAAE,kBAAkBC,OAAO,eAAeC,YAAY,QAI1DE,EAAa,IACjBC,EAAC,MAAA,CACCC,MAAM,6BACNX,MAAM,KACNC,OAAO,KACPC,QAAQ,YACRC,KAAK,OACLG,OAAO,eACP,eAAa,IACb,iBAAe,QACf,kBAAgB,QAChBM,UAAU,2DAEVR,SAAA,CAACL,EAAA,OAAA,CAAKM,EAAE,cACRN,EAAC,OAAK,CAAAM,EAAE,cACRN,EAAC,OAAK,CAAAM,EAAE,cACRN,EAAC,OAAK,CAAAM,EAAE,kBAINQ,EAAe,IACnBH,EAAC,MAAA,CACCC,MAA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nDzE,WAACN,EAAgB,MAElBC,EAAA,SAAA,CAAOgF,QAAS,IAAMb,EAASc,KAAKE,IAAInC,EAAc,EAAG,IACxD3C,SAAAL,EAACS,GAAc,QAKpBT,EAAA,SAAA,CAAOgF,QAAS,IAAMZ,GAAaJ,GACjC3D,SAAcL,EAAdgE,EAAclD,EAAmBJ,EAAnB,SAIlBsD,GACChE,EAAC,MAAI,CAAAa,UAAWnB,EAAG,UAAWkC,GAASwD,aACpC/E,SAAAoC,EAAK4C,IAAI,CAAC9D,EAAMC,KACT,MAAAE,EAAS+B,IAAgBlC,EAAMC,GAC/BC,EAAWD,IAAUwB,EAGzB,OAAAhD,EAAC,MAAA,CAECsF,IAAMC,GAAQtB,EAASM,QAAQ/C,GAAS+D,EACxCP,QAAS,IAAMb,EAAS3C,GAEvBnB,SAAAqC,EACCA,EAAW,CAAEnB,OAAMC,QAAOC,WAAUC,WAEpC1B,EAACsB,EAAA,CACCC,OACAC,QACAC,WACAC,SACAC,OAAQgB,GAAc,CAAC,EACvBf,aAbCgB,EAAarB,EAAMC,QAsBjC+B,GAAcvD,EAAC,MAAI,CAAAa,UAAU,YAAaR,SAAWkD"}
1
+ {"version":3,"file":"ReviewPanel.js","sources":["../../../src/features/ReviewPanel/ReviewPanel.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\nimport \"./ReviewPanel.css\";\n\n/* =======================\n Utils\n======================= */\n\nfunction cn(...args: Array<string | false | undefined>) {\n return args.filter(Boolean).join(\" \");\n}\n\n/* =======================\n SVG Icons\n======================= */\n\nconst ChevronDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M6 9l6 6 6-6\" stroke=\"currentColor\" strokeWidth=\"2\" />\n </svg>\n);\n\nconst ChevronUpIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 15l-6-6-6 6\" stroke=\"currentColor\" strokeWidth=\"2\" />\n </svg>\n);\n\nconst ExpandIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n className=\"lucide lucide-maximize2-icon lucide-maximize-2 rp-border\"\n >\n <path d=\"M15 3h6v6\" />\n <path d=\"m21 3-7 7\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M9 21H3v-6\" />\n </svg>\n);\n\nconst CollapseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n className=\"lucide lucide-minimize2-icon lucide-minimize-2 rp-border\"\n >\n <path d=\"m14 10 7-7\" />\n <path d=\"M20 10h-6V4\" />\n <path d=\"m3 21 7-7\" />\n <path d=\"M4 14h6v6\" />\n </svg>\n);\n\nconst CheckIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#87c66b\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n className=\"lucide lucide-circle-check-icon lucide-circle-check\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n);\n\n/* =======================\n Theme (CSS Variables)\n======================= */\n\nconst REVIEW_PANEL_THEME = {\n dark: {\n \"--rp-bg\": \"#000\",\n \"--rp-text\": \"#fff\",\n \"--rp-active-bg\": \"#1f2930\",\n \"--rp-muted\": \"#8c8c8c\",\n \"--rp-border\": \"#434343\",\n \"--rp-success\": \"#4ade80\",\n },\n light: {\n \"--rp-bg\": \"#fff\",\n \"--rp-text\": \"#000\",\n \"--rp-active-bg\": \"#e5eef5\",\n \"--rp-muted\": \"#8c8c8c\",\n \"--rp-border\": \"#434343\",\n \"--rp-success\": \"#16a34a\",\n },\n} as const;\n\n/* =======================\n Types\n======================= */\n\nexport type ReviewStatus = \"pending\" | \"reviewed\" | \"rejected\";\n\nexport interface ReviewPanelClasses {\n header?: string;\n headerRight?: string;\n listWrapper?: string;\n item?: {\n root?: string;\n active?: string;\n reviewed?: string;\n text?: string;\n rightBadge?: string;\n icon?: string;\n };\n}\n\nexport interface DefaultItemConfig<T> {\n textKey?: keyof T;\n showStatusIcon?: boolean;\n showRightBadge?: boolean;\n rightBadgeText?: (item: T, index: number) => React.ReactNode;\n}\n\nexport interface ReviewPanelProps<T> {\n data: T[];\n renderItem?: (params: {\n item: T;\n index: number;\n isActive: boolean;\n status?: ReviewStatus;\n }) => React.ReactNode;\n itemConfig?: DefaultItemConfig<T>;\n classes?: ReviewPanelClasses;\n keyExtractor?: (item: T, index: number) => string;\n activeIndex?: number;\n onActiveChange?: (index: number) => void;\n expanded?: boolean;\n onExpandedChange?: (expanded: boolean) => void;\n headerLeftSlot?: React.ReactNode;\n footerSlot?: React.ReactNode;\n headerRightSlot?: (params: {\n activeIndex: number;\n total: number;\n setIndex: (i: number) => void;\n isExpanded: boolean;\n setExpanded: (v: boolean) => void;\n }) => React.ReactNode;\n getItemStatus?: (item: T, index: number) => ReviewStatus;\n theme?: \"dark\" | \"light\";\n className?: string;\n}\n\n/* =======================\n Default Item Renderer\n======================= */\n\nfunction DefaultReviewItem<T>({\n item,\n index,\n isActive,\n status = \"pending\",\n config,\n classes,\n}: {\n item: T;\n index: number;\n isActive: boolean;\n status?: ReviewStatus;\n config: DefaultItemConfig<T>;\n classes?: ReviewPanelClasses;\n}) {\n const {\n textKey = \"text\" as keyof T,\n showStatusIcon = true,\n showRightBadge = true,\n rightBadgeText,\n } = config;\n\n return (\n <div\n className={cn(\n \"rp-item\",\n isActive && \"rp-item--active\",\n status === \"reviewed\" && \"rp-item--reviewed\",\n classes?.item?.root,\n isActive && classes?.item?.active,\n status === \"reviewed\" && classes?.item?.reviewed,\n )}\n >\n {showStatusIcon && status === \"reviewed\" && (\n <span className={classes?.item?.icon}>\n <CheckIcon />\n </span>\n )}\n\n <span className={cn(\"rp-item-text\", classes?.item?.text)}>\n {String((item as any)[textKey])}\n </span>\n\n {showRightBadge && rightBadgeText && (\n <span className={cn(\"rp-item-badge\", classes?.item?.rightBadge)}>\n {rightBadgeText(item, index)}\n </span>\n )}\n </div>\n );\n}\n\n/* =======================\n ReviewPanel Component\n======================= */\n\nexport const ReviewPanel = <T,>({\n data,\n renderItem,\n itemConfig,\n classes,\n keyExtractor = (_, i) => i.toString(),\n activeIndex: controlledIndex,\n onActiveChange,\n expanded: controlledExpanded,\n onExpandedChange,\n headerLeftSlot,\n footerSlot,\n headerRightSlot,\n getItemStatus,\n theme = \"dark\",\n className,\n}: ReviewPanelProps<T>) => {\n const [internalIndex, setInternalIndex] = useState(0);\n const [internalExpanded, setInternalExpanded] = useState(false);\n\n const activeIndex = controlledIndex ?? internalIndex;\n const isExpanded = controlledExpanded ?? internalExpanded;\n\n const itemRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n const setIndex = (i: number) => {\n onActiveChange?.(i);\n if (controlledIndex === undefined) setInternalIndex(i);\n };\n\n const setExpanded = (v: boolean) => {\n onExpandedChange?.(v);\n if (controlledExpanded === undefined) setInternalExpanded(v);\n };\n\n useEffect(() => {\n if (!isExpanded) return;\n itemRefs.current[activeIndex]?.scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\",\n });\n }, [activeIndex, isExpanded]);\n\n return (\n <div\n className={cn(\"rp-container\", className)}\n style={REVIEW_PANEL_THEME[theme] as React.CSSProperties}\n >\n {/* Header */}\n <div className={cn(\"rp-header\", classes?.header)}>\n <div className=\"rp-header-left\">{headerLeftSlot}</div>\n\n {headerRightSlot ? (\n headerRightSlot({\n activeIndex,\n total: data.length,\n setIndex,\n isExpanded,\n setExpanded,\n })\n ) : (\n <div className={cn(\"rp-header-right\", classes?.headerRight)}>\n <span>\n {activeIndex + 1} of {data.length}\n </span>\n <button\n onClick={() =>\n setIndex(Math.min(activeIndex + 1, data.length - 1))\n }\n >\n <ChevronDownIcon />\n </button>\n <button onClick={() => setIndex(Math.max(activeIndex - 1, 0))}>\n <ChevronUpIcon />\n </button>\n </div>\n )}\n\n <button onClick={() => setExpanded(!isExpanded)}>\n {isExpanded ? <CollapseIcon /> : <ExpandIcon />}\n </button>\n </div>\n\n {isExpanded && (\n <div className={cn(\"rp-list\", classes?.listWrapper)}>\n {data.map((item, index) => {\n const status = getItemStatus?.(item, index);\n const isActive = index === activeIndex;\n\n return (\n <div\n key={keyExtractor(item, index)}\n ref={(el) => (itemRefs.current[index] = el)}\n onClick={() => setIndex(index)}\n >\n {renderItem ? (\n renderItem({ item, index, isActive, status })\n ) : (\n <DefaultReviewItem\n item={item}\n index={index}\n isActive={isActive}\n status={status}\n config={itemConfig ?? {}}\n classes={classes}\n />\n )}\n </div>\n );\n })}\n </div>\n )}\n\n {footerSlot && <div className=\"rp-footer\">{footerSlot}</div>}\n </div>\n );\n};"],"names":["cn","args","filter","Boolean","join","ChevronDownIcon","jsx","width","height","viewBox","fill","children","d","stroke","strokeWidth","ChevronUpIcon","ExpandIcon","jsxs","xmlns","className","CollapseIcon","CheckIcon","cx","cy","r","REVIEW_PANEL_THEME","dark","light","DefaultReviewItem","item","index","isActive","status","config","classes","textKey","showStatusIcon","showRightBadge","rightBadgeText","root","active","reviewed","icon","text","String","rightBadge","ReviewPanel","data","renderItem","itemConfig","keyExtractor","_","i","toString","activeIndex","controlledIndex","onActiveChange","expanded","controlledExpanded","onExpandedChange","headerLeftSlot","footerSlot","headerRightSlot","getItemStatus","theme","internalIndex","setInternalIndex","useState","internalExpanded","setInternalExpanded","isExpanded","itemRefs","useRef","setIndex","setExpanded","v","useEffect","current","scrollIntoView","behavior","block","style","header","total","length","headerRight","onClick","Math","min","max","listWrapper","map","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SAAAqC,EACCA,EAAW,CAAEnB,OAAMC,QAAOC,WAAUC,WAEpC1B,EAACsB,EAAA,CACCC,OACAC,QACAC,WACAC,SACAC,OAAQgB,GAAc,CAAC,EACvBf,aAbCgB,EAAarB,EAAMC,QAsBjC+B,GAAcvD,EAAC,MAAI,CAAAa,UAAU,YAAaR,SAAWkD"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as n,useMemo as t}from"react";import{Box as o}from"@mui/system";import{Typography as r,Chip as a,IconButton as l,Accordion as c,AccordionSummary as s,AccordionDetails as d,Divider as h}from"@mui/material";import m from"@mui/icons-material/Close";import x from"@mui/icons-material/ExpandMore";import{LightbulbOutlined as p,ManageSearchOutlined as f,ChatBubbleOutlineOutlined as g}from"@mui/icons-material";import u from"@mui/icons-material/AutoAwesome";import b from"../ChatCitation/ChatCitationRenderer.js";const y=e=>{const i=document.createElement("div");return i.innerHTML=e,Array.from(i.querySelectorAll("li")).map(e=>e.innerHTML)},v=e=>e.replace(/^.*\$/,""),C=({style:e})=>i(o,{component:"svg",viewBox:"0 0 24 24",sx:{width:14,height:14,fill:"#5928ed",...e},children:i("path",{d:"M12 2a7 7 0 0 0-4 12.74V17a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.26A7 7 0 0 0 12 2zm-1 19h2v1h-2v-1z"})}),_=({open:_,onClose:S,data:k,styles:z})=>{const[I,w]=n(null),A=t(()=>I&&k?k.block_cognitive_citations.find(e=>String(e.citation_number)===I)??null:null,[I,k]),B=t(()=>k?.block_cognitive_reasoning_html?y(k.block_cognitive_reasoning_html):[],[k?.block_cognitive_reasoning_html]),R=t(()=>k?.block_cognitive_gap_html?y(k.block_cognitive_gap_html):[],[k?.block_cognitive_gap_html]),D=(n,t)=>{const r=[],a=/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/g;let l,c=0,s=0;for(;null!==(l=a.exec(n));){const d=v(l[1]),h=l[2],m=I===d;l.index>c&&r.push(i("span",{children:n.substring(c,l.index)},`txt-${t}-${s++}`)),r.push(e("span",{children:[e("span",{onClick:()=>w(e=>e===d?null:d),style:{color:"#2563EB",fontWeight:500,cursor:"pointer",textDecoration:"underline",...z?.citationLink},children:[h,i(g,{sx:{fontSize:"12px",ml:.2}})]}),m&&A&&i(o,{sx:{maxHeight:"35vh",padding:"6px",overflow:"auto",backgroundColor:"#ffffff",mt:1,...z?.citationContainer},children:i(b,{showRootContainer:!1,modalContainerStyle:z?.citationModalContainer,rootContainer:{relevanceScore:k?.block_cognitive_confidence??0,slotStyles:{container:{border:"",paddingLeft:"-20px",color:z?.textContent?.color??"black",...z?.citationRootContainer}}},ruleBookContainer:{title:A.training_data_title||A.title||A.section_ref||"Rule Book",data:{content:A.data_sources?.join("\n\n")||A.content||A.paraphrase||"",highlighted_texts:A.paraphrase?Array.isArray(A.paraphrase)?A.paraphrase:[A.paraphrase]:Array.isArray(A.highlight)?A.highlight:A.highlight?[A.highlight]:[]},slotStyles:{title:z?.citationTitle,body:z?.citationBody,dataContainer:z?.citationDataContainer,outerContainer:{margin:"0",color:z?.textContent?.color??"black",minHeight:"350px",...z?.citationRuleBookContainer}}},additionalData:{RuleBookDetailedViewVerticallyStacked:!0},reversePanels:!0})})]},`anchor-${t}-${d}`)),c=a.lastIndex}return c<n.length&&r.push(i("span",{children:n.substring(c)},`txt-end-${t}-${s++}`)),r};return _?e(o,{sx:{width:"min(500px, calc(100vw - 16px))",maxWidth:"calc(100vw - 16px)",maxHeight:"80vh",borderRadius:3,display:"flex",flexDirection:"column",overflow:"hidden",border:"1px solid #e0e0e0",backgroundColor:"#fff",color:"#111827",...z?.container},children:[e(o,{sx:{px:2,py:1,borderBottom:"1px solid #e0e0e0",display:"flex",justifyContent:"space-between",alignItems:"center",flexShrink:0,backgroundColor:"#e9ecfd",...z?.header},children:[e(o,{display:"flex",alignItems:"center",gap:1,children:[i(C,{style:z?.headerIcon}),i(r,{fontWeight:500,sx:{fontSize:"0.72rem",...z?.headerTitleText},children:"Cognitive Decisioning AI"})]}),e(o,{display:"flex",alignItems:"center",gap:1,children:[i(a,{icon:i(u,{sx:{fontSize:12}}),label:`AI Relevance: ${k?.block_cognitive_confidence??0}%`,size:"small",sx:{fontWeight:500,fontSize:"0.68rem",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ac93f6",height:20,"& .MuiChip-label":{fontSize:"0.68rem",px:.75},...z?.badge}}),i(l,{size:"small",onClick:S,sx:z?.closeButton,children:i(m,{fontSize:"small"})})]})]}),e(o,{sx:{flex:1,overflowY:"auto",p:.5,...z?.body},children:[e(c,{defaultExpanded:!0,disableGutters:!0,elevation:0,sx:z?.accordion,children:[i(s,{expandIcon:i(x,{}),sx:z?.accordionSummary,children:e(r,{sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem",...z?.sectionTitle},fontWeight:600,children:[i(o,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...z?.sectionIcon},children:i(p,{sx:{fontSize:14,color:"#5928ed"}})}),"Decision Making Factors"]})}),i(d,{sx:z?.accordionDetails,children:i(o,{sx:{padding:0,margin:0},children:B.length>0?B.map((n,t)=>e(o,{sx:{marginBottom:"6px",display:"flex",gap:1,...z?.sectionItem},children:[e(r,{variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem",...z?.indexText},children:[t+1,"."]}),i(o,{sx:{flex:1},children:i(r,{variant:"body2",component:"span",sx:{fontSize:"0.75rem",...z?.textContent},children:D(n,t)})})]},t)):i(r,{variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem",...z?.sectionSubtitle},children:"No Reasons Found"})})})]}),i(h,{}),e(c,{disableGutters:!0,elevation:0,sx:z?.accordion,children:[i(s,{expandIcon:i(x,{}),sx:z?.accordionSummary,children:e(r,{sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem",...z?.sectionTitle},fontWeight:600,children:[i(o,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...z?.sectionIcon},children:i(f,{sx:{fontSize:14,color:"#5928ed"}})}),"Gaps in Decision"]})}),i(d,{sx:z?.accordionDetails,children:i(o,{sx:{padding:0,margin:0},children:R.length>0?R.map((n,t)=>e(o,{sx:{marginBottom:"6px",display:"flex",gap:1,...z?.sectionItem},children:[e(r,{variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem",...z?.indexText},children:[t+1,"."]}),i(r,{variant:"body2",component:"span",sx:{fontSize:"0.75rem",...z?.textContent},dangerouslySetInnerHTML:{__html:n}})]},t)):i(r,{variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem",...z?.sectionSubtitle},children:"No Gaps Found"})})})]})]})]}):null};export{_ as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useMemo as s}from"react";import"@emotion/styled";import"@emotion/react";import"../../node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/StyledEngineProvider/StyledEngineProvider.js";import"../../node_modules/.pnpm/@mui_styled-engine@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_suppo_4520a21969629b42d6140ade25533e86/node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/borders/borders.js";import"../../_virtual/index.js";import"../../_virtual/index4.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/display/display.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/flexbox/flexbox.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/cssGrid/cssGrid.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/palette/palette.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/positions/positions.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/shadows/shadows.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/sizing/sizing.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/spacing/spacing.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/responsivePropType/responsivePropType.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/typography/typography.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/getThemeValue/getThemeValue.js";import c from"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/Box.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Box/boxClasses.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/useTheme/useTheme.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/createStyled/createStyled.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js";import"../../node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js";import"../../node_modules/.pnpm/@mui_private-theming@6.4.9_@types_react@18.3.31_react@18.3.1/node_modules/@mui/private-theming/useTheme/ThemeContext.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/RtlProvider/index.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/createContainer.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/Container.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Container/containerClasses.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/Grid.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/createGrid.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Grid/gridClasses.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/Stack.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/createStack.js";import"../../node_modules/.pnpm/@mui_system@6.5.0_@emotion_react@11.14.0_@types_react@18.3.31_react@18.3.1_supports-col_c17c8c48cc2dc4f6280b73b3c2092554/node_modules/@mui/system/esm/Stack/stackClasses.js";import{Typography as i,Chip as n,IconButton as r,Accordion as m,AccordionSummary as a,AccordionDetails as _,Divider as d}from"@mui/material";import l from"@mui/icons-material/Close";import p from"@mui/icons-material/ExpandMore";import{LightbulbOutlined as u,ManageSearchOutlined as y,ChatBubbleOutlineOutlined as h}from"@mui/icons-material";import f from"@mui/icons-material/AutoAwesome";import b from"../ChatCitation/ChatCitationRenderer.js";const x=e=>{const t=document.createElement("div");return t.innerHTML=e,Array.from(t.querySelectorAll("li")).map(e=>e.innerHTML)},g=e=>e.replace(/^.*\$/,""),v=({style:e})=>t(c,{component:"svg",viewBox:"0 0 24 24",sx:{width:14,height:14,fill:"#5928ed",...e},children:t("path",{d:"M12 2a7 7 0 0 0-4 12.74V17a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2.26A7 7 0 0 0 12 2zm-1 19h2v1h-2v-1z"})}),S=({open:S,onClose:C,data:j,styles:k})=>{const[z,T]=o(null),I=s(()=>z&&j?j.block_cognitive_citations.find(e=>String(e.citation_number)===z)??null:null,[z,j]),w=s(()=>j?.block_cognitive_reasoning_html?x(j.block_cognitive_reasoning_html):[],[j?.block_cognitive_reasoning_html]),G=s(()=>j?.block_cognitive_gap_html?x(j.block_cognitive_gap_html):[],[j?.block_cognitive_gap_html]),B=(o,s)=>{const i=[],n=/<a[^>]*href="([^"]+)"[^>]*>(.*?)<\/a>/g;let r,m=0,a=0;for(;null!==(r=n.exec(o));){const _=g(r[1]),d=r[2],l=z===_;r.index>m&&i.push(t("span",{children:o.substring(m,r.index)},`txt-${s}-${a++}`)),i.push(e("span",{children:[e("span",{onClick:()=>T(e=>e===_?null:_),style:{color:"#2563EB",fontWeight:500,cursor:"pointer",textDecoration:"underline",...k?.citationLink},children:[d,t(h,{sx:{fontSize:"12px",ml:.2}})]}),l&&I&&t(c,{sx:{maxHeight:"35vh",padding:"6px",overflow:"auto",backgroundColor:"#ffffff",mt:1,...k?.citationContainer},children:t(b,{showRootContainer:!1,modalContainerStyle:k?.citationModalContainer,rootContainer:{relevanceScore:j?.block_cognitive_confidence??0,slotStyles:{container:{border:"",paddingLeft:"-20px",color:k?.textContent?.color??"black",...k?.citationRootContainer}}},ruleBookContainer:{title:I.training_data_title||I.title||I.section_ref||"Rule Book",data:{content:I.data_sources?.join("\n\n")||I.content||I.paraphrase||"",highlighted_texts:I.paraphrase?Array.isArray(I.paraphrase)?I.paraphrase:[I.paraphrase]:Array.isArray(I.highlight)?I.highlight:I.highlight?[I.highlight]:[]},slotStyles:{title:k?.citationTitle,body:k?.citationBody,dataContainer:k?.citationDataContainer,outerContainer:{margin:"0",color:k?.textContent?.color??"black",minHeight:"350px",...k?.citationRuleBookContainer}}},additionalData:{RuleBookDetailedViewVerticallyStacked:!0},reversePanels:!0})})]},`anchor-${s}-${_}`)),m=n.lastIndex}return m<o.length&&i.push(t("span",{children:o.substring(m)},`txt-end-${s}-${a++}`)),i};return S?e(c,{sx:{width:"min(500px, calc(100vw - 16px))",maxWidth:"calc(100vw - 16px)",maxHeight:"80vh",borderRadius:3,display:"flex",flexDirection:"column",overflow:"hidden",border:"1px solid #e0e0e0",backgroundColor:"#fff",color:"#111827",...k?.container},children:[e(c,{sx:{px:2,py:1,borderBottom:"1px solid #e0e0e0",display:"flex",justifyContent:"space-between",alignItems:"center",flexShrink:0,backgroundColor:"#e9ecfd",...k?.header},children:[e(c,{display:"flex",alignItems:"center",gap:1,children:[t(v,{style:k?.headerIcon}),t(i,{fontWeight:500,sx:{fontSize:"0.72rem",...k?.headerTitleText},children:"Cognitive Decisioning AI"})]}),e(c,{display:"flex",alignItems:"center",gap:1,children:[t(n,{icon:t(f,{sx:{fontSize:12}}),label:`AI Relevance: ${j?.block_cognitive_confidence??0}%`,size:"small",sx:{fontWeight:500,fontSize:"0.68rem",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ac93f6",height:20,"& .MuiChip-label":{fontSize:"0.68rem",px:.75},...k?.badge}}),t(r,{size:"small",onClick:C,sx:k?.closeButton,children:t(l,{fontSize:"small"})})]})]}),e(c,{sx:{flex:1,overflowY:"auto",p:.5,...k?.body},children:[e(m,{defaultExpanded:!0,disableGutters:!0,elevation:0,sx:k?.accordion,children:[t(a,{expandIcon:t(p,{}),sx:k?.accordionSummary,children:e(i,{sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem",...k?.sectionTitle},fontWeight:600,children:[t(c,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...k?.sectionIcon},children:t(u,{sx:{fontSize:14,color:"#5928ed"}})}),"Decision Making Factors"]})}),t(_,{sx:k?.accordionDetails,children:t(c,{sx:{padding:0,margin:0},children:w.length>0?w.map((o,s)=>e(c,{sx:{marginBottom:"6px",display:"flex",gap:1,...k?.sectionItem},children:[e(i,{variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem",...k?.indexText},children:[s+1,"."]}),t(c,{sx:{flex:1},children:t(i,{variant:"body2",component:"span",sx:{fontSize:"0.75rem",...k?.textContent},children:B(o,s)})})]},s)):t(i,{variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem",...k?.sectionSubtitle},children:"No Reasons Found"})})})]}),t(d,{}),e(m,{disableGutters:!0,elevation:0,sx:k?.accordion,children:[t(a,{expandIcon:t(p,{}),sx:k?.accordionSummary,children:e(i,{sx:{display:"flex",alignItems:"center",gap:.8,fontSize:"0.78rem",...k?.sectionTitle},fontWeight:600,children:[t(c,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#e9ecfd",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,...k?.sectionIcon},children:t(y,{sx:{fontSize:14,color:"#5928ed"}})}),"Gaps in Decision"]})}),t(_,{sx:k?.accordionDetails,children:t(c,{sx:{padding:0,margin:0},children:G.length>0?G.map((o,s)=>e(c,{sx:{marginBottom:"6px",display:"flex",gap:1,...k?.sectionItem},children:[e(i,{variant:"body2",sx:{fontWeight:500,fontSize:"0.75rem",...k?.indexText},children:[s+1,"."]}),t(i,{variant:"body2",component:"span",sx:{fontSize:"0.75rem",...k?.textContent},dangerouslySetInnerHTML:{__html:o}})]},s)):t(i,{variant:"body2",color:"gray",sx:{mb:.5,pl:3,fontSize:"0.72rem",...k?.sectionSubtitle},children:"No Gaps Found"})})})]})]})]}):null};export{S as default};
2
2
  //# sourceMappingURL=Cognitivereasoningpanel.js.map