@mesh.ai/rabbit 1.16.0 → 1.16.2

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.
@@ -25871,8 +25871,9 @@ const iz = ({ x: e, y: t, datum: n, size: r }) => /* @__PURE__ */ g(Lo, { cx: e,
25871
25871
  style: { zIndex: 1500 }
25872
25872
  }
25873
25873
  ), Ri = {
25874
- xAccessor: (e) => e.x,
25875
- yAccessor: (e) => e.y
25874
+ // @todo this shouldn't be needed. check why the nearestDatum is not working properly
25875
+ xAccessor: (e) => e == null ? void 0 : e.x,
25876
+ yAccessor: (e) => e == null ? void 0 : e.y
25876
25877
  }, _m = (e, t, n) => n === "pre" ? `${t}${e}` : `${e}${t}`, lz = 10, cz = 5, Dx = H(
25877
25878
  ({
25878
25879
  rowsCount: e = 3,
@@ -26029,7 +26030,10 @@ const iz = ({ x: e, y: t, datum: n, size: r }) => /* @__PURE__ */ g(Lo, { cx: e,
26029
26030
  {
26030
26031
  showDatumGlyph: !0,
26031
26032
  scroll: !0,
26033
+ showVerticalCrosshair: !0,
26034
+ showHorizontalCrosshair: !0,
26032
26035
  debounce: 500,
26036
+ snapTooltipToDatumX: !0,
26033
26037
  snapTooltipToDatumY: !0,
26034
26038
  detectBounds: !0,
26035
26039
  unstyled: !0,
@@ -26064,7 +26068,7 @@ const iz = ({ x: e, y: t, datum: n, size: r }) => /* @__PURE__ */ g(Lo, { cx: e,
26064
26068
  oz,
26065
26069
  {
26066
26070
  nodes: A,
26067
- seriesSelectorTitle: "Team Members",
26071
+ seriesSelectorTitle: "Team members",
26068
26072
  selectedNodeIds: w,
26069
26073
  setSelectedNodeIds: E
26070
26074
  }
@@ -93,4 +93,4 @@ z`).split(`
93
93
  `)} {
94
94
  ${fr}
95
95
  }
96
- `}),J.appendChild(G.createTextNode(Nt))}R.timeEnd("clone node"),me==null||me(ke),pe!==!1&&ne(ke)&&(R.time("embed web font"),yield rj(ke,V),R.timeEnd("embed web font")),R.time("embed node"),Vw(ke,V);const Ie=se.length;let Le=0;const Qe=()=>v(this,null,function*(){for(;;){const Nt=se.pop();if(!Nt)break;try{yield Nt}catch(zn){Ne("Failed to run task",zn)}ge==null||ge(++Le,Ie)}});ge==null||ge(Le,Ie),yield Promise.all([...Array(4)].map(Qe)),R.timeEnd("embed node"),Me==null||Me(ke);const Ye=fj(ke,V);return ie&&Ye.insertBefore(ie,Ye.children[0]),J&&Ye.insertBefore(J,Ye.children[0]),xe&&Lw(V),Se==null||Se(Ye),Ye})}function fj(S,F){const{width:V,height:G}=F,R=mt(V,G,S.ownerDocument),se=R.ownerDocument.createElementNS(R.namespaceURI,"foreignObject");return se.setAttributeNS(null,"x","0%"),se.setAttributeNS(null,"y","0%"),se.setAttributeNS(null,"width","100%"),se.setAttributeNS(null,"height","100%"),se.append(S),R.appendChild(se),R}function Nl(S,F){return v(this,null,function*(){var V;const G=yield Wt(S,F),R=yield Hw(G),se=tt(R,G.isEnable("removeControlCharacter"));G.autoDestruct||(G.svgStyleElement=kt(G.ownerDocument),G.svgDefsElement=(V=G.ownerDocument)==null?void 0:V.createElementNS(gt,"defs"),G.svgStyles.clear());const J=Fe(se,R.ownerDocument);return yield Fn(J,G)})}function hj(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{log:G,type:R,quality:se,dpi:J}=V,ie=yield Nl(V);G.time("canvas to blob");const fe=yield un(ie,R,se);if(["image/png","image/jpeg"].includes(R)&&J){const pe=yield Ue(fe.slice(0,33));let ge=new Uint8Array(pe);return R==="image/png"?ge=M(ge,J):R==="image/jpeg"&&(ge=w(ge,J)),G.timeEnd("canvas to blob"),new Blob([ge,fe.slice(33)],{type:R})}return G.timeEnd("canvas to blob"),fe})}function Io(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{log:G,quality:R,type:se,dpi:J}=V,ie=yield Nl(V);G.time("canvas to data url");let fe=ie.toDataURL(se,R);if(["image/png","image/jpeg"].includes(se)&&J&&H&&z){const[pe,ge]=fe.split(",");let xe=0,me=!1;if(se==="image/png"){const Ye=j(ge);Ye>=0?(xe=Math.ceil((Ye+28)/3)*4,me=!0):xe=33/3*4}else se==="image/jpeg"&&(xe=18/3*4);const Me=ge.substring(0,xe),Se=ge.substring(xe),ke=window.atob(Me),Ie=new Uint8Array(ke.length);for(let Ye=0;Ye<Ie.length;Ye++)Ie[Ye]=ke.charCodeAt(Ye);const Le=se==="image/png"?M(Ie,J,me):w(Ie,J),Qe=window.btoa(String.fromCharCode(...Le));fe=[pe,",",Qe,Se].join("")}return G.timeEnd("canvas to data url"),fe})}function Yw(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{width:G,height:R,ownerDocument:se}=V,J=yield Io(V),ie=mt(G,R,se),fe=ie.ownerDocument.createElementNS(ie.namespaceURI,"image");return fe.setAttributeNS(null,"href",J),fe.setAttributeNS(null,"height","100%"),fe.setAttributeNS(null,"width","100%"),ie.appendChild(fe),tt(ie,V.isEnable("removeControlCharacter"))})}function pj(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{ownerDocument:G,width:R,height:se,scale:J,type:ie}=V,fe=ie==="image/svg+xml"?yield Yw(V):yield Io(V),pe=Fe(fe,G);return pe.width=Math.floor(R*J),pe.height=Math.floor(se*J),pe.style.width=`${R}px`,pe.style.height=`${se}px`,pe})}function gj(S,F){return v(this,null,function*(){return Io(yield Wt(S,m(p({},F),{type:"image/jpeg"})))})}function mj(S,F){return v(this,null,function*(){const V=yield Wt(S,F),G=yield Nl(V);return G.getContext("2d").getImageData(0,0,G.width,G.height).data})}function vj(S,F){return v(this,null,function*(){return Io(yield Wt(S,m(p({},F),{type:"image/png"})))})}function bj(S,F){return v(this,null,function*(){return Io(yield Wt(S,m(p({},F),{type:"image/webp"})))})}n.createContext=$l,n.destroyContext=Lw,n.domToBlob=hj,n.domToCanvas=Nl,n.domToDataUrl=Io,n.domToForeignObjectSvg=Hw,n.domToImage=pj,n.domToJpeg=gj,n.domToPixel=mj,n.domToPng=vj,n.domToSvg=Yw,n.domToWebp=bj,n.loadMedia=nt,n.waitUntilLoad=xn,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(nh,nh.exports);var qB=nh.exports;const Ln=(e,t,n)=>{u.useImperativeHandle(t,()=>({download(){e.current&&qB.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},yx=[{name:"default",dark:"var(--chart-default-dark, #1565BC)",light:"var(--chart-default-light, #99D2F9)"},{name:"yellow",dark:"#8C6A00",light:"#FFDE88"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"purple",dark:"#7651BC",light:"#E7DAFF"},{name:"pink",dark:"#C01443",light:"#FAD4D4"},{name:"green",dark:"#44812F",light:"#B1E39F"},{name:"orange",dark:"#B96400",light:"#FFE7C5"},{name:"teal",dark:"#237C73",light:"#A1DFD5"},{name:"red",dark:"#C62C02",light:"#FFE1D9"}];function Je(e){return yx[e%yx.length]}const gl=(e,t)=>u.Children.map(e,n=>u.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function rh({value:e,darkColor:t,lightColor:n}){return h.jsxs("div",{className:"inline-flex items-center justify-start gap-2 px-2 py-1",children:[h.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"relative h-3 w-3 rounded-3xl border"}),h.jsx("div",{className:"flex items-start justify-start",children:h.jsx("div",{className:"text-xs font-normal leading-none text-zinc-800",children:e})})]})}function oh({label:e,value:t}){return h.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-1 py-0.5",children:[h.jsx("div",{className:" text-[10px] font-normal leading-none text-stone-500",children:e}),h.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function ah({label:e,value:t}){return h.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-2 py-0.5",children:[h.jsx("div",{className:" text-[10px] font-normal leading-none text-stone-500",children:e}),h.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function ih({nodeData:e}){const{employee:t}=e,{name:n,imageUrl:r}=t;return h.jsxs("div",{className:"inline-flex max-w-sm items-center justify-start px-2 py-0.5",children:[h.jsx(hn,{size:"md",children:h.jsx(pn,{src:r,alt:"Avatar"})}),h.jsx("div",{className:"flex items-start justify-start px-2 text-sm font-medium",children:n||"-"})]})}function _e({children:e,showSideBySide:t,tooltipTitle:n}){const r=gl(e,rh),o=gl(e,oh),a=gl(e,ah),i=gl(e,ih);return h.jsxs("div",{className:"rabbit-ds relative z-[1500] inline-flex h-auto w-auto min-w-[200px] max-w-[400px] flex-col items-start justify-start gap-2 rounded-lg bg-white p-2 shadow",children:[h.jsx("div",{className:"px-2 py-1 text-xs font-medium leading-none text-zinc-800",children:n}),a,h.jsxs("div",{className:"flex w-full flex-col items-start justify-start rounded-lg p-2",children:[t&&h.jsxs("div",{className:ue("flex w-full"),children:[o&&o[0],h.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[1]]}),!t&&h.jsx("div",{className:ue("grid w-full auto-rows-auto gap-3"),children:o})]}),r&&r.length>0?h.jsx("div",{className:"h-px w-full bg-gray-100 px-2"}):null,r,i]})}rh.displayName="Legend",oh.displayName="Item",ah.displayName="Header",ih.displayName="Footer",_e.Legend=rh,_e.Item=oh,_e.Header=ah,_e.Footer=ih,_e.defaultProps={showSideBySide:!1};function xx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Item,{label:r,value:c}),h.jsx(_e.Item,{label:o,value:d}),h.jsx(_e.Legend,{value:i,darkColor:s,lightColor:l})]})}xx.defaultProps={xValue:void 0,yValue:void 0};function KB({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=u.useContext(Dt),a=r?e.filter(i=>i.y!==null):e;return h.jsx(g2,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s,l;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))+((l=o==null?void 0:o.xScale)==null?void 0:l.bandwidth())/2},y:i=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i))}})}const QB=({x:e,y:t,datum:n,size:r})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),ZB=({x:e,y:t,datum:n})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),ml={xAccessor:e=>e.x,yAccessor:e=>e.y},wx=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Ax=10,JB=5,sh=u.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:c,yAxisUnitSymbol:d,tooltipTitle:f,mode:p,xAxisCharLimit:m,connectNulls:g=!1,maxNodesInMiniMode:v=JB,tooltipStackCharLimit:w=Ax,seriesSelectorTitle:x},y)=>{const[b,C]=u.useState(e.map(M=>M.id)),A=u.useRef(null);Ln(A,y,`${a}-${i}-LineChart`);const $=u.useMemo(()=>o.map((M,P)=>{const L=e.find(W=>W.id===M.id);return{points:M.data.map((W,j)=>({x:r[j],y:W,nodeId:M.id,color:(L==null?void 0:L.color)??Je(P)}))}}).slice(0,p==="mini"?v:o.length),[o,p,v,e,r]),k=u.useMemo(()=>p==="full"?$.filter(M=>b.includes(M.points[0].nodeId)):$,[$,b,p]),T=u.useMemo(()=>Math.floor((n-(p==="mini"?0:150))/(r.length*8)),[n,r,p]);return h.jsxs("div",{ref:A,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[h.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[h.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:h.jsxs(ur,{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:[h.jsx(N2,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),h.jsx(To,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:M=>c?wx(M,c.symbol,c.position):M,rangePadding:{end:10},tickComponent:M=>h.jsx(Ga,{textLabel:M.formattedValue||"",x:M.x,y:M.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??T}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),h.jsx(To,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:M=>d?wx(M,d.symbol,d.position):M,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((M,P)=>h.jsxs(h.Fragment,{children:[h.jsx(KB,{data:M.points,xAccessor:ml.xAccessor,yAccessor:ml.yAccessor,connectNulls:g}),h.jsx(bx,{dataKey:`Performance Management ${P}`,data:M.points,size:8,renderGlyph:QB,xAccessor:ml.xAccessor,yAccessor:ml.yAccessor})]})),h.jsx(al,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:ZB,renderTooltip:({tooltipData:M})=>{var W,j,B,E,_,H;const P=e.find(z=>{var O;return z.id===((O=M==null?void 0:M.nearestDatum)==null?void 0:O.datum.nodeId)}),L=((W=M==null?void 0:M.nearestDatum)==null?void 0:W.datum)&&((j=M==null?void 0:M.nearestDatum)==null?void 0:j.datum.x.length)<w;return h.jsx(xx,{xValue:(B=M==null?void 0:M.nearestDatum)==null?void 0:B.datum.x,yValue:(E=M==null?void 0:M.nearestDatum)==null?void 0:E.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!L,tooltipTitle:f,legendValue:(P==null?void 0:P.name)||"",legendDarkColor:((_=M==null?void 0:M.nearestDatum)==null?void 0:_.datum.color.dark)||Je(0).dark,legendLightColor:((H=M==null?void 0:M.nearestDatum)==null?void 0:H.datum.color.light)||Je(0).light})}})]})}),p==="full"&&h.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[h.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[h.jsx("span",{className:"pr-1",children:x??a}),"(",k.length??0,"/",$.length,")"]}),h.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:$.map(M=>{const P=e.find(L=>L.id===M.points[0].nodeId);return P&&h.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-full border"}),P.name]}),h.jsx("div",{className:"flex items-center",children:h.jsx(ei,{checked:b.includes(P.id),onCheckedChange:L=>{let W=[...b];L?W=[...b,P.id]:W.splice(b.indexOf(P.id),1),C(W)}})})]},P.id)})})]})]}),p==="mini"&&h.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-font-secondary",children:$.map(M=>{const P=e.find(L=>L.id===M.points[0].nodeId);return h.jsxs("div",{className:"flex items-center justify-center gap-1",children:[h.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),P==null?void 0:P.name]},P==null?void 0:P.id)})})]})}),RB={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Ax,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};sh.defaultProps=RB,sh.displayName="LineBase";const Cx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(sh,{ref:t,width:n,height:r,...e})}));Cx.displayName="LineChart";const ez=Cx;function Sx(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 tz(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 lh(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 nz(e,t){return e.sourceLinks.length?e.depth:t-1}function vl(e){return function(){return e}}function Ex(e,t){return bl(e.source,t.source)||e.index-t.index}function Mx(e,t){return bl(e.target,t.target)||e.index-t.index}function bl(e,t){return e.y0-t.y0}function ch(e){return e.value}function rz(e){return e.index}function oz(e){return e.nodes}function az(e){return e.links}function $x(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function Tx({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 iz(){let e=0,t=0,n=1,r=1,o=24,a=8,i,s=rz,l=nz,c,d,f=oz,p=az,m=6;function g(){const E={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return v(E),w(E),x(E),y(E),A(E),Tx(E),E}g.update=function(E){return Tx(E),E},g.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:vl(E),g):s},g.nodeAlign=function(E){return arguments.length?(l=typeof E=="function"?E:vl(E),g):l},g.nodeSort=function(E){return arguments.length?(c=E,g):c},g.nodeWidth=function(E){return arguments.length?(o=+E,g):o},g.nodePadding=function(E){return arguments.length?(a=i=+E,g):a},g.nodes=function(E){return arguments.length?(f=typeof E=="function"?E:vl(E),g):f},g.links=function(E){return arguments.length?(p=typeof E=="function"?E:vl(E),g):p},g.linkSort=function(E){return arguments.length?(d=E,g):d},g.size=function(E){return arguments.length?(e=t=0,n=+E[0],r=+E[1],g):[n-e,r-t]},g.extent=function(E){return arguments.length?(e=+E[0][0],n=+E[1][0],t=+E[0][1],r=+E[1][1],g):[[e,t],[n,r]]},g.iterations=function(E){return arguments.length?(m=+E,g):m};function v({nodes:E,links:_}){for(const[z,O]of E.entries())O.index=z,O.sourceLinks=[],O.targetLinks=[];const H=new Map(E.map((z,O)=>[s(z,O,E),z]));for(const[z,O]of _.entries()){O.index=z;let{source:N,target:I}=O;typeof N!="object"&&(N=O.source=$x(H,N)),typeof I!="object"&&(I=O.target=$x(H,I)),N.sourceLinks.push(O),I.targetLinks.push(O)}if(d!=null)for(const{sourceLinks:z,targetLinks:O}of E)z.sort(d),O.sort(d)}function w({nodes:E}){for(const _ of E)_.value=_.fixedValue===void 0?Math.max(lh(_.sourceLinks,ch),lh(_.targetLinks,ch)):_.fixedValue}function x({nodes:E}){const _=E.length;let H=new Set(E),z=new Set,O=0;for(;H.size;){for(const N of H){N.depth=O;for(const{target:I}of N.sourceLinks)z.add(I)}if(++O>_)throw new Error("circular link");H=z,z=new Set}}function y({nodes:E}){const _=E.length;let H=new Set(E),z=new Set,O=0;for(;H.size;){for(const N of H){N.height=O;for(const{source:I}of N.targetLinks)z.add(I)}if(++O>_)throw new Error("circular link");H=z,z=new Set}}function b({nodes:E}){const _=Sx(E,O=>O.depth)+1,H=(n-e-o)/(_-1),z=new Array(_);for(const O of E){const N=Math.max(0,Math.min(_-1,Math.floor(l.call(null,O,_))));O.layer=N,O.x0=e+N*H,O.x1=O.x0+o,z[N]?z[N].push(O):z[N]=[O]}if(c)for(const O of z)O.sort(c);return z}function C(E){const _=tz(E,H=>(r-t-(H.length-1)*i)/lh(H,ch));for(const H of E){let z=t;for(const O of H){O.y0=z,O.y1=z+O.value*_,z=O.y1+i;for(const N of O.sourceLinks)N.width=N.value*_}z=(r-z+i)/(H.length+1);for(let O=0;O<H.length;++O){const N=H[O];N.y0+=z*(O+1),N.y1+=z*(O+1)}W(H)}}function A(E){const _=b(E);i=Math.min(a,(r-t)/(Sx(_,H=>H.length)-1)),C(_);for(let H=0;H<m;++H){const z=Math.pow(.99,H),O=Math.max(1-z,(H+1)/m);k(_,z,O),$(_,z,O)}}function $(E,_,H){for(let z=1,O=E.length;z<O;++z){const N=E[z];for(const I of N){let K=0,X=0;for(const{source:re,value:ne}of I.targetLinks){let Z=ne*(I.layer-re.layer);K+=j(re,I)*Z,X+=Z}if(!(X>0))continue;let ee=(K/X-I.y0)*_;I.y0+=ee,I.y1+=ee,L(I)}c===void 0&&N.sort(bl),T(N,H)}}function k(E,_,H){for(let z=E.length,O=z-2;O>=0;--O){const N=E[O];for(const I of N){let K=0,X=0;for(const{target:re,value:ne}of I.sourceLinks){let Z=ne*(re.layer-I.layer);K+=B(I,re)*Z,X+=Z}if(!(X>0))continue;let ee=(K/X-I.y0)*_;I.y0+=ee,I.y1+=ee,L(I)}c===void 0&&N.sort(bl),T(N,H)}}function T(E,_){const H=E.length>>1,z=E[H];P(E,z.y0-i,H-1,_),M(E,z.y1+i,H+1,_),P(E,r,E.length-1,_),M(E,t,0,_)}function M(E,_,H,z){for(;H<E.length;++H){const O=E[H],N=(_-O.y0)*z;N>1e-6&&(O.y0+=N,O.y1+=N),_=O.y1+i}}function P(E,_,H,z){for(;H>=0;--H){const O=E[H],N=(O.y1-_)*z;N>1e-6&&(O.y0-=N,O.y1-=N),_=O.y0-i}}function L({sourceLinks:E,targetLinks:_}){if(d===void 0){for(const{source:{sourceLinks:H}}of _)H.sort(Mx);for(const{target:{targetLinks:H}}of E)H.sort(Ex)}}function W(E){if(d===void 0)for(const{sourceLinks:_,targetLinks:H}of E)_.sort(Mx),H.sort(Ex)}function j(E,_){let H=E.y0-(E.sourceLinks.length-1)*i/2;for(const{target:z,width:O}of E.sourceLinks){if(z===_)break;H+=O+i}for(const{source:z,width:O}of _.targetLinks){if(z===E)break;H-=O}return H}function B(E,_){let H=_.y0-(_.targetLinks.length-1)*i/2;for(const{source:z,width:O}of _.targetLinks){if(z===E)break;H+=O+i}for(const{target:z,width:O}of E.sourceLinks){if(z===_)break;H-=O}return H}return g}function sz({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,l,c,d;const a=e.source,i=e.target;return h.jsxs(_e,{tooltipTitle:o,children:[h.jsx(_e.Item,{label:t,value:a.name}),h.jsx(_e.Item,{label:n,value:i.name}),h.jsx(_e.Item,{label:r,value:e.weight.toString()}),h.jsx(_e.Legend,{value:a.name,darkColor:(s=Je(a.index||0))==null?void 0:s.dark,lightColor:(l=Je(a.index||0))==null?void 0:l.light}),h.jsx(_e.Legend,{value:i.name,darkColor:(c=Je(i.index||0))==null?void 0:c.dark,lightColor:(d=Je(i.index||0))==null?void 0:d.light})]})}const Px=80,kx=20,lz=30,cz=12,Nx=u.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:a,weightLabel:i},s)=>{const l=u.useMemo(()=>iz().nodeId(E=>E.id).nodeWidth(cz).nodePadding(lz).nodeAlign(E=>E.group),[]),c=u.useRef(null);Ln(c,s,`${n}-SankeyChart`);const[d,f]=u.useState(""),[p,m]=u.useState(null),{tooltipData:g,tooltipLeft:v,tooltipTop:w,tooltipOpen:x,showTooltip:y,hideTooltip:b}=tl(),{containerBounds:C,containerRef:A,TooltipInPortal:$}=ol({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),k=u.useMemo(()=>l.extent([[Px,kx],[t-Px,e-kx-50]])({nodes:r,links:o.map(E=>({...E,value:Number(E.weight)}))}),[e,t,l,r,o]),T=u.useMemo(()=>Math.max(...k.nodes.map(E=>E.depth??0)),[k]),M=u.useMemo(()=>{const E={};let _=-1/0;return k.nodes.forEach(H=>{const{group:z}=H;E[z]?(E[z].x=Math.max(E[z].x??-1/0,H.x0??-1/0),E[z].y=Math.max(E[z].y??-1/0,H.y1??-1/0)):(E[z]={},E[z].x=H.x0,E[z].y=H.y1),_=Math.max(_,E[z].y??-1/0),E[z].y=_}),Object.keys(E).forEach(H=>{E[H].y=_}),E},[k]),P=u.useCallback(E=>{const _=l.nodeId()(E);f(d===_?"":_)},[d,l]),L=u.useCallback(()=>{f(""),m(null)},[]),W=u.useMemo(()=>d===""&&p===null?new Set:new Set(k.links.filter(E=>l.nodeId()(E.source)===d||l.nodeId()(E.target)===d||(p==null?void 0:p.source)===E.source&&(p==null?void 0:p.target)===E.target)),[d,k,p,l]),j=u.useCallback((E,_)=>{const H=("clientX"in E?E.clientX:0)-C.left,z=("clientY"in E?E.clientY:0)-C.top;m(_),H&&z&&y({tooltipLeft:H,tooltipTop:z,tooltipData:_})},[y,C]),B=u.useCallback(()=>{L(),b()},[L,b]);return h.jsxs("div",{ref:c,className:"rabbit-ds h-min w-min bg-white",id:"sankey-chart",children:[h.jsxs("svg",{height:e,width:t,ref:A,children:[h.jsx("g",{children:k.links.map(E=>h.jsx(YI,{data:E,source:_=>({x:_.source.x1,y:_.y0}),target:_=>({x:_.target.x0,y:_.y1}),x:_=>_.x??0,y:_=>_.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>B(),onMouseMove:_=>j(_,E),stroke:Je(E.source.index||0).light,strokeWidth:E.width,strokeOpacity:W.has(E)?.7:.4},E.index))}),h.jsx("g",{children:k.nodes.map(E=>{var _,H,z;return h.jsx("g",{children:h.jsx(m2,{x:E.x0??0,height:(E.y1??0)-(E.y0??0)+10,width:(E.x1??0)-(E.x0??0),y:(E.y0??0)-5,onMouseEnter:()=>P(E),onMouseLeave:()=>L(),radius:2,fill:d===E.id?(_=Je(E.index||0))==null?void 0:_.dark:(H=Je(E.index||0))==null?void 0:H.light,stroke:(z=Je(E.index||0))==null?void 0:z.dark,all:!0})},E.index)})}),h.jsx("g",{children:a.map(E=>h.jsx(Ga,{axisCharLimit:20,x:M[E.id].x??0,y:(M[E.id].y??0)+40,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},E.id))}),h.jsxs("g",{children:[k.nodes.map(E=>h.jsx(Ga,{axisCharLimit:8,x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:E.depth===T?"start":"end",fill:"#666666"}},E.index)),k.nodes.map(E=>E.value&&h.jsx(go,{x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:E.depth===T?"start":"end",fill:"#666666"},children:`(${E.value.toString()})`},E.index))]})]}),x&&g&&h.jsx($,{top:w,left:v,unstyled:!0,applyPositionStyle:!0,children:h.jsx(sz,{tooltipData:g,fromLabel:`From: ${a[g.source.group].name}`,toLabel:`To: ${a[g.target.group].name}`,weightLabel:i,tooltipTitle:n})},Math.random())]})});Nx.displayName="Sankey";const Ox=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>n&&r&&h.jsx(Nx,{ref:t,width:n,height:r,...e})}));Ox.displayName="SankeyChart";const uz=Ox;function dz(e){return"bandwidth"in e?e.bandwidth():0}var fz=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function uh(){return uh=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},uh.apply(this,arguments)}function hz(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Dx(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,a=e.scale,i=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.children,g=e.numTicks,v=g===void 0?10:g,w=e.lineStyle,x=e.offset,y=e.tickValues,b=hz(e,fz),C=y??Jd(a,v),A=(x??0)+dz(a)/2,$=C.map(function(k,T){var M,P=((M=Us(a(k)))!=null?M:0)+A;return{index:T,from:new Pn({x:0,y:P}),to:new Pn({x:i,y:P})}});return u.createElement(tn,{className:lt("visx-rows",p),top:n,left:o},m?m({lines:$}):$.map(function(k){var T=k.from,M=k.to,P=k.index;return u.createElement(QI,uh({key:"row-line-"+P,from:T,to:M,stroke:l,strokeWidth:d,strokeDasharray:f,style:w},b))}))}Dx.propTypes={tickValues:te.array,width:te.number.isRequired};function _x({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:a,legendDarkColor:i,legendLightColor:s}){const l=e==null?void 0:e.toString(),c=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:!0,children:[h.jsx(_e.Item,{label:r,value:l}),h.jsx(_e.Item,{label:o,value:c}),h.jsx(_e.Legend,{value:a,darkColor:i,lightColor:s})]})}_x.defaultProps={xValue:void 0,yValue:void 0};const Ix=20,Lx=50,dh=80,yl=50,pz=10,gz=25,fh=u.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:a,width:i,height:s,maxBinCount:l=gz,minBinCount:c=pz,integerBins:d=!1,integerYAxis:f=!1},p)=>{const m=u.useMemo(()=>Cs(a),[a]),{histogramDomain:g,threshold:v,thresholdInteger:w}=u.useMemo(()=>{const O=m[0]??0,N=O===m[1]?c+O:m[1]??0,I=N-O>c?N:c+O,K=Math.min(Math.max(N-O,c),l),X=Math.floor(m[0]??0),ee=Math.ceil(I);return{histogramDomain:r||(d?[X,ee]:[O,N]),threshold:K,thresholdInteger:Math.ceil(K)}},[m,r,d,l,c]),x=u.useMemo(()=>$o({domain:g,range:[yl,i-Lx],round:!0,nice:!0}),[g,i]),y=u.useMemo(()=>tO().domain(x.domain()).thresholds(o||(d?w:v))(a),[x,o,a,v,w,d]),b=u.useMemo(()=>$o({domain:[0,dd(y,O=>O.length)??0],range:[s-dh,Ix],round:!0,nice:!0}),[y,s]),C=u.useMemo(()=>b.ticks().filter(O=>f?Number.isInteger(O):O),[f,b]),A=u.useRef(null);Ln(A,p,`${t}-${n}-Histogram`);const{tooltipData:$,tooltipLeft:k,tooltipTop:T,tooltipOpen:M,showTooltip:P,hideTooltip:L}=tl(),{containerBounds:W,containerRef:j,TooltipInPortal:B}=ol({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=i-yl-Lx,_=s-Ix-dh-100,H=u.useCallback((O,N)=>{const I=("clientX"in O?O.clientX:0)-W.left,K=("clientY"in O?O.clientY:0)-W.top;I&&K&&P({tooltipLeft:I,tooltipTop:K,tooltipData:N})},[P,W]),z=u.useCallback(()=>{L()},[L]);return h.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:i,height:s},ref:A,children:[h.jsxs("svg",{width:i,height:s,ref:j,children:[h.jsx(gf,{orientation:"bottom",scale:x,top:s-dh,hideTicks:!0,numTicks:6,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"}}),h.jsx(gf,{orientation:"left",scale:b,left:yl,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:f?Vs("d"):void 0,tickValues:C,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"}}),h.jsxs(tn,{children:[h.jsx(Dx,{scale:b,width:E,height:_,left:yl,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),y.map(O=>{const N=Math.abs(b(0)-b(O.length)),I=Math.abs(x(O.x1??0)-x(O.x0??0));return h.jsx("g",{children:h.jsx(DI,{x:x(O.x0??0),y:b(O.length),width:I,height:N&&N-1,fill:Je(0).light,stroke:Je(0).dark,strokeWidth:1,onMouseMove:K=>H(K,O),onMouseLeave:()=>z()})},Math.random())})]})]}),M&&$&&h.jsx(B,{top:T,left:k,unstyled:!0,applyPositionStyle:!0,children:h.jsx(_x,{xAxisLabel:t,xValue:`${$.x0} to ${$.x1}`,yAxisLabel:n,yValue:$.length,tooltipTitle:e,legendValue:n,legendDarkColor:Je(0).dark,legendLightColor:Je(0).light})},Math.random()),b.domain()[2]]})}),Fx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(fh,{ref:t,width:n,height:r,...e})}));fh.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},fh.displayName="HistogramBase",Fx.displayName="HistogramChart";const mz=Fx,vz=e=>e.value,bz=e=>e.label,Bx=u.forwardRef(({width:e,height:t,unit:n="%",data:r},o)=>{const a=e/2,i=t/2,s=Math.min(e-200,t-20)/2,l=u.useRef(null);return Ln(l,o,"DonutChart"),h.jsx("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:l,children:h.jsx("svg",{width:e,height:t,className:"rabbit-ds",children:h.jsx(tn,{top:i,left:a,children:h.jsx(MI,{data:r,pieValue:vz,outerRadius:s-10,innerRadius:s-22-10,cornerRadius:2,padAngle:.025,children:c=>h.jsx(h.Fragment,{children:c.arcs.map(d=>{const[f,p]=c.path.centroid(d),m=bz(d.data),g=d.startAngle+(d.endAngle-d.startAngle)/2;return h.jsxs("g",{children:[h.jsx("path",{d:c.path(d)??void 0,fill:d.data.color}),h.jsxs(F1,{x:f,y:p,dx:g>Math.PI?-30:30,dy:-20,children:[h.jsx(h1,{type:"elbow",stroke:d.data.labelColor}),h.jsx(L1,{radius:1,strokeWidth:2,stroke:d.data.labelColor}),h.jsx(I1,{title:`${m}: ${d.value} ${n}`,maxWidth:100,backgroundFill:"transparent",backgroundPadding:{left:4,right:10},titleFontSize:10,horizontalAnchor:g>Math.PI?"end":"start",verticalAnchor:"middle",fontColor:d.data.labelColor,showAnchorLine:!1})]})]},`arc-${m}`)})})})})})})});Bx.displayName="DonutChartBase";const zx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(Bx,{ref:t,width:n,height:r,...e})}));zx.displayName="DonutChart";const yz=zx;function Wx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Item,{label:r,value:c}),h.jsx(_e.Item,{label:o,value:d}),h.jsx(_e.Legend,{value:i,darkColor:s,lightColor:l})]})}Wx.defaultProps={xValue:void 0,yValue:void 0};const xl={top:60,left:20,right:20,bottom:20},jx={start:10,end:-10,middle:0},Vx=u.forwardRef(({width:e,height:t,levels:n=5,nodes:r,xAxisLabel:o,xAxisCharLimit:a,tooltipTitle:i,xAxisUnitSymbol:s,yAxisDomain:l,series:c=[],xAxisValues:d},f)=>{const p=u.useRef(null);Ln(p,f,"RadarChart");const{tooltipData:m,tooltipLeft:g,tooltipTop:v,tooltipOpen:w,showTooltip:x,hideTooltip:y}=tl(),{containerBounds:b,containerRef:C,TooltipInPortal:A}=ol({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),$=u.useCallback((N,I)=>{const K=Math.PI*2/N;return[...new Array(N)].map((X,ee)=>({x:I*Math.sin(ee*K),y:I*Math.cos(ee*K)}))},[]),k=u.useCallback((N,I,K)=>K==="pre"?`${I}${N}`:`${N}${I}`,[]),T=u.useCallback((N,I,K)=>{const X=Math.PI*2/N.length,ee=new Array(N.length).fill({x:0,y:0,data:null}),re=new Array(N.length+1).fill("").reduce((ne,Z,oe)=>{if(oe>N.length)return ne;const U=I(K(N[oe-1]))*Math.sin(oe*X),Q=I(K(N[oe-1]))*Math.cos(oe*X);return ee[oe-1]={x:U,y:Q,data:N[oe-1]},`${ne}${U},${Q} `});return{points:ee,pointString:re}},[]),M=u.useMemo(()=>new Pn({x:0,y:0}),[]),P=u.useCallback(N=>Math.round(N)===0?"middle":N>0?"start":"end",[]),L=u.useCallback((N,I)=>{const K=("clientX"in N?N.clientX:0)-b.left,X=("clientY"in N?N.clientY:0)-b.top;K&&X&&x({tooltipLeft:K,tooltipTop:X,tooltipData:I})},[x,b]),W=u.useCallback(()=>{y()},[y]),j=u.useMemo(()=>e-xl.left-xl.right,[e]),B=u.useMemo(()=>t-xl.top-xl.bottom,[t]),E=u.useMemo(()=>Math.min(j,B)/2,[j,B]),_=c.length?c.reduce((N,I)=>{const K=I.data.filter(X=>X);return Math.max(N,...K)},-1/0):0,H=$o({range:[0,E],domain:l??[0,_]}),z=$(d.length,E),O=N=>T(N,I=>H(I)??0,I=>I);return h.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:p,children:[h.jsxs("svg",{width:e,height:t,ref:C,pointerEvents:"all",onMouseLeave:W,children:[h.jsx("rect",{fill:"transparent",width:e,height:t,rx:14}),h.jsxs(tn,{top:t/2,left:e/2,children:[[...new Array(n)].map((N,I)=>h.jsx(v2,{x:e/2,y:t/2,fill:"none",stroke:"#CFD7DF",strokeWidth:1,strokeDasharray:4,r:E*(I+1)/n},`web1-${Math.random()}`)),d.map((N,I)=>h.jsxs(h.Fragment,{children:[h.jsx(nf,{from:M,to:z[I],stroke:"#CFD7DF",strokeWidth:1},`radar-line-${Math.random()}`),h.jsx(go,{x:z[I].x,y:z[I].y,textAnchor:P(z[I].x),verticalAnchor:P(z[I].y),dx:jx[P(z[I].x)],dy:jx[P(z[I].y)],fontSize:10,fill:"#666666",width:a??100,children:`${s?k(d[(I+d.length-1)%d.length],s.symbol,s.position):d[(I+d.length-1)%d.length]}`})]})),c.map((N,I)=>h.jsx("polygon",{points:O(N.data).pointString,fill:Je(I).light,fillOpacity:.2,stroke:Je(I).dark,strokeWidth:1},`polypath-${Math.random()}`)),c.map((N,I)=>O(N.data).points.map((K,X)=>h.jsx(v2,{cx:K.x,cy:K.y,r:5,fill:"transparent",onMouseMove:ee=>{var re;return L(ee,{yAxisLabel:((re=r.find(ne=>ne.id===N.id))==null?void 0:re.name)??"",xAxisValue:d[X],yAxisValue:N.data[X],xAxisLabel:o??"Category",legendDarkColor:Je(I).dark,legendLightColor:Je(I).light})},onMouseOut:W},`radar-point-${Math.random()}`)))]})]}),w&&m&&h.jsx(A,{top:v,left:g,unstyled:!0,applyPositionStyle:!0,children:h.jsx(Wx,{xAxisLabel:m.xAxisLabel??"",xValue:m.xAxisValue,yAxisLabel:m.yAxisLabel??"",yValue:m.yAxisValue,tooltipTitle:i,showSideBySide:!0,legendValue:m.yAxisLabel??"",legendDarkColor:m.legendDarkColor,legendLightColor:m.legendLightColor})},Math.random())]})});Vx.displayName="RadarChartBase";const Hx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(Vx,{ref:t,width:n,height:r,...e})}));Hx.displayName="RadarChart";const xz=Hx;function Yx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Item,{label:r,value:c}),h.jsx(_e.Item,{label:o,value:d}),h.jsx(_e.Legend,{value:i,darkColor:s,lightColor:l})]})}Yx.defaultProps={xValue:void 0,yValue:void 0};const wz=({x:e,y:t,datum:n})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),Gx={xAccessor:e=>e.x,yAccessor:e=>e.y},Ux=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Xx=10,Az=5,hh=u.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:c,yAxisUnitSymbol:d,tooltipTitle:f,mode:p,xAxisCharLimit:m,maxNodesInMiniMode:g=Az,tooltipStackCharLimit:v=Xx,seriesSelectorTitle:w},x)=>{const[y,b]=u.useState(e.map(T=>T.id)),C=u.useRef(null);Ln(C,x,`${a}-${i}-StackedBarChart`);const A=u.useMemo(()=>o.map((T,M)=>{const P=e.find(L=>L.id===T.id);return{points:T.data.map((L,W)=>({x:r[W],y:L,nodeId:T.id,color:(P==null?void 0:P.color)??Je(M)}))}}).slice(0,p==="mini"?g:o.length),[o,p,g,e,r]),$=u.useMemo(()=>p==="full"?A.filter(T=>y.includes(T.points[0].nodeId)):A,[A,y,p]),k=u.useMemo(()=>Math.floor((n-(p==="mini"?0:150))/(r.length*8)),[n,r,p]);return h.jsxs("div",{ref:C,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[h.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[h.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:h.jsxs(ur,{margin:{top:10,left:50,right:50,bottom:50},xScale:{type:"band",nice:!0,padding:.5,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...l&&{domain:l}},children:[h.jsx(N2,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),h.jsx(To,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:T=>c?Ux(T,c.symbol,c.position):T,rangePadding:{end:10},tickComponent:T=>h.jsx(Ga,{textLabel:T.formattedValue||"",x:T.x,y:T.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??k}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),h.jsx(To,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:T=>d?Ux(T,d.symbol,d.position):T,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"}}),h.jsx(GB,{children:$.map(T=>h.jsx(VB,{data:T.points,dataKey:T.points[0].nodeId,xAccessor:Gx.xAccessor,yAccessor:Gx.yAccessor,colorAccessor:M=>M.color.light,radiusTop:!0,radius:2},T.points[0].nodeId))}),h.jsx(al,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:wz,renderTooltip:({tooltipData:T})=>{var L,W,j,B,E,_;const M=e.find(H=>{var z;return H.id===((z=T==null?void 0:T.nearestDatum)==null?void 0:z.datum.nodeId)}),P=((L=T==null?void 0:T.nearestDatum)==null?void 0:L.datum)&&((W=T==null?void 0:T.nearestDatum)==null?void 0:W.datum.x.length)<v;return h.jsx(Yx,{xValue:(j=T==null?void 0:T.nearestDatum)==null?void 0:j.datum.x,yValue:(B=T==null?void 0:T.nearestDatum)==null?void 0:B.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!P,tooltipTitle:f,legendValue:(M==null?void 0:M.name)||"",legendDarkColor:((E=T==null?void 0:T.nearestDatum)==null?void 0:E.datum.color.dark)||Je(0).dark,legendLightColor:((_=T==null?void 0:T.nearestDatum)==null?void 0:_.datum.color.light)||Je(0).light})}})]})}),p==="full"&&h.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[h.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[h.jsx("span",{className:"pr-1",children:w??a}),"(",$.length??0,"/",A.length,")"]}),h.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:A.map(T=>{const M=e.find(P=>P.id===T.points[0].nodeId);return M&&h.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-full border"}),M.name]}),h.jsx("div",{className:"flex items-center",children:h.jsx(ei,{checked:y.includes(M.id),onCheckedChange:P=>{let L=[...y];P?L=[...y,M.id]:L.splice(y.indexOf(M.id),1),b(L)}})})]},M.id)})})]})]}),p==="mini"&&h.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-font-secondary",children:A.map(T=>{const M=e.find(P=>P.id===T.points[0].nodeId);return h.jsxs("div",{className:"flex items-center justify-center gap-1",children:[h.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),M==null?void 0:M.name]},M==null?void 0:M.id)})})]})}),Cz={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Xx,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};hh.defaultProps=Cz,hh.displayName="StackedBarChartBase";const qx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(hh,{ref:t,width:n,height:r,...e})}));qx.displayName="StackedBarChart";const Sz=qx,Ez=({nodes:e,selectedNodeIds:t,setSelectedNodeIds:n,seriesSelectorTitle:r})=>h.jsxs("div",{className:"rabbit-ds inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[h.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[h.jsx("span",{className:"pr-1",children:r}),"(",t.length??0,"/",e.length,")"]}),h.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:e.map(({id:o,name:a,color:i})=>h.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{style:{backgroundColor:i.light,borderColor:i.dark},className:"mr-1 h-3 w-3 rounded-full border"}),a]}),h.jsx("div",{className:"flex items-center",children:h.jsx(ei,{checked:t.includes(o),onCheckedChange:s=>{let l=[...t];s?l=[...t,o]:l.splice(t.indexOf(o),1),n(l)}})})]},o))})]});function Kx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,pointMetaData:i,seriesMetaData:s}){var d;const l=e==null?void 0:e.toString(),c=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Header,{label:"Review Cycle",value:(d=i==null?void 0:i.reviewCycle)==null?void 0:d.name}),h.jsx(_e.Item,{label:r,value:l}),h.jsx(_e.Item,{label:o,value:c}),h.jsx(_e.Footer,{nodeData:s})]})}Kx.defaultProps={xValue:void 0,yValue:void 0};function Mz({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=u.useContext(Dt),a=r?e.filter(i=>i.y!==null):e;return h.jsx(h.Fragment,{children:h.jsx(g2,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))??0},y:i=>{var s;return((s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i)))??0},curve:sa,shapeRendering:"geometricPrecision"})})}const $z=({x:e,y:t,datum:n,size:r})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),Tz=({x:e,y:t,datum:n})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),wl={xAccessor:e=>e.x,yAccessor:e=>e.y},Qx=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Pz=10,kz=5,Zx=u.forwardRef(({rowsCount:e=3,nodes:t,height:n,width:r,xAxisLabel:o,yAxisLabel:a,xAxisDomain:i,yAxisDomain:s,xAxisUnitSymbol:l,yAxisUnitSymbol:c,tooltipTitle:d,mode:f="mini",xAxisCharLimit:p,connectNulls:m=!1,maxNodesInMiniMode:g=kz,tooltipStackCharLimit:v=Pz,withBackground:w=!0},x)=>{const y=u.useRef(null),b=e===1;Ln(y,x,`${o}-${a}-DirectedLineChart`);const C=u.useMemo(()=>t.map(({seriesMetaData:P},L)=>{const{employee:W}=P;return{id:W.id,name:W.name,color:Je(L)}}).slice(0,f==="mini"?g:t.length),[t,f,g]),[A,$]=u.useState(()=>C.filter((P,L)=>f==="full"||L<g).map(P=>P.id)),k=u.useMemo(()=>t.map((P,L)=>({nodeId:P.seriesMetaData.employee.id,points:P.xValues.map((W,j)=>{var E;let B=null;return b?B=1/t.length*(L+1)+1/(t.length*10)*(j+1):B=((E=P==null?void 0:P.yValues)==null?void 0:E[j])??null,{x:P.xValues[j],y:B,pointMetaData:P.pointsMetaData[j],nodeId:P.seriesMetaData.employee.id,color:Je(L)}})})).slice(0,f==="mini"?g:t.length),[t,f,g,b]),T=u.useMemo(()=>f==="full"?k.filter(({nodeId:P})=>A.includes(P)):k,[k,f,A]),M=u.useMemo(()=>Math.floor((r-(f==="mini"?0:150))/(t[0].xValues.length*8)),[r,f,t]);return h.jsx("div",{ref:y,id:"directed-line-chart",className:ue("rabbit-ds flex flex-col ",w?"bg-[white]":""),style:{width:r,height:n},children:h.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[h.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:h.jsxs(ur,{margin:{top:10,left:50,right:50,bottom:50},xScale:typeof i[0]=="string"?{type:"band",domain:i,padding:1}:{type:"linear",domain:i},yScale:typeof s[0]=="string"?{type:"band",domain:s,padding:1}:{type:"linear",domain:s},children:[h.jsx(To,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:P=>l?Qx(P,l.symbol,l.position):P,tickComponent:P=>h.jsx(Ga,{textLabel:P.formattedValue||"",x:P.x,y:P.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:p??M}),label:`${o} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),h.jsx(To,{hideTicks:!0,numTicks:b?0:6,strokeWidth:b?0:1,orientation:"left",stroke:"#CFD7DF",label:a?`${a} ➔`:"",tickFormat:P=>c?Qx(P,c.symbol,c.position):P,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"}}),T.map((P,L)=>h.jsxs(h.Fragment,{children:[h.jsx(Mz,{data:P.points,xAccessor:wl.xAccessor,yAccessor:wl.yAccessor,connectNulls:m}),h.jsx(bx,{dataKey:`Performance Management ${L}`,data:P.points,size:8,renderGlyph:$z,xAccessor:wl.xAccessor,yAccessor:wl.yAccessor})]})),h.jsx(al,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:Tz,renderTooltip:({tooltipData:P})=>{var j,B,E,_,H,z;const L=t.find(O=>{var N;return O.id===((N=P==null?void 0:P.nearestDatum)==null?void 0:N.datum.nodeId)}),W=((j=P==null?void 0:P.nearestDatum)==null?void 0:j.datum)&&String((B=P==null?void 0:P.nearestDatum)==null?void 0:B.datum.x).length<v;return h.jsx(Kx,{xValue:(E=P==null?void 0:P.nearestDatum)==null?void 0:E.datum.x,yValue:(_=P==null?void 0:P.nearestDatum)==null?void 0:_.datum.y,xAxisLabel:o,yAxisLabel:a,showSideBySide:!!W,tooltipTitle:d,seriesMetaData:L==null?void 0:L.seriesMetaData,pointMetaData:(z=(H=P==null?void 0:P.nearestDatum)==null?void 0:H.datum)==null?void 0:z.pointMetaData})}})]})}),f==="full"&&h.jsx(Ez,{nodes:C,seriesSelectorTitle:"Team Members",selectedNodeIds:A,setSelectedNodeIds:$})]})})});Zx.displayName="LineBase";const Jx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(Zx,{ref:t,width:n,height:r,...e})}));Jx.displayName="DirectedLineChart";const Rx=Jx,Nz=[{"#FFEFD4":"#AF5C20"},{"#DBF2D3":"#44812F"},{"#BFE8C6":"#1A5724"},{"#FFE7C5":"#8C6A00"},{"#FAD4D4":"#C62C02"},{"#EAEAEA":"#333333"},{"#E6F1FD":"#1565BC"},{"#FFE1D9":"#C62C02"}];function Oz({box:e,showCountData:t=!1}){function n(r){if(!r)return"#333";const o=Nz.find(a=>a[r]);return o?o[r]:r}return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"flex shrink grow basis-0 flex-col items-start ",children:[h.jsx("div",{className:"flex items-start gap-2.5",children:h.jsxs("span",{className:"text-3xs",style:{color:n(n(e==null?void 0:e.color))},children:[" ",e==null?void 0:e.label]})}),t&&h.jsxs("span",{className:" text-3xs text-stone-500",children:[e==null?void 0:e.count," Member",z3(e==null?void 0:e.count)]})]}),t&&h.jsx("div",{className:"flex items-start ",children:h.jsx("div",{className:"flex items-center justify-center rounded-3xl bg-neutral-50/40 px-0.5",children:h.jsxs("span",{className:" text-2xs leading-4 text-stone-500",children:[e==null?void 0:e.percentage,"%"]})})})]})}const Dz=({rows:e,columns:t,boxData:n=[]})=>{let r="";return!n||(n==null?void 0:n.length)===0||(r=n.slice(0,t).reduce((a,i)=>{var d,f,p,m;const s=e===1?"OVERALL":"PERFORMANCE",l=((f=(d=i==null?void 0:i.scoreRange)==null?void 0:d[s])==null?void 0:f.maxScore)??0,c=((m=(p=i==null?void 0:i.scoreRange)==null?void 0:p[s])==null?void 0:m.minScore)??0;return`${a} minmax(20px, ${l-c}fr)`},"")),r},_z=({rows:e,columns:t,boxData:n=[]})=>{if(e===1)return"1fr";let r="";return!n||(n==null?void 0:n.length)===0||(r=n.filter((a,i)=>i%t===0).reduce((a,i)=>{var d,f,p,m;const s="POTENTIAL",l=((f=(d=i==null?void 0:i.scoreRange)==null?void 0:d[s])==null?void 0:f.maxScore)??0,c=((m=(p=i==null?void 0:i.scoreRange)==null?void 0:p[s])==null?void 0:m.minScore)??0;return`${a} minmax(20px, ${l-c}fr)`},"")),r},ew=u.forwardRef(({rows:e=3,columns:t=3,spacing:n="1px",boxData:r=[],position:o="relative",margin:a="0",width:i="100%",left:s=0,top:l=0,mode:c="mini",showCountData:d=!1},f)=>{const p=u.useRef(null);return Ln(p,f,"GridChart"),h.jsxs("div",{ref:p,className:"flex flex-row",style:{position:o,top:l,left:s,width:i,margin:a,height:"100%"},children:[h.jsx("div",{style:{flexGrow:1,display:"grid",gridTemplateRows:_z({rows:e,columns:t,boxData:r}),gridTemplateColumns:Dz({rows:e,columns:t,boxData:r}),gap:n,height:"100%"},children:r==null?void 0:r.map((m,g)=>h.jsx("div",{style:{padding:"8px",backgroundColor:(m==null?void 0:m.color)??"#CFD7DF"},children:h.jsx(Oz,{box:m,showCountData:d})},m.label+m.color+g))}),c==="full"&&h.jsx("div",{className:"inline-flex w-64 shrink-0 grow-0"})]})});ew.displayName="GridChart";const tw=ew,nw=u.forwardRef(({directedLineChartProps:e,gridChartProps:t,mode:n="mini"},r)=>{const o=u.useRef(null);return Ln(o,r,`${e.xAxisLabel}-${e.yAxisLabel}-GridDirectedLineChart`),h.jsxs("div",{ref:o,className:"relative h-full w-full",children:[h.jsx("div",{className:"absolute mx-[50px] mb-[50px] mt-[10px] h-[calc(100%-60px)] w-[calc(100%-100px)]",children:h.jsx(tw,{...t,mode:n})}),h.jsxs("div",{className:"absolute h-full w-full",children:[h.jsx(Rx,{...e,mode:n}),h.jsx("div",{})]})]})});nw.displayName="GridDirectedLineChart";const Iz=nw,Al="ToggleGroup",[rw,xV]=ut(Al,[Rr]),ow=Rr(),Lz=u.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return u.createElement(Fz,q({},o,{ref:t}))}if(n==="multiple"){const o=r;return u.createElement(Bz,q({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Al}\``)}),[aw,iw]=rw(Al),Fz=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=vt({prop:n,defaultProp:r,onChange:o});return u.createElement(aw,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:s,onItemDeactivate:u.useCallback(()=>s(""),[s])},u.createElement(sw,q({},a,{ref:t})))}),Bz=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=vt({prop:n,defaultProp:r,onChange:o}),l=u.useCallback(d=>s((f=[])=>[...f,d]),[s]),c=u.useCallback(d=>s((f=[])=>f.filter(p=>p!==d)),[s]);return u.createElement(aw,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:l,onItemDeactivate:c},u.createElement(sw,q({},a,{ref:t})))}),[zz,Wz]=rw(Al),sw=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:s=!0,...l}=e,c=ow(n),d=jn(i),f={role:"group",dir:d,...l};return u.createElement(zz,{scope:n,rovingFocus:o,disabled:r},o?u.createElement(_c,q({asChild:!0},c,{orientation:a,dir:d,loop:s}),u.createElement(ve.div,q({},f,{ref:t}))):u.createElement(ve.div,q({},f,{ref:t})))}),ph="ToggleGroupItem",jz=u.forwardRef((e,t)=>{const n=iw(ph,e.__scopeToggleGroup),r=Wz(ph,e.__scopeToggleGroup),o=ow(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,s={...e,pressed:a,disabled:i},l=u.useRef(null);return r.rovingFocus?u.createElement(Ic,q({asChild:!0},o,{focusable:!i,active:a,ref:l}),u.createElement(lw,q({},s,{ref:t}))):u.createElement(lw,q({},s,{ref:t}))}),lw=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=iw(ph,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?i:void 0;return u.createElement(Rh,q({},s,o,{ref:t,onPressedChange:l=>{l?a.onItemActivate(r):a.onItemDeactivate(r)}}))}),Vz=Lz,Hz=jz;function Yz({children:e,...t}){return h.jsx(Vz,{className:"flex gap-2",...t,children:e})}function Gz({value:e,disabled:t,selected:n,icon:r,label:o,count:a,...i}){return h.jsx(Hz,{asChild:!0,value:e,...i,children:h.jsx("button",{"data-deer-btn":!0,type:"button",className:ue("rabbit-ds h-7 flex-col w-auto p-0 border border-solid rounded-full justify-center items-center inline-flex hover:cursor-pointer","data-[state=off]:border-gray-100 data-[state=off]:bg-gray-100 data-[state=off]:text-font-secondary","data-[state=on]:border-primary-hover data-[state=on]:bg-primary/10 data-[state=on]:text-primary-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"),children:h.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 rounded-full px-4 py-1",children:[r?h.jsx(Oe,{IconSVG:r,size:"small"}):null,h.jsxs("div",{className:"text-sm font-semibold",children:[o?h.jsx("span",{children:o}):null," ",a?h.jsxs("span",{children:["(",a,")"]}):null]})]})})})}const Ua="NavigationMenu",[gh,Uz,Xz]=vr(Ua),[mh,qz,Kz]=vr(Ua),[vh,wV]=ut(Ua,[Xz,Kz]),[Qz,Br]=vh(Ua),[Zz,AV]=vh(Ua),Jz=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:l="horizontal",dir:c,...d}=e,[f,p]=u.useState(null),m=Ee(t,M=>p(M)),g=jn(c),v=u.useRef(0),w=u.useRef(0),x=u.useRef(0),[y,b]=u.useState(!0),[C="",A]=vt({prop:r,onChange:M=>{const P=M!=="",L=s>0;P?(window.clearTimeout(x.current),L&&b(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>b(!0),s)),o==null||o(M)},defaultProp:a}),$=u.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>A(""),150)},[A]),k=u.useCallback(M=>{window.clearTimeout(w.current),A(M)},[A]),T=u.useCallback(M=>{C===M?window.clearTimeout(w.current):v.current=window.setTimeout(()=>{window.clearTimeout(w.current),A(M)},i)},[C,A,i]);return u.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(w.current),window.clearTimeout(x.current)},[]),u.createElement(Rz,{scope:n,isRootMenu:!0,value:C,dir:g,orientation:l,rootNavigationMenu:f,onTriggerEnter:M=>{window.clearTimeout(v.current),y?T(M):k(M)},onTriggerLeave:()=>{window.clearTimeout(v.current),$()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:$,onItemSelect:M=>{A(P=>P===M?"":M)},onItemDismiss:()=>A("")},u.createElement(ve.nav,q({"aria-label":"Main","data-orientation":l,dir:g},d,{ref:m})))}),Rz=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:i,value:s,onItemSelect:l,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:f,onContentEnter:p,onContentLeave:m}=e,[g,v]=u.useState(null),[w,x]=u.useState(new Map),[y,b]=u.useState(null);return u.createElement(Qz,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:Qa(s),baseId:bt(),dir:o,orientation:a,viewport:g,onViewportChange:v,indicatorTrack:y,onIndicatorTrackChange:b,onTriggerEnter:ot(d),onTriggerLeave:ot(f),onContentEnter:ot(p),onContentLeave:ot(m),onItemSelect:ot(l),onItemDismiss:ot(c),onViewportContentChange:u.useCallback((C,A)=>{x($=>($.set(C,A),new Map($)))},[]),onViewportContentRemove:u.useCallback(C=>{x(A=>A.has(C)?(A.delete(C),new Map(A)):A)},[])},u.createElement(gh.Provider,{scope:t},u.createElement(Zz,{scope:t,items:w},i)))},eW="NavigationMenuList",tW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Br(eW,n),a=u.createElement(ve.ul,q({"data-orientation":o.orientation},r,{ref:t}));return u.createElement(ve.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange},u.createElement(gh.Slot,{scope:n},o.isRootMenu?u.createElement(fw,{asChild:!0},a):a))}),nW="NavigationMenuItem",[rW,cw]=vh(nW),oW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=bt(),i=r||a||"LEGACY_REACT_AUTO_VALUE",s=u.useRef(null),l=u.useRef(null),c=u.useRef(null),d=u.useRef(()=>{}),f=u.useRef(!1),p=u.useCallback((g="start")=>{if(s.current){d.current();const v=bh(s.current);v.length&&yh(g==="start"?v:v.reverse())}},[]),m=u.useCallback(()=>{if(s.current){const g=bh(s.current);g.length&&(d.current=fW(g))}},[]);return u.createElement(rW,{scope:n,value:i,triggerRef:l,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:f,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:m,onContentFocusOutside:m},u.createElement(ve.li,q({},o,{ref:t})))}),uw="NavigationMenuTrigger",aW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Br(uw,e.__scopeNavigationMenu),i=cw(uw,e.__scopeNavigationMenu),s=u.useRef(null),l=Ee(s,i.triggerRef,t),c=mw(a.baseId,i.value),d=vw(a.baseId,i.value),f=u.useRef(!1),p=u.useRef(!1),m=i.value===a.value;return u.createElement(u.Fragment,null,u.createElement(gh.ItemSlot,{scope:n,value:i.value},u.createElement(pw,{asChild:!0},u.createElement(ve.button,q({id:c,disabled:r,"data-disabled":r?"":void 0,"data-state":gw(m),"aria-expanded":m,"aria-controls":d},o,{ref:l,onPointerEnter:de(e.onPointerEnter,()=>{p.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:de(e.onPointerMove,xh(()=>{r||p.current||i.wasEscapeCloseRef.current||f.current||(a.onTriggerEnter(i.value),f.current=!0)})),onPointerLeave:de(e.onPointerLeave,xh(()=>{r||(a.onTriggerLeave(),f.current=!1)})),onClick:de(e.onClick,()=>{a.onItemSelect(i.value),p.current=m}),onKeyDown:de(e.onKeyDown,g=>{const w={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];m&&g.key===w&&(i.onEntryKeyDown(),g.preventDefault())})})))),m&&u.createElement(u.Fragment,null,u.createElement(nm,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:g=>{const v=i.contentRef.current,w=g.relatedTarget,x=w===s.current,y=v==null?void 0:v.contains(w);(x||!y)&&i.onFocusProxyEnter(x?"start":"end")}}),a.viewport&&u.createElement("span",{"aria-owns":d})))}),dw="navigationMenu.linkSelect",iW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return u.createElement(pw,{asChild:!0},u.createElement(ve.a,q({"data-active":r?"":void 0,"aria-current":r?"page":void 0},a,{ref:t,onClick:de(e.onClick,i=>{const s=i.target,l=new CustomEvent(dw,{bubbles:!0,cancelable:!0});if(s.addEventListener(dw,c=>o==null?void 0:o(c),{once:!0}),Ja(s,l),!l.defaultPrevented&&!i.metaKey){const c=new CustomEvent(Sl,{bubbles:!0,cancelable:!0});Ja(s,c)}},{checkForDefaultPrevented:!1})})))}),Cl="NavigationMenuContent",sW=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Br(Cl,e.__scopeNavigationMenu),a=cw(Cl,e.__scopeNavigationMenu),i=Ee(a.contentRef,t),s=a.value===o.value,l={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?u.createElement(lW,q({forceMount:n},l,{ref:i})):u.createElement(Ot,{present:n||s},u.createElement(cW,q({"data-state":gw(s)},l,{ref:i,onPointerEnter:de(e.onPointerEnter,o.onContentEnter),onPointerLeave:de(e.onPointerLeave,xh(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...l.style}})))}),lW=u.forwardRef((e,t)=>{const n=Br(Cl,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return yt(()=>{r(e.value,{ref:t,...e})},[e,t,r]),yt(()=>()=>o(e.value),[e.value,o]),null}),Sl="navigationMenu.rootContentDismiss",cW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:l,...c}=e,d=Br(Cl,n),f=u.useRef(null),p=Ee(f,t),m=mw(d.baseId,r),g=vw(d.baseId,r),v=Uz(n),w=u.useRef(null),{onItemDismiss:x}=d;u.useEffect(()=>{const b=f.current;if(d.isRootMenu&&b){const C=()=>{var A;x(),s(),b.contains(document.activeElement)&&((A=o.current)===null||A===void 0||A.focus())};return b.addEventListener(Sl,C),()=>b.removeEventListener(Sl,C)}},[d.isRootMenu,e.value,o,x,s]);const y=u.useMemo(()=>{const C=v().map(P=>P.value);d.dir==="rtl"&&C.reverse();const A=C.indexOf(d.value),$=C.indexOf(d.previousValue),k=r===d.value,T=$===C.indexOf(r);if(!k&&!T)return w.current;const M=(()=>{if(A!==$){if(k&&$!==-1)return A>$?"from-end":"from-start";if(T&&A!==-1)return A>$?"to-start":"to-end"}return null})();return w.current=M,M},[d.previousValue,d.value,d.dir,v,r]);return u.createElement(fw,{asChild:!0},u.createElement(Vo,q({id:g,"aria-labelledby":m,"data-motion":y,"data-orientation":d.orientation},c,{ref:p,onDismiss:()=>{var b;const C=new Event(Sl,{bubbles:!0,cancelable:!0});(b=f.current)===null||b===void 0||b.dispatchEvent(C)},onFocusOutside:de(e.onFocusOutside,b=>{var C;l();const A=b.target;(C=d.rootNavigationMenu)!==null&&C!==void 0&&C.contains(A)&&b.preventDefault()}),onPointerDownOutside:de(e.onPointerDownOutside,b=>{var C;const A=b.target,$=v().some(T=>{var M;return(M=T.ref.current)===null||M===void 0?void 0:M.contains(A)}),k=d.isRootMenu&&((C=d.viewport)===null||C===void 0?void 0:C.contains(A));($||k||!d.isRootMenu)&&b.preventDefault()}),onKeyDown:de(e.onKeyDown,b=>{const C=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!C){const k=bh(b.currentTarget),T=document.activeElement,M=k.findIndex(W=>W===T),L=b.shiftKey?k.slice(0,M).reverse():k.slice(M+1,k.length);if(yh(L))b.preventDefault();else{var $;($=a.current)===null||$===void 0||$.focus()}}}),onEscapeKeyDown:de(e.onEscapeKeyDown,b=>{i.current=!0})})))}),uW="FocusGroup",fw=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Br(uW,n);return u.createElement(mh.Provider,{scope:n},u.createElement(mh.Slot,{scope:n},u.createElement(ve.div,q({dir:o.dir},r,{ref:t}))))}),hw=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],dW="FocusGroupItem",pw=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=qz(n),a=Br(dW,n);return u.createElement(mh.ItemSlot,{scope:n},u.createElement(ve.button,q({},r,{ref:t,onKeyDown:de(e.onKeyDown,i=>{if(["Home","End",...hw].includes(i.key)){let l=o().map(f=>f.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),hw.includes(i.key)){const f=l.indexOf(i.currentTarget);l=l.slice(f+1)}setTimeout(()=>yh(l)),i.preventDefault()}})})))});function bh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function fW(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function gw(e){return e?"open":"closed"}function mw(e,t){return`${e}-trigger-${t}`}function vw(e,t){return`${e}-content-${t}`}function xh(e){return t=>t.pointerType==="mouse"?e(t):void 0}const hW=Jz,pW=tW,gW=oW,mW=aW,bw=iW,vW=sW,bW=Ge(["rabbit-ds h-full w-full px-3 py-2 [&>*:first-child]:h-full"],{variants:{variant:{default:""},defaultVariant:{variant:"default"}}});function yW(){return h.jsx("div",{className:"relative h-full w-full",children:h.jsxs("div",{className:"absolute left-0 top-0 h-full w-full bg-gradient-to-b from-[#E9F5F8] via-[#F7F7F7] to-[#A1E7FC] shadow-[-4px_0px_4px_0px_rgba(0,0,0.05)_inset]",children:[h.jsx("div",{className:"absolute inset-0 h-full w-full",style:{background:"linear-gradient(180deg, rgba(231, 244, 247, 0.80) 0%, rgba(185, 239, 254, 0.80) 40%, rgba(136, 226, 252, 0.80) 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-darken",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full opacity-60 mix-blend-multiply",style:{background:"linear-gradient(89deg, #A0E7FC 0%, #A4E8FC 19%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full opacity-90 mix-blend-darken",style:{background:"linear-gradient(180deg, #AAE9FC 0%, #D7F1F8 40%, #F4FDFF 100%)",backdropFilter:"blur(4px)"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(87deg, rgba(233, 245, 248, 0.60) 0%, rgba(247, 247, 247, 0.60) 19%, rgba(247, 247, 247, 0.60) 38%, rgba(161, 231, 252, 0.60) 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}})]})})}const yw=u.forwardRef(({className:e,children:t,...n},r)=>h.jsxs("div",{className:"rabbit-ds relative h-screen w-20",children:[h.jsx("div",{className:"absolute h-full w-full",children:h.jsx(yW,{})}),h.jsx(hW,{className:ue(bW({className:e})),orientation:"vertical",ref:r,...n,children:h.jsx(pW,{className:"m-0 flex h-full flex-col p-0",children:t})})]}));yw.displayName="LeftNav";const wh=u.forwardRef(({children:e,asChild:t=!1,...n},r)=>{const o=t?An:"div";return h.jsx(gW,{asChild:!0,children:h.jsx(o,{ref:r,className:"rabbit-ds",...n,children:e})})});wh.displayName="LeftNavItem",wh.defaultProps={asChild:!1};const xW=Ge(["inline-flex w-full flex-col items-center justify-start gap-1"],{variants:{variant:{top:"order-1 mb-auto",bottom:"order-2 mt-auto"},defaultVariant:{variant:"top"}}}),xw=u.forwardRef(({children:e,align:t,...n},r)=>h.jsx("div",{ref:r,className:ue(xW({variant:t})),...n,children:e}));xw.displayName="LeftNavItem";const ww=u.forwardRef((e,t)=>h.jsx(bw,{ref:t,...e,className:"rabbit-ds z-20 flex size-14 h-14 w-14 cursor-pointer items-center justify-center rounded border-none bg-transparent focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",children:h.jsxs("svg",{className:"z-20 h-6 w-6",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("g",{clipPath:"url(#clip0_1397_29183)",children:h.jsxs("g",{clipPath:"url(#clip1_1397_29183)",filter:"url(#filter0_d_1397_29183)",children:[h.jsx("path",{d:"M22.1654 14.8101C22.1654 15.8326 21.3386 16.6614 20.3187 16.6614C19.2988 16.6614 18.472 15.8326 18.472 14.8101C18.472 13.7877 19.2988 12.9589 20.3187 12.9589C21.3386 12.9589 22.1654 13.7877 22.1654 14.8101Z",fill:"#008EF0"}),h.jsx("path",{d:"M9.50932 5.28316C9.14769 5.45665 8.74267 5.5538 8.315 5.5538C6.78513 5.5538 5.54492 4.31054 5.54492 2.7769C5.54492 1.24326 6.78513 0 8.315 0C9.84488 0 11.0851 1.24326 11.0851 2.7769C11.0851 3.20559 10.9882 3.6116 10.8151 3.9741L14.3002 7.46776C14.4528 7.42686 14.6131 7.40506 14.7785 7.40506C15.7984 7.40506 16.6253 8.2339 16.6253 9.25633C16.6253 10.2788 15.7984 11.1076 14.7785 11.1076C13.7586 11.1076 12.9318 10.2788 12.9318 9.25633C12.9318 9.09048 12.9536 8.92973 12.9944 8.77678L9.50932 5.28316Z",fill:"#008EF0"}),h.jsx("path",{d:"M5.53426 9.24775C5.53426 10.2702 4.70745 11.099 3.68754 11.099C2.66762 11.099 1.84082 10.2702 1.84082 9.24775C1.84082 8.22532 2.66762 7.39648 3.68754 7.39648C4.70745 7.39648 5.53426 8.22532 5.53426 9.24775Z",fill:"#FFC200"}),h.jsx("path",{d:"M9.99463 16.5323C9.84207 16.5732 9.68173 16.595 9.5163 16.595C8.49639 16.595 7.66958 15.7661 7.66958 14.7437C7.66958 13.7213 8.49639 12.8924 9.5163 12.8924C10.5362 12.8924 11.363 13.7213 11.363 14.7437C11.363 14.9095 11.3413 15.0703 11.3005 15.2232L14.7855 18.7169C15.1471 18.5434 15.5521 18.4462 15.9798 18.4462C17.5097 18.4462 18.7499 19.6895 18.7499 21.2231C18.7499 22.7568 17.5097 24 15.9798 24C14.4499 24 13.2097 22.7568 13.2097 21.2231C13.2097 20.7944 13.3066 20.3884 13.4797 20.0259L9.99463 16.5323Z",fill:"#FFC200"}),h.jsx("path",{d:"M11.087 20.3604C11.087 21.3828 10.2602 22.2117 9.24028 22.2117C8.22036 22.2117 7.39355 21.3828 7.39355 20.3604C7.39355 19.338 8.22036 18.5092 9.24028 18.5092C10.2602 18.5092 11.087 19.338 11.087 20.3604Z",fill:"#EC3B64"}),h.jsx("path",{d:"M24.014 8.32719C24.014 9.86083 22.7738 11.1041 21.2439 11.1041C20.8197 11.1041 20.4178 11.0085 20.0584 10.8377L16.5673 14.3374C16.6063 14.4873 16.6271 14.6445 16.6271 14.8066C16.6271 15.8291 15.8003 16.6579 14.7804 16.6579C13.7605 16.6579 12.9337 15.8291 12.9337 14.8066C12.9337 13.7842 13.7605 12.9554 14.7804 12.9554C14.9495 12.9554 15.1134 12.9782 15.269 13.0208L18.748 9.53324C18.5723 9.1685 18.4738 8.75938 18.4738 8.32719C18.4738 6.79355 19.714 5.55029 21.2439 5.55029C22.7738 5.55029 24.014 6.79355 24.014 8.32719Z",fill:"#EC3B64"}),h.jsx("path",{d:"M16.6205 3.69746C16.6205 4.71988 15.7937 5.54872 14.7737 5.54872C13.7538 5.54872 12.927 4.71988 12.927 3.69746C12.927 2.67503 13.7538 1.84619 14.7737 1.84619C15.7937 1.84619 16.6205 2.67503 16.6205 3.69746Z",fill:"#5CC461"}),h.jsx("path",{d:"M11.0803 9.25125C11.0803 10.2737 10.2535 11.1025 9.23361 11.1025C9.07191 11.1025 8.91506 11.0817 8.7656 11.0425L5.27441 14.5423C5.44482 14.9026 5.54016 15.3055 5.54016 15.7307C5.54016 17.2643 4.29995 18.5076 2.77008 18.5076C1.24021 18.5076 0 17.2643 0 15.7307C0 14.197 1.24021 12.9538 2.77008 12.9538C3.20121 12.9538 3.60934 13.0525 3.97319 13.2287L7.45222 9.74107C7.40963 9.58505 7.38689 9.42081 7.38689 9.25125C7.38689 8.22883 8.21369 7.39999 9.23361 7.39999C10.2535 7.39999 11.0803 8.22883 11.0803 9.25125Z",fill:"#5CC461"})]})}),h.jsxs("defs",{children:[h.jsxs("filter",{id:"filter0_d_1397_29183",x:"-8",y:"-6",width:"40",height:"40",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[h.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),h.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),h.jsx("feOffset",{dy:"2"}),h.jsx("feGaussianBlur",{stdDeviation:"4"}),h.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),h.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),h.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1397_29183"}),h.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1397_29183",result:"shape"})]}),h.jsx("clipPath",{id:"clip0_1397_29183",children:h.jsx("rect",{width:"24",height:"24",rx:"8",fill:"white"})}),h.jsx("clipPath",{id:"clip1_1397_29183",children:h.jsx("rect",{width:"24",height:"24",fill:"white"})})]})]})}));ww.displayName="LeftNavHome";const wW=Ge(["rabbit-ds relative flex h-14 w-14 items-center justify-center rounded-lg font-sans text-[10px] text-font-secondary transition-colors disabled:pointer-events-none","hover:bg-card-bg-hover hover:font-semibold hover:text-primary-hover","focus:bg-card-bg-focus focus:font-semibold focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","active:bg-card-bg-focus active:font-semibold active:text-primary-focus","is-active:bg-card-bg-focus is-active:font-semibold is-active:text-primary-focus"],{variants:{variant:{default:"",withNotification:"",withMenu:"",gradient:""}},defaultVariants:{variant:"default"}}),AW=Ge("",{variants:{variant:{default:"",gradient:"bg-[linear-gradient(90deg,#038EEF_9.05%,#ED3C65_86.39%)] text-transparent [-webkit-background-clip:text] [background-clip:text]"}},defaultVariants:{variant:"default"}}),Aw=u.forwardRef(({className:e,variant:t,badgeText:n,icon:r,iconSize:o,isActive:a=!1,children:i,...s},l)=>h.jsx("div",{className:"rabbit-ds",children:h.jsxs(bw,{"data-deer-btn":!0,className:ue(wW({variant:t,className:e})),ref:l,"data-active":a,...s,children:[h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"relative flex items-center justify-center",children:[h.jsx(Oe,{IconSVG:r,size:"large"}),t==="withNotification"&&h.jsxs("div",{className:"absolute left-3 flex h-5 w-6 items-center justify-center rounded-xl bg-functional-warn px-2 text-xs text-white",children:[h.jsx("span",{className:"sr-only",children:"Notification"}),n]})]}),h.jsx("div",{className:ue(AW({variant:t==="gradient"?t:"default"}),"text-xs"),children:i})]}),t==="withMenu"&&h.jsx("div",{className:"absolute right-0 flex h-14 w-3 items-center justify-center",children:h.jsx(Oe,{IconSVG:Uh,size:"large"})})]})}));Aw.displayName="LeftNavButton";const CW=Ge("cursor-pointer border border-solid border-[#CFD7DF] bg-[#F5F7F9] px-1 py-[2px] text-primary transition-all hover:border-primary-hover hover:bg-primary-hover hover:text-white",{variants:{variant:{default:"rounded-l-full border-r-0",collapsed:"rounded-r-full border-l-0"}},defaultVariants:{variant:"default"}});function SW({className:e,isCollapsed:t,...n}){return h.jsx("button",{"data-deer-btn":!0,type:"button",className:ue(CW({variant:t?"collapsed":"default"}),e),...n,children:h.jsx(Oe,{IconSVG:Yh,className:t?"rotate-180":""})})}const Cw=u.createContext({isOpen:!1,toggleOpen:()=>{}}),EW=()=>u.useContext(Cw);function Sw({...e}){const{isOpen:t,toggleOpen:n}=EW();return h.jsx(SW,{className:`absolute right-0 top-5 z-20 ${t?"":"translate-x-full"}`,isCollapsed:!t,onClick:n,...e})}function MW(e){const{children:t,defaultOpen:n=!1}=e,r=e.open!==void 0,[o,a]=u.useState(n),i=u.useCallback(()=>{a(d=>!d)},[]),s=r?e.open:o,l=r?e.onToggle:i,c=u.useMemo(()=>({isOpen:s,toggleOpen:l}),[s,l]);return h.jsx(Cw.Provider,{value:c,children:h.jsxs("div",{className:ue("rabbit-ds relative h-screen transition-all",s?"w-full":"w-0","shadow-[-8px_-2px_8px_0px_rgba(0,0,0,0.08)_inset]"),style:{background:"linear-gradient(273deg, #E7EFF1 0%, #EEF5F8 11%, #EFFAFE 100%)"},children:[h.jsx(Sw,{}),h.jsx("div",{className:s?"h-full p-5":"invisible h-0 w-0 scale-0 overflow-hidden opacity-0",children:t})]})})}function $W({children:e}){return h.jsx("div",{className:ue("nav-group flex flex-col gap-1","after:h-[1px] after:bg-accent after:w-full after:my-4 last:after:hidden"),children:e})}function TW({children:e}){return h.jsx("div",{className:"p-2 text-xs font-semibold text-font-secondary",children:e})}function PW({children:e,...t}){return h.jsx(em,{...t,children:e})}const kW=Ge("shrink-0",{variants:{orientation:{horizontal:"ml-2",vertical:"mt-2 w-full [&>div]:w-full [&_button]:w-full"}},defaultVariants:{orientation:"horizontal"}});function NW({className:e,orientation:t,...n}){return h.jsx("div",{className:kW({orientation:t}),children:h.jsx(Lt,{className:e,variant:"outline",...n})})}const OW={ON_TRACK:{label:"On-track",colorScheme:"tag-green"},OFF_TRACK:{label:"Off-track",colorScheme:"tag-yellow"},AT_RISK:{label:"At-risk",colorScheme:"tag-red"},CLOSED:{label:"Closed",colorScheme:"tag-darkGray"},NOT_STARTED:{label:"Not started",colorScheme:"tag-lightGray"}};function DW({title:e,achieved:t,status:n}){const r=OW[n];return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[h.jsx("div",{className:"mt-1 text-sm",children:e}),h.jsxs("div",{className:"mt-[14px] flex items-end gap-[18px]",children:[h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"text-xs text-font-secondary",children:"Achieved"}),h.jsxs("span",{className:ue(r.colorScheme,"font-semibold text-2xl !bg-transparent"),children:[t,"%"]})]}),h.jsx(Ji,{colorScheme:r.colorScheme,className:"mb-1",children:r.label})]})]})})}function _W({employeeName:e,employeeProfilePhoto:t,reviewCycleName:n,reviewType:r,dueBy:o}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:"Avatar"})}),h.jsxs("div",{className:"flex flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx(Ji,{className:"mt-0.5",variant:"outlined",children:r}),h.jsx("span",{className:"mt-1.5 text-font-secondary",children:n}),h.jsxs("span",{className:"text-font-secondary",children:["Due by ",o]})]})]})})}function IW({employeeName:e,employeeProfilePhoto:t,designation:n}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:"Avatar"})}),h.jsxs("div",{className:"flex flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx("span",{className:"text-font-secondary",children:n})]})]})})}function LW({employeeName:e,employeeProfilePhoto:t,designation:n,requestReason:r}){return h.jsx("div",{className:"rabbit-ds mr-auto w-[60%]",children:h.jsxs("div",{className:"flex w-full gap-2",children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:"Avatar"})}),h.jsxs("div",{className:"flex w-full flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx(Ji,{variant:"outlined",children:n}),h.jsx("span",{className:"mt-1 w-full truncate text-font-secondary",children:r})]})]})})}const FW=Ge("",{variants:{orientation:{horizontal:"flex-row",vertical:"min-w-max flex-col"}},defaultVariants:{orientation:"horizontal"}});function BW({className:e,children:t,orientation:n}){return h.jsx("div",{className:ue("rabbit-ds","w-full flex items-center rounded-lg p-4 bg-[#FDFDFD] border border-solid border-[#F3F5F8]",FW({orientation:n}),e),children:t})}function zW({nudgeCardList:e,title:t,imgSrc:n,description:r,pageSize:o=3,kebabMenu:a}){const[i,s]=u.useState(1),l=e.slice(0,o*i),c=e.length>o,d=e.length===l.length,f=()=>{s(p=>d?1:p+1)};return h.jsxs("div",{className:ue("rabbit-ds","w-full flex flex-col items-start rounded-lg px-4 py-3 gap-[7px] bg-white shadow-[0px_0px_2px_0px_rgba(0,0,0,0.24)]"),children:[h.jsxs("div",{className:"flex w-full items-center justify-between",children:[h.jsx("span",{className:"text-sm font-semibold",children:t}),a]}),h.jsxs("div",{className:"mt-1 flex items-center gap-4",children:[n?h.jsx(hn,{className:"h-16 w-16",children:h.jsx(pn,{src:n,alt:t})}):null,h.jsx("span",{className:"text-sm",children:r})]}),l,c&&h.jsx("div",{className:"mx-auto",children:h.jsxs(Lt,{variant:"text",onClick:f,iconRight:d?Vh:zo,children:["View ",d?"less":"more"]})})]})}function WW({surveyName:e,date:t}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Oe,{IconSVG:Kh}),h.jsxs("div",{className:"flex flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx(xc,{date:t,showRelativeTime:!0})]})]})})}const jW=Ge("",{variants:{variant:{single:"flex-row [&>div]:items-start",multiple:"flex-col"}},defaultVariants:{variant:"single"}});function Ew({employeeName:e,employeeProfilePhoto:t,scheduleDate:n,duration:r,variant:o,subTitle:a}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:ue("flex items-center text-sm gap-2",jW({variant:o})),children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:e})}),h.jsxs("div",{className:"flex flex-col items-center gap-1",children:[h.jsx("span",{className:"font-semibold",children:e}),n?h.jsx(xc,{date:n,duration:r,timeFormat:"HH:mm a",showTime:!0,className:"text-font-secondary"}):h.jsx("span",{className:"font-semibold",style:{color:"#C62C02"},children:a})]})]})})}Ew.defaultProps={subTitle:void 0,scheduleDate:void 0};function VW({label:e,onClick:t,customCompProps:n}){const[r,o]=u.useState(1);return h.jsxs(Hc,{children:[h.jsx(Vi,{children:h.jsx("span",{children:e})}),h.jsx(Vc,{children:h.jsx(Hi,{children:h.jsx(eo,{children:h.jsxs("div",{className:"flex flex-col p-2",children:[h.jsx(r0,{htmlFor:n==null?void 0:n.label,className:"text-xs",children:n==null?void 0:n.label}),h.jsx(e0,{id:n==null?void 0:n.label,className:"mt-2 !min-w-[160px]",type:"number",value:r,onChange:a=>o(a.target.valueAsNumber),min:1}),h.jsx("div",{className:"flex justify-end",children:h.jsx(Lt,{className:"mt-2",onClick:()=>t(r),disabled:r<1||Number.isNaN(r),children:n==null?void 0:n.buttonText})})]})})})})]})}function HW({options:e}){const[t,n]=u.useState(!1),r=(o,a)=>{o(a),n(!1)};return h.jsxs(zi,{open:t,children:[h.jsx(Wi,{asChild:!0,onClick:()=>n(!0),children:h.jsx(Lt,{variant:"text",size:"smallIcon",children:h.jsx(Oe,{IconSVG:Gh})})}),h.jsx(Ro,{className:"w-56",onFocusOutside:()=>n(!1),onPointerDownOutside:()=>n(!1),children:h.jsx(eo,{children:e.map(({type:o,onClick:a,label:i,customCompProps:s})=>!o||o==="default"?h.jsx(ea,{onClick:()=>r(a),children:h.jsx("span",{children:i})},i):h.jsx(VW,{onClick:l=>r(a,l),label:i,customCompProps:s},i))})})]})}const Mw=ea,$w=eo,Tw=ji,Pw=Ui,kw=Yi,Nw=Gi,Ow=u.forwardRef(({className:e,children:t,align:n="end",...r},o)=>h.jsx(Ro,{ref:o,align:n,...r,children:t}));Ow.displayName="SplitButtonDropdownContent";const YW=Ge("",{variants:{size:{normal:"icon",small:"smallIcon",icon:"icon",smallIcon:"smallIcon",nav:"icon"}},defaultVariants:{size:"normal"}});function GW({children:e,size:t,status:n,variant:r,...o}){return h.jsx("div",{className:"rabbit-ds flex flex-row",children:h.jsxs(zi,{children:[h.jsx(Lt,{variant:r,status:n,size:t,...o,className:"rounded-r-none",children:e}),h.jsx(Wi,{asChild:!0,children:h.jsx(Lt,{variant:r,status:n,className:"rounded-l-none border-l-0",size:YW({size:t}),iconLeft:zo})})]})})}Mw.displayName="SplitButtonDropdownItem",$w.displayName="SplitButtonDropdownGroup",Tw.displayName="SplitButtonDropdownRadioGroup",Pw.displayName="SplitButtonDropdownLabel",kw.displayName="SplitButtonDropdownCheckboxItem",Nw.displayName="SplitButtonDropdownRadioItem",Y.Accordion=L0,Y.AccordionContent=z0,Y.AccordionItem=F0,Y.AccordionTrigger=B0,Y.Add=W3,Y.Alert=W0,Y.AlertDescription=V0,Y.AlertDialogAction=Np,Y.AlertDialogCancel=kp,Y.AlertDialogComponent=c6,Y.AlertDialogContainer=Tp,Y.AlertDialogContent=pc,Y.AlertDialogDescription=mc,Y.AlertDialogOverlay=hc,Y.AlertDialogPortal=Pp,Y.AlertDialogTitle=gc,Y.AlertDialogTrigger=Op,Y.AlertIcon=j0,Y.Avatar=hn,Y.AvatarBadge=Xi,Y.AvatarFallback=yi,Y.AvatarGroup=au,Y.AvatarImage=pn,Y.Button=Lt,Y.Caption=vc,Y.Card=xi,Y.CardContent=Vp,Y.CardDescription=jp,Y.CardHeader=zp,Y.CardKPI=sE,Y.CardTitle=Wp,Y.Carousel=fM,Y.CarouselContainer=hM,Y.CarouselNextButton=gM,Y.CarouselPrevButton=pM,Y.Check=Bo,Y.CheckCircleOutline=zh,Y.Checkbox=ei,Y.ChevronDown=zo,Y.ChevronLeft=j3,Y.ChevronLeftCircle=Wh,Y.ChevronRight=Bl,Y.ChevronRightCircle=jh,Y.ChevronUp=Vh,Y.Chip=r5,Y.ChipGroup=Yz,Y.ChipGroupItem=Gz,Y.Close=Hh,Y.CollapseNavigation=Yh,Y.Company=V3,Y.DateTime=xc,Y.DirectedLineChart=Rx,Y.DonutChart=yz,Y.Download=H3,Y.Dropdown=zi,Y.DropdownCheckboxItem=Yi,Y.DropdownContent=Ro,Y.DropdownGroup=eo,Y.DropdownItem=ea,Y.DropdownLabel=Ui,Y.DropdownPortal=Vc,Y.DropdownRadioGroup=ji,Y.DropdownRadioItem=Gi,Y.DropdownSeparator=Yc,Y.DropdownSub=Hc,Y.DropdownSubContent=Hi,Y.DropdownSubTrigger=Vi,Y.DropdownTrigger=Wi,Y.EngagementNudgeData=WW,Y.ErrorOutline=zl,Y.Goal=Y3,Y.GoalsNudgeData=DW,Y.GridChart=tw,Y.GridDirectedLineChart=Iz,Y.HistogramChart=mz,Y.Home=G3,Y.Icon=Oe,Y.InfoWorkZero=Wl,Y.Input=e0,Y.KebabMenu=Gh,Y.KnowTeamNudgeData=Ew,Y.Label=r0,Y.LeftNav=yw,Y.LeftNavButton=Aw,Y.LeftNavGroup=xw,Y.LeftNavHome=ww,Y.LeftNavItem=wh,Y.LeftNavItemContent=vW,Y.LeftNavItemDropdown=zi,Y.LeftNavItemDropdownCheckboxItem=Yi,Y.LeftNavItemDropdownContent=Ro,Y.LeftNavItemDropdownGroup=eo,Y.LeftNavItemDropdownItem=ea,Y.LeftNavItemDropdownLabel=Ui,Y.LeftNavItemDropdownPortal=Vc,Y.LeftNavItemDropdownRadioGroup=ji,Y.LeftNavItemDropdownRadioItem=Gi,Y.LeftNavItemDropdownSeparator=Yc,Y.LeftNavItemDropdownSub=Hc,Y.LeftNavItemDropdownSubContent=Hi,Y.LeftNavItemDropdownSubTrigger=Vi,Y.LeftNavItemDropdownTrigger=Wi,Y.LeftNavItemTrigger=mW,Y.LineChart=ez,Y.ListItem=em,Y.ListItemIcon=sS,Y.ListItemText=aS,Y.Manager=U3,Y.MeshLogo=Qh,Y.MeshMaven=R3,Y.Metric=Vm,Y.MetricCard=jm,Y.MetricCardText=iu,Y.MetricCardTitle=Hm,Y.MyOneOnOne=X3,Y.NavCollapseButtonL2=Sw,Y.NavGroupL2=$W,Y.NavGroupTitleL2=TW,Y.NavItemL2=PW,Y.NavL2=MW,Y.NudgeAction=NW,Y.NudgeCard=zW,Y.NudgeCardItem=BW,Y.NudgeKebabMenu=HW,Y.Overflow=Uh,Y.Person=q3,Y.ProfileCard=su,Y.ProfileCardItem=Ym,Y.ProfileCardKey=Gm,Y.ProfileCardValue=Um,Y.ProgressBar=f0,Y.ProgressInfo=aE,Y.ProgressSlider=Y5,Y.RadarChart=xz,Y.RequestFeedback=K3,Y.RequestedFeedbackNudgeData=LW,Y.ReviewsNudgeData=_W,Y.Role=Q3,Y.SankeyChart=uz,Y.Search=Xh,Y.Select=KS,Y.SelectContent=vm,Y.SelectGroup=QS,Y.SelectItem=ym,Y.SelectLabel=bm,Y.SelectSeparator=xm,Y.SelectTrigger=mm,Y.SelectValue=ZS,Y.ShareFeedback=Z3,Y.SharePraiseNudgeData=IW,Y.SliderDrag=qh,Y.SplitButton=GW,Y.SplitButtonDropdownCheckboxItem=kw,Y.SplitButtonDropdownContent=Ow,Y.SplitButtonDropdownGroup=$w,Y.SplitButtonDropdownItem=Mw,Y.SplitButtonDropdownLabel=Pw,Y.SplitButtonDropdownRadioGroup=Tw,Y.SplitButtonDropdownRadioItem=Nw,Y.StackedBarChart=Sz,Y.Survey=Kh,Y.Tabs=km,Y.TabsContent=Dm,Y.TabsList=Nm,Y.TabsTrigger=Om,Y.Tag=Ji,Y.Team=J3,Y.Toaster=oE,Y.Tooltip=tu,Y.TooltipContent=es,Y.TooltipPortal=ru,Y.TooltipProvider=eu,Y.TooltipTrigger=nu,Y.TrendingDown=e5,Y.TrendingUp=t5,Y.getInitialsFromName=Bp,Y.toast=q9,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
96
+ `}),J.appendChild(G.createTextNode(Nt))}R.timeEnd("clone node"),me==null||me(ke),pe!==!1&&ne(ke)&&(R.time("embed web font"),yield rj(ke,V),R.timeEnd("embed web font")),R.time("embed node"),Vw(ke,V);const Ie=se.length;let Le=0;const Qe=()=>v(this,null,function*(){for(;;){const Nt=se.pop();if(!Nt)break;try{yield Nt}catch(zn){Ne("Failed to run task",zn)}ge==null||ge(++Le,Ie)}});ge==null||ge(Le,Ie),yield Promise.all([...Array(4)].map(Qe)),R.timeEnd("embed node"),Me==null||Me(ke);const Ye=fj(ke,V);return ie&&Ye.insertBefore(ie,Ye.children[0]),J&&Ye.insertBefore(J,Ye.children[0]),xe&&Lw(V),Se==null||Se(Ye),Ye})}function fj(S,F){const{width:V,height:G}=F,R=mt(V,G,S.ownerDocument),se=R.ownerDocument.createElementNS(R.namespaceURI,"foreignObject");return se.setAttributeNS(null,"x","0%"),se.setAttributeNS(null,"y","0%"),se.setAttributeNS(null,"width","100%"),se.setAttributeNS(null,"height","100%"),se.append(S),R.appendChild(se),R}function Nl(S,F){return v(this,null,function*(){var V;const G=yield Wt(S,F),R=yield Hw(G),se=tt(R,G.isEnable("removeControlCharacter"));G.autoDestruct||(G.svgStyleElement=kt(G.ownerDocument),G.svgDefsElement=(V=G.ownerDocument)==null?void 0:V.createElementNS(gt,"defs"),G.svgStyles.clear());const J=Fe(se,R.ownerDocument);return yield Fn(J,G)})}function hj(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{log:G,type:R,quality:se,dpi:J}=V,ie=yield Nl(V);G.time("canvas to blob");const fe=yield un(ie,R,se);if(["image/png","image/jpeg"].includes(R)&&J){const pe=yield Ue(fe.slice(0,33));let ge=new Uint8Array(pe);return R==="image/png"?ge=M(ge,J):R==="image/jpeg"&&(ge=w(ge,J)),G.timeEnd("canvas to blob"),new Blob([ge,fe.slice(33)],{type:R})}return G.timeEnd("canvas to blob"),fe})}function Io(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{log:G,quality:R,type:se,dpi:J}=V,ie=yield Nl(V);G.time("canvas to data url");let fe=ie.toDataURL(se,R);if(["image/png","image/jpeg"].includes(se)&&J&&H&&z){const[pe,ge]=fe.split(",");let xe=0,me=!1;if(se==="image/png"){const Ye=j(ge);Ye>=0?(xe=Math.ceil((Ye+28)/3)*4,me=!0):xe=33/3*4}else se==="image/jpeg"&&(xe=18/3*4);const Me=ge.substring(0,xe),Se=ge.substring(xe),ke=window.atob(Me),Ie=new Uint8Array(ke.length);for(let Ye=0;Ye<Ie.length;Ye++)Ie[Ye]=ke.charCodeAt(Ye);const Le=se==="image/png"?M(Ie,J,me):w(Ie,J),Qe=window.btoa(String.fromCharCode(...Le));fe=[pe,",",Qe,Se].join("")}return G.timeEnd("canvas to data url"),fe})}function Yw(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{width:G,height:R,ownerDocument:se}=V,J=yield Io(V),ie=mt(G,R,se),fe=ie.ownerDocument.createElementNS(ie.namespaceURI,"image");return fe.setAttributeNS(null,"href",J),fe.setAttributeNS(null,"height","100%"),fe.setAttributeNS(null,"width","100%"),ie.appendChild(fe),tt(ie,V.isEnable("removeControlCharacter"))})}function pj(S,F){return v(this,null,function*(){const V=yield Wt(S,F),{ownerDocument:G,width:R,height:se,scale:J,type:ie}=V,fe=ie==="image/svg+xml"?yield Yw(V):yield Io(V),pe=Fe(fe,G);return pe.width=Math.floor(R*J),pe.height=Math.floor(se*J),pe.style.width=`${R}px`,pe.style.height=`${se}px`,pe})}function gj(S,F){return v(this,null,function*(){return Io(yield Wt(S,m(p({},F),{type:"image/jpeg"})))})}function mj(S,F){return v(this,null,function*(){const V=yield Wt(S,F),G=yield Nl(V);return G.getContext("2d").getImageData(0,0,G.width,G.height).data})}function vj(S,F){return v(this,null,function*(){return Io(yield Wt(S,m(p({},F),{type:"image/png"})))})}function bj(S,F){return v(this,null,function*(){return Io(yield Wt(S,m(p({},F),{type:"image/webp"})))})}n.createContext=$l,n.destroyContext=Lw,n.domToBlob=hj,n.domToCanvas=Nl,n.domToDataUrl=Io,n.domToForeignObjectSvg=Hw,n.domToImage=pj,n.domToJpeg=gj,n.domToPixel=mj,n.domToPng=vj,n.domToSvg=Yw,n.domToWebp=bj,n.loadMedia=nt,n.waitUntilLoad=xn,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(nh,nh.exports);var qB=nh.exports;const Ln=(e,t,n)=>{u.useImperativeHandle(t,()=>({download(){e.current&&qB.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},yx=[{name:"default",dark:"var(--chart-default-dark, #1565BC)",light:"var(--chart-default-light, #99D2F9)"},{name:"yellow",dark:"#8C6A00",light:"#FFDE88"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"purple",dark:"#7651BC",light:"#E7DAFF"},{name:"pink",dark:"#C01443",light:"#FAD4D4"},{name:"green",dark:"#44812F",light:"#B1E39F"},{name:"orange",dark:"#B96400",light:"#FFE7C5"},{name:"teal",dark:"#237C73",light:"#A1DFD5"},{name:"red",dark:"#C62C02",light:"#FFE1D9"}];function Je(e){return yx[e%yx.length]}const gl=(e,t)=>u.Children.map(e,n=>u.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function rh({value:e,darkColor:t,lightColor:n}){return h.jsxs("div",{className:"inline-flex items-center justify-start gap-2 px-2 py-1",children:[h.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"relative h-3 w-3 rounded-3xl border"}),h.jsx("div",{className:"flex items-start justify-start",children:h.jsx("div",{className:"text-xs font-normal leading-none text-zinc-800",children:e})})]})}function oh({label:e,value:t}){return h.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-1 py-0.5",children:[h.jsx("div",{className:" text-[10px] font-normal leading-none text-stone-500",children:e}),h.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function ah({label:e,value:t}){return h.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-2 py-0.5",children:[h.jsx("div",{className:" text-[10px] font-normal leading-none text-stone-500",children:e}),h.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function ih({nodeData:e}){const{employee:t}=e,{name:n,imageUrl:r}=t;return h.jsxs("div",{className:"inline-flex max-w-sm items-center justify-start px-2 py-0.5",children:[h.jsx(hn,{size:"md",children:h.jsx(pn,{src:r,alt:"Avatar"})}),h.jsx("div",{className:"flex items-start justify-start px-2 text-sm font-medium",children:n||"-"})]})}function _e({children:e,showSideBySide:t,tooltipTitle:n}){const r=gl(e,rh),o=gl(e,oh),a=gl(e,ah),i=gl(e,ih);return h.jsxs("div",{className:"rabbit-ds relative z-[1500] inline-flex h-auto w-auto min-w-[200px] max-w-[400px] flex-col items-start justify-start gap-2 rounded-lg bg-white p-2 shadow",children:[h.jsx("div",{className:"px-2 py-1 text-xs font-medium leading-none text-zinc-800",children:n}),a,h.jsxs("div",{className:"flex w-full flex-col items-start justify-start rounded-lg p-2",children:[t&&h.jsxs("div",{className:ue("flex w-full"),children:[o&&o[0],h.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[1]]}),!t&&h.jsx("div",{className:ue("grid w-full auto-rows-auto gap-3"),children:o})]}),r&&r.length>0?h.jsx("div",{className:"h-px w-full bg-gray-100 px-2"}):null,r,i]})}rh.displayName="Legend",oh.displayName="Item",ah.displayName="Header",ih.displayName="Footer",_e.Legend=rh,_e.Item=oh,_e.Header=ah,_e.Footer=ih,_e.defaultProps={showSideBySide:!1};function xx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Item,{label:r,value:c}),h.jsx(_e.Item,{label:o,value:d}),h.jsx(_e.Legend,{value:i,darkColor:s,lightColor:l})]})}xx.defaultProps={xValue:void 0,yValue:void 0};function KB({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=u.useContext(Dt),a=r?e.filter(i=>i.y!==null):e;return h.jsx(g2,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s,l;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))+((l=o==null?void 0:o.xScale)==null?void 0:l.bandwidth())/2},y:i=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i))}})}const QB=({x:e,y:t,datum:n,size:r})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),ZB=({x:e,y:t,datum:n})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),ml={xAccessor:e=>e.x,yAccessor:e=>e.y},wx=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Ax=10,JB=5,sh=u.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:c,yAxisUnitSymbol:d,tooltipTitle:f,mode:p,xAxisCharLimit:m,connectNulls:g=!1,maxNodesInMiniMode:v=JB,tooltipStackCharLimit:w=Ax,seriesSelectorTitle:x},y)=>{const[b,C]=u.useState(e.map(M=>M.id)),A=u.useRef(null);Ln(A,y,`${a}-${i}-LineChart`);const $=u.useMemo(()=>o.map((M,P)=>{const L=e.find(W=>W.id===M.id);return{points:M.data.map((W,j)=>({x:r[j],y:W,nodeId:M.id,color:(L==null?void 0:L.color)??Je(P)}))}}).slice(0,p==="mini"?v:o.length),[o,p,v,e,r]),k=u.useMemo(()=>p==="full"?$.filter(M=>b.includes(M.points[0].nodeId)):$,[$,b,p]),T=u.useMemo(()=>Math.floor((n-(p==="mini"?0:150))/(r.length*8)),[n,r,p]);return h.jsxs("div",{ref:A,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[h.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[h.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:h.jsxs(ur,{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:[h.jsx(N2,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),h.jsx(To,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:M=>c?wx(M,c.symbol,c.position):M,rangePadding:{end:10},tickComponent:M=>h.jsx(Ga,{textLabel:M.formattedValue||"",x:M.x,y:M.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??T}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),h.jsx(To,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:M=>d?wx(M,d.symbol,d.position):M,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((M,P)=>h.jsxs(h.Fragment,{children:[h.jsx(KB,{data:M.points,xAccessor:ml.xAccessor,yAccessor:ml.yAccessor,connectNulls:g}),h.jsx(bx,{dataKey:`Performance Management ${P}`,data:M.points,size:8,renderGlyph:QB,xAccessor:ml.xAccessor,yAccessor:ml.yAccessor})]})),h.jsx(al,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:ZB,renderTooltip:({tooltipData:M})=>{var W,j,B,E,_,H;const P=e.find(z=>{var O;return z.id===((O=M==null?void 0:M.nearestDatum)==null?void 0:O.datum.nodeId)}),L=((W=M==null?void 0:M.nearestDatum)==null?void 0:W.datum)&&((j=M==null?void 0:M.nearestDatum)==null?void 0:j.datum.x.length)<w;return h.jsx(xx,{xValue:(B=M==null?void 0:M.nearestDatum)==null?void 0:B.datum.x,yValue:(E=M==null?void 0:M.nearestDatum)==null?void 0:E.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!L,tooltipTitle:f,legendValue:(P==null?void 0:P.name)||"",legendDarkColor:((_=M==null?void 0:M.nearestDatum)==null?void 0:_.datum.color.dark)||Je(0).dark,legendLightColor:((H=M==null?void 0:M.nearestDatum)==null?void 0:H.datum.color.light)||Je(0).light})}})]})}),p==="full"&&h.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[h.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[h.jsx("span",{className:"pr-1",children:x??a}),"(",k.length??0,"/",$.length,")"]}),h.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:$.map(M=>{const P=e.find(L=>L.id===M.points[0].nodeId);return P&&h.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-full border"}),P.name]}),h.jsx("div",{className:"flex items-center",children:h.jsx(ei,{checked:b.includes(P.id),onCheckedChange:L=>{let W=[...b];L?W=[...b,P.id]:W.splice(b.indexOf(P.id),1),C(W)}})})]},P.id)})})]})]}),p==="mini"&&h.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-font-secondary",children:$.map(M=>{const P=e.find(L=>L.id===M.points[0].nodeId);return h.jsxs("div",{className:"flex items-center justify-center gap-1",children:[h.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),P==null?void 0:P.name]},P==null?void 0:P.id)})})]})}),RB={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Ax,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};sh.defaultProps=RB,sh.displayName="LineBase";const Cx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(sh,{ref:t,width:n,height:r,...e})}));Cx.displayName="LineChart";const ez=Cx;function Sx(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 tz(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 lh(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 nz(e,t){return e.sourceLinks.length?e.depth:t-1}function vl(e){return function(){return e}}function Ex(e,t){return bl(e.source,t.source)||e.index-t.index}function Mx(e,t){return bl(e.target,t.target)||e.index-t.index}function bl(e,t){return e.y0-t.y0}function ch(e){return e.value}function rz(e){return e.index}function oz(e){return e.nodes}function az(e){return e.links}function $x(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function Tx({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 iz(){let e=0,t=0,n=1,r=1,o=24,a=8,i,s=rz,l=nz,c,d,f=oz,p=az,m=6;function g(){const E={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return v(E),w(E),x(E),y(E),A(E),Tx(E),E}g.update=function(E){return Tx(E),E},g.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:vl(E),g):s},g.nodeAlign=function(E){return arguments.length?(l=typeof E=="function"?E:vl(E),g):l},g.nodeSort=function(E){return arguments.length?(c=E,g):c},g.nodeWidth=function(E){return arguments.length?(o=+E,g):o},g.nodePadding=function(E){return arguments.length?(a=i=+E,g):a},g.nodes=function(E){return arguments.length?(f=typeof E=="function"?E:vl(E),g):f},g.links=function(E){return arguments.length?(p=typeof E=="function"?E:vl(E),g):p},g.linkSort=function(E){return arguments.length?(d=E,g):d},g.size=function(E){return arguments.length?(e=t=0,n=+E[0],r=+E[1],g):[n-e,r-t]},g.extent=function(E){return arguments.length?(e=+E[0][0],n=+E[1][0],t=+E[0][1],r=+E[1][1],g):[[e,t],[n,r]]},g.iterations=function(E){return arguments.length?(m=+E,g):m};function v({nodes:E,links:_}){for(const[z,O]of E.entries())O.index=z,O.sourceLinks=[],O.targetLinks=[];const H=new Map(E.map((z,O)=>[s(z,O,E),z]));for(const[z,O]of _.entries()){O.index=z;let{source:N,target:I}=O;typeof N!="object"&&(N=O.source=$x(H,N)),typeof I!="object"&&(I=O.target=$x(H,I)),N.sourceLinks.push(O),I.targetLinks.push(O)}if(d!=null)for(const{sourceLinks:z,targetLinks:O}of E)z.sort(d),O.sort(d)}function w({nodes:E}){for(const _ of E)_.value=_.fixedValue===void 0?Math.max(lh(_.sourceLinks,ch),lh(_.targetLinks,ch)):_.fixedValue}function x({nodes:E}){const _=E.length;let H=new Set(E),z=new Set,O=0;for(;H.size;){for(const N of H){N.depth=O;for(const{target:I}of N.sourceLinks)z.add(I)}if(++O>_)throw new Error("circular link");H=z,z=new Set}}function y({nodes:E}){const _=E.length;let H=new Set(E),z=new Set,O=0;for(;H.size;){for(const N of H){N.height=O;for(const{source:I}of N.targetLinks)z.add(I)}if(++O>_)throw new Error("circular link");H=z,z=new Set}}function b({nodes:E}){const _=Sx(E,O=>O.depth)+1,H=(n-e-o)/(_-1),z=new Array(_);for(const O of E){const N=Math.max(0,Math.min(_-1,Math.floor(l.call(null,O,_))));O.layer=N,O.x0=e+N*H,O.x1=O.x0+o,z[N]?z[N].push(O):z[N]=[O]}if(c)for(const O of z)O.sort(c);return z}function C(E){const _=tz(E,H=>(r-t-(H.length-1)*i)/lh(H,ch));for(const H of E){let z=t;for(const O of H){O.y0=z,O.y1=z+O.value*_,z=O.y1+i;for(const N of O.sourceLinks)N.width=N.value*_}z=(r-z+i)/(H.length+1);for(let O=0;O<H.length;++O){const N=H[O];N.y0+=z*(O+1),N.y1+=z*(O+1)}W(H)}}function A(E){const _=b(E);i=Math.min(a,(r-t)/(Sx(_,H=>H.length)-1)),C(_);for(let H=0;H<m;++H){const z=Math.pow(.99,H),O=Math.max(1-z,(H+1)/m);k(_,z,O),$(_,z,O)}}function $(E,_,H){for(let z=1,O=E.length;z<O;++z){const N=E[z];for(const I of N){let K=0,X=0;for(const{source:re,value:ne}of I.targetLinks){let Z=ne*(I.layer-re.layer);K+=j(re,I)*Z,X+=Z}if(!(X>0))continue;let ee=(K/X-I.y0)*_;I.y0+=ee,I.y1+=ee,L(I)}c===void 0&&N.sort(bl),T(N,H)}}function k(E,_,H){for(let z=E.length,O=z-2;O>=0;--O){const N=E[O];for(const I of N){let K=0,X=0;for(const{target:re,value:ne}of I.sourceLinks){let Z=ne*(re.layer-I.layer);K+=B(I,re)*Z,X+=Z}if(!(X>0))continue;let ee=(K/X-I.y0)*_;I.y0+=ee,I.y1+=ee,L(I)}c===void 0&&N.sort(bl),T(N,H)}}function T(E,_){const H=E.length>>1,z=E[H];P(E,z.y0-i,H-1,_),M(E,z.y1+i,H+1,_),P(E,r,E.length-1,_),M(E,t,0,_)}function M(E,_,H,z){for(;H<E.length;++H){const O=E[H],N=(_-O.y0)*z;N>1e-6&&(O.y0+=N,O.y1+=N),_=O.y1+i}}function P(E,_,H,z){for(;H>=0;--H){const O=E[H],N=(O.y1-_)*z;N>1e-6&&(O.y0-=N,O.y1-=N),_=O.y0-i}}function L({sourceLinks:E,targetLinks:_}){if(d===void 0){for(const{source:{sourceLinks:H}}of _)H.sort(Mx);for(const{target:{targetLinks:H}}of E)H.sort(Ex)}}function W(E){if(d===void 0)for(const{sourceLinks:_,targetLinks:H}of E)_.sort(Mx),H.sort(Ex)}function j(E,_){let H=E.y0-(E.sourceLinks.length-1)*i/2;for(const{target:z,width:O}of E.sourceLinks){if(z===_)break;H+=O+i}for(const{source:z,width:O}of _.targetLinks){if(z===E)break;H-=O}return H}function B(E,_){let H=_.y0-(_.targetLinks.length-1)*i/2;for(const{source:z,width:O}of _.targetLinks){if(z===E)break;H+=O+i}for(const{target:z,width:O}of E.sourceLinks){if(z===_)break;H-=O}return H}return g}function sz({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,l,c,d;const a=e.source,i=e.target;return h.jsxs(_e,{tooltipTitle:o,children:[h.jsx(_e.Item,{label:t,value:a.name}),h.jsx(_e.Item,{label:n,value:i.name}),h.jsx(_e.Item,{label:r,value:e.weight.toString()}),h.jsx(_e.Legend,{value:a.name,darkColor:(s=Je(a.index||0))==null?void 0:s.dark,lightColor:(l=Je(a.index||0))==null?void 0:l.light}),h.jsx(_e.Legend,{value:i.name,darkColor:(c=Je(i.index||0))==null?void 0:c.dark,lightColor:(d=Je(i.index||0))==null?void 0:d.light})]})}const Px=80,kx=20,lz=30,cz=12,Nx=u.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:a,weightLabel:i},s)=>{const l=u.useMemo(()=>iz().nodeId(E=>E.id).nodeWidth(cz).nodePadding(lz).nodeAlign(E=>E.group),[]),c=u.useRef(null);Ln(c,s,`${n}-SankeyChart`);const[d,f]=u.useState(""),[p,m]=u.useState(null),{tooltipData:g,tooltipLeft:v,tooltipTop:w,tooltipOpen:x,showTooltip:y,hideTooltip:b}=tl(),{containerBounds:C,containerRef:A,TooltipInPortal:$}=ol({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),k=u.useMemo(()=>l.extent([[Px,kx],[t-Px,e-kx-50]])({nodes:r,links:o.map(E=>({...E,value:Number(E.weight)}))}),[e,t,l,r,o]),T=u.useMemo(()=>Math.max(...k.nodes.map(E=>E.depth??0)),[k]),M=u.useMemo(()=>{const E={};let _=-1/0;return k.nodes.forEach(H=>{const{group:z}=H;E[z]?(E[z].x=Math.max(E[z].x??-1/0,H.x0??-1/0),E[z].y=Math.max(E[z].y??-1/0,H.y1??-1/0)):(E[z]={},E[z].x=H.x0,E[z].y=H.y1),_=Math.max(_,E[z].y??-1/0),E[z].y=_}),Object.keys(E).forEach(H=>{E[H].y=_}),E},[k]),P=u.useCallback(E=>{const _=l.nodeId()(E);f(d===_?"":_)},[d,l]),L=u.useCallback(()=>{f(""),m(null)},[]),W=u.useMemo(()=>d===""&&p===null?new Set:new Set(k.links.filter(E=>l.nodeId()(E.source)===d||l.nodeId()(E.target)===d||(p==null?void 0:p.source)===E.source&&(p==null?void 0:p.target)===E.target)),[d,k,p,l]),j=u.useCallback((E,_)=>{const H=("clientX"in E?E.clientX:0)-C.left,z=("clientY"in E?E.clientY:0)-C.top;m(_),H&&z&&y({tooltipLeft:H,tooltipTop:z,tooltipData:_})},[y,C]),B=u.useCallback(()=>{L(),b()},[L,b]);return h.jsxs("div",{ref:c,className:"rabbit-ds h-min w-min bg-white",id:"sankey-chart",children:[h.jsxs("svg",{height:e,width:t,ref:A,children:[h.jsx("g",{children:k.links.map(E=>h.jsx(YI,{data:E,source:_=>({x:_.source.x1,y:_.y0}),target:_=>({x:_.target.x0,y:_.y1}),x:_=>_.x??0,y:_=>_.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>B(),onMouseMove:_=>j(_,E),stroke:Je(E.source.index||0).light,strokeWidth:E.width,strokeOpacity:W.has(E)?.7:.4},E.index))}),h.jsx("g",{children:k.nodes.map(E=>{var _,H,z;return h.jsx("g",{children:h.jsx(m2,{x:E.x0??0,height:(E.y1??0)-(E.y0??0)+10,width:(E.x1??0)-(E.x0??0),y:(E.y0??0)-5,onMouseEnter:()=>P(E),onMouseLeave:()=>L(),radius:2,fill:d===E.id?(_=Je(E.index||0))==null?void 0:_.dark:(H=Je(E.index||0))==null?void 0:H.light,stroke:(z=Je(E.index||0))==null?void 0:z.dark,all:!0})},E.index)})}),h.jsx("g",{children:a.map(E=>h.jsx(Ga,{axisCharLimit:20,x:M[E.id].x??0,y:(M[E.id].y??0)+40,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:"middle",fill:"#666666"}},E.id))}),h.jsxs("g",{children:[k.nodes.map(E=>h.jsx(Ga,{axisCharLimit:8,x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2,textLabel:E.name,textStyles:{fontSize:10,fontWeight:600,textAnchor:E.depth===T?"start":"end",fill:"#666666"}},E.index)),k.nodes.map(E=>E.value&&h.jsx(go,{x:E.depth===T?(E.x1??0)+10:(E.x0??0)-10,y:(E.y0??0)+((E.y1??0)-(E.y0??0))/2+16,style:{fontSize:10,fontWeight:400,textAnchor:E.depth===T?"start":"end",fill:"#666666"},children:`(${E.value.toString()})`},E.index))]})]}),x&&g&&h.jsx($,{top:w,left:v,unstyled:!0,applyPositionStyle:!0,children:h.jsx(sz,{tooltipData:g,fromLabel:`From: ${a[g.source.group].name}`,toLabel:`To: ${a[g.target.group].name}`,weightLabel:i,tooltipTitle:n})},Math.random())]})});Nx.displayName="Sankey";const Ox=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>n&&r&&h.jsx(Nx,{ref:t,width:n,height:r,...e})}));Ox.displayName="SankeyChart";const uz=Ox;function dz(e){return"bandwidth"in e?e.bandwidth():0}var fz=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function uh(){return uh=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},uh.apply(this,arguments)}function hz(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Dx(e){var t=e.top,n=t===void 0?0:t,r=e.left,o=r===void 0?0:r,a=e.scale,i=e.width,s=e.stroke,l=s===void 0?"#eaf0f6":s,c=e.strokeWidth,d=c===void 0?1:c,f=e.strokeDasharray,p=e.className,m=e.children,g=e.numTicks,v=g===void 0?10:g,w=e.lineStyle,x=e.offset,y=e.tickValues,b=hz(e,fz),C=y??Jd(a,v),A=(x??0)+dz(a)/2,$=C.map(function(k,T){var M,P=((M=Us(a(k)))!=null?M:0)+A;return{index:T,from:new Pn({x:0,y:P}),to:new Pn({x:i,y:P})}});return u.createElement(tn,{className:lt("visx-rows",p),top:n,left:o},m?m({lines:$}):$.map(function(k){var T=k.from,M=k.to,P=k.index;return u.createElement(QI,uh({key:"row-line-"+P,from:T,to:M,stroke:l,strokeWidth:d,strokeDasharray:f,style:w},b))}))}Dx.propTypes={tickValues:te.array,width:te.number.isRequired};function _x({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:a,legendDarkColor:i,legendLightColor:s}){const l=e==null?void 0:e.toString(),c=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:!0,children:[h.jsx(_e.Item,{label:r,value:l}),h.jsx(_e.Item,{label:o,value:c}),h.jsx(_e.Legend,{value:a,darkColor:i,lightColor:s})]})}_x.defaultProps={xValue:void 0,yValue:void 0};const Ix=20,Lx=50,dh=80,yl=50,pz=10,gz=25,fh=u.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:a,width:i,height:s,maxBinCount:l=gz,minBinCount:c=pz,integerBins:d=!1,integerYAxis:f=!1},p)=>{const m=u.useMemo(()=>Cs(a),[a]),{histogramDomain:g,threshold:v,thresholdInteger:w}=u.useMemo(()=>{const O=m[0]??0,N=O===m[1]?c+O:m[1]??0,I=N-O>c?N:c+O,K=Math.min(Math.max(N-O,c),l),X=Math.floor(m[0]??0),ee=Math.ceil(I);return{histogramDomain:r||(d?[X,ee]:[O,N]),threshold:K,thresholdInteger:Math.ceil(K)}},[m,r,d,l,c]),x=u.useMemo(()=>$o({domain:g,range:[yl,i-Lx],round:!0,nice:!0}),[g,i]),y=u.useMemo(()=>tO().domain(x.domain()).thresholds(o||(d?w:v))(a),[x,o,a,v,w,d]),b=u.useMemo(()=>$o({domain:[0,dd(y,O=>O.length)??0],range:[s-dh,Ix],round:!0,nice:!0}),[y,s]),C=u.useMemo(()=>b.ticks().filter(O=>f?Number.isInteger(O):O),[f,b]),A=u.useRef(null);Ln(A,p,`${t}-${n}-Histogram`);const{tooltipData:$,tooltipLeft:k,tooltipTop:T,tooltipOpen:M,showTooltip:P,hideTooltip:L}=tl(),{containerBounds:W,containerRef:j,TooltipInPortal:B}=ol({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=i-yl-Lx,_=s-Ix-dh-100,H=u.useCallback((O,N)=>{const I=("clientX"in O?O.clientX:0)-W.left,K=("clientY"in O?O.clientY:0)-W.top;I&&K&&P({tooltipLeft:I,tooltipTop:K,tooltipData:N})},[P,W]),z=u.useCallback(()=>{L()},[L]);return h.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:i,height:s},ref:A,children:[h.jsxs("svg",{width:i,height:s,ref:j,children:[h.jsx(gf,{orientation:"bottom",scale:x,top:s-dh,hideTicks:!0,numTicks:6,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"}}),h.jsx(gf,{orientation:"left",scale:b,left:yl,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:f?Vs("d"):void 0,tickValues:C,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"}}),h.jsxs(tn,{children:[h.jsx(Dx,{scale:b,width:E,height:_,left:yl,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),y.map(O=>{const N=Math.abs(b(0)-b(O.length)),I=Math.abs(x(O.x1??0)-x(O.x0??0));return h.jsx("g",{children:h.jsx(DI,{x:x(O.x0??0),y:b(O.length),width:I,height:N&&N-1,fill:Je(0).light,stroke:Je(0).dark,strokeWidth:1,onMouseMove:K=>H(K,O),onMouseLeave:()=>z()})},Math.random())})]})]}),M&&$&&h.jsx(B,{top:T,left:k,unstyled:!0,applyPositionStyle:!0,children:h.jsx(_x,{xAxisLabel:t,xValue:`${$.x0} to ${$.x1}`,yAxisLabel:n,yValue:$.length,tooltipTitle:e,legendValue:n,legendDarkColor:Je(0).dark,legendLightColor:Je(0).light})},Math.random()),b.domain()[2]]})}),Fx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(fh,{ref:t,width:n,height:r,...e})}));fh.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},fh.displayName="HistogramBase",Fx.displayName="HistogramChart";const mz=Fx,vz=e=>e.value,bz=e=>e.label,Bx=u.forwardRef(({width:e,height:t,unit:n="%",data:r},o)=>{const a=e/2,i=t/2,s=Math.min(e-200,t-20)/2,l=u.useRef(null);return Ln(l,o,"DonutChart"),h.jsx("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:l,children:h.jsx("svg",{width:e,height:t,className:"rabbit-ds",children:h.jsx(tn,{top:i,left:a,children:h.jsx(MI,{data:r,pieValue:vz,outerRadius:s-10,innerRadius:s-22-10,cornerRadius:2,padAngle:.025,children:c=>h.jsx(h.Fragment,{children:c.arcs.map(d=>{const[f,p]=c.path.centroid(d),m=bz(d.data),g=d.startAngle+(d.endAngle-d.startAngle)/2;return h.jsxs("g",{children:[h.jsx("path",{d:c.path(d)??void 0,fill:d.data.color}),h.jsxs(F1,{x:f,y:p,dx:g>Math.PI?-30:30,dy:-20,children:[h.jsx(h1,{type:"elbow",stroke:d.data.labelColor}),h.jsx(L1,{radius:1,strokeWidth:2,stroke:d.data.labelColor}),h.jsx(I1,{title:`${m}: ${d.value} ${n}`,maxWidth:100,backgroundFill:"transparent",backgroundPadding:{left:4,right:10},titleFontSize:10,horizontalAnchor:g>Math.PI?"end":"start",verticalAnchor:"middle",fontColor:d.data.labelColor,showAnchorLine:!1})]})]},`arc-${m}`)})})})})})})});Bx.displayName="DonutChartBase";const zx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(Bx,{ref:t,width:n,height:r,...e})}));zx.displayName="DonutChart";const yz=zx;function Wx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Item,{label:r,value:c}),h.jsx(_e.Item,{label:o,value:d}),h.jsx(_e.Legend,{value:i,darkColor:s,lightColor:l})]})}Wx.defaultProps={xValue:void 0,yValue:void 0};const xl={top:60,left:20,right:20,bottom:20},jx={start:10,end:-10,middle:0},Vx=u.forwardRef(({width:e,height:t,levels:n=5,nodes:r,xAxisLabel:o,xAxisCharLimit:a,tooltipTitle:i,xAxisUnitSymbol:s,yAxisDomain:l,series:c=[],xAxisValues:d},f)=>{const p=u.useRef(null);Ln(p,f,"RadarChart");const{tooltipData:m,tooltipLeft:g,tooltipTop:v,tooltipOpen:w,showTooltip:x,hideTooltip:y}=tl(),{containerBounds:b,containerRef:C,TooltipInPortal:A}=ol({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),$=u.useCallback((N,I)=>{const K=Math.PI*2/N;return[...new Array(N)].map((X,ee)=>({x:I*Math.sin(ee*K),y:I*Math.cos(ee*K)}))},[]),k=u.useCallback((N,I,K)=>K==="pre"?`${I}${N}`:`${N}${I}`,[]),T=u.useCallback((N,I,K)=>{const X=Math.PI*2/N.length,ee=new Array(N.length).fill({x:0,y:0,data:null}),re=new Array(N.length+1).fill("").reduce((ne,Z,oe)=>{if(oe>N.length)return ne;const U=I(K(N[oe-1]))*Math.sin(oe*X),Q=I(K(N[oe-1]))*Math.cos(oe*X);return ee[oe-1]={x:U,y:Q,data:N[oe-1]},`${ne}${U},${Q} `});return{points:ee,pointString:re}},[]),M=u.useMemo(()=>new Pn({x:0,y:0}),[]),P=u.useCallback(N=>Math.round(N)===0?"middle":N>0?"start":"end",[]),L=u.useCallback((N,I)=>{const K=("clientX"in N?N.clientX:0)-b.left,X=("clientY"in N?N.clientY:0)-b.top;K&&X&&x({tooltipLeft:K,tooltipTop:X,tooltipData:I})},[x,b]),W=u.useCallback(()=>{y()},[y]),j=u.useMemo(()=>e-xl.left-xl.right,[e]),B=u.useMemo(()=>t-xl.top-xl.bottom,[t]),E=u.useMemo(()=>Math.min(j,B)/2,[j,B]),_=c.length?c.reduce((N,I)=>{const K=I.data.filter(X=>X);return Math.max(N,...K)},-1/0):0,H=$o({range:[0,E],domain:l??[0,_]}),z=$(d.length,E),O=N=>T(N,I=>H(I)??0,I=>I);return h.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:p,children:[h.jsxs("svg",{width:e,height:t,ref:C,pointerEvents:"all",onMouseLeave:W,children:[h.jsx("rect",{fill:"transparent",width:e,height:t,rx:14}),h.jsxs(tn,{top:t/2,left:e/2,children:[[...new Array(n)].map((N,I)=>h.jsx(v2,{x:e/2,y:t/2,fill:"none",stroke:"#CFD7DF",strokeWidth:1,strokeDasharray:4,r:E*(I+1)/n},`web1-${Math.random()}`)),d.map((N,I)=>h.jsxs(h.Fragment,{children:[h.jsx(nf,{from:M,to:z[I],stroke:"#CFD7DF",strokeWidth:1},`radar-line-${Math.random()}`),h.jsx(go,{x:z[I].x,y:z[I].y,textAnchor:P(z[I].x),verticalAnchor:P(z[I].y),dx:jx[P(z[I].x)],dy:jx[P(z[I].y)],fontSize:10,fill:"#666666",width:a??100,children:`${s?k(d[(I+d.length-1)%d.length],s.symbol,s.position):d[(I+d.length-1)%d.length]}`})]})),c.map((N,I)=>h.jsx("polygon",{points:O(N.data).pointString,fill:Je(I).light,fillOpacity:.2,stroke:Je(I).dark,strokeWidth:1},`polypath-${Math.random()}`)),c.map((N,I)=>O(N.data).points.map((K,X)=>h.jsx(v2,{cx:K.x,cy:K.y,r:5,fill:"transparent",onMouseMove:ee=>{var re;return L(ee,{yAxisLabel:((re=r.find(ne=>ne.id===N.id))==null?void 0:re.name)??"",xAxisValue:d[X],yAxisValue:N.data[X],xAxisLabel:o??"Category",legendDarkColor:Je(I).dark,legendLightColor:Je(I).light})},onMouseOut:W},`radar-point-${Math.random()}`)))]})]}),w&&m&&h.jsx(A,{top:v,left:g,unstyled:!0,applyPositionStyle:!0,children:h.jsx(Wx,{xAxisLabel:m.xAxisLabel??"",xValue:m.xAxisValue,yAxisLabel:m.yAxisLabel??"",yValue:m.yAxisValue,tooltipTitle:i,showSideBySide:!0,legendValue:m.yAxisLabel??"",legendDarkColor:m.legendDarkColor,legendLightColor:m.legendLightColor})},Math.random())]})});Vx.displayName="RadarChartBase";const Hx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(Vx,{ref:t,width:n,height:r,...e})}));Hx.displayName="RadarChart";const xz=Hx;function Yx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:l}){const c=e==null?void 0:e.toString(),d=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Item,{label:r,value:c}),h.jsx(_e.Item,{label:o,value:d}),h.jsx(_e.Legend,{value:i,darkColor:s,lightColor:l})]})}Yx.defaultProps={xValue:void 0,yValue:void 0};const wz=({x:e,y:t,datum:n})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),Gx={xAccessor:e=>e.x,yAccessor:e=>e.y},Ux=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Xx=10,Az=5,hh=u.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:l,xAxisUnitSymbol:c,yAxisUnitSymbol:d,tooltipTitle:f,mode:p,xAxisCharLimit:m,maxNodesInMiniMode:g=Az,tooltipStackCharLimit:v=Xx,seriesSelectorTitle:w},x)=>{const[y,b]=u.useState(e.map(T=>T.id)),C=u.useRef(null);Ln(C,x,`${a}-${i}-StackedBarChart`);const A=u.useMemo(()=>o.map((T,M)=>{const P=e.find(L=>L.id===T.id);return{points:T.data.map((L,W)=>({x:r[W],y:L,nodeId:T.id,color:(P==null?void 0:P.color)??Je(M)}))}}).slice(0,p==="mini"?g:o.length),[o,p,g,e,r]),$=u.useMemo(()=>p==="full"?A.filter(T=>y.includes(T.points[0].nodeId)):A,[A,y,p]),k=u.useMemo(()=>Math.floor((n-(p==="mini"?0:150))/(r.length*8)),[n,r,p]);return h.jsxs("div",{ref:C,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[h.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[h.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:h.jsxs(ur,{margin:{top:10,left:50,right:50,bottom:50},xScale:{type:"band",nice:!0,padding:.5,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...l&&{domain:l}},children:[h.jsx(N2,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),h.jsx(To,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:T=>c?Ux(T,c.symbol,c.position):T,rangePadding:{end:10},tickComponent:T=>h.jsx(Ga,{textLabel:T.formattedValue||"",x:T.x,y:T.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:m??k}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),h.jsx(To,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:T=>d?Ux(T,d.symbol,d.position):T,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"}}),h.jsx(GB,{children:$.map(T=>h.jsx(VB,{data:T.points,dataKey:T.points[0].nodeId,xAccessor:Gx.xAccessor,yAccessor:Gx.yAccessor,colorAccessor:M=>M.color.light,radiusTop:!0,radius:2},T.points[0].nodeId))}),h.jsx(al,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:wz,renderTooltip:({tooltipData:T})=>{var L,W,j,B,E,_;const M=e.find(H=>{var z;return H.id===((z=T==null?void 0:T.nearestDatum)==null?void 0:z.datum.nodeId)}),P=((L=T==null?void 0:T.nearestDatum)==null?void 0:L.datum)&&((W=T==null?void 0:T.nearestDatum)==null?void 0:W.datum.x.length)<v;return h.jsx(Yx,{xValue:(j=T==null?void 0:T.nearestDatum)==null?void 0:j.datum.x,yValue:(B=T==null?void 0:T.nearestDatum)==null?void 0:B.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!P,tooltipTitle:f,legendValue:(M==null?void 0:M.name)||"",legendDarkColor:((E=T==null?void 0:T.nearestDatum)==null?void 0:E.datum.color.dark)||Je(0).dark,legendLightColor:((_=T==null?void 0:T.nearestDatum)==null?void 0:_.datum.color.light)||Je(0).light})}})]})}),p==="full"&&h.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[h.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[h.jsx("span",{className:"pr-1",children:w??a}),"(",$.length??0,"/",A.length,")"]}),h.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:A.map(T=>{const M=e.find(P=>P.id===T.points[0].nodeId);return M&&h.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-full border"}),M.name]}),h.jsx("div",{className:"flex items-center",children:h.jsx(ei,{checked:y.includes(M.id),onCheckedChange:P=>{let L=[...y];P?L=[...y,M.id]:L.splice(y.indexOf(M.id),1),b(L)}})})]},M.id)})})]})]}),p==="mini"&&h.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-font-secondary",children:A.map(T=>{const M=e.find(P=>P.id===T.points[0].nodeId);return h.jsxs("div",{className:"flex items-center justify-center gap-1",children:[h.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"h-3 w-3 rounded-full border"}),M==null?void 0:M.name]},M==null?void 0:M.id)})})]})}),Cz={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:Xx,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};hh.defaultProps=Cz,hh.displayName="StackedBarChartBase";const qx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(hh,{ref:t,width:n,height:r,...e})}));qx.displayName="StackedBarChart";const Sz=qx,Ez=({nodes:e,selectedNodeIds:t,setSelectedNodeIds:n,seriesSelectorTitle:r})=>h.jsxs("div",{className:"rabbit-ds inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[h.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[h.jsx("span",{className:"pr-1",children:r}),"(",t.length??0,"/",e.length,")"]}),h.jsx("div",{className:"inline-flex h-[95%] w-full shrink-0 grow-0 flex-col items-start justify-start gap-1 overflow-scroll pr-4",children:e.map(({id:o,name:a,color:i})=>h.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{style:{backgroundColor:i.light,borderColor:i.dark},className:"mr-1 h-3 w-3 rounded-full border"}),a]}),h.jsx("div",{className:"flex items-center",children:h.jsx(ei,{checked:t.includes(o),onCheckedChange:s=>{let l=[...t];s?l=[...t,o]:l.splice(t.indexOf(o),1),n(l)}})})]},o))})]});function Kx({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,pointMetaData:i,seriesMetaData:s}){var d;const l=e==null?void 0:e.toString(),c=t==null?void 0:t.toString();return h.jsxs(_e,{tooltipTitle:n,showSideBySide:a,children:[h.jsx(_e.Header,{label:"Review Cycle",value:(d=i==null?void 0:i.reviewCycle)==null?void 0:d.name}),h.jsx(_e.Item,{label:r,value:l}),h.jsx(_e.Item,{label:o,value:c}),h.jsx(_e.Footer,{nodeData:s})]})}Kx.defaultProps={xValue:void 0,yValue:void 0};function Mz({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=u.useContext(Dt),a=r?e.filter(i=>i.y!==null):e;return h.jsx(h.Fragment,{children:h.jsx(g2,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))??0},y:i=>{var s;return((s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i)))??0},curve:sa,shapeRendering:"geometricPrecision"})})}const $z=({x:e,y:t,datum:n,size:r})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),Tz=({x:e,y:t,datum:n})=>h.jsx(ao,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),wl={xAccessor:e=>e==null?void 0:e.x,yAccessor:e=>e==null?void 0:e.y},Qx=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,Pz=10,kz=5,Zx=u.forwardRef(({rowsCount:e=3,nodes:t,height:n,width:r,xAxisLabel:o,yAxisLabel:a,xAxisDomain:i,yAxisDomain:s,xAxisUnitSymbol:l,yAxisUnitSymbol:c,tooltipTitle:d,mode:f="mini",xAxisCharLimit:p,connectNulls:m=!1,maxNodesInMiniMode:g=kz,tooltipStackCharLimit:v=Pz,withBackground:w=!0},x)=>{const y=u.useRef(null),b=e===1;Ln(y,x,`${o}-${a}-DirectedLineChart`);const C=u.useMemo(()=>t.map(({seriesMetaData:P},L)=>{const{employee:W}=P;return{id:W.id,name:W.name,color:Je(L)}}).slice(0,f==="mini"?g:t.length),[t,f,g]),[A,$]=u.useState(()=>C.filter((P,L)=>f==="full"||L<g).map(P=>P.id)),k=u.useMemo(()=>t.map((P,L)=>({nodeId:P.seriesMetaData.employee.id,points:P.xValues.map((W,j)=>{var E;let B=null;return b?B=1/t.length*(L+1)+1/(t.length*10)*(j+1):B=((E=P==null?void 0:P.yValues)==null?void 0:E[j])??null,{x:P.xValues[j],y:B,pointMetaData:P.pointsMetaData[j],nodeId:P.seriesMetaData.employee.id,color:Je(L)}})})).slice(0,f==="mini"?g:t.length),[t,f,g,b]),T=u.useMemo(()=>f==="full"?k.filter(({nodeId:P})=>A.includes(P)):k,[k,f,A]),M=u.useMemo(()=>Math.floor((r-(f==="mini"?0:150))/(t[0].xValues.length*8)),[r,f,t]);return h.jsx("div",{ref:y,id:"directed-line-chart",className:ue("rabbit-ds flex flex-col ",w?"bg-[white]":""),style:{width:r,height:n},children:h.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[h.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:h.jsxs(ur,{margin:{top:10,left:50,right:50,bottom:50},xScale:typeof i[0]=="string"?{type:"band",domain:i,padding:1}:{type:"linear",domain:i},yScale:typeof s[0]=="string"?{type:"band",domain:s,padding:1}:{type:"linear",domain:s},children:[h.jsx(To,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:P=>l?Qx(P,l.symbol,l.position):P,tickComponent:P=>h.jsx(Ga,{textLabel:P.formattedValue||"",x:P.x,y:P.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:p??M}),label:`${o} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),h.jsx(To,{hideTicks:!0,numTicks:b?0:6,strokeWidth:b?0:1,orientation:"left",stroke:"#CFD7DF",label:a?`${a} ➔`:"",tickFormat:P=>c?Qx(P,c.symbol,c.position):P,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"}}),T.map((P,L)=>h.jsxs(h.Fragment,{children:[h.jsx(Mz,{data:P.points,xAccessor:wl.xAccessor,yAccessor:wl.yAccessor,connectNulls:m}),h.jsx(bx,{dataKey:`Performance Management ${L}`,data:P.points,size:8,renderGlyph:$z,xAccessor:wl.xAccessor,yAccessor:wl.yAccessor})]})),h.jsx(al,{showDatumGlyph:!0,scroll:!0,showVerticalCrosshair:!0,showHorizontalCrosshair:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:Tz,renderTooltip:({tooltipData:P})=>{var j,B,E,_,H,z;const L=t.find(O=>{var N;return O.id===((N=P==null?void 0:P.nearestDatum)==null?void 0:N.datum.nodeId)}),W=((j=P==null?void 0:P.nearestDatum)==null?void 0:j.datum)&&String((B=P==null?void 0:P.nearestDatum)==null?void 0:B.datum.x).length<v;return h.jsx(Kx,{xValue:(E=P==null?void 0:P.nearestDatum)==null?void 0:E.datum.x,yValue:(_=P==null?void 0:P.nearestDatum)==null?void 0:_.datum.y,xAxisLabel:o,yAxisLabel:a,showSideBySide:!!W,tooltipTitle:d,seriesMetaData:L==null?void 0:L.seriesMetaData,pointMetaData:(z=(H=P==null?void 0:P.nearestDatum)==null?void 0:H.datum)==null?void 0:z.pointMetaData})}})]})}),f==="full"&&h.jsx(Ez,{nodes:C,seriesSelectorTitle:"Team members",selectedNodeIds:A,setSelectedNodeIds:$})]})})});Zx.displayName="LineBase";const Jx=u.forwardRef((e,t)=>h.jsx(Rn,{debounceTime:10,children:({width:n,height:r})=>h.jsx(Zx,{ref:t,width:n,height:r,...e})}));Jx.displayName="DirectedLineChart";const Rx=Jx,Nz=[{"#FFEFD4":"#AF5C20"},{"#DBF2D3":"#44812F"},{"#BFE8C6":"#1A5724"},{"#FFE7C5":"#8C6A00"},{"#FAD4D4":"#C62C02"},{"#EAEAEA":"#333333"},{"#E6F1FD":"#1565BC"},{"#FFE1D9":"#C62C02"}];function Oz({box:e,showCountData:t=!1}){function n(r){if(!r)return"#333";const o=Nz.find(a=>a[r]);return o?o[r]:r}return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("div",{className:"flex shrink grow basis-0 flex-col items-start ",children:[h.jsx("div",{className:"flex items-start gap-2.5",children:h.jsxs("span",{className:"text-3xs",style:{color:n(n(e==null?void 0:e.color))},children:[" ",e==null?void 0:e.label]})}),t&&h.jsxs("span",{className:" text-3xs text-stone-500",children:[e==null?void 0:e.count," Member",z3(e==null?void 0:e.count)]})]}),t&&h.jsx("div",{className:"flex items-start ",children:h.jsx("div",{className:"flex items-center justify-center rounded-3xl bg-neutral-50/40 px-0.5",children:h.jsxs("span",{className:" text-2xs leading-4 text-stone-500",children:[e==null?void 0:e.percentage,"%"]})})})]})}const Dz=({rows:e,columns:t,boxData:n=[]})=>{let r="";return!n||(n==null?void 0:n.length)===0||(r=n.slice(0,t).reduce((a,i)=>{var d,f,p,m;const s=e===1?"OVERALL":"PERFORMANCE",l=((f=(d=i==null?void 0:i.scoreRange)==null?void 0:d[s])==null?void 0:f.maxScore)??0,c=((m=(p=i==null?void 0:i.scoreRange)==null?void 0:p[s])==null?void 0:m.minScore)??0;return`${a} minmax(20px, ${l-c}fr)`},"")),r},_z=({rows:e,columns:t,boxData:n=[]})=>{if(e===1)return"1fr";let r="";return!n||(n==null?void 0:n.length)===0||(r=n.filter((a,i)=>i%t===0).reduce((a,i)=>{var d,f,p,m;const s="POTENTIAL",l=((f=(d=i==null?void 0:i.scoreRange)==null?void 0:d[s])==null?void 0:f.maxScore)??0,c=((m=(p=i==null?void 0:i.scoreRange)==null?void 0:p[s])==null?void 0:m.minScore)??0;return`${a} minmax(20px, ${l-c}fr)`},"")),r},ew=u.forwardRef(({rows:e=3,columns:t=3,spacing:n="1px",boxData:r=[],position:o="relative",margin:a="0",width:i="100%",left:s=0,top:l=0,mode:c="mini",showCountData:d=!1},f)=>{const p=u.useRef(null);return Ln(p,f,"GridChart"),h.jsxs("div",{ref:p,className:"flex flex-row",style:{position:o,top:l,left:s,width:i,margin:a,height:"100%"},children:[h.jsx("div",{style:{flexGrow:1,display:"grid",gridTemplateRows:_z({rows:e,columns:t,boxData:r}),gridTemplateColumns:Dz({rows:e,columns:t,boxData:r}),gap:n,height:"100%"},children:r==null?void 0:r.map((m,g)=>h.jsx("div",{style:{padding:"8px",backgroundColor:(m==null?void 0:m.color)??"#CFD7DF"},children:h.jsx(Oz,{box:m,showCountData:d})},m.label+m.color+g))}),c==="full"&&h.jsx("div",{className:"inline-flex w-64 shrink-0 grow-0"})]})});ew.displayName="GridChart";const tw=ew,nw=u.forwardRef(({directedLineChartProps:e,gridChartProps:t,mode:n="mini"},r)=>{const o=u.useRef(null);return Ln(o,r,`${e.xAxisLabel}-${e.yAxisLabel}-GridDirectedLineChart`),h.jsxs("div",{ref:o,className:"relative h-full w-full",children:[h.jsx("div",{className:"absolute mx-[50px] mb-[50px] mt-[10px] h-[calc(100%-60px)] w-[calc(100%-100px)]",children:h.jsx(tw,{...t,mode:n})}),h.jsxs("div",{className:"absolute h-full w-full",children:[h.jsx(Rx,{...e,mode:n}),h.jsx("div",{})]})]})});nw.displayName="GridDirectedLineChart";const Iz=nw,Al="ToggleGroup",[rw,xV]=ut(Al,[Rr]),ow=Rr(),Lz=u.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return u.createElement(Fz,q({},o,{ref:t}))}if(n==="multiple"){const o=r;return u.createElement(Bz,q({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Al}\``)}),[aw,iw]=rw(Al),Fz=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=vt({prop:n,defaultProp:r,onChange:o});return u.createElement(aw,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:s,onItemDeactivate:u.useCallback(()=>s(""),[s])},u.createElement(sw,q({},a,{ref:t})))}),Bz=u.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=vt({prop:n,defaultProp:r,onChange:o}),l=u.useCallback(d=>s((f=[])=>[...f,d]),[s]),c=u.useCallback(d=>s((f=[])=>f.filter(p=>p!==d)),[s]);return u.createElement(aw,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:l,onItemDeactivate:c},u.createElement(sw,q({},a,{ref:t})))}),[zz,Wz]=rw(Al),sw=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:s=!0,...l}=e,c=ow(n),d=jn(i),f={role:"group",dir:d,...l};return u.createElement(zz,{scope:n,rovingFocus:o,disabled:r},o?u.createElement(_c,q({asChild:!0},c,{orientation:a,dir:d,loop:s}),u.createElement(ve.div,q({},f,{ref:t}))):u.createElement(ve.div,q({},f,{ref:t})))}),ph="ToggleGroupItem",jz=u.forwardRef((e,t)=>{const n=iw(ph,e.__scopeToggleGroup),r=Wz(ph,e.__scopeToggleGroup),o=ow(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,s={...e,pressed:a,disabled:i},l=u.useRef(null);return r.rovingFocus?u.createElement(Ic,q({asChild:!0},o,{focusable:!i,active:a,ref:l}),u.createElement(lw,q({},s,{ref:t}))):u.createElement(lw,q({},s,{ref:t}))}),lw=u.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=iw(ph,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?i:void 0;return u.createElement(Rh,q({},s,o,{ref:t,onPressedChange:l=>{l?a.onItemActivate(r):a.onItemDeactivate(r)}}))}),Vz=Lz,Hz=jz;function Yz({children:e,...t}){return h.jsx(Vz,{className:"flex gap-2",...t,children:e})}function Gz({value:e,disabled:t,selected:n,icon:r,label:o,count:a,...i}){return h.jsx(Hz,{asChild:!0,value:e,...i,children:h.jsx("button",{"data-deer-btn":!0,type:"button",className:ue("rabbit-ds h-7 flex-col w-auto p-0 border border-solid rounded-full justify-center items-center inline-flex hover:cursor-pointer","data-[state=off]:border-gray-100 data-[state=off]:bg-gray-100 data-[state=off]:text-font-secondary","data-[state=on]:border-primary-hover data-[state=on]:bg-primary/10 data-[state=on]:text-primary-hover","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"),children:h.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 rounded-full px-4 py-1",children:[r?h.jsx(Oe,{IconSVG:r,size:"small"}):null,h.jsxs("div",{className:"text-sm font-semibold",children:[o?h.jsx("span",{children:o}):null," ",a?h.jsxs("span",{children:["(",a,")"]}):null]})]})})})}const Ua="NavigationMenu",[gh,Uz,Xz]=vr(Ua),[mh,qz,Kz]=vr(Ua),[vh,wV]=ut(Ua,[Xz,Kz]),[Qz,Br]=vh(Ua),[Zz,AV]=vh(Ua),Jz=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:l="horizontal",dir:c,...d}=e,[f,p]=u.useState(null),m=Ee(t,M=>p(M)),g=jn(c),v=u.useRef(0),w=u.useRef(0),x=u.useRef(0),[y,b]=u.useState(!0),[C="",A]=vt({prop:r,onChange:M=>{const P=M!=="",L=s>0;P?(window.clearTimeout(x.current),L&&b(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>b(!0),s)),o==null||o(M)},defaultProp:a}),$=u.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>A(""),150)},[A]),k=u.useCallback(M=>{window.clearTimeout(w.current),A(M)},[A]),T=u.useCallback(M=>{C===M?window.clearTimeout(w.current):v.current=window.setTimeout(()=>{window.clearTimeout(w.current),A(M)},i)},[C,A,i]);return u.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(w.current),window.clearTimeout(x.current)},[]),u.createElement(Rz,{scope:n,isRootMenu:!0,value:C,dir:g,orientation:l,rootNavigationMenu:f,onTriggerEnter:M=>{window.clearTimeout(v.current),y?T(M):k(M)},onTriggerLeave:()=>{window.clearTimeout(v.current),$()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:$,onItemSelect:M=>{A(P=>P===M?"":M)},onItemDismiss:()=>A("")},u.createElement(ve.nav,q({"aria-label":"Main","data-orientation":l,dir:g},d,{ref:m})))}),Rz=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:i,value:s,onItemSelect:l,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:f,onContentEnter:p,onContentLeave:m}=e,[g,v]=u.useState(null),[w,x]=u.useState(new Map),[y,b]=u.useState(null);return u.createElement(Qz,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:Qa(s),baseId:bt(),dir:o,orientation:a,viewport:g,onViewportChange:v,indicatorTrack:y,onIndicatorTrackChange:b,onTriggerEnter:ot(d),onTriggerLeave:ot(f),onContentEnter:ot(p),onContentLeave:ot(m),onItemSelect:ot(l),onItemDismiss:ot(c),onViewportContentChange:u.useCallback((C,A)=>{x($=>($.set(C,A),new Map($)))},[]),onViewportContentRemove:u.useCallback(C=>{x(A=>A.has(C)?(A.delete(C),new Map(A)):A)},[])},u.createElement(gh.Provider,{scope:t},u.createElement(Zz,{scope:t,items:w},i)))},eW="NavigationMenuList",tW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Br(eW,n),a=u.createElement(ve.ul,q({"data-orientation":o.orientation},r,{ref:t}));return u.createElement(ve.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange},u.createElement(gh.Slot,{scope:n},o.isRootMenu?u.createElement(fw,{asChild:!0},a):a))}),nW="NavigationMenuItem",[rW,cw]=vh(nW),oW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=bt(),i=r||a||"LEGACY_REACT_AUTO_VALUE",s=u.useRef(null),l=u.useRef(null),c=u.useRef(null),d=u.useRef(()=>{}),f=u.useRef(!1),p=u.useCallback((g="start")=>{if(s.current){d.current();const v=bh(s.current);v.length&&yh(g==="start"?v:v.reverse())}},[]),m=u.useCallback(()=>{if(s.current){const g=bh(s.current);g.length&&(d.current=fW(g))}},[]);return u.createElement(rW,{scope:n,value:i,triggerRef:l,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:f,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:m,onContentFocusOutside:m},u.createElement(ve.li,q({},o,{ref:t})))}),uw="NavigationMenuTrigger",aW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=Br(uw,e.__scopeNavigationMenu),i=cw(uw,e.__scopeNavigationMenu),s=u.useRef(null),l=Ee(s,i.triggerRef,t),c=mw(a.baseId,i.value),d=vw(a.baseId,i.value),f=u.useRef(!1),p=u.useRef(!1),m=i.value===a.value;return u.createElement(u.Fragment,null,u.createElement(gh.ItemSlot,{scope:n,value:i.value},u.createElement(pw,{asChild:!0},u.createElement(ve.button,q({id:c,disabled:r,"data-disabled":r?"":void 0,"data-state":gw(m),"aria-expanded":m,"aria-controls":d},o,{ref:l,onPointerEnter:de(e.onPointerEnter,()=>{p.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:de(e.onPointerMove,xh(()=>{r||p.current||i.wasEscapeCloseRef.current||f.current||(a.onTriggerEnter(i.value),f.current=!0)})),onPointerLeave:de(e.onPointerLeave,xh(()=>{r||(a.onTriggerLeave(),f.current=!1)})),onClick:de(e.onClick,()=>{a.onItemSelect(i.value),p.current=m}),onKeyDown:de(e.onKeyDown,g=>{const w={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];m&&g.key===w&&(i.onEntryKeyDown(),g.preventDefault())})})))),m&&u.createElement(u.Fragment,null,u.createElement(nm,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:g=>{const v=i.contentRef.current,w=g.relatedTarget,x=w===s.current,y=v==null?void 0:v.contains(w);(x||!y)&&i.onFocusProxyEnter(x?"start":"end")}}),a.viewport&&u.createElement("span",{"aria-owns":d})))}),dw="navigationMenu.linkSelect",iW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return u.createElement(pw,{asChild:!0},u.createElement(ve.a,q({"data-active":r?"":void 0,"aria-current":r?"page":void 0},a,{ref:t,onClick:de(e.onClick,i=>{const s=i.target,l=new CustomEvent(dw,{bubbles:!0,cancelable:!0});if(s.addEventListener(dw,c=>o==null?void 0:o(c),{once:!0}),Ja(s,l),!l.defaultPrevented&&!i.metaKey){const c=new CustomEvent(Sl,{bubbles:!0,cancelable:!0});Ja(s,c)}},{checkForDefaultPrevented:!1})})))}),Cl="NavigationMenuContent",sW=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Br(Cl,e.__scopeNavigationMenu),a=cw(Cl,e.__scopeNavigationMenu),i=Ee(a.contentRef,t),s=a.value===o.value,l={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?u.createElement(lW,q({forceMount:n},l,{ref:i})):u.createElement(Ot,{present:n||s},u.createElement(cW,q({"data-state":gw(s)},l,{ref:i,onPointerEnter:de(e.onPointerEnter,o.onContentEnter),onPointerLeave:de(e.onPointerLeave,xh(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...l.style}})))}),lW=u.forwardRef((e,t)=>{const n=Br(Cl,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return yt(()=>{r(e.value,{ref:t,...e})},[e,t,r]),yt(()=>()=>o(e.value),[e.value,o]),null}),Sl="navigationMenu.rootContentDismiss",cW=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:l,...c}=e,d=Br(Cl,n),f=u.useRef(null),p=Ee(f,t),m=mw(d.baseId,r),g=vw(d.baseId,r),v=Uz(n),w=u.useRef(null),{onItemDismiss:x}=d;u.useEffect(()=>{const b=f.current;if(d.isRootMenu&&b){const C=()=>{var A;x(),s(),b.contains(document.activeElement)&&((A=o.current)===null||A===void 0||A.focus())};return b.addEventListener(Sl,C),()=>b.removeEventListener(Sl,C)}},[d.isRootMenu,e.value,o,x,s]);const y=u.useMemo(()=>{const C=v().map(P=>P.value);d.dir==="rtl"&&C.reverse();const A=C.indexOf(d.value),$=C.indexOf(d.previousValue),k=r===d.value,T=$===C.indexOf(r);if(!k&&!T)return w.current;const M=(()=>{if(A!==$){if(k&&$!==-1)return A>$?"from-end":"from-start";if(T&&A!==-1)return A>$?"to-start":"to-end"}return null})();return w.current=M,M},[d.previousValue,d.value,d.dir,v,r]);return u.createElement(fw,{asChild:!0},u.createElement(Vo,q({id:g,"aria-labelledby":m,"data-motion":y,"data-orientation":d.orientation},c,{ref:p,onDismiss:()=>{var b;const C=new Event(Sl,{bubbles:!0,cancelable:!0});(b=f.current)===null||b===void 0||b.dispatchEvent(C)},onFocusOutside:de(e.onFocusOutside,b=>{var C;l();const A=b.target;(C=d.rootNavigationMenu)!==null&&C!==void 0&&C.contains(A)&&b.preventDefault()}),onPointerDownOutside:de(e.onPointerDownOutside,b=>{var C;const A=b.target,$=v().some(T=>{var M;return(M=T.ref.current)===null||M===void 0?void 0:M.contains(A)}),k=d.isRootMenu&&((C=d.viewport)===null||C===void 0?void 0:C.contains(A));($||k||!d.isRootMenu)&&b.preventDefault()}),onKeyDown:de(e.onKeyDown,b=>{const C=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!C){const k=bh(b.currentTarget),T=document.activeElement,M=k.findIndex(W=>W===T),L=b.shiftKey?k.slice(0,M).reverse():k.slice(M+1,k.length);if(yh(L))b.preventDefault();else{var $;($=a.current)===null||$===void 0||$.focus()}}}),onEscapeKeyDown:de(e.onEscapeKeyDown,b=>{i.current=!0})})))}),uW="FocusGroup",fw=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Br(uW,n);return u.createElement(mh.Provider,{scope:n},u.createElement(mh.Slot,{scope:n},u.createElement(ve.div,q({dir:o.dir},r,{ref:t}))))}),hw=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],dW="FocusGroupItem",pw=u.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=qz(n),a=Br(dW,n);return u.createElement(mh.ItemSlot,{scope:n},u.createElement(ve.button,q({},r,{ref:t,onKeyDown:de(e.onKeyDown,i=>{if(["Home","End",...hw].includes(i.key)){let l=o().map(f=>f.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),hw.includes(i.key)){const f=l.indexOf(i.currentTarget);l=l.slice(f+1)}setTimeout(()=>yh(l)),i.preventDefault()}})})))});function bh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function fW(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function gw(e){return e?"open":"closed"}function mw(e,t){return`${e}-trigger-${t}`}function vw(e,t){return`${e}-content-${t}`}function xh(e){return t=>t.pointerType==="mouse"?e(t):void 0}const hW=Jz,pW=tW,gW=oW,mW=aW,bw=iW,vW=sW,bW=Ge(["rabbit-ds h-full w-full px-3 py-2 [&>*:first-child]:h-full"],{variants:{variant:{default:""},defaultVariant:{variant:"default"}}});function yW(){return h.jsx("div",{className:"relative h-full w-full",children:h.jsxs("div",{className:"absolute left-0 top-0 h-full w-full bg-gradient-to-b from-[#E9F5F8] via-[#F7F7F7] to-[#A1E7FC] shadow-[-4px_0px_4px_0px_rgba(0,0,0.05)_inset]",children:[h.jsx("div",{className:"absolute inset-0 h-full w-full",style:{background:"linear-gradient(180deg, rgba(231, 244, 247, 0.80) 0%, rgba(185, 239, 254, 0.80) 40%, rgba(136, 226, 252, 0.80) 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-darken",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-2px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(180deg, #DEEAED 0%, #F6F6F6 40%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full opacity-60 mix-blend-multiply",style:{background:"linear-gradient(89deg, #A0E7FC 0%, #A4E8FC 19%, #F5F7F7 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full opacity-90 mix-blend-darken",style:{background:"linear-gradient(180deg, #AAE9FC 0%, #D7F1F8 40%, #F4FDFF 100%)",backdropFilter:"blur(4px)"}}),h.jsx("div",{className:"absolute inset-0 h-full w-full mix-blend-hard-light",style:{background:"linear-gradient(87deg, rgba(233, 245, 248, 0.60) 0%, rgba(247, 247, 247, 0.60) 19%, rgba(247, 247, 247, 0.60) 38%, rgba(161, 231, 252, 0.60) 100%)",boxShadow:"-4px 0px 4px rgba(0, 0, 0, 0.05) inset"}})]})})}const yw=u.forwardRef(({className:e,children:t,...n},r)=>h.jsxs("div",{className:"rabbit-ds relative h-screen w-20",children:[h.jsx("div",{className:"absolute h-full w-full",children:h.jsx(yW,{})}),h.jsx(hW,{className:ue(bW({className:e})),orientation:"vertical",ref:r,...n,children:h.jsx(pW,{className:"m-0 flex h-full flex-col p-0",children:t})})]}));yw.displayName="LeftNav";const wh=u.forwardRef(({children:e,asChild:t=!1,...n},r)=>{const o=t?An:"div";return h.jsx(gW,{asChild:!0,children:h.jsx(o,{ref:r,className:"rabbit-ds",...n,children:e})})});wh.displayName="LeftNavItem",wh.defaultProps={asChild:!1};const xW=Ge(["inline-flex w-full flex-col items-center justify-start gap-1"],{variants:{variant:{top:"order-1 mb-auto",bottom:"order-2 mt-auto"},defaultVariant:{variant:"top"}}}),xw=u.forwardRef(({children:e,align:t,...n},r)=>h.jsx("div",{ref:r,className:ue(xW({variant:t})),...n,children:e}));xw.displayName="LeftNavItem";const ww=u.forwardRef((e,t)=>h.jsx(bw,{ref:t,...e,className:"rabbit-ds z-20 flex size-14 h-14 w-14 cursor-pointer items-center justify-center rounded border-none bg-transparent focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",children:h.jsxs("svg",{className:"z-20 h-6 w-6",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("g",{clipPath:"url(#clip0_1397_29183)",children:h.jsxs("g",{clipPath:"url(#clip1_1397_29183)",filter:"url(#filter0_d_1397_29183)",children:[h.jsx("path",{d:"M22.1654 14.8101C22.1654 15.8326 21.3386 16.6614 20.3187 16.6614C19.2988 16.6614 18.472 15.8326 18.472 14.8101C18.472 13.7877 19.2988 12.9589 20.3187 12.9589C21.3386 12.9589 22.1654 13.7877 22.1654 14.8101Z",fill:"#008EF0"}),h.jsx("path",{d:"M9.50932 5.28316C9.14769 5.45665 8.74267 5.5538 8.315 5.5538C6.78513 5.5538 5.54492 4.31054 5.54492 2.7769C5.54492 1.24326 6.78513 0 8.315 0C9.84488 0 11.0851 1.24326 11.0851 2.7769C11.0851 3.20559 10.9882 3.6116 10.8151 3.9741L14.3002 7.46776C14.4528 7.42686 14.6131 7.40506 14.7785 7.40506C15.7984 7.40506 16.6253 8.2339 16.6253 9.25633C16.6253 10.2788 15.7984 11.1076 14.7785 11.1076C13.7586 11.1076 12.9318 10.2788 12.9318 9.25633C12.9318 9.09048 12.9536 8.92973 12.9944 8.77678L9.50932 5.28316Z",fill:"#008EF0"}),h.jsx("path",{d:"M5.53426 9.24775C5.53426 10.2702 4.70745 11.099 3.68754 11.099C2.66762 11.099 1.84082 10.2702 1.84082 9.24775C1.84082 8.22532 2.66762 7.39648 3.68754 7.39648C4.70745 7.39648 5.53426 8.22532 5.53426 9.24775Z",fill:"#FFC200"}),h.jsx("path",{d:"M9.99463 16.5323C9.84207 16.5732 9.68173 16.595 9.5163 16.595C8.49639 16.595 7.66958 15.7661 7.66958 14.7437C7.66958 13.7213 8.49639 12.8924 9.5163 12.8924C10.5362 12.8924 11.363 13.7213 11.363 14.7437C11.363 14.9095 11.3413 15.0703 11.3005 15.2232L14.7855 18.7169C15.1471 18.5434 15.5521 18.4462 15.9798 18.4462C17.5097 18.4462 18.7499 19.6895 18.7499 21.2231C18.7499 22.7568 17.5097 24 15.9798 24C14.4499 24 13.2097 22.7568 13.2097 21.2231C13.2097 20.7944 13.3066 20.3884 13.4797 20.0259L9.99463 16.5323Z",fill:"#FFC200"}),h.jsx("path",{d:"M11.087 20.3604C11.087 21.3828 10.2602 22.2117 9.24028 22.2117C8.22036 22.2117 7.39355 21.3828 7.39355 20.3604C7.39355 19.338 8.22036 18.5092 9.24028 18.5092C10.2602 18.5092 11.087 19.338 11.087 20.3604Z",fill:"#EC3B64"}),h.jsx("path",{d:"M24.014 8.32719C24.014 9.86083 22.7738 11.1041 21.2439 11.1041C20.8197 11.1041 20.4178 11.0085 20.0584 10.8377L16.5673 14.3374C16.6063 14.4873 16.6271 14.6445 16.6271 14.8066C16.6271 15.8291 15.8003 16.6579 14.7804 16.6579C13.7605 16.6579 12.9337 15.8291 12.9337 14.8066C12.9337 13.7842 13.7605 12.9554 14.7804 12.9554C14.9495 12.9554 15.1134 12.9782 15.269 13.0208L18.748 9.53324C18.5723 9.1685 18.4738 8.75938 18.4738 8.32719C18.4738 6.79355 19.714 5.55029 21.2439 5.55029C22.7738 5.55029 24.014 6.79355 24.014 8.32719Z",fill:"#EC3B64"}),h.jsx("path",{d:"M16.6205 3.69746C16.6205 4.71988 15.7937 5.54872 14.7737 5.54872C13.7538 5.54872 12.927 4.71988 12.927 3.69746C12.927 2.67503 13.7538 1.84619 14.7737 1.84619C15.7937 1.84619 16.6205 2.67503 16.6205 3.69746Z",fill:"#5CC461"}),h.jsx("path",{d:"M11.0803 9.25125C11.0803 10.2737 10.2535 11.1025 9.23361 11.1025C9.07191 11.1025 8.91506 11.0817 8.7656 11.0425L5.27441 14.5423C5.44482 14.9026 5.54016 15.3055 5.54016 15.7307C5.54016 17.2643 4.29995 18.5076 2.77008 18.5076C1.24021 18.5076 0 17.2643 0 15.7307C0 14.197 1.24021 12.9538 2.77008 12.9538C3.20121 12.9538 3.60934 13.0525 3.97319 13.2287L7.45222 9.74107C7.40963 9.58505 7.38689 9.42081 7.38689 9.25125C7.38689 8.22883 8.21369 7.39999 9.23361 7.39999C10.2535 7.39999 11.0803 8.22883 11.0803 9.25125Z",fill:"#5CC461"})]})}),h.jsxs("defs",{children:[h.jsxs("filter",{id:"filter0_d_1397_29183",x:"-8",y:"-6",width:"40",height:"40",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[h.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),h.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),h.jsx("feOffset",{dy:"2"}),h.jsx("feGaussianBlur",{stdDeviation:"4"}),h.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),h.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0"}),h.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1397_29183"}),h.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1397_29183",result:"shape"})]}),h.jsx("clipPath",{id:"clip0_1397_29183",children:h.jsx("rect",{width:"24",height:"24",rx:"8",fill:"white"})}),h.jsx("clipPath",{id:"clip1_1397_29183",children:h.jsx("rect",{width:"24",height:"24",fill:"white"})})]})]})}));ww.displayName="LeftNavHome";const wW=Ge(["rabbit-ds relative flex h-14 w-14 items-center justify-center rounded-lg font-sans text-[10px] text-font-secondary transition-colors disabled:pointer-events-none","hover:bg-card-bg-hover hover:font-semibold hover:text-primary-hover","focus:bg-card-bg-focus focus:font-semibold focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","active:bg-card-bg-focus active:font-semibold active:text-primary-focus","is-active:bg-card-bg-focus is-active:font-semibold is-active:text-primary-focus"],{variants:{variant:{default:"",withNotification:"",withMenu:"",gradient:""}},defaultVariants:{variant:"default"}}),AW=Ge("",{variants:{variant:{default:"",gradient:"bg-[linear-gradient(90deg,#038EEF_9.05%,#ED3C65_86.39%)] text-transparent [-webkit-background-clip:text] [background-clip:text]"}},defaultVariants:{variant:"default"}}),Aw=u.forwardRef(({className:e,variant:t,badgeText:n,icon:r,iconSize:o,isActive:a=!1,children:i,...s},l)=>h.jsx("div",{className:"rabbit-ds",children:h.jsxs(bw,{"data-deer-btn":!0,className:ue(wW({variant:t,className:e})),ref:l,"data-active":a,...s,children:[h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"relative flex items-center justify-center",children:[h.jsx(Oe,{IconSVG:r,size:"large"}),t==="withNotification"&&h.jsxs("div",{className:"absolute left-3 flex h-5 w-6 items-center justify-center rounded-xl bg-functional-warn px-2 text-xs text-white",children:[h.jsx("span",{className:"sr-only",children:"Notification"}),n]})]}),h.jsx("div",{className:ue(AW({variant:t==="gradient"?t:"default"}),"text-xs"),children:i})]}),t==="withMenu"&&h.jsx("div",{className:"absolute right-0 flex h-14 w-3 items-center justify-center",children:h.jsx(Oe,{IconSVG:Uh,size:"large"})})]})}));Aw.displayName="LeftNavButton";const CW=Ge("cursor-pointer border border-solid border-[#CFD7DF] bg-[#F5F7F9] px-1 py-[2px] text-primary transition-all hover:border-primary-hover hover:bg-primary-hover hover:text-white",{variants:{variant:{default:"rounded-l-full border-r-0",collapsed:"rounded-r-full border-l-0"}},defaultVariants:{variant:"default"}});function SW({className:e,isCollapsed:t,...n}){return h.jsx("button",{"data-deer-btn":!0,type:"button",className:ue(CW({variant:t?"collapsed":"default"}),e),...n,children:h.jsx(Oe,{IconSVG:Yh,className:t?"rotate-180":""})})}const Cw=u.createContext({isOpen:!1,toggleOpen:()=>{}}),EW=()=>u.useContext(Cw);function Sw({...e}){const{isOpen:t,toggleOpen:n}=EW();return h.jsx(SW,{className:`absolute right-0 top-5 z-20 ${t?"":"translate-x-full"}`,isCollapsed:!t,onClick:n,...e})}function MW(e){const{children:t,defaultOpen:n=!1}=e,r=e.open!==void 0,[o,a]=u.useState(n),i=u.useCallback(()=>{a(d=>!d)},[]),s=r?e.open:o,l=r?e.onToggle:i,c=u.useMemo(()=>({isOpen:s,toggleOpen:l}),[s,l]);return h.jsx(Cw.Provider,{value:c,children:h.jsxs("div",{className:ue("rabbit-ds relative h-screen transition-all",s?"w-full":"w-0","shadow-[-8px_-2px_8px_0px_rgba(0,0,0,0.08)_inset]"),style:{background:"linear-gradient(273deg, #E7EFF1 0%, #EEF5F8 11%, #EFFAFE 100%)"},children:[h.jsx(Sw,{}),h.jsx("div",{className:s?"h-full p-5":"invisible h-0 w-0 scale-0 overflow-hidden opacity-0",children:t})]})})}function $W({children:e}){return h.jsx("div",{className:ue("nav-group flex flex-col gap-1","after:h-[1px] after:bg-accent after:w-full after:my-4 last:after:hidden"),children:e})}function TW({children:e}){return h.jsx("div",{className:"p-2 text-xs font-semibold text-font-secondary",children:e})}function PW({children:e,...t}){return h.jsx(em,{...t,children:e})}const kW=Ge("shrink-0",{variants:{orientation:{horizontal:"ml-2",vertical:"mt-2 w-full [&>div]:w-full [&_button]:w-full"}},defaultVariants:{orientation:"horizontal"}});function NW({className:e,orientation:t,...n}){return h.jsx("div",{className:kW({orientation:t}),children:h.jsx(Lt,{className:e,variant:"outline",...n})})}const OW={ON_TRACK:{label:"On-track",colorScheme:"tag-green"},OFF_TRACK:{label:"Off-track",colorScheme:"tag-yellow"},AT_RISK:{label:"At-risk",colorScheme:"tag-red"},CLOSED:{label:"Closed",colorScheme:"tag-darkGray"},NOT_STARTED:{label:"Not started",colorScheme:"tag-lightGray"}};function DW({title:e,achieved:t,status:n}){const r=OW[n];return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex flex-col gap-1 p-2",children:[h.jsx("div",{className:"mt-1 text-sm",children:e}),h.jsxs("div",{className:"mt-[14px] flex items-end gap-[18px]",children:[h.jsxs("div",{className:"flex flex-col",children:[h.jsx("span",{className:"text-xs text-font-secondary",children:"Achieved"}),h.jsxs("span",{className:ue(r.colorScheme,"font-semibold text-2xl !bg-transparent"),children:[t,"%"]})]}),h.jsx(Ji,{colorScheme:r.colorScheme,className:"mb-1",children:r.label})]})]})})}function _W({employeeName:e,employeeProfilePhoto:t,reviewCycleName:n,reviewType:r,dueBy:o}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:"Avatar"})}),h.jsxs("div",{className:"flex flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx(Ji,{className:"mt-0.5",variant:"outlined",children:r}),h.jsx("span",{className:"mt-1.5 text-font-secondary",children:n}),h.jsxs("span",{className:"text-font-secondary",children:["Due by ",o]})]})]})})}function IW({employeeName:e,employeeProfilePhoto:t,designation:n}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:"Avatar"})}),h.jsxs("div",{className:"flex flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx("span",{className:"text-font-secondary",children:n})]})]})})}function LW({employeeName:e,employeeProfilePhoto:t,designation:n,requestReason:r}){return h.jsx("div",{className:"rabbit-ds mr-auto w-[60%]",children:h.jsxs("div",{className:"flex w-full gap-2",children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:"Avatar"})}),h.jsxs("div",{className:"flex w-full flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx(Ji,{variant:"outlined",children:n}),h.jsx("span",{className:"mt-1 w-full truncate text-font-secondary",children:r})]})]})})}const FW=Ge("",{variants:{orientation:{horizontal:"flex-row",vertical:"min-w-max flex-col"}},defaultVariants:{orientation:"horizontal"}});function BW({className:e,children:t,orientation:n}){return h.jsx("div",{className:ue("rabbit-ds","w-full flex items-center rounded-lg p-4 bg-[#FDFDFD] border border-solid border-[#F3F5F8]",FW({orientation:n}),e),children:t})}function zW({nudgeCardList:e,title:t,imgSrc:n,description:r,pageSize:o=3,kebabMenu:a}){const[i,s]=u.useState(1),l=e.slice(0,o*i),c=e.length>o,d=e.length===l.length,f=()=>{s(p=>d?1:p+1)};return h.jsxs("div",{className:ue("rabbit-ds","w-full flex flex-col items-start rounded-lg px-4 py-3 gap-[7px] bg-white shadow-[0px_0px_2px_0px_rgba(0,0,0,0.24)]"),children:[h.jsxs("div",{className:"flex w-full items-center justify-between",children:[h.jsx("span",{className:"text-sm font-semibold",children:t}),a]}),h.jsxs("div",{className:"mt-1 flex items-center gap-4",children:[n?h.jsx(hn,{className:"h-16 w-16",children:h.jsx(pn,{src:n,alt:t})}):null,h.jsx("span",{className:"text-sm",children:r})]}),l,c&&h.jsx("div",{className:"mx-auto",children:h.jsxs(Lt,{variant:"text",onClick:f,iconRight:d?Vh:zo,children:["View ",d?"less":"more"]})})]})}function WW({surveyName:e,date:t}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:"flex gap-2",children:[h.jsx(Oe,{IconSVG:Kh}),h.jsxs("div",{className:"flex flex-col items-start text-sm",children:[h.jsx("span",{className:"font-semibold",children:e}),h.jsx(xc,{date:t,showRelativeTime:!0})]})]})})}const jW=Ge("",{variants:{variant:{single:"flex-row [&>div]:items-start",multiple:"flex-col"}},defaultVariants:{variant:"single"}});function Ew({employeeName:e,employeeProfilePhoto:t,scheduleDate:n,duration:r,variant:o,subTitle:a}){return h.jsx("div",{className:"rabbit-ds mr-auto",children:h.jsxs("div",{className:ue("flex items-center text-sm gap-2",jW({variant:o})),children:[h.jsx(hn,{size:"xl",children:h.jsx(pn,{src:t,alt:e})}),h.jsxs("div",{className:"flex flex-col items-center gap-1",children:[h.jsx("span",{className:"font-semibold",children:e}),n?h.jsx(xc,{date:n,duration:r,timeFormat:"HH:mm a",showTime:!0,className:"text-font-secondary"}):h.jsx("span",{className:"font-semibold",style:{color:"#C62C02"},children:a})]})]})})}Ew.defaultProps={subTitle:void 0,scheduleDate:void 0};function VW({label:e,onClick:t,customCompProps:n}){const[r,o]=u.useState(1);return h.jsxs(Hc,{children:[h.jsx(Vi,{children:h.jsx("span",{children:e})}),h.jsx(Vc,{children:h.jsx(Hi,{children:h.jsx(eo,{children:h.jsxs("div",{className:"flex flex-col p-2",children:[h.jsx(r0,{htmlFor:n==null?void 0:n.label,className:"text-xs",children:n==null?void 0:n.label}),h.jsx(e0,{id:n==null?void 0:n.label,className:"mt-2 !min-w-[160px]",type:"number",value:r,onChange:a=>o(a.target.valueAsNumber),min:1}),h.jsx("div",{className:"flex justify-end",children:h.jsx(Lt,{className:"mt-2",onClick:()=>t(r),disabled:r<1||Number.isNaN(r),children:n==null?void 0:n.buttonText})})]})})})})]})}function HW({options:e}){const[t,n]=u.useState(!1),r=(o,a)=>{o(a),n(!1)};return h.jsxs(zi,{open:t,children:[h.jsx(Wi,{asChild:!0,onClick:()=>n(!0),children:h.jsx(Lt,{variant:"text",size:"smallIcon",children:h.jsx(Oe,{IconSVG:Gh})})}),h.jsx(Ro,{className:"w-56",onFocusOutside:()=>n(!1),onPointerDownOutside:()=>n(!1),children:h.jsx(eo,{children:e.map(({type:o,onClick:a,label:i,customCompProps:s})=>!o||o==="default"?h.jsx(ea,{onClick:()=>r(a),children:h.jsx("span",{children:i})},i):h.jsx(VW,{onClick:l=>r(a,l),label:i,customCompProps:s},i))})})]})}const Mw=ea,$w=eo,Tw=ji,Pw=Ui,kw=Yi,Nw=Gi,Ow=u.forwardRef(({className:e,children:t,align:n="end",...r},o)=>h.jsx(Ro,{ref:o,align:n,...r,children:t}));Ow.displayName="SplitButtonDropdownContent";const YW=Ge("",{variants:{size:{normal:"icon",small:"smallIcon",icon:"icon",smallIcon:"smallIcon",nav:"icon"}},defaultVariants:{size:"normal"}});function GW({children:e,size:t,status:n,variant:r,...o}){return h.jsx("div",{className:"rabbit-ds flex flex-row",children:h.jsxs(zi,{children:[h.jsx(Lt,{variant:r,status:n,size:t,...o,className:"rounded-r-none",children:e}),h.jsx(Wi,{asChild:!0,children:h.jsx(Lt,{variant:r,status:n,className:"rounded-l-none border-l-0",size:YW({size:t}),iconLeft:zo})})]})})}Mw.displayName="SplitButtonDropdownItem",$w.displayName="SplitButtonDropdownGroup",Tw.displayName="SplitButtonDropdownRadioGroup",Pw.displayName="SplitButtonDropdownLabel",kw.displayName="SplitButtonDropdownCheckboxItem",Nw.displayName="SplitButtonDropdownRadioItem",Y.Accordion=L0,Y.AccordionContent=z0,Y.AccordionItem=F0,Y.AccordionTrigger=B0,Y.Add=W3,Y.Alert=W0,Y.AlertDescription=V0,Y.AlertDialogAction=Np,Y.AlertDialogCancel=kp,Y.AlertDialogComponent=c6,Y.AlertDialogContainer=Tp,Y.AlertDialogContent=pc,Y.AlertDialogDescription=mc,Y.AlertDialogOverlay=hc,Y.AlertDialogPortal=Pp,Y.AlertDialogTitle=gc,Y.AlertDialogTrigger=Op,Y.AlertIcon=j0,Y.Avatar=hn,Y.AvatarBadge=Xi,Y.AvatarFallback=yi,Y.AvatarGroup=au,Y.AvatarImage=pn,Y.Button=Lt,Y.Caption=vc,Y.Card=xi,Y.CardContent=Vp,Y.CardDescription=jp,Y.CardHeader=zp,Y.CardKPI=sE,Y.CardTitle=Wp,Y.Carousel=fM,Y.CarouselContainer=hM,Y.CarouselNextButton=gM,Y.CarouselPrevButton=pM,Y.Check=Bo,Y.CheckCircleOutline=zh,Y.Checkbox=ei,Y.ChevronDown=zo,Y.ChevronLeft=j3,Y.ChevronLeftCircle=Wh,Y.ChevronRight=Bl,Y.ChevronRightCircle=jh,Y.ChevronUp=Vh,Y.Chip=r5,Y.ChipGroup=Yz,Y.ChipGroupItem=Gz,Y.Close=Hh,Y.CollapseNavigation=Yh,Y.Company=V3,Y.DateTime=xc,Y.DirectedLineChart=Rx,Y.DonutChart=yz,Y.Download=H3,Y.Dropdown=zi,Y.DropdownCheckboxItem=Yi,Y.DropdownContent=Ro,Y.DropdownGroup=eo,Y.DropdownItem=ea,Y.DropdownLabel=Ui,Y.DropdownPortal=Vc,Y.DropdownRadioGroup=ji,Y.DropdownRadioItem=Gi,Y.DropdownSeparator=Yc,Y.DropdownSub=Hc,Y.DropdownSubContent=Hi,Y.DropdownSubTrigger=Vi,Y.DropdownTrigger=Wi,Y.EngagementNudgeData=WW,Y.ErrorOutline=zl,Y.Goal=Y3,Y.GoalsNudgeData=DW,Y.GridChart=tw,Y.GridDirectedLineChart=Iz,Y.HistogramChart=mz,Y.Home=G3,Y.Icon=Oe,Y.InfoWorkZero=Wl,Y.Input=e0,Y.KebabMenu=Gh,Y.KnowTeamNudgeData=Ew,Y.Label=r0,Y.LeftNav=yw,Y.LeftNavButton=Aw,Y.LeftNavGroup=xw,Y.LeftNavHome=ww,Y.LeftNavItem=wh,Y.LeftNavItemContent=vW,Y.LeftNavItemDropdown=zi,Y.LeftNavItemDropdownCheckboxItem=Yi,Y.LeftNavItemDropdownContent=Ro,Y.LeftNavItemDropdownGroup=eo,Y.LeftNavItemDropdownItem=ea,Y.LeftNavItemDropdownLabel=Ui,Y.LeftNavItemDropdownPortal=Vc,Y.LeftNavItemDropdownRadioGroup=ji,Y.LeftNavItemDropdownRadioItem=Gi,Y.LeftNavItemDropdownSeparator=Yc,Y.LeftNavItemDropdownSub=Hc,Y.LeftNavItemDropdownSubContent=Hi,Y.LeftNavItemDropdownSubTrigger=Vi,Y.LeftNavItemDropdownTrigger=Wi,Y.LeftNavItemTrigger=mW,Y.LineChart=ez,Y.ListItem=em,Y.ListItemIcon=sS,Y.ListItemText=aS,Y.Manager=U3,Y.MeshLogo=Qh,Y.MeshMaven=R3,Y.Metric=Vm,Y.MetricCard=jm,Y.MetricCardText=iu,Y.MetricCardTitle=Hm,Y.MyOneOnOne=X3,Y.NavCollapseButtonL2=Sw,Y.NavGroupL2=$W,Y.NavGroupTitleL2=TW,Y.NavItemL2=PW,Y.NavL2=MW,Y.NudgeAction=NW,Y.NudgeCard=zW,Y.NudgeCardItem=BW,Y.NudgeKebabMenu=HW,Y.Overflow=Uh,Y.Person=q3,Y.ProfileCard=su,Y.ProfileCardItem=Ym,Y.ProfileCardKey=Gm,Y.ProfileCardValue=Um,Y.ProgressBar=f0,Y.ProgressInfo=aE,Y.ProgressSlider=Y5,Y.RadarChart=xz,Y.RequestFeedback=K3,Y.RequestedFeedbackNudgeData=LW,Y.ReviewsNudgeData=_W,Y.Role=Q3,Y.SankeyChart=uz,Y.Search=Xh,Y.Select=KS,Y.SelectContent=vm,Y.SelectGroup=QS,Y.SelectItem=ym,Y.SelectLabel=bm,Y.SelectSeparator=xm,Y.SelectTrigger=mm,Y.SelectValue=ZS,Y.ShareFeedback=Z3,Y.SharePraiseNudgeData=IW,Y.SliderDrag=qh,Y.SplitButton=GW,Y.SplitButtonDropdownCheckboxItem=kw,Y.SplitButtonDropdownContent=Ow,Y.SplitButtonDropdownGroup=$w,Y.SplitButtonDropdownItem=Mw,Y.SplitButtonDropdownLabel=Pw,Y.SplitButtonDropdownRadioGroup=Tw,Y.SplitButtonDropdownRadioItem=Nw,Y.StackedBarChart=Sz,Y.Survey=Kh,Y.Tabs=km,Y.TabsContent=Dm,Y.TabsList=Nm,Y.TabsTrigger=Om,Y.Tag=Ji,Y.Team=J3,Y.Toaster=oE,Y.Tooltip=tu,Y.TooltipContent=es,Y.TooltipPortal=ru,Y.TooltipProvider=eu,Y.TooltipTrigger=nu,Y.TrendingDown=e5,Y.TrendingUp=t5,Y.getInitialsFromName=Bp,Y.toast=q9,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mesh.ai/rabbit",
3
3
  "private": false,
4
- "version": "1.16.0",
4
+ "version": "1.16.2",
5
5
  "packageManager": "pnpm@8.6.0",
6
6
  "main": "./dist/@mesh.ai/rabbit.umd.js",
7
7
  "module": "./dist/@mesh.ai/rabbit.es.js ",