@e-llm-studio/citation 0.0.229 → 0.0.231

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +1 -1
  2. package/dist/cjs/features/CognitiveCompare/CitationRenderer.js +1 -1
  3. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  4. package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  5. package/dist/cjs/features/CognitiveCompare/CognitivePopup.js +1 -1
  6. package/dist/cjs/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +2 -0
  7. package/dist/cjs/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js.map +1 -0
  8. package/dist/cjs/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +2 -0
  9. package/dist/cjs/features/CognitiveCompare/Guidelines/components/WebGptPanel.js.map +1 -0
  10. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/helper.js +2 -0
  11. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/helper.js.map +1 -0
  12. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +2 -0
  13. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js.map +1 -0
  14. package/dist/cjs/features/CognitiveCompare/MoreFunctionsPopup.js +1 -1
  15. package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
  16. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  17. package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  18. package/dist/cjs/features/CognitiveCompare/components/SvgConnectors.js +1 -1
  19. package/dist/cjs/features/CognitiveCompare/components/connectedLines.js +1 -1
  20. package/dist/cjs/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  21. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  22. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  23. package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
  24. package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
  25. package/dist/cjs/hooks/useOnDemandCitationFetch.js +1 -1
  26. package/dist/cjs/service/onDemandApi.js +1 -1
  27. package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
  28. package/dist/features/CognitiveCompare/CitationRenderer.js +1 -1
  29. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  30. package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  31. package/dist/features/CognitiveCompare/CognitivePopup.js +1 -1
  32. package/dist/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +2 -0
  33. package/dist/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js.map +1 -0
  34. package/dist/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +2 -0
  35. package/dist/features/CognitiveCompare/Guidelines/components/WebGptPanel.js.map +1 -0
  36. package/dist/features/CognitiveCompare/Guidelines/utils/helper.js +2 -0
  37. package/dist/features/CognitiveCompare/Guidelines/utils/helper.js.map +1 -0
  38. package/dist/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +2 -0
  39. package/dist/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js.map +1 -0
  40. package/dist/features/CognitiveCompare/MoreFunctionsPopup.js +1 -1
  41. package/dist/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
  42. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  43. package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  44. package/dist/features/CognitiveCompare/components/SvgConnectors.js +1 -1
  45. package/dist/features/CognitiveCompare/components/connectedLines.js +1 -1
  46. package/dist/features/CognitiveCompare/hooks/memoizedMarkdown.js +1 -1
  47. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  48. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  49. package/dist/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
  50. package/dist/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
  51. package/dist/hooks/useOnDemandCitationFetch.js +1 -1
  52. package/dist/service/onDemandApi.js +1 -1
  53. package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
  54. package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts +3 -0
  55. package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
  56. package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts +3 -1
  57. package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts.map +1 -1
  58. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +1 -1
  59. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  60. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +19 -0
  61. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  62. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +21 -3
  63. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
  64. package/dist/types/src/features/CognitiveCompare/CognitivePopup.d.ts.map +1 -1
  65. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts +5 -1
  66. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts.map +1 -1
  67. package/dist/types/src/features/CognitiveCompare/Guidelines/components/GuidelinePanel.d.ts +3 -0
  68. package/dist/types/src/features/CognitiveCompare/Guidelines/components/GuidelinePanel.d.ts.map +1 -0
  69. package/dist/types/src/features/CognitiveCompare/Guidelines/components/WebGptPanel.d.ts +8 -0
  70. package/dist/types/src/features/CognitiveCompare/Guidelines/components/WebGptPanel.d.ts.map +1 -0
  71. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts +2001 -0
  72. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts.map +1 -0
  73. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/helper.d.ts +11 -0
  74. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/helper.d.ts.map +1 -0
  75. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts +6 -0
  76. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts.map +1 -0
  77. package/dist/types/src/features/CognitiveCompare/MoreFunctionsPopup.d.ts +2 -0
  78. package/dist/types/src/features/CognitiveCompare/MoreFunctionsPopup.d.ts.map +1 -1
  79. package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts.map +1 -1
  80. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  81. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts +1 -0
  82. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
  83. package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts +2 -1
  84. package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts.map +1 -1
  85. package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts +1 -0
  86. package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts.map +1 -1
  87. package/dist/types/src/features/CognitiveCompare/hooks/memoizedMarkdown.d.ts.map +1 -1
  88. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts +2 -1
  89. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  90. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +1 -0
  91. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
  92. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts +1 -1
  93. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
  94. package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts +1 -1
  95. package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts.map +1 -1
  96. package/dist/types/src/service/onDemandApi.d.ts.map +1 -1
  97. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{useState as t,useRef as e,useCallback as n,useEffect as i}from"react";import{DEVIATION_BADGE_SEPARATOR as r,hasValue as c,getBentArrowPath as o}from"../CognitiveComparehelpers.js";var l=function(l){var u=l.containerRef,a=l.leftContainerRef,d=l.rightContainerRef;l.svgContainerRef;var v=l.pathRefs,s=l.leftHeaderRef,h=l.rightHeaderRef,g=l.proposedSections,f=l.existingSections,p=l.visibleFields,y=l.leftRefs,x=l.rightRefs,m=l.sectionLeftRefs,R=l.sectionRightRefs,C=l.subSectionLeftRefs,b=l.subSectionRightRefs,B=l.lhsBadgeRefs,S=l.rhsBadgeRefs,M=l.sectionRowRefs,L=l.expandedSections,T=l.expandedSubSections,I=l.connectedSections,H=l.isSideBySide,A=l.activeSideBySideSection,E=l.maintainRelativeOrder,D=l.cognitiveMap,k=l.getSectionCompareStyle,Y=l.getSubSectionCompareStyle,w=l.getDeviationStyleByKey,N=l.isArrowVisible,O=l.isAnimatingRef,j=l.isSideBySideRef,F=l.sideBySideCacheRef,P=l.sideBySideLineRef,z=l.activeSideBySideSectionRef,K=l.activeSideBySideRightSectionRef,q=l.connectedLines,V=l.setConnectedLines,G=l.cachedConnectedPositions,J=l.calculateLinesRef,Q=l.resizeTimerRef,U=l.scrollLock,W=l.scrollSyncLocked,X=l.handleResizeRef,Z=l.activeProposed,$=l.existingRule,_=l.analysisData,tt=l.pendingScrollTargetRef,et=l.pendingScrollCallbackRef,nt=l.resolvedComparisonConfig,it=l.getFieldData,rt=t([]),ct=rt[0],ot=rt[1],lt=t(null),ut=lt[0],at=lt[1],dt=t([]),vt=dt[0],st=dt[1],ht=null!=q?q:vt,gt=null!=V?V:st,ft=t({width:0,height:0}),pt=ft[0],yt=ft[1],xt=e(!1),mt=e(!1),Rt=e(!1),Ct=e(null),bt=e([]),Bt=null!=G?G:bt,St=n(function(){var t,e,n,i,l,v,M,N,j,F,P,z,K,q,V,G,J,Q,U,W,X,Z,$;if(!xt.current&&!O.current){xt.current=!0;try{if(!u.current)return;var _=function(t){var e=t.split("-"),n=e[0];if(!L[n]&&!1===E)return!1;if(E&&!L["left-".concat(n)]&&!L["right-".concat(n)]&&!L[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!T[i])return!1;return!0},tt=u.current.getBoundingClientRect();yt({width:tt.width,height:tt.height});var et=[];if(p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;r&&c&&(r.style.height="auto",c.style.height="auto",r.style.minHeight="0px",c.style.minHeight="0px")}),!O.current){for(var nt=0;nt<Math.max(g.length,f.length);nt++){var it=null===(t=m.current[nt])||void 0===t?void 0:t.current,rt=null===(e=R.current[nt])||void 0===e?void 0:e.current;it&&(it.style.height="auto",it.style.minHeight="0px"),rt&&(rt.style.height="auto",rt.style.minHeight="0px")}E||Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;i&&r&&(i.style.height="auto",r.style.height="auto",i.style.minHeight="0px",r.style.minHeight="0px")}})}var ct={};p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;if(r&&c){var o=r.getBoundingClientRect(),l=c.getBoundingClientRect();ct[i]=Math.max(o.height,l.height)}});var lt={left:{},right:{}},ut={};if(!O.current)if(E){if(H&&null!==A)if("number"==typeof A){var dt=A,vt=g[dt],st=null===(l=m.current[dt])||void 0===l?void 0:l.current;st&&vt&&(vt.refIndexes||[]).forEach(function(t){var e,n=f.findIndex(function(e){return e.selfIndex===t}),i=null===(e=R.current[n])||void 0===e?void 0:e.current;if(i&&(L["left-".concat(dt)]||L["right-".concat(n)])){var r=Math.max(st.getBoundingClientRect().height,i.getBoundingClientRect().height);lt.left[dt]=Math.max(lt.left[dt]||0,r),lt.right[n]=Math.max(lt.right[n]||0,r)}})}else{var ht=A.split(r)[2];if(ht){it=null===(v=C.current[ht])||void 0===v?void 0:v.current,rt=null===(M=b.current[ht])||void 0===M?void 0:M.current;if(it&&rt){ft=Math.max(it.getBoundingClientRect().height,rt.getBoundingClientRect().height);ut[ht]=Math.max(ut[ht]||0,ft)}}}}else{Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;if(i&&r&&null!==i.offsetParent&&null!==r.offsetParent){var c=i.getBoundingClientRect(),o=r.getBoundingClientRect(),l=Math.max(c.height,o.height);ut[t]=l,i.style.minHeight="".concat(l,"px"),r.style.minHeight="".concat(l,"px")}}});for(nt=0;nt<Math.min(g.length,f.length);nt++){var it=null===(n=m.current[nt])||void 0===n?void 0:n.current,rt=null===(i=R.current[nt])||void 0===i?void 0:i.current;if(it&&rt){var ft=Math.max(it.getBoundingClientRect().height,rt.getBoundingClientRect().height);lt.left[nt]=ft,lt.right[nt]=ft}}}if(p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;if(r&&c){var o=ct[i];r.style.minHeight="".concat(o,"px"),c.style.minHeight="".concat(o,"px")}}),O.current||(Object.entries(lt.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=m.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),Object.entries(lt.right).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=R.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),E||Object.keys(ut).forEach(function(t){var e,n,i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;if(i&&r&&ut[t]){var c=ut[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),E)g.forEach(function(t,e){var n;(null===(n=m.current[e])||void 0===n?void 0:n.current)&&(t.refIndexes||[]).forEach(function(t){var n,i,r,c,o,l,u,v,s,h,g=f.findIndex(function(e){return e.selfIndex===t});if(-1!==g){var p=null===(n=B.current[e])||void 0===n?void 0:n.current,y=null===(i=S.current[g])||void 0===i?void 0:i.current;if(p&&y){var x=p.getBoundingClientRect(),m=y.getBoundingClientRect(),R=x.right-tt.left,C=m.left-tt.left,b=x.top+x.height/2-tt.top,M=m.top+m.height/2-tt.top;if(H&&A===e){var L=null!==(c=null===(r=a.current)||void 0===r?void 0:r.getBoundingClientRect().top)&&void 0!==c?c:0,T=null!==(l=null===(o=d.current)||void 0===o?void 0:o.getBoundingClientRect().top)&&void 0!==l?l:0,I=L+(null!==(v=null===(u=a.current)||void 0===u?void 0:u.clientHeight)&&void 0!==v?v:1/0),E=T+(null!==(h=null===(s=d.current)||void 0===s?void 0:s.clientHeight)&&void 0!==h?h:1/0),D=x.top+x.height/2,Y=m.top+m.height/2,w=function(t,e,n){return Math.max(e,Math.min(n,t))};b=w(D,L,I)-tt.top,M=w(Y,T,E)-tt.top}var N=k(e);N&&et.push({id:"line-".concat(e,"-").concat(g),x1:R,y1:b,x2:C,y2:M,style:N,sectionIdx:e,targetRightIdx:g})}}})});else{for(nt=0;nt<Math.min(g.length,f.length);nt++){var pt=null===(N=m.current[nt])||void 0===N?void 0:N.current,mt=null===(j=R.current[nt])||void 0===j?void 0:j.current;if(pt&&mt){var Rt=pt.getBoundingClientRect(),Ct=mt.getBoundingClientRect(),bt=Math.max(Rt.top,Ct.top)+18-tt.top,St=(null===(F=f[nt])||void 0===F?void 0:F.id)||"sec-".concat(nt);(Dt=k(nt))&&et.push({id:St,x1:Rt.right-tt.left,y1:bt,x2:Ct.left-tt.left,y2:bt,style:Dt,sectionIdx:nt,hasCognitive:!!((null===(P=g[nt])||void 0===P?void 0:P.cognitiveData)||(null===(z=f[nt])||void 0===z?void 0:z.cognitiveData)||St&&D[St]),isSubSection:!1})}}Object.keys(C.current).forEach(function(t){var e,n,i,r,o,l;if(_(t)){var u=null===(e=C.current[t])||void 0===e?void 0:e.current,a=null===(n=b.current[t])||void 0===n?void 0:n.current;if(u&&a){for(var d=t.split("-").map(Number),v=g[d[0]],s=f[d[0]],h=1;h<d.length;h++)(null==v?void 0:v.subsections)&&(v=v.subsections[d[h]]),(null==s?void 0:s.subsections)&&(s=s.subsections[d[h]]);var p=!!v&&((null===(i=v.displayTitle)||void 0===i||i)&&c(v.title)),y=!!v&&((null===(r=v.displayContent)||void 0===r||r)&&c(v.content)),x=!!s&&((null===(o=s.displayTitle)||void 0===o||o)&&c(s.title)),m=!!s&&((null===(l=s.displayContent)||void 0===l||l)&&c(s.content));if(p&&y||x&&m){var R=u.getBoundingClientRect(),B=a.getBoundingClientRect(),S=Math.max(R.top,B.top)+16-tt.top,M=Y(t);M&&"Not Defined"!==M.label&&et.push({id:"subsec-".concat(t),x1:R.right-tt.left,y1:S,x2:B.left-tt.left,y2:S,style:M,sectionIdx:d[0],isSubSection:!0,subSectionKeyPath:t,hasCognitive:!(!(null==v?void 0:v.cognitiveData)&&!(null==s?void 0:s.cognitiveData))})}}}})}if(H&&"string"==typeof A&&A.includes(r)){var Mt=A.split(r),Lt=Mt[0],Tt=Mt[1],It=Mt[2],Ht=(Mt[3],"".concat(Lt).concat(r).concat(Tt)),At=null===(K=B.current[Ht])||void 0===K?void 0:K.current,Et=null===(q=S.current[Ht])||void 0===q?void 0:q.current;if(At&&Et){var Dt,kt=At.getBoundingClientRect(),Yt=Et.getBoundingClientRect(),wt=kt.right-tt.left,Nt=Yt.left-tt.left,Ot=kt.top+kt.height/2-tt.top,jt=Yt.top+Yt.height/2-tt.top;if(E){var Ft=null!==(G=null===(V=a.current)||void 0===V?void 0:V.getBoundingClientRect().top)&&void 0!==G?G:0,Pt=null!==(Q=null===(J=d.current)||void 0===J?void 0:J.getBoundingClientRect().top)&&void 0!==Q?Q:0,zt=Ft+(null!==(W=null===(U=a.current)||void 0===U?void 0:U.clientHeight)&&void 0!==W?W:1/0),Kt=Pt+(null!==(Z=null===(X=d.current)||void 0===X?void 0:X.clientHeight)&&void 0!==Z?Z:1/0),qt=function(t,e,n){return Math.max(e,Math.min(n,t))};Ot=qt(kt.top+kt.height/2,Ft,zt)-tt.top,jt=qt(Yt.top+Yt.height/2,Pt,Kt)-tt.top}(Dt=null!==($=w(Lt,Tt))&&void 0!==$?$:Y(It))&&et.push({id:"line-subsec-".concat(Ht),x1:wt,y1:Ot,x2:Nt,y2:jt,style:Dt,sectionIdx:Number(It.split("-")[0]),isSubSection:!0,subSectionKeyPath:A})}}if(ot(et),s.current&&h.current){var Vt=s.current.getBoundingClientRect(),Gt=h.current.getBoundingClientRect(),Jt=(Vt.top+Vt.height/2-tt.top+Gt.top+Gt.height/2-tt.top)/2;at({x1:Vt.right-tt.left,x2:Gt.left-tt.left,y:Jt})}else at(null);if(I.size>0){var Qt=[],Ut=a.current,Wt=d.current;if(Ut&&Wt){var Xt=[],Zt=Ut.getBoundingClientRect().top,$t=Wt.getBoundingClientRect().top,_t=Zt+Ut.clientHeight,te=$t+Wt.clientHeight,ee=Ut.scrollTop,ne=Wt.scrollTop,ie=tt.top,re=function(t,e,n){return Math.max(e,Math.min(n,t))};I.forEach(function(t){var e,n,i,c,l,u;if("string"==typeof t&&t.includes(r)){var a=t.split(r),d=a[0],v=a[1],s=a[2],h=(a[3],"".concat(d).concat(r).concat(v)),p=null===(e=B.current[h])||void 0===e?void 0:e.current,y=null===(n=S.current[h])||void 0===n?void 0:n.current;if(!p||!y)return;var x=p.getBoundingClientRect(),m=y.getBoundingClientRect(),R=null!==(i=w(d,v))&&void 0!==i?i:Y(s),C=(q=x.right-tt.left)+.5*((V=m.left-tt.left-0)-q),b=x.top+x.height/2,M=m.top+m.height/2,L=b-Zt+ee,T=M-$t+ne,I="conn-subsec-".concat(h);Xt.push({lhsScrollY:L,rhsScrollY:T,x1:q,x2:V,containerTop:ie,leftIdx:t,rhsArrayIdx:t,styleColor:(null==R?void 0:R.badgeBorder)||"#6366F1",styleId:I});var H=re(b,Zt,_t),A=re(M,$t,te),D=H-ie,N=A-ie,O=M>=$t-4&&M<=te+4,j="";j=(G=b>=Zt-4&&b<=_t+4)&&O?o(q,D,V,N):G&&!O?"M ".concat(q,",").concat(D," L ").concat(C,",").concat(D," L ").concat(C,",").concat(N):!G&&O?"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N," L ").concat(V,",").concat(N):"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N),Qt.push({id:I,pathD:j,style:R,leftIdx:t,rhsArrayIdx:t,x1:q,x2:V,y1:D,y2:N})}else if(E){var F=t,P=g[F];if(!(null===(u=null==P?void 0:P.refIndexes)||void 0===u?void 0:u.length))return;P.refIndexes.forEach(function(t){var e,n,i=f.findIndex(function(e){return e.selfIndex===t});if(-1!==i){var r=null===(e=B.current[F])||void 0===e?void 0:e.current,c=null===(n=S.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=r.getBoundingClientRect(),u=c.getBoundingClientRect(),a=k(F),d=l.right-tt.left,v=u.left-tt.left-0,s=d+.5*(v-d),h=l.top+l.height/2,g=u.top+u.height/2,p=h-Zt+ee,y=g-$t+ne,x="conn-".concat(F,"-").concat(i);Xt.push({lhsScrollY:p,rhsScrollY:y,x1:d,x2:v,containerTop:ie,leftIdx:F,rhsArrayIdx:i,styleColor:(null==a?void 0:a.badgeBorder)||"#6366F1",styleId:x});var m=re(h,Zt,_t),R=re(g,$t,te),C=m-ie,b=R-ie,M=h>=Zt-4&&h<=_t+4,L=g>=$t-4&&g<=te+4,T="";T=M&&L?o(d,C,v,b):M&&!L?"M ".concat(d,",").concat(C," L ").concat(s,",").concat(C," L ").concat(s,",").concat(b):!M&&L?"M ".concat(s,",").concat(C," L ").concat(s,",").concat(b," L ").concat(v,",").concat(b):"M ".concat(s,",").concat(C," L ").concat(s,",").concat(b),Qt.push({id:x,pathD:T,style:a,leftIdx:F,rhsArrayIdx:i,x1:d,x2:v,y1:C,y2:b})}}})}else{var z=t,K=z;p=null===(c=B.current[z])||void 0===c?void 0:c.current,y=null===(l=S.current[K])||void 0===l?void 0:l.current;if(!p||!y)return;var q,V;x=p.getBoundingClientRect(),m=y.getBoundingClientRect(),R=k(z),C=(q=x.right-tt.left)+.5*((V=m.left-tt.left-0)-q),b=x.top+x.height/2,M=m.top+m.height/2,L=b-Zt+ee,T=M-$t+ne,I="conn-".concat(z,"-").concat(K);Xt.push({lhsScrollY:L,rhsScrollY:T,x1:q,x2:V,containerTop:ie,leftIdx:z,rhsArrayIdx:K,styleColor:(null==R?void 0:R.badgeBorder)||"#6366F1",styleId:I});var G;H=re(b,Zt,_t),A=re(M,$t,te),D=H-ie,N=A-ie,O=M>=$t-4&&M<=te+4,j="";j=(G=b>=Zt-4&&b<=_t+4)&&O?o(q,D,V,N):G&&!O?"M ".concat(q,",").concat(D," L ").concat(C,",").concat(D," L ").concat(C,",").concat(N):!G&&O?"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N," L ").concat(V,",").concat(N):"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N),Qt.push({id:I,pathD:j,style:R,leftIdx:z,rhsArrayIdx:K,x1:q,x2:V,y1:D,y2:N})}}),Bt.current=Xt}gt(Qt)}else gt([]),Bt.current=[]}catch(t){console.error("Line render safe fail: ",t)}finally{xt.current=!1}}},[p,g,f,D,nt,it,k,w,E,H,A,I,L,T]),Mt=n(function(){var t,e,n,i,r,c,l,s,h,g,f,p,y,x,m=Bt.current;if(m.length&&!O.current){var R=null!==(e=null===(t=a.current)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0,C=null!==(i=null===(n=d.current)||void 0===n?void 0:n.scrollTop)&&void 0!==i?i:0,b=null!==(c=null===(r=a.current)||void 0===r?void 0:r.clientHeight)&&void 0!==c?c:1/0,B=null!==(s=null===(l=d.current)||void 0===l?void 0:l.clientHeight)&&void 0!==s?s:1/0,S=null!==(g=null===(h=a.current)||void 0===h?void 0:h.getBoundingClientRect().top)&&void 0!==g?g:0,M=null!==(p=null===(f=d.current)||void 0===f?void 0:f.getBoundingClientRect().top)&&void 0!==p?p:0,L=S+b,T=M+B,I=null!==(x=null===(y=u.current)||void 0===y?void 0:y.getBoundingClientRect().top)&&void 0!==x?x:0,H=function(t,e,n){return Math.max(e,Math.min(n,t))};m.forEach(function(t){var e=t.lhsScrollY-R+S,n=t.rhsScrollY-C+M,i=v.current[t.styleId+"-stroke"],r=v.current[t.styleId+"-bg"],c=v.current[t.styleId+"-btn"];if(i||r){var l,u=H(e,S,L),a=H(n,M,T),d=u-I,s=a-I,h=e>=S-4&&e<=L+4,g=n>=M-4&&n<=T+4,f=t.x1+.5*(t.x2-t.x1);l=h&&g?o(t.x1,d,t.x2,s):h&&!g?"M ".concat(t.x1,",").concat(d," L ").concat(f,",").concat(d," L ").concat(f,",").concat(s):!h&&g?"M ".concat(f,",").concat(d," L ").concat(f,",").concat(s," L ").concat(t.x2,",").concat(s):"M ".concat(f,",").concat(d," L ").concat(f,",").concat(s),i&&(i.setAttribute("visibility","visible"),i.setAttribute("d",l)),r&&(r.setAttribute("visibility","visible"),r.setAttribute("d",l)),c&&(h?(c.setAttribute("visibility","visible"),c.setAttribute("y",String(d-12))):c.setAttribute("visibility","hidden"))}})}},[]),Lt=n(function(){Bt.current.length>0&&!O.current||(null!==Ct.current&&clearTimeout(Ct.current),Ct.current=setTimeout(function(){J.current(),Ct.current=null},50))},[]),Tt=n(function(t){if(null!==tt.current&&et.current&&Math.abs(t.currentTarget.scrollTop-tt.current)<=2){var e=et.current;tt.current=null,et.current=null,e()}if(!Rt.current&&!U.current){if(E&&W&&(j.current||I.size>0)){var n=t.currentTarget,i=a.current,c=d.current,o=n===i?c:n===c?i:null;if(n&&o){var l=function(){var t,e,n,i,c,o,l,u,a,d,v,s=z.current,h=K.current;if(null===s)return{leftAnchor:null,rightAnchor:null};if("string"==typeof s&&s.includes(r)){var g=s.split(r),f="".concat(g[0]).concat(r).concat(g[1]);return{leftAnchor:(null===(t=B.current[f])||void 0===t?void 0:t.current)||(null===(e=C.current[g[2]])||void 0===e?void 0:e.current)||(null===(n=m.current[Number(g[2])])||void 0===n?void 0:n.current)||null,rightAnchor:(null===(i=S.current[f])||void 0===i?void 0:i.current)||(null===(c=b.current[g[3]])||void 0===c?void 0:c.current)||(null===(o=R.current[Number(g[3])])||void 0===o?void 0:o.current)||null}}var p=Number(s),y=null!==h?Number(h):p;return{leftAnchor:(null===(l=B.current[p])||void 0===l?void 0:l.current)||(null===(u=M.current[p])||void 0===u?void 0:u.current)||(null===(a=m.current[p])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=S.current[y])||void 0===d?void 0:d.current)||(null===(v=R.current[y])||void 0===v?void 0:v.current)||null}}(),v=l.leftAnchor,s=l.rightAnchor,h=n===i?v:s,g=n===i?s:v,f=null;if(h&&g){var p=h.getBoundingClientRect(),y=g.getBoundingClientRect(),x=o.getBoundingClientRect(),L=p.top+p.height/2;f=y.top-x.top+o.scrollTop+y.height/2-(L-x.top)}else{var T=Math.max(0,n.scrollHeight-n.clientHeight),H=Math.max(0,o.scrollHeight-o.clientHeight);f=T>0?n.scrollTop/T*H:n.scrollTop}var A=Math.max(0,o.scrollHeight-o.clientHeight);f=Math.max(0,Math.min(f,A)),Math.abs(o.scrollTop-f)>1&&(Rt.current=!0,o.scrollTop=f,requestAnimationFrame(function(){Rt.current=!1}))}}E||Lt(),mt.current||(mt.current=!0,requestAnimationFrame(function(){var t,e,n,i,c,o,l;if(j.current){var v=a.current,s=d.current;if(v&&s&&P.current){if(!F.current){var h=z.current,g=void 0;if("string"==typeof h&&h.includes(r)){var f=h.split(r),p="".concat(f[0]).concat(r).concat(f[1]);g=null===(t=B.current[p])||void 0===t?void 0:t.current}else g=null===(e=B.current[h])||void 0===e?void 0:e.current;if(g){var y=g.getBoundingClientRect();F.current={badgeScreenY:y.top+y.height/2,initialScrollTop:v.scrollTop,leftTop:v.getBoundingClientRect().top,leftBottom:v.getBoundingClientRect().top+v.clientHeight,cTop:null!==(i=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect().top)&&void 0!==i?i:0}}}if(F.current){var x=F.current,m=v.scrollTop-x.initialScrollTop,R=x.badgeScreenY-m,C=((c=R,o=x.leftTop,l=x.leftBottom,Math.max(o,Math.min(l,c)))-x.cTop).toString(),b=R>=x.leftTop-4&&R<=x.leftBottom+4;P.current.setAttribute("y1",C),P.current.setAttribute("y2",C),P.current.setAttribute("visibility",b?"visible":"hidden")}}}Bt.current.length>0&&Mt(),mt.current=!1}))}},[Mt,E,W,I,Lt]);return i(function(){J.current=St},[St]),i(function(){var t=setTimeout(Lt,250),e=function(){return X.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==Ct.current&&clearTimeout(Ct.current),null!==Q.current&&clearTimeout(Q.current),window.removeEventListener("resize",e)}},[Z,$,_,p,L,T,g,f,nt,Lt,H,A,N,I]),{lines:ct,setLines:ot,overallConnector:ut,setOverallConnector:at,connectedLines:ht,setConnectedLines:gt,svgDimensions:pt,cachedConnectedPositions:Bt,calculateLines:St,calculateLinesRef:J,calculateLinesDebounced:Lt,handleColumnScroll:Tt}};export{l as useLinesCalculator};
1
+ import{useState as t,useRef as e,useCallback as n,useEffect as i}from"react";import{DEVIATION_BADGE_SEPARATOR as r}from"../CognitiveComparehelpers.js";var c=function(c){var l=c.containerRef,o=c.leftContainerRef,u=c.rightContainerRef;c.svgContainerRef;var a=c.pathRefs,d=c.leftHeaderRef,s=c.rightHeaderRef,v=c.proposedSections,h=c.existingSections,g=c.visibleFields,f=c.leftRefs,p=c.rightRefs,b=c.sectionLeftRefs,y=c.sectionRightRefs,x=c.subSectionLeftRefs,m=c.subSectionRightRefs,R=c.lhsBadgeRefs,C=c.rhsBadgeRefs,A=c.sectionRowRefs,B=c.expandedSections,S=c.expandedSubSections,M=c.connectedSections,T=c.isSideBySide,I=c.activeSideBySideSection,L=c.maintainRelativeOrder,F=c.isGuidelineMode,H=c.cognitiveMap,w=c.getSectionCompareStyle,k=c.getSubSectionCompareStyle,E=c.getDeviationStyleByKey,N=c.isArrowVisible,Y=c.isAnimatingRef,D=c.isSideBySideRef,j=c.sideBySideCacheRef,O=c.sideBySideLineRef,z=c.activeSideBySideSectionRef,P=c.activeSideBySideRightSectionRef,Q=c.connectedLines,X=c.setConnectedLines,q=c.cachedConnectedPositions,G=c.calculateLinesRef,K=c.resizeTimerRef,V=c.scrollLock,J=c.scrollSyncLocked,U=c.handleResizeRef,W=c.activeProposed,Z=c.existingRule,$=c.analysisData,_=c.pendingScrollTargetRef,tt=c.pendingScrollCallbackRef,et=c.resolvedComparisonConfig,nt=c.getFieldData,it=t([]),rt=it[0],ct=it[1],lt=t(null),ot=lt[0],ut=lt[1],at=t([]),dt=at[0],st=at[1],vt=null!=Q?Q:dt,ht=null!=X?X:st,gt=t({width:0,height:0}),ft=gt[0],pt=gt[1],bt=e(!1),yt=e(!1),xt=e(!1),mt=e(null),Rt=e([]),Ct=null!=q?q:Rt,At=function(t,e,n,i,r,c,l){if(Math.abs(i-e)<=1)return c&&l?"M ".concat(t,",").concat(e," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r,",").concat(e):!c&&l?"M ".concat(r,",").concat(e," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i);var o=Math.min(15,Math.abs(r-t),Math.abs(i-e)/2),u=Math.min(15,Math.abs(n-r),Math.abs(i-e)/2),a=i>e?o:-o,d=i>e?u:-u,s=n>r?u:-u;return c&&l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i):!c&&l?"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i)},Bt=n(function(){var t,e,n,i,c,a,A,N,D,j,O,z,P,Q,X,q,G,K;if(!bt.current&&!Y.current){bt.current=!0;try{if(!l.current)return;var V=function(t){var e=t.split("-"),n=e[0];if(!B[n]&&!1===L)return!1;if(L&&!B["left-".concat(n)]&&!B["right-".concat(n)]&&!B[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!S[i])return!1;return!0},J=l.current.getBoundingClientRect();pt({width:J.width,height:J.height});var U=[];if(g.forEach(function(t){var e,n,i=t.key,r=null===(e=f.current[i])||void 0===e?void 0:e.current,c=null===(n=p.current[i])||void 0===n?void 0:n.current;r&&c&&(r.style.height="auto",c.style.height="auto",r.style.minHeight="0px",c.style.minHeight="0px")}),!Y.current){for(var W=0;W<Math.max(v.length,h.length);W++){var Z=null===(t=b.current[W])||void 0===t?void 0:t.current,$=null===(e=y.current[W])||void 0===e?void 0:e.current;Z&&(Z.style.height="auto",Z.style.minHeight="0px"),$&&($.style.height="auto",$.style.minHeight="0px")}L||Object.keys(x.current).forEach(function(t){var e,n;if(V(t)){var i=null===(e=x.current[t])||void 0===e?void 0:e.current,r=null===(n=m.current[t])||void 0===n?void 0:n.current;i&&r&&(i.style.height="auto",r.style.height="auto",i.style.minHeight="0px",r.style.minHeight="0px")}})}var _={};g.forEach(function(t){var e,n,i=t.key,r=null===(e=f.current[i])||void 0===e?void 0:e.current,c=null===(n=p.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=r.getBoundingClientRect(),o=c.getBoundingClientRect();_[i]=Math.max(l.height,o.height)}});var tt={left:{},right:{}},et={};if(!Y.current)if(L){if(T&&null!==I)if("number"==typeof I){var nt=I,it=v[nt],rt=null===(c=b.current[nt])||void 0===c?void 0:c.current;rt&&it&&(it.refIndexes||[]).forEach(function(t){var e,n=h.findIndex(function(e){return e.selfIndex===t}),i=null===(e=y.current[n])||void 0===e?void 0:e.current;if(i&&(B["left-".concat(nt)]||B["right-".concat(n)])){var r=Math.max(rt.getBoundingClientRect().height,i.getBoundingClientRect().height);tt.left[nt]=Math.max(tt.left[nt]||0,r),tt.right[n]=Math.max(tt.right[n]||0,r)}})}else{var lt=I.split(r)[2];if(lt){Z=null===(a=x.current[lt])||void 0===a?void 0:a.current,$=null===(A=m.current[lt])||void 0===A?void 0:A.current;if(Z&&$){ot=Math.max(Z.getBoundingClientRect().height,$.getBoundingClientRect().height);et[lt]=Math.max(et[lt]||0,ot)}}}}else{Object.keys(x.current).forEach(function(t){var e,n;if(V(t)){var i=null===(e=x.current[t])||void 0===e?void 0:e.current,r=null===(n=m.current[t])||void 0===n?void 0:n.current;if(i&&r&&null!==i.offsetParent&&null!==r.offsetParent){var c=i.getBoundingClientRect(),l=r.getBoundingClientRect(),o=Math.max(c.height,l.height);et[t]=o,i.style.minHeight="".concat(o,"px"),r.style.minHeight="".concat(o,"px")}}});for(W=0;W<Math.min(v.length,h.length);W++){var Z=null===(n=b.current[W])||void 0===n?void 0:n.current,$=null===(i=y.current[W])||void 0===i?void 0:i.current;if(Z&&$){var ot=Math.max(Z.getBoundingClientRect().height,$.getBoundingClientRect().height);tt.left[W]=ot,tt.right[W]=ot}}}if(g.forEach(function(t){var e,n,i=t.key,r=null===(e=f.current[i])||void 0===e?void 0:e.current,c=null===(n=p.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=_[i];r.style.minHeight="".concat(l,"px"),c.style.minHeight="".concat(l,"px")}}),Y.current||(Object.entries(tt.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=b.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),Object.entries(tt.right).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=y.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),L||Object.keys(et).forEach(function(t){var e,n,i=null===(e=x.current[t])||void 0===e?void 0:e.current,r=null===(n=m.current[t])||void 0===n?void 0:n.current;if(i&&r&&et[t]){var c=et[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),!F){v.forEach(function(t,e){var n,i=null===(n=b.current[e])||void 0===n?void 0:n.current;if(i){var r=function(t,e){var n=(t.refIndexes||[]).map(function(t){return h.findIndex(function(e){return e.selfIndex===t})}).filter(function(t){return-1!==t});return!n.length&&h[e]?[e]:Array.from(new Set(n))}(t,e);r.forEach(function(n){var r,c,l,a,d,s,v,g,f,p,b=null===(r=y.current[n])||void 0===r?void 0:r.current;if(b){var x=i.getBoundingClientRect(),m=b.getBoundingClientRect(),R=x.right-J.left,C=m.left-J.left,A=x.top+18-J.top,B=m.top+18-J.top;if(L&&T&&I===e){var S=null!==(l=null===(c=o.current)||void 0===c?void 0:c.getBoundingClientRect().top)&&void 0!==l?l:0,M=null!==(d=null===(a=u.current)||void 0===a?void 0:a.getBoundingClientRect().top)&&void 0!==d?d:0,F=S+(null!==(v=null===(s=o.current)||void 0===s?void 0:s.clientHeight)&&void 0!==v?v:1/0),k=M+(null!==(f=null===(g=u.current)||void 0===g?void 0:g.clientHeight)&&void 0!==f?f:1/0),E=function(t,e,n){return Math.max(e,Math.min(n,t))};A=E(x.top+18,S,F)-J.top,B=E(m.top+18,M,k)-J.top}var N=w(e);N&&U.push({id:"line-".concat(e,"-").concat(n),x1:R,y1:A,x2:C,y2:B,style:N,sectionIdx:e,targetRightIdx:n,isSubSection:!1,hasCognitive:!!((null==t?void 0:t.cognitiveData)||(null===(p=h[n])||void 0===p?void 0:p.cognitiveData)||(null==t?void 0:t.nodeId)&&H[t.nodeId])})}})}})}if(!F&&T&&"string"==typeof I&&I.includes(r)){var at=I.split(r),dt=at[0],st=at[1],vt=at[2],gt=(at[3],"".concat(dt).concat(r).concat(st)),ft=null===(N=R.current[gt])||void 0===N?void 0:N.current,yt=null===(D=C.current[gt])||void 0===D?void 0:D.current;if(ft&&yt){var xt=ft.getBoundingClientRect(),mt=yt.getBoundingClientRect(),Rt=xt.right-J.left,Bt=mt.left-J.left,Mt=xt.top+xt.height/2-J.top,Tt=mt.top+mt.height/2-J.top;if(L){var It=null!==(O=null===(j=o.current)||void 0===j?void 0:j.getBoundingClientRect().top)&&void 0!==O?O:0,Lt=null!==(P=null===(z=u.current)||void 0===z?void 0:z.getBoundingClientRect().top)&&void 0!==P?P:0,Ft=It+(null!==(X=null===(Q=o.current)||void 0===Q?void 0:Q.clientHeight)&&void 0!==X?X:1/0),Ht=Lt+(null!==(G=null===(q=u.current)||void 0===q?void 0:q.clientHeight)&&void 0!==G?G:1/0),wt=function(t,e,n){return Math.max(e,Math.min(n,t))};Mt=wt(xt.top+xt.height/2,It,Ft)-J.top,Tt=wt(mt.top+mt.height/2,Lt,Ht)-J.top}var kt=null!==(K=E(dt,st))&&void 0!==K?K:k(vt);kt&&U.push({id:"line-subsec-".concat(gt),x1:Rt,y1:Mt,x2:Bt,y2:Tt,style:kt,sectionIdx:Number(vt.split("-")[0]),isSubSection:!0,subSectionKeyPath:I})}}if(ct(U),d.current&&s.current){var Et=d.current.getBoundingClientRect(),Nt=s.current.getBoundingClientRect(),Yt=(Et.top+Et.height/2-J.top+Nt.top+Nt.height/2-J.top)/2;ut({x1:Et.right-J.left,x2:Nt.left-J.left,y:Yt})}else ut(null);if(M.size>0){var Dt=[],jt=o.current,Ot=u.current;if(jt&&Ot){var zt=[],Pt=jt.getBoundingClientRect().top,Qt=Ot.getBoundingClientRect().top,Xt=Pt+jt.clientHeight,qt=Qt+Ot.clientHeight,Gt=jt.scrollTop,Kt=Ot.scrollTop,Vt=J.top,Jt=function(t,e,n){return Math.max(e,Math.min(n,t))};M.forEach(function(t){var e,n,i,c,l,o,u,a,d;if(F){var s=null,g=null,f=null;if("string"==typeof t&&t.includes(r)){var p=t.split(r),b=p[0],y=p[1],x=p[2],m="".concat(b).concat(r).concat(y);s=null===(e=R.current[m])||void 0===e?void 0:e.current,f=null!==(n=E(b,y))&&void 0!==n?n:k(x),g=Number((null==x?void 0:x.split("-")[0])||0)}else g=Number(t),s=null===(i=R.current[g])||void 0===i?void 0:i.current,f=w(g);if(!s)return;var A=document.querySelectorAll('[id^="guideline-target-"]');A.forEach(function(e,n){var i=s.getBoundingClientRect(),c=e.getBoundingClientRect(),l=i.right-J.left,o=c.left-J.left-0,u=l+75,a=i.top+i.height/2,d=c.top+c.height/2,v=a-Pt+Gt,h=d-Qt+Kt,g="conn-guide-".concat(t,"-").concat(n),p="";"string"==typeof t&&t.includes(r)?p=(t.split(r)[2]||"").split("-").map(function(t){return Number(t)+1}).join("."):p=String(Number(t)+1);var b=String.fromCharCode(97+n),y=1===A.length?null:"".concat(p,"(").concat(b,")");zt.push({lhsScrollY:v,rhsScrollY:h,x1:l,x2:o,containerTop:Vt,leftIdx:t,rhsArrayIdx:n,styleColor:(null==f?void 0:f.badgeBorder)||"#6366F1",styleBg:(null==f?void 0:f.badgeBg)||"#FFFFFF",styleText:(null==f?void 0:f.badgeText)||"#A16207",styleId:g,centerX:u});var x=Jt(a,Pt,Xt),m=Jt(d,Qt,qt),R=x-Vt,C=m-Vt,B=At(l,R,o,C,u,a>=Pt-4&&a<=Xt+4,d>=Qt-4&&d<=qt+4);Dt.push({id:g,pathD:B,style:f,leftIdx:t,rhsArrayIdx:n,x1:l,x2:o,y1:R,y2:C,centerX:u,matchLabel:y,isGuideline:!0})})}else if("string"==typeof t&&t.includes(r)){var B=t.split(r),S=(b=B[0],y=B[1],x=B[2],B[3],m="".concat(b).concat(r).concat(y),null===(c=R.current[m])||void 0===c?void 0:c.current),M=null===(l=C.current[m])||void 0===l?void 0:l.current;if(!S||!M)return;var T=S.getBoundingClientRect(),I=M.getBoundingClientRect(),H=null!==(o=E(b,y))&&void 0!==o?o:k(x),N=T.right-J.left,Y=I.left-J.left-0,D=N+75,j=T.top+T.height/2,O=I.top+I.height/2,z=j-Pt+Gt,P=O-Qt+Kt,Q="conn-subsec-".concat(m),X=((x||"").split("-").map(function(t){return Number(t)+1}).join("."),null);zt.push({lhsScrollY:z,rhsScrollY:P,x1:N,x2:Y,containerTop:Vt,leftIdx:t,rhsArrayIdx:t,styleColor:(null==H?void 0:H.badgeBorder)||"#6366F1",styleBg:(null==H?void 0:H.badgeBg)||"#FFFFFF",styleText:(null==H?void 0:H.badgeText)||"#A16207",styleId:Q,centerX:D});var q=Jt(j,Pt,Xt),G=Jt(O,Qt,qt),K=At(N,$=q-Vt,Y,_=G-Vt,D,j>=Pt-4&&j<=Xt+4,O>=Qt-4&&O<=qt+4);Dt.push({id:Q,pathD:K,style:H,leftIdx:t,rhsArrayIdx:t,x1:N,x2:Y,y1:$,y2:_,matchLabel:X})}else if(L){var V=t,U=v[V];if(!(null===(d=null==U?void 0:U.refIndexes)||void 0===d?void 0:d.length))return;U.refIndexes.forEach(function(e,n){var i,r,c=h.findIndex(function(t){return t.selfIndex===e});if(-1!==c){var l=null===(i=R.current[V])||void 0===i?void 0:i.current,o=null===(r=C.current[c])||void 0===r?void 0:r.current;if(l&&o){var u=l.getBoundingClientRect(),a=o.getBoundingClientRect(),d=w(V),s=u.right-J.left,v=a.left-J.left-0,g=s+75,f=u.top+u.height/2,p=a.top+a.height/2,b=f-Pt+Gt,y=p-Qt+Kt,x="conn-".concat(V,"-").concat(c),m=String(Number(t)+1),A=String.fromCharCode(97+n),B=1===U.refIndexes.length?null:"".concat(m,"(").concat(A,")");zt.push({lhsScrollY:b,rhsScrollY:y,x1:s,x2:v,containerTop:Vt,leftIdx:V,rhsArrayIdx:c,styleColor:(null==d?void 0:d.badgeBorder)||"#6366F1",styleBg:(null==d?void 0:d.badgeBg)||"#FFFFFF",styleText:(null==d?void 0:d.badgeText)||"#A16207",styleId:x,centerX:g});var S=Jt(f,Pt,Xt),M=Jt(p,Qt,qt),T=S-Vt,I=M-Vt,L=At(s,T,v,I,g,f>=Pt-4&&f<=Xt+4,p>=Qt-4&&p<=qt+4);Dt.push({id:x,pathD:L,style:d,leftIdx:V,rhsArrayIdx:c,x1:s,x2:v,y1:T,y2:I,matchLabel:B})}}})}else{var W=t,Z=W;S=null===(u=R.current[W])||void 0===u?void 0:u.current,M=null===(a=C.current[Z])||void 0===a?void 0:a.current;if(!S||!M)return;T=S.getBoundingClientRect(),I=M.getBoundingClientRect(),H=w(W),N=T.right-J.left,Y=I.left-J.left-0,D=N+75,j=T.top+T.height/2,O=I.top+I.height/2,z=j-Pt+Gt,P=O-Qt+Kt,Q="conn-".concat(W,"-").concat(Z),String(Number(t)+1),X=null;zt.push({lhsScrollY:z,rhsScrollY:P,x1:N,x2:Y,containerTop:Vt,leftIdx:W,rhsArrayIdx:Z,styleColor:(null==H?void 0:H.badgeBorder)||"#6366F1",styleBg:(null==H?void 0:H.badgeBg)||"#FFFFFF",styleText:(null==H?void 0:H.badgeText)||"#A16207",styleId:Q,centerX:D});var $,_;q=Jt(j,Pt,Xt),G=Jt(O,Qt,qt),K=At(N,$=q-Vt,Y,_=G-Vt,D,j>=Pt-4&&j<=Xt+4,O>=Qt-4&&O<=qt+4);Dt.push({id:Q,pathD:K,style:H,leftIdx:W,rhsArrayIdx:Z,x1:N,x2:Y,y1:$,y2:_,matchLabel:X})}}),Ct.current=zt}ht(Dt),setTimeout(function(){return St()},10)}else ht([]),Ct.current=[],setTimeout(function(){return St()},10)}catch(t){console.error("Line render safe fail: ",t)}finally{bt.current=!1}}},[g,v,h,H,et,nt,w,E,L,T,I,M,B,S,F]),St=n(function(){var t,e,n,i,r,c,d,s,v,h,g,f,p,b,y,x,m,R,C,A=Ct.current;if(!A.length)return null===(t=a.current["guideline-up-stroke"])||void 0===t||t.setAttribute("visibility","hidden"),null===(e=a.current["guideline-up-badge"])||void 0===e||e.setAttribute("visibility","hidden"),null===(n=a.current["guideline-down-stroke"])||void 0===n||n.setAttribute("visibility","hidden"),void(null===(i=a.current["guideline-down-badge"])||void 0===i||i.setAttribute("visibility","hidden"));if(!Y.current){var B=null!==(c=null===(r=o.current)||void 0===r?void 0:r.scrollTop)&&void 0!==c?c:0,S=null!==(s=null===(d=u.current)||void 0===d?void 0:d.scrollTop)&&void 0!==s?s:0,M=null!==(h=null===(v=o.current)||void 0===v?void 0:v.clientHeight)&&void 0!==h?h:1/0,T=null!==(f=null===(g=u.current)||void 0===g?void 0:g.clientHeight)&&void 0!==f?f:1/0,I=null!==(b=null===(p=o.current)||void 0===p?void 0:p.getBoundingClientRect().top)&&void 0!==b?b:0,L=null!==(x=null===(y=u.current)||void 0===y?void 0:y.getBoundingClientRect().top)&&void 0!==x?x:0,F=I+M,H=L+T,w=null===(m=l.current)||void 0===m?void 0:m.getBoundingClientRect(),k=null!==(R=null==w?void 0:w.top)&&void 0!==R?R:0,E=null!==(C=null==w?void 0:w.height)&&void 0!==C?C:1/0,N=function(t,e,n){return Math.max(e,Math.min(n,t))},D=0,j=0,O=0,z=0,P="#6366F1",Q="#A16207",X=!1,q=0;if(A.forEach(function(t){var e=t.lhsScrollY-B+I,n=t.rhsScrollY-S+L,i=a.current[t.styleId+"-stroke"],r=a.current[t.styleId+"-bg"],c=a.current[t.styleId+"-btn"],l=a.current[t.styleId+"-number"];if(i||r){var o=N(e,I,F),u=N(n,L,H),d=o-k,s=u-k,v=e>=I-4&&e<=F+4,h=n>=L-4&&n<=H+4,g=!0;X=!0;var f=t.centerX||t.x1+75;0===O&&(O=t.x1,z=d,q=f,P=t.styleColor,t.styleBg,Q=t.styleText||"#A16207"),n<L-4?(D++,g=!1):n>H+4&&(j++,g=!1);var p=At(t.x1,d,t.x2,s,q,v,h);i&&(g&&p?(i.setAttribute("visibility","visible"),i.setAttribute("d",p)):i.setAttribute("visibility","hidden")),r&&(g&&p?(r.setAttribute("visibility","visible"),r.setAttribute("d",p)):r.setAttribute("visibility","hidden")),c&&(v&&g?(c.setAttribute("visibility","visible"),c.setAttribute("y",String(d-12))):c.setAttribute("visibility","hidden")),l&&(v&&g?(l.setAttribute("visibility","visible"),l.setAttribute("transform","translate(".concat(t.x2-42,", ").concat(s,")"))):l.setAttribute("visibility","hidden"))}}),X&&q>0){var G=a.current["guideline-up-stroke"],K=a.current["guideline-up-badge"],V=a.current["guideline-up-arrow"],J=a.current["guideline-up-text"],U=a.current["guideline-up-badge-rect"];if(D>0){var W=Math.max(15,L-k+15),Z=Math.min(15,Math.abs(q-O),Math.max(0,z-W)),$="M ".concat(O,",").concat(z," L ").concat(q-Z,",").concat(z," Q ").concat(q,",").concat(z," ").concat(q,",").concat(z-Z," L ").concat(q,",").concat(W);null==G||G.setAttribute("visibility","visible"),null==G||G.setAttribute("d",$),null==G||G.setAttribute("stroke",P),null==K||K.setAttribute("visibility","visible"),null==K||K.setAttribute("transform","translate(".concat(q,", ").concat(W,")")),V&&V.setAttribute("fill",P),J&&(J.textContent="+".concat(D),J.setAttribute("fill",Q)),U&&U.setAttribute("stroke",P)}else null==G||G.setAttribute("visibility","hidden"),null==K||K.setAttribute("visibility","hidden");var _=a.current["guideline-down-stroke"],tt=a.current["guideline-down-badge"],et=a.current["guideline-down-arrow"],nt=a.current["guideline-down-text"],it=a.current["guideline-down-badge-rect"];if(j>0){var rt=Math.min(E-15,H-k-15);Z=Math.min(15,Math.abs(q-O),Math.max(0,rt-z)),$="M ".concat(O,",").concat(z," L ").concat(q-Z,",").concat(z," Q ").concat(q,",").concat(z," ").concat(q,",").concat(z+Z," L ").concat(q,",").concat(rt);null==_||_.setAttribute("visibility","visible"),null==_||_.setAttribute("d",$),null==_||_.setAttribute("stroke",P),null==tt||tt.setAttribute("visibility","visible"),null==tt||tt.setAttribute("transform","translate(".concat(q,", ").concat(rt,")")),et&&et.setAttribute("fill",P),nt&&(nt.textContent="+".concat(j),nt.setAttribute("fill",Q)),it&&it.setAttribute("stroke",P)}else null==_||_.setAttribute("visibility","hidden"),null==tt||tt.setAttribute("visibility","hidden")}}},[]),Mt=n(function(){Ct.current.length>0&&!Y.current||(null!==mt.current&&clearTimeout(mt.current),mt.current=setTimeout(function(){G.current(),mt.current=null},50))},[]),Tt=n(function(t){if(null!==_.current&&tt.current&&Math.abs(t.currentTarget.scrollTop-_.current)<=2){var e=tt.current;_.current=null,tt.current=null,e()}if(!xt.current&&!V.current){if(L&&J&&(D.current||M.size>0)){var n=t.currentTarget,i=o.current,c=u.current,a=n===i?c:n===c?i:null;if(n&&a){var d=function(){var t,e,n,i,c,l,o,u,a,d,s,v=z.current,h=P.current;if(null===v)return{leftAnchor:null,rightAnchor:null};if("string"==typeof v&&v.includes(r)){var g=v.split(r),f="".concat(g[0]).concat(r).concat(g[1]);return{leftAnchor:(null===(t=R.current[f])||void 0===t?void 0:t.current)||(null===(e=x.current[g[2]])||void 0===e?void 0:e.current)||(null===(n=b.current[Number(g[2])])||void 0===n?void 0:n.current)||null,rightAnchor:(null===(i=C.current[f])||void 0===i?void 0:i.current)||(null===(c=m.current[g[3]])||void 0===c?void 0:c.current)||(null===(l=y.current[Number(g[3])])||void 0===l?void 0:l.current)||null}}var p=Number(v),B=null!==h?Number(h):p;return{leftAnchor:(null===(o=R.current[p])||void 0===o?void 0:o.current)||(null===(u=A.current[p])||void 0===u?void 0:u.current)||(null===(a=b.current[p])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=C.current[B])||void 0===d?void 0:d.current)||(null===(s=y.current[B])||void 0===s?void 0:s.current)||null}}(),s=d.leftAnchor,v=d.rightAnchor,h=n===i?s:v,g=n===i?v:s,f=null;if(h&&g){var p=h.getBoundingClientRect(),B=g.getBoundingClientRect(),S=a.getBoundingClientRect(),T=p.top+p.height/2;f=B.top-S.top+a.scrollTop+B.height/2-(T-S.top)}else{var I=Math.max(0,n.scrollHeight-n.clientHeight),F=Math.max(0,a.scrollHeight-a.clientHeight);f=I>0?n.scrollTop/I*F:n.scrollTop}var H=Math.max(0,a.scrollHeight-a.clientHeight);f=Math.max(0,Math.min(f,H)),Math.abs(a.scrollTop-f)>1&&(xt.current=!0,a.scrollTop=f,requestAnimationFrame(function(){xt.current=!1}))}}L||Mt(),yt.current||(yt.current=!0,requestAnimationFrame(function(){var t,e,n,i,c,a,d;if(D.current){var s=o.current,v=u.current;if(s&&v&&O.current){if(!j.current){var h=z.current,g=void 0;if("string"==typeof h&&h.includes(r)){var f=h.split(r),p="".concat(f[0]).concat(r).concat(f[1]);g=null===(t=R.current[p])||void 0===t?void 0:t.current}else g=null===(e=R.current[h])||void 0===e?void 0:e.current;if(g){var b=g.getBoundingClientRect();j.current={badgeScreenY:b.top+b.height/2,initialScrollTop:s.scrollTop,leftTop:s.getBoundingClientRect().top,leftBottom:s.getBoundingClientRect().top+s.clientHeight,cTop:null!==(i=null===(n=l.current)||void 0===n?void 0:n.getBoundingClientRect().top)&&void 0!==i?i:0}}}if(j.current){var y=j.current,x=s.scrollTop-y.initialScrollTop,m=y.badgeScreenY-x,C=((c=m,a=y.leftTop,d=y.leftBottom,Math.max(a,Math.min(d,c)))-y.cTop).toString(),A=m>=y.leftTop-4&&m<=y.leftBottom+4;O.current.setAttribute("y1",C),O.current.setAttribute("y2",C),O.current.setAttribute("visibility",A?"visible":"hidden")}}}St(),yt.current=!1}))}},[St,L,J,M,Mt]);return i(function(){G.current=Bt},[Bt]),i(function(){var t=setTimeout(Mt,250),e=function(){return U.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==mt.current&&clearTimeout(mt.current),null!==K.current&&clearTimeout(K.current),window.removeEventListener("resize",e)}},[W,Z,$,g,B,S,v,h,et,Mt,T,I,N,M]),{lines:rt,setLines:ct,overallConnector:ot,setOverallConnector:ut,connectedLines:vt,setConnectedLines:ht,svgDimensions:ft,cachedConnectedPositions:Ct,calculateLines:Bt,calculateLinesRef:G,calculateLinesDebounced:Mt,handleColumnScroll:Tt}};export{c as useLinesCalculator};
2
2
  //# sourceMappingURL=useLinesCalculator.js.map
@@ -1,2 +1,2 @@
1
- import{useState as e,useRef as n,useCallback as t,useEffect as r}from"react";import{DEVIATION_BADGE_SEPARATOR as i,smoothScrollTo as l,resetClauseHighlight as u}from"../CognitiveComparehelpers.js";var o=function(o){var c=o.maintainRelativeOrder,d=o.proposedSections,s=o.existingSections,v=o.leftContainerRef,a=o.rightContainerRef,p=o.scrollContainerRef,g=o.sectionLeftRefs,f=o.sectionRightRefs,h=o.subSectionLeftRefs,R=o.subSectionRightRefs,S=o.lhsBadgeRefs,y=o.rhsBadgeRefs,m=o.sectionRowRefs,B=o.sectionRightRowRefs,x=o.rhsTopSpacerRef,C=o.rhsBottomSpacerRef,T=o.lhsTopSpacerRef,b=o.lhsBottomSpacerRef,A=o.calculateLinesRef,w=o.setConnectedSections,I=o.setConnectedLines,L=o.cachedConnectedPositions,F=o.closeMoreFunctionsPopup,N=o.setErrorToast;o.moreFunctions,o.closeSummaryPopup;var E=e(!1),q=E[0],H=E[1],P=e(!1),M=P[0],z=P[1],V=e(!1),j=V[0],k=V[1],O=e(!1),D=O[0],G=O[1],J=e(null),K=J[0],Q=J[1],U=n(!1),W=n(null),X=n(!1),Y=n(null),Z=n(null),$=n(null),_=n(new Set),ee=function(){_.current.forEach(function(e){u(e)}),_.current.clear()},ne=function(e,n,t){var r,l,u,o,c,d,s,p,x,C,T,b,A=null,w=null,I=null,L=null,F=null,N=null,E=function(e,n){if(!e||!n)return!0;var t=e.getBoundingClientRect(),r=n.getBoundingClientRect();return t.bottom>=r.top&&t.top<=r.bottom};if(e){var q=n.split(i),H="".concat(q[0]).concat(i).concat(q[1]);A=(null===(r=h.current[q[2]])||void 0===r?void 0:r.current)||(null===(l=g.current[Number(q[2])])||void 0===l?void 0:l.current)||null,w=(null===(u=R.current[q[3]])||void 0===u?void 0:u.current)||(null===(o=f.current[Number(q[3])])||void 0===o?void 0:o.current)||null,I=(null===(c=S.current[H])||void 0===c?void 0:c.current)||A,L=(null===(d=y.current[H])||void 0===d?void 0:d.current)||w}else{var P=Number(n),M=null!==t?Number(t):P;A=(null===(s=g.current[P])||void 0===s?void 0:s.current)||null,w=(null===(p=f.current[M])||void 0===p?void 0:p.current)||null,F=(null===(x=S.current[P])||void 0===x?void 0:x.current)||null,N=(null===(C=y.current[M])||void 0===C?void 0:C.current)||null,I=F||(null===(T=m.current[P])||void 0===T?void 0:T.current)||A,L=N||(null===(b=B.current[M])||void 0===b?void 0:b.current)||w}if(A&&(A.style.paddingTop="0px"),w&&(w.style.paddingTop="0px"),e||(F&&(F.style.marginTop="0px"),N&&(N.style.marginTop="0px")),!e&&F&&N){var z=v.current,V=a.current;if(!E(F,z)||!E(N,V))return;var j=F.getBoundingClientRect(),k=N.getBoundingClientRect(),O=j.top-k.top;if(Math.abs(O)>32)return;O>0&&(N.style.marginTop="".concat(O,"px"))}else if(I&&L&&A&&w){j=I.getBoundingClientRect(),k=L.getBoundingClientRect();(O=j.top-k.top)>0&&(w.style.paddingTop="".concat(O,"px"))}},te=t(function(){var e,n,t,r,l,u,o,c,d=Y.current,s=Z.current;if(null!==d)if("string"==typeof d&&d.includes(i)){var v=d.split(i),a=(null===(e=h.current[v[2]])||void 0===e?void 0:e.current)||(null===(n=g.current[Number(v[2])])||void 0===n?void 0:n.current)||null,p=(null===(t=R.current[v[3]])||void 0===t?void 0:t.current)||(null===(r=f.current[Number(v[3])])||void 0===r?void 0:r.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px")}else{a=(null===(l=g.current[d])||void 0===l?void 0:l.current)||null,p=(null===(u=f.current[null!=s?s:d])||void 0===u?void 0:u.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px");var m=(null===(o=S.current[d])||void 0===o?void 0:o.current)||null,B=(null===(c=y.current[null!=s?s:d])||void 0===c?void 0:c.current)||null;m&&(m.style.marginTop="0px"),B&&(B.style.marginTop="0px")}x.current&&(x.current.style.height="0px"),C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px")},[]);r(function(){X.current=q},[q]),r(function(){Y.current=K},[K]);var re=t(function(){ee(),H(!1),X.current=!1,W.current=null,te(),Q(null),Y.current=null,Z.current=null,z(!1),G(!1)},[te]),ie=t(function(e,n,t){var r,u,o=null===(r=null==t?void 0:t.toggleIfSame)||void 0===r||r,h=null==t?void 0:t.onReady,R=null!==(u=null==t?void 0:t.sourceSide)&&void 0!==u?u:"left";if(F(),null!=e)if(n)N("No counterpart exists for this section.");else{ee();var E=q&&K===e;q&&null!==K&&te(),E&&o?re():(w(new Set([e])),I([]),L.current=[],G(!0),U.current=!0,Q(e),Y.current=e,H(!0),X.current=!0,z(!1),x.current&&(x.current.style.height="0px"),C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px"),requestAnimationFrame(function(){var n,t,r,u,o,T,b,w,I="string"==typeof e&&e.includes(i),L=null,F=null,N=null;if(I){var E=e.split(i),q="".concat(E[0]).concat(i).concat(E[1]);L=(null===(n=S.current[q])||void 0===n?void 0:n.current)||null,F=(null===(t=y.current[q])||void 0===t?void 0:t.current)||null,N=F?e:null}else if(L=(null===(r=g.current[e])||void 0===r?void 0:r.current)||(null===(u=m.current[e])||void 0===u?void 0:u.current)||null,c){var H=d[e],P=(null==H?void 0:H.refIndexes)||[];if(P.length>0){var M=P[0],V=s.findIndex(function(e){return e.selfIndex===M});-1!==V&&(F=(null===(b=f.current[V])||void 0===b?void 0:b.current)||(null===(w=B.current[V])||void 0===w?void 0:w.current)||null,N=V)}}else F=(null===(o=f.current[e])||void 0===o?void 0:o.current)||(null===(T=B.current[e])||void 0===T?void 0:T.current)||null,N=F?e:null;Z.current=N;var j=v.current,k=a.current,O=function(){ne(I,e,N),z(!0),A.current&&A.current(),U.current=!1,"right"===R&&k?k.dispatchEvent(new Event("scroll")):j&&j.dispatchEvent(new Event("scroll")),G(!1),null==h||h()};if(!L||!j)return U.current=!1,G(!1),void(null==h||h());if(F&&k){if(!c){var D=0;D="right"===R?F?F.getBoundingClientRect().top:0:L?L.getBoundingClientRect().top:0;var J=p.current,K=(null==J?void 0:J.getBoundingClientRect().top)||0,Q=J?J.scrollTop+D-K-150:0;return J?void l(J,Q,200,O):void O()}var W=L.getBoundingClientRect().top-j.getBoundingClientRect().top+j.scrollTop,X=F.getBoundingClientRect().top-k.getBoundingClientRect().top+k.scrollTop,Y=200;if("left"===R){var $=X-(W-j.scrollTop);$<0&&x.current&&(x.current.style.height="".concat(Math.abs($),"px")),requestAnimationFrame(function(){var e,n=k.scrollHeight-k.clientHeight;if($<0)e=0;else{if($>n){var t=$-n;return C.current&&(C.current.style.height="".concat(t+150,"px")),void requestAnimationFrame(function(){l(k,$,Y,O)})}e=$}l(k,e,Y,O)})}else{var _=W-(X-k.scrollTop);requestAnimationFrame(function(){var e,n=j.scrollHeight-j.clientHeight;if(_<0)e=0;else{if(_>n)return void requestAnimationFrame(function(){return l(j,n,Y,O)});e=_}l(j,e,Y,O)})}}else O()}))}},[K,F,s,q,c,d,te,re]);return{isSideBySide:q,setIsSideBySide:H,isArrowVisible:M,setIsArrowVisible:z,isResizing:j,setIsResizing:k,isSideBySideLoading:D,setIsSideBySideLoading:G,activeSideBySideSection:K,setActiveSideBySideSection:Q,scrollLock:U,sideBySideCacheRef:W,isSideBySideRef:X,activeSideBySideSectionRef:Y,activeSideBySideRightSectionRef:Z,sideBySideLineRef:$,highlightedClauseRefs:_,clearClauseHighlight:ee,applyAlignmentPadding:ne,resetSideBySide:re,activateSideBySide:ie}};export{o as useSideBySide};
1
+ import{useState as e,useRef as n,useCallback as t,useEffect as r}from"react";import{DEVIATION_BADGE_SEPARATOR as i,resetClauseHighlight as l,smoothScrollTo as u}from"../CognitiveComparehelpers.js";var o=function(o){var c=o.isGuidelineMode,d=o.maintainRelativeOrder,s=o.proposedSections,v=o.existingSections,a=o.leftContainerRef,p=o.rightContainerRef,g=o.scrollContainerRef,f=o.sectionLeftRefs,h=o.sectionRightRefs,R=o.subSectionLeftRefs,S=o.subSectionRightRefs,y=o.lhsBadgeRefs,m=o.rhsBadgeRefs,B=o.sectionRowRefs,x=o.sectionRightRowRefs,C=o.rhsTopSpacerRef,T=o.rhsBottomSpacerRef,b=o.lhsTopSpacerRef,A=o.lhsBottomSpacerRef,I=o.calculateLinesRef,w=o.setConnectedSections,L=o.setConnectedLines,E=o.cachedConnectedPositions,F=o.closeMoreFunctionsPopup,N=o.setErrorToast;o.moreFunctions,o.closeSummaryPopup;var q=e(!1),H=q[0],M=q[1],P=e(!1),z=P[0],V=P[1],j=e(!1),k=j[0],G=j[1],O=e(!1),D=O[0],J=O[1],K=e(null),Q=K[0],U=K[1],W=n(!1),X=n(null),Y=n(!1),Z=n(null),$=n(null),_=n(null),ee=n(new Set),ne=function(){ee.current.forEach(function(e){l(e)}),ee.current.clear()},te=function(e,n,t){var r,l,u,o,c,d,s,v,g,C,T,b,A=null,I=null,w=null,L=null,E=null,F=null,N=function(e,n){if(!e||!n)return!0;var t=e.getBoundingClientRect(),r=n.getBoundingClientRect();return t.bottom>=r.top&&t.top<=r.bottom};if(e){var q=n.split(i),H="".concat(q[0]).concat(i).concat(q[1]);A=(null===(r=R.current[q[2]])||void 0===r?void 0:r.current)||(null===(l=f.current[Number(q[2])])||void 0===l?void 0:l.current)||null,I=(null===(u=S.current[q[3]])||void 0===u?void 0:u.current)||(null===(o=h.current[Number(q[3])])||void 0===o?void 0:o.current)||null,w=(null===(c=y.current[H])||void 0===c?void 0:c.current)||A,L=(null===(d=m.current[H])||void 0===d?void 0:d.current)||I}else{var M=Number(n),P=null!==t?Number(t):M;A=(null===(s=f.current[M])||void 0===s?void 0:s.current)||null,I=(null===(v=h.current[P])||void 0===v?void 0:v.current)||null,E=(null===(g=y.current[M])||void 0===g?void 0:g.current)||null,F=(null===(C=m.current[P])||void 0===C?void 0:C.current)||null,w=E||(null===(T=B.current[M])||void 0===T?void 0:T.current)||A,L=F||(null===(b=x.current[P])||void 0===b?void 0:b.current)||I}if(A&&(A.style.paddingTop="0px"),I&&(I.style.paddingTop="0px"),e||(E&&(E.style.marginTop="0px"),F&&(F.style.marginTop="0px")),!e&&E&&F){var z=a.current,V=p.current;if(!N(E,z)||!N(F,V))return;var j=E.getBoundingClientRect(),k=F.getBoundingClientRect(),G=j.top-k.top;if(Math.abs(G)>32)return;G>0&&(F.style.marginTop="".concat(G,"px"))}else if(w&&L&&A&&I){j=w.getBoundingClientRect(),k=L.getBoundingClientRect();(G=j.top-k.top)>0&&(I.style.paddingTop="".concat(G,"px"))}},re=t(function(){var e,n,t,r,l,u,o,c,d=Z.current,s=$.current;if(null!==d)if("string"==typeof d&&d.includes(i)){var v=d.split(i),a=(null===(e=R.current[v[2]])||void 0===e?void 0:e.current)||(null===(n=f.current[Number(v[2])])||void 0===n?void 0:n.current)||null,p=(null===(t=S.current[v[3]])||void 0===t?void 0:t.current)||(null===(r=h.current[Number(v[3])])||void 0===r?void 0:r.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px")}else{a=(null===(l=f.current[d])||void 0===l?void 0:l.current)||null,p=(null===(u=h.current[null!=s?s:d])||void 0===u?void 0:u.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px");var g=(null===(o=y.current[d])||void 0===o?void 0:o.current)||null,B=(null===(c=m.current[null!=s?s:d])||void 0===c?void 0:c.current)||null;g&&(g.style.marginTop="0px"),B&&(B.style.marginTop="0px")}C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px"),A.current&&(A.current.style.height="0px")},[]);r(function(){Y.current=H},[H]),r(function(){Z.current=Q},[Q]);var ie=t(function(){ne(),M(!1),Y.current=!1,X.current=null,re(),U(null),Z.current=null,$.current=null,V(!1),J(!1)},[re]),le=t(function(e,n,t){var r,l,o=null===(r=null==t?void 0:t.toggleIfSame)||void 0===r||r,R=null==t?void 0:t.onReady,S=null!==(l=null==t?void 0:t.sourceSide)&&void 0!==l?l:"left";if(F(),null!=e)if(!n||c){ne();var q=H&&Q===e;H&&null!==Q&&re(),q&&o?ie():(w(new Set([e])),L([]),E.current=[],J(!0),W.current=!0,U(e),Z.current=e,M(!0),Y.current=!0,V(!1),C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px"),A.current&&(A.current.style.height="0px"),requestAnimationFrame(function(){var n=function(){var n,t,r,l,o,b,A,w,L,E,F,N="string"==typeof e&&e.includes(i),q=null,H=null,M=null;if(c){if(N){var P=e.split(i),z="".concat(P[0]).concat(i).concat(P[1]);q=(null===(n=y.current[z])||void 0===n?void 0:n.current)||null}else q=(null===(t=f.current[e])||void 0===t?void 0:t.current)||(null===(r=B.current[e])||void 0===r?void 0:r.current)||null;H=document.getElementById("guideline-target-0"),M=H?e:null}else if(N){P=e.split(i),z="".concat(P[0]).concat(i).concat(P[1]);q=(null===(l=y.current[z])||void 0===l?void 0:l.current)||null,H=(null===(o=m.current[z])||void 0===o?void 0:o.current)||null,M=H?e:null}else if(q=(null===(b=f.current[e])||void 0===b?void 0:b.current)||(null===(A=B.current[e])||void 0===A?void 0:A.current)||null,d){var j=s[e],k=(null==j?void 0:j.refIndexes)||[];if(k.length>0){var G=k[0],O=v.findIndex(function(e){return e.selfIndex===G});-1!==O&&(H=(null===(E=h.current[O])||void 0===E?void 0:E.current)||(null===(F=x.current[O])||void 0===F?void 0:F.current)||null,M=O)}}else H=(null===(w=h.current[e])||void 0===w?void 0:w.current)||(null===(L=x.current[e])||void 0===L?void 0:L.current)||null,M=H?e:null;$.current=M;var D=a.current,K=p.current,Q=function(){te(N,e,M),V(!0),I.current&&I.current(),W.current=!1,"right"===S&&K?K.dispatchEvent(new Event("scroll")):D&&D.dispatchEvent(new Event("scroll")),J(!1),null==R||R()};if(!q||!D)return W.current=!1,J(!1),void(null==R||R());if(H&&K){if(!d){var U=0;U="right"===S?H?H.getBoundingClientRect().top:0:q?q.getBoundingClientRect().top:0;var X=g.current,Y=(null==X?void 0:X.getBoundingClientRect().top)||0,Z=X?X.scrollTop+U-Y-150:0;return X?void u(X,Z,200,Q):void Q()}var _=q.getBoundingClientRect().top-D.getBoundingClientRect().top+D.scrollTop,ee=H.getBoundingClientRect().top-K.getBoundingClientRect().top+K.scrollTop,ne=200;if("left"===S){var re=ee-(_-D.scrollTop);re<0&&C.current&&!c&&(C.current.style.height="".concat(Math.abs(re),"px")),requestAnimationFrame(function(){var e,n=K.scrollHeight-K.clientHeight;if(re<0)e=0;else{if(re>n){var t=re-n;return T.current&&!c&&(T.current.style.height="".concat(t+150,"px")),void requestAnimationFrame(function(){u(K,re,ne,Q)})}e=re}u(K,e,ne,Q)})}else{var ie=_-(ee-K.scrollTop);requestAnimationFrame(function(){var e,n=D.scrollHeight-D.clientHeight;if(ie<0)e=0;else{if(ie>n)return void requestAnimationFrame(function(){return u(D,n,ne,Q)});e=ie}u(D,e,ne,Q)})}}else Q()};c?setTimeout(n,100):n()}))}else N("No counterpart exists for this section.")},[Q,F,v,H,d,s,re,ie,c]);return{isSideBySide:H,setIsSideBySide:M,isArrowVisible:z,setIsArrowVisible:V,isResizing:k,setIsResizing:G,isSideBySideLoading:D,setIsSideBySideLoading:J,activeSideBySideSection:Q,setActiveSideBySideSection:U,scrollLock:W,sideBySideCacheRef:X,isSideBySideRef:Y,activeSideBySideSectionRef:Z,activeSideBySideRightSectionRef:$,sideBySideLineRef:_,highlightedClauseRefs:ee,clearClauseHighlight:ne,applyAlignmentPadding:te,resetSideBySide:ie,activateSideBySide:le}};export{o as useSideBySide};
2
2
  //# sourceMappingURL=useSideBySide.js.map
@@ -1,2 +1,2 @@
1
- var e={container:"CognitiveNonWebSearchReasoning-module_container__koQEN",itemRow:"CognitiveNonWebSearchReasoning-module_itemRow__lRmgs",indexNumber:"CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg",textContent:"CognitiveNonWebSearchReasoning-module_textContent__327fx",paraphraseButton:"CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe",paraphraseText:"CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty",paraphraseStar:"CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR",chevronIcon:"CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw",chevronIconRotated:"CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP",expandedContainer:"CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9",expandedHeader:"CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb",headerTitle:"CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI",headerActions:"CognitiveNonWebSearchReasoning-module_headerActions__j1P4u",navigationContainer:"CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG",navButton:"CognitiveNonWebSearchReasoning-module_navButton__aOaMv",navIcon:"CognitiveNonWebSearchReasoning-module_navIcon__uLme4",navCounter:"CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc",confidenceBadge:"CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3",confidenceStar:"CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S",confidenceScore:"CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK",maximizeButton:"CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-",maximizeIcon:"CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez",contentArea:"CognitiveNonWebSearchReasoning-module_contentArea__hVoLL",contentInner:"CognitiveNonWebSearchReasoning-module_contentInner__df-34",footer:"CognitiveNonWebSearchReasoning-module_footer__CNE8q",trainingTitle:"CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh",trainingTitleLink:"CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U",modalDialog:"CognitiveNonWebSearchReasoning-module_modalDialog__eGApe",modalContainer:"CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01",modalHeader:"CognitiveNonWebSearchReasoning-module_modalHeader__qglof",modalHeaderTitle:"CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X",modalHeaderActions:"CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip",modalNavContainer:"CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP",modalNavButton:"CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24",closeButton:"CognitiveNonWebSearchReasoning-module_closeButton__S23zi",closeIcon:"CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG",modalContent:"CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv",modalContentInner:"CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo",modalFooter:"CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn",modalFooterSource:"CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt",blockLine:"CognitiveNonWebSearchReasoning-module_blockLine__FwGYE",headerLine:"CognitiveNonWebSearchReasoning-module_headerLine__0j5p4",listItemLine:"CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O",listCounter:"CognitiveNonWebSearchReasoning-module_listCounter__esNpx",boldText:"CognitiveNonWebSearchReasoning-module_boldText__suAp2",highlight:"CognitiveNonWebSearchReasoning-module_highlight__EMAz5",highlightActive:"CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU",highlightActiveVariant:"CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp",highlightVariant:"CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ",highlightButton:"CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CognitiveNonWebSearchReasoning-module_container__koQEN{display:flex;flex-direction:column;gap:var(--cr-container-gap,.5rem)}.CognitiveNonWebSearchReasoning-module_itemRow__lRmgs{align-items:flex-start;display:flex;font-size:var(--cr-item-row-font-size,.875rem);gap:.5rem}.CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg{color:var(--cr-index-color,#475467);font-weight:var(--cr-index-font-weight,500)}.CognitiveNonWebSearchReasoning-module_textContent__327fx{color:var(--cr-text-content-color,#475467);flex:1;max-width:none}.CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe{align-items:center;background:var(--cr-paraphrase-button-bg,#0000);border:none;border-radius:var(--cr-paraphrase-button-border-radius,.375rem);cursor:pointer;display:inline-flex;gap:.25rem;justify-content:flex-start;padding:.125rem .375rem}.CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty{color:var(--cr-paraphrase-color,#2563eb);font-weight:var(--cr-paraphrase-font-weight,500);text-align:start}.CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR{color:var(--cr-paraphrase-color,#2563eb);padding-right:.25rem}.CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw{color:var(--cr-chevron-color,#2563eb);height:1rem;transition:transform .2s;width:1rem}.CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP{transform:rotate(180deg)}.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{background-color:var(--cr-expanded-container-bg,#0000);border:solid var(--cr-expanded-container-border,#e5e7eb);border-radius:var(--cr-expanded-container-border-radius,.5rem);border-width:1px 1px 2px;margin-left:var(--cr-expanded-container-margin-left,1.5rem);margin-top:var(--cr-expanded-container-margin-top,.5rem);overflow:hidden}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:center;background-color:var(--cr-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:var(--cr-header-padding,.25rem .75rem)}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{color:var(--cr-header-title-color,inherit);font-size:var(--cr-header-title-font-size,.875rem);font-weight:var(--cr-header-title-font-weight,400)}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{align-items:center;background-color:var(--cr-nav-container-bg,#fff);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv:hover{background-color:var(--cr-nav-button-hover-bg,#f3f4f6)}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{color:var(--cr-nav-icon-color,#6b7280);height:var(--cr-nav-icon-size,1.25rem);width:var(--cr-nav-icon-size,1.25rem)}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{color:var(--cr-nav-counter-color,#4b5563);font-size:var(--cr-nav-counter-font-size,.875rem);min-width:2.25rem;text-align:center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{align-items:center;background-color:var(--cr-confidence-badge-bg,#f0fdf4);border:2px solid var(--cr-confidence-badge-border,#3ac894);border-radius:9999px;display:inline-flex;gap:.25rem;padding:.25rem .5rem}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{color:var(--cr-confidence-star-color,#059669);font-size:.75rem}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{color:var(--cr-confidence-score-color,#059669);font-size:.875rem;font-weight:600}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-:hover{background-color:var(--cr-maximize-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{color:var(--cr-maximize-icon-color,#6b7280);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{background-color:var(--cr-content-area-bg,#0000);color:var(--cr-content-area-color,inherit);font-size:var(--cr-content-area-font-size,.875rem);max-height:var(--cr-content-area-max-height,11rem);overflow-y:auto;padding:var(--cr-content-area-padding,.5rem .75rem);scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_contentInner__df-34{line-height:var(--cr-content-line-height,1.5rem)}.CognitiveNonWebSearchReasoning-module_footer__CNE8q{align-items:center;background-color:var(--cr-footer-bg,#f2f4f7);border-top:1px solid var(--cr-footer-border,#e5e7eb);display:flex;justify-content:flex-end}.CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh{color:var(--cr-training-title-color,inherit);font-size:var(--cr-training-title-font-size,.875rem);font-style:italic;font-weight:300}.CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U{align-items:center;background:none;border:none;color:var(--cr-training-link-color,inherit);cursor:pointer;display:inline-flex;font-size:var(--cr-training-link-font-size,.8rem);font-weight:600;gap:.25rem}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe{background:#0000;border:none;left:50%;margin:0;max-height:300px;max-width:none;overflow:visible;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%)}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe::backdrop{background-color:#0006}.CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01{background-color:var(--cr-modal-container-bg,#fff);border-radius:var(--cr-modal-container-border-radius,.75rem);box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;max-height:80vh;max-width:900px;overflow:hidden;width:80vw}.CognitiveNonWebSearchReasoning-module_modalHeader__qglof{align-items:center;background-color:var(--cr-modal-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-modal-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:.75rem .5rem .75rem 1rem;width:100%}.CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X{color:var(--cr-modal-header-title-color,inherit);font-size:var(--cr-modal-header-title-font-size,1rem);font-weight:500}.CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP{align-items:center;background-color:var(--cr-modal-nav-container-bg,#f3f4f6);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24:hover{background-color:var(--cr-modal-nav-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi:hover{background-color:var(--cr-close-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG{color:var(--cr-close-icon-color,#4b5563);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv{background-color:var(--cr-modal-content-bg,#0000);color:var(--cr-modal-content-color,inherit);flex:1;font-size:var(--cr-modal-content-font-size,.875rem);overflow-y:scroll;padding:.75rem 1rem;scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo{line-height:var(--cr-modal-content-line-height,1.75rem)}.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{justify-content:flex-end;padding:.5rem 1rem}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt,.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{align-items:center;background-color:var(--cr-modal-footer-bg,#f2f4f7);border-top:1px solid var(--cr-modal-footer-border,#e5e7eb);display:flex;flex-shrink:0}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt{justify-content:flex-start;padding:1rem}.CognitiveNonWebSearchReasoning-module_blockLine__FwGYE{display:block}.CognitiveNonWebSearchReasoning-module_headerLine__0j5p4{display:block;font-weight:var(--cr-header-line-font-weight,400)}.CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O{display:block}.CognitiveNonWebSearchReasoning-module_listCounter__esNpx{display:inline-block;font-weight:var(--cr-list-counter-font-weight,500);text-align:left;width:var(--cr-list-counter-width,1.5rem)}.CognitiveNonWebSearchReasoning-module_boldText__suAp2{font-weight:var(--cr-bold-font-weight,600)}.CognitiveNonWebSearchReasoning-module_highlight__EMAz5{background-color:var(--cr-highlight-bg,#fef08a);border-radius:.25rem;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU{background-color:var(--cr-highlight-active-bg,#fde047);border:1px solid var(--cr-highlight-active-border,#eab308);box-shadow:0 1px 2px 0 #0000000d}.CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp{background-color:#e0e7ff;border:1px solid #5c75f4;box-shadow:0 1px 2px 0 #0000000d;color:#6366f1;font-weight:500}.CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ{background-color:#eef2ff;border-radius:.25rem;color:#6366f1;font-weight:500;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb{border:none;cursor:pointer;display:inline;font:inherit}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
1
+ var e={container:"CognitiveNonWebSearchReasoning-module_container__koQEN",itemRow:"CognitiveNonWebSearchReasoning-module_itemRow__lRmgs",indexNumber:"CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg",textContent:"CognitiveNonWebSearchReasoning-module_textContent__327fx",paraphraseButton:"CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe",paraphraseText:"CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty",paraphraseStar:"CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR",chevronIcon:"CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw",chevronIconRotated:"CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP",expandedContainer:"CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9",expandedHeader:"CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb",headerTitle:"CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI",headerActions:"CognitiveNonWebSearchReasoning-module_headerActions__j1P4u",navigationContainer:"CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG",navButton:"CognitiveNonWebSearchReasoning-module_navButton__aOaMv",navIcon:"CognitiveNonWebSearchReasoning-module_navIcon__uLme4",navCounter:"CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc",confidenceBadge:"CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3",confidenceStar:"CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S",confidenceScore:"CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK",maximizeButton:"CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-",maximizeIcon:"CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez",contentArea:"CognitiveNonWebSearchReasoning-module_contentArea__hVoLL",contentInner:"CognitiveNonWebSearchReasoning-module_contentInner__df-34",footer:"CognitiveNonWebSearchReasoning-module_footer__CNE8q",trainingTitle:"CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh",trainingTitleLink:"CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U",modalDialog:"CognitiveNonWebSearchReasoning-module_modalDialog__eGApe",modalContainer:"CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01",modalHeader:"CognitiveNonWebSearchReasoning-module_modalHeader__qglof",modalHeaderTitle:"CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X",modalHeaderActions:"CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip",modalNavContainer:"CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP",modalNavButton:"CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24",closeButton:"CognitiveNonWebSearchReasoning-module_closeButton__S23zi",closeIcon:"CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG",modalContent:"CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv",modalContentInner:"CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo",modalFooter:"CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn",modalFooterSource:"CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt",blockLine:"CognitiveNonWebSearchReasoning-module_blockLine__FwGYE",headerLine:"CognitiveNonWebSearchReasoning-module_headerLine__0j5p4",listItemLine:"CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O",listCounter:"CognitiveNonWebSearchReasoning-module_listCounter__esNpx",boldText:"CognitiveNonWebSearchReasoning-module_boldText__suAp2",highlight:"CognitiveNonWebSearchReasoning-module_highlight__EMAz5",highlightActive:"CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU",highlightActiveVariant:"CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp",highlightVariant:"CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ",highlightButton:"CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CognitiveNonWebSearchReasoning-module_container__koQEN{display:flex;flex-direction:column;gap:var(--cr-container-gap,.5rem)}.CognitiveNonWebSearchReasoning-module_itemRow__lRmgs{align-items:flex-start;display:flex;font-size:var(--cr-item-row-font-size,.875rem);gap:.5rem}.CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg{color:var(--cr-index-color,#475467);font-weight:var(--cr-index-font-weight,500)}.CognitiveNonWebSearchReasoning-module_textContent__327fx{color:var(--cr-text-content-color,#475467);flex:1;max-width:none}.CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe{align-items:center;background:var(--cr-paraphrase-button-bg,#0000);border:none;border-radius:var(--cr-paraphrase-button-border-radius,.375rem);cursor:pointer;display:inline-flex;gap:.25rem;justify-content:flex-start;padding:.125rem .375rem}.CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty{color:var(--cr-paraphrase-color,#2563eb);font-weight:var(--cr-paraphrase-font-weight,500);text-align:start}.CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR{color:var(--cr-paraphrase-color,#2563eb);padding-right:.25rem}.CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw{color:var(--cr-chevron-color,#2563eb);height:1rem;transition:transform .2s;width:1rem}.CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP{transform:rotate(180deg)}.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{background-color:var(--cr-expanded-container-bg,#0000);border:solid var(--cr-expanded-container-border,#e5e7eb);border-radius:var(--cr-expanded-container-border-radius,.5rem);border-width:1px 1px 2px;container-type:inline-size;margin-left:var(--cr-expanded-container-margin-left,1.5rem);margin-top:var(--cr-expanded-container-margin-top,.5rem);overflow:hidden}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:center;background-color:var(--cr-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:var(--cr-header-padding,.25rem .75rem)}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{color:var(--cr-header-title-color,inherit);font-size:var(--cr-header-title-font-size,.875rem);font-weight:var(--cr-header-title-font-weight,400)}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{align-items:center;background-color:var(--cr-nav-container-bg,#fff);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv:hover{background-color:var(--cr-nav-button-hover-bg,#f3f4f6)}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{color:var(--cr-nav-icon-color,#6b7280);height:var(--cr-nav-icon-size,1.25rem);width:var(--cr-nav-icon-size,1.25rem)}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{color:var(--cr-nav-counter-color,#4b5563);font-size:var(--cr-nav-counter-font-size,.875rem);min-width:2.25rem;text-align:center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{align-items:center;background-color:var(--cr-confidence-badge-bg,#f0fdf4);border:2px solid var(--cr-confidence-badge-border,#3ac894);border-radius:9999px;display:inline-flex;gap:.25rem;padding:.25rem .5rem}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{color:var(--cr-confidence-star-color,#059669);font-size:.75rem}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{color:var(--cr-confidence-score-color,#059669);font-size:.875rem;font-weight:600}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-:hover{background-color:var(--cr-maximize-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{color:var(--cr-maximize-icon-color,#6b7280);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{background-color:var(--cr-content-area-bg,#0000);color:var(--cr-content-area-color,inherit);font-size:var(--cr-content-area-font-size,.875rem);max-height:var(--cr-content-area-max-height,11rem);overflow-y:auto;padding:var(--cr-content-area-padding,.5rem .75rem);scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_contentInner__df-34{line-height:var(--cr-content-line-height,1.5rem)}.CognitiveNonWebSearchReasoning-module_footer__CNE8q{align-items:center;background-color:var(--cr-footer-bg,#f2f4f7);border-top:1px solid var(--cr-footer-border,#e5e7eb);display:flex;justify-content:flex-end}.CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh{color:var(--cr-training-title-color,inherit);font-size:var(--cr-training-title-font-size,.875rem);font-style:italic;font-weight:300}.CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U{align-items:center;background:none;border:none;color:var(--cr-training-link-color,inherit);cursor:pointer;display:inline-flex;font-size:var(--cr-training-link-font-size,.8rem);font-weight:600;gap:.25rem}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe{background:#0000;border:none;left:50%;margin:0;max-height:300px;max-width:none;overflow:visible;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%)}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe::backdrop{background-color:#0006}.CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01{background-color:var(--cr-modal-container-bg,#fff);border-radius:var(--cr-modal-container-border-radius,.75rem);box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;max-height:80vh;max-width:900px;overflow:hidden;width:80vw}.CognitiveNonWebSearchReasoning-module_modalHeader__qglof{align-items:center;background-color:var(--cr-modal-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-modal-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:.75rem .5rem .75rem 1rem;width:100%}.CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X{color:var(--cr-modal-header-title-color,inherit);font-size:var(--cr-modal-header-title-font-size,1rem);font-weight:500}.CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP{align-items:center;background-color:var(--cr-modal-nav-container-bg,#f3f4f6);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24:hover{background-color:var(--cr-modal-nav-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi:hover{background-color:var(--cr-close-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG{color:var(--cr-close-icon-color,#4b5563);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv{background-color:var(--cr-modal-content-bg,#0000);color:var(--cr-modal-content-color,inherit);flex:1;font-size:var(--cr-modal-content-font-size,.875rem);overflow-y:scroll;padding:.75rem 1rem;scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo{line-height:var(--cr-modal-content-line-height,1.75rem)}.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{justify-content:flex-end;padding:.5rem 1rem}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt,.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{align-items:center;background-color:var(--cr-modal-footer-bg,#f2f4f7);border-top:1px solid var(--cr-modal-footer-border,#e5e7eb);display:flex;flex-shrink:0}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt{justify-content:flex-start;padding:1rem}.CognitiveNonWebSearchReasoning-module_blockLine__FwGYE{display:block}.CognitiveNonWebSearchReasoning-module_headerLine__0j5p4{display:block;font-weight:var(--cr-header-line-font-weight,400)}.CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O{display:block}.CognitiveNonWebSearchReasoning-module_listCounter__esNpx{display:inline-block;font-weight:var(--cr-list-counter-font-weight,500);text-align:left;width:var(--cr-list-counter-width,1.5rem)}.CognitiveNonWebSearchReasoning-module_boldText__suAp2{font-weight:var(--cr-bold-font-weight,600)}.CognitiveNonWebSearchReasoning-module_highlight__EMAz5{background-color:var(--cr-highlight-bg,#fef08a);border-radius:.25rem;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU{background-color:var(--cr-highlight-active-bg,#fde047);border:1px solid var(--cr-highlight-active-border,#eab308);box-shadow:0 1px 2px 0 #0000000d}.CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp{background-color:#e0e7ff;border:1px solid #5c75f4;box-shadow:0 1px 2px 0 #0000000d;color:#6366f1;font-weight:500}.CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ{background-color:#eef2ff;border-radius:.25rem;color:#6366f1;font-weight:500;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb{border:none;cursor:pointer;display:inline;font:inherit}@container (max-width: 520px){.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{margin-left:0;margin-top:0}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:flex-start;display:flex;flex-wrap:wrap;gap:8px;padding:8px 12px}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{flex:1 1 100%;font-size:14px;line-height:1.3;min-width:0;white-space:normal}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;gap:8px;justify-content:space-between;min-width:0;width:100%}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP,.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{flex-shrink:1;gap:2px;padding:2px}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{font-size:12px;min-width:auto}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{height:16px;width:16px}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24,.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{padding:2px}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{flex-shrink:0;gap:2px;padding:2px 6px}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{font-size:12px}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{font-size:10px}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{flex-shrink:0;padding:2px}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{height:18px;width:18px}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{padding:12px}}@container (max-width: 420px){.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{padding:8px}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{gap:4px}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP,.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{transform:scale(.92);transform-origin:left center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{padding:2px 5px}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{font-size:11px}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{height:16px;width:16px}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{font-size:13px;padding:10px}}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=CognitiveNonWebSearchReasoning.module.css.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as n,__generator as i}from"tslib";import{useMemo as t}from"react";import{useQuery as o}from"@tanstack/react-query";import{fetchOnDemandCitation as a}from"../service/onDemandApi.js";var e=function(n,i,t){var o;return Array.isArray(n)?Array.isArray(i)&&0!==i.length?Number.isNaN(t)?(console.warn("[findCitation] citationNumber is NaN"),null):null!==(o=n.find(function(n){var o,a=function(n){var i,t,o,a,e;if(null==n)return console.warn("[getCitationType] received null or undefined citation"),"";var l=null!==(e=null!==(a=null!==(t=null===(i=null==n?void 0:n.customMetaData)||void 0===i?void 0:i.type)&&void 0!==t?t:null===(o=null==n?void 0:n.customMetadata)||void 0===o?void 0:o.type)&&void 0!==a?a:null==n?void 0:n.type)&&void 0!==e?e:"";return l||console.warn("[getCitationType] citation has no resolvable type field",n),l}(n);return(null===(o=function(n){var i;return null==n?(console.warn("[getCitationNumber] received null or undefined citation"),""):(null==n.citation_number&&console.warn("[getCitationNumber] citation is missing citation_number field",n),null!==(i=null==n?void 0:n.citation_number)&&void 0!==i?i:"")}(n))||void 0===o?void 0:o.toString())===t.toString()&&i.some(function(n){return null==a?void 0:a.includes(n)})}))&&void 0!==o?o:null:(console.warn("[findCitation] citationTypes is empty or falsy",i),null):(console.warn("[findCitation] citations is not an array",n),null)},l=function(l){var r=l.msg,c=l.citationType,u=l.citationNumber,d=l.enabled,s=void 0!==d&&d,v=l.accessToken,f=l.baseUrl,_=l.orgName,m=l.citationAssistantProcessingName,h=l.citationAgentName,y=(null==r?void 0:r.requestId)||(null==r?void 0:r.id)||"",g=t(function(){return function(n){switch(n){case"artifact_chunks":return["artifact_chunks","scanned_doc_citation","scanned_doc_citations"];case"rai_artifact_citation":return["rai_artifact_citation","rai_artifact_citations"];case"json_chunks":return["json_chunks"];case"scanned_doc_citation":return["scanned_doc_citation","scanned_doc_citations","artifact_chunks"];case"scanned_doc_citations":return["scanned_doc_citations","scanned_doc_citation","artifact_chunks"];default:return[n]}}(c)},[c]),p=function(){switch(c){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";default:return c}}(),C=(null==r?void 0:r.isEcgPayloadActive)?t(function(){return["onDemandCitationFetch",y,p,null==r?void 0:r.customCitationId]},[y,p,null==r?void 0:r.customCitationId]):t(function(){return["onDemandCitationFetch",y,p,u]},[y,p,u]),b=t(function(){return e(null==r?void 0:r.citations,g,u)},[null==r?void 0:r.citations,g,u]),N=Boolean(s&&y&&p&&f&&_&&!Number.isNaN(u)&&!b),w=v,A=!0===(null==r?void 0:r.isStreamEnd),k=o({queryKey:C,queryFn:function(){return n(void 0,void 0,void 0,function(){var n,t,o,e,l,c,d,s;return i(this,function(i){switch(i.label){case 0:return[4,a(y,p,u,null!==(t=null==r?void 0:r.content)&&void 0!==t?t:"",w,f,null!=m?m:"",_,null!=h?h:"",null!==(o=null==r?void 0:r.isEcgPayloadActive)&&void 0!==o&&o,null!==(e=null==r?void 0:r.ecg_agent_name)&&void 0!==e?e:"",null!==(l=null==r?void 0:r.customCitationId)&&void 0!==l?l:"",null!==(c=null==r?void 0:r.plan_id)&&void 0!==c?c:"",null!==(d=null==r?void 0:r.ui_chat_history)&&void 0!==d?d:void 0)];case 1:if((n=i.sent()).error||!n.responseData)throw new Error((null===(s=n.error)||void 0===s?void 0:s.errorMessage)||"Failed to fetch on-demand citation");return[2,n.responseData]}})})},enabled:N&&A&&Boolean(null==r?void 0:r.content),staleTime:1/0,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1}),F=t(function(){var n,i,t,o,a,l,c,d=null!==(t=null===(i=null===(n=k.data)||void 0===n?void 0:n.result)||void 0===i?void 0:i.citations)&&void 0!==t?t:[];return Array.isArray(d)&&0!==d.length?(null==r?void 0:r.customCitationId)?null!==(a=null!==(o=d.find(function(n){var i,t,o=null!==(t=null!==(i=null==n?void 0:n.title)&&void 0!==i?i:null==n?void 0:n.display_name)&&void 0!==t?t:"";return"string"==typeof o&&o.includes(r.customCitationId)}))&&void 0!==o?o:d[0])&&void 0!==a?a:null:null!==(c=null!==(l=e(d,g,u))&&void 0!==l?l:d[0])&&void 0!==c?c:null:null},[null==r?void 0:r.customCitationId,u,g,k.data]);return{citation:null!=b?b:F,isFetching:k.isFetching,isLoading:k.isLoading,isComplete:k.isSuccess,status:k.status,refetch:k.refetch}};export{l as useOnDemandCitationFetch};
1
+ import{__awaiter as n,__generator as i}from"tslib";import{useMemo as t}from"react";import{useQuery as o}from"@tanstack/react-query";import{fetchOnDemandCitation as a}from"../service/onDemandApi.js";var e=function(n,i,t){var o;return Array.isArray(n)?Array.isArray(i)&&0!==i.length?Number.isNaN(t)?(console.warn("[findCitation] citationNumber is NaN"),null):null!==(o=n.find(function(n){var o,a=function(n){var i,t,o,a,e;if(null==n)return console.warn("[getCitationType] received null or undefined citation"),"";var l=null!==(e=null!==(a=null!==(t=null===(i=null==n?void 0:n.customMetaData)||void 0===i?void 0:i.type)&&void 0!==t?t:null===(o=null==n?void 0:n.customMetadata)||void 0===o?void 0:o.type)&&void 0!==a?a:null==n?void 0:n.type)&&void 0!==e?e:"";return l||console.warn("[getCitationType] citation has no resolvable type field",n),l}(n);return(null===(o=function(n){var i;return null==n?(console.warn("[getCitationNumber] received null or undefined citation"),""):(null==n.citation_number&&console.warn("[getCitationNumber] citation is missing citation_number field",n),null!==(i=null==n?void 0:n.citation_number)&&void 0!==i?i:"")}(n))||void 0===o?void 0:o.toString())===t.toString()&&i.some(function(n){return null==a?void 0:a.includes(n)})}))&&void 0!==o?o:null:(console.warn("[findCitation] citationTypes is empty or falsy",i),null):(console.warn("[findCitation] citations is not an array",n),null)},l=function(l){var r=l.msg,c=l.citationType,u=l.citationNumber,d=l.enabled,s=void 0!==d&&d,v=l.accessToken,f=l.baseUrl,_=l.orgName,m=l.citationAssistantProcessingName,g=l.citationAgentName,h=(null==r?void 0:r.requestId)||(null==r?void 0:r.id)||"",y=t(function(){return function(n){switch(n){case"artifact_chunks":return["artifact_chunks","scanned_doc_citation","scanned_doc_citations"];case"rai_artifact_citation":return["rai_artifact_citation","rai_artifact_citations"];case"json_chunks":return["json_chunks"];case"scanned_doc_citation":return["scanned_doc_citation","scanned_doc_citations","artifact_chunks"];case"scanned_doc_citations":return["scanned_doc_citations","scanned_doc_citation","artifact_chunks"];default:return[n]}}(c)},[c]),p=function(){switch(c){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";default:return c}}(),C=(null==r?void 0:r.isEcgPayloadActive)?t(function(){return["onDemandCitationFetch",h,p,null==r?void 0:r.customCitationId,null==r?void 0:r.ecg_agent_name]},[h,p,null==r?void 0:r.customCitationId,null==r?void 0:r.ecg_agent_name]):t(function(){return["onDemandCitationFetch",h,p,u]},[h,p,u]),b=t(function(){return e(null==r?void 0:r.citations,y,u)},[null==r?void 0:r.citations,y,u]),N=Boolean(s&&h&&p&&f&&_&&!Number.isNaN(u)&&!b),w=v,A=!0===(null==r?void 0:r.isStreamEnd),k=o({queryKey:C,queryFn:function(){return n(void 0,void 0,void 0,function(){var n,t,o,e,l,c,d,s;return i(this,function(i){switch(i.label){case 0:return[4,a(h,p,u,null!==(t=null==r?void 0:r.content)&&void 0!==t?t:"",w,f,null!=m?m:"",_,null!=g?g:"",null!==(o=null==r?void 0:r.isEcgPayloadActive)&&void 0!==o&&o,null!==(e=null==r?void 0:r.ecg_agent_name)&&void 0!==e?e:"",null!==(l=null==r?void 0:r.customCitationId)&&void 0!==l?l:"",null!==(c=null==r?void 0:r.plan_id)&&void 0!==c?c:"",null!==(d=null==r?void 0:r.ui_chat_history)&&void 0!==d?d:void 0)];case 1:if((n=i.sent()).error||!n.responseData)throw new Error((null===(s=n.error)||void 0===s?void 0:s.errorMessage)||"Failed to fetch on-demand citation");return[2,n.responseData]}})})},enabled:N&&A&&Boolean(null==r?void 0:r.content),staleTime:1/0,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1}),F=t(function(){var n,i,t,o,a,l,c,d=null!==(t=null===(i=null===(n=k.data)||void 0===n?void 0:n.result)||void 0===i?void 0:i.citations)&&void 0!==t?t:[];return Array.isArray(d)&&0!==d.length?(null==r?void 0:r.customCitationId)?null!==(a=null!==(o=d.find(function(n){var i,t,o=null!==(t=null!==(i=null==n?void 0:n.title)&&void 0!==i?i:null==n?void 0:n.display_name)&&void 0!==t?t:"";return"string"==typeof o&&o.includes(r.customCitationId)}))&&void 0!==o?o:d[0])&&void 0!==a?a:null:null!==(c=null!==(l=e(d,y,u))&&void 0!==l?l:d[0])&&void 0!==c?c:null:null},[null==r?void 0:r.customCitationId,u,y,k.data]);return{citation:null!=b?b:F,isFetching:k.isFetching,isLoading:k.isLoading,isComplete:k.isSuccess,status:k.status,refetch:k.refetch}};export{l as useOnDemandCitationFetch};
2
2
  //# sourceMappingURL=useOnDemandCitationFetch.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as e,__generator as r,__assign as t}from"tslib";import n from"axios";import{apiCache as s}from"./apicache.service.js";import{NetworkErrorType as o}from"../types/onDemandApi.types.js";export{NetworkErrorType}from"../types/onDemandApi.types.js";var a=72e5,i=function(n,s,o,a,i,c,u,l,p,d,E,m,g,v){return e(void 0,void 0,void 0,function(){var e,i,R,h;return r(this,function(r){return e="artifact_chunks"===s||"scanned_doc_citation"===s?"artifact_chunks":s,i=d?m:"".concat(e,"_").concat(o),[2,f(R="post",h="/api/chat/chatResponse",{baseURL:c,data:{name:u||"citationsprocessing",organizationName:l,prompt:"",useAgent:{agent_name:p||"ProcessCitationsAgent",arguments:t(t({citation_type:s,is_primary_agent_request:!1},d&&{check_possible_citation_payload:!1}),{ui_request_body:t(t(t({llm_formatted_response:a,request_id:n,max_concurrent_citations:10,citation_id:i},d&&E&&{ecg_agent_name:E}),d&&g&&{plan_id:g}),d&&v&&{ui_chat_history:v})})}},config:{headers:{"Content-Type":"application/json"},withCredentials:!0},errorMessage:"Failed to fetch on-demand citation",cacheOption:{key:"".concat(R,":").concat(h,":onDemandCitation:").concat(n,":").concat(s,":").concat(d?m:o)},shouldCache:function(e){var r;return Array.isArray(null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.citations)&&Boolean(e.result.citations[0])}})]})})},c=function(e){if(e&&"object"==typeof e){var r=e;return"string"==typeof r.message?r.message:"string"==typeof r.errorMessage?r.errorMessage:"string"==typeof r.error?r.error:r.error&&"object"==typeof r.error&&"string"==typeof r.error.message?r.error.message:"string"==typeof r.details?r.details:r}},u=function(t){return e(void 0,void 0,void 0,function(){var e;return r(this,function(r){if(n.isAxiosError(t)){if("ECONNABORTED"===(e=t).code)return[2,{type:o.TIMEOUT,message:"The request took too long to complete. Please try again.",originalError:t}];if(e.message.includes("net::ERR_NETWORK_CHANGED")||e.message.includes("net::ERR_INTERNET_DISCONNECTED")||e.message.includes("net::ERR_NAME_NOT_RESOLVED"))return[2,{type:o.INTERNET_DISCONNECTED,message:"Internet connection issue detected. Please check your network.",originalError:t}];if(e.message.includes("Network Error")||"ERR_NETWORK"===e.code||e.message.includes("net::ERR_CONNECTION_REFUSED")||e.message.includes("net::ERR_EMPTY_RESPONSE"))return[2,{type:o.SERVER_UNREACHABLE,message:"Unable to connect to server. The service may be down or unreachable.",originalError:t}];if(e.response&&e.response.status>=500)return[2,{type:o.SERVER_ERROR,message:"Service Unavailable. Server error (".concat(e.response.status,")."),status:e.response.status,originalError:t}];if(e.response&&e.response.status>=400&&e.response.status<500)return[2,{type:o.SERVER_ERROR,message:c(e.response.data)||"Request failed with status code ".concat(e.response.status),status:e.response.status,originalError:t}]}return[2,{type:o.UNKNOWN_ERROR,message:"An unexpected error occurred. Please try again later.",originalError:t}]})})},l=function(t,s){void 0===s&&(s=18e4);var o=n.create({baseURL:t,timeout:s});return o.interceptors.request.use(function(t){return e(void 0,void 0,void 0,function(){return r(this,function(e){return[2,t]})})},function(t){return e(void 0,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,u(t)];case 1:return e=r.sent(),[2,Promise.reject(e)]}})})}),o.interceptors.response.use(function(e){return e},function(t){return e(void 0,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,u(t)];case 1:return e=r.sent(),console.error("API Request Failed:",e),[2,Promise.reject(e)]}})})}),o},p=function(e,r,t){return"".concat(e,":").concat(r,":").concat(JSON.stringify(t||{}))},d=l(),E=function(n,s,a){return e(void 0,void 0,void 0,function(){var e,i,c,p,E,f,m;return r(this,function(r){switch(r.label){case 0:switch(r.trys.push([0,13,,15]),e=(null==a?void 0:a.baseURL)?l(a.baseURL):d,c=(i=a||{}).data,p=i.config,E=void 0,n.toLowerCase()){case"get":return[3,1];case"post":return[3,3];case"put":return[3,5];case"patch":return[3,7];case"delete":return[3,9]}return[3,11];case 1:return[4,e.get(s,p)];case 2:case 4:case 6:case 8:case 10:return E=r.sent(),[3,12];case 3:return[4,e.post(s,c,p)];case 5:return[4,e.put(s,c,p)];case 7:return[4,e.patch(s,c,p)];case 9:return f=t(t({},p),{data:c}),[4,e.delete(s,f)];case 11:throw new Error("Unsupported method: ".concat(n));case 12:return[2,{responseData:E.data,error:null}];case 13:return(m=r.sent()).type&&Object.values(o).includes(m.type)?[2,{responseData:null,error:m}]:[4,u(m)];case 14:return[2,{responseData:null,error:r.sent()}];case 15:return[2]}})})},f=function(n,i,c){return e(void 0,void 0,void 0,function(){var e,u,l,d,f,m,g,v,R,h,_,y,N,O;return r(this,function(r){switch(r.label){case 0:return u=(e=c||{}).data,l=e.params,d=e.config,f=e.errorMessage,m=e.baseURL,g=e.cacheOption,v=e.shouldCache,R=null!==(O=null==g?void 0:g.ttl)&&void 0!==O?O:a,h=(null==g?void 0:g.key)||p(n,i,l),(null==g?void 0:g.forceRefresh)||(null==g?void 0:g.skipCache)?[3,2]:[4,s.get(h)];case 1:if(_=r.sent())return[2,{responseData:_.data,error:null,cacheMeta:{isFromCache:!0,timestamp:_.timestamp,ttl:_.ttl,cacheKey:h}}];r.label=2;case 2:return y=t(t({},d),l&&{params:l}),[4,E(n,i,{data:u,config:y,baseURL:m})];case 3:return N=r.sent(),!(null==g?void 0:g.skipCache)&&null!=N.responseData&&(!v||v(N.responseData))?[4,s.set(h,N.responseData,R)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[2,{responseData:N.responseData,error:N.error?{errorMessage:N.error.type===o.INTERNET_DISCONNECTED||N.error.type===o.SLOW_CONNECTION||N.error.type===o.TIMEOUT?N.error.message:N.error.type===o.SERVER_UNREACHABLE?"Unable to connect to server. Please try again later.":f||N.error.message,errorObjData:N.error}:null,cacheMeta:{isFromCache:!1,timestamp:Date.now(),ttl:R,cacheKey:h}}]}})})};export{a as DEFAULT_CACHE_TTL,l as createApiInstance,i as fetchOnDemandCitation,p as generateCacheKey,E as makeApiRequest,f as makeApiRequestWithTTLCache};
1
+ import{__awaiter as e,__generator as r,__assign as t}from"tslib";import n from"axios";import{apiCache as s}from"./apicache.service.js";import{NetworkErrorType as o}from"../types/onDemandApi.types.js";export{NetworkErrorType}from"../types/onDemandApi.types.js";var a=72e5,i=function(n,s,o,a,i,c,u,l,p,d,E,m,g,v){return e(void 0,void 0,void 0,function(){var e,i,R,h;return r(this,function(r){return e="artifact_chunks"===s||"scanned_doc_citation"===s?"artifact_chunks":s,i=d?m:"".concat(e,"_").concat(o),[2,f(R="post",h="/api/chat/chatResponse",{baseURL:c,data:{name:u||"citationsprocessing",organizationName:l,prompt:"",useAgent:{agent_name:p||"ProcessCitationsAgent",arguments:t(t({citation_type:s,is_primary_agent_request:!1},d&&{check_possible_citation_payload:!1}),{ui_request_body:t(t(t({llm_formatted_response:a,request_id:n,max_concurrent_citations:10,citation_id:i},d&&E&&{ecg_agent_name:E}),d&&g&&{plan_id:g}),d&&v&&{ui_chat_history:v})})}},config:{headers:{"Content-Type":"application/json"},withCredentials:!0},errorMessage:"Failed to fetch on-demand citation",cacheOption:{key:"".concat(R,":").concat(h,":onDemandCitation:").concat(n,":").concat(s,":").concat(d?m:o,":").concat(d?E:"")},shouldCache:function(e){var r;return Array.isArray(null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.citations)&&Boolean(e.result.citations[0])}})]})})},c=function(e){if(e&&"object"==typeof e){var r=e;return"string"==typeof r.message?r.message:"string"==typeof r.errorMessage?r.errorMessage:"string"==typeof r.error?r.error:r.error&&"object"==typeof r.error&&"string"==typeof r.error.message?r.error.message:"string"==typeof r.details?r.details:r}},u=function(t){return e(void 0,void 0,void 0,function(){var e;return r(this,function(r){if(n.isAxiosError(t)){if("ECONNABORTED"===(e=t).code)return[2,{type:o.TIMEOUT,message:"The request took too long to complete. Please try again.",originalError:t}];if(e.message.includes("net::ERR_NETWORK_CHANGED")||e.message.includes("net::ERR_INTERNET_DISCONNECTED")||e.message.includes("net::ERR_NAME_NOT_RESOLVED"))return[2,{type:o.INTERNET_DISCONNECTED,message:"Internet connection issue detected. Please check your network.",originalError:t}];if(e.message.includes("Network Error")||"ERR_NETWORK"===e.code||e.message.includes("net::ERR_CONNECTION_REFUSED")||e.message.includes("net::ERR_EMPTY_RESPONSE"))return[2,{type:o.SERVER_UNREACHABLE,message:"Unable to connect to server. The service may be down or unreachable.",originalError:t}];if(e.response&&e.response.status>=500)return[2,{type:o.SERVER_ERROR,message:"Service Unavailable. Server error (".concat(e.response.status,")."),status:e.response.status,originalError:t}];if(e.response&&e.response.status>=400&&e.response.status<500)return[2,{type:o.SERVER_ERROR,message:c(e.response.data)||"Request failed with status code ".concat(e.response.status),status:e.response.status,originalError:t}]}return[2,{type:o.UNKNOWN_ERROR,message:"An unexpected error occurred. Please try again later.",originalError:t}]})})},l=function(t,s){void 0===s&&(s=18e4);var o=n.create({baseURL:t,timeout:s});return o.interceptors.request.use(function(t){return e(void 0,void 0,void 0,function(){return r(this,function(e){return[2,t]})})},function(t){return e(void 0,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,u(t)];case 1:return e=r.sent(),[2,Promise.reject(e)]}})})}),o.interceptors.response.use(function(e){return e},function(t){return e(void 0,void 0,void 0,function(){var e;return r(this,function(r){switch(r.label){case 0:return[4,u(t)];case 1:return e=r.sent(),console.error("API Request Failed:",e),[2,Promise.reject(e)]}})})}),o},p=function(e,r,t){return"".concat(e,":").concat(r,":").concat(JSON.stringify(t||{}))},d=l(),E=function(n,s,a){return e(void 0,void 0,void 0,function(){var e,i,c,p,E,f,m;return r(this,function(r){switch(r.label){case 0:switch(r.trys.push([0,13,,15]),e=(null==a?void 0:a.baseURL)?l(a.baseURL):d,c=(i=a||{}).data,p=i.config,E=void 0,n.toLowerCase()){case"get":return[3,1];case"post":return[3,3];case"put":return[3,5];case"patch":return[3,7];case"delete":return[3,9]}return[3,11];case 1:return[4,e.get(s,p)];case 2:case 4:case 6:case 8:case 10:return E=r.sent(),[3,12];case 3:return[4,e.post(s,c,p)];case 5:return[4,e.put(s,c,p)];case 7:return[4,e.patch(s,c,p)];case 9:return f=t(t({},p),{data:c}),[4,e.delete(s,f)];case 11:throw new Error("Unsupported method: ".concat(n));case 12:return[2,{responseData:E.data,error:null}];case 13:return(m=r.sent()).type&&Object.values(o).includes(m.type)?[2,{responseData:null,error:m}]:[4,u(m)];case 14:return[2,{responseData:null,error:r.sent()}];case 15:return[2]}})})},f=function(n,i,c){return e(void 0,void 0,void 0,function(){var e,u,l,d,f,m,g,v,R,h,_,y,N,O;return r(this,function(r){switch(r.label){case 0:return u=(e=c||{}).data,l=e.params,d=e.config,f=e.errorMessage,m=e.baseURL,g=e.cacheOption,v=e.shouldCache,R=null!==(O=null==g?void 0:g.ttl)&&void 0!==O?O:a,h=(null==g?void 0:g.key)||p(n,i,l),(null==g?void 0:g.forceRefresh)||(null==g?void 0:g.skipCache)?[3,2]:[4,s.get(h)];case 1:if(_=r.sent())return[2,{responseData:_.data,error:null,cacheMeta:{isFromCache:!0,timestamp:_.timestamp,ttl:_.ttl,cacheKey:h}}];r.label=2;case 2:return y=t(t({},d),l&&{params:l}),[4,E(n,i,{data:u,config:y,baseURL:m})];case 3:return N=r.sent(),!(null==g?void 0:g.skipCache)&&null!=N.responseData&&(!v||v(N.responseData))?[4,s.set(h,N.responseData,R)]:[3,5];case 4:r.sent(),r.label=5;case 5:return[2,{responseData:N.responseData,error:N.error?{errorMessage:N.error.type===o.INTERNET_DISCONNECTED||N.error.type===o.SLOW_CONNECTION||N.error.type===o.TIMEOUT?N.error.message:N.error.type===o.SERVER_UNREACHABLE?"Unable to connect to server. Please try again later.":f||N.error.message,errorObjData:N.error}:null,cacheMeta:{isFromCache:!1,timestamp:Date.now(),ttl:R,cacheKey:h}}]}})})};export{a as DEFAULT_CACHE_TTL,l as createApiInstance,i as fetchOnDemandCitation,p as generateCacheKey,E as makeApiRequest,f as makeApiRequestWithTTLCache};
2
2
  //# sourceMappingURL=onDemandApi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,oBAAoB,+CA4MzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,oBAAoB,+CAkNzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -2,6 +2,8 @@ import React, { CSSProperties } from "react";
2
2
  interface CitationAnchorProps {
3
3
  href: string;
4
4
  children: any;
5
+ citationType?: string;
6
+ citationReason?: string;
5
7
  chevronUpComponent?: React.ReactNode;
6
8
  chevronDownComponent?: React.ReactNode;
7
9
  customStyle?: {
@@ -21,6 +23,7 @@ interface CitationAnchorProps {
21
23
  };
22
24
  defaultState?: boolean;
23
25
  metaData?: any;
26
+ onFullscreenChange?: (isFullscreen: boolean) => void;
24
27
  }
25
28
  declare const CitationAnchor: React.FC<CitationAnchorProps>;
26
29
  export default CitationAnchor;
@@ -1 +1 @@
1
- {"version":3,"file":"CitationAnchor.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationAnchor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EACV,aAAa,EAKhB,MAAM,OAAO,CAAC;AAKf,UAAU,mBAAmB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACV,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,cAAc,CAAC,EAAE,aAAa,CAAC;QAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;QACpC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;KACnC,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAClB;AAsHD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAiKjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CitationAnchor.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationAnchor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EACV,aAAa,EAKhB,MAAM,OAAO,CAAC;AAcf,UAAU,mBAAmB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACV,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,cAAc,CAAC,EAAE,aAAa,CAAC;QAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;QACpC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;KACnC,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD;AAuaD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwNjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -4,8 +4,10 @@ type Props = {
4
4
  citations?: Record<string, any>;
5
5
  styles?: Record<string, any>;
6
6
  docData?: Record<string, any> | null;
7
+ deviationData?: Record<string, any> | null;
7
8
  open: boolean;
9
+ onCitationFullscreenChange?: (isFullscreen: boolean) => void;
8
10
  };
9
- declare function CitationRenderer({ content, title, citations, styles, docData, open }: Props): import("react/jsx-runtime").JSX.Element;
11
+ declare function CitationRenderer({ content, title, citations, styles, docData, deviationData, open, onCitationFullscreenChange, }: Props): import("react/jsx-runtime").JSX.Element;
10
12
  export default CitationRenderer;
11
13
  //# sourceMappingURL=CitationRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationRenderer.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,iBAAS,gBAAgB,CAAC,EACtB,OAAY,EACZ,KAAU,EACV,SAAc,EACd,MAAW,EACX,OAAmC,EACnC,IAAI,EACP,EAAE,KAAK,2CA2EP;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"CitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationRenderer.tsx"],"names":[],"mappings":"AAOA,KAAK,KAAK,GAAG;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,0BAA0B,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CAChE,CAAA;AAkCD,iBAAS,gBAAgB,CAAC,EACtB,OAAY,EACZ,KAAU,EACV,SAAc,EACd,MAAW,EACX,OAAmC,EACnC,aAAoB,EACpB,IAAI,EACJ,0BAA0B,GAC7B,EAAE,KAAK,2CAmHP;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { CognitiveCompareProps } from "./CognitiveCompareTypes";
2
2
  import { SHARED_MARKDOWN_STYLES } from "./CognitiveCompareConfig";
3
- declare const CognitiveCompare: ({ componentHeaderText, treeData, comparisonConfig, leftColumnTitleText, rightColumnTitleText, markdownStyles, resetTrigger, displayConfig, onMaintainRelativeOrderChange, popupConfig, deviationData, deviationNodeIdToView, resetDeviationNodeId, isProposingFix, proposingFixNodeId, isRedlineFlow, badgeStyleOverride, }: CognitiveCompareProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const CognitiveCompare: ({ componentHeaderText, treeData, comparisonConfig, leftColumnTitleText, rightColumnTitleText, markdownStyles, resetTrigger, displayConfig, onMaintainRelativeOrderChange, popupConfig, deviationData, deviationNodeIdToView, resetDeviationNodeId, isProposingFix, proposingFixNodeId, isRedlineFlow, badgeStyleOverride, guidelinesData, gptWebCitationConfig }: CognitiveCompareProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export { SHARED_MARKDOWN_STYLES };
5
5
  export default CognitiveCompare;
6
6
  //# sourceMappingURL=CognitiveCompare.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompare.tsx"],"names":[],"mappings":"AA0CA,OAAO,EAEL,qBAAqB,EAOtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AA0BlC,QAAA,MAAM,gBAAgB,gUA2BnB,qBAAqB,4CA6iFvB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CognitiveCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompare.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAEL,qBAAqB,EAOtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AA6BlC,QAAA,MAAM,gBAAgB,qWA6BnB,qBAAqB,4CAm7FvB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,eAAe,gBAAgB,CAAC"}
@@ -94,7 +94,17 @@ export type ConflictBadgeStyleFn = (scoreText: string | null | undefined) => {
94
94
  text: string;
95
95
  border: string;
96
96
  } | null;
97
+ export interface GptWebCitationConfig {
98
+ endpoint: string;
99
+ userEmail: string;
100
+ userId: string;
101
+ userName: string;
102
+ headers?: Record<string, string>;
103
+ }
97
104
  export interface CognitiveCompareProps {
105
+ guidelinesData?: Record<string, any> | null;
106
+ gptWebCitationConfig?: GptWebCitationConfig;
107
+ isGuidelineMode?: boolean;
98
108
  componentHeaderText?: string;
99
109
  treeData?: Record<string, any> | null;
100
110
  comparisonConfig?: Partial<ComparisonConfig>;
@@ -177,6 +187,10 @@ export interface CognitivePopupProps {
177
187
  }
178
188
  export type SectionBlock = {
179
189
  id?: string;
190
+ nodeId?: string;
191
+ contentId?: string;
192
+ parentContentId?: string | null;
193
+ refContentIds?: string[];
180
194
  title: string;
181
195
  content: string;
182
196
  change_history?: string;
@@ -188,6 +202,7 @@ export type SectionBlock = {
188
202
  selfIndex?: number;
189
203
  refIndexes?: number[];
190
204
  evaluationResult?: DeviationDataEntry;
205
+ evaluationResults?: DeviationDataEntry[];
191
206
  displayContent?: boolean;
192
207
  displayTitle?: boolean;
193
208
  };
@@ -204,6 +219,7 @@ export type SectionPopupState = {
204
219
  docData: Record<string, any> | null;
205
220
  deviationData?: DeviationDataEntry | null;
206
221
  isLoading?: boolean;
222
+ hasGuidelineMatches?: boolean;
207
223
  };
208
224
  export type Row = {
209
225
  left?: SectionBlock;
@@ -252,6 +268,9 @@ export interface CachedBadgePosition {
252
268
  rhsArrayIdx: number | string;
253
269
  styleColor: string;
254
270
  styleId: string;
271
+ styleBg?: string;
272
+ styleText?: string;
273
+ centerX?: number;
255
274
  }
256
275
  export type CognitiveSummaryPopupProps = {
257
276
  open: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompareTypes.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompareTypes.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B,EAAE;QAC1B,OAAO,EAAE;YACP,aAAa,EAA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AC;CACxB,CAAC;AAEJ,MAAM,MAAM,SAAS,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,CAC3E,GAAG,EACH,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAChC,CAAC"}
1
+ {"version":3,"file":"CognitiveCompareTypes.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompareTypes.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B,EAAE;QAC1B,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC;YACtB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GACV,uBAAuB,GACvB;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;aAAE,CAAC;SAC1D,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,qBAAqB,CAAC,EAAE;QACtB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAA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GAAG,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEJ,MAAM,MAAM,SAAS,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,CAC3E,GAAG,EACH,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAChC,CAAC"}
@@ -1,12 +1,29 @@
1
1
  import { SectionBlock } from "./CognitiveCompareTypes";
2
2
  export declare const safeStringify: (val: unknown) => string;
3
3
  export declare const hasValue: (val: unknown) => boolean;
4
- export declare const getSideData: (node: any, sideIndex: "0" | "1", indexMap: Record<string, string>) => {
4
+ export declare const getAlphabeticSuffix: (index: number) => string;
5
+ export declare const getRhsMappedSectionNumber: ({ section, proposedSections, leftNums, fallbackNumber, firstOnly, }: {
6
+ section: SectionBlock;
7
+ proposedSections: SectionBlock[];
8
+ leftNums: Map<string, number>;
9
+ fallbackNumber?: string | undefined;
10
+ firstOnly?: boolean | undefined;
11
+ }) => string | null | undefined;
12
+ export declare const hasSingleMappedLhsSection: (section: SectionBlock, proposedSections: SectionBlock[]) => boolean;
13
+ export type ResolvedContentItem = {
14
+ contentId: string;
15
+ data: Record<string, unknown>;
16
+ attributes: Record<string, unknown>;
17
+ };
18
+ export declare const resolveComparisonInputItems: (node: any, sideIndex: "0" | "1", indexMap: Record<string, string>, contentMapping?: Record<string, any>) => ResolvedContentItem[];
19
+ export declare const getSideData: (node: any, sideIndex: "0" | "1", indexMap: Record<string, string>, contentMapping?: Record<string, any>) => {
5
20
  title: string;
6
21
  content: string;
7
22
  change_history: string;
8
- attributes: any;
9
- subsections: any;
23
+ attributes: Record<string, unknown>;
24
+ subsections: {};
25
+ contentId: string;
26
+ allItems: ResolvedContentItem[];
10
27
  };
11
28
  export declare const getRationale: (node: any) => {
12
29
  cognitiveData: {
@@ -46,6 +63,7 @@ export declare const DEVIATION_BADGE_SEPARATOR = "::";
46
63
  export declare const isMissingStr: (str: string | undefined | null) => boolean;
47
64
  export declare const hasMeaningfulRedlineTags: (content: unknown) => boolean;
48
65
  export declare const stripRedlineTags: (content: unknown) => string;
66
+ export declare const getLhsDeviationDisplayIndexes: (sections: SectionBlock[], leftDocId: string | undefined, deviationNumberRegistry: Record<string, number>) => Map<string, number>;
49
67
  export declare const extractDeviationScore: (evaluationResult: any, fallbackLabel?: any) => any;
50
68
  export declare const getBentArrowPath: (x1: number, y1: number, x2: number, y2: number, radius?: number) => string;
51
69
  export declare const smoothScrollTo: (element: HTMLElement, targetPosition: number, duration?: number, onComplete?: () => void, onProgress?: () => void) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveComparehelpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveComparehelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EAEb,MAAM,yBAAyB,CAAC;AAGjC,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,MAM5C,CAAC;AAGF,eAAO,MAAM,QAAQ,QAAS,OAAO,KAAG,OAKvC,CAAC;AAGF,eAAO,MAAM,WAAW,SAChB,GAAG,aACE,GAAG,GAAG,GAAG,YACV,OAAO,MAAM,EAAE,MAAM,CAAC;;;;;;CAWjC,CAAC;AAGF,eAAO,MAAM,YAAY,SAAU,GAAG;;;;;;;;;;;;;;;;;;;;CA2BrC,CAAC;AAGF,eAAO,MAAM,qBAAqB,aAAc,MAAM,KAAG,MAOxD,CAAC;AAqDF,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAuD9D;AAED,wBAAgB,QAAQ,CAAC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IAUX,CAAC;AAIF,eAAO,MAAM,oBAAoB,YAAa,WAAW,SAkBxD,CAAC;AAEF,eAAO,MAAM,eAAe,YAAa,WAAW,SAiBnD,CAAC;AAEF,eAAO,MAAM,wBAAwB,YAC1B,WAAW,mBACH,WAAW,SAiC7B,CAAC;AAGF,eAAO,MAAM,qBAAqB,YACvB,WAAW,aACT,MAAM,IAAI,SAkBtB,CAAC;AAGF,eAAO,MAAM,aAAa,cACb,WAAW,OACjB,MAAM,YACD,MAAM,IAAI,SAuBrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,WAAW,sBAErB,QAAQ,IAAI,CAmBb,CAAC"}
1
+ {"version":3,"file":"CognitiveComparehelpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveComparehelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,EAEb,MAAM,yBAAyB,CAAC;AAGjC,eAAO,MAAM,aAAa,QAAS,OAAO,KAAG,MAM5C,CAAC;AAGF,eAAO,MAAM,QAAQ,QAAS,OAAO,KAAG,OAKvC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAAW,MAAM,WAYhD,CAAC;AAEF,eAAO,MAAM,yBAAyB;aAO3B,YAAY;sBACH,YAAY,EAAE;cACtB,IAAI,MAAM,EAAE,MAAM,CAAC;;;+BA0B9B,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAC3B,YAAY,oBACH,YAAY,EAAE,YASjC,CAAC;AAGF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,SAChC,GAAG,aACE,GAAG,GAAG,GAAG,YACV,OAAO,MAAM,EAAE,MAAM,CAAC,mBAChB,OAAO,MAAM,EAAE,GAAG,CA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/CognitivePopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAO5D,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAWjC,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAC5B,mBAAmB,GAAG;IAAE,WAAW,CAAC,EAAE,oBAAoB,CAAA;CAAE,CA0f7D,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"CognitivePopup.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitivePopup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAWjC,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAC5B,mBAAmB,GAAG;IAAE,WAAW,CAAC,EAAE,oBAAoB,CAAA;CAAE,CAygB7D,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
- import { IDisplayConfig, SectionBlock, StyleVariant } from "./CognitiveCompareTypes";
2
+ import { GptWebCitationConfig, IDisplayConfig, SectionBlock, StyleVariant } from "./CognitiveCompareTypes";
3
3
  export type UnifiedNumbering = {
4
4
  leftNums: Map<string, number>;
5
5
  rightNums: Map<string, string>;
6
6
  };
7
7
  export type CompareContextValue = {
8
+ isGuidelineMode: boolean;
8
9
  maintainRelativeOrder: boolean;
9
10
  showDeviationBadges: boolean;
10
11
  isProposingFix?: boolean;
@@ -53,6 +54,7 @@ export type CompareContextValue = {
53
54
  columnKey: "left" | "right";
54
55
  parentNodeId: string;
55
56
  sectionOffset?: number;
57
+ rhsOrphanVisualIndexes?: ReadonlyMap<string, number>;
56
58
  }) => React.ReactNode;
57
59
  resetSideBySide: () => void;
58
60
  setConnectedSections: React.Dispatch<React.SetStateAction<Set<number | string>>>;
@@ -62,6 +64,8 @@ export type CompareContextValue = {
62
64
  showOpenNodeRef: React.MutableRefObject<string | undefined>;
63
65
  deviationNodeIdToView?: string | undefined;
64
66
  deviationTargetParentId?: string | null;
67
+ guidelinesData?: any;
68
+ gptWebCitationConfig?: GptWebCitationConfig;
65
69
  };
66
70
  export declare const CompareContextProvider: React.Provider<CompareContextValue | null>;
67
71
  export declare const useCompareContext: () => CompareContextValue;
@@ -1 +1 @@
1
- {"version":3,"file":"CompareContext.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CompareContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAErF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,uBAAuB,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAChD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACvD,oBAAoB,EAAE,WAAW,GAAG,IAAI,CAAC;IACzC,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACxC,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,gBAAgB,EAAE,YAAY,EAAE,CA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