@cyber-harbour/ui 1.0.26 → 1.0.27

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/index.js CHANGED
@@ -387,7 +387,7 @@
387
387
  align-items: center;
388
388
  justify-content: flex-end;
389
389
  gap: 6px;
390
- `;var Eo=t(({isOpen:o,onClickOutside:e,onClick:l,anchor:s,size:c="medium",disabled:a,fullWidth:m,className:b,positions:S=["bottom"],align:h="start",children:v,hasBorder:y=true,maxHeight:C=500})=>{let P=E0.useRef(null),k=mo.useTheme();return jsxRuntime.jsx(reactTinyPopover.Popover,{padding:k.contextMenu.padding,isOpen:o,positions:S,align:h,onClickOutside:e,content:v,containerStyle:{backgroundColor:k.colors.background,border:`1px solid ${k.colors.stroke.light}`,boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.25)",borderRadius:"5px",overflow:"auto",maxHeight:`${C}px`,zIndex:"9999"},children:jsxRuntime.jsxs(Pt,{ref:P,onClick:l,$disabled:a,$fullWidth:m,$size:c,className:b,type:"button",disabled:a,$hasBorder:y,children:[jsxRuntime.jsx("div",{children:s}),o?jsxRuntime.jsx(D1,{width:k.contextMenu.icon.size,height:k.contextMenu.icon.size}):jsxRuntime.jsx(V1,{width:k.contextMenu.icon.size,height:k.contextMenu.icon.size})]})})},"ContextMenu"),Pt=mo.styled.button`
390
+ `;var Eo=t(({isOpen:o,onClickOutside:e,onClick:l,anchor:s,size:c="medium",disabled:a,fullWidth:m,className:b,positions:S=["bottom"],align:h="start",children:v,hasBorder:y=true,maxHeight:C=500})=>{let P=E0.useRef(null),$=mo.useTheme();return jsxRuntime.jsx(reactTinyPopover.Popover,{padding:$.contextMenu.padding,isOpen:o,positions:S,align:h,onClickOutside:e,content:v,containerStyle:{backgroundColor:$.colors.background,border:`1px solid ${$.colors.stroke.light}`,boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.25)",borderRadius:"5px",overflow:"auto",maxHeight:`${C}px`,zIndex:"9999"},children:jsxRuntime.jsxs(Pt,{ref:P,onClick:l,$disabled:a,$fullWidth:m,$size:c,className:b,type:"button",disabled:a,$hasBorder:y,children:[jsxRuntime.jsx("div",{children:s}),o?jsxRuntime.jsx(D1,{width:$.contextMenu.icon.size,height:$.contextMenu.icon.size}):jsxRuntime.jsx(V1,{width:$.contextMenu.icon.size,height:$.contextMenu.icon.size})]})})},"ContextMenu"),Pt=mo.styled.button`
391
391
  ${({$size:o,$disabled:e,$fullWidth:l,theme:s,$hasBorder:c})=>{let a=Z(s,o);return `
392
392
  background: ${s.contextMenu.button.default.background};
393
393
  color: ${s.contextMenu.button.default.text};
@@ -481,7 +481,7 @@
481
481
  cursor: not-allowed;
482
482
  }
483
483
  `}}
484
- `;var as=t(({size:o="small",disabled:e,className:l,positions:s=["bottom"],align:c="end",items:a})=>{let m=E0.useRef(null),{isOpen:b,closeMenu:S,toggleMenu:h}=Bo(),v=mo.useTheme();return jsxRuntime.jsx(reactTinyPopover.Popover,{padding:v.contextMenu.padding,isOpen:b,positions:s,align:c,onClickOutside:S,content:jsxRuntime.jsx(Lt,{children:a.map(({label:y,onClick:C,color:P},k)=>jsxRuntime.jsx(Y1,{variant:"empty",color:P,fullWidth:true,size:o,onClick:()=>{C(),S();},children:y},`row-action-${k}`))}),containerStyle:{backgroundColor:v.colors.background,border:`1px solid ${v.colors.stroke.light}`,boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.25)",borderRadius:"5px",zIndex:"9999"},children:jsxRuntime.jsx(Ft,{ref:m,onClick:h,$disabled:e,$size:o,className:l,type:"button",disabled:e,children:jsxRuntime.jsx(G1,{width:v.rowActionsMenu.icon.size,height:v.rowActionsMenu.icon.size})})})},"RowActionsMenu"),Ft=mo.styled.button`
484
+ `;var as=t(({size:o="small",disabled:e,className:l,positions:s=["bottom"],align:c="end",items:a})=>{let m=E0.useRef(null),{isOpen:b,closeMenu:S,toggleMenu:h}=Bo(),v=mo.useTheme();return jsxRuntime.jsx(reactTinyPopover.Popover,{padding:v.contextMenu.padding,isOpen:b,positions:s,align:c,onClickOutside:S,content:jsxRuntime.jsx(Lt,{children:a.map(({label:y,onClick:C,color:P},$)=>jsxRuntime.jsx(Y1,{variant:"empty",color:P,fullWidth:true,size:o,onClick:()=>{C(),S();},children:y},`row-action-${$}`))}),containerStyle:{backgroundColor:v.colors.background,border:`1px solid ${v.colors.stroke.light}`,boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.25)",borderRadius:"5px",zIndex:"9999"},children:jsxRuntime.jsx(Ft,{ref:m,onClick:h,$disabled:e,$size:o,className:l,type:"button",disabled:e,children:jsxRuntime.jsx(G1,{width:v.rowActionsMenu.icon.size,height:v.rowActionsMenu.icon.size})})})},"RowActionsMenu"),Ft=mo.styled.button`
485
485
  ${({$size:o,$disabled:e,theme:l})=>{let s=Z(l,o);return `
486
486
  background: ${l.rowActionsMenu.button.default.background};
487
487
  color: ${l.rowActionsMenu.button.default.text};
@@ -636,7 +636,7 @@
636
636
  }
637
637
  `),Tt=mo.styled.main`
638
638
  min-width: 0;
639
- `;var Fo="./eye_light-EQXRQBFN.png";var Lo="./eye_light_hover-5XFRPJS4.png";var Zo="./cross_light-JTZWFLSV.png";var _o="./cross_light_hover-UQZ7E3CW.png";var Ro=new Image;Ro.src=Fo;var Ao=new Image;Ao.src=Lo;var No=new Image;No.src=Zo;var Wo=new Image;Wo.src=_o;var h6=t(({graphData:o,width:e,height:l,linkTarget:s,linkSource:c,config:a={fontSize:3,nodeSizeBase:30,nodeAreaFactor:2,textPaddingFactor:.9,gridSpacing:20,dotSize:1,maxZoom:4},onNodeClick:m,onLinkClick:b})=>{let[S,h]=E0.useState(new Set),[v,y]=E0.useState(new Set),[C,P]=E0.useState(null),[k,Xo]=E0.useState(new Set),[n1,Ko]=E0.useState(new Set),[N,R1]=E0.useState(false),[W,A1]=E0.useState(false),I=E0.useRef(null),B=E0.useRef(null),N1=t(n=>{let d=Math.min(n,a.maxZoom)/a.maxZoom;return Math.max(a.fontSize*d,a.fontSize)},"calculateFontSize"),Jo=E0.useCallback((n,r)=>{let d=new Set,p=new Set;n&&(d.add(n),n.neighbors&&n.neighbors.forEach(g=>d.add(g)),n.links&&n.links.forEach(g=>p.add(g))),P(n||null),h(d),y(p);},[]),Uo=E0.useCallback(n=>{let r=new Set,d=new Set;n&&(d.add(n),r.add(n.source),r.add(n.target)),h(r),y(d);},[]);E0.useEffect(()=>{if(o&&(o.links.forEach(n=>{let r=typeof n.source=="object"?n.source:o.nodes.find(p=>p.id===n.source),d=typeof n.target=="object"?n.target:o.nodes.find(p=>p.id===n.target);!r||!d||(!r.neighbors&&(r.neighbors=[]),!d.neighbors&&(d.neighbors=[]),r.neighbors.push(d),d.neighbors.push(r),!r.links&&(r.links=[]),!d.links&&(d.links=[]),r.links.push(n),d.links.push(n));}),I.current?.d3Force("link")?.distance(n=>{let r=n.source,d=n.target,p=a.nodeSizeBase*2,g=r.size||a.nodeSizeBase,u=d.size||a.nodeSizeBase;return p+(g+u)}),I.current)){let n=I.current.d3Force("charge");n&&n.strength(-100).distanceMax(100);let r=I.current.d3Force("center");r&&r.strength(.05);try{let d=d3Force.forceCollide().radius(p=>(p.size||a.nodeSizeBase)*1.5).iterations(3).strength(1);I.current.d3Force("collide",d);}catch{}I.current.resumeAnimation();}},[o]);let Yo=E0.useCallback((n,r,d)=>{let p=a.nodeSizeBase*a.nodeAreaFactor*.75/2;r.beginPath(),r.arc(n.x,n.y,p,0,2*Math.PI,false),r.fillStyle="rgba(255, 165, 0, 0.3)",r.fill();},[a]),qo=E0.useCallback((n,r,d)=>{let{x:p,y:g}=n,u=a.nodeSizeBase*a.nodeAreaFactor/2;r.save(),r.beginPath(),r.arc(p,g,u,Math.PI,Math.PI*2,false),r.lineWidth=1,r.strokeStyle="#e5e5e5",r.stroke(),r.fillStyle=N?"rgba(230, 230, 230, 0.9)":"rgba(255, 255, 255, 0.8)",r.fill(),r.beginPath(),r.moveTo(p-u,g),r.lineTo(p+u,g),r.lineWidth=1,r.strokeStyle="#e5e5e5",r.stroke(),r.beginPath(),r.arc(p,g,u,Math.PI*2,Math.PI,false),r.lineWidth=1,r.strokeStyle="#e5e5e5",r.stroke(),r.fillStyle=W?"rgba(230, 230, 230, 0.9)":"rgba(255, 255, 255, 0.8)",r.fill();let f=u*.3,x=N?Wo:No,$=t(()=>{r.drawImage(x,p-f/2,g-u*2/4-f-1,f,f);},"renderCrossIcon");x.complete?$():x.onload=()=>{$();};let M=W?Ao:Ro,w=t(()=>{r.drawImage(M,p-f/2,g+u*2/4+1,f,f);},"renderEyeIcon");M.complete?w():M.onload=()=>{w();},r.restore();},[a,N,W]),S1=t((n,r)=>{r&&r.id&&!n.has(`${r.id}`)&&o&&o.links.filter(p=>p.source.id===r.id&&p.label!=="MATCH").forEach(p=>{n.add(`${p.target.id}`),S1(n,p.target);});},"collapseNode"),Qo=t(n=>{let r=new Set(k);S1(r,n),r.add(n.id),Xo(r);},"handleHideNode"),jo=t(n=>{let r=new Set(n1);S1(r,n),Ko(r);},"handleCollapseChildren"),X=E0.useCallback((n,r,d,p,g,u,f)=>{let x=n-d,$=r-p,M=Math.sqrt(x*x+$*$),w=Math.atan2($,x);w<0&&(w+=2*Math.PI);let E=M>=g*.5&&M<=g*1.5,z=false;return u===Math.PI&&f===Math.PI*2?z=w>=Math.PI&&w<=Math.PI*2:u===0&&f===Math.PI?z=w>=0&&w<=Math.PI:z=u<=f&&w>=u&&w<=f||u>f&&(w>=u||w<=f),E&&z},[]);E0.useEffect(()=>{let n=t(r=>{if(!C||!I.current||!B.current){N&&R1(false),W&&A1(false);return}a.nodeSizeBase;let p=a.nodeSizeBase*a.nodeAreaFactor/2,g=I.current.zoom()||1,u=C.x,f=C.y,x=B.current.getBoundingClientRect(),$=r.clientX-x.left,M=r.clientY-x.top,w=B.current.clientWidth/x.width,D=B.current.clientHeight/x.height,F=$*w,E=M*D,z={x:B.current.clientWidth/2,y:B.current.clientHeight/2},G,V;if(typeof I.current.graph2ScreenCoords=="function"){let C1=I.current.graph2ScreenCoords(u,f);C1&&(G=C1.x,V=C1.y);}(G===void 0||V===void 0)&&(G=z.x+u*g,V=z.y+f*g);let K=X(F,E,G,V,p*g,Math.PI,Math.PI*2),ie=X(F,E,G,V,p*g,0,Math.PI);R1(K),A1(ie);},"handleCanvasMouseMove");return B.current&&B.current.addEventListener("mousemove",n),()=>{B.current&&B.current.removeEventListener("mousemove",n);}},[C,a,X,N,W]);let oe=t((n,r,d)=>{if(!n)return "";if(d.measureText(n).width<=r)return n;let g=n,u="...";for(;d.measureText(g+u).width>r&&g.length>0;)g=g.slice(0,-1);return g+u},"truncateText"),ee=t((n,r)=>{n.getTransform(),n.save(),n.setTransform(1,0,0,1,0,0);let{width:d,height:p}=n.canvas,g=a.gridSpacing,u=a.dotSize;n.fillStyle="rgba(0, 0, 0, 0.5)";for(let f=0;f<d;f+=g)for(let x=0;x<p;x+=g)n.beginPath(),n.arc(f,x,u,0,2*Math.PI),n.fill();n.restore();},"renderGrid"),te=t((n,r,d,p)=>{let{x:g,y:u}=n,f=a.nodeSizeBase;d.beginPath(),d.arc(g,u,f,0,2*Math.PI),d.fillStyle=r,d.fill();},"renderNodePointerAreaPaint"),re=t((n,r,d)=>{S.has(n)&&(n===C?qo(n,r,d):Yo(n,r,d));let{x:p,y:g,color:u,label:f}=n,x=a.nodeSizeBase,$=a.nodeSizeBase/2;r.beginPath(),r.arc(p,g,$,0,2*Math.PI),r.fillStyle=u,r.fill(),r.save(),r.translate(p,g);let M=N1(d),w=x*a.textPaddingFactor;r.font=`${M}px Sans-Serif`,r.textAlign="center",r.textBaseline="middle",r.fillStyle="black";let D=oe(f,w,r);r.fillText(D,0,0),r.restore();},"renderNodeCanvasObject"),ne=t((n,r,d)=>{let{source:p,target:g,label:u}=n;if(!u)return;let f={x:p.x,y:p.y},x={x:g.x,y:g.y},$=f.x+(x.x-f.x)/2,M=f.y+(x.y-f.y)/2,w=N1(d);r.font=`${w}px Sans-Serif`,r.fillStyle="#666",r.textAlign="center",r.textBaseline="middle";let D=Math.atan2(x.y-f.y,x.x-f.x);r.save(),r.translate($,M),Math.abs(D)>Math.PI/2?(r.rotate(D+Math.PI),r.textAlign="center"):(r.rotate(D),r.textAlign="center");let F=r.measureText(u).width,E=2;r.fillStyle=v.has(n)?"rgba(255, 230, 204, 0.9)":"rgba(255, 255, 255, 0.8)",r.fillRect(-F/2-E,-w/2-E,F+E*2,w+E*2),r.fillStyle=v.has(n)?"#663300":"#666",r.fillText(u,0,0),r.restore();},"renderLinkCanvasObject");return jsxRuntime.jsx(qt,{ref:B,children:jsxRuntime.jsx(Jt__default.default,{ref:I,width:e,height:l,graphData:o,linkTarget:s,linkSource:c,onLinkClick:b,onNodeClick:t((n,r)=>{if(!n||!I.current)return;let d=a.nodeSizeBase*a.nodeAreaFactor/2,p=I.current.zoom()||1,g=r.target,u=n.x,f=n.y,x=g.getBoundingClientRect(),$=r.clientX-x.left,M=r.clientY-x.top,w=g.width/x.width,D=g.height/x.height,F=$*w,E=M*D,z={x:g.width/2,y:g.height/2},G,V;if(typeof I.current.graph2ScreenCoords=="function"){let K=I.current.graph2ScreenCoords(u,f);K&&(G=K.x,V=K.y);}if((G===void 0||V===void 0)&&(G=z.x+u*p,V=z.y+f*p),X(F,E,G,V,d*p,Math.PI,Math.PI*2)){Qo(C),r.stopPropagation();return}if(X(F,E,G,V,d*p,0,Math.PI)){jo(C),r.stopPropagation();return}m&&m(n);},"handleNodeClick"),nodeLabel:n=>`${n.label||""}`,linkLabel:n=>n.label,nodeAutoColorBy:"label",linkDirectionalArrowLength:3.5,linkDirectionalArrowRelPos:1,linkCurvature:0,maxZoom:a.maxZoom,minZoom:1,onNodeHover:Jo,onLinkHover:Uo,linkWidth:n=>v.has(n)?3:1,linkColor:n=>v.has(n)?"#ff9900":"#999",onRenderFramePre:ee,nodePointerAreaPaint:te,nodeCanvasObject:re,linkCanvasObjectMode:()=>"after",linkCanvasObject:ne,linkVisibility:n=>!(k.has(n.source.id)||k.has(n.target.id)||n1.has(n.source.id)||n1.has(n.target.id)),nodeVisibility:n=>!(k.has(n.id)||n1.has(n.id))})})},"Graph2D"),qt=mo.styled.div`
639
+ `;var Fo="./eye_light-EQXRQBFN.png";var Lo="./eye_light_hover-5XFRPJS4.png";var Zo="./cross_light-JTZWFLSV.png";var _o="./cross_light_hover-UQZ7E3CW.png";var Ro=new Image;Ro.src=Fo;var Ao=new Image;Ao.src=Lo;var No=new Image;No.src=Zo;var Wo=new Image;Wo.src=_o;var h6=t(({graphData:o,width:e,height:l,linkTarget:s,linkSource:c,config:a={fontSize:3,nodeSizeBase:30,nodeAreaFactor:2,textPaddingFactor:.9,gridSpacing:20,dotSize:1,maxZoom:4},onNodeClick:m,onLinkClick:b})=>{let[S,h]=E0.useState(new Set),[v,y]=E0.useState(new Set),[C,P]=E0.useState(null),[$,Xo]=E0.useState(new Set),[n1,Ko]=E0.useState(new Set),[N,R1]=E0.useState(false),[W,A1]=E0.useState(false),I=E0.useRef(null),G=E0.useRef(null),N1=t(n=>{let d=Math.min(n,a.maxZoom)/a.maxZoom;return Math.max(a.fontSize*d,a.fontSize)},"calculateFontSize"),Jo=E0.useCallback((n,r)=>{let d=new Set,p=new Set;n&&(d.add(n),n.neighbors&&n.neighbors.forEach(g=>d.add(g)),n.links&&n.links.forEach(g=>p.add(g))),P(n||null),h(d),y(p);},[]),Uo=E0.useCallback(n=>{let r=new Set,d=new Set;n&&(d.add(n),r.add(n.source),r.add(n.target)),h(r),y(d);},[]);E0.useEffect(()=>{if(o&&(o.links.forEach(n=>{let r=typeof n.source=="object"?n.source:o.nodes.find(p=>p.id===n.source),d=typeof n.target=="object"?n.target:o.nodes.find(p=>p.id===n.target);!r||!d||(!r.neighbors&&(r.neighbors=[]),!d.neighbors&&(d.neighbors=[]),r.neighbors.push(d),d.neighbors.push(r),!r.links&&(r.links=[]),!d.links&&(d.links=[]),r.links.push(n),d.links.push(n));}),I.current?.d3Force("link")?.distance(n=>{let r=n.source,d=n.target,p=a.nodeSizeBase*2,g=r.size||a.nodeSizeBase,u=d.size||a.nodeSizeBase;return p+(g+u)}),I.current)){let n=I.current.d3Force("charge");n&&n.strength(-100).distanceMax(100);let r=I.current.d3Force("center");r&&r.strength(.05);try{let d=d3Force.forceCollide().radius(p=>(p.size||a.nodeSizeBase)*1.5).iterations(3).strength(1);I.current.d3Force("collide",d);}catch{}I.current.resumeAnimation();}},[o]);let Yo=E0.useCallback((n,r,d)=>{let p=a.nodeSizeBase*a.nodeAreaFactor*.75/2;r.beginPath(),r.arc(n.x,n.y,p,0,2*Math.PI,false),r.fillStyle="rgba(255, 165, 0, 0.3)",r.fill();},[a]),qo=E0.useCallback((n,r,d)=>{let{x:p,y:g}=n,u=a.nodeSizeBase*a.nodeAreaFactor/2;r.save(),r.beginPath(),r.arc(p,g,u,Math.PI,Math.PI*2,false),r.lineWidth=1,r.strokeStyle="#e5e5e5",r.stroke(),r.fillStyle=N?"rgba(230, 230, 230, 0.9)":"rgba(255, 255, 255, 0.8)",r.fill(),r.beginPath(),r.moveTo(p-u,g),r.lineTo(p+u,g),r.lineWidth=1,r.strokeStyle="#e5e5e5",r.stroke(),r.beginPath(),r.arc(p,g,u,Math.PI*2,Math.PI,false),r.lineWidth=1,r.strokeStyle="#e5e5e5",r.stroke(),r.fillStyle=W?"rgba(230, 230, 230, 0.9)":"rgba(255, 255, 255, 0.8)",r.fill();let f=u*.3,x=N?Wo:No,M=t(()=>{try{r.drawImage(x,p-f/2,g-u*2/4-f-1,f,f);}catch{}},"renderCrossIcon");x.complete?M():(x.onload=()=>{M();},x.onerror=()=>{});let k=W?Ao:Ro,w=t(()=>{try{r.drawImage(k,p-f/2,g+u*2/4+1,f,f);}catch{}},"renderEyeIcon");k.complete?w():(k.onload=()=>{w();},k.onerror=()=>{}),r.restore();},[a,N,W]),S1=t((n,r)=>{r&&r.id&&!n.has(`${r.id}`)&&o&&o.links.filter(p=>p.source.id===r.id&&p.label!=="MATCH").forEach(p=>{n.add(`${p.target.id}`),S1(n,p.target);});},"collapseNode"),Qo=t(n=>{let r=new Set($);S1(r,n),r.add(n.id),Xo(r);},"handleHideNode"),jo=t(n=>{let r=new Set(n1);S1(r,n),Ko(r);},"handleCollapseChildren"),X=E0.useCallback((n,r,d,p,g,u,f)=>{let x=n-d,M=r-p,k=Math.sqrt(x*x+M*M),w=Math.atan2(M,x);w<0&&(w+=2*Math.PI);let B=k>=g*.5&&k<=g*1.5,z=false;return u===Math.PI&&f===Math.PI*2?z=w>=Math.PI&&w<=Math.PI*2:u===0&&f===Math.PI?z=w>=0&&w<=Math.PI:z=u<=f&&w>=u&&w<=f||u>f&&(w>=u||w<=f),B&&z},[]);E0.useEffect(()=>{let n=t(r=>{if(!C||!I.current||!G.current){N&&R1(false),W&&A1(false);return}a.nodeSizeBase;let p=a.nodeSizeBase*a.nodeAreaFactor/2,g=I.current.zoom()||1,u=C.x,f=C.y,x=G.current.getBoundingClientRect(),M=r.clientX-x.left,k=r.clientY-x.top,w=G.current.clientWidth/x.width,E=G.current.clientHeight/x.height,F=M*w,B=k*E,z={x:G.current.clientWidth/2,y:G.current.clientHeight/2},V,D;if(typeof I.current.graph2ScreenCoords=="function"){let C1=I.current.graph2ScreenCoords(u,f);C1&&(V=C1.x,D=C1.y);}(V===void 0||D===void 0)&&(V=z.x+u*g,D=z.y+f*g);let K=X(F,B,V,D,p*g,Math.PI,Math.PI*2),ie=X(F,B,V,D,p*g,0,Math.PI);R1(K),A1(ie);},"handleCanvasMouseMove");return G.current&&G.current.addEventListener("mousemove",n),()=>{G.current&&G.current.removeEventListener("mousemove",n);}},[C,a,X,N,W]);let oe=t((n,r,d)=>{if(!n)return "";if(d.measureText(n).width<=r)return n;let g=n,u="...";for(;d.measureText(g+u).width>r&&g.length>0;)g=g.slice(0,-1);return g+u},"truncateText"),ee=t((n,r)=>{n.getTransform(),n.save(),n.setTransform(1,0,0,1,0,0);let{width:d,height:p}=n.canvas,g=a.gridSpacing,u=a.dotSize;n.fillStyle="rgba(0, 0, 0, 0.5)";for(let f=0;f<d;f+=g)for(let x=0;x<p;x+=g)n.beginPath(),n.arc(f,x,u,0,2*Math.PI),n.fill();n.restore();},"renderGrid"),te=t((n,r,d,p)=>{let{x:g,y:u}=n,f=a.nodeSizeBase;d.beginPath(),d.arc(g,u,f,0,2*Math.PI),d.fillStyle=r,d.fill();},"renderNodePointerAreaPaint"),re=t((n,r,d)=>{S.has(n)&&(n===C?qo(n,r,d):Yo(n,r,d));let{x:p,y:g,color:u,label:f}=n,x=a.nodeSizeBase,M=a.nodeSizeBase/2;r.beginPath(),r.arc(p,g,M,0,2*Math.PI),r.fillStyle=u,r.fill(),r.save(),r.translate(p,g);let k=N1(d),w=x*a.textPaddingFactor;r.font=`${k}px Sans-Serif`,r.textAlign="center",r.textBaseline="middle",r.fillStyle="black";let E=oe(f,w,r);r.fillText(E,0,0),r.restore();},"renderNodeCanvasObject"),ne=t((n,r,d)=>{let{source:p,target:g,label:u}=n;if(!u)return;let f={x:p.x,y:p.y},x={x:g.x,y:g.y},M=f.x+(x.x-f.x)/2,k=f.y+(x.y-f.y)/2,w=N1(d);r.font=`${w}px Sans-Serif`,r.fillStyle="#666",r.textAlign="center",r.textBaseline="middle";let E=Math.atan2(x.y-f.y,x.x-f.x);r.save(),r.translate(M,k),Math.abs(E)>Math.PI/2?(r.rotate(E+Math.PI),r.textAlign="center"):(r.rotate(E),r.textAlign="center");let F=r.measureText(u).width,B=2;r.fillStyle=v.has(n)?"rgba(255, 230, 204, 0.9)":"rgba(255, 255, 255, 0.8)",r.fillRect(-F/2-B,-w/2-B,F+B*2,w+B*2),r.fillStyle=v.has(n)?"#663300":"#666",r.fillText(u,0,0),r.restore();},"renderLinkCanvasObject");return jsxRuntime.jsx(qt,{ref:G,children:jsxRuntime.jsx(Jt__default.default,{ref:I,width:e,height:l,graphData:o,linkTarget:s,linkSource:c,onLinkClick:b,onNodeClick:t((n,r)=>{if(!n||!I.current)return;let d=a.nodeSizeBase*a.nodeAreaFactor/2,p=I.current.zoom()||1,g=r.target,u=n.x,f=n.y,x=g.getBoundingClientRect(),M=r.clientX-x.left,k=r.clientY-x.top,w=g.width/x.width,E=g.height/x.height,F=M*w,B=k*E,z={x:g.width/2,y:g.height/2},V,D;if(typeof I.current.graph2ScreenCoords=="function"){let K=I.current.graph2ScreenCoords(u,f);K&&(V=K.x,D=K.y);}if((V===void 0||D===void 0)&&(V=z.x+u*p,D=z.y+f*p),X(F,B,V,D,d*p,Math.PI,Math.PI*2)){Qo(C),r.stopPropagation();return}if(X(F,B,V,D,d*p,0,Math.PI)){jo(C),r.stopPropagation();return}m&&m(n);},"handleNodeClick"),nodeLabel:n=>`${n.label||""}`,linkLabel:n=>n.label,nodeAutoColorBy:"label",linkDirectionalArrowLength:3.5,linkDirectionalArrowRelPos:1,linkCurvature:0,maxZoom:a.maxZoom,minZoom:1,onNodeHover:Jo,onLinkHover:Uo,linkWidth:n=>v.has(n)?3:1,linkColor:n=>v.has(n)?"#ff9900":"#999",onRenderFramePre:ee,nodePointerAreaPaint:te,nodeCanvasObject:re,linkCanvasObjectMode:()=>"after",linkCanvasObject:ne,linkVisibility:n=>!($.has(n.source.id)||$.has(n.target.id)||n1.has(n.source.id)||n1.has(n.target.id)),nodeVisibility:n=>!($.has(n.id)||n1.has(n.id))})})},"Graph2D"),qt=mo.styled.div`
640
640
  display: inline-block;
641
641
  `;exports.AlertIcon=be;exports.ApiIcon=me;exports.ArrowCircleTopRightIcon=Se;exports.ArrowRightIcon=Ce;exports.BallsMenu=G1;exports.BugReportIcon=we;exports.Button=Y1;exports.CalendarIcon=ye;exports.CheckIcon=S0;exports.ChevronDownIcon=V1;exports.ChevronLeftIcon=v1;exports.ChevronRightIcon=w1;exports.ChevronUpIcon=D1;exports.ClosedLockIcon=$e;exports.ContextMenu=Eo;exports.ContextMenuDelimiter=k7;exports.CrossIcon=k0;exports.DataSetsIcon=Ee;exports.DeepSearchIcon=Ge;exports.DisabledVisibleIcon=Ve;exports.DocsIcon=ze;exports.DownloadIcon=Le;exports.EditUserIcon=_e;exports.EnableVisibleIcon=Oe;exports.EnterArrowLeftIcon=Re;exports.FiltersIcon=Ae;exports.GlobalStyle=W1;exports.Graph2D=h6;exports.Header=g5;exports.HeaderDelimeter=x5;exports.HeaderSection=P5;exports.HomepageIcon=We;exports.InfoCircleFilledIcon=z1;exports.InfoCircleIcon=Xe;exports.Input=xs;exports.ListMenu=Ai;exports.ListMenuItem=Ui;exports.ListMenuSection=e5;exports.MapRadarIcon=Je;exports.MoonIcon=Ye;exports.OpenLockIcon=qe;exports.OrganizationIcon=je;exports.PageLayout=Ts;exports.Pagination=i7;exports.PasswordFinderIcon=e0;exports.PhonebookIcon=r0;exports.PlusIcon=C0;exports.PrintIcon=i0;exports.Profiler2Icon=s0;exports.ProfilerIcon=a0;exports.RowActionsMenu=as;exports.SandBoxIcon=d0;exports.Select=A7;exports.Sidebar=q4;exports.SidebarContext=R;exports.SidebarDelimeter=ui;exports.SidebarItem=si;exports.SidebarSection=vi;exports.StatisticIcon=p0;exports.StyledContainer=Ot;exports.SunIcon=h0;exports.Table=X5;exports.ThemeProvider=br;exports.Typography=N0;exports.UnfoldIcon=P0;exports.UpRightArrowCircleIcon=f0;exports.UsersIcon=w0;exports.VectorIcon=m0;exports.convertPaletteToRem=i1;exports.darkTheme=dr;exports.getBreakpoint=nr;exports.getButtonSizeStyles=Z;exports.getButtonStyles=J;exports.getTypographyStyles=rr;exports.lightTheme=U1;exports.lightThemePx=J1;exports.pxToRem=X1;exports.resolveThemeColor=K1;exports.useContextMenuControl=Bo;//# sourceMappingURL=index.js.map
642
642
  //# sourceMappingURL=index.js.map