@mesh.ai/rabbit 0.0.30 → 0.0.31
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.
|
@@ -14434,7 +14434,7 @@ function xO({ count: e, totalCount: t, title: n, subTitle: r, className: o }) {
|
|
|
14434
14434
|
),
|
|
14435
14435
|
children: [
|
|
14436
14436
|
/* @__PURE__ */ Pe("div", { className: "self-stretch px-3 py-2 justify-start items-end inline-flex", children: [
|
|
14437
|
-
/* @__PURE__ */ te("div", { className: "
|
|
14437
|
+
/* @__PURE__ */ te("div", { className: "h-[26px] text-zinc-800 text-2xl leading-loose font-semibold", children: e }),
|
|
14438
14438
|
t && /* @__PURE__ */ Pe("div", { className: "text-stone-500 text-xs font-normal leading-none", children: [
|
|
14439
14439
|
"/",
|
|
14440
14440
|
t
|
|
@@ -43,4 +43,4 @@ z`).split(`
|
|
|
43
43
|
`)} {
|
|
44
44
|
${Jt}
|
|
45
45
|
}
|
|
46
|
-
`}),I.appendChild(M.createTextNode(qe))}z.timeEnd("clone node"),re==null||re(ve),te!==!1&&ae(ve)&&(z.time("embed web font"),yield Mk(ve,T),z.timeEnd("embed web font")),z.time("embed node"),rp(ve,T);const be=R.length;let xe=0;const ke=()=>v(this,null,function*(){for(;;){const qe=R.pop();if(!qe)break;try{yield qe}catch(Lt){Me("Failed to run task",Lt)}ne==null||ne(++xe,be)}});ne==null||ne(xe,be),yield Promise.all([...Array(4)].map(ke)),z.timeEnd("embed node"),ge==null||ge(ve);const Se=jk(ve,T);return Y&&Se.insertBefore(Y,Se.children[0]),I&&Se.insertBefore(I,Se.children[0]),se&&Zh(T),pe==null||pe(Se),Se})}function jk(h,w){const{width:T,height:M}=w,z=qr(T,M,h.ownerDocument),R=z.ownerDocument.createElementNS(z.namespaceURI,"foreignObject");return R.setAttributeNS(null,"x","0%"),R.setAttributeNS(null,"y","0%"),R.setAttributeNS(null,"width","100%"),R.setAttributeNS(null,"height","100%"),R.append(h),z.appendChild(R),z}function wi(h,w){return v(this,null,function*(){var T;const M=yield et(h,w),z=yield op(M),R=er(z,M.isEnable("removeControlCharacter"));M.autoDestruct||(M.svgStyleElement=He(M.ownerDocument),M.svgDefsElement=(T=M.ownerDocument)==null?void 0:T.createElementNS(wn,"defs"),M.svgStyles.clear());const I=wt(R,z.ownerDocument);return yield _t(I,M)})}function zk(h,w){return v(this,null,function*(){const T=yield et(h,w),{log:M,type:z,quality:R,dpi:I}=T,Y=yield wi(T);M.time("canvas to blob");const Q=yield ci(Y,z,R);if(["image/png","image/jpeg"].includes(z)&&I){const te=yield hi(Q.slice(0,33));let ne=new Uint8Array(te);return z==="image/png"?ne=A(ne,I):z==="image/jpeg"&&(ne=S(ne,I)),new Blob([ne,Q.slice(33)],{type:z})}return M.timeEnd("canvas to blob"),Q})}function rr(h,w){return v(this,null,function*(){const T=yield et(h,w),{log:M,quality:z,type:R,dpi:I}=T,Y=yield wi(T);M.time("canvas to data url");let Q=Y.toDataURL(R,z);if(["image/png","image/jpeg"].includes(R)&&I&&F&&W){const[te,ne]=Q.split(",");let se=0,re=!1;if(R==="image/png"){const Se=V(ne);Se>=0?(se=Math.ceil((Se+28)/3)*4,re=!0):se=33/3*4}else R==="image/jpeg"&&(se=18/3*4);const ge=ne.substring(0,se),pe=ne.substring(se),ve=window.atob(ge),be=new Uint8Array(ve.length);for(let Se=0;Se<be.length;Se++)be[Se]=ve.charCodeAt(Se);const xe=R==="image/png"?A(be,I,re):S(be,I),ke=window.btoa(String.fromCharCode(...xe));Q=[te,",",ke,pe].join("")}return M.timeEnd("canvas to data url"),Q})}function ip(h,w){return v(this,null,function*(){const T=yield et(h,w),{width:M,height:z,ownerDocument:R}=T,I=yield rr(T),Y=qr(M,z,R),Q=Y.ownerDocument.createElementNS(Y.namespaceURI,"image");return Q.setAttributeNS(null,"href",I),Q.setAttributeNS(null,"height","100%"),Q.setAttributeNS(null,"width","100%"),Y.appendChild(Q),er(Y,T.isEnable("removeControlCharacter"))})}function Fk(h,w){return v(this,null,function*(){const T=yield et(h,w),{ownerDocument:M,width:z,height:R,scale:I,type:Y}=T,Q=Y==="image/svg+xml"?yield ip(T):yield rr(T),te=wt(Q,M);return te.width=Math.floor(z*I),te.height=Math.floor(R*I),te.style.width=`${z}px`,te.style.height=`${R}px`,te})}function Wk(h,w){return v(this,null,function*(){return rr(yield et(h,m(d({},w),{type:"image/jpeg"})))})}function Bk(h,w){return v(this,null,function*(){const T=yield et(h,w),M=yield wi(T);return M.getContext("2d").getImageData(0,0,M.width,M.height).data})}function Uk(h,w){return v(this,null,function*(){return rr(yield et(h,m(d({},w),{type:"image/png"})))})}function Hk(h,w){return v(this,null,function*(){return rr(yield et(h,m(d({},w),{type:"image/webp"})))})}n.createContext=mi,n.destroyContext=Zh,n.domToBlob=zk,n.domToCanvas=wi,n.domToDataUrl=rr,n.domToForeignObjectSvg=op,n.domToImage=Fk,n.domToJpeg=Wk,n.domToPixel=Bk,n.domToPng=Uk,n.domToSvg=ip,n.domToWebp=Hk,n.loadMedia=Nt,n.waitUntilLoad=Gr,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(sl,sl.exports);var KT=sl.exports;const ll=(e,t,n)=>{g.useImperativeHandle(t,()=>({download(){e.current&&KT.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},ZT=({x:e,y:t,datum:n,size:r})=>q.jsx(Fs,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),QT=({x:e,y:t,datum:n})=>q.jsx(Fs,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),ri={xAccessor:e=>e.x,yAccessor:e=>e.y},Ah=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Nh=10,JT=5,ul=g.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:i,yAxisLabel:a,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:u,yAxisUnitSymbol:c,tooltipTitle:f,mode:d,xAxisCharLimit:m,connectNulls:p=!1,maxNodesInMiniMode:v=JT,tooltipStackCharLimit:S=Nh},b)=>{const[x,C]=g.useState(e.map(E=>E.id)),O=g.useRef(null);ll(O,b,`${i}-${a}-LineChart`);const y=g.useMemo(()=>o.map((E,A)=>({points:E.data.map((j,L)=>({x:r[L],y:j,nodeId:E.id,color:Ue(A)}))})).slice(0,d==="mini"?v:o.length),[r,o,d,v]),k=g.useMemo(()=>d==="full"?y.filter(E=>x.includes(E.points[0].nodeId)):y,[y,x,d]),D=g.useMemo(()=>Math.floor((n-(d==="mini"?0:150))/(r.length*8)),[n,r,d]);return q.jsxs("div",{ref:O,id:"line-chart",className:"bg-white flex flex-col rabbit-ds",style:{width:n,height:t},children:[q.jsxs("div",{className:"w-full min-w-0 min-h-0 h-full flex flex-row",children:[q.jsx("div",{className:"w-full min-w-0 min-h-0 h-full",children:q.jsxs(qn,{margin:{top:10,left:50,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...l&&{domain:l}},children:[q.jsx(Uw,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),q.jsx(Zf,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:E=>u?Ah(E,u.symbol,u.position):E,rangePadding:{end:10},tickComponent:E=>q.jsx(ol,{textLabel:E.formattedValue||"",x:E.x,y:E.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??D}),label:`${i} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),q.jsx(Zf,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${a} ➔`,tickFormat:E=>c?Ah(E,c.symbol,c.position):E,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),k.map((E,A)=>q.jsxs(q.Fragment,{children:[q.jsx(XT,{data:E.points,xAccessor:ri.xAccessor,yAccessor:ri.yAccessor,connectNulls:p}),q.jsx(hS,{dataKey:`Performance Management ${A}`,data:E.points,size:8,renderGlyph:ZT,xAccessor:ri.xAccessor,yAccessor:ri.yAccessor})]})),q.jsx(sd,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:QT,renderTooltip:({tooltipData:E})=>{var L,U,V,X,$,_;const A=e.find(F=>{var W;return F.id===((W=E==null?void 0:E.nearestDatum)==null?void 0:W.datum.nodeId)}),j=((L=E==null?void 0:E.nearestDatum)==null?void 0:L.datum)&&((U=E==null?void 0:E.nearestDatum)==null?void 0:U.datum.x.length)<S;return q.jsx(Ph,{xValue:(V=E==null?void 0:E.nearestDatum)==null?void 0:V.datum.x,yValue:(X=E==null?void 0:E.nearestDatum)==null?void 0:X.datum.y,xAxisLabel:i,yAxisLabel:a,showSideBySide:!!j,tooltipTitle:f,legendValue:(A==null?void 0:A.name)||"",legendDarkColor:(($=E==null?void 0:E.nearestDatum)==null?void 0:$.datum.color.dark)||Ue(0).dark,legendLightColor:((_=E==null?void 0:E.nearestDatum)==null?void 0:_.datum.color.light)||Ue(0).light})}})]})}),d==="full"&&q.jsxs("div",{className:"w-64 p-4 bg-zinc-100 rounded-lg flex-col justify-start items-start gap-0.5 inline-flex text-xs grow-0 shrink-0 basis-auto",children:[q.jsxs("div",{className:"text-sm font-semibold pb-2",children:[q.jsx("span",{className:"pr-1",children:i}),"(",y.length,")"]}),y.map(E=>{const A=e.find(j=>j.id===E.points[0].nodeId);return A&&q.jsxs("div",{className:"flex justify-between items-center gap-1 py-1 w-full",children:[q.jsxs("div",{className:"flex justify-between items-center",children:[q.jsx("div",{style:{backgroundColor:E.points[0].color.light,borderColor:E.points[0].color.dark},className:"h-3 w-3 rounded-full border mr-1"}),A.name]}),q.jsx("div",{className:"flex items-center",children:q.jsx(gC,{checked:x.includes(A.id),onCheckedChange:j=>{let L=[...x];j?L=[...x,A.id]:L.splice(x.indexOf(A.id),1),C(L)}})})]},A.id)})]})]}),d==="mini"&&q.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] text-[#666666] font-semibold",children:y.map(E=>{const A=e.find(j=>j.id===E.points[0].nodeId);return q.jsxs("div",{className:"flex justify-center items-center gap-1",children:[q.jsx("div",{style:{backgroundColor:E.points[0].color.light,borderColor:E.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),A==null?void 0:A.name]},A==null?void 0:A.id)})})]})}),ek={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Nh,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};ul.defaultProps=ek,ul.displayName="LineBase";const _h=g.forwardRef((e,t)=>q.jsx(Ho,{debounceTime:10,children:({width:n,height:r})=>q.jsx(ul,{ref:t,width:n,height:r,...e})}));_h.displayName="LineChart";const tk=_h;function Dh(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function nk(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function cl(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let o of e)(o=+t(o,++r,e))&&(n+=o)}return n}function rk(e,t){return e.sourceLinks.length?e.depth:t-1}function oi(e){return function(){return e}}function Lh(e,t){return ii(e.source,t.source)||e.index-t.index}function Ih(e,t){return ii(e.target,t.target)||e.index-t.index}function ii(e,t){return e.y0-t.y0}function fl(e){return e.value}function ok(e){return e.index}function ik(e){return e.nodes}function ak(e){return e.links}function jh(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function zh({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const o of t.sourceLinks)o.y0=n+o.width/2,n+=o.width;for(const o of t.targetLinks)o.y1=r+o.width/2,r+=o.width}}function sk(){let e=0,t=0,n=1,r=1,o=24,i=8,a,s=ok,l=rk,u,c,f=ik,d=ak,m=6;function p(){const $={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return v($),S($),b($),x($),y($),zh($),$}p.update=function($){return zh($),$},p.nodeId=function($){return arguments.length?(s=typeof $=="function"?$:oi($),p):s},p.nodeAlign=function($){return arguments.length?(l=typeof $=="function"?$:oi($),p):l},p.nodeSort=function($){return arguments.length?(u=$,p):u},p.nodeWidth=function($){return arguments.length?(o=+$,p):o},p.nodePadding=function($){return arguments.length?(i=a=+$,p):i},p.nodes=function($){return arguments.length?(f=typeof $=="function"?$:oi($),p):f},p.links=function($){return arguments.length?(d=typeof $=="function"?$:oi($),p):d},p.linkSort=function($){return arguments.length?(c=$,p):c},p.size=function($){return arguments.length?(e=t=0,n=+$[0],r=+$[1],p):[n-e,r-t]},p.extent=function($){return arguments.length?(e=+$[0][0],n=+$[1][0],t=+$[0][1],r=+$[1][1],p):[[e,t],[n,r]]},p.iterations=function($){return arguments.length?(m=+$,p):m};function v({nodes:$,links:_}){for(const[W,H]of $.entries())H.index=W,H.sourceLinks=[],H.targetLinks=[];const F=new Map($.map((W,H)=>[s(W,H,$),W]));for(const[W,H]of _.entries()){H.index=W;let{source:N,target:B}=H;typeof N!="object"&&(N=H.source=jh(F,N)),typeof B!="object"&&(B=H.target=jh(F,B)),N.sourceLinks.push(H),B.targetLinks.push(H)}if(c!=null)for(const{sourceLinks:W,targetLinks:H}of $)W.sort(c),H.sort(c)}function S({nodes:$}){for(const _ of $)_.value=_.fixedValue===void 0?Math.max(cl(_.sourceLinks,fl),cl(_.targetLinks,fl)):_.fixedValue}function b({nodes:$}){const _=$.length;let F=new Set($),W=new Set,H=0;for(;F.size;){for(const N of F){N.depth=H;for(const{target:B}of N.sourceLinks)W.add(B)}if(++H>_)throw new Error("circular link");F=W,W=new Set}}function x({nodes:$}){const _=$.length;let F=new Set($),W=new Set,H=0;for(;F.size;){for(const N of F){N.height=H;for(const{source:B}of N.targetLinks)W.add(B)}if(++H>_)throw new Error("circular link");F=W,W=new Set}}function C({nodes:$}){const _=Dh($,H=>H.depth)+1,F=(n-e-o)/(_-1),W=new Array(_);for(const H of $){const N=Math.max(0,Math.min(_-1,Math.floor(l.call(null,H,_))));H.layer=N,H.x0=e+N*F,H.x1=H.x0+o,W[N]?W[N].push(H):W[N]=[H]}if(u)for(const H of W)H.sort(u);return W}function O($){const _=nk($,F=>(r-t-(F.length-1)*a)/cl(F,fl));for(const F of $){let W=t;for(const H of F){H.y0=W,H.y1=W+H.value*_,W=H.y1+a;for(const N of H.sourceLinks)N.width=N.value*_}W=(r-W+a)/(F.length+1);for(let H=0;H<F.length;++H){const N=F[H];N.y0+=W*(H+1),N.y1+=W*(H+1)}U(F)}}function y($){const _=C($);a=Math.min(i,(r-t)/(Dh(_,F=>F.length)-1)),O(_);for(let F=0;F<m;++F){const W=Math.pow(.99,F),H=Math.max(1-W,(F+1)/m);D(_,W,H),k(_,W,H)}}function k($,_,F){for(let W=1,H=$.length;W<H;++W){const N=$[W];for(const B of N){let oe=0,Z=0;for(const{source:ee,value:ae}of B.targetLinks){let le=ae*(B.layer-ee.layer);oe+=V(ee,B)*le,Z+=le}if(!(Z>0))continue;let ie=(oe/Z-B.y0)*_;B.y0+=ie,B.y1+=ie,L(B)}u===void 0&&N.sort(ii),E(N,F)}}function D($,_,F){for(let W=$.length,H=W-2;H>=0;--H){const N=$[H];for(const B of N){let oe=0,Z=0;for(const{target:ee,value:ae}of B.sourceLinks){let le=ae*(ee.layer-B.layer);oe+=X(B,ee)*le,Z+=le}if(!(Z>0))continue;let ie=(oe/Z-B.y0)*_;B.y0+=ie,B.y1+=ie,L(B)}u===void 0&&N.sort(ii),E(N,F)}}function E($,_){const F=$.length>>1,W=$[F];j($,W.y0-a,F-1,_),A($,W.y1+a,F+1,_),j($,r,$.length-1,_),A($,t,0,_)}function A($,_,F,W){for(;F<$.length;++F){const H=$[F],N=(_-H.y0)*W;N>1e-6&&(H.y0+=N,H.y1+=N),_=H.y1+a}}function j($,_,F,W){for(;F>=0;--F){const H=$[F],N=(H.y1-_)*W;N>1e-6&&(H.y0-=N,H.y1-=N),_=H.y0-a}}function L({sourceLinks:$,targetLinks:_}){if(c===void 0){for(const{source:{sourceLinks:F}}of _)F.sort(Ih);for(const{target:{targetLinks:F}}of $)F.sort(Lh)}}function U($){if(c===void 0)for(const{sourceLinks:_,targetLinks:F}of $)_.sort(Ih),F.sort(Lh)}function V($,_){let F=$.y0-($.sourceLinks.length-1)*a/2;for(const{target:W,width:H}of $.sourceLinks){if(W===_)break;F+=H+a}for(const{source:W,width:H}of _.targetLinks){if(W===$)break;F-=H}return F}function X($,_){let F=_.y0-(_.targetLinks.length-1)*a/2;for(const{source:W,width:H}of _.targetLinks){if(W===$)break;F+=H+a}for(const{target:W,width:H}of $.sourceLinks){if(W===_)break;F-=H}return F}return p}function lk({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,l,u,c;const i=e.source,a=e.target;return q.jsxs(Ie,{tooltipTitle:o,children:[q.jsx(Ie.Item,{label:t,value:i.name}),q.jsx(Ie.Item,{label:n,value:a.name}),q.jsx(Ie.Item,{label:r,value:e.weight.toString()}),q.jsx(Ie.Legend,{value:i.name,darkColor:(s=Ue(i.index||0))==null?void 0:s.dark,lightColor:(l=Ue(i.index||0))==null?void 0:l.light}),q.jsx(Ie.Legend,{value:a.name,darkColor:(u=Ue(a.index||0))==null?void 0:u.dark,lightColor:(c=Ue(a.index||0))==null?void 0:c.light})]})}const Fh=80,Wh=20,uk=30,ck=12,Bh=g.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:i,weightLabel:a},s)=>{const l=g.useMemo(()=>sk().nodeId($=>$.id).nodeWidth(ck).nodePadding(uk).nodeAlign($=>$.group),[]),u=g.useRef(null);ll(u,s,`${n}-SankeyChart`);const[c,f]=g.useState(""),[d,m]=g.useState(null),{tooltipData:p,tooltipLeft:v,tooltipTop:S,tooltipOpen:b,showTooltip:x,hideTooltip:C}=ts(),{containerBounds:O,containerRef:y,TooltipInPortal:k}=ls({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),D=g.useMemo(()=>l.extent([[Fh,Wh],[t-Fh,e-Wh-50]])({nodes:r,links:o.map($=>({...$,value:Number($.weight)}))}),[e,t,l,r,o]),E=g.useMemo(()=>Math.max(...D.nodes.map($=>$.depth??0)),[D]),A=g.useMemo(()=>{const $={};let _=-1/0;return D.nodes.forEach(F=>{const{group:W}=F;$[W]?($[W].x=Math.max($[W].x??-1/0,F.x0??-1/0),$[W].y=Math.max($[W].y??-1/0,F.y1??-1/0)):($[W]={},$[W].x=F.x0,$[W].y=F.y1),_=Math.max(_,$[W].y??-1/0),$[W].y=_}),$},[D]),j=g.useCallback($=>{const _=l.nodeId()($);f(c===_?"":_)},[c,l]),L=g.useCallback(()=>{f(""),m(null)},[]),U=g.useMemo(()=>c===""&&d===null?new Set:new Set(D.links.filter($=>l.nodeId()($.source)===c||l.nodeId()($.target)===c||(d==null?void 0:d.source)===$.source&&(d==null?void 0:d.target)===$.target)),[c,D,d,l]),V=g.useCallback(($,_)=>{const F=("clientX"in $?$.clientX:0)-O.left,W=("clientY"in $?$.clientY:0)-O.top;m(_),F&&W&&x({tooltipLeft:F,tooltipTop:W,tooltipData:_})},[x,O]),X=g.useCallback(()=>{L(),C()},[L,C]);return q.jsxs("div",{ref:u,className:"bg-white w-min h-min rabbit-ds",id:"sankey-chart",children:[q.jsxs("svg",{height:e,width:t,ref:y,children:[q.jsx("g",{children:D.links.map($=>q.jsx(aw,{data:$,source:_=>({x:_.source.x1,y:_.y0}),target:_=>({x:_.target.x0,y:_.y1}),x:_=>_.x??0,y:_=>_.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>X(),onMouseMove:_=>V(_,$),stroke:Ue($.source.index||0).light,strokeWidth:$.width,strokeOpacity:U.has($)?.7:.25},$.index))}),q.jsx("g",{children:D.nodes.map($=>{var _,F,W;return q.jsx("g",{children:q.jsx(Qx,{x:$.x0??0,height:($.y1??0)-($.y0??0)+10,width:($.x1??0)-($.x0??0),y:($.y0??0)-5,onMouseEnter:()=>j($),onMouseLeave:()=>L(),radius:2,fill:c===$.id?(_=Ue($.index||0))==null?void 0:_.dark:(F=Ue($.index||0))==null?void 0:F.light,stroke:(W=Ue($.index||0))==null?void 0:W.dark,all:!0})},$.index)})}),q.jsx("g",{children:i.map($=>q.jsx(ol,{axisCharLimit:20,x:A[$.id].x??0,y:(A[$.id].y??0)+40,textLabel:$.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},$.id))}),q.jsxs("g",{children:[D.nodes.map($=>q.jsx(ol,{axisCharLimit:8,x:$.depth===E?($.x1??0)+10:($.x0??0)-10,y:($.y0??0)+(($.y1??0)-($.y0??0))/2,textLabel:$.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:$.depth===E?"start":"end",fill:"#666666"}},$.index)),D.nodes.map($=>$.value&&q.jsx(Fi,{x:$.depth===E?($.x1??0)+10:($.x0??0)-10,y:($.y0??0)+(($.y1??0)-($.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:$.depth===E?"start":"end",fill:"#666666"},children:`(${$.value.toString()})`},$.index))]})]}),b&&p&&q.jsx(k,{top:S,left:v,unstyled:!0,applyPositionStyle:!0,children:q.jsx(lk,{tooltipData:p,fromLabel:`From: ${i[p.source.group].name}`,toLabel:`To: ${i[p.target.group].name}`,weightLabel:a,tooltipTitle:n})},Math.random())]})});Bh.displayName="Sankey";const Uh=g.forwardRef((e,t)=>q.jsx(Ho,{debounceTime:10,children:({width:n,height:r})=>n&&r&&q.jsx(Bh,{ref:t,width:n,height:r,...e})}));Uh.displayName="SankeyChart";const fk=Uh;function dk(e){return"bandwidth"in e?e.bandwidth():0}var hk=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dl.apply(this,arguments)}function pk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Hh(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,d=e.className,m=e.children,p=e.numTicks,v=p===void 0?10:p,S=e.lineStyle,b=e.offset,x=e.tickValues,C=pk(e,hk),O=x??Da(i,v),y=(b??0)+dk(i)/2,k=O.map(function(D,E){var A,j=((A=_a(i(D)))!=null?A:0)+y;return{index:E,from:new jt({x:0,y:j}),to:new jt({x:a,y:j})}});return g.createElement(en,{className:Ge("visx-rows",d),top:n,left:o},m?m({lines:k}):k.map(function(D){var E=D.from,A=D.to,j=D.index;return g.createElement(cw,dl({key:"row-line-"+j,from:E,to:A,stroke:l,strokeWidth:c,strokeDasharray:f,style:S},C))}))}Hh.propTypes={tickValues:K.array,width:K.number.isRequired};function qh({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:i,legendDarkColor:a,legendLightColor:s}){const l=e==null?void 0:e.toString(),u=t==null?void 0:t.toString();return q.jsxs(Ie,{tooltipTitle:n,showSideBySide:!0,children:[q.jsx(Ie.Item,{label:r,value:l}),q.jsx(Ie.Item,{label:o,value:u}),q.jsx(Ie.Legend,{value:i,darkColor:a,lightColor:s})]})}qh.defaultProps={xValue:void 0,yValue:void 0};const Yh=20,Gh=20,hl=80,ai=50,pl=10,gl=g.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:i,width:a,height:s,integerBins:l=!1},u)=>{const c=g.useMemo(()=>io(i),[i]),f=g.useMemo(()=>{const U=c[0]??0,V=c[1]??0,X=V-U>pl?V:pl+U,$=V-U>pl?V-U:10,_=Math.floor(c[0]??0),F=Math.ceil(X),W=Math.ceil($),H=r||(l?[_,F]:[U,X]);return f0().domain(H).thresholds(o||(l?W:$))(i)},[c,o,i,r,l]),d=g.useMemo(()=>Mr({domain:[f[0].x0??0,f[f.length-1].x1??0],range:[ai,a-Gh],round:!0,nice:!0}),[f,a]),m=g.useMemo(()=>Mr({domain:[0,Yi(f,U=>U.length)??0],range:[s-hl,Yh],round:!0,nice:!0}),[f,s]),p=g.useRef(null);ll(p,u,`${t}-${n}-Histogram`);const{tooltipData:v,tooltipLeft:S,tooltipTop:b,tooltipOpen:x,showTooltip:C,hideTooltip:O}=ts(),{containerBounds:y,containerRef:k,TooltipInPortal:D}=ls({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=a-ai-Gh,A=s-Yh-hl-100,j=g.useCallback((U,V)=>{const X=("clientX"in U?U.clientX:0)-y.left,$=("clientY"in U?U.clientY:0)-y.top;X&&$&&C({tooltipLeft:X,tooltipTop:$,tooltipData:V})},[C,y]),L=g.useCallback(()=>{O()},[O]);return q.jsxs("div",{className:"bg-white flex flex-col rabbit-ds",style:{width:a,height:s},ref:p,children:[q.jsxs("svg",{width:a,height:s,ref:k,children:[q.jsx(Qa,{orientation:"bottom",scale:d,top:s-hl,hideTicks:!0,stroke:"#CFD7DF",strokeWidth:1,rangePadding:{end:10},label:`${t} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),q.jsx(Qa,{orientation:"left",scale:m,left:ai,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",label:`${n} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"end"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),q.jsxs(en,{children:[q.jsx(Hh,{scale:m,width:E,height:A,left:ai,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),f.map(U=>{const V=m(0)-m(U.length),X=d(U.x1??0)-d(U.x0??0);return q.jsx("g",{children:q.jsx(Vx,{x:d(U.x0??0),y:m(U.length),width:X,height:V&&V-1,fill:Ue(0).light,stroke:Ue(0).dark,strokeWidth:1,onMouseMove:$=>j($,U),onMouseLeave:()=>L()})},d(U.x0??0))})]})]}),x&&v&&q.jsx(D,{top:b,left:S,unstyled:!0,applyPositionStyle:!0,children:q.jsx(qh,{xAxisLabel:t,xValue:`${v.x0} to ${v.x1}`,yAxisLabel:n,yValue:v.length,tooltipTitle:e,legendValue:n,legendDarkColor:Ue(0).dark,legendLightColor:Ue(0).light})},Math.random())]})}),Rh=g.forwardRef((e,t)=>q.jsx(Ho,{debounceTime:10,children:({width:n,height:r})=>q.jsx(gl,{ref:t,width:n,height:r,...e})}));gl.defaultProps={domain:void 0,binCount:void 0,integerBins:!1},gl.displayName="HistogramBase",Rh.displayName="HistogramChart";const gk=Rh;function mk({count:e,totalCount:t,title:n,subTitle:r,className:o}){return q.jsxs("div",{className:Rn("rabbit-ds max-w-[336px] min-h-[96px] min-w-[200px] box-border px-2 py-4 bg-white rounded-lg shadow flex-col justify-center items-start gap-1 inline-flex",o),children:[q.jsxs("div",{className:"self-stretch px-3 py-2 justify-start items-end inline-flex",children:[q.jsx("div",{className:"w-[26px] h-[26px] text-zinc-800 text-2xl leading-loose font-semibold",children:e}),t&&q.jsxs("div",{className:"text-stone-500 text-xs font-normal leading-none",children:["/",t]})]}),q.jsx("div",{className:"self-stretch px-3 justify-start items-center gap-2 inline-flex",children:q.jsxs("div",{className:"grow shrink basis-0 flex-col justify-start items-start gap-0.5 inline-flex",children:[q.jsx("div",{className:"self-stretch justify-start items-start gap-2.5 inline-flex",children:q.jsx("div",{className:"grow shrink basis-0 text-zinc-800 text-xs font-semibold leading-none",children:n})}),r&&q.jsx("div",{className:"self-stretch justify-start items-center gap-1 inline-flex",children:q.jsx("div",{className:"grow shrink basis-0 text-stone-500 text-xs font-normal leading-none",children:r})})]})})]})}Ye.CardKPI=mk,Ye.HistogramChart=gk,Ye.LineChart=tk,Ye.SankeyChart=fk,Object.defineProperty(Ye,Symbol.toStringTag,{value:"Module"})});
|
|
46
|
+
`}),I.appendChild(M.createTextNode(qe))}z.timeEnd("clone node"),re==null||re(ve),te!==!1&&ae(ve)&&(z.time("embed web font"),yield Mk(ve,T),z.timeEnd("embed web font")),z.time("embed node"),rp(ve,T);const be=R.length;let xe=0;const ke=()=>v(this,null,function*(){for(;;){const qe=R.pop();if(!qe)break;try{yield qe}catch(Lt){Me("Failed to run task",Lt)}ne==null||ne(++xe,be)}});ne==null||ne(xe,be),yield Promise.all([...Array(4)].map(ke)),z.timeEnd("embed node"),ge==null||ge(ve);const Se=jk(ve,T);return Y&&Se.insertBefore(Y,Se.children[0]),I&&Se.insertBefore(I,Se.children[0]),se&&Zh(T),pe==null||pe(Se),Se})}function jk(h,w){const{width:T,height:M}=w,z=qr(T,M,h.ownerDocument),R=z.ownerDocument.createElementNS(z.namespaceURI,"foreignObject");return R.setAttributeNS(null,"x","0%"),R.setAttributeNS(null,"y","0%"),R.setAttributeNS(null,"width","100%"),R.setAttributeNS(null,"height","100%"),R.append(h),z.appendChild(R),z}function wi(h,w){return v(this,null,function*(){var T;const M=yield et(h,w),z=yield op(M),R=er(z,M.isEnable("removeControlCharacter"));M.autoDestruct||(M.svgStyleElement=He(M.ownerDocument),M.svgDefsElement=(T=M.ownerDocument)==null?void 0:T.createElementNS(wn,"defs"),M.svgStyles.clear());const I=wt(R,z.ownerDocument);return yield _t(I,M)})}function zk(h,w){return v(this,null,function*(){const T=yield et(h,w),{log:M,type:z,quality:R,dpi:I}=T,Y=yield wi(T);M.time("canvas to blob");const Q=yield ci(Y,z,R);if(["image/png","image/jpeg"].includes(z)&&I){const te=yield hi(Q.slice(0,33));let ne=new Uint8Array(te);return z==="image/png"?ne=A(ne,I):z==="image/jpeg"&&(ne=S(ne,I)),new Blob([ne,Q.slice(33)],{type:z})}return M.timeEnd("canvas to blob"),Q})}function rr(h,w){return v(this,null,function*(){const T=yield et(h,w),{log:M,quality:z,type:R,dpi:I}=T,Y=yield wi(T);M.time("canvas to data url");let Q=Y.toDataURL(R,z);if(["image/png","image/jpeg"].includes(R)&&I&&F&&W){const[te,ne]=Q.split(",");let se=0,re=!1;if(R==="image/png"){const Se=V(ne);Se>=0?(se=Math.ceil((Se+28)/3)*4,re=!0):se=33/3*4}else R==="image/jpeg"&&(se=18/3*4);const ge=ne.substring(0,se),pe=ne.substring(se),ve=window.atob(ge),be=new Uint8Array(ve.length);for(let Se=0;Se<be.length;Se++)be[Se]=ve.charCodeAt(Se);const xe=R==="image/png"?A(be,I,re):S(be,I),ke=window.btoa(String.fromCharCode(...xe));Q=[te,",",ke,pe].join("")}return M.timeEnd("canvas to data url"),Q})}function ip(h,w){return v(this,null,function*(){const T=yield et(h,w),{width:M,height:z,ownerDocument:R}=T,I=yield rr(T),Y=qr(M,z,R),Q=Y.ownerDocument.createElementNS(Y.namespaceURI,"image");return Q.setAttributeNS(null,"href",I),Q.setAttributeNS(null,"height","100%"),Q.setAttributeNS(null,"width","100%"),Y.appendChild(Q),er(Y,T.isEnable("removeControlCharacter"))})}function Fk(h,w){return v(this,null,function*(){const T=yield et(h,w),{ownerDocument:M,width:z,height:R,scale:I,type:Y}=T,Q=Y==="image/svg+xml"?yield ip(T):yield rr(T),te=wt(Q,M);return te.width=Math.floor(z*I),te.height=Math.floor(R*I),te.style.width=`${z}px`,te.style.height=`${R}px`,te})}function Wk(h,w){return v(this,null,function*(){return rr(yield et(h,m(d({},w),{type:"image/jpeg"})))})}function Bk(h,w){return v(this,null,function*(){const T=yield et(h,w),M=yield wi(T);return M.getContext("2d").getImageData(0,0,M.width,M.height).data})}function Uk(h,w){return v(this,null,function*(){return rr(yield et(h,m(d({},w),{type:"image/png"})))})}function Hk(h,w){return v(this,null,function*(){return rr(yield et(h,m(d({},w),{type:"image/webp"})))})}n.createContext=mi,n.destroyContext=Zh,n.domToBlob=zk,n.domToCanvas=wi,n.domToDataUrl=rr,n.domToForeignObjectSvg=op,n.domToImage=Fk,n.domToJpeg=Wk,n.domToPixel=Bk,n.domToPng=Uk,n.domToSvg=ip,n.domToWebp=Hk,n.loadMedia=Nt,n.waitUntilLoad=Gr,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(sl,sl.exports);var KT=sl.exports;const ll=(e,t,n)=>{g.useImperativeHandle(t,()=>({download(){e.current&&KT.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},ZT=({x:e,y:t,datum:n,size:r})=>q.jsx(Fs,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),QT=({x:e,y:t,datum:n})=>q.jsx(Fs,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),ri={xAccessor:e=>e.x,yAccessor:e=>e.y},Ah=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Nh=10,JT=5,ul=g.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:i,yAxisLabel:a,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:u,yAxisUnitSymbol:c,tooltipTitle:f,mode:d,xAxisCharLimit:m,connectNulls:p=!1,maxNodesInMiniMode:v=JT,tooltipStackCharLimit:S=Nh},b)=>{const[x,C]=g.useState(e.map(E=>E.id)),O=g.useRef(null);ll(O,b,`${i}-${a}-LineChart`);const y=g.useMemo(()=>o.map((E,A)=>({points:E.data.map((j,L)=>({x:r[L],y:j,nodeId:E.id,color:Ue(A)}))})).slice(0,d==="mini"?v:o.length),[r,o,d,v]),k=g.useMemo(()=>d==="full"?y.filter(E=>x.includes(E.points[0].nodeId)):y,[y,x,d]),D=g.useMemo(()=>Math.floor((n-(d==="mini"?0:150))/(r.length*8)),[n,r,d]);return q.jsxs("div",{ref:O,id:"line-chart",className:"bg-white flex flex-col rabbit-ds",style:{width:n,height:t},children:[q.jsxs("div",{className:"w-full min-w-0 min-h-0 h-full flex flex-row",children:[q.jsx("div",{className:"w-full min-w-0 min-h-0 h-full",children:q.jsxs(qn,{margin:{top:10,left:50,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...l&&{domain:l}},children:[q.jsx(Uw,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),q.jsx(Zf,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:E=>u?Ah(E,u.symbol,u.position):E,rangePadding:{end:10},tickComponent:E=>q.jsx(ol,{textLabel:E.formattedValue||"",x:E.x,y:E.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??D}),label:`${i} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),q.jsx(Zf,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${a} ➔`,tickFormat:E=>c?Ah(E,c.symbol,c.position):E,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),k.map((E,A)=>q.jsxs(q.Fragment,{children:[q.jsx(XT,{data:E.points,xAccessor:ri.xAccessor,yAccessor:ri.yAccessor,connectNulls:p}),q.jsx(hS,{dataKey:`Performance Management ${A}`,data:E.points,size:8,renderGlyph:ZT,xAccessor:ri.xAccessor,yAccessor:ri.yAccessor})]})),q.jsx(sd,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:QT,renderTooltip:({tooltipData:E})=>{var L,U,V,X,$,_;const A=e.find(F=>{var W;return F.id===((W=E==null?void 0:E.nearestDatum)==null?void 0:W.datum.nodeId)}),j=((L=E==null?void 0:E.nearestDatum)==null?void 0:L.datum)&&((U=E==null?void 0:E.nearestDatum)==null?void 0:U.datum.x.length)<S;return q.jsx(Ph,{xValue:(V=E==null?void 0:E.nearestDatum)==null?void 0:V.datum.x,yValue:(X=E==null?void 0:E.nearestDatum)==null?void 0:X.datum.y,xAxisLabel:i,yAxisLabel:a,showSideBySide:!!j,tooltipTitle:f,legendValue:(A==null?void 0:A.name)||"",legendDarkColor:(($=E==null?void 0:E.nearestDatum)==null?void 0:$.datum.color.dark)||Ue(0).dark,legendLightColor:((_=E==null?void 0:E.nearestDatum)==null?void 0:_.datum.color.light)||Ue(0).light})}})]})}),d==="full"&&q.jsxs("div",{className:"w-64 p-4 bg-zinc-100 rounded-lg flex-col justify-start items-start gap-0.5 inline-flex text-xs grow-0 shrink-0 basis-auto",children:[q.jsxs("div",{className:"text-sm font-semibold pb-2",children:[q.jsx("span",{className:"pr-1",children:i}),"(",y.length,")"]}),y.map(E=>{const A=e.find(j=>j.id===E.points[0].nodeId);return A&&q.jsxs("div",{className:"flex justify-between items-center gap-1 py-1 w-full",children:[q.jsxs("div",{className:"flex justify-between items-center",children:[q.jsx("div",{style:{backgroundColor:E.points[0].color.light,borderColor:E.points[0].color.dark},className:"h-3 w-3 rounded-full border mr-1"}),A.name]}),q.jsx("div",{className:"flex items-center",children:q.jsx(gC,{checked:x.includes(A.id),onCheckedChange:j=>{let L=[...x];j?L=[...x,A.id]:L.splice(x.indexOf(A.id),1),C(L)}})})]},A.id)})]})]}),d==="mini"&&q.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] text-[#666666] font-semibold",children:y.map(E=>{const A=e.find(j=>j.id===E.points[0].nodeId);return q.jsxs("div",{className:"flex justify-center items-center gap-1",children:[q.jsx("div",{style:{backgroundColor:E.points[0].color.light,borderColor:E.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),A==null?void 0:A.name]},A==null?void 0:A.id)})})]})}),ek={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Nh,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};ul.defaultProps=ek,ul.displayName="LineBase";const _h=g.forwardRef((e,t)=>q.jsx(Ho,{debounceTime:10,children:({width:n,height:r})=>q.jsx(ul,{ref:t,width:n,height:r,...e})}));_h.displayName="LineChart";const tk=_h;function Dh(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function nk(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function cl(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let o of e)(o=+t(o,++r,e))&&(n+=o)}return n}function rk(e,t){return e.sourceLinks.length?e.depth:t-1}function oi(e){return function(){return e}}function Lh(e,t){return ii(e.source,t.source)||e.index-t.index}function Ih(e,t){return ii(e.target,t.target)||e.index-t.index}function ii(e,t){return e.y0-t.y0}function fl(e){return e.value}function ok(e){return e.index}function ik(e){return e.nodes}function ak(e){return e.links}function jh(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function zh({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const o of t.sourceLinks)o.y0=n+o.width/2,n+=o.width;for(const o of t.targetLinks)o.y1=r+o.width/2,r+=o.width}}function sk(){let e=0,t=0,n=1,r=1,o=24,i=8,a,s=ok,l=rk,u,c,f=ik,d=ak,m=6;function p(){const $={nodes:f.apply(null,arguments),links:d.apply(null,arguments)};return v($),S($),b($),x($),y($),zh($),$}p.update=function($){return zh($),$},p.nodeId=function($){return arguments.length?(s=typeof $=="function"?$:oi($),p):s},p.nodeAlign=function($){return arguments.length?(l=typeof $=="function"?$:oi($),p):l},p.nodeSort=function($){return arguments.length?(u=$,p):u},p.nodeWidth=function($){return arguments.length?(o=+$,p):o},p.nodePadding=function($){return arguments.length?(i=a=+$,p):i},p.nodes=function($){return arguments.length?(f=typeof $=="function"?$:oi($),p):f},p.links=function($){return arguments.length?(d=typeof $=="function"?$:oi($),p):d},p.linkSort=function($){return arguments.length?(c=$,p):c},p.size=function($){return arguments.length?(e=t=0,n=+$[0],r=+$[1],p):[n-e,r-t]},p.extent=function($){return arguments.length?(e=+$[0][0],n=+$[1][0],t=+$[0][1],r=+$[1][1],p):[[e,t],[n,r]]},p.iterations=function($){return arguments.length?(m=+$,p):m};function v({nodes:$,links:_}){for(const[W,H]of $.entries())H.index=W,H.sourceLinks=[],H.targetLinks=[];const F=new Map($.map((W,H)=>[s(W,H,$),W]));for(const[W,H]of _.entries()){H.index=W;let{source:N,target:B}=H;typeof N!="object"&&(N=H.source=jh(F,N)),typeof B!="object"&&(B=H.target=jh(F,B)),N.sourceLinks.push(H),B.targetLinks.push(H)}if(c!=null)for(const{sourceLinks:W,targetLinks:H}of $)W.sort(c),H.sort(c)}function S({nodes:$}){for(const _ of $)_.value=_.fixedValue===void 0?Math.max(cl(_.sourceLinks,fl),cl(_.targetLinks,fl)):_.fixedValue}function b({nodes:$}){const _=$.length;let F=new Set($),W=new Set,H=0;for(;F.size;){for(const N of F){N.depth=H;for(const{target:B}of N.sourceLinks)W.add(B)}if(++H>_)throw new Error("circular link");F=W,W=new Set}}function x({nodes:$}){const _=$.length;let F=new Set($),W=new Set,H=0;for(;F.size;){for(const N of F){N.height=H;for(const{source:B}of N.targetLinks)W.add(B)}if(++H>_)throw new Error("circular link");F=W,W=new Set}}function C({nodes:$}){const _=Dh($,H=>H.depth)+1,F=(n-e-o)/(_-1),W=new Array(_);for(const H of $){const N=Math.max(0,Math.min(_-1,Math.floor(l.call(null,H,_))));H.layer=N,H.x0=e+N*F,H.x1=H.x0+o,W[N]?W[N].push(H):W[N]=[H]}if(u)for(const H of W)H.sort(u);return W}function O($){const _=nk($,F=>(r-t-(F.length-1)*a)/cl(F,fl));for(const F of $){let W=t;for(const H of F){H.y0=W,H.y1=W+H.value*_,W=H.y1+a;for(const N of H.sourceLinks)N.width=N.value*_}W=(r-W+a)/(F.length+1);for(let H=0;H<F.length;++H){const N=F[H];N.y0+=W*(H+1),N.y1+=W*(H+1)}U(F)}}function y($){const _=C($);a=Math.min(i,(r-t)/(Dh(_,F=>F.length)-1)),O(_);for(let F=0;F<m;++F){const W=Math.pow(.99,F),H=Math.max(1-W,(F+1)/m);D(_,W,H),k(_,W,H)}}function k($,_,F){for(let W=1,H=$.length;W<H;++W){const N=$[W];for(const B of N){let oe=0,Z=0;for(const{source:ee,value:ae}of B.targetLinks){let le=ae*(B.layer-ee.layer);oe+=V(ee,B)*le,Z+=le}if(!(Z>0))continue;let ie=(oe/Z-B.y0)*_;B.y0+=ie,B.y1+=ie,L(B)}u===void 0&&N.sort(ii),E(N,F)}}function D($,_,F){for(let W=$.length,H=W-2;H>=0;--H){const N=$[H];for(const B of N){let oe=0,Z=0;for(const{target:ee,value:ae}of B.sourceLinks){let le=ae*(ee.layer-B.layer);oe+=X(B,ee)*le,Z+=le}if(!(Z>0))continue;let ie=(oe/Z-B.y0)*_;B.y0+=ie,B.y1+=ie,L(B)}u===void 0&&N.sort(ii),E(N,F)}}function E($,_){const F=$.length>>1,W=$[F];j($,W.y0-a,F-1,_),A($,W.y1+a,F+1,_),j($,r,$.length-1,_),A($,t,0,_)}function A($,_,F,W){for(;F<$.length;++F){const H=$[F],N=(_-H.y0)*W;N>1e-6&&(H.y0+=N,H.y1+=N),_=H.y1+a}}function j($,_,F,W){for(;F>=0;--F){const H=$[F],N=(H.y1-_)*W;N>1e-6&&(H.y0-=N,H.y1-=N),_=H.y0-a}}function L({sourceLinks:$,targetLinks:_}){if(c===void 0){for(const{source:{sourceLinks:F}}of _)F.sort(Ih);for(const{target:{targetLinks:F}}of $)F.sort(Lh)}}function U($){if(c===void 0)for(const{sourceLinks:_,targetLinks:F}of $)_.sort(Ih),F.sort(Lh)}function V($,_){let F=$.y0-($.sourceLinks.length-1)*a/2;for(const{target:W,width:H}of $.sourceLinks){if(W===_)break;F+=H+a}for(const{source:W,width:H}of _.targetLinks){if(W===$)break;F-=H}return F}function X($,_){let F=_.y0-(_.targetLinks.length-1)*a/2;for(const{source:W,width:H}of _.targetLinks){if(W===$)break;F+=H+a}for(const{target:W,width:H}of $.sourceLinks){if(W===_)break;F-=H}return F}return p}function lk({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,l,u,c;const i=e.source,a=e.target;return q.jsxs(Ie,{tooltipTitle:o,children:[q.jsx(Ie.Item,{label:t,value:i.name}),q.jsx(Ie.Item,{label:n,value:a.name}),q.jsx(Ie.Item,{label:r,value:e.weight.toString()}),q.jsx(Ie.Legend,{value:i.name,darkColor:(s=Ue(i.index||0))==null?void 0:s.dark,lightColor:(l=Ue(i.index||0))==null?void 0:l.light}),q.jsx(Ie.Legend,{value:a.name,darkColor:(u=Ue(a.index||0))==null?void 0:u.dark,lightColor:(c=Ue(a.index||0))==null?void 0:c.light})]})}const Fh=80,Wh=20,uk=30,ck=12,Bh=g.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:i,weightLabel:a},s)=>{const l=g.useMemo(()=>sk().nodeId($=>$.id).nodeWidth(ck).nodePadding(uk).nodeAlign($=>$.group),[]),u=g.useRef(null);ll(u,s,`${n}-SankeyChart`);const[c,f]=g.useState(""),[d,m]=g.useState(null),{tooltipData:p,tooltipLeft:v,tooltipTop:S,tooltipOpen:b,showTooltip:x,hideTooltip:C}=ts(),{containerBounds:O,containerRef:y,TooltipInPortal:k}=ls({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),D=g.useMemo(()=>l.extent([[Fh,Wh],[t-Fh,e-Wh-50]])({nodes:r,links:o.map($=>({...$,value:Number($.weight)}))}),[e,t,l,r,o]),E=g.useMemo(()=>Math.max(...D.nodes.map($=>$.depth??0)),[D]),A=g.useMemo(()=>{const $={};let _=-1/0;return D.nodes.forEach(F=>{const{group:W}=F;$[W]?($[W].x=Math.max($[W].x??-1/0,F.x0??-1/0),$[W].y=Math.max($[W].y??-1/0,F.y1??-1/0)):($[W]={},$[W].x=F.x0,$[W].y=F.y1),_=Math.max(_,$[W].y??-1/0),$[W].y=_}),$},[D]),j=g.useCallback($=>{const _=l.nodeId()($);f(c===_?"":_)},[c,l]),L=g.useCallback(()=>{f(""),m(null)},[]),U=g.useMemo(()=>c===""&&d===null?new Set:new Set(D.links.filter($=>l.nodeId()($.source)===c||l.nodeId()($.target)===c||(d==null?void 0:d.source)===$.source&&(d==null?void 0:d.target)===$.target)),[c,D,d,l]),V=g.useCallback(($,_)=>{const F=("clientX"in $?$.clientX:0)-O.left,W=("clientY"in $?$.clientY:0)-O.top;m(_),F&&W&&x({tooltipLeft:F,tooltipTop:W,tooltipData:_})},[x,O]),X=g.useCallback(()=>{L(),C()},[L,C]);return q.jsxs("div",{ref:u,className:"bg-white w-min h-min rabbit-ds",id:"sankey-chart",children:[q.jsxs("svg",{height:e,width:t,ref:y,children:[q.jsx("g",{children:D.links.map($=>q.jsx(aw,{data:$,source:_=>({x:_.source.x1,y:_.y0}),target:_=>({x:_.target.x0,y:_.y1}),x:_=>_.x??0,y:_=>_.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>X(),onMouseMove:_=>V(_,$),stroke:Ue($.source.index||0).light,strokeWidth:$.width,strokeOpacity:U.has($)?.7:.25},$.index))}),q.jsx("g",{children:D.nodes.map($=>{var _,F,W;return q.jsx("g",{children:q.jsx(Qx,{x:$.x0??0,height:($.y1??0)-($.y0??0)+10,width:($.x1??0)-($.x0??0),y:($.y0??0)-5,onMouseEnter:()=>j($),onMouseLeave:()=>L(),radius:2,fill:c===$.id?(_=Ue($.index||0))==null?void 0:_.dark:(F=Ue($.index||0))==null?void 0:F.light,stroke:(W=Ue($.index||0))==null?void 0:W.dark,all:!0})},$.index)})}),q.jsx("g",{children:i.map($=>q.jsx(ol,{axisCharLimit:20,x:A[$.id].x??0,y:(A[$.id].y??0)+40,textLabel:$.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},$.id))}),q.jsxs("g",{children:[D.nodes.map($=>q.jsx(ol,{axisCharLimit:8,x:$.depth===E?($.x1??0)+10:($.x0??0)-10,y:($.y0??0)+(($.y1??0)-($.y0??0))/2,textLabel:$.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:$.depth===E?"start":"end",fill:"#666666"}},$.index)),D.nodes.map($=>$.value&&q.jsx(Fi,{x:$.depth===E?($.x1??0)+10:($.x0??0)-10,y:($.y0??0)+(($.y1??0)-($.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:$.depth===E?"start":"end",fill:"#666666"},children:`(${$.value.toString()})`},$.index))]})]}),b&&p&&q.jsx(k,{top:S,left:v,unstyled:!0,applyPositionStyle:!0,children:q.jsx(lk,{tooltipData:p,fromLabel:`From: ${i[p.source.group].name}`,toLabel:`To: ${i[p.target.group].name}`,weightLabel:a,tooltipTitle:n})},Math.random())]})});Bh.displayName="Sankey";const Uh=g.forwardRef((e,t)=>q.jsx(Ho,{debounceTime:10,children:({width:n,height:r})=>n&&r&&q.jsx(Bh,{ref:t,width:n,height:r,...e})}));Uh.displayName="SankeyChart";const fk=Uh;function dk(e){return"bandwidth"in e?e.bandwidth():0}var hk=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dl.apply(this,arguments)}function pk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Hh(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,i=e.scale,a=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,d=e.className,m=e.children,p=e.numTicks,v=p===void 0?10:p,S=e.lineStyle,b=e.offset,x=e.tickValues,C=pk(e,hk),O=x??Da(i,v),y=(b??0)+dk(i)/2,k=O.map(function(D,E){var A,j=((A=_a(i(D)))!=null?A:0)+y;return{index:E,from:new jt({x:0,y:j}),to:new jt({x:a,y:j})}});return g.createElement(en,{className:Ge("visx-rows",d),top:n,left:o},m?m({lines:k}):k.map(function(D){var E=D.from,A=D.to,j=D.index;return g.createElement(cw,dl({key:"row-line-"+j,from:E,to:A,stroke:l,strokeWidth:c,strokeDasharray:f,style:S},C))}))}Hh.propTypes={tickValues:K.array,width:K.number.isRequired};function qh({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:i,legendDarkColor:a,legendLightColor:s}){const l=e==null?void 0:e.toString(),u=t==null?void 0:t.toString();return q.jsxs(Ie,{tooltipTitle:n,showSideBySide:!0,children:[q.jsx(Ie.Item,{label:r,value:l}),q.jsx(Ie.Item,{label:o,value:u}),q.jsx(Ie.Legend,{value:i,darkColor:a,lightColor:s})]})}qh.defaultProps={xValue:void 0,yValue:void 0};const Yh=20,Gh=20,hl=80,ai=50,pl=10,gl=g.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:i,width:a,height:s,integerBins:l=!1},u)=>{const c=g.useMemo(()=>io(i),[i]),f=g.useMemo(()=>{const U=c[0]??0,V=c[1]??0,X=V-U>pl?V:pl+U,$=V-U>pl?V-U:10,_=Math.floor(c[0]??0),F=Math.ceil(X),W=Math.ceil($),H=r||(l?[_,F]:[U,X]);return f0().domain(H).thresholds(o||(l?W:$))(i)},[c,o,i,r,l]),d=g.useMemo(()=>Mr({domain:[f[0].x0??0,f[f.length-1].x1??0],range:[ai,a-Gh],round:!0,nice:!0}),[f,a]),m=g.useMemo(()=>Mr({domain:[0,Yi(f,U=>U.length)??0],range:[s-hl,Yh],round:!0,nice:!0}),[f,s]),p=g.useRef(null);ll(p,u,`${t}-${n}-Histogram`);const{tooltipData:v,tooltipLeft:S,tooltipTop:b,tooltipOpen:x,showTooltip:C,hideTooltip:O}=ts(),{containerBounds:y,containerRef:k,TooltipInPortal:D}=ls({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=a-ai-Gh,A=s-Yh-hl-100,j=g.useCallback((U,V)=>{const X=("clientX"in U?U.clientX:0)-y.left,$=("clientY"in U?U.clientY:0)-y.top;X&&$&&C({tooltipLeft:X,tooltipTop:$,tooltipData:V})},[C,y]),L=g.useCallback(()=>{O()},[O]);return q.jsxs("div",{className:"bg-white flex flex-col rabbit-ds",style:{width:a,height:s},ref:p,children:[q.jsxs("svg",{width:a,height:s,ref:k,children:[q.jsx(Qa,{orientation:"bottom",scale:d,top:s-hl,hideTicks:!0,stroke:"#CFD7DF",strokeWidth:1,rangePadding:{end:10},label:`${t} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),q.jsx(Qa,{orientation:"left",scale:m,left:ai,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",label:`${n} ➔`,tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"end"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-20,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),q.jsxs(en,{children:[q.jsx(Hh,{scale:m,width:E,height:A,left:ai,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),f.map(U=>{const V=m(0)-m(U.length),X=d(U.x1??0)-d(U.x0??0);return q.jsx("g",{children:q.jsx(Vx,{x:d(U.x0??0),y:m(U.length),width:X,height:V&&V-1,fill:Ue(0).light,stroke:Ue(0).dark,strokeWidth:1,onMouseMove:$=>j($,U),onMouseLeave:()=>L()})},d(U.x0??0))})]})]}),x&&v&&q.jsx(D,{top:b,left:S,unstyled:!0,applyPositionStyle:!0,children:q.jsx(qh,{xAxisLabel:t,xValue:`${v.x0} to ${v.x1}`,yAxisLabel:n,yValue:v.length,tooltipTitle:e,legendValue:n,legendDarkColor:Ue(0).dark,legendLightColor:Ue(0).light})},Math.random())]})}),Rh=g.forwardRef((e,t)=>q.jsx(Ho,{debounceTime:10,children:({width:n,height:r})=>q.jsx(gl,{ref:t,width:n,height:r,...e})}));gl.defaultProps={domain:void 0,binCount:void 0,integerBins:!1},gl.displayName="HistogramBase",Rh.displayName="HistogramChart";const gk=Rh;function mk({count:e,totalCount:t,title:n,subTitle:r,className:o}){return q.jsxs("div",{className:Rn("rabbit-ds max-w-[336px] min-h-[96px] min-w-[200px] box-border px-2 py-4 bg-white rounded-lg shadow flex-col justify-center items-start gap-1 inline-flex",o),children:[q.jsxs("div",{className:"self-stretch px-3 py-2 justify-start items-end inline-flex",children:[q.jsx("div",{className:"h-[26px] text-zinc-800 text-2xl leading-loose font-semibold",children:e}),t&&q.jsxs("div",{className:"text-stone-500 text-xs font-normal leading-none",children:["/",t]})]}),q.jsx("div",{className:"self-stretch px-3 justify-start items-center gap-2 inline-flex",children:q.jsxs("div",{className:"grow shrink basis-0 flex-col justify-start items-start gap-0.5 inline-flex",children:[q.jsx("div",{className:"self-stretch justify-start items-start gap-2.5 inline-flex",children:q.jsx("div",{className:"grow shrink basis-0 text-zinc-800 text-xs font-semibold leading-none",children:n})}),r&&q.jsx("div",{className:"self-stretch justify-start items-center gap-1 inline-flex",children:q.jsx("div",{className:"grow shrink basis-0 text-stone-500 text-xs font-normal leading-none",children:r})})]})})]})}Ye.CardKPI=mk,Ye.HistogramChart=gk,Ye.LineChart=tk,Ye.SankeyChart=fk,Object.defineProperty(Ye,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:where(.rabbit-ds) *,:where(.rabbit-ds) :before,:where(.rabbit-ds) :after{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:where(.rabbit-ds):before,:where(.rabbit-ds) :after{--tw-content: ""}:where(.rabbit-ds) html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}:where(.rabbit-ds) body{margin:0;line-height:inherit}:where(.rabbit-ds) hr{height:0;color:inherit;border-top-width:1px}:where(.rabbit-ds) abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(.rabbit-ds) h1,:where(.rabbit-ds) h2,:where(.rabbit-ds) h3,:where(.rabbit-ds) h4,:where(.rabbit-ds) h5,:where(.rabbit-ds) h6{font-size:inherit;font-weight:inherit}:where(.rabbit-ds) a{color:inherit;text-decoration:inherit}:where(.rabbit-ds) b,:where(.rabbit-ds) strong{font-weight:bolder}:where(.rabbit-ds) code,:where(.rabbit-ds) kbd,:where(.rabbit-ds) samp,:where(.rabbit-ds) pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}:where(.rabbit-ds) small{font-size:80%}:where(.rabbit-ds) sub,:where(.rabbit-ds) sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.rabbit-ds) sub{bottom:-.25em}:where(.rabbit-ds) sup{top:-.5em}:where(.rabbit-ds) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.rabbit-ds) button,:where(.rabbit-ds) input,:where(.rabbit-ds) optgroup,:where(.rabbit-ds) select,:where(.rabbit-ds) textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}:where(.rabbit-ds) button,:where(.rabbit-ds) select{text-transform:none}:where(.rabbit-ds) button,:where(.rabbit-ds) [type=button],:where(.rabbit-ds) [type=reset],:where(.rabbit-ds) [type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:where(.rabbit-ds) :-moz-focusring{outline:auto}:where(.rabbit-ds) :-moz-ui-invalid{box-shadow:none}:where(.rabbit-ds) progress{vertical-align:baseline}:where(.rabbit-ds) ::-webkit-inner-spin-button,:where(.rabbit-ds) ::-webkit-outer-spin-button{height:auto}:where(.rabbit-ds) [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:where(.rabbit-ds) ::-webkit-search-decoration{-webkit-appearance:none}:where(.rabbit-ds) ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(.rabbit-ds) summary{display:list-item}:where(.rabbit-ds) blockquote,:where(.rabbit-ds) dl,:where(.rabbit-ds) dd,:where(.rabbit-ds) h1,:where(.rabbit-ds) h2,:where(.rabbit-ds) h3,:where(.rabbit-ds) h4,:where(.rabbit-ds) h5,:where(.rabbit-ds) h6,:where(.rabbit-ds) hr,:where(.rabbit-ds) figure,:where(.rabbit-ds) p,:where(.rabbit-ds) pre{margin:0}:where(.rabbit-ds) fieldset{margin:0;padding:0}:where(.rabbit-ds) legend{padding:0}:where(.rabbit-ds) ol,:where(.rabbit-ds) ul,:where(.rabbit-ds) menu{list-style:none;margin:0;padding:0}:where(.rabbit-ds) dialog{padding:0}:where(.rabbit-ds) textarea{resize:vertical}:where(.rabbit-ds) input::-moz-placeholder,:where(.rabbit-ds) textarea::-moz-placeholder{opacity:1;color:#9ca3af}:where(.rabbit-ds) input::placeholder,:where(.rabbit-ds) textarea::placeholder{opacity:1;color:#9ca3af}:where(.rabbit-ds) button,:where(.rabbit-ds) [role=button]{cursor:pointer}:where(.rabbit-ds) :disabled{cursor:default}:where(.rabbit-ds) img,:where(.rabbit-ds) svg,:where(.rabbit-ds) video,:where(.rabbit-ds) canvas,:where(.rabbit-ds) audio,:where(.rabbit-ds) iframe,:where(.rabbit-ds) embed,:where(.rabbit-ds) object{display:block;vertical-align:middle}:where(.rabbit-ds) img,:where(.rabbit-ds) video{max-width:100%;height:auto}:where(.rabbit-ds) [hidden]{display:none}html{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity))}.pointer-events-auto{pointer-events:auto}.relative{position:relative}.z-\[1500\]{z-index:1500}.mx-3{margin-left:.75rem;margin-right:.75rem}.mr-1{margin-right:.25rem}.box-border{box-sizing:border-box}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-3{height:.75rem}.h-4{height:1rem}.h-\[26px\]{height:26px}.h-auto{height:auto}.h-full{height:100%}.h-min{height:-moz-min-content;height:min-content}.h-px{height:1px}.min-h-0{min-height:0px}.min-h-\[96px\]{min-height:96px}.w-0{width:0px}.w-3{width:.75rem}.w-4{width:1rem}.w-64{width:16rem}.w-\[26px\]{width:26px}.w-auto{width:auto}.w-full{width:100%}.w-min{width:-moz-min-content;width:min-content}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-\[336px\]{max-width:336px}.max-w-\[400px\]{max-width:400px}.max-w-sm{max-width:24rem}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-0{flex-basis:0px}.basis-auto{flex-basis:auto}.cursor-pointer{cursor:pointer}.auto-rows-auto{grid-auto-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-r{border-right-width:1px}.border-\[\#104F95\]{--tw-border-opacity: 1;border-color:rgb(16 79 149 / var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pr-1{padding-right:.25rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-loose{line-height:2}.leading-none{line-height:1}.text-\[\#666666\]{--tw-text-opacity: 1;color:rgb(102 102 102 / var(--tw-text-opacity))}.text-current{color:currentColor}.text-stone-500{--tw-text-opacity: 1;color:rgb(120 113 108 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-zinc-800{--tw-text-opacity: 1;color:rgb(39 39 42 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.visx-tooltip{z-index:1500}.visx-tooltip-glyph svg{width:10px;height:10px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=checked\]\:bg-\[\#104F95\][data-state=checked]{--tw-bg-opacity: 1;background-color:rgb(16 79 149 / var(--tw-bg-opacity))}.data-\[state\=checked\]\:text-white[data-state=checked]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}
|
|
1
|
+
:where(.rabbit-ds) *,:where(.rabbit-ds) :before,:where(.rabbit-ds) :after{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:where(.rabbit-ds):before,:where(.rabbit-ds) :after{--tw-content: ""}:where(.rabbit-ds) html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}:where(.rabbit-ds) body{margin:0;line-height:inherit}:where(.rabbit-ds) hr{height:0;color:inherit;border-top-width:1px}:where(.rabbit-ds) abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(.rabbit-ds) h1,:where(.rabbit-ds) h2,:where(.rabbit-ds) h3,:where(.rabbit-ds) h4,:where(.rabbit-ds) h5,:where(.rabbit-ds) h6{font-size:inherit;font-weight:inherit}:where(.rabbit-ds) a{color:inherit;text-decoration:inherit}:where(.rabbit-ds) b,:where(.rabbit-ds) strong{font-weight:bolder}:where(.rabbit-ds) code,:where(.rabbit-ds) kbd,:where(.rabbit-ds) samp,:where(.rabbit-ds) pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}:where(.rabbit-ds) small{font-size:80%}:where(.rabbit-ds) sub,:where(.rabbit-ds) sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.rabbit-ds) sub{bottom:-.25em}:where(.rabbit-ds) sup{top:-.5em}:where(.rabbit-ds) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.rabbit-ds) button,:where(.rabbit-ds) input,:where(.rabbit-ds) optgroup,:where(.rabbit-ds) select,:where(.rabbit-ds) textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}:where(.rabbit-ds) button,:where(.rabbit-ds) select{text-transform:none}:where(.rabbit-ds) button,:where(.rabbit-ds) [type=button],:where(.rabbit-ds) [type=reset],:where(.rabbit-ds) [type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:where(.rabbit-ds) :-moz-focusring{outline:auto}:where(.rabbit-ds) :-moz-ui-invalid{box-shadow:none}:where(.rabbit-ds) progress{vertical-align:baseline}:where(.rabbit-ds) ::-webkit-inner-spin-button,:where(.rabbit-ds) ::-webkit-outer-spin-button{height:auto}:where(.rabbit-ds) [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:where(.rabbit-ds) ::-webkit-search-decoration{-webkit-appearance:none}:where(.rabbit-ds) ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(.rabbit-ds) summary{display:list-item}:where(.rabbit-ds) blockquote,:where(.rabbit-ds) dl,:where(.rabbit-ds) dd,:where(.rabbit-ds) h1,:where(.rabbit-ds) h2,:where(.rabbit-ds) h3,:where(.rabbit-ds) h4,:where(.rabbit-ds) h5,:where(.rabbit-ds) h6,:where(.rabbit-ds) hr,:where(.rabbit-ds) figure,:where(.rabbit-ds) p,:where(.rabbit-ds) pre{margin:0}:where(.rabbit-ds) fieldset{margin:0;padding:0}:where(.rabbit-ds) legend{padding:0}:where(.rabbit-ds) ol,:where(.rabbit-ds) ul,:where(.rabbit-ds) menu{list-style:none;margin:0;padding:0}:where(.rabbit-ds) dialog{padding:0}:where(.rabbit-ds) textarea{resize:vertical}:where(.rabbit-ds) input::-moz-placeholder,:where(.rabbit-ds) textarea::-moz-placeholder{opacity:1;color:#9ca3af}:where(.rabbit-ds) input::placeholder,:where(.rabbit-ds) textarea::placeholder{opacity:1;color:#9ca3af}:where(.rabbit-ds) button,:where(.rabbit-ds) [role=button]{cursor:pointer}:where(.rabbit-ds) :disabled{cursor:default}:where(.rabbit-ds) img,:where(.rabbit-ds) svg,:where(.rabbit-ds) video,:where(.rabbit-ds) canvas,:where(.rabbit-ds) audio,:where(.rabbit-ds) iframe,:where(.rabbit-ds) embed,:where(.rabbit-ds) object{display:block;vertical-align:middle}:where(.rabbit-ds) img,:where(.rabbit-ds) video{max-width:100%;height:auto}:where(.rabbit-ds) [hidden]{display:none}html{--tw-text-opacity: 1;color:rgb(51 51 51 / var(--tw-text-opacity))}.pointer-events-auto{pointer-events:auto}.relative{position:relative}.z-\[1500\]{z-index:1500}.mx-3{margin-left:.75rem;margin-right:.75rem}.mr-1{margin-right:.25rem}.box-border{box-sizing:border-box}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-3{height:.75rem}.h-4{height:1rem}.h-\[26px\]{height:26px}.h-auto{height:auto}.h-full{height:100%}.h-min{height:-moz-min-content;height:min-content}.h-px{height:1px}.min-h-0{min-height:0px}.min-h-\[96px\]{min-height:96px}.w-0{width:0px}.w-3{width:.75rem}.w-4{width:1rem}.w-64{width:16rem}.w-auto{width:auto}.w-full{width:100%}.w-min{width:-moz-min-content;width:min-content}.min-w-0{min-width:0px}.min-w-\[200px\]{min-width:200px}.max-w-\[336px\]{max-width:336px}.max-w-\[400px\]{max-width:400px}.max-w-sm{max-width:24rem}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-0{flex-basis:0px}.basis-auto{flex-basis:auto}.cursor-pointer{cursor:pointer}.auto-rows-auto{grid-auto-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-r{border-right-width:1px}.border-\[\#104F95\]{--tw-border-opacity: 1;border-color:rgb(16 79 149 / var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pr-1{padding-right:.25rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-loose{line-height:2}.leading-none{line-height:1}.text-\[\#666666\]{--tw-text-opacity: 1;color:rgb(102 102 102 / var(--tw-text-opacity))}.text-current{color:currentColor}.text-stone-500{--tw-text-opacity: 1;color:rgb(120 113 108 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-zinc-800{--tw-text-opacity: 1;color:rgb(39 39 42 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.visx-tooltip{z-index:1500}.visx-tooltip-glyph svg{width:10px;height:10px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[state\=checked\]\:bg-\[\#104F95\][data-state=checked]{--tw-bg-opacity: 1;background-color:rgb(16 79 149 / var(--tw-bg-opacity))}.data-\[state\=checked\]\:text-white[data-state=checked]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}
|