@e-llm-studio/citation 0.0.85 → 0.0.87

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 (228) hide show
  1. package/dist/cjs/features/Bookemon/BookPreview/BookPreview.js +1 -1
  2. package/dist/cjs/features/Bookemon/Bookemon.js +1 -1
  3. package/dist/cjs/features/CodeCitation/CodeCitation.js +1 -1
  4. package/dist/cjs/utils/themeManager.js +2 -0
  5. package/dist/cjs/utils/themeManager.js.map +1 -0
  6. package/dist/features/Bookemon/BookPreview/BookPreview.js +1 -1
  7. package/dist/features/Bookemon/Bookemon.js +1 -1
  8. package/dist/features/CodeCitation/CodeCitation.js +1 -1
  9. package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts.map +1 -1
  10. package/dist/types/src/features/Bookemon/Bookemon.d.ts.map +1 -1
  11. package/dist/types/src/features/CodeCitation/CodeCitation.d.ts.map +1 -1
  12. package/dist/types/src/utils/themeManager.d.ts +13 -0
  13. package/dist/types/src/utils/themeManager.d.ts.map +1 -0
  14. package/dist/utils/themeManager.js +2 -0
  15. package/dist/utils/themeManager.js.map +1 -0
  16. package/package.json +156 -156
  17. package/dist/_virtual/browser.js +0 -2
  18. package/dist/_virtual/browser.js.map +0 -1
  19. package/dist/_virtual/form_data.js +0 -2
  20. package/dist/_virtual/form_data.js.map +0 -1
  21. package/dist/_virtual/index14.js +0 -2
  22. package/dist/_virtual/index14.js.map +0 -1
  23. package/dist/_virtual/index15.js +0 -2
  24. package/dist/_virtual/index15.js.map +0 -1
  25. package/dist/_virtual/index16.js +0 -2
  26. package/dist/_virtual/index16.js.map +0 -1
  27. package/dist/_virtual/index17.js +0 -2
  28. package/dist/_virtual/index17.js.map +0 -1
  29. package/dist/_virtual/index18.js +0 -2
  30. package/dist/_virtual/index18.js.map +0 -1
  31. package/dist/_virtual/index19.js +0 -2
  32. package/dist/_virtual/index19.js.map +0 -1
  33. package/dist/_virtual/node.js +0 -2
  34. package/dist/_virtual/node.js.map +0 -1
  35. package/dist/_virtual/serialOrdered.js +0 -2
  36. package/dist/_virtual/serialOrdered.js.map +0 -1
  37. package/dist/cjs/_virtual/browser.js +0 -2
  38. package/dist/cjs/_virtual/browser.js.map +0 -1
  39. package/dist/cjs/_virtual/form_data.js +0 -2
  40. package/dist/cjs/_virtual/form_data.js.map +0 -1
  41. package/dist/cjs/_virtual/index14.js +0 -2
  42. package/dist/cjs/_virtual/index14.js.map +0 -1
  43. package/dist/cjs/_virtual/index15.js +0 -2
  44. package/dist/cjs/_virtual/index15.js.map +0 -1
  45. package/dist/cjs/_virtual/index16.js +0 -2
  46. package/dist/cjs/_virtual/index16.js.map +0 -1
  47. package/dist/cjs/_virtual/index17.js +0 -2
  48. package/dist/cjs/_virtual/index17.js.map +0 -1
  49. package/dist/cjs/_virtual/index18.js +0 -2
  50. package/dist/cjs/_virtual/index18.js.map +0 -1
  51. package/dist/cjs/_virtual/index19.js +0 -2
  52. package/dist/cjs/_virtual/index19.js.map +0 -1
  53. package/dist/cjs/_virtual/node.js +0 -2
  54. package/dist/cjs/_virtual/node.js.map +0 -1
  55. package/dist/cjs/_virtual/serialOrdered.js +0 -2
  56. package/dist/cjs/_virtual/serialOrdered.js.map +0 -1
  57. package/dist/cjs/node_modules/asynckit/index.js +0 -2
  58. package/dist/cjs/node_modules/asynckit/index.js.map +0 -1
  59. package/dist/cjs/node_modules/asynckit/lib/abort.js +0 -2
  60. package/dist/cjs/node_modules/asynckit/lib/abort.js.map +0 -1
  61. package/dist/cjs/node_modules/asynckit/lib/async.js +0 -2
  62. package/dist/cjs/node_modules/asynckit/lib/async.js.map +0 -1
  63. package/dist/cjs/node_modules/asynckit/lib/defer.js +0 -2
  64. package/dist/cjs/node_modules/asynckit/lib/defer.js.map +0 -1
  65. package/dist/cjs/node_modules/asynckit/lib/iterate.js +0 -2
  66. package/dist/cjs/node_modules/asynckit/lib/iterate.js.map +0 -1
  67. package/dist/cjs/node_modules/asynckit/lib/state.js +0 -2
  68. package/dist/cjs/node_modules/asynckit/lib/state.js.map +0 -1
  69. package/dist/cjs/node_modules/asynckit/lib/terminator.js +0 -2
  70. package/dist/cjs/node_modules/asynckit/lib/terminator.js.map +0 -1
  71. package/dist/cjs/node_modules/asynckit/parallel.js +0 -2
  72. package/dist/cjs/node_modules/asynckit/parallel.js.map +0 -1
  73. package/dist/cjs/node_modules/asynckit/serial.js +0 -2
  74. package/dist/cjs/node_modules/asynckit/serial.js.map +0 -1
  75. package/dist/cjs/node_modules/asynckit/serialOrdered.js +0 -2
  76. package/dist/cjs/node_modules/asynckit/serialOrdered.js.map +0 -1
  77. package/dist/cjs/node_modules/axios/lib/adapters/http.js +0 -2
  78. package/dist/cjs/node_modules/axios/lib/adapters/http.js.map +0 -1
  79. package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
  80. package/dist/cjs/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
  81. package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
  82. package/dist/cjs/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
  83. package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js +0 -2
  84. package/dist/cjs/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
  85. package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
  86. package/dist/cjs/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
  87. package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
  88. package/dist/cjs/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
  89. package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js +0 -2
  90. package/dist/cjs/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
  91. package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
  92. package/dist/cjs/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
  93. package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
  94. package/dist/cjs/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
  95. package/dist/cjs/node_modules/axios/lib/platform/node/index.js +0 -2
  96. package/dist/cjs/node_modules/axios/lib/platform/node/index.js.map +0 -1
  97. package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js +0 -2
  98. package/dist/cjs/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
  99. package/dist/cjs/node_modules/debug/src/browser.js +0 -2
  100. package/dist/cjs/node_modules/debug/src/browser.js.map +0 -1
  101. package/dist/cjs/node_modules/debug/src/common.js +0 -2
  102. package/dist/cjs/node_modules/debug/src/common.js.map +0 -1
  103. package/dist/cjs/node_modules/debug/src/index.js +0 -2
  104. package/dist/cjs/node_modules/debug/src/index.js.map +0 -1
  105. package/dist/cjs/node_modules/debug/src/node.js +0 -2
  106. package/dist/cjs/node_modules/debug/src/node.js.map +0 -1
  107. package/dist/cjs/node_modules/decode-named-character-reference/index.js +0 -2
  108. package/dist/cjs/node_modules/decode-named-character-reference/index.js.map +0 -1
  109. package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
  110. package/dist/cjs/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
  111. package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
  112. package/dist/cjs/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
  113. package/dist/cjs/node_modules/follow-redirects/debug.js +0 -2
  114. package/dist/cjs/node_modules/follow-redirects/debug.js.map +0 -1
  115. package/dist/cjs/node_modules/follow-redirects/index.js +0 -2
  116. package/dist/cjs/node_modules/follow-redirects/index.js.map +0 -1
  117. package/dist/cjs/node_modules/form-data/lib/form_data.js +0 -2
  118. package/dist/cjs/node_modules/form-data/lib/form_data.js.map +0 -1
  119. package/dist/cjs/node_modules/form-data/lib/populate.js +0 -2
  120. package/dist/cjs/node_modules/form-data/lib/populate.js.map +0 -1
  121. package/dist/cjs/node_modules/has-flag/index.js +0 -2
  122. package/dist/cjs/node_modules/has-flag/index.js.map +0 -1
  123. package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  124. package/dist/cjs/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  125. package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  126. package/dist/cjs/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  127. package/dist/cjs/node_modules/mime-db/db.json.js +0 -2
  128. package/dist/cjs/node_modules/mime-db/db.json.js.map +0 -1
  129. package/dist/cjs/node_modules/mime-db/index.js +0 -8
  130. package/dist/cjs/node_modules/mime-db/index.js.map +0 -1
  131. package/dist/cjs/node_modules/mime-types/index.js +0 -8
  132. package/dist/cjs/node_modules/mime-types/index.js.map +0 -1
  133. package/dist/cjs/node_modules/ms/index.js +0 -2
  134. package/dist/cjs/node_modules/ms/index.js.map +0 -1
  135. package/dist/cjs/node_modules/proxy-from-env/index.js +0 -2
  136. package/dist/cjs/node_modules/proxy-from-env/index.js.map +0 -1
  137. package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  138. package/dist/cjs/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  139. package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
  140. package/dist/cjs/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
  141. package/dist/cjs/node_modules/supports-color/index.js +0 -2
  142. package/dist/cjs/node_modules/supports-color/index.js.map +0 -1
  143. package/dist/node_modules/asynckit/index.js +0 -2
  144. package/dist/node_modules/asynckit/index.js.map +0 -1
  145. package/dist/node_modules/asynckit/lib/abort.js +0 -2
  146. package/dist/node_modules/asynckit/lib/abort.js.map +0 -1
  147. package/dist/node_modules/asynckit/lib/async.js +0 -2
  148. package/dist/node_modules/asynckit/lib/async.js.map +0 -1
  149. package/dist/node_modules/asynckit/lib/defer.js +0 -2
  150. package/dist/node_modules/asynckit/lib/defer.js.map +0 -1
  151. package/dist/node_modules/asynckit/lib/iterate.js +0 -2
  152. package/dist/node_modules/asynckit/lib/iterate.js.map +0 -1
  153. package/dist/node_modules/asynckit/lib/state.js +0 -2
  154. package/dist/node_modules/asynckit/lib/state.js.map +0 -1
  155. package/dist/node_modules/asynckit/lib/terminator.js +0 -2
  156. package/dist/node_modules/asynckit/lib/terminator.js.map +0 -1
  157. package/dist/node_modules/asynckit/parallel.js +0 -2
  158. package/dist/node_modules/asynckit/parallel.js.map +0 -1
  159. package/dist/node_modules/asynckit/serial.js +0 -2
  160. package/dist/node_modules/asynckit/serial.js.map +0 -1
  161. package/dist/node_modules/asynckit/serialOrdered.js +0 -2
  162. package/dist/node_modules/asynckit/serialOrdered.js.map +0 -1
  163. package/dist/node_modules/axios/lib/adapters/http.js +0 -2
  164. package/dist/node_modules/axios/lib/adapters/http.js.map +0 -1
  165. package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -2
  166. package/dist/node_modules/axios/lib/helpers/AxiosTransformStream.js.map +0 -1
  167. package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -2
  168. package/dist/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js.map +0 -1
  169. package/dist/node_modules/axios/lib/helpers/callbackify.js +0 -2
  170. package/dist/node_modules/axios/lib/helpers/callbackify.js.map +0 -1
  171. package/dist/node_modules/axios/lib/helpers/formDataToStream.js +0 -2
  172. package/dist/node_modules/axios/lib/helpers/formDataToStream.js.map +0 -1
  173. package/dist/node_modules/axios/lib/helpers/fromDataURI.js +0 -2
  174. package/dist/node_modules/axios/lib/helpers/fromDataURI.js.map +0 -1
  175. package/dist/node_modules/axios/lib/helpers/readBlob.js +0 -2
  176. package/dist/node_modules/axios/lib/helpers/readBlob.js.map +0 -1
  177. package/dist/node_modules/axios/lib/platform/node/classes/FormData.js +0 -2
  178. package/dist/node_modules/axios/lib/platform/node/classes/FormData.js.map +0 -1
  179. package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -2
  180. package/dist/node_modules/axios/lib/platform/node/classes/URLSearchParams.js.map +0 -1
  181. package/dist/node_modules/axios/lib/platform/node/index.js +0 -2
  182. package/dist/node_modules/axios/lib/platform/node/index.js.map +0 -1
  183. package/dist/node_modules/combined-stream/lib/combined_stream.js +0 -2
  184. package/dist/node_modules/combined-stream/lib/combined_stream.js.map +0 -1
  185. package/dist/node_modules/debug/src/browser.js +0 -2
  186. package/dist/node_modules/debug/src/browser.js.map +0 -1
  187. package/dist/node_modules/debug/src/common.js +0 -2
  188. package/dist/node_modules/debug/src/common.js.map +0 -1
  189. package/dist/node_modules/debug/src/index.js +0 -2
  190. package/dist/node_modules/debug/src/index.js.map +0 -1
  191. package/dist/node_modules/debug/src/node.js +0 -2
  192. package/dist/node_modules/debug/src/node.js.map +0 -1
  193. package/dist/node_modules/decode-named-character-reference/index.js +0 -2
  194. package/dist/node_modules/decode-named-character-reference/index.js.map +0 -1
  195. package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js +0 -2
  196. package/dist/node_modules/decode-named-character-reference/node_modules/character-entities/index.js.map +0 -1
  197. package/dist/node_modules/delayed-stream/lib/delayed_stream.js +0 -2
  198. package/dist/node_modules/delayed-stream/lib/delayed_stream.js.map +0 -1
  199. package/dist/node_modules/follow-redirects/debug.js +0 -2
  200. package/dist/node_modules/follow-redirects/debug.js.map +0 -1
  201. package/dist/node_modules/follow-redirects/index.js +0 -2
  202. package/dist/node_modules/follow-redirects/index.js.map +0 -1
  203. package/dist/node_modules/form-data/lib/form_data.js +0 -2
  204. package/dist/node_modules/form-data/lib/form_data.js.map +0 -1
  205. package/dist/node_modules/form-data/lib/populate.js +0 -2
  206. package/dist/node_modules/form-data/lib/populate.js.map +0 -1
  207. package/dist/node_modules/has-flag/index.js +0 -2
  208. package/dist/node_modules/has-flag/index.js.map +0 -1
  209. package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  210. package/dist/node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  211. package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  212. package/dist/node_modules/mdast-util-to-hast/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  213. package/dist/node_modules/mime-db/db.json.js +0 -2
  214. package/dist/node_modules/mime-db/db.json.js.map +0 -1
  215. package/dist/node_modules/mime-db/index.js +0 -8
  216. package/dist/node_modules/mime-db/index.js.map +0 -1
  217. package/dist/node_modules/mime-types/index.js +0 -8
  218. package/dist/node_modules/mime-types/index.js.map +0 -1
  219. package/dist/node_modules/ms/index.js +0 -2
  220. package/dist/node_modules/ms/index.js.map +0 -1
  221. package/dist/node_modules/proxy-from-env/index.js +0 -2
  222. package/dist/node_modules/proxy-from-env/index.js.map +0 -1
  223. package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js +0 -2
  224. package/dist/node_modules/react-markdown/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
  225. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js +0 -2
  226. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.js.map +0 -1
  227. package/dist/node_modules/supports-color/index.js +0 -2
  228. package/dist/node_modules/supports-color/index.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),i=require("react"),o=require("../../../_virtual/Close.js"),n=require("../../../_virtual/ArrowBack.js"),r=require("../../BookCitation/BookCitation.js"),l=require("../Bookemon.js"),s=require("../../../node_modules/@material-ui/core/esm/Switch/Switch.js"),a=require("../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js");exports.default=function(d){var c=d.bookOverView,g=d.bookCoverImage,u=d.onClose,h=d.customStyle,p=d.quotesToHighLightData,x=d.updateQuotesToHighLight,f=d.citationLoad,y=d.clickableElementCategory,v=void 0===y?"":y,_=d.comingSoonData,m=d.isNonHighlightedBlur,b=void 0!==m&&m,k=d.isBlurToggleVisible,C=void 0!==k&&k,j=d.noHtmlContent,w=void 0!==j&&j,S=d.isBookemon,B=void 0===S||S,I=i.useState(!1),T=I[0],W=I[1],L=i.useState(!0),P=L[0],q=L[1],H=!!p.textToHighLight&&!!p.content,F={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return i.useEffect((function(){q(!0),console.log(f,"citationLoad")}),[f]),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},F.rightPanel),(null==h?void 0:h.rightPanel)||{})},{children:[t.jsxs("div",e.__assign({style:F.header},{children:[t.jsxs("div",e.__assign({style:F.headerLeft},{children:[(H||w)&&t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){return x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(n.default,{})})),t.jsx("h2",e.__assign({style:F.clickableElementCategory},{children:v}))]})),t.jsxs("div",e.__assign({style:F.toggleBlurContainer},{children:[H&&C&&t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[t.jsx(s.default,{checked:P,onChange:function(e){q(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t.jsxs("span",e.__assign({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",t.jsx(a.default,e.__assign({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:t.jsx("span",e.__assign({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){u(),x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(o.default,{})}))]}))]})),t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.previewWrapper),null==h?void 0:h.previewWrapper)},{children:H?t.jsx(r.default,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==p?void 0:p.content],textToHighlight:[null==p?void 0:p.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==h?void 0:h.citationCustomStyle,isNonHighlightedBlur:b,isBookemon:B,toggleBlur:P}):f||w?t.jsxs("div",e.__assign({style:F.loadingStyle},{children:[t.jsx("div",e.__assign({style:l.comingSoonStyles.iconWrapper},{children:(null==_?void 0:_.icon)||l.defaultIcon})),w?t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["No data found matching the selected ",v.toLowerCase()]})):t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["fetching ",v.toLowerCase(),"...."]}))]})):t.jsx("div",e.__assign({style:F.flexCenter},{children:t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.coverContainer),T||!g?e.__assign(e.__assign({},F.coverImagePreview),null==h?void 0:h.coverImagePreview):{})},{children:g&&!T?t.jsx("img",{onError:function(){return W(!0)},style:F.bookCoverStyle,src:g,alt:"Book Cover Image"}):t.jsx("div",e.__assign({style:F.bookCoverPlaceholder},{children:t.jsxs("div",e.__assign({style:F.bookCoverInner},{children:[t.jsx("div",e.__assign({style:F.bookTitle},{children:(null==c?void 0:c.title)||"Unknown Title"})),t.jsx("div",e.__assign({style:F.bookAuthor},{children:(null==c?void 0:c.author)||"Unknown Author"}))]}))}))}))}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),i=require("react"),o=require("../../../_virtual/Close.js"),n=require("../../../_virtual/ArrowBack.js"),r=require("../../BookCitation/BookCitation.js"),l=require("../Bookemon.js"),s=require("../../../node_modules/@material-ui/core/esm/Switch/Switch.js"),a=require("../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js");exports.default=function(d){var c=d.bookOverView,g=d.bookCoverImage,u=d.onClose,h=d.customStyle,p=d.quotesToHighLightData,x=d.updateQuotesToHighLight,f=d.citationLoad,y=d.clickableElementCategory,v=void 0===y?"":y,_=d.comingSoonData,m=d.isNonHighlightedBlur,b=void 0!==m&&m,k=d.isBlurToggleVisible,C=void 0!==k&&k,j=d.noHtmlContent,w=void 0!==j&&j,S=d.isBookemon,B=void 0===S||S,I=i.useState(!1),T=I[0],W=I[1],L=i.useState(!0),P=L[0],q=L[1],H=!!p.content,F={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return i.useEffect((function(){q(!0),console.log(f,"citationLoad")}),[f]),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},F.rightPanel),(null==h?void 0:h.rightPanel)||{})},{children:[t.jsxs("div",e.__assign({style:F.header},{children:[t.jsxs("div",e.__assign({style:F.headerLeft},{children:[(H||w)&&t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){return x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(n.default,{})})),t.jsx("h2",e.__assign({style:F.clickableElementCategory},{children:v}))]})),t.jsxs("div",e.__assign({style:F.toggleBlurContainer},{children:[H&&C&&t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[t.jsx(s.default,{checked:P,onChange:function(e){q(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t.jsxs("span",e.__assign({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",t.jsx(a.default,e.__assign({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:t.jsx("span",e.__assign({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),t.jsx("button",e.__assign({style:F.closeButton,onClick:function(){u(),x("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:t.jsx(o.default,{})}))]}))]})),t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.previewWrapper),null==h?void 0:h.previewWrapper)},{children:H?t.jsx(r.default,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==p?void 0:p.content],textToHighlight:[null==p?void 0:p.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==h?void 0:h.citationCustomStyle,isNonHighlightedBlur:b,isBookemon:B,toggleBlur:P}):f||w?t.jsxs("div",e.__assign({style:F.loadingStyle},{children:[t.jsx("div",e.__assign({style:l.comingSoonStyles.iconWrapper},{children:(null==_?void 0:_.icon)||l.defaultIcon})),w?t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["No data found matching the selected ",v.toLowerCase()]})):t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["fetching ",v.toLowerCase(),"...."]}))]})):t.jsx("div",e.__assign({style:F.flexCenter},{children:t.jsx("div",e.__assign({style:e.__assign(e.__assign({},F.coverContainer),T||!g?e.__assign(e.__assign({},F.coverImagePreview),null==h?void 0:h.coverImagePreview):{})},{children:g&&!T?t.jsx("img",{onError:function(){return W(!0)},style:F.bookCoverStyle,src:g,alt:"Book Cover Image"}):t.jsx("div",e.__assign({style:F.bookCoverPlaceholder},{children:t.jsxs("div",e.__assign({style:F.bookCoverInner},{children:[t.jsx("div",e.__assign({style:F.bookTitle},{children:(null==c?void 0:c.title)||"Unknown Title"})),t.jsx("div",e.__assign({style:F.bookAuthor},{children:(null==c?void 0:c.author)||"Unknown Author"}))]}))}))}))}))}))]}))};
2
2
  //# sourceMappingURL=BookPreview.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),i=require("react/jsx-runtime"),t=require("react"),o=require("../../node_modules/@material-ui/core/esm/Accordion/Accordion.js"),n=require("../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js"),r=require("../../_virtual/ExpandMore.js"),a=require("../../_virtual/Close.js"),s=require("../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js"),l=require("./BookDetailsCard/BookDetailsCard.js"),d=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),u=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),h=require("./BookPreview/BookPreview.js"),x=require("../../node_modules/@material-ui/core/esm/Dialog/Dialog.js"),p=require("../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js"),_=require("../../node_modules/@material-ui/core/esm/Typography/Typography.js"),m=require("../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js"),f=require("../../node_modules/@material-ui/core/esm/IconButton/IconButton.js"),j={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},y={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},v=i.jsx("svg",e.__assign({style:y.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),b=function(t){var o=t.header,n=t.subheader,r=t.icon;return i.jsx("div",e.__assign({style:y.wrapper},{children:i.jsxs("div",e.__assign({style:y.inner},{children:[i.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:i.jsx("div",e.__assign({style:y.iconWrapper},{children:r||v}))})),i.jsxs("div",{children:[i.jsx("h1",e.__assign({style:y.heading},{children:o})),i.jsx("p",e.__assign({style:y.text},{children:n}))]})]}))}))};exports.comingSoonStyles=y,exports.default=function(y){var k=y.open,C=y.onClose,B=y.isNonHighlightedBlur,w=y.isBookemon,S=y.getHighlightContent,F=y.handleFetchManuscriptElements,D=y.data,z=y.showComingSoon,P=void 0!==z&&z,q=y.comingSoonData,I=void 0===q?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:v}:q,A=y.customStyle,H=void 0===A?{}:A,E=y.isBlurToggleVisible,L=void 0!==E&&E,O=t.useState({textToHighLight:"",content:""}),R=O[0],T=O[1],M=t.useState(1),W=M[0],N=M[1],V=t.useState(!1),Q=V[0],Y=V[1],G=t.useState("Book Preview"),J=G[0],K=G[1],U=t.useState(70),X=U[0],Z=U[1],$=t.useRef(null),ee=t.useState(!1),ie=ee[0],te=ee[1],oe=function(i,t,o,n){return void 0===n&&(n=0),e.__awaiter(void 0,void 0,void 0,(function(){var r,a,s,l,d,c,u,g,h,x,p,_,m,f,j,y;return e.__generator(this,(function(e){switch(e.label){case 0:T({textToHighLight:"",content:""}),te(!1),Y(!0),K(t),e.label=1;case 1:return e.trys.push([1,5,6,7]),o&&0!==o.length?[4,S([o[n]])]:(Y(!1),Z(70),null===(j=$.current)||void 0===j||j.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return te(!0),Y(!1),[2];for(l=(s=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=null,c=0,u=a;c<u.length;c++)if(_=u[c],s(_.normalizedContent||_.htmlContent).includes(l)){d=_;break}if(!d)for(g=l.split(" ").filter(Boolean);g.length>0;){for(h=g.join(" "),x=0,p=a;x<p.length;x++)if(_=p[x],s(_.normalizedContent||_.htmlContent).includes(h)){d=_;break}if(d)break;g.pop()}return m=a.map((function(e){return e.htmlContent})).join("\n"),d?(T({textToHighLight:d.htmlContent,content:m}),Z(50),null===(y=$.current)||void 0===y||y.resize(50),Y(!1),[2]):n+1<o.length?[4,oe(i,t,o,n+1)]:[3,4];case 3:return[2,e.sent()];case 4:return te(!0),Y(!1),[3,7];case 5:return f=e.sent(),console.error("Highlight error:",f),te(!0),[3,7];case 6:return Y(!1),[7];case 7:return[2]}}))}))},ne=D.bookAwards,re=D.bookCopyRight,ae=D.bookDetails,se=D.bookElements,le=D.bookOverView,de=D.bookCoverImage,ce=null==ae?void 0:ae.isbn;return i.jsx(x.default,e.__assign({open:k,fullWidth:!0,PaperProps:{style:e.__assign(e.__assign({},null==j?void 0:j.dialogPaper),null==H?void 0:H.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!P&&i.jsx("div",e.__assign({style:j.container},{children:i.jsxs(s.PanelGroup,e.__assign({direction:"horizontal"},{children:[i.jsx(s.Panel,e.__assign({order:1,ref:$,defaultSize:X||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==H?void 0:H.leftPanel)},{children:[i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({defaultExpanded:!0,elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Overview"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:le&&Object.keys(le).length>0?i.jsx(d.default,{data:le}):i.jsx("div",e.__assign({style:j.errorState},{children:"No overview data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Manuscript Elements"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:i.jsx(c.default,{data:se,handleFetchManuscriptElements:F,BookIsbn:ce,updateQuotesToHighLight:oe})}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Metadata Details"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ae&&Object.keys(ae).length>0?i.jsx(l.default,{data:ae}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Book Metadata data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Copyrights & Marketing"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:re&&Object.keys(re).length>0?i.jsx(u.default,{data:re}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i.jsx("div",{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"People & Awards"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ne&&Object.keys(ne).length>0?i.jsx(g.default,{data:ne}):i.jsx("div",e.__assign({style:j.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i.jsx(s.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i.jsx(s.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i.jsx(h.default,{bookOverView:le,bookCoverImage:de,onClose:C,clickableElementCategory:J,quotesToHighLightData:R,updateQuotesToHighLight:oe,citationLoad:Q,previewPage:W,setPreviewPage:N,customStyle:H,comingSoonData:I,isNonHighlightedBlur:B,isBlurToggleVisible:L,isBookemon:w,noHtmlContent:ie})}))]}))})),P?i.jsxs("div",e.__assign({style:j.blurOverlay},{children:[i.jsx(f.default,e.__assign({style:j.closeButton,onClick:C},{children:i.jsx(a.default,{})})),i.jsx(b,{header:I.header,subheader:I.subheader,icon:I.icon})]})):i.jsx(i.Fragment,{})]}))}))},exports.defaultIcon=v;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),i=require("react/jsx-runtime"),t=require("react"),o=require("../../node_modules/@material-ui/core/esm/Accordion/Accordion.js"),n=require("../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js"),r=require("../../_virtual/ExpandMore.js"),a=require("../../_virtual/Close.js"),s=require("../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js"),l=require("./BookDetailsCard/BookDetailsCard.js"),d=require("./BookOverviewCard/BookOverviewCard.js"),c=require("./BookElementsCard/BookElementsCard.js"),u=require("./BookCopyrightsCard/BookCopyrightsCard.js"),g=require("./BookPeopleAwardsCard/BookPeopleAwardsCard.js"),h=require("./BookPreview/BookPreview.js"),x=require("../../node_modules/@material-ui/core/esm/Dialog/Dialog.js"),p=require("../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js"),_=require("../../node_modules/@material-ui/core/esm/Typography/Typography.js"),m=require("../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js"),f=require("../../node_modules/@material-ui/core/esm/IconButton/IconButton.js"),j={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},y={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},v=i.jsx("svg",e.__assign({style:y.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),b=function(t){var o=t.header,n=t.subheader,r=t.icon;return i.jsx("div",e.__assign({style:y.wrapper},{children:i.jsxs("div",e.__assign({style:y.inner},{children:[i.jsx("div",e.__assign({style:{marginBottom:"32px"}},{children:i.jsx("div",e.__assign({style:y.iconWrapper},{children:r||v}))})),i.jsxs("div",{children:[i.jsx("h1",e.__assign({style:y.heading},{children:o})),i.jsx("p",e.__assign({style:y.text},{children:n}))]})]}))}))};exports.comingSoonStyles=y,exports.default=function(y){var k=y.open,C=y.onClose,B=y.isNonHighlightedBlur,w=y.isBookemon,S=y.getHighlightContent,F=y.handleFetchManuscriptElements,D=y.data,z=y.showComingSoon,P=void 0!==z&&z,q=y.comingSoonData,I=void 0===q?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:v}:q,A=y.customStyle,H=void 0===A?{}:A,E=y.isBlurToggleVisible,L=void 0!==E&&E,O=t.useState({textToHighLight:"",content:""}),R=O[0],T=O[1],M=t.useState(1),W=M[0],N=M[1],V=t.useState(!1),Q=V[0],Y=V[1],G=t.useState("Book Preview"),J=G[0],K=G[1],U=t.useState(70),X=U[0],Z=U[1],$=t.useRef(null),ee=t.useState(!1),ie=ee[0],te=ee[1],oe=function(i,t,o,n){return void 0===n&&(n=0),e.__awaiter(void 0,void 0,void 0,(function(){var r,a,s,l,d,c,u,g,h,x,p,_,m,f,j,y;return e.__generator(this,(function(e){switch(e.label){case 0:T({textToHighLight:"",content:""}),te(!1),Y(!0),K(t),e.label=1;case 1:return e.trys.push([1,5,6,7]),o&&0!==o.length?[4,S([o[n]])]:(Y(!1),Z(70),null===(j=$.current)||void 0===j||j.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return te(!0),Y(!1),[2];for(l=(s=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=null,c=0,u=a;c<u.length;c++)if(_=u[c],s(_.normalizedContent||_.htmlContent).includes(l)){d=_;break}if(!d)for(g=l.split(" ").filter(Boolean);g.length>0;){for(h=g.join(" "),x=0,p=a;x<p.length;x++)if(_=p[x],s(_.normalizedContent||_.htmlContent).includes(h)){d=_;break}if(d)break;g.pop()}return m=a.map((function(e){return e.htmlContent})).join("\n"),T({textToHighLight:d?d.htmlContent:"",content:m}),Z(50),null===(y=$.current)||void 0===y||y.resize(50),!d&&n+1<o.length?[4,oe(i,t,o,n+1)]:[3,4];case 3:return[2,e.sent()];case 4:return[2];case 5:return f=e.sent(),console.error("Highlight error:",f),te(!0),[3,7];case 6:return Y(!1),[7];case 7:return[2]}}))}))},ne=D.bookAwards,re=D.bookCopyRight,ae=D.bookDetails,se=D.bookElements,le=D.bookOverView,de=D.bookCoverImage,ce=null==ae?void 0:ae.isbn;return i.jsx(x.default,e.__assign({open:k,fullWidth:!0,PaperProps:{style:e.__assign(e.__assign({},null==j?void 0:j.dialogPaper),null==H?void 0:H.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!P&&i.jsx("div",e.__assign({style:j.container},{children:i.jsxs(s.PanelGroup,e.__assign({direction:"horizontal"},{children:[i.jsx(s.Panel,e.__assign({order:1,ref:$,defaultSize:X||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==H?void 0:H.leftPanel)},{children:[i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({defaultExpanded:!0,elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Overview"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:le&&Object.keys(le).length>0?i.jsx(d.default,{data:le}):i.jsx("div",e.__assign({style:j.errorState},{children:"No overview data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Manuscript Elements"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:i.jsx(c.default,{data:se,handleFetchManuscriptElements:F,BookIsbn:ce,updateQuotesToHighLight:oe})}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Book Metadata Details"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ae&&Object.keys(ae).length>0?i.jsx(l.default,{data:ae}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Book Metadata data available."}))}))]}))})),i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"Copyrights & Marketing"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:re&&Object.keys(re).length>0?i.jsx(u.default,{data:re}):i.jsx("div",e.__assign({style:j.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i.jsx("div",{children:i.jsxs(o.default,e.__assign({elevation:0,style:j.accordion},{children:[i.jsx(n.default,e.__assign({expandIcon:i.jsx(r.default,{}),style:j.accordionSummary},{children:i.jsx(_.default,e.__assign({style:j.heading},{children:"People & Awards"}))})),i.jsx(m.default,e.__assign({style:j.accordionDetails},{children:ne&&Object.keys(ne).length>0?i.jsx(g.default,{data:ne}):i.jsx("div",e.__assign({style:j.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i.jsx(s.PanelResizeHandle,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i.jsx(s.Panel,e.__assign({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i.jsx(h.default,{bookOverView:le,bookCoverImage:de,onClose:C,clickableElementCategory:J,quotesToHighLightData:R,updateQuotesToHighLight:oe,citationLoad:Q,previewPage:W,setPreviewPage:N,customStyle:H,comingSoonData:I,isNonHighlightedBlur:B,isBlurToggleVisible:L,isBookemon:w,noHtmlContent:ie})}))]}))})),P?i.jsxs("div",e.__assign({style:j.blurOverlay},{children:[i.jsx(f.default,e.__assign({style:j.closeButton,onClick:C},{children:i.jsx(a.default,{})})),i.jsx(b,{header:I.header,subheader:I.subheader,icon:I.icon})]})):i.jsx(i.Fragment,{})]}))}))},exports.defaultIcon=v;
2
2
  //# sourceMappingURL=Bookemon.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),n=require("react"),i=require("./CodeCitation.module.css.js"),a=require("./_components/CodeEditor.js"),s=require("../../utils/codeCitations.utils.js"),o=require("./_components/ThemeToggle.js"),l=require("./_components/CodeCitationPopup.js"),r=require("./_components/HighlightedCodeDetails.js"),d=require("../../node_modules/axios/lib/axios.js"),u=require("./_components/Spinner.js"),c=require("../../constants/diagnosticStylesBySeverity.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=g(n);exports.default=function(g){var f=g.baseUrlForCodeRetrieval,p=g.assistantName,m=g.organizationName,x=g.userId,S=g.taskId,v=g.repoUrl,_=g.inLineCitation,I=g.citationTitle,C=g.filename,y=g.filepath,j=g.citationContainerTitle,b=g.showThemeToggle,F=g.customCode,k=g.isDarkModeEnabled,D=g.chevronUpComponent,T=g.chevronDownComponent,P=g.isHighlightingEnabled,w=g.FileDetailsComponent,E=g.additionalCallbackForPillButton,L=g.CustomCodeRenderComponent,H=g.fileSummarySectionTitle,q=g.showFullscreenIcon,B=g.showFileSummaryIButton,N=g.editorHeight,W=g.editorWidth,z=g.styles,M=void 0===z?{}:z,V=g.diagnostics,R=g.diagnosticStylesBySeverity,J=g.datasource,U=void 0===J?"codebase":J,A=g.externalFilesData,O=g.startIndex,Y=g.endIndex,G=n.useRef(!1),K=s.getLanguageFromFileName(C),Q=n.useState(!1),X=Q[0],Z=Q[1],$=n.useState(k),ee=$[0],te=$[1],ne=n.useState(!1),ie=ne[0],ae=ne[1],se=n.useState(!1),oe=se[0],le=se[1],re=n.useState(!1),de=re[0],ue=re[1],ce=n.useState(!1),ge=ce[0],he=ce[1],fe=n.useState(null),pe=fe[0],me=fe[1],xe=n.useState(""),Se=xe[0],ve=xe[1],_e=n.useState(""),Ie=_e[0],Ce=_e[1],ye=n.useState({startIndex:-1,endIndex:-1}),je=ye[0],be=ye[1],Fe=n.useState({}),ke=Fe[0],De=Fe[1],Te=n.useState(!1),Pe=Te[0],we=Te[1],Ee=n.useState(!1),Le=Ee[0],He=Ee[1],qe=n.useState({startIndex:-1,endIndex:-1}),Be=qe[0],Ne=qe[1],We=n.useState({startIndex:-1,endIndex:-1}),ze=We[0],Me=We[1],Ve=h.default.useMemo((function(){return e.__assign(e.__assign({},c.DEFAULT_DIAGNOSTIC_STYLES_BY_SEVERITY),R)}),[R]);n.useEffect((function(){Me({startIndex:null!=O?O:-1,endIndex:null!=Y?Y:-1})}),[O,Y]),n.useEffect((function(){A&&F&&(me(A),G.current=!0)}),[A,F]),n.useEffect((function(){if("undefined"!=typeof window&&!G.current){G.current=!0;var t=new URL(y,"http://example.com"),n=t.searchParams,i=void 0!==O?O:n.has("startLine")?Number(n.get("startLine")):-1,a=void 0!==Y?Y:n.has("endLine")?Number(n.get("endLine")):-1;Me({startIndex:i,endIndex:a}),be({startIndex:i,endIndex:a}),Ne({startIndex:i,endIndex:a}),t.searchParams.delete("startLine"),t.searchParams.delete("endLine"),t.searchParams.delete("validation");var s=t.pathname+t.search,o=null==s?void 0:s.replace(/^\//,"");Ce(o),console.log("Params going to API:",{file_path:o,assistant_name:p,organization_name:m,user_id:x,task_id:S,chunks_search:!1,technical_details_only:!0,repo_url:v});F||Pe||e.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a,s,l;return e.__generator(this,(function(r){switch(r.label){case 0:He(!1),we(!0),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,d.default.get("".concat(f,"/analyzer/get_file_details"),{params:e.__assign({file_path:String(o),assistant_name:String(p),organization_name:String(m),user_id:String(x),task_id:String(S),repo_url:String(v),chunks_search:!1,technical_details_only:!0},"codebase"!==U&&{datasource:U})})];case 2:return t=r.sent(),n=(null==t?void 0:t.data[0])||(null==t?void 0:t.data),!pe&&n&&(me(n),Object.keys(null==t?void 0:t.data)&&(i=(null===(l=null===(s=null==t?void 0:t.data)||void 0===s?void 0:s[0])||void 0===l?void 0:l.content)||(null==t?void 0:t.data.content),ve(i))),we(!1),[2,t.data];case 3:return a=r.sent(),He(!0),console.error("Error in retrieving file details: ",a),[3,4];case 4:return we(!1),[2]}}))}))}}),[]);return t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({onClick:function(e){return function(e){e.preventDefault(),e.stopPropagation(),E&&E(),Z((function(e){return!e})),ae((function(e){return!e}))}(e)},className:i.default.pillButton,style:M.pillButton},{children:[t.jsx("span",e.__assign({style:M.citationTitle},{children:I})),_&&(X?D:T)]})),(!_||oe)&&t.jsx(l.default,{open:ie,onClose:function(){Me({startIndex:null==Be?void 0:Be.startIndex,endIndex:null==Be?void 0:Be.endIndex}),le(!1),ae(!1),be({startIndex:-1,endIndex:-1}),De({})},title:I,customStyles:{popupContainer:{width:"100vw",height:"100vh",borderRadius:"0.75rem",fontFamily:"Plus Jakarta Sans, sans-serif"},popupTitleContainer:{color:"#d63384",fontFamily:"Plus Jakarta Sans, sans-serif",position:"relative",textAlign:"left",fontWeight:"700"},topLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"},bottomLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"}},editorChildren:t.jsx(a.default,{startIndex:null==ze?void 0:ze.startIndex,endIndex:null==ze?void 0:ze.endIndex,language:K,editorHeight:N,editorWidth:W,code:F||Se,isHighlightingEnabled:P,isDarkModeEnabled:ee,highlightCodeStatsLine:je,setHighlightCodeStatsLine:be,highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,isExpanded:X,highlightIndexes:ze,diagnostics:V,diagnosticStylesBySeverity:Ve}),fileDetails:pe,setHighlightIndexes:Me,highlightCodeStatsLine:je,setHighlightCodeStatsLine:be,highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,filepath:Ie,datasource:U}),_&&X&&t.jsx("div",e.__assign({className:i.default.citationWrapper,style:M.citationWrapper},{children:t.jsxs("div",e.__assign({className:i.default.citationContent,style:M.citationContent},{children:[!de&&j?t.jsxs("div",e.__assign({className:i.default.citationContainerTitle,style:M.citationContainerTitle},{children:[t.jsx("span",{children:j}),b?t.jsx(o.default,{darkMode:ee,onToggle:function(e){return function(e){e.stopPropagation(),e.preventDefault(),te((function(e){return!e}))}(e)},toggleFullscreen:function(e){e.stopPropagation(),e.preventDefault(),ae(!0),le(!0)},handleOpenFileDetailSection:function(e){e.stopPropagation(),e.preventDefault(),he(!0)},showFullscreenIcon:q,showFileSummaryIButton:B}):t.jsx(t.Fragment,{})]})):t.jsx(t.Fragment,{}),t.jsxs("div",e.__assign({style:{zIndex:-1e3,color:"#000",overflow:"hidden",display:"flex",flexDirection:"column",height:N,width:W,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[!de&&!ge&&L,Pe?t.jsx(u.default,{}):t.jsx(t.Fragment,{}),Le?t.jsx("div",e.__assign({style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",color:"#242424"}},{children:"Something went wrong"})):t.jsx(t.Fragment,{}),!de&&!ge&&!L&&!Pe&&!Le&&t.jsx(a.default,{startIndex:null==ze?void 0:ze.startIndex,endIndex:null==ze?void 0:ze.endIndex,language:K,editorHeight:N,editorWidth:W,code:null!=F?F:Se,isHighlightingEnabled:P,isDarkModeEnabled:ee,openHighlightedCodeDetails:function(){ue(!0)},highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,isExpanded:X,highlightIndexes:ze,diagnostics:V,diagnosticStylesBySeverity:Ve}),ge&&t.jsx(r.default,{FileDetailsComponent:w,fileSummarySectionTitle:H,isDarkMode:ee,editorHeight:N,editorWidth:W,code:null==pe?void 0:pe.content.split("\n").slice((null==ze?void 0:ze.startIndex)-1,null==ze?void 0:ze.endIndex).join("\n"),language:K,onClose:function(e){e.stopPropagation(),e.preventDefault(),he(!1)},summary:null==pe?void 0:pe.summary,filepath:Ie,citationTitle:I})]}))]}))}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.mjs.js"),t=require("react/jsx-runtime"),n=require("react"),i=require("./CodeCitation.module.css.js"),a=require("./_components/CodeEditor.js"),s=require("../../utils/codeCitations.utils.js"),o=require("./_components/ThemeToggle.js"),r=require("./_components/CodeCitationPopup.js"),l=require("./_components/HighlightedCodeDetails.js"),d=require("../../node_modules/axios/lib/axios.js"),u=require("./_components/Spinner.js"),c=require("../../constants/diagnosticStylesBySeverity.js"),g=require("../../utils/themeManager.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(n);exports.default=function(h){var m=h.baseUrlForCodeRetrieval,p=h.assistantName,x=h.organizationName,S=h.userId,v=h.taskId,_=h.repoUrl,I=h.inLineCitation,C=h.citationTitle,y=h.filename,j=h.filepath,b=h.citationContainerTitle,F=h.showThemeToggle,T=h.customCode,k=h.isDarkModeEnabled,D=h.chevronUpComponent,P=h.chevronDownComponent,w=h.isHighlightingEnabled,E=h.FileDetailsComponent,L=h.additionalCallbackForPillButton,H=h.CustomCodeRenderComponent,q=h.fileSummarySectionTitle,M=h.showFullscreenIcon,B=h.showFileSummaryIButton,N=h.editorHeight,W=h.editorWidth,z=h.styles,V=void 0===z?{}:z,R=h.diagnostics,J=h.diagnosticStylesBySeverity,U=h.datasource,A=void 0===U?"codebase":U,O=h.externalFilesData,Y=h.startIndex,G=h.endIndex,K=n.useRef(!1),Q=s.getLanguageFromFileName(y),X=n.useState(!1),Z=X[0],$=X[1],ee=n.useState((function(){return g.themeManager.getTheme(k)})),te=ee[0],ne=ee[1];n.useEffect((function(){return g.themeManager.subscribe(ne)}),[]);var ie=n.useState(!1),ae=ie[0],se=ie[1],oe=n.useState(!1),re=oe[0],le=oe[1],de=n.useState(!1),ue=de[0],ce=de[1],ge=n.useState(!1),he=ge[0],fe=ge[1],me=n.useState(null),pe=me[0],xe=me[1],Se=n.useState(""),ve=Se[0],_e=Se[1],Ie=n.useState(""),Ce=Ie[0],ye=Ie[1],je=n.useState({startIndex:-1,endIndex:-1}),be=je[0],Fe=je[1],Te=n.useState({}),ke=Te[0],De=Te[1],Pe=n.useState(!1),we=Pe[0],Ee=Pe[1],Le=n.useState(!1),He=Le[0],qe=Le[1],Me=n.useState({startIndex:-1,endIndex:-1}),Be=Me[0],Ne=Me[1],We=n.useState({startIndex:-1,endIndex:-1}),ze=We[0],Ve=We[1],Re=f.default.useMemo((function(){return e.__assign(e.__assign({},c.DEFAULT_DIAGNOSTIC_STYLES_BY_SEVERITY),J)}),[J]);n.useEffect((function(){Ve({startIndex:null!=Y?Y:-1,endIndex:null!=G?G:-1})}),[Y,G]),n.useEffect((function(){O&&T&&(xe(O),K.current=!0)}),[O,T]),n.useEffect((function(){if("undefined"!=typeof window&&!K.current){K.current=!0;var t=new URL(j,"http://example.com"),n=t.searchParams,i=void 0!==Y?Y:n.has("startLine")?Number(n.get("startLine")):-1,a=void 0!==G?G:n.has("endLine")?Number(n.get("endLine")):-1;Ve({startIndex:i,endIndex:a}),Fe({startIndex:i,endIndex:a}),Ne({startIndex:i,endIndex:a}),t.searchParams.delete("startLine"),t.searchParams.delete("endLine"),t.searchParams.delete("validation");var s=t.pathname+t.search,o=null==s?void 0:s.replace(/^\//,"");ye(o),console.log("Params going to API:",{file_path:o,assistant_name:p,organization_name:x,user_id:S,task_id:v,chunks_search:!1,technical_details_only:!0,repo_url:_});T||we||e.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a,s,r;return e.__generator(this,(function(l){switch(l.label){case 0:qe(!1),Ee(!0),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,d.default.get("".concat(m,"/analyzer/get_file_details"),{params:e.__assign({file_path:String(o),assistant_name:String(p),organization_name:String(x),user_id:String(S),task_id:String(v),repo_url:String(_),chunks_search:!1,technical_details_only:!0},"codebase"!==A&&{datasource:A})})];case 2:return t=l.sent(),n=(null==t?void 0:t.data[0])||(null==t?void 0:t.data),!pe&&n&&(xe(n),Object.keys(null==t?void 0:t.data)&&(i=(null===(r=null===(s=null==t?void 0:t.data)||void 0===s?void 0:s[0])||void 0===r?void 0:r.content)||(null==t?void 0:t.data.content),_e(i))),Ee(!1),[2,t.data];case 3:return a=l.sent(),qe(!0),console.error("Error in retrieving file details: ",a),[3,4];case 4:return Ee(!1),[2]}}))}))}}),[]);return t.jsxs(t.Fragment,{children:[t.jsxs("span",e.__assign({onClick:function(e){return function(e){e.preventDefault(),e.stopPropagation(),L&&L(),$((function(e){return!e})),se((function(e){return!e}))}(e)},className:i.default.pillButton,style:V.pillButton},{children:[t.jsx("span",e.__assign({style:V.citationTitle},{children:C})),I&&(Z?D:P)]})),(!I||re)&&t.jsx(r.default,{open:ae,onClose:function(){Ve({startIndex:null==Be?void 0:Be.startIndex,endIndex:null==Be?void 0:Be.endIndex}),le(!1),se(!1),Fe({startIndex:-1,endIndex:-1}),De({})},title:C,customStyles:{popupContainer:{width:"100vw",height:"100vh",borderRadius:"0.75rem",fontFamily:"Plus Jakarta Sans, sans-serif"},popupTitleContainer:{color:"#d63384",fontFamily:"Plus Jakarta Sans, sans-serif",position:"relative",textAlign:"left",fontWeight:"700"},topLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"},bottomLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"}},editorChildren:t.jsx(a.default,{startIndex:null==ze?void 0:ze.startIndex,endIndex:null==ze?void 0:ze.endIndex,language:Q,editorHeight:N,editorWidth:W,code:T||ve,isHighlightingEnabled:w,isDarkModeEnabled:te,highlightCodeStatsLine:be,setHighlightCodeStatsLine:Fe,highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,isExpanded:Z,highlightIndexes:ze,diagnostics:R,diagnosticStylesBySeverity:Re}),fileDetails:pe,setHighlightIndexes:Ve,highlightCodeStatsLine:be,setHighlightCodeStatsLine:Fe,highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,filepath:Ce,datasource:A}),I&&Z&&t.jsx("div",e.__assign({className:i.default.citationWrapper,style:V.citationWrapper},{children:t.jsxs("div",e.__assign({className:i.default.citationContent,style:V.citationContent},{children:[!ue&&b?t.jsxs("div",e.__assign({className:i.default.citationContainerTitle,style:V.citationContainerTitle},{children:[t.jsx("span",{children:b}),F?t.jsx(o.default,{darkMode:te,onToggle:function(e){return function(e){e.stopPropagation(),e.preventDefault(),g.themeManager.setTheme(!te)}(e)},toggleFullscreen:function(e){e.stopPropagation(),e.preventDefault(),se(!0),le(!0)},handleOpenFileDetailSection:function(e){e.stopPropagation(),e.preventDefault(),fe(!0)},showFullscreenIcon:M,showFileSummaryIButton:B}):t.jsx(t.Fragment,{})]})):t.jsx(t.Fragment,{}),t.jsxs("div",e.__assign({style:{zIndex:-1e3,color:"#000",overflow:"hidden",display:"flex",flexDirection:"column",height:N,width:W,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[!ue&&!he&&H,we?t.jsx(u.default,{}):t.jsx(t.Fragment,{}),He?t.jsx("div",e.__assign({style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",color:"#242424"}},{children:"Something went wrong"})):t.jsx(t.Fragment,{}),!ue&&!he&&!H&&!we&&!He&&t.jsx(a.default,{startIndex:null==ze?void 0:ze.startIndex,endIndex:null==ze?void 0:ze.endIndex,language:Q,editorHeight:N,editorWidth:W,code:null!=T?T:ve,isHighlightingEnabled:w,isDarkModeEnabled:te,openHighlightedCodeDetails:function(){ce(!0)},highlightCodeStatsVariable:ke,setHighlightCodeStatsVariable:De,isExpanded:Z,highlightIndexes:ze,diagnostics:R,diagnosticStylesBySeverity:Re}),he&&t.jsx(l.default,{FileDetailsComponent:E,fileSummarySectionTitle:q,isDarkMode:te,editorHeight:N,editorWidth:W,code:null==pe?void 0:pe.content.split("\n").slice((null==ze?void 0:ze.startIndex)-1,null==ze?void 0:ze.endIndex).join("\n"),language:Q,onClose:function(e){e.stopPropagation(),e.preventDefault(),fe(!1)},summary:null==pe?void 0:pe.summary,filepath:Ce,citationTitle:C})]}))]}))}))]})};
2
2
  //# sourceMappingURL=CodeCitation.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=new(function(){function e(){this.listeners=new Set,this.isDarkTheme=!0,this.isInitialized=!1}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.setTheme=function(e){this.isDarkTheme=e,this.listeners.forEach((function(t){return t(e)}))},e.prototype.getTheme=function(e){return this.isInitialized||void 0===e||(this.setTheme(e),this.isInitialized=!0),this.isDarkTheme},e}());exports.themeManager=e;
2
+ //# sourceMappingURL=themeManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as d,defaultIcon as c}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import p from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var h=function(h){var u=h.bookOverView,g=h.bookCoverImage,f=h.onClose,m=h.customStyle,x=h.quotesToHighLightData,v=h.updateQuotesToHighLight,y=h.citationLoad,b=h.clickableElementCategory,k=void 0===b?"":b,C=h.comingSoonData,w=h.isNonHighlightedBlur,B=void 0!==w&&w,S=h.isBlurToggleVisible,I=void 0!==S&&S,T=h.noHtmlContent,j=void 0!==T&&T,W=h.isBookemon,L=void 0===W||W,H=i(!1),P=H[0],F=H[1],z=i(!0),D=z[0],O=z[1],R=!!x.textToHighLight&&!!x.content,A={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return n((function(){O(!0),console.log(y,"citationLoad")}),[y]),t("div",e({style:e(e({},A.rightPanel),(null==m?void 0:m.rightPanel)||{})},{children:[t("div",e({style:A.header},{children:[t("div",e({style:A.headerLeft},{children:[(R||j)&&o("button",e({style:A.closeButton,onClick:function(){return v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(l,{})})),o("h2",e({style:A.clickableElementCategory},{children:k}))]})),t("div",e({style:A.toggleBlurContainer},{children:[R&&I&&t("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[o(s,{checked:D,onChange:function(e){O(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t("span",e({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",o(p,e({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:o("span",e({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),o("button",e({style:A.closeButton,onClick:function(){f(),v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(r,{})}))]}))]})),o("div",e({style:e(e({},A.previewWrapper),null==m?void 0:m.previewWrapper)},{children:R?o(a,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==x?void 0:x.content],textToHighlight:[null==x?void 0:x.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==m?void 0:m.citationCustomStyle,isNonHighlightedBlur:B,isBookemon:L,toggleBlur:D}):y||j?t("div",e({style:A.loadingStyle},{children:[o("div",e({style:d.iconWrapper},{children:(null==C?void 0:C.icon)||c})),t("p",e({style:d.text},j?{children:["No data found matching the selected ",k.toLowerCase()]}:{children:["fetching ",k.toLowerCase(),"...."]}))]})):o("div",e({style:A.flexCenter},{children:o("div",e({style:e(e({},A.coverContainer),P||!g?e(e({},A.coverImagePreview),null==m?void 0:m.coverImagePreview):{})},{children:g&&!P?o("img",{onError:function(){return F(!0)},style:A.bookCoverStyle,src:g,alt:"Book Cover Image"}):o("div",e({style:A.bookCoverPlaceholder},{children:t("div",e({style:A.bookCoverInner},{children:[o("div",e({style:A.bookTitle},{children:(null==u?void 0:u.title)||"Unknown Title"})),o("div",e({style:A.bookAuthor},{children:(null==u?void 0:u.author)||"Unknown Author"}))]}))}))}))}))}))]}))};export{h as default};
1
+ import{__assign as e}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import r from"../../../_virtual/Close.js";import l from"../../../_virtual/ArrowBack.js";import a from"../../BookCitation/BookCitation.js";import{comingSoonStyles as d,defaultIcon as c}from"../Bookemon.js";import s from"../../../node_modules/@material-ui/core/esm/Switch/Switch.js";import p from"../../../node_modules/@material-ui/core/esm/Tooltip/Tooltip.js";var u=function(u){var h=u.bookOverView,g=u.bookCoverImage,f=u.onClose,m=u.customStyle,x=u.quotesToHighLightData,v=u.updateQuotesToHighLight,y=u.citationLoad,b=u.clickableElementCategory,k=void 0===b?"":b,C=u.comingSoonData,w=u.isNonHighlightedBlur,B=void 0!==w&&w,S=u.isBlurToggleVisible,I=void 0!==S&&S,T=u.noHtmlContent,j=void 0!==T&&T,W=u.isBookemon,L=void 0===W||W,P=i(!1),H=P[0],F=P[1],z=i(!0),D=z[0],O=z[1],R=!!x.content,A={header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},headerLeft:{display:"flex",alignItems:"center",gap:"8px"},closeButton:{padding:"4px",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"},flexCenter:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},coverContainer:{width:"100%",maxWidth:"300px",borderRadius:"12px",padding:"4px",background:"linear-gradient(135deg, #34D399, #3B82F6, #10B981)",position:"relative",overflow:"hidden",boxShadow:"0 10px 25px rgba(0,0,0,0.3)",marginBottom:"24px"},bookCoverStyle:{width:"100%",height:"auto",objectFit:"contain",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},loadingStyle:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},rightPanel:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},clickableElementCategory:{fontSize:"20px",fontWeight:600},previewWrapper:{flex:1,width:"80%",margin:"0 auto",display:"flex",flexDirection:"column",overflow:"hidden",justifyContent:"flex-start",alignItems:"center"},coverImagePreview:{display:"flex",justifyContent:"center",alignItems:"center",aspectRatio:"7 / 10",background:"",padding:0},toggleBlurContainer:{display:"flex",alignItems:"center",gap:"20px"},bookCoverPlaceholder:{width:"100%",height:"calc(100% - 8px)",background:"linear-gradient(to bottom, #22c55e, #14532d)",borderRadius:"4px",padding:"4px",color:"white",fontSize:"10px",display:"flex",justifyContent:"center",alignItems:"center"},bookCoverInner:{border:"1px solid white",padding:"4px",width:"calc(100% - 26px)",height:"calc(100% - 26px)",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",justifyContent:"space-around"},bookTitle:{fontWeight:800,fontSize:"1.5rem",textTransform:"uppercase",letterSpacing:"0.5px",lineHeight:1.2,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",padding:"0 8px"},bookAuthor:{fontSize:"1rem",fontWeight:500,opacity:.9,marginTop:"8px",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"}};return n((function(){O(!0),console.log(y,"citationLoad")}),[y]),t("div",e({style:e(e({},A.rightPanel),(null==m?void 0:m.rightPanel)||{})},{children:[t("div",e({style:A.header},{children:[t("div",e({style:A.headerLeft},{children:[(R||j)&&o("button",e({style:A.closeButton,onClick:function(){return v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(l,{})})),o("h2",e({style:A.clickableElementCategory},{children:k}))]})),t("div",e({style:A.toggleBlurContainer},{children:[R&&I&&t("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[o(s,{checked:D,onChange:function(e){O(e.target.checked),console.log(e.target.checked,"event.target.checked")},color:"primary",size:"small"}),t("span",e({style:{fontSize:"0.75rem",display:"flex",alignItems:"center",gap:"4px"}},{children:["Blur",o(p,e({title:"Blur Text is enabled by default. Non-highlighted parts of the text will appear blurred to help you focus on the highlighted content. You can turn this off if you want to see all text clearly."},{children:o("span",e({style:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#485468",color:"#fff",fontSize:"10px",fontWeight:"bold",cursor:"pointer",lineHeight:"14px",userSelect:"none"}},{children:"i"}))}))]}))]})),o("button",e({style:A.closeButton,onClick:function(){f(),v("","Book Preview")},onMouseOver:function(e){return e.currentTarget.style.backgroundColor="#F3F4F6"},onMouseOut:function(e){return e.currentTarget.style.backgroundColor="transparent"}},{children:o(r,{})}))]}))]})),o("div",e({style:e(e({},A.previewWrapper),null==m?void 0:m.previewWrapper)},{children:R?o(a,{citationNumber:1,defaultState:!0,partialMatch:!0,fixedWidth:!1,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==x?void 0:x.content],textToHighlight:[null==x?void 0:x.textToHighLight],externalLinkComponent:"",bookCoverImage:g,customStyle:null==m?void 0:m.citationCustomStyle,isNonHighlightedBlur:B,isBookemon:L,toggleBlur:D}):y||j?t("div",e({style:A.loadingStyle},{children:[o("div",e({style:d.iconWrapper},{children:(null==C?void 0:C.icon)||c})),t("p",e({style:d.text},j?{children:["No data found matching the selected ",k.toLowerCase()]}:{children:["fetching ",k.toLowerCase(),"...."]}))]})):o("div",e({style:A.flexCenter},{children:o("div",e({style:e(e({},A.coverContainer),H||!g?e(e({},A.coverImagePreview),null==m?void 0:m.coverImagePreview):{})},{children:g&&!H?o("img",{onError:function(){return F(!0)},style:A.bookCoverStyle,src:g,alt:"Book Cover Image"}):o("div",e({style:A.bookCoverPlaceholder},{children:t("div",e({style:A.bookCoverInner},{children:[o("div",e({style:A.bookTitle},{children:(null==h?void 0:h.title)||"Unknown Title"})),o("div",e({style:A.bookAuthor},{children:(null==h?void 0:h.author)||"Unknown Author"}))]}))}))}))}))}))]}))};export{u as default};
2
2
  //# sourceMappingURL=BookPreview.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as o,__generator as t}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as l,useRef as a}from"react";import d from"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js";import s from"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js";import c from"../../_virtual/ExpandMore.js";import h from"../../_virtual/Close.js";import{PanelGroup as p,Panel as u,PanelResizeHandle as m}from"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js";import g from"./BookDetailsCard/BookDetailsCard.js";import y from"./BookOverviewCard/BookOverviewCard.js";import v from"./BookElementsCard/BookElementsCard.js";import f from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import b from"./BookPreview/BookPreview.js";import k from"../../node_modules/@material-ui/core/esm/Dialog/Dialog.js";import C from"../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js";import B from"../../node_modules/@material-ui/core/esm/Typography/Typography.js";import w from"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js";import j from"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js";var F={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=i("svg",e({style:S.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),z=function(o){var t=o.header,n=o.subheader,l=o.icon;return i("div",e({style:S.wrapper},{children:r("div",e({style:S.inner},{children:[i("div",e({style:{marginBottom:"32px"}},{children:i("div",e({style:S.iconWrapper},{children:l||D}))})),r("div",{children:[i("h1",e({style:S.heading},{children:t})),i("p",e({style:S.text},{children:n}))]})]}))}))},P=function(S){var P=S.open,A=S.onClose,I=S.isNonHighlightedBlur,H=S.isBookemon,E=S.getHighlightContent,L=S.handleFetchManuscriptElements,_=S.data,O=S.showComingSoon,T=void 0!==O&&O,W=S.comingSoonData,M=void 0===W?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:D}:W,R=S.customStyle,N=void 0===R?{}:R,V=S.isBlurToggleVisible,Q=void 0!==V&&V,Y=l({textToHighLight:"",content:""}),q=Y[0],G=Y[1],J=l(1),K=J[0],U=J[1],X=l(!1),Z=X[0],$=X[1],ee=l("Book Preview"),oe=ee[0],te=ee[1],ie=l(70),re=ie[0],ne=ie[1],le=a(null),ae=l(!1),de=ae[0],se=ae[1],ce=function(e,i,r,n){return void 0===n&&(n=0),o(void 0,void 0,void 0,(function(){var o,l,a,d,s,c,h,p,u,m,g,y,v,f,x,b;return t(this,(function(t){switch(t.label){case 0:G({textToHighLight:"",content:""}),se(!1),$(!0),te(i),t.label=1;case 1:return t.trys.push([1,5,6,7]),r&&0!==r.length?[4,E([r[n]])]:($(!1),ne(70),null===(x=le.current)||void 0===x||x.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return se(!0),$(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),s=null,c=0,h=l;c<h.length;c++)if(y=h[c],a(y.normalizedContent||y.htmlContent).includes(d)){s=y;break}if(!s)for(p=d.split(" ").filter(Boolean);p.length>0;){for(u=p.join(" "),m=0,g=l;m<g.length;m++)if(y=g[m],a(y.normalizedContent||y.htmlContent).includes(u)){s=y;break}if(s)break;p.pop()}return v=l.map((function(e){return e.htmlContent})).join("\n"),s?(G({textToHighLight:s.htmlContent,content:v}),ne(50),null===(b=le.current)||void 0===b||b.resize(50),$(!1),[2]):n+1<r.length?[4,ce(e,i,r,n+1)]:[3,4];case 3:return[2,t.sent()];case 4:return se(!0),$(!1),[3,7];case 5:return f=t.sent(),console.error("Highlight error:",f),se(!0),[3,7];case 6:return $(!1),[7];case 7:return[2]}}))}))},he=_.bookAwards,pe=_.bookCopyRight,ue=_.bookDetails,me=_.bookElements,ge=_.bookOverView,ye=_.bookCoverImage,ve=null==ue?void 0:ue.isbn;return i(k,e({open:P,fullWidth:!0,PaperProps:{style:e(e({},null==F?void 0:F.dialogPaper),null==N?void 0:N.dialogDimension)}},{children:r(C,e({style:F.dialogContent},{children:[!T&&i("div",e({style:F.container},{children:r(p,e({direction:"horizontal"},{children:[i(u,e({order:1,ref:le,defaultSize:re||70},{children:r("div",e({style:e(e({},null==F?void 0:F.leftPanel),null==N?void 0:N.leftPanel)},{children:[i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({defaultExpanded:!0,elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Overview"}))})),i(w,e({style:F.accordionDetails},{children:ge&&Object.keys(ge).length>0?i(y,{data:ge}):i("div",e({style:F.errorState},{children:"No overview data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Manuscript Elements"}))})),i(w,e({style:F.accordionDetails},{children:i(v,{data:me,handleFetchManuscriptElements:L,BookIsbn:ve,updateQuotesToHighLight:ce})}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Metadata Details"}))})),i(w,e({style:F.accordionDetails},{children:ue&&Object.keys(ue).length>0?i(g,{data:ue}):i("div",e({style:F.errorState},{children:"No Book Metadata data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Copyrights & Marketing"}))})),i(w,e({style:F.accordionDetails},{children:pe&&Object.keys(pe).length>0?i(f,{data:pe}):i("div",e({style:F.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i("div",{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"People & Awards"}))})),i(w,e({style:F.accordionDetails},{children:he&&Object.keys(he).length>0?i(x,{data:he}):i("div",e({style:F.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i(m,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i(u,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i(b,{bookOverView:ge,bookCoverImage:ye,onClose:A,clickableElementCategory:oe,quotesToHighLightData:q,updateQuotesToHighLight:ce,citationLoad:Z,previewPage:K,setPreviewPage:U,customStyle:N,comingSoonData:M,isNonHighlightedBlur:I,isBlurToggleVisible:Q,isBookemon:H,noHtmlContent:de})}))]}))})),T?r("div",e({style:F.blurOverlay},{children:[i(j,e({style:F.closeButton,onClick:A},{children:i(h,{})})),i(z,{header:M.header,subheader:M.subheader,icon:M.icon})]})):i(n,{})]}))}))};export{S as comingSoonStyles,P as default,D as defaultIcon};
1
+ import{__assign as e,__awaiter as o,__generator as t}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as i,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useState as l,useRef as a}from"react";import d from"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js";import s from"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js";import c from"../../_virtual/ExpandMore.js";import h from"../../_virtual/Close.js";import{PanelGroup as p,Panel as u,PanelResizeHandle as m}from"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js";import g from"./BookDetailsCard/BookDetailsCard.js";import y from"./BookOverviewCard/BookOverviewCard.js";import v from"./BookElementsCard/BookElementsCard.js";import f from"./BookCopyrightsCard/BookCopyrightsCard.js";import x from"./BookPeopleAwardsCard/BookPeopleAwardsCard.js";import b from"./BookPreview/BookPreview.js";import k from"../../node_modules/@material-ui/core/esm/Dialog/Dialog.js";import C from"../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js";import B from"../../node_modules/@material-ui/core/esm/Typography/Typography.js";import w from"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js";import j from"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js";var F={dialogPaper:{maxWidth:"none",fontFamily:"Inter, sans-serif"},dialogContent:{padding:0,backgroundColor:"#FFFFFF",overflow:"hidden",height:"90vh",position:"relative"},container:{display:"flex",height:"100%",width:"100%",alignItems:"flex-start"},leftPanel:{height:"100%",padding:"24px",overflowY:"auto",backgroundColor:"#F3F4F6",borderRadius:"12px",boxSizing:"border-box"},rightPanel:{width:"40%",backgroundColor:"#FFFFFF",height:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"auto",flex:1,boxSizing:"border-box",overflowY:"auto"},accordion:{borderRadius:"12px",boxShadow:"none",marginBottom:"24px"},accordionSummary:{paddingLeft:"16px",paddingRight:"16px"},accordionDetails:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"16px"},heading:{fontWeight:"bold",color:"#000000",fontSize:"16px"},blurOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",backgroundColor:"rgba(255, 255, 255, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,borderRadius:"12px"},closeButton:{position:"absolute",top:"8px",right:"8px",color:"#111827"},resizeHandle:{width:"10px",backgroundColor:"#e5e7eb",cursor:"col-resize",display:"flex",alignItems:"center",justifyContent:"center"},iconContainer:{display:"flex",flexDirection:"column",gap:"4px"},dot:{width:"4px",height:"4px",backgroundColor:"#6b7280",borderRadius:"50%"},resizeHandleBar:{width:"2px",height:"24px",backgroundColor:"#666",borderRadius:"2px"}},S={wrapper:{alignItems:"center",justifyContent:"center",textAlign:"center"},inner:{width:"100%"},iconWrapper:{width:"80px",height:"80px",background:"linear-gradient(to right, #3B82F6, #9333EA)",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto 24px auto"},icon:{width:"40px",height:"40px",color:"#FFFFFF"},heading:{fontSize:"36px",fontWeight:"bold",color:"#9333EA",marginBottom:"16px"},text:{fontSize:"18px",color:"#4B5563",lineHeight:1.6,textAlign:"center"},errorState:{color:"#CE3928",padding:"18px 0px",display:"flex",justifyContent:"center",width:"100%"}},D=i("svg",e({style:S.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},{children:i("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})),z=function(o){var t=o.header,n=o.subheader,l=o.icon;return i("div",e({style:S.wrapper},{children:r("div",e({style:S.inner},{children:[i("div",e({style:{marginBottom:"32px"}},{children:i("div",e({style:S.iconWrapper},{children:l||D}))})),r("div",{children:[i("h1",e({style:S.heading},{children:t})),i("p",e({style:S.text},{children:n}))]})]}))}))},P=function(S){var P=S.open,A=S.onClose,I=S.isNonHighlightedBlur,H=S.isBookemon,E=S.getHighlightContent,L=S.handleFetchManuscriptElements,_=S.data,O=S.showComingSoon,T=void 0!==O&&O,W=S.comingSoonData,M=void 0===W?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:D}:W,R=S.customStyle,N=void 0===R?{}:R,V=S.isBlurToggleVisible,Q=void 0!==V&&V,Y=l({textToHighLight:"",content:""}),q=Y[0],G=Y[1],J=l(1),K=J[0],U=J[1],X=l(!1),Z=X[0],$=X[1],ee=l("Book Preview"),oe=ee[0],te=ee[1],ie=l(70),re=ie[0],ne=ie[1],le=a(null),ae=l(!1),de=ae[0],se=ae[1],ce=function(e,i,r,n){return void 0===n&&(n=0),o(void 0,void 0,void 0,(function(){var o,l,a,d,s,c,h,p,u,m,g,y,v,f,x,b;return t(this,(function(t){switch(t.label){case 0:G({textToHighLight:"",content:""}),se(!1),$(!0),te(i),t.label=1;case 1:return t.trys.push([1,5,6,7]),r&&0!==r.length?[4,E([r[n]])]:($(!1),ne(70),null===(x=le.current)||void 0===x||x.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return se(!0),$(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"").replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),s=null,c=0,h=l;c<h.length;c++)if(y=h[c],a(y.normalizedContent||y.htmlContent).includes(d)){s=y;break}if(!s)for(p=d.split(" ").filter(Boolean);p.length>0;){for(u=p.join(" "),m=0,g=l;m<g.length;m++)if(y=g[m],a(y.normalizedContent||y.htmlContent).includes(u)){s=y;break}if(s)break;p.pop()}return v=l.map((function(e){return e.htmlContent})).join("\n"),G({textToHighLight:s?s.htmlContent:"",content:v}),ne(50),null===(b=le.current)||void 0===b||b.resize(50),!s&&n+1<r.length?[4,ce(e,i,r,n+1)]:[3,4];case 3:return[2,t.sent()];case 4:return[2];case 5:return f=t.sent(),console.error("Highlight error:",f),se(!0),[3,7];case 6:return $(!1),[7];case 7:return[2]}}))}))},he=_.bookAwards,pe=_.bookCopyRight,ue=_.bookDetails,me=_.bookElements,ge=_.bookOverView,ye=_.bookCoverImage,ve=null==ue?void 0:ue.isbn;return i(k,e({open:P,fullWidth:!0,PaperProps:{style:e(e({},null==F?void 0:F.dialogPaper),null==N?void 0:N.dialogDimension)}},{children:r(C,e({style:F.dialogContent},{children:[!T&&i("div",e({style:F.container},{children:r(p,e({direction:"horizontal"},{children:[i(u,e({order:1,ref:le,defaultSize:re||70},{children:r("div",e({style:e(e({},null==F?void 0:F.leftPanel),null==N?void 0:N.leftPanel)},{children:[i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({defaultExpanded:!0,elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Overview"}))})),i(w,e({style:F.accordionDetails},{children:ge&&Object.keys(ge).length>0?i(y,{data:ge}):i("div",e({style:F.errorState},{children:"No overview data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Manuscript Elements"}))})),i(w,e({style:F.accordionDetails},{children:i(v,{data:me,handleFetchManuscriptElements:L,BookIsbn:ve,updateQuotesToHighLight:ce})}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Book Metadata Details"}))})),i(w,e({style:F.accordionDetails},{children:ue&&Object.keys(ue).length>0?i(g,{data:ue}):i("div",e({style:F.errorState},{children:"No Book Metadata data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"Copyrights & Marketing"}))})),i(w,e({style:F.accordionDetails},{children:pe&&Object.keys(pe).length>0?i(f,{data:pe}):i("div",e({style:F.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i("div",{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:"People & Awards"}))})),i(w,e({style:F.accordionDetails},{children:he&&Object.keys(he).length>0?i(x,{data:he}):i("div",e({style:F.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i(m,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i(u,e({order:2,minSize:30,maxSize:50,style:{overflow:"visible",position:"relative",transition:"all 300ms ease-in-out",WebkitTransition:"all 300ms ease-in-out"}},{children:i(b,{bookOverView:ge,bookCoverImage:ye,onClose:A,clickableElementCategory:oe,quotesToHighLightData:q,updateQuotesToHighLight:ce,citationLoad:Z,previewPage:K,setPreviewPage:U,customStyle:N,comingSoonData:M,isNonHighlightedBlur:I,isBlurToggleVisible:Q,isBookemon:H,noHtmlContent:de})}))]}))})),T?r("div",e({style:F.blurOverlay},{children:[i(j,e({style:F.closeButton,onClick:A},{children:i(h,{})})),i(z,{header:M.header,subheader:M.subheader,icon:M.icon})]})):i(n,{})]}))}))};export{S as comingSoonStyles,P as default,D as defaultIcon};
2
2
  //# sourceMappingURL=Bookemon.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as i,Fragment as o,jsx as a}from"react/jsx-runtime";import l,{useRef as r,useState as s,useEffect as d}from"react";import c from"./CodeCitation.module.css.js";import u from"./_components/CodeEditor.js";import{getLanguageFromFileName as h}from"../../utils/codeCitations.utils.js";import g from"./_components/ThemeToggle.js";import m from"./_components/CodeCitationPopup.js";import p from"./_components/HighlightedCodeDetails.js";import f from"../../node_modules/axios/lib/axios.js";import v from"./_components/Spinner.js";import{DEFAULT_DIAGNOSTIC_STYLES_BY_SEVERITY as x}from"../../constants/diagnosticStylesBySeverity.js";var I=function(I){var C=I.baseUrlForCodeRetrieval,y=I.assistantName,S=I.organizationName,b=I.userId,_=I.taskId,k=I.repoUrl,D=I.inLineCitation,P=I.citationTitle,w=I.filename,F=I.filepath,T=I.citationContainerTitle,j=I.showThemeToggle,H=I.customCode,L=I.isDarkModeEnabled,E=I.chevronUpComponent,B=I.chevronDownComponent,W=I.isHighlightingEnabled,N=I.FileDetailsComponent,z=I.additionalCallbackForPillButton,M=I.CustomCodeRenderComponent,V=I.fileSummarySectionTitle,J=I.showFullscreenIcon,R=I.showFileSummaryIButton,U=I.editorHeight,A=I.editorWidth,O=I.styles,q=void 0===O?{}:O,G=I.diagnostics,K=I.diagnosticStylesBySeverity,Q=I.datasource,X=void 0===Q?"codebase":Q,Y=I.externalFilesData,Z=I.startIndex,$=I.endIndex,ee=r(!1),te=h(w),ne=s(!1),ie=ne[0],oe=ne[1],ae=s(L),le=ae[0],re=ae[1],se=s(!1),de=se[0],ce=se[1],ue=s(!1),he=ue[0],ge=ue[1],me=s(!1),pe=me[0],fe=me[1],ve=s(!1),xe=ve[0],Ie=ve[1],Ce=s(null),ye=Ce[0],Se=Ce[1],be=s(""),_e=be[0],ke=be[1],De=s(""),Pe=De[0],we=De[1],Fe=s({startIndex:-1,endIndex:-1}),Te=Fe[0],je=Fe[1],He=s({}),Le=He[0],Ee=He[1],Be=s(!1),We=Be[0],Ne=Be[1],ze=s(!1),Me=ze[0],Ve=ze[1],Je=s({startIndex:-1,endIndex:-1}),Re=Je[0],Ue=Je[1],Ae=s({startIndex:-1,endIndex:-1}),Oe=Ae[0],qe=Ae[1],Ge=l.useMemo((function(){return e(e({},x),K)}),[K]);d((function(){qe({startIndex:null!=Z?Z:-1,endIndex:null!=$?$:-1})}),[Z,$]),d((function(){Y&&H&&(Se(Y),ee.current=!0)}),[Y,H]),d((function(){if("undefined"!=typeof window&&!ee.current){ee.current=!0;var i=new URL(F,"http://example.com"),o=i.searchParams,a=void 0!==Z?Z:o.has("startLine")?Number(o.get("startLine")):-1,l=void 0!==$?$:o.has("endLine")?Number(o.get("endLine")):-1;qe({startIndex:a,endIndex:l}),je({startIndex:a,endIndex:l}),Ue({startIndex:a,endIndex:l}),i.searchParams.delete("startLine"),i.searchParams.delete("endLine"),i.searchParams.delete("validation");var r=i.pathname+i.search,s=null==r?void 0:r.replace(/^\//,"");we(s),console.log("Params going to API:",{file_path:s,assistant_name:y,organization_name:S,user_id:b,task_id:_,chunks_search:!1,technical_details_only:!0,repo_url:k});H||We||t(void 0,void 0,void 0,(function(){var t,i,o,a,l,r;return n(this,(function(n){switch(n.label){case 0:Ve(!1),Ne(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,f.get("".concat(C,"/analyzer/get_file_details"),{params:e({file_path:String(s),assistant_name:String(y),organization_name:String(S),user_id:String(b),task_id:String(_),repo_url:String(k),chunks_search:!1,technical_details_only:!0},"codebase"!==X&&{datasource:X})})];case 2:return t=n.sent(),i=(null==t?void 0:t.data[0])||(null==t?void 0:t.data),!ye&&i&&(Se(i),Object.keys(null==t?void 0:t.data)&&(o=(null===(r=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l[0])||void 0===r?void 0:r.content)||(null==t?void 0:t.data.content),ke(o))),Ne(!1),[2,t.data];case 3:return a=n.sent(),Ve(!0),console.error("Error in retrieving file details: ",a),[3,4];case 4:return Ne(!1),[2]}}))}))}}),[]);return i(o,{children:[i("span",e({onClick:function(e){return function(e){e.preventDefault(),e.stopPropagation(),z&&z(),oe((function(e){return!e})),ce((function(e){return!e}))}(e)},className:c.pillButton,style:q.pillButton},{children:[a("span",e({style:q.citationTitle},{children:P})),D&&(ie?E:B)]})),(!D||he)&&a(m,{open:de,onClose:function(){qe({startIndex:null==Re?void 0:Re.startIndex,endIndex:null==Re?void 0:Re.endIndex}),ge(!1),ce(!1),je({startIndex:-1,endIndex:-1}),Ee({})},title:P,customStyles:{popupContainer:{width:"100vw",height:"100vh",borderRadius:"0.75rem",fontFamily:"Plus Jakarta Sans, sans-serif"},popupTitleContainer:{color:"#d63384",fontFamily:"Plus Jakarta Sans, sans-serif",position:"relative",textAlign:"left",fontWeight:"700"},topLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"},bottomLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"}},editorChildren:a(u,{startIndex:null==Oe?void 0:Oe.startIndex,endIndex:null==Oe?void 0:Oe.endIndex,language:te,editorHeight:U,editorWidth:A,code:H||_e,isHighlightingEnabled:W,isDarkModeEnabled:le,highlightCodeStatsLine:Te,setHighlightCodeStatsLine:je,highlightCodeStatsVariable:Le,setHighlightCodeStatsVariable:Ee,isExpanded:ie,highlightIndexes:Oe,diagnostics:G,diagnosticStylesBySeverity:Ge}),fileDetails:ye,setHighlightIndexes:qe,highlightCodeStatsLine:Te,setHighlightCodeStatsLine:je,highlightCodeStatsVariable:Le,setHighlightCodeStatsVariable:Ee,filepath:Pe,datasource:X}),D&&ie&&a("div",e({className:c.citationWrapper,style:q.citationWrapper},{children:i("div",e({className:c.citationContent,style:q.citationContent},{children:[!pe&&T?i("div",e({className:c.citationContainerTitle,style:q.citationContainerTitle},{children:[a("span",{children:T}),j?a(g,{darkMode:le,onToggle:function(e){return function(e){e.stopPropagation(),e.preventDefault(),re((function(e){return!e}))}(e)},toggleFullscreen:function(e){e.stopPropagation(),e.preventDefault(),ce(!0),ge(!0)},handleOpenFileDetailSection:function(e){e.stopPropagation(),e.preventDefault(),Ie(!0)},showFullscreenIcon:J,showFileSummaryIButton:R}):a(o,{})]})):a(o,{}),i("div",e({style:{zIndex:-1e3,color:"#000",overflow:"hidden",display:"flex",flexDirection:"column",height:U,width:A,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[!pe&&!xe&&M,a(We?v:o,{}),Me?a("div",e({style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",color:"#242424"}},{children:"Something went wrong"})):a(o,{}),!pe&&!xe&&!M&&!We&&!Me&&a(u,{startIndex:null==Oe?void 0:Oe.startIndex,endIndex:null==Oe?void 0:Oe.endIndex,language:te,editorHeight:U,editorWidth:A,code:null!=H?H:_e,isHighlightingEnabled:W,isDarkModeEnabled:le,openHighlightedCodeDetails:function(){fe(!0)},highlightCodeStatsVariable:Le,setHighlightCodeStatsVariable:Ee,isExpanded:ie,highlightIndexes:Oe,diagnostics:G,diagnosticStylesBySeverity:Ge}),xe&&a(p,{FileDetailsComponent:N,fileSummarySectionTitle:V,isDarkMode:le,editorHeight:U,editorWidth:A,code:null==ye?void 0:ye.content.split("\n").slice((null==Oe?void 0:Oe.startIndex)-1,null==Oe?void 0:Oe.endIndex).join("\n"),language:te,onClose:function(e){e.stopPropagation(),e.preventDefault(),Ie(!1)},summary:null==ye?void 0:ye.summary,filepath:Pe,citationTitle:P})]}))]}))}))]})};export{I as default};
1
+ import{__assign as e,__awaiter as t,__generator as n}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as i,Fragment as o,jsx as a}from"react/jsx-runtime";import r,{useRef as l,useState as s,useEffect as d}from"react";import c from"./CodeCitation.module.css.js";import u from"./_components/CodeEditor.js";import{getLanguageFromFileName as h}from"../../utils/codeCitations.utils.js";import g from"./_components/ThemeToggle.js";import m from"./_components/CodeCitationPopup.js";import p from"./_components/HighlightedCodeDetails.js";import f from"../../node_modules/axios/lib/axios.js";import v from"./_components/Spinner.js";import{DEFAULT_DIAGNOSTIC_STYLES_BY_SEVERITY as x}from"../../constants/diagnosticStylesBySeverity.js";import{themeManager as I}from"../../utils/themeManager.js";var C=function(C){var y=C.baseUrlForCodeRetrieval,S=C.assistantName,b=C.organizationName,_=C.userId,k=C.taskId,D=C.repoUrl,P=C.inLineCitation,T=C.citationTitle,w=C.filename,j=C.filepath,F=C.citationContainerTitle,H=C.showThemeToggle,L=C.customCode,E=C.isDarkModeEnabled,B=C.chevronUpComponent,W=C.chevronDownComponent,N=C.isHighlightingEnabled,z=C.FileDetailsComponent,M=C.additionalCallbackForPillButton,V=C.CustomCodeRenderComponent,J=C.fileSummarySectionTitle,R=C.showFullscreenIcon,U=C.showFileSummaryIButton,A=C.editorHeight,O=C.editorWidth,q=C.styles,G=void 0===q?{}:q,K=C.diagnostics,Q=C.diagnosticStylesBySeverity,X=C.datasource,Y=void 0===X?"codebase":X,Z=C.externalFilesData,$=C.startIndex,ee=C.endIndex,te=l(!1),ne=h(w),ie=s(!1),oe=ie[0],ae=ie[1],re=s((function(){return I.getTheme(E)})),le=re[0],se=re[1];d((function(){return I.subscribe(se)}),[]);var de=s(!1),ce=de[0],ue=de[1],he=s(!1),ge=he[0],me=he[1],pe=s(!1),fe=pe[0],ve=pe[1],xe=s(!1),Ie=xe[0],Ce=xe[1],ye=s(null),Se=ye[0],be=ye[1],_e=s(""),ke=_e[0],De=_e[1],Pe=s(""),Te=Pe[0],we=Pe[1],je=s({startIndex:-1,endIndex:-1}),Fe=je[0],He=je[1],Le=s({}),Ee=Le[0],Be=Le[1],We=s(!1),Ne=We[0],ze=We[1],Me=s(!1),Ve=Me[0],Je=Me[1],Re=s({startIndex:-1,endIndex:-1}),Ue=Re[0],Ae=Re[1],Oe=s({startIndex:-1,endIndex:-1}),qe=Oe[0],Ge=Oe[1],Ke=r.useMemo((function(){return e(e({},x),Q)}),[Q]);d((function(){Ge({startIndex:null!=$?$:-1,endIndex:null!=ee?ee:-1})}),[$,ee]),d((function(){Z&&L&&(be(Z),te.current=!0)}),[Z,L]),d((function(){if("undefined"!=typeof window&&!te.current){te.current=!0;var i=new URL(j,"http://example.com"),o=i.searchParams,a=void 0!==$?$:o.has("startLine")?Number(o.get("startLine")):-1,r=void 0!==ee?ee:o.has("endLine")?Number(o.get("endLine")):-1;Ge({startIndex:a,endIndex:r}),He({startIndex:a,endIndex:r}),Ae({startIndex:a,endIndex:r}),i.searchParams.delete("startLine"),i.searchParams.delete("endLine"),i.searchParams.delete("validation");var l=i.pathname+i.search,s=null==l?void 0:l.replace(/^\//,"");we(s),console.log("Params going to API:",{file_path:s,assistant_name:S,organization_name:b,user_id:_,task_id:k,chunks_search:!1,technical_details_only:!0,repo_url:D});L||Ne||t(void 0,void 0,void 0,(function(){var t,i,o,a,r,l;return n(this,(function(n){switch(n.label){case 0:Je(!1),ze(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,f.get("".concat(y,"/analyzer/get_file_details"),{params:e({file_path:String(s),assistant_name:String(S),organization_name:String(b),user_id:String(_),task_id:String(k),repo_url:String(D),chunks_search:!1,technical_details_only:!0},"codebase"!==Y&&{datasource:Y})})];case 2:return t=n.sent(),i=(null==t?void 0:t.data[0])||(null==t?void 0:t.data),!Se&&i&&(be(i),Object.keys(null==t?void 0:t.data)&&(o=(null===(l=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r[0])||void 0===l?void 0:l.content)||(null==t?void 0:t.data.content),De(o))),ze(!1),[2,t.data];case 3:return a=n.sent(),Je(!0),console.error("Error in retrieving file details: ",a),[3,4];case 4:return ze(!1),[2]}}))}))}}),[]);return i(o,{children:[i("span",e({onClick:function(e){return function(e){e.preventDefault(),e.stopPropagation(),M&&M(),ae((function(e){return!e})),ue((function(e){return!e}))}(e)},className:c.pillButton,style:G.pillButton},{children:[a("span",e({style:G.citationTitle},{children:T})),P&&(oe?B:W)]})),(!P||ge)&&a(m,{open:ce,onClose:function(){Ge({startIndex:null==Ue?void 0:Ue.startIndex,endIndex:null==Ue?void 0:Ue.endIndex}),me(!1),ue(!1),He({startIndex:-1,endIndex:-1}),Be({})},title:T,customStyles:{popupContainer:{width:"100vw",height:"100vh",borderRadius:"0.75rem",fontFamily:"Plus Jakarta Sans, sans-serif"},popupTitleContainer:{color:"#d63384",fontFamily:"Plus Jakarta Sans, sans-serif",position:"relative",textAlign:"left",fontWeight:"700"},topLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"},bottomLeftTitle:{backgroundColor:"#f9f9f9",fontFamily:"Plus Jakarta Sans, sans-serif",fontSize:"1rem",fontWeight:"bold",padding:"5px",margin:"0px"}},editorChildren:a(u,{startIndex:null==qe?void 0:qe.startIndex,endIndex:null==qe?void 0:qe.endIndex,language:ne,editorHeight:A,editorWidth:O,code:L||ke,isHighlightingEnabled:N,isDarkModeEnabled:le,highlightCodeStatsLine:Fe,setHighlightCodeStatsLine:He,highlightCodeStatsVariable:Ee,setHighlightCodeStatsVariable:Be,isExpanded:oe,highlightIndexes:qe,diagnostics:K,diagnosticStylesBySeverity:Ke}),fileDetails:Se,setHighlightIndexes:Ge,highlightCodeStatsLine:Fe,setHighlightCodeStatsLine:He,highlightCodeStatsVariable:Ee,setHighlightCodeStatsVariable:Be,filepath:Te,datasource:Y}),P&&oe&&a("div",e({className:c.citationWrapper,style:G.citationWrapper},{children:i("div",e({className:c.citationContent,style:G.citationContent},{children:[!fe&&F?i("div",e({className:c.citationContainerTitle,style:G.citationContainerTitle},{children:[a("span",{children:F}),H?a(g,{darkMode:le,onToggle:function(e){return function(e){e.stopPropagation(),e.preventDefault(),I.setTheme(!le)}(e)},toggleFullscreen:function(e){e.stopPropagation(),e.preventDefault(),ue(!0),me(!0)},handleOpenFileDetailSection:function(e){e.stopPropagation(),e.preventDefault(),Ce(!0)},showFullscreenIcon:R,showFileSummaryIButton:U}):a(o,{})]})):a(o,{}),i("div",e({style:{zIndex:-1e3,color:"#000",overflow:"hidden",display:"flex",flexDirection:"column",height:A,width:O,fontFamily:"Plus Jakarta Sans, sans-serif"}},{children:[!fe&&!Ie&&V,a(Ne?v:o,{}),Ve?a("div",e({style:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",color:"#242424"}},{children:"Something went wrong"})):a(o,{}),!fe&&!Ie&&!V&&!Ne&&!Ve&&a(u,{startIndex:null==qe?void 0:qe.startIndex,endIndex:null==qe?void 0:qe.endIndex,language:ne,editorHeight:A,editorWidth:O,code:null!=L?L:ke,isHighlightingEnabled:N,isDarkModeEnabled:le,openHighlightedCodeDetails:function(){ve(!0)},highlightCodeStatsVariable:Ee,setHighlightCodeStatsVariable:Be,isExpanded:oe,highlightIndexes:qe,diagnostics:K,diagnosticStylesBySeverity:Ke}),Ie&&a(p,{FileDetailsComponent:z,fileSummarySectionTitle:J,isDarkMode:le,editorHeight:A,editorWidth:O,code:null==Se?void 0:Se.content.split("\n").slice((null==qe?void 0:qe.startIndex)-1,null==qe?void 0:qe.endIndex).join("\n"),language:ne,onClose:function(e){e.stopPropagation(),e.preventDefault(),Ce(!1)},summary:null==Se?void 0:Se.summary,filepath:Te,citationTitle:T})]}))]}))}))]})};export{C as default};
2
2
  //# sourceMappingURL=CodeCitation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookPreview.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookPreview/BookPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAA+B,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,mBAAmB,CAAC;AAM3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,aAAa,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB,EAAE;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC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E;QACL,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,sBAAsB,CAAC,EAAE,aAAa,CAAC;KAC1C,CAAC;IACF,UAAU,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC;IAC/B,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8R7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,13 @@
1
+ type ThemeCallback = (isDarkTheme: boolean) => void;
2
+ declare class ThemeManager {
3
+ private listeners;
4
+ private isDarkTheme;
5
+ private isInitialized;
6
+ constructor();
7
+ subscribe(callback: ThemeCallback): () => void;
8
+ setTheme(isDarkTheme: boolean): void;
9
+ getTheme(initialTheme?: boolean): boolean;
10
+ }
11
+ export declare const themeManager: ThemeManager;
12
+ export {};
13
+ //# sourceMappingURL=themeManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeManager.d.ts","sourceRoot":"","sources":["../../../../src/utils/themeManager.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;AAEpD,cAAM,YAAY;IACd,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,aAAa,CAAU;;IAQ/B,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,IAAI;IAK9C,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI;IAKpC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO;CAS5C;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ var e=new(function(){function e(){this.listeners=new Set,this.isDarkTheme=!0,this.isInitialized=!1}return e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.setTheme=function(e){this.isDarkTheme=e,this.listeners.forEach((function(t){return t(e)}))},e.prototype.getTheme=function(e){return this.isInitialized||void 0===e||(this.setTheme(e),this.isInitialized=!0),this.isDarkTheme},e}());export{e as themeManager};
2
+ //# sourceMappingURL=themeManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}