@e-llm-studio/citation 0.0.75 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
- package/dist/cjs/features/Bookemon/BookPreview/BookPreview.js +1 -1
- package/dist/cjs/features/Bookemon/Bookemon.js +1 -1
- package/dist/cjs/features/CodeCitation/CodeCitation.js +1 -1
- package/dist/features/Bookemon/BookElementsCard/BookElementsCard.js +1 -1
- package/dist/features/Bookemon/BookPreview/BookPreview.js +1 -1
- package/dist/features/Bookemon/Bookemon.js +1 -1
- package/dist/features/CodeCitation/CodeCitation.js +1 -1
- package/dist/types/src/CodeCitationTest.d.ts.map +1 -1
- package/dist/types/src/features/Bookemon/BookElementsCard/BookElementsCard.d.ts.map +1 -1
- package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts +1 -0
- package/dist/types/src/features/Bookemon/BookPreview/BookPreview.d.ts.map +1 -1
- package/dist/types/src/features/Bookemon/Bookemon.d.ts.map +1 -1
- package/dist/types/src/features/CodeCitation/CodeCitation.d.ts +2 -0
- package/dist/types/src/features/CodeCitation/CodeCitation.d.ts.map +1 -1
- package/package.json +1 -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"),n=require("../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js");require("../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js"),require("../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js"),require("../../../_virtual/index.js"),require("../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js"),require("../../../node_modules/@material-ui/utils/esm/refType.js");var s=require("react");require("../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js"),require("react-dom");var a=require("../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js"),i={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}};exports.default=function(r){r.data;var o=r.updateQuotesToHighLight,l=r.handleFetchManuscriptElements,d=r.BookIsbn,u=s.useState([]),c=u[0],g=u[1],x=s.useState(1),p=x[0],h=x[1],f=s.useState(!1),_=f[0],y=f[1],m=s.useState(!0),v=m[0],b=m[1],j=s.useState(0),S=j[0],T=j[1],C=s.useState([]),w=C[0],q=C[1],k=s.useState(1),B=k[0],L=k[1],D=s.useState(!1),F=D[0],M=D[1],P=s.useState(!0),E=P[0],I=P[1],W=s.useState(0),z=W[0],R=W[1],H=s.useState([]),N=H[0],G=H[1],A=s.useState(1),K=A[0],Y=A[1],O=s.useState(!1),Q=O[0],J=O[1],U=s.useState(!0),V=U[0],X=U[1],Z=s.useState(0),$=Z[0],ee=Z[1],te=function(t){var n=t.endpoint,s=t.page,a=t.isbn,i=t.setData,r=t.setLoading,o=t.setHasMore,d=t.setTotalPage;return e.__awaiter(void 0,void 0,void 0,(function(){var t,u,c,g;return e.__generator(this,(function(e){switch(e.label){case 0:return r(!0),[4,l({endpoint:n,page:s,pageSize:10,isbn:a})];case 1:return t=e.sent(),o(!(null===(u=null==t?void 0:t.pagination)||void 0===u?void 0:u.hasNext)&&!(null===(c=null==t?void 0:t.pagination)||void 0===c?void 0:c.hasPrevious)),d((null===(g=null==t?void 0:t.pagination)||void 0===g?void 0:g.totalPages)||0),i((null==t?void 0:t.data)||[]),r(!1),[2]}}))}))};return s.useEffect((function(){te({endpoint:"notable-quotes",page:p,isbn:d,setData:g,setLoading:y,setHasMore:b,setTotalPage:T})}),[p]),s.useEffect((function(){te({endpoint:"notable-characters",page:B,isbn:d,setData:q,setLoading:M,setHasMore:I,setTotalPage:R})}),[B]),s.useEffect((function(){te({endpoint:"geo-locations",page:K,isbn:d,setData:G,setLoading:J,setHasMore:X,setTotalPage:ee})}),[K]),t.jsxs("div",{children:[t.jsxs("div",e.__assign({style:{marginBottom:"24px"}},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Notable Quotes"})),t.jsxs("div",e.__assign({style:i.quotesPadding},{children:[_?t.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:i.quoteCard},{children:[t.jsx(a.default,{variant:"text",width:"60%",height:28}),t.jsx(a.default,{variant:"text",width:"40%",height:20}),t.jsx(a.default,{variant:"text",width:"25%",height:20}),t.jsx(a.default,{variant:"text",width:"30%",height:20})]}),n)}))})):0===c.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return te({endpoint:"notable-quotes",page:p,isbn:d,setData:g,setLoading:y,setHasMore:b,setTotalPage:T})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:c.map((function(n,s){return t.jsxs("div",e.__assign({style:i.quoteCard,onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(null===(s=null==n?void 0:n.chunkIds)||void 0===s?void 0:s.length)>0?[4,o(n.text,"Notable Quotes",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight quote:",t),[3,4];case 4:return[2]}}))}))}},{children:[t.jsx("p",e.__assign({style:i.quoteText},{children:null==n?void 0:n.text})),t.jsxs("p",e.__assign({style:i.quoteMeta},{children:[n.chapter," ",t.jsx("br",{})," ",n.page]})),t.jsxs("p",e.__assign({style:i.quoteAuthor},{children:["— ",null==n?void 0:n.author]}))]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!v&&t.jsx(n.default,{disabled:_,count:S,page:p,onChange:function(e,t){return h(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:i.geoLocationsContainer},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Key Geo Locations"})),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.quotesPadding),{marginBottom:"8px"})},{children:[Q?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return t.jsx(a.default,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===N.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return te({endpoint:"geo-locations",page:K,isbn:d,setData:G,setLoading:J,setHasMore:X,setTotalPage:ee})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:N.map((function(n,s){return t.jsxs("span",e.__assign({style:i.geoLocationFlex},{children:[t.jsx("span",e.__assign({style:i.geoText,onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(null===(s=null==n?void 0:n.chunkIds)||void 0===s?void 0:s.length)>0?[4,o(n.name,"Key Geo Locations",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight location:",t),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==n?void 0:n.name})),s<N.length-1&&t.jsx("span",{style:i.geoDivider})]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!V&&t.jsx(n.default,{disabled:Q,count:$,page:K,onChange:function(e,t){return Y(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:i.charactersContainer},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Key Characters"})),F?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.characterCard),{flexBasis:"40%"})},{children:[t.jsx(a.default,{variant:"circle",style:e.__assign(e.__assign({},i.avatar),{flexShrink:0})}),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",flex:1}},{children:[t.jsx(a.default,{variant:"text",style:{flex:"1",flexShrink:0}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}})]}))]}),n)}))})):0===w.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return te({endpoint:"notable-characters",page:B,isbn:d,setData:q,setLoading:M,setHasMore:I,setTotalPage:R})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:t.jsx("div",e.__assign({style:i.charactersGrid},{children:w.map((function(n,s){var a=e.__assign(e.__assign({},i.avatar),{backgroundColor:n.bg,color:n.color});return t.jsxs("div",e.__assign({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:i.characterCard,onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,s;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(null===(s=null==n?void 0:n.chunkIds)||void 0===s?void 0:s.length)>0?[4,o(n.name,"Key Characters",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight character:",t),[3,4];case 4:return[2]}}))}))}},{children:[t.jsx("div",e.__assign({style:a},{children:n.initials})),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[t.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.charName),{margin:0})},{children:n.name})),t.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.charDesc),{margin:0,marginTop:"4px"})},{children:n.description}))]}))]}),s)}))}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!E&&t.jsx(n.default,{count:z,disabled:F,page:B,onChange:function(e,t){return L(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};
|
|
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("../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js");require("../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js"),require("../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js"),require("../../../_virtual/index.js"),require("../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js"),require("../../../node_modules/@material-ui/utils/esm/refType.js");var s=require("react");require("../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js"),require("react-dom");var a=require("../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js"),i={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}};exports.default=function(r){r.data;var o=r.updateQuotesToHighLight,l=r.handleFetchManuscriptElements,d=r.BookIsbn,u=s.useState([]),c=u[0],g=u[1],x=s.useState(1),p=x[0],h=x[1],f=s.useState(!1),_=f[0],y=f[1],v=s.useState(!0),m=v[0],b=v[1],j=s.useState(0),S=j[0],C=j[1],T=s.useState([]),k=T[0],w=T[1],q=s.useState(1),B=q[0],D=q[1],L=s.useState(!1),F=L[0],E=L[1],M=s.useState(!0),P=M[0],W=M[1],I=s.useState(0),z=I[0],R=I[1],H=s.useState([]),N=H[0],G=H[1],A=s.useState(1),K=A[0],Y=A[1],O=s.useState(!1),Q=O[0],J=O[1],U=s.useState(!0),V=U[0],X=U[1],Z=s.useState(0),$=Z[0],ee=Z[1],te=s.useState({list:"",index:-1}),ne=te[0],se=te[1],ae=function(t){var n=t.endpoint,s=t.page,a=t.isbn,i=t.setData,r=t.setLoading,o=t.setHasMore,d=t.setTotalPage;return e.__awaiter(void 0,void 0,void 0,(function(){var t,u,c,g;return e.__generator(this,(function(e){switch(e.label){case 0:return r(!0),[4,l({endpoint:n,page:s,pageSize:10,isbn:a})];case 1:return t=e.sent(),o(!(null===(u=null==t?void 0:t.pagination)||void 0===u?void 0:u.hasNext)&&!(null===(c=null==t?void 0:t.pagination)||void 0===c?void 0:c.hasPrevious)),d((null===(g=null==t?void 0:t.pagination)||void 0===g?void 0:g.totalPages)||0),i((null==t?void 0:t.data)||[]),r(!1),[2]}}))}))};return s.useEffect((function(){ae({endpoint:"notable-quotes",page:p,isbn:d,setData:g,setLoading:y,setHasMore:b,setTotalPage:C})}),[p]),s.useEffect((function(){ae({endpoint:"notable-characters",page:B,isbn:d,setData:w,setLoading:E,setHasMore:W,setTotalPage:R})}),[B]),s.useEffect((function(){ae({endpoint:"geo-locations",page:K,isbn:d,setData:G,setLoading:J,setHasMore:X,setTotalPage:ee})}),[K]),t.jsxs("div",{children:[t.jsxs("div",e.__assign({style:{marginBottom:"24px"}},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Notable Quotes"})),t.jsxs("div",e.__assign({style:i.quotesPadding},{children:[_?t.jsx("div",e.__assign({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:i.quoteCard},{children:[t.jsx(a.default,{variant:"text",width:"60%",height:28}),t.jsx(a.default,{variant:"text",width:"40%",height:20}),t.jsx(a.default,{variant:"text",width:"25%",height:20}),t.jsx(a.default,{variant:"text",width:"30%",height:20})]}),n)}))})):0===c.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return ae({endpoint:"notable-quotes",page:p,isbn:d,setData:g,setLoading:y,setHasMore:b,setTotalPage:C})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:c.map((function(n,s){var a="notable"===ne.list&&ne.index===s;return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.quoteCard),{borderColor:a?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),se({list:"notable",index:s}),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,o(n.text,"Notable Quotes",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight quote:",t),[3,4];case 4:return[2]}}))}))}},{children:[t.jsx("p",e.__assign({style:i.quoteText},{children:null==n?void 0:n.text})),t.jsxs("p",e.__assign({style:i.quoteMeta},{children:[n.chapter," ",t.jsx("br",{})," ",n.page]})),t.jsxs("p",e.__assign({style:i.quoteAuthor},{children:["— ",null==n?void 0:n.author]}))]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!m&&t.jsx(n.default,{disabled:_,count:S,page:p,onChange:function(e,t){return h(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:i.geoLocationsContainer},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Key Geo Locations"})),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.quotesPadding),{marginBottom:"8px"})},{children:[Q?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return t.jsx(a.default,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===N.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return ae({endpoint:"geo-locations",page:K,isbn:d,setData:G,setLoading:J,setHasMore:X,setTotalPage:ee})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:N.map((function(n,s){var a="geo_location"===ne.list&&ne.index===s;return t.jsxs("span",e.__assign({style:i.geoLocationFlex},{children:[t.jsx("span",e.__assign({style:e.__assign(e.__assign({},i.geoText),{fontWeight:a?"700":"",textDecoration:a?"underline":""}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),se({list:"geo_location",index:s}),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,o(n.name,"Key Geo Locations",n.chunkIds,0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.error("Failed to highlight location:",t),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==n?void 0:n.name})),s<N.length-1&&t.jsx("span",{style:i.geoDivider})]}),s)}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!V&&t.jsx(n.default,{disabled:Q,count:$,page:K,onChange:function(e,t){return Y(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),t.jsxs("div",e.__assign({style:i.charactersContainer},{children:[t.jsx("p",e.__assign({style:i.sectionTitle},{children:"Key Characters"})),F?t.jsx("div",e.__assign({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(n){return t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},i.characterCard),{flexBasis:"40%"})},{children:[t.jsx(a.default,{variant:"circle",style:e.__assign(e.__assign({},i.avatar),{flexShrink:0})}),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column",flex:1}},{children:[t.jsx(a.default,{variant:"text",style:{flex:"1",flexShrink:0}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}}),t.jsx(a.default,{variant:"text",style:{flex:"1"}})]}))]}),n)}))})):0===k.length?t.jsxs("p",e.__assign({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",t.jsx("button",e.__assign({style:i.retryButton,onClick:function(){return ae({endpoint:"notable-characters",page:B,isbn:d,setData:w,setLoading:E,setHasMore:W,setTotalPage:R})}},{children:"Retry"}))]})):t.jsx(t.Fragment,{children:t.jsx("div",e.__assign({style:i.charactersGrid},{children:k.map((function(n,s){var a=e.__assign(e.__assign({},i.avatar),{backgroundColor:n.bg,color:n.color}),r="key_character"===ne.list&&ne.index===s;return t.jsxs("div",e.__assign({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:e.__assign(e.__assign({},i.characterCard),{borderColor:r?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:se({list:"key_character",index:s}),e.label=1;case 1:return e.trys.push([1,4,,5]),(null===(a=null==n?void 0:n.chunkIds)||void 0===a?void 0:a.length)>0?[4,o(n.name,"Key Characters",n.chunkIds,0)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[3,5];case 4:return t=e.sent(),console.error("Failed to highlight character:",t),[3,5];case 5:return[2]}}))}))}},{children:[t.jsx("div",e.__assign({style:a},{children:n.initials})),t.jsxs("div",e.__assign({style:{display:"flex",flexDirection:"column"}},{children:[t.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.charName),{margin:0})},{children:n.name})),t.jsx("p",e.__assign({style:e.__assign(e.__assign({},i.charDesc),{margin:0,marginTop:"4px"})},{children:n.description}))]}))]}),s)}))}))}),t.jsx("div",e.__assign({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!P&&t.jsx(n.default,{count:z,disabled:F,page:B,onChange:function(e,t){return D(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};
|
|
2
2
|
//# sourceMappingURL=BookElementsCard.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"),i=require("react"),n=require("../../../_virtual/Close.js"),o=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,_=void 0===y?"":y,v=d.comingSoonData,m=d.isNonHighlightedBlur,b=d.isBlurToggleVisible,k=void 0!==b&&b,j=i.useState(!1),
|
|
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"),n=require("../../../_virtual/Close.js"),o=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,_=void 0===y?"":y,v=d.comingSoonData,m=d.isNonHighlightedBlur,b=d.isBlurToggleVisible,k=void 0!==b&&b,C=d.noHtmlContent,j=void 0!==C&&C,w=i.useState(!1),S=w[0],B=w[1],I=i.useState(!0),T=I[0],L=I[1],W=!!p.textToHighLight&&!!p.content,P={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:"center",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(){L(!0),console.log(f,"citationLoad")}),[f]),t.jsxs("div",e.__assign({style:e.__assign(e.__assign({},P.rightPanel),(null==h?void 0:h.rightPanel)||{})},{children:[t.jsxs("div",e.__assign({style:P.header},{children:[t.jsxs("div",e.__assign({style:P.headerLeft},{children:[(W||j)&&t.jsx("button",e.__assign({style:P.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(o.default,{})})),t.jsx("h2",e.__assign({style:P.clickableElementCategory},{children:_}))]})),t.jsxs("div",e.__assign({style:P.toggleBlurContainer},{children:[W&&k&&t.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[t.jsx(s.default,{checked:T,onChange:function(e){L(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:P.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(n.default,{})}))]}))]})),t.jsx("div",e.__assign({style:e.__assign(e.__assign({},P.previewWrapper),null==h?void 0:h.previewWrapper)},{children:W?t.jsx(r.default,{citationNumber:1,defaultState:!0,partialMatch:!0,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:m,toggleBlur:T}):f||j?t.jsxs("div",e.__assign({style:P.loadingStyle},{children:[t.jsx("div",e.__assign({style:l.comingSoonStyles.iconWrapper},{children:(null==v?void 0:v.icon)||l.defaultIcon})),j?t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["No data found matching the selected ",_.toLowerCase()]})):t.jsxs("p",e.__assign({style:l.comingSoonStyles.text},{children:["fetching ",_.toLowerCase(),"...."]}))]})):t.jsx("div",e.__assign({style:P.flexCenter},{children:t.jsx("div",e.__assign({style:e.__assign(e.__assign({},P.coverContainer),S||!g?e.__assign(e.__assign({},P.coverImagePreview),null==h?void 0:h.coverImagePreview):{})},{children:g&&!S?t.jsx("img",{onError:function(){return B(!0)},style:P.bookCoverStyle,src:g,alt:"Book Cover Image"}):t.jsx("div",e.__assign({style:P.bookCoverPlaceholder},{children:t.jsxs("div",e.__assign({style:P.bookCoverInner},{children:[t.jsx("div",e.__assign({style:P.bookTitle},{children:(null==c?void 0:c.title)||"Unknown Title"})),t.jsx("div",e.__assign({style:P.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},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,w=y.isNonHighlightedBlur,B=y.getHighlightContent,S=y.handleFetchManuscriptElements,F=y.data,D=y.showComingSoon,z=void 0!==D&&D,P=y.comingSoonData,q=void 0===P?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:v}:P,I=y.customStyle,A=void 0===I?{}:I,E=y.isBlurToggleVisible,H=void 0!==E&&E,L=t.useState({textToHighLight:"",content:""}),O=L[0],R=L[1],T=t.useState(1),M=T[0],W=T[1],N=t.useState(!1),V=N[0],Q=N[1],Y=t.useState("Book Preview"),G=Y[0],J=Y[1],K=t.useState(70),U=K[0],X=K[1],Z=t.useRef(null),$=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;return e.__generator(this,(function(e){switch(e.label){case 0:R({textToHighLight:"",content:""}),Q(!0),J(t),e.label=1;case 1:return e.trys.push([1,6,7,8]),o&&0!==o.length?[4,B([o[n]])]:(console.warn("No chunk IDs provided."),Q(!1),X(70),Z.current&&Z.current.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return console.warn("No highlight content found."),Q(!1),[2];for(l=(s=function(e){return e?e.replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=l.split(" ").filter(Boolean),c=null,u=d.length;u>0;u--){for(g=d.slice(0,u).join(" "),h=0,x=a;h<x.length;h++)if(p=x[h],s((null==p?void 0:p.normalizedContent)||(null==p?void 0:p.htmlContent)).includes(g)){c=p;break}if(c)break}return _=a.map((function(e){return e.htmlContent})).join("\n"),c?(R({textToHighLight:c.htmlContent,content:_}),J(t),X(50),Z.current&&Z.current.resize(50),[3,5]):[3,3];case 3:return console.warn("No matching normalized content found for highlight text."),[4,$(i,t,o,n+1)];case 4:e.sent(),e.label=5;case 5:return[3,8];case 6:return m=e.sent(),console.error("Error fetching highlight content:",m),[3,8];case 7:return Q(!1),[7];case 8:return[2]}}))}))},ee=F.bookAwards,ie=F.bookCopyRight,te=F.bookDetails,oe=F.bookElements,ne=F.bookOverView,re=F.bookCoverImage,ae=null==te?void 0:te.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==A?void 0:A.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!z&&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:Z,defaultSize:U||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==A?void 0:A.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:ne&&Object.keys(ne).length>0?i.jsx(d.default,{data:ne}):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:oe,handleFetchManuscriptElements:S,BookIsbn:ae,updateQuotesToHighLight:$})}))]}))})),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:te&&Object.keys(te).length>0?i.jsx(l.default,{data:te}):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:ie&&Object.keys(ie).length>0?i.jsx(u.default,{data:ie}):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:ee&&Object.keys(ee).length>0?i.jsx(g.default,{data:ee}):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:ne,bookCoverImage:re,onClose:C,clickableElementCategory:G,quotesToHighLightData:O,updateQuotesToHighLight:$,citationLoad:V,previewPage:M,setPreviewPage:W,customStyle:A,comingSoonData:q,isNonHighlightedBlur:w,isBlurToggleVisible:H})}))]}))})),z?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:q.header,subheader:q.subheader,icon:q.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,w=y.isNonHighlightedBlur,B=y.getHighlightContent,S=y.handleFetchManuscriptElements,F=y.data,D=y.showComingSoon,z=void 0!==D&&D,P=y.comingSoonData,q=void 0===P?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:v}:P,I=y.customStyle,A=void 0===I?{}:I,H=y.isBlurToggleVisible,E=void 0!==H&&H,L=t.useState({textToHighLight:"",content:""}),O=L[0],R=L[1],T=t.useState(1),M=T[0],W=T[1],N=t.useState(!1),V=N[0],Q=N[1],Y=t.useState("Book Preview"),G=Y[0],J=Y[1],K=t.useState(70),U=K[0],X=K[1],Z=t.useRef(null),$=t.useState(!1),ee=$[0],ie=$[1],te=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;return e.__generator(this,(function(e){switch(e.label){case 0:R({textToHighLight:"",content:""}),ie(!1),Q(!0),J(t),e.label=1;case 1:return e.trys.push([1,6,7,8]),o&&0!==o.length?[4,B([o[n]])]:(console.warn("No chunk IDs provided."),Q(!1),X(70),Z.current&&Z.current.resize(70),[2]);case 2:if(r=e.sent(),a=(null==r?void 0:r.data)||r||[],!Array.isArray(a)||0===a.length)return console.warn("No highlight content found."),Q(!1),ie(!0),[2];for(l=(s=function(e){return e?e.replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(i),d=l.split(" ").filter(Boolean),c=null,u=d.length;u>0;u--){for(g=d.slice(0,u).join(" "),h=0,x=a;h<x.length;h++)if(p=x[h],s((null==p?void 0:p.normalizedContent)||(null==p?void 0:p.htmlContent)).includes(g)){c=p;break}if(c)break}return _=a.map((function(e){return e.htmlContent})).join("\n"),c?(R({textToHighLight:c.htmlContent,content:_}),J(t),X(50),Z.current&&Z.current.resize(50),Q(!1),[3,5]):[3,3];case 3:return console.warn("No matching normalized content found for highlight text."),n+1>=o.length?(ie(!0),Q(!1),[2]):[4,te(i,t,o,n+1)];case 4:e.sent(),e.label=5;case 5:return[3,8];case 6:return m=e.sent(),console.error("Error fetching highlight content:",m),ie(!0),Q(!1),[3,8];case 7:return[7];case 8:return[2]}}))}))},oe=F.bookAwards,ne=F.bookCopyRight,re=F.bookDetails,ae=F.bookElements,se=F.bookOverView,le=F.bookCoverImage,de=null==re?void 0:re.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==A?void 0:A.dialogDimension)}},{children:i.jsxs(p.default,e.__assign({style:j.dialogContent},{children:[!z&&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:Z,defaultSize:U||70},{children:i.jsxs("div",e.__assign({style:e.__assign(e.__assign({},null==j?void 0:j.leftPanel),null==A?void 0:A.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:se&&Object.keys(se).length>0?i.jsx(d.default,{data:se}):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:ae,handleFetchManuscriptElements:S,BookIsbn:de,updateQuotesToHighLight:te})}))]}))})),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:re&&Object.keys(re).length>0?i.jsx(l.default,{data:re}):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:ne&&Object.keys(ne).length>0?i.jsx(u.default,{data:ne}):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:oe&&Object.keys(oe).length>0?i.jsx(g.default,{data:oe}):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:se,bookCoverImage:le,onClose:C,clickableElementCategory:G,quotesToHighLightData:O,updateQuotesToHighLight:te,citationLoad:V,previewPage:M,setPreviewPage:W,customStyle:A,comingSoonData:q,isNonHighlightedBlur:w,isBlurToggleVisible:E,noHtmlContent:ee})}))]}))})),z?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:q.header,subheader:q.subheader,icon:q.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,
|
|
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})]}))]}))}))]})};
|
|
2
2
|
//# sourceMappingURL=CodeCitation.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 o,jsx as r,Fragment as i}from"react/jsx-runtime";import a from"../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js";import"../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js";import"../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js";import"../../../_virtual/index.js";import"../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js";import"../../../node_modules/@material-ui/utils/esm/refType.js";import{useState as l,useEffect as s}from"react";import"../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js";import"react-dom";import d from"../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js";var c={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},u=function(u){u.data;var p=u.updateQuotesToHighLight,h=u.handleFetchManuscriptElements,g=u.BookIsbn,x=l([]),f=x[0],m=x[1],y=l(1),v=y[0],b=y[1],T=l(!1),C=T[0],S=T[1],k=l(!0),w=k[0],B=k[1],L=l(0),D=L[0],q=L[1],M=l([]),j=M[0],F=M[1],P=l(1),I=P[0],W=P[1],z=l(!1),E=z[0],R=z[1],_=l(!0),H=_[0],N=_[1],G=l(0),A=G[0],K=G[1],Y=l([]),Q=Y[0],O=Y[1],J=l(1),U=J[0],V=J[1],X=l(!1),Z=X[0],$=X[1],ee=l(!0),te=ee[0],ne=ee[1],oe=l(0),re=oe[0],ie=oe[1],ae=function(e){var o=e.endpoint,r=e.page,i=e.isbn,a=e.setData,l=e.setLoading,s=e.setHasMore,d=e.setTotalPage;return t(void 0,void 0,void 0,(function(){var e,t,c,u;return n(this,(function(n){switch(n.label){case 0:return l(!0),[4,h({endpoint:o,page:r,pageSize:10,isbn:i})];case 1:return e=n.sent(),s(!(null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.hasNext)&&!(null===(c=null==e?void 0:e.pagination)||void 0===c?void 0:c.hasPrevious)),d((null===(u=null==e?void 0:e.pagination)||void 0===u?void 0:u.totalPages)||0),a((null==e?void 0:e.data)||[]),l(!1),[2]}}))}))};return s((function(){ae({endpoint:"notable-quotes",page:v,isbn:g,setData:m,setLoading:S,setHasMore:B,setTotalPage:q})}),[v]),s((function(){ae({endpoint:"notable-characters",page:I,isbn:g,setData:F,setLoading:R,setHasMore:N,setTotalPage:K})}),[I]),s((function(){ae({endpoint:"geo-locations",page:U,isbn:g,setData:O,setLoading:$,setHasMore:ne,setTotalPage:ie})}),[U]),o("div",{children:[o("div",e({style:{marginBottom:"24px"}},{children:[r("p",e({style:c.sectionTitle},{children:"Notable Quotes"})),o("div",e({style:c.quotesPadding},{children:[C?r("div",e({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return o("div",e({style:c.quoteCard},{children:[r(d,{variant:"text",width:"60%",height:28}),r(d,{variant:"text",width:"40%",height:20}),r(d,{variant:"text",width:"25%",height:20}),r(d,{variant:"text",width:"30%",height:20})]}),t)}))})):0===f.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",r("button",e({style:c.retryButton,onClick:function(){return ae({endpoint:"notable-quotes",page:v,isbn:g,setData:m,setLoading:S,setHasMore:B,setTotalPage:q})}},{children:"Retry"}))]})):r(i,{children:f.map((function(i,a){return o("div",e({style:c.quoteCard,onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.text,"Notable Quotes",i.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight quote:",e),[3,4];case 4:return[2]}}))}))}},{children:[r("p",e({style:c.quoteText},{children:null==i?void 0:i.text})),o("p",e({style:c.quoteMeta},{children:[i.chapter," ",r("br",{})," ",i.page]})),o("p",e({style:c.quoteAuthor},{children:["— ",null==i?void 0:i.author]}))]}),a)}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!w&&r(a,{disabled:C,count:D,page:v,onChange:function(e,t){return b(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),o("div",e({style:c.geoLocationsContainer},{children:[r("p",e({style:c.sectionTitle},{children:"Key Geo Locations"})),o("div",e({style:e(e({},c.quotesPadding),{marginBottom:"8px"})},{children:[Z?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return r(d,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===Q.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",r("button",e({style:c.retryButton,onClick:function(){return ae({endpoint:"geo-locations",page:U,isbn:g,setData:O,setLoading:$,setHasMore:ne,setTotalPage:ie})}},{children:"Retry"}))]})):r(i,{children:Q.map((function(i,a){return o("span",e({style:c.geoLocationFlex},{children:[r("span",e({style:c.geoText,onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.name,"Key Geo Locations",i.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight location:",e),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==i?void 0:i.name})),a<Q.length-1&&r("span",{style:c.geoDivider})]}),a)}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!te&&r(a,{disabled:Z,count:re,page:U,onChange:function(e,t){return V(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),o("div",e({style:c.charactersContainer},{children:[r("p",e({style:c.sectionTitle},{children:"Key Characters"})),E?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return o("div",e({style:e(e({},c.characterCard),{flexBasis:"40%"})},{children:[r(d,{variant:"circle",style:e(e({},c.avatar),{flexShrink:0})}),o("div",e({style:{display:"flex",flexDirection:"column",flex:1}},{children:[r(d,{variant:"text",style:{flex:"1",flexShrink:0}}),r(d,{variant:"text",style:{flex:"1"}}),r(d,{variant:"text",style:{flex:"1"}}),r(d,{variant:"text",style:{flex:"1"}})]}))]}),t)}))})):0===j.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",r("button",e({style:c.retryButton,onClick:function(){return ae({endpoint:"notable-characters",page:I,isbn:g,setData:F,setLoading:R,setHasMore:N,setTotalPage:K})}},{children:"Retry"}))]})):r(i,{children:r("div",e({style:c.charactersGrid},{children:j.map((function(i,a){var l=e(e({},c.avatar),{backgroundColor:i.bg,color:i.color});return o("div",e({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:c.characterCard,onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.name,"Key Characters",i.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight character:",e),[3,4];case 4:return[2]}}))}))}},{children:[r("div",e({style:l},{children:i.initials})),o("div",e({style:{display:"flex",flexDirection:"column"}},{children:[r("p",e({style:e(e({},c.charName),{margin:0})},{children:i.name})),r("p",e({style:e(e({},c.charDesc),{margin:0,marginTop:"4px"})},{children:i.description}))]}))]}),a)}))}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!H&&r(a,{count:A,disabled:E,page:I,onChange:function(e,t){return W(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};export{u as default};
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as n}from"../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as o,jsx as r,Fragment as i}from"react/jsx-runtime";import a from"../../../node_modules/@material-ui/lab/esm/Pagination/Pagination.js";import"../../../node_modules/@material-ui/utils/esm/elementAcceptingRef.js";import"../../../node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js";import"../../../_virtual/index.js";import"../../../node_modules/@material-ui/utils/esm/ponyfillGlobal.js";import"../../../node_modules/@material-ui/utils/esm/refType.js";import{useState as l,useEffect as s}from"react";import"../../../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js";import"react-dom";import d from"../../../node_modules/@material-ui/lab/esm/Skeleton/Skeleton.js";var c={sectionTitle:{fontSize:"14px",fontWeight:600,color:"#667085",marginBottom:"12px"},quotesPadding:{paddingLeft:"12px"},quoteCard:{border:"1px solid #CBD5E1",borderRadius:"8px",padding:"16px",backgroundColor:"#F8FAFC",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",marginBottom:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},quoteText:{fontStyle:"italic",color:"#475569",fontSize:"14px",fontWeight:400,marginBottom:"12px"},quoteMeta:{color:"#475569",fontSize:"12px",fontWeight:400},quoteAuthor:{fontSize:"10px",fontWeight:600,color:"#475569",marginTop:"8px",marginBottom:"18px"},button:{color:"#5928ED",fontSize:"14px",fontWeight:600,background:"none",border:"none",cursor:"pointer",padding:0,textDecoration:"none",paddingLeft:"12px"},geoLocationsContainer:{marginTop:"24px",marginBottom:"24px"},geoText:{fontSize:"14px",fontWeight:500,cursor:"pointer",color:"#532BED"},geoDivider:{margin:"0 8px",color:"#475abb",backgroundColor:"#475abb",width:"1px",height:"18px",display:"inline-block"},geoLocationFlex:{display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"8px"},charactersContainer:{marginTop:"16px"},charactersGrid:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"16px",marginBottom:"16px",paddingLeft:"12px"},characterCard:{border:"1px solid #E5E7EB",borderRadius:"8px",backgroundColor:"#FFFFFF",boxShadow:"0 1px 2px rgba(0,0,0,0.05)",display:"flex",alignItems:"flex-start",gap:"12px",padding:"16px",cursor:"pointer",transition:"transform 0.2s ease, box-shadow 0.2s ease"},avatar:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",fontSize:"14px",fontWeight:600,flexShrink:0},charName:{fontStyle:"normal",fontWeight:600,color:"#101827",fontSize:"16px"},charDesc:{fontStyle:"normal",fontWeight:400,fontSize:"14px",color:"#6B7280"},retryButton:{backgroundColor:"#5928EC",color:"#fff",padding:"6px 10px",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:"500"}},u=function(u){u.data;var p=u.updateQuotesToHighLight,h=u.handleFetchManuscriptElements,g=u.BookIsbn,x=l([]),f=x[0],m=x[1],y=l(1),v=y[0],b=y[1],C=l(!1),T=C[0],S=C[1],k=l(!0),w=k[0],B=k[1],D=l(0),L=D[0],q=D[1],M=l([]),j=M[0],F=M[1],E=l(1),P=E[0],W=E[1],_=l(!1),I=_[0],z=_[1],R=l(!0),H=R[0],N=R[1],G=l(0),A=G[0],K=G[1],Y=l([]),Q=Y[0],O=Y[1],J=l(1),U=J[0],V=J[1],X=l(!1),Z=X[0],$=X[1],ee=l(!0),te=ee[0],ne=ee[1],oe=l(0),re=oe[0],ie=oe[1],ae=l({list:"",index:-1}),le=ae[0],se=ae[1],de=function(e){var o=e.endpoint,r=e.page,i=e.isbn,a=e.setData,l=e.setLoading,s=e.setHasMore,d=e.setTotalPage;return t(void 0,void 0,void 0,(function(){var e,t,c,u;return n(this,(function(n){switch(n.label){case 0:return l(!0),[4,h({endpoint:o,page:r,pageSize:10,isbn:i})];case 1:return e=n.sent(),s(!(null===(t=null==e?void 0:e.pagination)||void 0===t?void 0:t.hasNext)&&!(null===(c=null==e?void 0:e.pagination)||void 0===c?void 0:c.hasPrevious)),d((null===(u=null==e?void 0:e.pagination)||void 0===u?void 0:u.totalPages)||0),a((null==e?void 0:e.data)||[]),l(!1),[2]}}))}))};return s((function(){de({endpoint:"notable-quotes",page:v,isbn:g,setData:m,setLoading:S,setHasMore:B,setTotalPage:q})}),[v]),s((function(){de({endpoint:"notable-characters",page:P,isbn:g,setData:F,setLoading:z,setHasMore:N,setTotalPage:K})}),[P]),s((function(){de({endpoint:"geo-locations",page:U,isbn:g,setData:O,setLoading:$,setHasMore:ne,setTotalPage:ie})}),[U]),o("div",{children:[o("div",e({style:{marginBottom:"24px"}},{children:[r("p",e({style:c.sectionTitle},{children:"Notable Quotes"})),o("div",e({style:c.quotesPadding},{children:[T?r("div",e({style:{display:"flex",flexDirection:"column",rowGap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return o("div",e({style:c.quoteCard},{children:[r(d,{variant:"text",width:"60%",height:28}),r(d,{variant:"text",width:"40%",height:20}),r(d,{variant:"text",width:"25%",height:20}),r(d,{variant:"text",width:"30%",height:20})]}),t)}))})):0===f.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic"}},{children:["No notable quotes found. ",r("button",e({style:c.retryButton,onClick:function(){return de({endpoint:"notable-quotes",page:v,isbn:g,setData:m,setLoading:S,setHasMore:B,setTotalPage:q})}},{children:"Retry"}))]})):r(i,{children:f.map((function(i,a){var l="notable"===le.list&&le.index===a;return o("div",e({style:e(e({},c.quoteCard),{borderColor:l?"rgb(83, 43, 237)":"#CBD5E1"}),onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),se({list:"notable",index:a}),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.text,"Notable Quotes",i.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight quote:",e),[3,4];case 4:return[2]}}))}))}},{children:[r("p",e({style:c.quoteText},{children:null==i?void 0:i.text})),o("p",e({style:c.quoteMeta},{children:[i.chapter," ",r("br",{})," ",i.page]})),o("p",e({style:c.quoteAuthor},{children:["— ",null==i?void 0:i.author]}))]}),a)}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!w&&r(a,{disabled:T,count:L,page:v,onChange:function(e,t){return b(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),o("div",e({style:c.geoLocationsContainer},{children:[r("p",e({style:c.sectionTitle},{children:"Key Geo Locations"})),o("div",e({style:e(e({},c.quotesPadding),{marginBottom:"8px"})},{children:[Z?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(e){return r(d,{variant:"rect",width:100,height:20,style:{borderRadius:"8px"}},e)}))})):0===Q.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key geo locations found. ",r("button",e({style:c.retryButton,onClick:function(){return de({endpoint:"geo-locations",page:U,isbn:g,setData:O,setLoading:$,setHasMore:ne,setTotalPage:ie})}},{children:"Retry"}))]})):r(i,{children:Q.map((function(i,a){var l="geo_location"===le.list&&le.index===a;return o("span",e({style:c.geoLocationFlex},{children:[r("span",e({style:e(e({},c.geoText),{fontWeight:l?"700":"",textDecoration:l?"underline":""}),onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),se({list:"geo_location",index:a}),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.name,"Key Geo Locations",i.chunkIds,0)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:return e=n.sent(),console.error("Failed to highlight location:",e),[3,4];case 4:return[2]}}))}))},onMouseOver:function(e){return e.currentTarget.style.textDecoration="underline"},onMouseOut:function(e){return e.currentTarget.style.textDecoration="none"}},{children:null==i?void 0:i.name})),a<Q.length-1&&r("span",{style:c.geoDivider})]}),a)}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!te&&r(a,{disabled:Z,count:re,page:U,onChange:function(e,t){return V(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})),o("div",e({style:c.charactersContainer},{children:[r("p",e({style:c.sectionTitle},{children:"Key Characters"})),I?r("div",e({style:{display:"flex",flexWrap:"wrap",gap:"8px"}},{children:[1,2,3,4,5,6,7,8,9,10].map((function(t){return o("div",e({style:e(e({},c.characterCard),{flexBasis:"40%"})},{children:[r(d,{variant:"circle",style:e(e({},c.avatar),{flexShrink:0})}),o("div",e({style:{display:"flex",flexDirection:"column",flex:1}},{children:[r(d,{variant:"text",style:{flex:"1",flexShrink:0}}),r(d,{variant:"text",style:{flex:"1"}}),r(d,{variant:"text",style:{flex:"1"}}),r(d,{variant:"text",style:{flex:"1"}})]}))]}),t)}))})):0===j.length?o("p",e({style:{color:"#6B7280",fontStyle:"italic",paddingLeft:"12px"}},{children:["No key characters found. ",r("button",e({style:c.retryButton,onClick:function(){return de({endpoint:"notable-characters",page:P,isbn:g,setData:F,setLoading:z,setHasMore:N,setTotalPage:K})}},{children:"Retry"}))]})):r(i,{children:r("div",e({style:c.charactersGrid},{children:j.map((function(i,a){var l=e(e({},c.avatar),{backgroundColor:i.bg,color:i.color}),s="key_character"===le.list&&le.index===a;return o("div",e({onMouseEnter:function(e){e.currentTarget.style.transform="translateY(-4px)",e.currentTarget.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 1px 4px rgba(0, 0, 0, 0.1)"},style:e(e({},c.characterCard),{borderColor:s?"rgb(83, 43, 237)":"#E5E7EB"}),onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:se({list:"key_character",index:a}),n.label=1;case 1:return n.trys.push([1,4,,5]),(null===(t=null==i?void 0:i.chunkIds)||void 0===t?void 0:t.length)>0?[4,p(i.name,"Key Characters",i.chunkIds,0)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[3,5];case 4:return e=n.sent(),console.error("Failed to highlight character:",e),[3,5];case 5:return[2]}}))}))}},{children:[r("div",e({style:l},{children:i.initials})),o("div",e({style:{display:"flex",flexDirection:"column"}},{children:[r("p",e({style:e(e({},c.charName),{margin:0})},{children:i.name})),r("p",e({style:e(e({},c.charDesc),{margin:0,marginTop:"4px"})},{children:i.description}))]}))]}),a)}))}))}),r("div",e({style:{display:"flex",justifyContent:"flex-end",width:"100%"}},{children:!H&&r(a,{count:A,disabled:I,page:P,onChange:function(e,t){return W(t)},shape:"rounded",style:{marginTop:"8px"}})}))]}))]})};export{u as default};
|
|
2
2
|
//# sourceMappingURL=BookElementsCard.js.map
|
|
@@ -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 u=function(u){var g=u.bookOverView,h=u.bookCoverImage,f=u.onClose,m=u.customStyle,x=u.quotesToHighLightData,
|
|
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 g=u.bookOverView,h=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=u.isBlurToggleVisible,S=void 0!==B&&B,I=u.noHtmlContent,T=void 0!==I&&I,j=i(!1),L=j[0],W=j[1],H=i(!0),P=H[0],F=H[1],z=!!x.textToHighLight&&!!x.content,D={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:"center",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(){F(!0),console.log(y,"citationLoad")}),[y]),t("div",e({style:e(e({},D.rightPanel),(null==m?void 0:m.rightPanel)||{})},{children:[t("div",e({style:D.header},{children:[t("div",e({style:D.headerLeft},{children:[(z||T)&&o("button",e({style:D.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:D.clickableElementCategory},{children:k}))]})),t("div",e({style:D.toggleBlurContainer},{children:[z&&S&&t("div",e({style:{display:"flex",alignItems:"center",gap:"2px"}},{children:[o(s,{checked:P,onChange:function(e){F(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:D.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({},D.previewWrapper),null==m?void 0:m.previewWrapper)},{children:z?o(a,{citationNumber:1,defaultState:!0,partialMatch:!0,citationTitle:"Sample Citation",title:"Sample Title",paragraphs:[null==x?void 0:x.content],textToHighlight:[null==x?void 0:x.textToHighLight],externalLinkComponent:"",bookCoverImage:h,customStyle:null==m?void 0:m.citationCustomStyle,isNonHighlightedBlur:w,toggleBlur:P}):y||T?t("div",e({style:D.loadingStyle},{children:[o("div",e({style:d.iconWrapper},{children:(null==C?void 0:C.icon)||c})),t("p",e({style:d.text},T?{children:["No data found matching the selected ",k.toLowerCase()]}:{children:["fetching ",k.toLowerCase(),"...."]}))]})):o("div",e({style:D.flexCenter},{children:o("div",e({style:e(e({},D.coverContainer),L||!h?e(e({},D.coverImagePreview),null==m?void 0:m.coverImagePreview):{})},{children:h&&!L?o("img",{onError:function(){return W(!0)},style:D.bookCoverStyle,src:h,alt:"Book Cover Image"}):o("div",e({style:D.bookCoverPlaceholder},{children:t("div",e({style:D.bookCoverInner},{children:[o("div",e({style:D.bookTitle},{children:(null==g?void 0:g.title)||"Unknown Title"})),o("div",e({style:D.bookAuthor},{children:(null==g?void 0:g.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 u,Panel as
|
|
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 u,Panel as g,PanelResizeHandle as p}from"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js";import m 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 w from"../../node_modules/@material-ui/core/esm/Typography/Typography.js";import B from"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js";import j from"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js";var S={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"}},D={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%"}},F=i("svg",e({style:D.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:D.wrapper},{children:r("div",e({style:D.inner},{children:[i("div",e({style:{marginBottom:"32px"}},{children:i("div",e({style:D.iconWrapper},{children:l||F}))})),r("div",{children:[i("h1",e({style:D.heading},{children:t})),i("p",e({style:D.text},{children:n}))]})]}))}))},I=function(D){var I=D.open,P=D.onClose,A=D.isNonHighlightedBlur,E=D.getHighlightContent,H=D.handleFetchManuscriptElements,L=D.data,_=D.showComingSoon,O=void 0!==_&&_,T=D.comingSoonData,W=void 0===T?{header:"Bookemon Coming Soon!!",subheader:"We're working on something amazing. Stay tuned for updates!",icon:F}:T,M=D.customStyle,N=void 0===M?{}:M,R=D.isBlurToggleVisible,V=void 0!==R&&R,Q=l({textToHighLight:"",content:""}),Y=Q[0],q=Q[1],G=l(1),J=G[0],K=G[1],U=l(!1),X=U[0],Z=U[1],$=l("Book Preview"),ee=$[0],oe=$[1],te=l(70),ie=te[0],re=te[1],ne=a(null),le=l(!1),ae=le[0],de=le[1],se=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,u,g,p,m,y,v;return t(this,(function(t){switch(t.label){case 0:q({textToHighLight:"",content:""}),de(!1),Z(!0),oe(i),t.label=1;case 1:return t.trys.push([1,6,7,8]),r&&0!==r.length?[4,E([r[n]])]:(console.warn("No chunk IDs provided."),Z(!1),re(70),ne.current&&ne.current.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return console.warn("No highlight content found."),Z(!1),de(!0),[2];for(d=(a=function(e){return e?e.replace(/[\u2018\u2019]/g,"'").replace(/[\u201C\u201D]/g,'"').replace(/[\u2013\u2014]/g,"-").replace(/[.,!?;:'"(){}\[\]—–…\/\\@#&*_|\^~%=+<>`]/g,"").replace(/\s+/g," ").trim().toLowerCase():""})(e),s=d.split(" ").filter(Boolean),c=null,h=s.length;h>0;h--){for(u=s.slice(0,h).join(" "),g=0,p=l;g<p.length;g++)if(m=p[g],a((null==m?void 0:m.normalizedContent)||(null==m?void 0:m.htmlContent)).includes(u)){c=m;break}if(c)break}return y=l.map((function(e){return e.htmlContent})).join("\n"),c?(q({textToHighLight:c.htmlContent,content:y}),oe(i),re(50),ne.current&&ne.current.resize(50),Z(!1),[3,5]):[3,3];case 3:return console.warn("No matching normalized content found for highlight text."),n+1>=r.length?(de(!0),Z(!1),[2]):[4,se(e,i,r,n+1)];case 4:t.sent(),t.label=5;case 5:return[3,8];case 6:return v=t.sent(),console.error("Error fetching highlight content:",v),de(!0),Z(!1),[3,8];case 7:return[7];case 8:return[2]}}))}))},ce=L.bookAwards,he=L.bookCopyRight,ue=L.bookDetails,ge=L.bookElements,pe=L.bookOverView,me=L.bookCoverImage,ye=null==ue?void 0:ue.isbn;return i(k,e({open:I,fullWidth:!0,PaperProps:{style:e(e({},null==S?void 0:S.dialogPaper),null==N?void 0:N.dialogDimension)}},{children:r(C,e({style:S.dialogContent},{children:[!O&&i("div",e({style:S.container},{children:r(u,e({direction:"horizontal"},{children:[i(g,e({order:1,ref:ne,defaultSize:ie||70},{children:r("div",e({style:e(e({},null==S?void 0:S.leftPanel),null==N?void 0:N.leftPanel)},{children:[i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({defaultExpanded:!0,elevation:0,style:S.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:S.accordionSummary},{children:i(w,e({style:S.heading},{children:"Book Overview"}))})),i(B,e({style:S.accordionDetails},{children:pe&&Object.keys(pe).length>0?i(y,{data:pe}):i("div",e({style:S.errorState},{children:"No overview data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:S.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:S.accordionSummary},{children:i(w,e({style:S.heading},{children:"Book Manuscript Elements"}))})),i(B,e({style:S.accordionDetails},{children:i(v,{data:ge,handleFetchManuscriptElements:H,BookIsbn:ye,updateQuotesToHighLight:se})}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:S.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:S.accordionSummary},{children:i(w,e({style:S.heading},{children:"Book Metadata Details"}))})),i(B,e({style:S.accordionDetails},{children:ue&&Object.keys(ue).length>0?i(m,{data:ue}):i("div",e({style:S.errorState},{children:"No Book Metadata data available."}))}))]}))})),i("div",e({style:{marginBottom:"24px"}},{children:r(d,e({elevation:0,style:S.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:S.accordionSummary},{children:i(w,e({style:S.heading},{children:"Copyrights & Marketing"}))})),i(B,e({style:S.accordionDetails},{children:he&&Object.keys(he).length>0?i(f,{data:he}):i("div",e({style:S.errorState},{children:"No Copyrights & Marketing data available."}))}))]}))})),i("div",{children:r(d,e({elevation:0,style:S.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:S.accordionSummary},{children:i(w,e({style:S.heading},{children:"People & Awards"}))})),i(B,e({style:S.accordionDetails},{children:ce&&Object.keys(ce).length>0?i(x,{data:ce}):i("div",e({style:S.errorState},{children:"No People & Awards data available."}))}))]}))})]}))})),i(p,{style:{width:"3px",background:"#D1D5DC",cursor:"col-resize"}}),i(g,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:pe,bookCoverImage:me,onClose:P,clickableElementCategory:ee,quotesToHighLightData:Y,updateQuotesToHighLight:se,citationLoad:X,previewPage:J,setPreviewPage:K,customStyle:N,comingSoonData:W,isNonHighlightedBlur:A,isBlurToggleVisible:V,noHtmlContent:ae})}))]}))})),O?r("div",e({style:S.blurOverlay},{children:[i(j,e({style:S.closeButton,onClick:P},{children:i(h,{})})),i(z,{header:W.header,subheader:W.subheader,icon:W.icon})]})):i(n,{})]}))}))};export{D as comingSoonStyles,I as default,F 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
|
|
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};
|
|
2
2
|
//# sourceMappingURL=CodeCitation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCitationTest.d.ts","sourceRoot":"","sources":["../../../src/CodeCitationTest.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB,+
|
|
1
|
+
{"version":3,"file":"CodeCitationTest.d.ts","sourceRoot":"","sources":["../../../src/CodeCitationTest.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,gBAAgB,+CAiFrB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookElementsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookElementsCard/BookElementsCard.tsx"],"names":[],"mappings":"AA6IA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAG,MAAM,EAAE,CAAC;IACpB,IAAI,EAAG,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,UAAU,EAAE,UAAU,EAAE,CAAC;CAC1B;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IACxB,uBAAuB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAC,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAM,EAAE,EAAE,YAAY,EAAG,MAAM,KAAK,IAAI,CAAC;IACnH,6BAA6B,EAAE,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,IAAI,GACL,EAAE;QACD,QAAQ,EAAE,GAAG,CAAC;QACd,IAAI,EAAE,GAAG,CAAC;QACV,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC;KACX,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,QAAQ,EAAG,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,gBAAgB,+EAKnB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"BookElementsCard.d.ts","sourceRoot":"","sources":["../../../../../../src/features/Bookemon/BookElementsCard/BookElementsCard.tsx"],"names":[],"mappings":"AA6IA,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK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eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;YACpC,eAAe,CAAC,EAAE,aAAa,CAAC;YAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;YACrC,eAAe,CAAC,EAAE,aAAa,CAAC;SACjC,CAAA;QACD,eAAe,CAAC,EAAE,aAAa,CAAA;QAC/B,SAAS,CAAC,EAAE,aAAa,CAAA;QACzB,UAAU,CAAC,EAAE,aAAa,CAAA;QAC1B,cAAc,CAAC,EAAE,aAAa,CAAA;QAC9B,iBAAiB,CAAC,EAAE,aAAa,CAAA;KAClC,CAAA;IACD,cAAc,CAAC,EAAE;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KACxB,CAAC;IACF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,EAAE,OAAO,CAAA;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAG,OAAO,CAAA;CACxB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmS3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,aAAa,EAAU,MAAM,OAAO,CAAC;AAuI/D,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"Bookemon.d.ts","sourceRoot":"","sources":["../../../../../src/features/Bookemon/Bookemon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,aAAa,EAAU,MAAM,OAAO,CAAC;AAuI/D,eAAO,MAAM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