@e-llm-studio/citation 0.0.192 → 0.0.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/SplitterCitations/SplitterCitationsComponent.js +1 -1
- package/dist/cjs/features/TextualGuidelines/TextualGuideLinesComponent.js +1 -1
- package/dist/features/SplitterCitations/SplitterCitationsComponent.js +1 -1
- package/dist/features/TextualGuidelines/TextualGuideLinesComponent.js +1 -1
- package/dist/types/src/features/SplitterCitations/SplitterCitationsComponent.d.ts.map +1 -1
- package/dist/types/src/features/TextualGuidelines/TextualGudelinesTest.d.ts.map +1 -1
- package/dist/types/src/features/TextualGuidelines/TextualGuideLinesComponent.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),a=require("lucide-react"),i=require("./Splitter.module.css.js"),s=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},l=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},o=function(){return t.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[t.jsx("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),t.jsx("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},c=function(){return t.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:t.jsx("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))};exports.default=function(r){var d=r.left,u=r.right,f=r.defaultLeftWidth,h=void 0===f?50:f,x=r.minLeftWidth,g=void 0===x?250:x,v=r.minRightWidth,C=void 0===v?250:v,p=r.className,_=void 0===p?"":p,m=r.height,j=void 0===m?"400px":m,w=r.width,N=void 0===w?"100%":w,H=r.header,L=r.onLeftWidthChange,B=r.openInFullscreen,A=void 0!==B&&B,k=r.onFullscreenClose,M=n.useState(h),V=M[0],b=M[1],E=n.useState(h),S=E[0],F=E[1],z=n.useState(!1),y=z[0],R=z[1],D=n.useState(!1),O=D[0],P=D[1],q=n.useState(!1),T=q[0],Z=q[1],I=n.useState(0),W=I[0],X=I[1],U=n.useState(0),Y=U[0],G=U[1],J=n.useState(A),K=J[0],Q=J[1],$=n.useRef(null),ee=n.useRef(null),te=n.useRef(null),ne=n.useRef(null);n.useEffect(function(){var e=$.current;e&&(K?(e.showModal(),requestAnimationFrame(function(){if(ne.current){var e=ne.current.getBoundingClientRect().width;G(e),b(h),F(h),P(!1),Z(!1)}})):(e.close(),b(h),F(h),P(!1),Z(!1),null==k||k()))},[K]),n.useEffect(function(){var e=ne.current;if(e&&K){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){G(n.contentRect.width)})});return n.observe(e),function(){cancelAnimationFrame(t),n.disconnect()}}},[K]),n.useEffect(function(){var e=ee.current;if(e){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){X(n.contentRect.width)})});return n.observe(e),X(e.getBoundingClientRect().width),function(){cancelAnimationFrame(t),n.disconnect()}}},[]);var ae=W>0&&W<500,ie=function(e){e.preventDefault(),R(!0)};n.useEffect(function(){var e=function(e){if(y)if(ae&&te.current){var t=te.current.getBoundingClientRect(),n=t.height,a=e.clientY-t.top;if(a>=g&&n-a-4>=C)F(a/n*100)}else if(!ae){var i=K?ne.current:ee.current;if(!i)return;var s=i.getBoundingClientRect(),l=s.width,o=e.clientX-s.left;if(o>=g&&l-o-4>=C)b(o/l*100),null==L||L(o)}},t=function(){R(!1)};return y&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[y,ae,K,g,C,L]);var se,le=function(){O?(b(50),F(50),P(!1)):P(!0)},oe=function(){T?(b(50),F(50),Z(!1)):Z(!0)},ce=K?Y:W,re=V/100*ce,de=ce-re-4,ue=K?500:250;se=ae?T?{flex:1}:{height:"".concat(S,"%")}:T?{flex:1}:{width:"".concat(V,"%")};var fe,he=!ae&&!O&&re<=Math.max(g+10,ue),xe=!ae&&!T&&de<=Math.max(C+10,ue),ge=function(e){return e>=80?i.default.confidenceScoreHigh:e>=60?i.default.confidenceScoreMedium:i.default.confidenceScoreLow},ve="number"==typeof j?"".concat(j,"px"):j,Ce="number"==typeof N?"".concat(N,"px"):N;return t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({ref:ee,className:"".concat(i.default.container," ").concat(ae?i.default.containerVertical:i.default.containerHorizontal," ").concat(_),style:{height:ae?"auto":ve,width:Ce}},{children:[H&&t.jsxs("div",e.__assign({className:i.default.header},{children:[t.jsxs("div",e.__assign({className:i.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:i.default.headerIcon}),t.jsx("div",e.__assign({className:i.default.headerTitle},{children:H.title&&t.jsx("span",e.__assign({className:i.default.headerTitleText},{children:H.title}))}))]})),t.jsxs("div",e.__assign({className:i.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(i.default.confidenceScore," ").concat(ge(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(o,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:i.default.fullscreenButton,onClick:function(){return Q(!0)},title:"Open fullscreen"},{children:t.jsx(c,{})}))]}))]})),(fe=!1,t.jsxs("div",e.__assign({ref:fe?void 0:te,className:"".concat(i.default.contentArea," ").concat(ae?i.default.contentAreaVertical:i.default.contentAreaHorizontal)},{children:[!O&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ae?i.default.panelVertical:""),style:e.__assign(e.__assign({},se),ae?{height:ve}:{})},{children:d})),O&&t.jsx("button",e.__assign({onClick:le,className:"".concat(i.default.expandButton," ").concat(ae?i.default.expandButtonVertical:i.default.expandButtonHorizontal),title:ae?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:ae?t.jsx(a.ChevronDown,{size:14}):t.jsx(s,{})})),!O&&!T&&t.jsxs("div",e.__assign({onMouseDown:ie,className:"".concat(i.default.divider," ").concat(ae?i.default.dividerVertical:i.default.dividerHorizontal," ").concat(y?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(ae?i.default.dividerHitAreaVertical:i.default.dividerHitAreaHorizontal)}),he&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),le()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),xe&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),oe()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!T&&t.jsx("div",e.__assign({className:"".concat(i.default.panel," ").concat(ae?i.default.panelVertical:""),style:e.__assign({flex:1},ae?{height:ve}:{})},{children:u})),T&&t.jsx("button",e.__assign({onClick:oe,className:"".concat(i.default.expandButton," ").concat(ae?i.default.expandButtonBottomVertical:i.default.expandButtonRightHorizontal),title:ae?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:ae?t.jsx(a.ChevronUp,{size:14}):t.jsx(l,{})})),y&&t.jsx("div",{className:"".concat(i.default.dragOverlay," ").concat(ae?i.default.dragOverlayVertical:i.default.dragOverlayHorizontal)})]})))]})),t.jsx("dialog",e.__assign({ref:$,className:i.default.dialogOverlay,onClose:function(){return Q(!1)}},{children:t.jsxs("div",e.__assign({ref:ne,className:i.default.dialogContent},{children:[H&&t.jsxs("div",e.__assign({className:i.default.header},{children:[t.jsxs("div",e.__assign({className:i.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:i.default.headerIcon}),t.jsx("div",e.__assign({className:i.default.headerTitle},{children:H.title&&t.jsx(t.Fragment,{children:t.jsx("span",e.__assign({className:i.default.headerTitleText},{children:H.title}))})}))]})),t.jsxs("div",e.__assign({className:i.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(i.default.confidenceScore," ").concat(ge(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(o,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:i.default.fullscreenButton,onClick:function(){return Q(!1)},title:"Close fullscreen"},{children:t.jsx(a.X,{size:20,color:"#5928ed"})}))]}))]})),t.jsxs("div",e.__assign({className:"".concat(i.default.contentArea," ").concat(i.default.contentAreaHorizontal," ").concat(i.default.dialogContentArea)},{children:[!O&&t.jsx("div",e.__assign({className:i.default.panel,style:se},{children:d})),O&&t.jsx("button",e.__assign({onClick:le,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(s,{})})),!O&&!T&&t.jsxs("div",e.__assign({onMouseDown:ie,className:"".concat(i.default.divider," ").concat(i.default.dividerHorizontal," ").concat(y?i.default.dividerDragging:i.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(i.default.dividerHitArea," ").concat(i.default.dividerHitAreaHorizontal)}),he&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),le()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(l,{})})),xe&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),oe()},onMouseDown:function(e){return e.stopPropagation()},className:i.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(s,{})}))]})),!T&&t.jsx("div",e.__assign({className:i.default.panel,style:{flex:1}},{children:u})),T&&t.jsx("button",e.__assign({onClick:oe,className:"".concat(i.default.expandButton," ").concat(i.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(l,{})})),y&&t.jsx("div",{className:"".concat(i.default.dragOverlay," ").concat(i.default.dragOverlayHorizontal)})]}))]}))}))]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),a=require("lucide-react"),s=require("./Splitter.module.css.js"),i=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},o=function(){return t.jsxs("svg",e.__assign({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[t.jsx("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),t.jsx("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},l=function(){return t.jsxs("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[t.jsx("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),t.jsx("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},c=function(){return t.jsx("svg",e.__assign({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:t.jsx("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))};exports.default=function(d){var r=d.left,u=d.right,f=d.defaultLeftWidth,h=void 0===f?50:f,x=d.minLeftWidth,g=void 0===x?250:x,v=d.minRightWidth,C=void 0===v?250:v,p=d.className,_=void 0===p?"":p,m=d.height,j=void 0===m?"400px":m,w=d.width,N=void 0===w?"100%":w,H=d.header,L=d.onLeftWidthChange,k=d.openInFullscreen,M=void 0!==k&&k,A=d.onFullscreenClose,B=n.useState(h),b=B[0],F=B[1],S=n.useState(!1),E=S[0],z=S[1],y=n.useState(!1),R=y[0],V=y[1],D=n.useState(!1),O=D[0],P=D[1],q=n.useState(0),T=q[0],Z=q[1],I=n.useState(0),W=I[0],X=I[1],G=n.useState(M),J=G[0],K=G[1],Q=n.useRef(null),U=n.useRef(null),Y=n.useRef(null);n.useEffect(function(){var e=Q.current;e&&(J?(e.showModal(),requestAnimationFrame(function(){if(Y.current){var e=Y.current.getBoundingClientRect().width;X(e),F(h),V(!1),P(!1)}})):(e.close(),F(h),V(!1),P(!1),null==A||A()))},[J]),n.useEffect(function(){var e=Y.current;if(e&&J){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){X(n.contentRect.width)})});return n.observe(e),function(){cancelAnimationFrame(t),n.disconnect()}}},[J]),n.useEffect(function(){var e=U.current;if(e){var t,n=new ResizeObserver(function(e){var n=e[0];t=requestAnimationFrame(function(){Z(n.contentRect.width)})});return n.observe(e),Z(e.getBoundingClientRect().width),function(){cancelAnimationFrame(t),n.disconnect()}}},[]);var $=function(e){e.preventDefault(),z(!0)};n.useEffect(function(){var e=function(e){if(E){var t=J?Y.current:U.current;if(t){var n=t.getBoundingClientRect(),a=n.width,s=e.clientX-n.left;if(s>=g&&a-s-4>=C)F(s/a*100),null==L||L(s)}}},t=function(){z(!1)};return E&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[E,J,g,C,L]);var ee=function(){R?(F(50),V(!1)):V(!0)},te=function(){O?(F(50),P(!1)):P(!0)},ne=J?W:T,ae=b/100*ne,se=ne-ae-4,ie=J?500:250,oe=O?{flex:1}:{width:"".concat(b,"%")},le=!R&&ae<=Math.max(g+10,ie),ce=!O&&se<=Math.max(C+10,ie),de=function(e){return e>=80?s.default.confidenceScoreHigh:e>=60?s.default.confidenceScoreMedium:s.default.confidenceScoreLow},re="number"==typeof j?"".concat(j,"px"):j,ue="number"==typeof N?"".concat(N,"px"):N;return t.jsxs(t.Fragment,{children:[t.jsxs("div",e.__assign({ref:U,className:"".concat(s.default.container," ").concat(s.default.containerHorizontal," ").concat(_),style:{height:re,width:ue}},{children:[H&&t.jsxs("div",e.__assign({className:s.default.header},{children:[t.jsxs("div",e.__assign({className:s.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:s.default.headerIcon}),t.jsx("div",e.__assign({className:s.default.headerTitle},{children:H.title&&t.jsx("span",e.__assign({className:s.default.headerTitleText},{children:H.title}))}))]})),t.jsxs("div",e.__assign({className:s.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(s.default.confidenceScore," ").concat(de(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(l,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:s.default.fullscreenButton,onClick:function(){return K(!0)},title:"Open fullscreen"},{children:t.jsx(c,{})}))]}))]})),t.jsxs("div",e.__assign({className:"".concat(s.default.contentArea," ").concat(s.default.contentAreaHorizontal)},{children:[!R&&t.jsx("div",e.__assign({className:s.default.panel,style:oe},{children:r})),R&&t.jsx("button",e.__assign({onClick:ee,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(i,{})})),!R&&!O&&t.jsxs("div",e.__assign({onMouseDown:$,className:"".concat(s.default.divider," ").concat(s.default.dividerHorizontal," ").concat(E?s.default.dividerDragging:s.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(s.default.dividerHitArea," ").concat(s.default.dividerHitAreaHorizontal)}),le&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ee()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(o,{})})),ce&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),te()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(i,{})}))]})),!O&&t.jsx("div",e.__assign({className:s.default.panel,style:{flex:1}},{children:u})),O&&t.jsx("button",e.__assign({onClick:te,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(o,{})})),E&&t.jsx("div",{className:"".concat(s.default.dragOverlay," ").concat(s.default.dragOverlayHorizontal)})]}))]})),t.jsx("dialog",e.__assign({ref:Q,className:s.default.dialogOverlay,onClose:function(){return K(!1)}},{children:t.jsxs("div",e.__assign({ref:Y,className:s.default.dialogContent},{children:[H&&t.jsxs("div",e.__assign({className:s.default.header},{children:[t.jsxs("div",e.__assign({className:s.default.headerLeft},{children:[H.showDocIcon&&t.jsx(a.FileText,{className:s.default.headerIcon}),t.jsx("div",e.__assign({className:s.default.headerTitle},{children:H.title&&t.jsx(t.Fragment,{children:t.jsx("span",e.__assign({className:s.default.headerTitleText},{children:H.title}))})}))]})),t.jsxs("div",e.__assign({className:s.default.headerActions},{children:[void 0!==H.confidenceScore&&t.jsxs("div",e.__assign({className:"".concat(s.default.confidenceScore," ").concat(de(H.confidenceScore))},{children:[t.jsx("div",e.__assign({style:{width:"16px",height:"16px"}},{children:t.jsx(l,{})})),t.jsxs("div",{children:[Math.round(H.confidenceScore),"%"]})]})),t.jsx("button",e.__assign({className:s.default.fullscreenButton,onClick:function(){return K(!1)},title:"Close fullscreen"},{children:t.jsx(a.X,{size:20,color:"#5928ed"})}))]}))]})),t.jsxs("div",e.__assign({className:"".concat(s.default.contentArea," ").concat(s.default.contentAreaHorizontal," ").concat(s.default.dialogContentArea)},{children:[!R&&t.jsx("div",e.__assign({className:s.default.panel,style:oe},{children:r})),R&&t.jsx("button",e.__assign({onClick:ee,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:t.jsx(i,{})})),!R&&!O&&t.jsxs("div",e.__assign({onMouseDown:$,className:"".concat(s.default.divider," ").concat(s.default.dividerHorizontal," ").concat(E?s.default.dividerDragging:s.default.dividerIdle)},{children:[t.jsx("div",{className:"".concat(s.default.dividerHitArea," ").concat(s.default.dividerHitAreaHorizontal)}),le&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),ee()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse left panel"},{children:t.jsx(o,{})})),ce&&t.jsx("button",e.__assign({onClick:function(e){e.stopPropagation(),te()},onMouseDown:function(e){return e.stopPropagation()},className:s.default.collapseButton,title:"Collapse right panel"},{children:t.jsx(i,{})}))]})),!O&&t.jsx("div",e.__assign({className:s.default.panel,style:{flex:1}},{children:u})),O&&t.jsx("button",e.__assign({onClick:te,className:"".concat(s.default.expandButton," ").concat(s.default.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:t.jsx(o,{})})),E&&t.jsx("div",{className:"".concat(s.default.dragOverlay," ").concat(s.default.dragOverlayHorizontal)})]}))]}))}))]})};
|
|
2
2
|
//# sourceMappingURL=SplitterCitationsComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react"),r=require("./TextualGuidelines.module.css.js"),s=require("../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),a=function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")},o=function(e,n){var t=e.map(a).filter(Boolean),i=n.map(a).filter(Boolean);if(0===t.length||0===i.length)return 0;var r=new Set(t),s=new Set(i),o=0;return r.forEach(function(e){s.has(e)&&o++}),2*o/(r.size+s.size)},l=function(t){var i=0;return t.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(t){var s="bold-".concat(i);return i+=t.length,t.startsWith("**")&&t.endsWith("**")||t.startsWith("__")&&t.endsWith("__")?n.jsx("strong",e.__assign({className:r.default.boldText},{children:t.slice(2,-2)}),s):t})};exports.default=function(a){a.index;var d=a.TextualGuideLines,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react"),r=require("./TextualGuidelines.module.css.js"),s=require("../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),a=function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")},o=function(e,n){var t=e.map(a).filter(Boolean),i=n.map(a).filter(Boolean);if(0===t.length||0===i.length)return 0;var r=new Set(t),s=new Set(i),o=0;return r.forEach(function(e){s.has(e)&&o++}),2*o/(r.size+s.size)},l=function(t){var i=0;return t.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(t){var s="bold-".concat(i);return i+=t.length,t.startsWith("**")&&t.endsWith("**")||t.startsWith("__")&&t.endsWith("__")?n.jsx("strong",e.__assign({className:r.default.boldText},{children:t.slice(2,-2)}),s):t})};exports.default=function(a){a.index;var d=a.TextualGuideLines,c=a.HighlightedWords,h=a.InternalGptReasoningData,u=a.headerTitle,g=void 0===u?"Textual Guidelines":u,x=a.useVariantHighlight,f=void 0!==x&&x,p=a.fuzzyThreshold,v=void 0===p?.8:p,m=t.useState(0),I=m[0],_=m[1],b=t.useState(new Set),j=b[0],y=b[1],w=t.useRef([]),C=[];c.forEach(function(e){(function(e,n,t){void 0===t&&(t=.8);var i=n.trim().split(/\s+/).filter(Boolean);if(0===i.length)return[];for(var r,s=[],a=/\S+/g;null!==(r=a.exec(e));)s.push({word:r[0],start:r.index,end:r.index+r[0].length});for(var l=i.length,d=[],c=Math.max(1,l-1);c<=l+2;c++)for(var h=0;h<=s.length-c;h++){var u=s.slice(h,h+c),g=o(i,u.map(function(e){return e.word}));g>=t&&d.push({startIndex:u[0].start,endIndex:u[u.length-1].end,score:g})}if(0===d.length)return[];d.sort(function(e,n){return n.score-e.score});for(var x=[],f=function(e){x.some(function(n){return e.startIndex<n.endIndex&&e.endIndex>n.startIndex})||x.push(e)},p=0,v=d;p<v.length;p++)f(v[p]);return x})(d,e,v).forEach(function(e){return C.push(e)})}),C.sort(function(e,n){return e.startIndex-n.startIndex});for(var k=[],T=0,z=C;T<z.length;T++){var N=z[T],S=k.at(-1);(!S||N.startIndex>=S.endIndex)&&k.push(N)}var D=k.map(function(e,n){return{text:d.substring(e.startIndex,e.endIndex),startIndex:e.startIndex,endIndex:e.endIndex,highlightIndex:n}}),L=D.length;t.useEffect(function(){L>0&&(_(0),setTimeout(function(){var e;null===(e=w.current[0])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50))},[L]);var M,q,E,G,R=function(e){y(function(n){var t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t})};return n.jsxs("div",e.__assign({className:r.default.expandedContainer,style:{marginLeft:"1rem",display:"flex",flexDirection:"column",height:"100%",border:"none"}},{children:[n.jsxs("div",e.__assign({className:r.default.expandedHeader,style:{backgroundColor:"white",border:"none"}},{children:[n.jsx("span",e.__assign({className:r.default.headerTitle,style:{backgroundColor:"white"}},{children:g})),n.jsx("div",e.__assign({className:r.default.headerActions},{children:L>=1&&n.jsxs(n.Fragment,{children:[n.jsxs("span",e.__assign({style:{fontSize:"12px",color:"#888"}},{children:[I+1," / ",L]})),n.jsx("button",e.__assign({onClick:function(){if(0!==L){var e=I>0?I-1:L-1;_(e),setTimeout(function(){var n;null===(n=w.current[e])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50)}},disabled:I<=0,style:{padding:"2px 4px",cursor:I<=0?"not-allowed":"pointer",opacity:I<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:n.jsx(i.ChevronUp,{size:14,color:"#64748b"})})),n.jsx("button",e.__assign({onClick:function(){if(0!==L){var e=I<L-1?I+1:0;_(e),setTimeout(function(){var n;null===(n=w.current[e])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50)}},disabled:I>=L-1,style:{padding:"2px 4px",cursor:I>=L-1?"not-allowed":"pointer",opacity:I>=L-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:n.jsx(i.ChevronDown,{size:14,color:"#64748b"})}))]})}))]})),n.jsx("div",e.__assign({className:r.default.contentArea,style:{flex:1,maxHeight:"none",height:"auto",overflowY:"auto",border:"1px solid #eee",borderRadius:"4px",padding:"1rem"}},{children:n.jsx("div",e.__assign({className:r.default.contentInner},{children:(M=d.split("\n"),q=0,E=0,G=[],M.forEach(function(t){var a=q,o=q+t.length;q+=t.length+1;var c=/^(\s*)(-|\*|\d+\.)\s+/.exec(t),u=/^(Title|Description|Training-basis):\s*/i.exec(t);u&&(E=0),c&&(E+=1);var g=!!c,x=!!u,p=c?c[0].length:0,v=a+p,m=D.filter(function(e){return e.startIndex<o&&e.endIndex>v}),_="line-".concat(a),b=function(t,i,s){x?G.push(n.jsx("span",e.__assign({className:r.default.headerLine},{children:t}),i)):g?G.push(n.jsxs("span",e.__assign({className:r.default.listItemLine,style:{paddingLeft:c[1]?"1rem":"0"}},{children:[s&&n.jsxs("span",e.__assign({className:r.default.listCounter},{children:[E,"."]})),n.jsx("span",{children:t})]}),i)):G.push(n.jsx("span",e.__assign({className:r.default.blockLine},{children:t}),i))};if(0===m.length)b(l(t.substring(p)),_,!0);else{for(var y=v,C=[],k=!0,T=function(t){var a=Math.max(t.startIndex,v),c=Math.min(t.endIndex,o);if(a>=c)return"continue";if(a>y){var u=d.substring(y,a);C.push(n.jsx("span",{children:l(u)},"t-".concat(y)))}var g=t.highlightIndex===I,x=f?g?"".concat(r.default.highlight," ").concat(r.default.highlightActiveVariant):r.default.highlightVariant:g?"".concat(r.default.highlight," ").concat(r.default.highlightActive):r.default.highlight,p=j.has(t.highlightIndex);if(C.push(n.jsxs("span",e.__assign({ref:function(e){w.current[t.highlightIndex]=e},className:x,role:"button",tabIndex:0,onClick:function(){return R(t.highlightIndex)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||R(t.highlightIndex)},style:{display:"inline-flex",alignItems:"center",gap:"2px",cursor:"pointer"}},{children:[d.substring(a,c),p?n.jsx(i.ChevronUp,{size:12,style:{flexShrink:0}}):n.jsx(i.ChevronDown,{size:12,style:{flexShrink:0}})]}),"h-".concat(t.highlightIndex))),y=c,p&&h[t.highlightIndex]){var m=k?_:"".concat(_,"-chunk-").concat(a);b(C,m,k),k=!1,C=[],G.push(n.jsx("div",e.__assign({style:{marginTop:"0.5rem",marginBottom:"0.5rem"}},{children:n.jsx(s.default,{item:e.__assign(e.__assign({},h[t.highlightIndex]),{confidence_score:void 0}),headerTitle:"GPT - Gemini 3.1 Flash Lite",iconsConfig:{ChevronDownIcon:i.ChevronDown,ChevronUpIcon:i.ChevronUp,MaximizeIcon:i.Maximize2,CloseIcon:i.X},bodyHeight:"100%",disableMaximize:!0,index:t.highlightIndex})}),"expanded-".concat(t.highlightIndex)))}},z=0,N=m;z<N.length;z++)T(N[z]);if(y<o&&C.push(n.jsx("span",{children:l(d.substring(y,o))},"t-end-".concat(o))),C.length>0||k){var S=k?_:"".concat(_,"-tail");b(C,S,k)}}}),G)}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=TextualGuideLinesComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as n,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as o,useRef as c,useEffect as a}from"react";import{FileText as r,X as l,ChevronDown as d,ChevronUp as s}from"lucide-react";import u from"./Splitter.module.css.js";var h=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),i("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},v=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),i("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},f=function(){return n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[i("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),i("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},p=function(){return i("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:i("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))},C=function(C){var m=C.left,g=C.right,w=C.defaultLeftWidth,x=void 0===w?50:w,N=C.minLeftWidth,H=void 0===N?250:N,L=C.minRightWidth,B=void 0===L?250:L,A=C.className,k=void 0===A?"":A,M=C.height,V=void 0===M?"400px":M,b=C.width,z=void 0===b?"100%":b,E=C.header,y=C.onLeftWidthChange,F=C.openInFullscreen,S=void 0!==F&&F,D=C.onFullscreenClose,R=o(x),O=R[0],P=R[1],Z=o(x),I=Z[0],T=Z[1],W=o(!1),j=W[0],q=W[1],X=o(!1),Y=X[0],G=X[1],J=o(!1),K=J[0],Q=J[1],U=o(0),$=U[0],_=U[1],ee=o(0),ne=ee[0],te=ee[1],ie=o(S),oe=ie[0],ce=ie[1],ae=c(null),re=c(null),le=c(null),de=c(null);a(function(){var e=ae.current;e&&(oe?(e.showModal(),requestAnimationFrame(function(){if(de.current){var e=de.current.getBoundingClientRect().width;te(e),P(x),T(x),G(!1),Q(!1)}})):(e.close(),P(x),T(x),G(!1),Q(!1),null==D||D()))},[oe]),a(function(){var e=de.current;if(e&&oe){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){te(t.contentRect.width)})});return t.observe(e),function(){cancelAnimationFrame(n),t.disconnect()}}},[oe]),a(function(){var e=re.current;if(e){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){_(t.contentRect.width)})});return t.observe(e),_(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),t.disconnect()}}},[]);var se=$>0&&$<500,ue=function(e){e.preventDefault(),q(!0)};a(function(){var e=function(e){if(j)if(se&&le.current){var n=le.current.getBoundingClientRect(),t=n.height,i=e.clientY-n.top;if(i>=H&&t-i-4>=B)T(i/t*100)}else if(!se){var o=oe?de.current:re.current;if(!o)return;var c=o.getBoundingClientRect(),a=c.width,r=e.clientX-c.left;if(r>=H&&a-r-4>=B)P(r/a*100),null==y||y(r)}},n=function(){q(!1)};return j&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[j,se,oe,H,B,y]);var he,ve=function(){Y?(P(50),T(50),G(!1)):G(!0)},fe=function(){K?(P(50),T(50),Q(!1)):Q(!0)},pe=oe?ne:$,Ce=O/100*pe,me=pe-Ce-4,ge=oe?500:250;he=se?K?{flex:1}:{height:"".concat(I,"%")}:K?{flex:1}:{width:"".concat(O,"%")};var we,xe=!se&&!Y&&Ce<=Math.max(H+10,ge),Ne=!se&&!K&&me<=Math.max(B+10,ge),He=function(e){return e>=80?u.confidenceScoreHigh:e>=60?u.confidenceScoreMedium:u.confidenceScoreLow},Le="number"==typeof V?"".concat(V,"px"):V,Be="number"==typeof z?"".concat(z,"px"):z;return n(t,{children:[n("div",e({ref:re,className:"".concat(u.container," ").concat(se?u.containerVertical:u.containerHorizontal," ").concat(k),style:{height:se?"auto":Le,width:Be}},{children:[E&&n("div",e({className:u.header},{children:[n("div",e({className:u.headerLeft},{children:[E.showDocIcon&&i(r,{className:u.headerIcon}),i("div",e({className:u.headerTitle},{children:E.title&&i("span",e({className:u.headerTitleText},{children:E.title}))}))]})),n("div",e({className:u.headerActions},{children:[void 0!==E.confidenceScore&&n("div",e({className:"".concat(u.confidenceScore," ").concat(He(E.confidenceScore))},{children:[i("div",e({style:{width:"16px",height:"16px"}},{children:i(f,{})})),n("div",{children:[Math.round(E.confidenceScore),"%"]})]})),i("button",e({className:u.fullscreenButton,onClick:function(){return ce(!0)},title:"Open fullscreen"},{children:i(p,{})}))]}))]})),(we=!1,n("div",e({ref:we?void 0:le,className:"".concat(u.contentArea," ").concat(se?u.contentAreaVertical:u.contentAreaHorizontal)},{children:[!Y&&i("div",e({className:"".concat(u.panel," ").concat(se?u.panelVertical:""),style:e(e({},he),se?{height:Le}:{})},{children:m})),Y&&i("button",e({onClick:ve,className:"".concat(u.expandButton," ").concat(se?u.expandButtonVertical:u.expandButtonHorizontal),title:se?"Expand top panel (50/50)":"Expand left panel (50/50)"},{children:se?i(d,{size:14}):i(h,{})})),!Y&&!K&&n("div",e({onMouseDown:ue,className:"".concat(u.divider," ").concat(se?u.dividerVertical:u.dividerHorizontal," ").concat(j?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(se?u.dividerHitAreaVertical:u.dividerHitAreaHorizontal)}),xe&&i("button",e({onClick:function(e){e.stopPropagation(),ve()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),Ne&&i("button",e({onClick:function(e){e.stopPropagation(),fe()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!K&&i("div",e({className:"".concat(u.panel," ").concat(se?u.panelVertical:""),style:e({flex:1},se?{height:Le}:{})},{children:g})),K&&i("button",e({onClick:fe,className:"".concat(u.expandButton," ").concat(se?u.expandButtonBottomVertical:u.expandButtonRightHorizontal),title:se?"Expand bottom panel (50/50)":"Expand right panel (50/50)"},{children:se?i(s,{size:14}):i(v,{})})),j&&i("div",{className:"".concat(u.dragOverlay," ").concat(se?u.dragOverlayVertical:u.dragOverlayHorizontal)})]})))]})),i("dialog",e({ref:ae,className:u.dialogOverlay,onClose:function(){return ce(!1)}},{children:n("div",e({ref:de,className:u.dialogContent},{children:[E&&n("div",e({className:u.header},{children:[n("div",e({className:u.headerLeft},{children:[E.showDocIcon&&i(r,{className:u.headerIcon}),i("div",e({className:u.headerTitle},{children:E.title&&i(t,{children:i("span",e({className:u.headerTitleText},{children:E.title}))})}))]})),n("div",e({className:u.headerActions},{children:[void 0!==E.confidenceScore&&n("div",e({className:"".concat(u.confidenceScore," ").concat(He(E.confidenceScore))},{children:[i("div",e({style:{width:"16px",height:"16px"}},{children:i(f,{})})),n("div",{children:[Math.round(E.confidenceScore),"%"]})]})),i("button",e({className:u.fullscreenButton,onClick:function(){return ce(!1)},title:"Close fullscreen"},{children:i(l,{size:20,color:"#5928ed"})}))]}))]})),n("div",e({className:"".concat(u.contentArea," ").concat(u.contentAreaHorizontal," ").concat(u.dialogContentArea)},{children:[!Y&&i("div",e({className:u.panel,style:he},{children:m})),Y&&i("button",e({onClick:ve,className:"".concat(u.expandButton," ").concat(u.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:i(h,{})})),!Y&&!K&&n("div",e({onMouseDown:ue,className:"".concat(u.divider," ").concat(u.dividerHorizontal," ").concat(j?u.dividerDragging:u.dividerIdle)},{children:[i("div",{className:"".concat(u.dividerHitArea," ").concat(u.dividerHitAreaHorizontal)}),xe&&i("button",e({onClick:function(e){e.stopPropagation(),ve()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse left panel"},{children:i(v,{})})),Ne&&i("button",e({onClick:function(e){e.stopPropagation(),fe()},onMouseDown:function(e){return e.stopPropagation()},className:u.collapseButton,title:"Collapse right panel"},{children:i(h,{})}))]})),!K&&i("div",e({className:u.panel,style:{flex:1}},{children:g})),K&&i("button",e({onClick:fe,className:"".concat(u.expandButton," ").concat(u.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:i(v,{})})),j&&i("div",{className:"".concat(u.dragOverlay," ").concat(u.dragOverlayHorizontal)})]}))]}))}))]})};export{C as default};
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,Fragment as t,jsx as o}from"react/jsx-runtime";import{useState as i,useRef as c,useEffect as a}from"react";import{FileText as r,X as l}from"lucide-react";import d from"./Splitter.module.css.js";var s=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 20 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[o("path",{d:"M0.260742 1.57324L15.4268 10.8262C17.9563 12.3695 19.4999 15.1188 19.5 18.082V37.0273C19.4999 40.16 17.7767 43.0386 15.0156 44.5186L0.236328 52.4404L-0.5 52.835V1.10938L0.260742 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),o("path",{d:"M7.5 32L12.5 27L7.5 22",stroke:"#111827",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},u=function(){return n("svg",e({width:"21",height:"54",viewBox:"0 0 21 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[o("path",{d:"M1.26074 1.57324L16.4268 10.8262C18.9563 12.3695 20.4999 15.1188 20.5 18.082V37.0273C20.4999 40.16 18.7767 43.0386 16.0156 44.5186L1.23633 52.4404L0.5 52.835V1.10938L1.26074 1.57324Z",fill:"#F8FAFC",stroke:"#E0E0E0"}),o("path",{d:"M13.5 32L8.5 27L13.5 22",stroke:"black",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 12 12",fill:"none"},{children:[o("path",{d:"M7.58186 3.15354C7.51731 2.83771 7.06604 2.83771 7.00148 3.15354C6.60544 5.09119 5.09119 6.60544 3.15355 7.00148C2.83771 7.06603 2.83771 7.5173 3.15355 7.58185C5.09119 7.97789 6.60544 9.49215 7.00148 11.4298C7.06604 11.7456 7.51731 11.7456 7.58186 11.4298C7.9779 9.49215 9.49215 7.97789 11.4298 7.58185C11.7456 7.5173 11.7456 7.06603 11.4298 7.00148C9.49215 6.60544 7.9779 5.09119 7.58186 3.15354Z",fill:"#087443"}),o("path",{d:"M2.20669 0.0156637C2.20243 -0.00522128 2.17258 -0.0052212 2.16832 0.0156638C1.94676 1.09964 1.09964 1.94676 0.0156679 2.16831C-0.0052166 2.17258 -0.0052166 2.20242 0.0156679 2.20669C1.09964 2.42825 1.94676 3.27536 2.16832 4.35934C2.17258 4.38022 2.20243 4.38022 2.20669 4.35934C2.42825 3.27536 3.27537 2.42824 4.35934 2.20669C4.38023 2.20242 4.38023 2.17258 4.35934 2.16831C3.27537 1.94676 2.42825 1.09964 2.20669 0.0156637Z",fill:"#087443"})]}))},v=function(){return o("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 16",fill:"none"},{children:o("path",{d:"M3.125 2.75C3.02554 2.75 2.93016 2.78951 2.85983 2.85983C2.78951 2.93016 2.75 3.02554 2.75 3.125V6.125C2.75 6.22446 2.71049 6.31984 2.64017 6.39016C2.56984 6.46049 2.47446 6.5 2.375 6.5C2.27554 6.5 2.18016 6.46049 2.10983 6.39016C2.03951 6.31984 2 6.22446 2 6.125V3.125C2 2.82663 2.11853 2.54048 2.3295 2.3295C2.54048 2.11853 2.82663 2 3.125 2H6.125C6.22446 2 6.31984 2.03951 6.39016 2.10983C6.46049 2.18016 6.5 2.27554 6.5 2.375C6.5 2.47446 6.46049 2.56984 6.39016 2.64017C6.31984 2.71049 6.22446 2.75 6.125 2.75H3.125ZM9.5 2.375C9.5 2.27554 9.53951 2.18016 9.60983 2.10983C9.68016 2.03951 9.77554 2 9.875 2H12.875C13.1734 2 13.4595 2.11853 13.6705 2.3295C13.8815 2.54048 14 2.82663 14 3.125V6.125C14 6.22446 13.9605 6.31984 13.8902 6.39016C13.8198 6.46049 13.7245 6.5 13.625 6.5C13.5255 6.5 13.4302 6.46049 13.3598 6.39016C13.2895 6.31984 13.25 6.22446 13.25 6.125V3.125C13.25 3.02554 13.2105 2.93016 13.1402 2.85983C13.0698 2.78951 12.9745 2.75 12.875 2.75H9.875C9.77554 2.75 9.68016 2.71049 9.60983 2.64017C9.53951 2.56984 9.5 2.47446 9.5 2.375ZM2.375 9.5C2.47446 9.5 2.56984 9.53951 2.64017 9.60983C2.71049 9.68016 2.75 9.77554 2.75 9.875V12.875C2.75 12.9745 2.78951 13.0698 2.85983 13.1402C2.93016 13.2105 3.02554 13.25 3.125 13.25H6.125C6.22446 13.25 6.31984 13.2895 6.39016 13.3598C6.46049 13.4302 6.5 13.5255 6.5 13.625C6.5 13.7245 6.46049 13.8198 6.39016 13.8902C6.31984 13.9605 6.22446 14 6.125 14H3.125C2.82663 14 2.54048 13.8815 2.3295 13.6705C2.11853 13.4595 2 13.1734 2 12.875V9.875C2 9.77554 2.03951 9.68016 2.10983 9.60983C2.18016 9.53951 2.27554 9.5 2.375 9.5ZM13.625 9.5C13.7245 9.5 13.8198 9.53951 13.8902 9.60983C13.9605 9.68016 14 9.77554 14 9.875V12.875C14 13.1734 13.8815 13.4595 13.6705 13.6705C13.4595 13.8815 13.1734 14 12.875 14H9.875C9.77554 14 9.68016 13.9605 9.60983 13.8902C9.53951 13.8198 9.5 13.7245 9.5 13.625C9.5 13.5255 9.53951 13.4302 9.60983 13.3598C9.68016 13.2895 9.77554 13.25 9.875 13.25H12.875C12.9745 13.25 13.0698 13.2105 13.1402 13.1402C13.2105 13.0698 13.25 12.9745 13.25 12.875V9.875C13.25 9.77554 13.2895 9.68016 13.3598 9.60983C13.4302 9.53951 13.5255 9.5 13.625 9.5Z",fill:"#7A5AF8",stroke:"#7A5AF8","stroke-width":"0.5"})}))},C=function(C){var f=C.left,m=C.right,p=C.defaultLeftWidth,g=void 0===p?50:p,w=C.minLeftWidth,N=void 0===w?250:w,x=C.minRightWidth,H=void 0===x?250:x,L=C.className,k=void 0===L?"":L,A=C.height,M=void 0===A?"400px":A,B=C.width,b=void 0===B?"100%":B,z=C.header,F=C.onLeftWidthChange,y=C.openInFullscreen,E=void 0!==y&&y,S=C.onFullscreenClose,V=i(g),D=V[0],R=V[1],O=i(!1),P=O[0],Z=O[1],I=i(!1),T=I[0],W=I[1],j=i(!1),q=j[0],X=j[1],G=i(0),J=G[0],K=G[1],Q=i(0),U=Q[0],Y=Q[1],$=i(E),_=$[0],ee=$[1],ne=c(null),te=c(null),oe=c(null);a(function(){var e=ne.current;e&&(_?(e.showModal(),requestAnimationFrame(function(){if(oe.current){var e=oe.current.getBoundingClientRect().width;Y(e),R(g),W(!1),X(!1)}})):(e.close(),R(g),W(!1),X(!1),null==S||S()))},[_]),a(function(){var e=oe.current;if(e&&_){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){Y(t.contentRect.width)})});return t.observe(e),function(){cancelAnimationFrame(n),t.disconnect()}}},[_]),a(function(){var e=te.current;if(e){var n,t=new ResizeObserver(function(e){var t=e[0];n=requestAnimationFrame(function(){K(t.contentRect.width)})});return t.observe(e),K(e.getBoundingClientRect().width),function(){cancelAnimationFrame(n),t.disconnect()}}},[]);var ie=function(e){e.preventDefault(),Z(!0)};a(function(){var e=function(e){if(P){var n=_?oe.current:te.current;if(n){var t=n.getBoundingClientRect(),o=t.width,i=e.clientX-t.left;if(i>=N&&o-i-4>=H)R(i/o*100),null==F||F(i)}}},n=function(){Z(!1)};return P&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),function(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[P,_,N,H,F]);var ce=function(){T?(R(50),W(!1)):W(!0)},ae=function(){q?(R(50),X(!1)):X(!0)},re=_?U:J,le=D/100*re,de=re-le-4,se=_?500:250,ue=q?{flex:1}:{width:"".concat(D,"%")},he=!T&&le<=Math.max(N+10,se),ve=!q&&de<=Math.max(H+10,se),Ce=function(e){return e>=80?d.confidenceScoreHigh:e>=60?d.confidenceScoreMedium:d.confidenceScoreLow},fe="number"==typeof M?"".concat(M,"px"):M,me="number"==typeof b?"".concat(b,"px"):b;return n(t,{children:[n("div",e({ref:te,className:"".concat(d.container," ").concat(d.containerHorizontal," ").concat(k),style:{height:fe,width:me}},{children:[z&&n("div",e({className:d.header},{children:[n("div",e({className:d.headerLeft},{children:[z.showDocIcon&&o(r,{className:d.headerIcon}),o("div",e({className:d.headerTitle},{children:z.title&&o("span",e({className:d.headerTitleText},{children:z.title}))}))]})),n("div",e({className:d.headerActions},{children:[void 0!==z.confidenceScore&&n("div",e({className:"".concat(d.confidenceScore," ").concat(Ce(z.confidenceScore))},{children:[o("div",e({style:{width:"16px",height:"16px"}},{children:o(h,{})})),n("div",{children:[Math.round(z.confidenceScore),"%"]})]})),o("button",e({className:d.fullscreenButton,onClick:function(){return ee(!0)},title:"Open fullscreen"},{children:o(v,{})}))]}))]})),n("div",e({className:"".concat(d.contentArea," ").concat(d.contentAreaHorizontal)},{children:[!T&&o("div",e({className:d.panel,style:ue},{children:f})),T&&o("button",e({onClick:ce,className:"".concat(d.expandButton," ").concat(d.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:o(s,{})})),!T&&!q&&n("div",e({onMouseDown:ie,className:"".concat(d.divider," ").concat(d.dividerHorizontal," ").concat(P?d.dividerDragging:d.dividerIdle)},{children:[o("div",{className:"".concat(d.dividerHitArea," ").concat(d.dividerHitAreaHorizontal)}),he&&o("button",e({onClick:function(e){e.stopPropagation(),ce()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse left panel"},{children:o(u,{})})),ve&&o("button",e({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse right panel"},{children:o(s,{})}))]})),!q&&o("div",e({className:d.panel,style:{flex:1}},{children:m})),q&&o("button",e({onClick:ae,className:"".concat(d.expandButton," ").concat(d.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:o(u,{})})),P&&o("div",{className:"".concat(d.dragOverlay," ").concat(d.dragOverlayHorizontal)})]}))]})),o("dialog",e({ref:ne,className:d.dialogOverlay,onClose:function(){return ee(!1)}},{children:n("div",e({ref:oe,className:d.dialogContent},{children:[z&&n("div",e({className:d.header},{children:[n("div",e({className:d.headerLeft},{children:[z.showDocIcon&&o(r,{className:d.headerIcon}),o("div",e({className:d.headerTitle},{children:z.title&&o(t,{children:o("span",e({className:d.headerTitleText},{children:z.title}))})}))]})),n("div",e({className:d.headerActions},{children:[void 0!==z.confidenceScore&&n("div",e({className:"".concat(d.confidenceScore," ").concat(Ce(z.confidenceScore))},{children:[o("div",e({style:{width:"16px",height:"16px"}},{children:o(h,{})})),n("div",{children:[Math.round(z.confidenceScore),"%"]})]})),o("button",e({className:d.fullscreenButton,onClick:function(){return ee(!1)},title:"Close fullscreen"},{children:o(l,{size:20,color:"#5928ed"})}))]}))]})),n("div",e({className:"".concat(d.contentArea," ").concat(d.contentAreaHorizontal," ").concat(d.dialogContentArea)},{children:[!T&&o("div",e({className:d.panel,style:ue},{children:f})),T&&o("button",e({onClick:ce,className:"".concat(d.expandButton," ").concat(d.expandButtonHorizontal),title:"Expand left panel (50/50)"},{children:o(s,{})})),!T&&!q&&n("div",e({onMouseDown:ie,className:"".concat(d.divider," ").concat(d.dividerHorizontal," ").concat(P?d.dividerDragging:d.dividerIdle)},{children:[o("div",{className:"".concat(d.dividerHitArea," ").concat(d.dividerHitAreaHorizontal)}),he&&o("button",e({onClick:function(e){e.stopPropagation(),ce()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse left panel"},{children:o(u,{})})),ve&&o("button",e({onClick:function(e){e.stopPropagation(),ae()},onMouseDown:function(e){return e.stopPropagation()},className:d.collapseButton,title:"Collapse right panel"},{children:o(s,{})}))]})),!q&&o("div",e({className:d.panel,style:{flex:1}},{children:m})),q&&o("button",e({onClick:ae,className:"".concat(d.expandButton," ").concat(d.expandButtonRightHorizontal),title:"Expand right panel (50/50)"},{children:o(u,{})})),P&&o("div",{className:"".concat(d.dragOverlay," ").concat(d.dragOverlayHorizontal)})]}))]}))}))]})};export{C as default};
|
|
2
2
|
//# sourceMappingURL=SplitterCitationsComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as n,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{ChevronUp as l,ChevronDown as s,Maximize2 as d,X as c}from"lucide-react";import h from"./TextualGuidelines.module.css.js";import u from"../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";var g=function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")},f=function(e,n){var t=e.map(g).filter(Boolean),i=n.map(g).filter(Boolean);if(0===t.length||0===i.length)return 0;var r=new Set(t),o=new Set(i),a=0;return r.forEach(function(e){o.has(e)&&a++}),2*a/(r.size+o.size)},p=function(n){var i=0;return n.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(n){var r="bold-".concat(i);return i+=n.length,n.startsWith("**")&&n.endsWith("**")||n.startsWith("__")&&n.endsWith("__")?t("strong",e({className:h.boldText},{children:n.slice(2,-2)}),r):n})},x=function(g){g.index;var x=g.TextualGuideLines,m=g.HighlightedWords,v=g.InternalGptReasoningData,I=g.headerTitle,b=void 0===I?"Textual Guidelines":I,y=g.useVariantHighlight,w=void 0!==y&&y,C=g.fuzzyThreshold,
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{ChevronUp as l,ChevronDown as s,Maximize2 as d,X as c}from"lucide-react";import h from"./TextualGuidelines.module.css.js";import u from"../CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";var g=function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")},f=function(e,n){var t=e.map(g).filter(Boolean),i=n.map(g).filter(Boolean);if(0===t.length||0===i.length)return 0;var r=new Set(t),o=new Set(i),a=0;return r.forEach(function(e){o.has(e)&&a++}),2*a/(r.size+o.size)},p=function(n){var i=0;return n.split(/(\*\*.*?\*\*|__.*?__)/g).map(function(n){var r="bold-".concat(i);return i+=n.length,n.startsWith("**")&&n.endsWith("**")||n.startsWith("__")&&n.endsWith("__")?t("strong",e({className:h.boldText},{children:n.slice(2,-2)}),r):n})},x=function(g){g.index;var x=g.TextualGuideLines,m=g.HighlightedWords,v=g.InternalGptReasoningData,I=g.headerTitle,b=void 0===I?"Textual Guidelines":I,y=g.useVariantHighlight,w=void 0!==y&&y,C=g.fuzzyThreshold,k=void 0===C?.8:C,T=r(0),N=T[0],z=T[1],_=r(new Set),L=_[0],S=_[1],G=o([]),V=[];m.forEach(function(e){(function(e,n,t){void 0===t&&(t=.8);var i=n.trim().split(/\s+/).filter(Boolean);if(0===i.length)return[];for(var r,o=[],a=/\S+/g;null!==(r=a.exec(e));)o.push({word:r[0],start:r.index,end:r.index+r[0].length});for(var l=i.length,s=[],d=Math.max(1,l-1);d<=l+2;d++)for(var c=0;c<=o.length-d;c++){var h=o.slice(c,c+d),u=f(i,h.map(function(e){return e.word}));u>=t&&s.push({startIndex:h[0].start,endIndex:h[h.length-1].end,score:u})}if(0===s.length)return[];s.sort(function(e,n){return n.score-e.score});for(var g=[],p=function(e){g.some(function(n){return e.startIndex<n.endIndex&&e.endIndex>n.startIndex})||g.push(e)},x=0,m=s;x<m.length;x++)p(m[x]);return g})(x,e,k).forEach(function(e){return V.push(e)})}),V.sort(function(e,n){return e.startIndex-n.startIndex});for(var D=[],E=0,H=V;E<H.length;E++){var M=H[E],R=D.at(-1);(!R||M.startIndex>=R.endIndex)&&D.push(M)}var W=D.map(function(e,n){return{text:x.substring(e.startIndex,e.endIndex),startIndex:e.startIndex,endIndex:e.endIndex,highlightIndex:n}}),A=W.length;a(function(){A>0&&(z(0),setTimeout(function(){var e;null===(e=G.current[0])||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},50))},[A]);var B,j,F,K,P=function(e){S(function(n){var t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t})};return n("div",e({className:h.expandedContainer,style:{marginLeft:"1rem",display:"flex",flexDirection:"column",height:"100%",border:"none"}},{children:[n("div",e({className:h.expandedHeader,style:{backgroundColor:"white",border:"none"}},{children:[t("span",e({className:h.headerTitle,style:{backgroundColor:"white"}},{children:b})),t("div",e({className:h.headerActions},{children:A>=1&&n(i,{children:[n("span",e({style:{fontSize:"12px",color:"#888"}},{children:[N+1," / ",A]})),t("button",e({onClick:function(){if(0!==A){var e=N>0?N-1:A-1;z(e),setTimeout(function(){var n;null===(n=G.current[e])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50)}},disabled:N<=0,style:{padding:"2px 4px",cursor:N<=0?"not-allowed":"pointer",opacity:N<=0?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:t(l,{size:14,color:"#64748b"})})),t("button",e({onClick:function(){if(0!==A){var e=N<A-1?N+1:0;z(e),setTimeout(function(){var n;null===(n=G.current[e])||void 0===n||n.scrollIntoView({behavior:"smooth",block:"center"})},50)}},disabled:N>=A-1,style:{padding:"2px 4px",cursor:N>=A-1?"not-allowed":"pointer",opacity:N>=A-1?.4:1,border:"1px solid #ddd",borderRadius:"3px",background:"white",display:"flex",alignItems:"center"}},{children:t(s,{size:14,color:"#64748b"})}))]})}))]})),t("div",e({className:h.contentArea,style:{flex:1,maxHeight:"none",height:"auto",overflowY:"auto",border:"1px solid #eee",borderRadius:"4px",padding:"1rem"}},{children:t("div",e({className:h.contentInner},{children:(B=x.split("\n"),j=0,F=0,K=[],B.forEach(function(i){var r=j,o=j+i.length;j+=i.length+1;var a=/^(\s*)(-|\*|\d+\.)\s+/.exec(i),g=/^(Title|Description|Training-basis):\s*/i.exec(i);g&&(F=0),a&&(F+=1);var f=!!a,m=!!g,I=a?a[0].length:0,b=r+I,y=W.filter(function(e){return e.startIndex<o&&e.endIndex>b}),C="line-".concat(r),k=function(i,r,o){m?K.push(t("span",e({className:h.headerLine},{children:i}),r)):f?K.push(n("span",e({className:h.listItemLine,style:{paddingLeft:a[1]?"1rem":"0"}},{children:[o&&n("span",e({className:h.listCounter},{children:[F,"."]})),t("span",{children:i})]}),r)):K.push(t("span",e({className:h.blockLine},{children:i}),r))};if(0===y.length)k(p(i.substring(I)),C,!0);else{for(var T=b,z=[],_=!0,S=function(i){var r=Math.max(i.startIndex,b),a=Math.min(i.endIndex,o);if(r>=a)return"continue";if(r>T){var g=x.substring(T,r);z.push(t("span",{children:p(g)},"t-".concat(T)))}var f=i.highlightIndex===N,m=w?f?"".concat(h.highlight," ").concat(h.highlightActiveVariant):h.highlightVariant:f?"".concat(h.highlight," ").concat(h.highlightActive):h.highlight,I=L.has(i.highlightIndex);if(z.push(n("span",e({ref:function(e){G.current[i.highlightIndex]=e},className:m,role:"button",tabIndex:0,onClick:function(){return P(i.highlightIndex)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||P(i.highlightIndex)},style:{display:"inline-flex",alignItems:"center",gap:"2px",cursor:"pointer"}},{children:[x.substring(r,a),t(I?l:s,{size:12,style:{flexShrink:0}})]}),"h-".concat(i.highlightIndex))),T=a,I&&v[i.highlightIndex]){var y=_?C:"".concat(C,"-chunk-").concat(r);k(z,y,_),_=!1,z=[],K.push(t("div",e({style:{marginTop:"0.5rem",marginBottom:"0.5rem"}},{children:t(u,{item:e(e({},v[i.highlightIndex]),{confidence_score:void 0}),headerTitle:"GPT - Gemini 3.1 Flash Lite",iconsConfig:{ChevronDownIcon:s,ChevronUpIcon:l,MaximizeIcon:d,CloseIcon:c},bodyHeight:"100%",disableMaximize:!0,index:i.highlightIndex})}),"expanded-".concat(i.highlightIndex)))}},V=0,D=y;V<D.length;V++)S(D[V]);if(T<o&&z.push(t("span",{children:p(x.substring(T,o))},"t-end-".concat(o))),z.length>0||_){var E=_?C:"".concat(C,"-tail");k(z,E,_)}}}),K)}))}))]}))};export{x as default};
|
|
2
2
|
//# sourceMappingURL=TextualGuideLinesComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitterCitationsComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/SplitterCitations/SplitterCitationsComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8B3D,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAEA,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"SplitterCitationsComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/SplitterCitations/SplitterCitationsComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8B3D,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAEA,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0YxD,CAAC;AACF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextualGudelinesTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/TextualGuidelines/TextualGudelinesTest.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAS9G,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAiBzD,CAAC;
|
|
1
|
+
{"version":3,"file":"TextualGudelinesTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/TextualGuidelines/TextualGudelinesTest.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAS9G,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAiBzD,CAAC;AAMF,QAAA,MAAM,8BAA8B,+CAMnC,CAAC;AAEF,eAAe,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextualGuideLinesComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/TextualGuidelines/TextualGuideLinesComponent.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAG9G,UAAU,gCAAgC;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,wBAAwB,EAAE,mBAAmB,EAAE,CAAC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAsFA,QAAA,MAAM,0BAA0B,gIAQ9B,gCAAgC,
|
|
1
|
+
{"version":3,"file":"TextualGuideLinesComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/TextualGuidelines/TextualGuideLinesComponent.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yEAAyE,CAAC;AAG9G,UAAU,gCAAgC;IACxC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,wBAAwB,EAAE,mBAAmB,EAAE,CAAC;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAsFA,QAAA,MAAM,0BAA0B,gIAQ9B,gCAAgC,4CA+OlC,CAAC;AACF,eAAe,0BAA0B,CAAC"}
|