@mesh.ai/rabbit 1.37.1 → 1.37.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.
@@ -27144,7 +27144,7 @@ function Ie({
27144
27144
  ] }),
27145
27145
  !t && /* @__PURE__ */ u("div", { className: re("grid w-full auto-rows-auto gap-3"), children: o })
27146
27146
  ] }),
27147
- r && r.length > 0 ? /* @__PURE__ */ u("div", { className: "h-250 w-full bg-surface-grey-subtle px-2" }) : null,
27147
+ r && r.length > 0 ? /* @__PURE__ */ u("div", { className: "h-25 w-full bg-surface-grey-subtle px-2" }) : null,
27148
27148
  r,
27149
27149
  i
27150
27150
  ] });
@@ -93,4 +93,4 @@ z`).split(`
93
93
  `)} {
94
94
  ${hr}
95
95
  }
96
- `}),R.appendChild(G.createTextNode(Pt))}ee.timeEnd("clone node"),me==null||me(Ne),ge!==!1&&re(Ne)&&(ee.time("embed web font"),yield PU(Ne,H),ee.timeEnd("embed web font")),ee.time("embed node"),A7(Ne,H);const Fe=ce.length;let Ie=0;const qe=()=>m(this,null,function*(){for(;;){const Pt=ce.pop();if(!Pt)break;try{yield Pt}catch(Vn){_e("Failed to run task",Vn)}ve==null||ve(++Ie,Fe)}});ve==null||ve(Ie,Fe),yield Promise.all([...Array(4)].map(qe)),ee.timeEnd("embed node"),$e==null||$e(Ne);const je=LU(Ne,H);return le&&je.insertBefore(le,je.children[0]),R&&je.insertBefore(R,je.children[0]),we&&m7(H),Ee==null||Ee(je),je})}function LU(S,L){const{width:H,height:G}=L,ee=zt(H,G,S.ownerDocument),ce=ee.ownerDocument.createElementNS(ee.namespaceURI,"foreignObject");return ce.setAttributeNS(null,"x","0%"),ce.setAttributeNS(null,"y","0%"),ce.setAttributeNS(null,"width","100%"),ce.setAttributeNS(null,"height","100%"),ce.append(S),ee.appendChild(ce),ee}function Wl(S,L){return m(this,null,function*(){var H;const G=yield Wt(S,L),ee=yield S7(G),ce=tt(ee,G.isEnable("removeControlCharacter"));G.autoDestruct||(G.svgStyleElement=$t(G.ownerDocument),G.svgDefsElement=(H=G.ownerDocument)==null?void 0:H.createElementNS(Bt,"defs"),G.svgStyles.clear());const R=Qe(ce,ee.ownerDocument);return yield zn(R,G)})}function BU(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{log:G,type:ee,quality:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to blob");const pe=yield fr(le,ee,ce);if(["image/png","image/jpeg"].includes(ee)&&R){const ge=yield ct(pe.slice(0,33));let ve=new Uint8Array(ge);return ee==="image/png"?ve=M(ve,R):ee==="image/jpeg"&&(ve=x(ve,R)),G.timeEnd("canvas to blob"),new Blob([ve,pe.slice(33)],{type:ee})}return G.timeEnd("canvas to blob"),pe})}function Wo(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{log:G,quality:ee,type:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to data url");let pe=le.toDataURL(ce,ee);if(["image/png","image/jpeg"].includes(ce)&&R&&U&&z){const[ge,ve]=pe.split(",");let we=0,me=!1;if(ce==="image/png"){const je=j(ve);je>=0?(we=Math.ceil((je+28)/3)*4,me=!0):we=33/3*4}else ce==="image/jpeg"&&(we=18/3*4);const $e=ve.substring(0,we),Ee=ve.substring(we),Ne=window.atob($e),Fe=new Uint8Array(Ne.length);for(let je=0;je<Fe.length;je++)Fe[je]=Ne.charCodeAt(je);const Ie=ce==="image/png"?M(Fe,R,me):x(Fe,R),qe=window.btoa(String.fromCharCode(...Ie));pe=[ge,",",qe,Ee].join("")}return G.timeEnd("canvas to data url"),pe})}function E7(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{width:G,height:ee,ownerDocument:ce}=H,R=yield Wo(H),le=zt(G,ee,ce),pe=le.ownerDocument.createElementNS(le.namespaceURI,"image");return pe.setAttributeNS(null,"href",R),pe.setAttributeNS(null,"height","100%"),pe.setAttributeNS(null,"width","100%"),le.appendChild(pe),tt(le,H.isEnable("removeControlCharacter"))})}function zU(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{ownerDocument:G,width:ee,height:ce,scale:R,type:le}=H,pe=le==="image/svg+xml"?yield E7(H):yield Wo(H),ge=Qe(pe,G);return ge.width=Math.floor(ee*R),ge.height=Math.floor(ce*R),ge.style.width=`${ee}px`,ge.style.height=`${ce}px`,ge})}function WU(S,L){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},L),{type:"image/jpeg"})))})}function VU(S,L){return m(this,null,function*(){const H=yield Wt(S,L),G=yield Wl(H);return G.getContext("2d").getImageData(0,0,G.width,G.height).data})}function jU(S,L){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},L),{type:"image/png"})))})}function HU(S,L){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},L),{type:"image/webp"})))})}n.createContext=Il,n.destroyContext=m7,n.domToBlob=BU,n.domToCanvas=Wl,n.domToDataUrl=Wo,n.domToForeignObjectSvg=S7,n.domToImage=zU,n.domToJpeg=WU,n.domToPixel=VU,n.domToPng=jU,n.domToSvg=E7,n.domToWebp=HU,n.loadMedia=wt,n.waitUntilLoad=An,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(xf,xf.exports);var uj=xf.exports;const Bn=(e,t,n)=>{d.useImperativeHandle(t,()=>({download(){e.current&&uj.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},U8=[{name:"default",dark:"var(--chart-default-dark, #1565BC)",light:"var(--chart-default-light, #99D2F9)"},{name:"green",dark:"#1A6400",light:"#B1E39F"},{name:"purple",dark:"#734DBB",light:"#E7DAFF"},{name:"bronze_yellow",dark:"#7E6000",light:"#FFCEFB"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"indigo",dark:"#4657AE",light:"#CDD5FF"},{name:"brown",dark:"#8A4A00",light:"#FCC88B"},{name:"cardinal",dark:"#BE1442",light:"#FFD0D0"},{name:"dark_green",dark:"#00675E",light:"#A1DFD5"},{name:"maroon",dark:"#891E01",light:"#FFAE99"},{name:"golden_brown",dark:"#90591A",light:"#FFDEB6"},{name:"maroon",dark:"#800000",light:"#F2CECE"},{name:"green_yellow",dark:"#6A6A00",light:"#FFFFC7"},{name:"blue",dark:"#000075",light:"#CFCFFF"},{name:"black",dark:"#000000",light:"#E3E1E1"},{name:"grey",dark:"#323846",light:"#D0DFFF"},{name:"pink",dark:"#BE012F",light:"#FFD9E2"},{name:"royal_blue",dark:"#002FDC",light:"#D7DFFF"},{name:"magenta",dark:"#B402AA",light:"#FFCEFB"}];function Xe(e){return U8[e%U8.length]}const Sl=(e,t)=>d.Children.map(e,n=>d.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function Cf({value:e,darkColor:t,lightColor:n}){return l.jsxs("div",{className:"inline-flex items-center justify-start gap-2 px-2 py-1",children:[l.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"relative h-3 w-3 rounded-radius-600 border"}),l.jsx("div",{className:"flex items-start justify-start",children:l.jsx("div",{className:"text-xs font-normal leading-none text-body-primary",children:e})})]})}function Af({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm basis-full flex-col items-start justify-start px-1 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function Sf({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-2 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function Ef({nodeData:e}){const{employee:t}=e,{name:n,imageUrl:r}=t;return l.jsxs("div",{className:"inline-flex max-w-sm items-center justify-start px-2 py-0.5",children:[l.jsx(hn,{size:"md",children:l.jsx(gn,{src:r,alt:"Avatar"})}),l.jsx("div",{className:"flex items-start justify-start px-2 text-sm font-medium",children:n||"-"})]})}function ke({children:e,showSideBySide:t,tooltipTitle:n}){const r=Sl(e,Cf),o=Sl(e,Af),a=Sl(e,Sf),i=Sl(e,Ef);return l.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-radius-200 bg-white p-2 shadow-card-basic",children:[l.jsx("div",{className:"px-2 py-1 text-xs font-medium leading-none text-body-primary",children:n}),a,l.jsxs("div",{className:"flex w-full flex-col items-start justify-start rounded-radius-200 p-2",children:[t&&l.jsxs("div",{className:te("flex w-full justify-between"),children:[o&&o[0],!!(o!=null&&o[1])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[1]]}),t&&(o==null?void 0:o[2])&&l.jsxs("div",{className:te("mt-3 flex w-full justify-between"),children:[o&&o[2],!!(o!=null&&o[3])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[3]]}),!t&&l.jsx("div",{className:te("grid w-full auto-rows-auto gap-3"),children:o})]}),r&&r.length>0?l.jsx("div",{className:"h-250 w-full bg-surface-grey-subtle px-2"}):null,r,i]})}Cf.displayName="Legend",Af.displayName="Item",Sf.displayName="Header",Ef.displayName="Footer",ke.Legend=Cf,ke.Item=Af,ke.Header=Sf,ke.Footer=Ef,ke.defaultProps={showSideBySide:!1};function G8({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}G8.defaultProps={xValue:void 0,yValue:void 0};function dj({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsx(Wm,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s,c;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))+((c=o==null?void 0:o.xScale)==null?void 0:c.bandwidth())/2},y:i=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i))}})}const fj=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),pj=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},hj=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),El={xAccessor:e=>e.x,yAccessor:e=>e.y},Y8=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,X8=10,gj=5,Mf=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,connectNulls:g=!1,maxNodesInMiniMode:m=gj,tooltipStackCharLimit:x=X8,seriesSelectorTitle:y,preselectedNodes:w},b)=>{const[A,C]=d.useState(()=>(w&&w<=e.length?e.slice(0,w):e).map(k=>k.id)),$=d.useRef(null);Bn($,b,`${a}-${i}-LineChart`);const P=d.useMemo(()=>o.map((M,k)=>{const B=e.find(V=>V.id===M.id);return{points:M.data.map((V,j)=>({x:r[j],y:Number(V),nodeId:M.id,color:(B==null?void 0:B.color)??Xe(k)}))}}).slice(0,h==="mini"?m:o.length),[o,h,m,e,r]),T=d.useMemo(()=>h==="full"?P.filter(M=>A.includes(M.points[0].nodeId)):P,[P,A,h]);return l.jsxs("div",{ref:$,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(n8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(_o,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:M=>u?Y8(M,u.symbol,u.position):M,rangePadding:{end:10},tickComponent:M=>l.jsx(pj,{tickData:M,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(_o,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:M=>f?Y8(Ht(M>=1e3?"~s":"")(M),f.symbol,f.position):Ht(M>=1e3?"~s":"")(M),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((M,k)=>l.jsxs(l.Fragment,{children:[l.jsx(dj,{data:M.points,xAccessor:El.xAccessor,yAccessor:El.yAccessor,connectNulls:g}),l.jsx(H8,{dataKey:`Performance Management ${k}`,data:M.points,size:8,renderGlyph:fj,xAccessor:El.xAccessor,yAccessor:El.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:hj,renderTooltip:({tooltipData:M})=>{var V,j,W,E,I,U;const k=e.find(z=>{var O;return z.id===((O=M==null?void 0:M.nearestDatum)==null?void 0:O.datum.nodeId)}),B=((V=M==null?void 0:M.nearestDatum)==null?void 0:V.datum)&&((j=M==null?void 0:M.nearestDatum)==null?void 0:j.datum.x.length)<x;return l.jsx(G8,{xValue:(W=M==null?void 0:M.nearestDatum)==null?void 0:W.datum.x,yValue:(E=M==null?void 0:M.nearestDatum)==null?void 0:E.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!B,tooltipTitle:p,legendValue:(k==null?void 0:k.name)||"",legendDarkColor:((I=M==null?void 0:M.nearestDatum)==null?void 0:I.datum.color.dark)||Xe(0).dark,legendLightColor:((U=M==null?void 0:M.nearestDatum)==null?void 0:U.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:y??a}),"(",T.length??0,"/",P.length,")"]}),l.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:P.map(M=>{const k=e.find(B=>B.id===M.points[0].nodeId);return k&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),k.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:A.includes(k.id),onCheckedChange:B=>{let V=[...A];B?V=[...A,k.id]:V.splice(A.indexOf(k.id),1),C(V)}})})]},k.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:P.map(M=>{const k=e.find(B=>B.id===M.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),k==null?void 0:k.name]},k==null?void 0:k.id)})})]})}),vj={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:X8,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};Mf.defaultProps=vj,Mf.displayName="LineBase";const q8=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Mf,{ref:t,width:n,height:r,...e})}));q8.displayName="LineChart";const mj=q8;function K8(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 bj(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 $f(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 yj(e,t){return e.sourceLinks.length?e.depth:t-1}function Ml(e){return function(){return e}}function Q8(e,t){return $l(e.source,t.source)||e.index-t.index}function Z8(e,t){return $l(e.target,t.target)||e.index-t.index}function $l(e,t){return e.y0-t.y0}function Pf(e){return e.value}function wj(e){return e.index}function xj(e){return e.nodes}function Cj(e){return e.links}function J8(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function R8({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 Aj(){let e=0,t=0,n=1,r=1,o=24,a=8,i,s=wj,c=yj,u,f,p=xj,h=Cj,v=6;function g(){const E={nodes:p.apply(null,arguments),links:h.apply(null,arguments)};return m(E),x(E),y(E),w(E),C(E),R8(E),E}g.update=function(E){return R8(E),E},g.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:Ml(E),g):s},g.nodeAlign=function(E){return arguments.length?(c=typeof E=="function"?E:Ml(E),g):c},g.nodeSort=function(E){return arguments.length?(u=E,g):u},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?(p=typeof E=="function"?E:Ml(E),g):p},g.links=function(E){return arguments.length?(h=typeof E=="function"?E:Ml(E),g):h},g.linkSort=function(E){return arguments.length?(f=E,g):f},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?(v=+E,g):v};function m({nodes:E,links:I}){for(const[z,O]of E.entries())O.index=z,O.sourceLinks=[],O.targetLinks=[];const U=new Map(E.map((z,O)=>[s(z,O,E),z]));for(const[z,O]of I.entries()){O.index=z;let{source:N,target:D}=O;typeof N!="object"&&(N=O.source=J8(U,N)),typeof D!="object"&&(D=O.target=J8(U,D)),N.sourceLinks.push(O),D.targetLinks.push(O)}if(f!=null)for(const{sourceLinks:z,targetLinks:O}of E)z.sort(f),O.sort(f)}function x({nodes:E}){for(const I of E)I.value=I.fixedValue===void 0?Math.max($f(I.sourceLinks,Pf),$f(I.targetLinks,Pf)):I.fixedValue}function y({nodes:E}){const I=E.length;let U=new Set(E),z=new Set,O=0;for(;U.size;){for(const N of U){N.depth=O;for(const{target:D}of N.sourceLinks)z.add(D)}if(++O>I)throw new Error("circular link");U=z,z=new Set}}function w({nodes:E}){const I=E.length;let U=new Set(E),z=new Set,O=0;for(;U.size;){for(const N of U){N.height=O;for(const{source:D}of N.targetLinks)z.add(D)}if(++O>I)throw new Error("circular link");U=z,z=new Set}}function b({nodes:E}){const I=K8(E,O=>O.depth)+1,U=(n-e-o)/(I-1),z=new Array(I);for(const O of E){const N=Math.max(0,Math.min(I-1,Math.floor(c.call(null,O,I))));O.layer=N,O.x0=e+N*U,O.x1=O.x0+o,z[N]?z[N].push(O):z[N]=[O]}if(u)for(const O of z)O.sort(u);return z}function A(E){const I=bj(E,U=>(r-t-(U.length-1)*i)/$f(U,Pf));for(const U of E){let z=t;for(const O of U){O.y0=z,O.y1=z+O.value*I,z=O.y1+i;for(const N of O.sourceLinks)N.width=N.value*I}z=(r-z+i)/(U.length+1);for(let O=0;O<U.length;++O){const N=U[O];N.y0+=z*(O+1),N.y1+=z*(O+1)}V(U)}}function C(E){const I=b(E);i=Math.min(a,(r-t)/(K8(I,U=>U.length)-1)),A(I);for(let U=0;U<v;++U){const z=Math.pow(.99,U),O=Math.max(1-z,(U+1)/v);P(I,z,O),$(I,z,O)}}function $(E,I,U){for(let z=1,O=E.length;z<O;++z){const N=E[z];for(const D of N){let Q=0,q=0;for(const{source:oe,value:re}of D.targetLinks){let J=re*(D.layer-oe.layer);Q+=j(oe,D)*J,q+=J}if(!(q>0))continue;let ne=(Q/q-D.y0)*I;D.y0+=ne,D.y1+=ne,B(D)}u===void 0&&N.sort($l),T(N,U)}}function P(E,I,U){for(let z=E.length,O=z-2;O>=0;--O){const N=E[O];for(const D of N){let Q=0,q=0;for(const{target:oe,value:re}of D.sourceLinks){let J=re*(oe.layer-D.layer);Q+=W(D,oe)*J,q+=J}if(!(q>0))continue;let ne=(Q/q-D.y0)*I;D.y0+=ne,D.y1+=ne,B(D)}u===void 0&&N.sort($l),T(N,U)}}function T(E,I){const U=E.length>>1,z=E[U];k(E,z.y0-i,U-1,I),M(E,z.y1+i,U+1,I),k(E,r,E.length-1,I),M(E,t,0,I)}function M(E,I,U,z){for(;U<E.length;++U){const O=E[U],N=(I-O.y0)*z;N>1e-6&&(O.y0+=N,O.y1+=N),I=O.y1+i}}function k(E,I,U,z){for(;U>=0;--U){const O=E[U],N=(O.y1-I)*z;N>1e-6&&(O.y0-=N,O.y1-=N),I=O.y0-i}}function B({sourceLinks:E,targetLinks:I}){if(f===void 0){for(const{source:{sourceLinks:U}}of I)U.sort(Z8);for(const{target:{targetLinks:U}}of E)U.sort(Q8)}}function V(E){if(f===void 0)for(const{sourceLinks:I,targetLinks:U}of E)I.sort(Z8),U.sort(Q8)}function j(E,I){let U=E.y0-(E.sourceLinks.length-1)*i/2;for(const{target:z,width:O}of E.sourceLinks){if(z===I)break;U+=O+i}for(const{source:z,width:O}of I.targetLinks){if(z===E)break;U-=O}return U}function W(E,I){let U=I.y0-(I.targetLinks.length-1)*i/2;for(const{source:z,width:O}of I.targetLinks){if(z===E)break;U+=O+i}for(const{target:z,width:O}of E.sourceLinks){if(z===I)break;U-=O}return U}return g}function Sj({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,c,u,f;const a=e.source,i=e.target;return l.jsxs(ke,{tooltipTitle:o,children:[l.jsx(ke.Item,{label:t,value:a.name}),l.jsx(ke.Item,{label:n,value:i.name}),l.jsx(ke.Item,{label:r,value:e.weight.toString()}),l.jsx(ke.Legend,{value:a.name,darkColor:(s=Xe((a.index||0)+1))==null?void 0:s.dark,lightColor:(c=Xe((a.index||0)+1))==null?void 0:c.light}),l.jsx(ke.Legend,{value:i.name,darkColor:(u=Xe((i.index||0)+1))==null?void 0:u.dark,lightColor:(f=Xe((i.index||0)+1))==null?void 0:f.light})]})}const e6=80,t6=20,Ej=30,Mj=12,n6=d.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:a,weightLabel:i},s)=>{const c=d.useMemo(()=>Aj().nodeId(E=>E.id).nodeWidth(Mj).nodePadding(Ej).nodeAlign(E=>E.group),[]),u=d.useRef(null);Bn(u,s,`${n}-SankeyChart`);const[f,p]=d.useState(""),[h,v]=d.useState(null),{tooltipData:g,tooltipLeft:m,tooltipTop:x,tooltipOpen:y,showTooltip:w,hideTooltip:b}=Ua(),{containerBounds:A,containerRef:C,TooltipInPortal:$}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),P=d.useMemo(()=>c.extent([[e6,t6],[t-e6,e-t6-50]])({nodes:r,links:o.map(E=>({...E,value:Number(E.weight)}))}),[e,t,c,r,o]),T=d.useMemo(()=>Math.max(...P.nodes.map(E=>E.depth??0)),[P]),M=d.useMemo(()=>{const E={};let I=-1/0;return P.nodes.forEach(U=>{const{group:z}=U;E[z]?(E[z].x=Math.max(E[z].x??-1/0,U.x0??-1/0),E[z].y=Math.max(E[z].y??-1/0,U.y1??-1/0)):(E[z]={},E[z].x=U.x0,E[z].y=U.y1),I=Math.max(I,E[z].y??-1/0),E[z].y=I}),Object.keys(E).forEach(U=>{E[U].y=I}),E},[P]),k=d.useCallback(E=>{const I=c.nodeId()(E);p(f===I?"":I)},[f,c]),B=d.useCallback(()=>{p(""),v(null)},[]),V=d.useMemo(()=>f===""&&h===null?new Set:new Set(P.links.filter(E=>c.nodeId()(E.source)===f||c.nodeId()(E.target)===f||(h==null?void 0:h.source)===E.source&&(h==null?void 0:h.target)===E.target)),[f,P,h,c]),j=d.useCallback((E,I)=>{const U=("clientX"in E?E.clientX:0)-A.left,z=("clientY"in E?E.clientY:0)-A.top;v(I),U&&z&&w({tooltipLeft:U,tooltipTop:z,tooltipData:I})},[w,A]),W=d.useCallback(()=>{B(),b()},[B,b]);return l.jsxs("div",{ref:u,className:"rabbit-ds h-min w-min bg-white",id:"sankey-chart",children:[l.jsxs("svg",{height:e,width:t,ref:C,children:[l.jsx("g",{children:P.links.map(E=>l.jsx(iz,{data:E,source:I=>({x:I.source.x1,y:I.y0}),target:I=>({x:I.target.x0,y:I.y1}),x:I=>I.x??0,y:I=>I.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>W(),onMouseMove:I=>j(I,E),stroke:Xe((E.source.index||0)+1).light,strokeWidth:E.width,strokeOpacity:V.has(E)?.7:.4},E.index))}),l.jsx("g",{children:P.nodes.map(E=>{var I,U,z;return l.jsx("g",{children:l.jsx(Vm,{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:()=>k(E),onMouseLeave:()=>B(),radius:2,fill:f===E.id?(I=Xe((E.index||0)+1))==null?void 0:I.dark:(U=Xe((E.index||0)+1))==null?void 0:U.light,stroke:(z=Xe((E.index||0)+1))==null?void 0:z.dark,all:!0})},E.index)})}),l.jsx("g",{children:a.map(E=>l.jsx(Ra,{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))}),l.jsxs("g",{children:[P.nodes.map(E=>l.jsx(Ra,{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)),P.nodes.map(E=>E.value&&l.jsx(wa,{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))]})]}),y&&g&&l.jsx($,{top:x,left:m,unstyled:!0,applyPositionStyle:!0,children:l.jsx(Sj,{tooltipData:g,fromLabel:`From: ${a[g.source.group].name}`,toLabel:`To: ${a[g.target.group].name}`,weightLabel:i,tooltipTitle:n})},Math.random())]})});n6.displayName="Sankey";const r6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>n&&r&&l.jsx(n6,{ref:t,width:n,height:r,...e})}));r6.displayName="SankeyChart";const $j=r6;function Pj(e){return"bandwidth"in e?e.bandwidth():0}var Tj=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Tf(){return Tf=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},Tf.apply(this,arguments)}function kj(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 o6(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,c=s===void 0?"#eaf0f6":s,u=e.strokeWidth,f=u===void 0?1:u,p=e.strokeDasharray,h=e.className,v=e.children,g=e.numTicks,m=g===void 0?10:g,x=e.lineStyle,y=e.offset,w=e.tickValues,b=kj(e,Tj),A=w??m0(a,m),C=(y??0)+Pj(a)/2,$=A.map(function(P,T){var M,k=((M=rl(a(P)))!=null?M:0)+C;return{index:T,from:new Nn({x:0,y:k}),to:new Nn({x:i,y:k})}});return d.createElement(mn,{className:gt("visx-rows",h),top:n,left:o},v?v({lines:$}):$.map(function(P){var T=P.from,M=P.to,k=P.index;return d.createElement(fz,Tf({key:"row-line-"+k,from:T,to:M,stroke:c,strokeWidth:f,strokeDasharray:p,style:x},b))}))}o6.propTypes={tickValues:ie.array,width:ie.number.isRequired};function a6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:a,legendDarkColor:i,legendLightColor:s}){const c=e==null?void 0:e.toString(),u=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:!0,children:[l.jsx(ke.Item,{label:r,value:c}),l.jsx(ke.Item,{label:o,value:u}),l.jsx(ke.Legend,{value:a,darkColor:i,lightColor:s})]})}a6.defaultProps={xValue:void 0,yValue:void 0};const i6=20,s6=50,kf=80,Pl=50,Nj=10,Oj=25,Nf=d.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:a,width:i,height:s,maxBinCount:c=Oj,minBinCount:u=Nj,integerBins:f=!1,integerYAxis:p=!1},h)=>{const v=d.useMemo(()=>Ls(a),[a]),{histogramDomain:g,threshold:m,thresholdInteger:x}=d.useMemo(()=>{const O=v[0]??0,N=O===v[1]?u+O:v[1]??0,D=N-O>u?N:u+O,Q=Math.min(Math.max(N-O,u),c),q=Math.floor(v[0]??0),ne=Math.ceil(D);return{histogramDomain:r||(f?[q,ne]:[O,N]),threshold:Q,thresholdInteger:Math.ceil(Q)}},[v,r,f,c,u]),y=d.useMemo(()=>Oo({domain:g,range:[Pl,i-s6],round:!0,nice:!0}),[g,i]),w=d.useMemo(()=>PF().domain(y.domain()).thresholds(o||(f?x:m))(a),[y,o,a,m,x,f]),b=d.useMemo(()=>Oo({domain:[0,Nd(w,O=>O.length)??0],range:[s-kf,i6],round:!0,nice:!0}),[w,s]),A=d.useMemo(()=>b.ticks().filter(O=>p?Number.isInteger(O):O),[p,b]),C=d.useRef(null);Bn(C,h,`${t}-${n}-Histogram`);const{tooltipData:$,tooltipLeft:P,tooltipTop:T,tooltipOpen:M,showTooltip:k,hideTooltip:B}=Ua(),{containerBounds:V,containerRef:j,TooltipInPortal:W}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=i-Pl-s6,I=s-i6-kf-100,U=d.useCallback((O,N)=>{const D=("clientX"in O?O.clientX:0)-V.left,Q=("clientY"in O?O.clientY:0)-V.top;D&&Q&&k({tooltipLeft:D,tooltipTop:Q,tooltipData:N})},[k,V]),z=d.useCallback(()=>{B()},[B]);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:i,height:s},ref:C,children:[l.jsxs("svg",{width:i,height:s,ref:j,children:[l.jsx(_0,{orientation:"bottom",scale:y,top:s-kf,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"}}),l.jsx(_0,{orientation:"left",scale:b,left:Pl,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:O=>p?Number(O)>=1e3?Ht("~s")(Number(Ht("d")(O))):Ht("d")(O):Number(O)>=1e3?Ht("~s")(O):Ht("")(O),tickValues:A,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"}}),l.jsxs(mn,{children:[l.jsx(o6,{scale:b,width:E,height:I,left:Pl,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),w.map(O=>{const N=Math.abs(b(0)-b(O.length)),D=Math.abs(y(O.x1??0)-y(O.x0??0));return l.jsx("g",{children:l.jsx(KB,{x:y(O.x0??0),y:b(O.length),width:D,height:N&&N-1,fill:Xe(0).light,stroke:Xe(0).dark,strokeWidth:1,onMouseMove:Q=>U(Q,O),onMouseLeave:()=>z()})},Math.random())})]})]}),M&&$&&l.jsx(W,{top:T,left:P,unstyled:!0,applyPositionStyle:!0,children:l.jsx(a6,{xAxisLabel:t,xValue:`${$.x0} to ${$.x1}`,yAxisLabel:n,yValue:$.length,tooltipTitle:e,legendValue:n,legendDarkColor:Xe(0).dark,legendLightColor:Xe(0).light})},Math.random()),b.domain()[2]]})}),l6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Nf,{ref:t,width:n,height:r,...e})}));Nf.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},Nf.displayName="HistogramBase",l6.displayName="HistogramChart";const _j=l6;function c6({tooltipTitle:e,label:t,value:n,unit:r,legendValue:o,legendDarkColor:a,legendLightColor:i}){return l.jsxs(ke,{tooltipTitle:e,children:[l.jsx(ke.Item,{label:t,value:`${n} ${r}`}),l.jsx(ke.Legend,{value:o,darkColor:a||"",lightColor:i||""})]})}c6.defaultProps={};const Dj=e=>e.value,Fj=e=>e.label,u6=d.forwardRef(({width:e,height:t,unit:n="%",data:r,tooltipTitle:o,legendTitle:a},i)=>{const s=e/2,c=t/2,u=d.useMemo(()=>Math.min(e-.35*e,t-50)/2,[e,t]),{tooltipData:f,tooltipLeft:p,tooltipTop:h,tooltipOpen:v,showTooltip:g,hideTooltip:m}=Ua(),{containerBounds:x,containerRef:y,TooltipInPortal:w}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),b=d.useRef(null),A=d.useCallback(($,P)=>{const T=("clientX"in $?$.clientX:0)-x.left,M=("clientY"in $?$.clientY:0)-x.top;T&&M&&g({tooltipLeft:T,tooltipTop:M,tooltipData:P})},[g,x]),C=d.useCallback(()=>{m()},[m]);return Bn(b,i,"DonutChart"),l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:b,children:[l.jsx("svg",{width:e,height:t,className:"rabbit-ds",ref:y,children:l.jsx(mn,{top:c-20,left:s,children:l.jsx(jB,{data:r,pieValue:Dj,outerRadius:u-10,innerRadius:u-Math.min(e*.07,22)-10,cornerRadius:2,padAngle:.025,children:$=>l.jsx(l.Fragment,{children:$.arcs.map(P=>{const T=Fj(P.data);return l.jsx("g",{children:l.jsx("path",{d:$.path(P)??void 0,fill:P.data.color,onMouseLeave:C,onMouseMove:M=>A(M,{label:a,value:P.value,tooltipTitle:o,unit:n,legendValue:T,legendDarkColor:P.data.labelColor,legendLightColor:P.data.color})})},`arc-${T}`)})})})})}),v&&f&&l.jsx(w,{top:h,left:p,unstyled:!0,applyPositionStyle:!0,children:l.jsx(c6,{unit:f.unit,label:f.label,value:f.value,tooltipTitle:o,legendValue:f.legendValue??"",legendDarkColor:f.legendDarkColor,legendLightColor:f.legendLightColor})},Math.random()),l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-2 text-[10px] font-semibold text-body-secondary",style:{fontSize:Math.min(e*.04,10)},children:r.map($=>l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:$.color,borderColor:$.labelColor,color:$.labelColor,width:Math.min(e*.04,10),height:Math.min(e*.04,10)},className:"h-3 w-3 rounded-radius-round border"}),`${$.label}: ${$.value}${n}`]},$.label))})]})});u6.displayName="DonutChartBase";const d6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(u6,{ref:t,width:n,height:r,...e})}));d6.displayName="DonutChart";const Ij=d6;function f6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}f6.defaultProps={xValue:void 0,yValue:void 0};const Tl={top:60,left:20,right:20,bottom:20},p6={start:10,end:-10,middle:0},h6=d.forwardRef(({width:e,height:t,levels:n=5,nodes:r,xAxisLabel:o,xAxisCharLimit:a,tooltipTitle:i,xAxisUnitSymbol:s,yAxisDomain:c,series:u=[],xAxisValues:f},p)=>{const h=d.useRef(null);Bn(h,p,"RadarChart");const{tooltipData:v,tooltipLeft:g,tooltipTop:m,tooltipOpen:x,showTooltip:y,hideTooltip:w}=Ua(),{containerBounds:b,containerRef:A,TooltipInPortal:C}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),$=d.useCallback((N,D)=>{const Q=Math.PI*2/N;return[...new Array(N)].map((q,ne)=>({x:D*Math.sin(ne*Q),y:D*Math.cos(ne*Q)}))},[]),P=d.useCallback((N,D,Q)=>Q==="pre"?`${D}${N}`:`${N}${D}`,[]),T=d.useCallback((N,D,Q)=>{const q=Math.PI*2/N.length,ne=new Array(N.length).fill({x:0,y:0,data:null}),oe=new Array(N.length+1).fill("").reduce((re,J,ae)=>{if(ae>N.length)return re;const Y=D(Q(N[ae-1]))*Math.sin(ae*q),Z=D(Q(N[ae-1]))*Math.cos(ae*q);return ne[ae-1]={x:Y,y:Z,data:N[ae-1]},`${re}${Y},${Z} `});return{points:ne,pointString:oe}},[]),M=d.useMemo(()=>new Nn({x:0,y:0}),[]),k=d.useCallback(N=>Math.round(N)===0?"middle":N>0?"start":"end",[]),B=d.useCallback((N,D)=>{const Q=("clientX"in N?N.clientX:0)-b.left,q=("clientY"in N?N.clientY:0)-b.top;Q&&q&&y({tooltipLeft:Q,tooltipTop:q,tooltipData:D})},[y,b]),V=d.useCallback(()=>{w()},[w]),j=d.useMemo(()=>e-Tl.left-Tl.right,[e]),W=d.useMemo(()=>t-Tl.top-Tl.bottom,[t]),E=d.useMemo(()=>Math.min(j,W)/2,[j,W]),I=u.length?u.reduce((N,D)=>{const Q=D.data.filter(q=>q);return Math.max(N,...Q)},-1/0):0,U=Oo({range:[0,E],domain:c??[0,I]}),z=$(f.length,E),O=N=>T(N,D=>U(D)??0,D=>D);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:h,children:[l.jsxs("svg",{width:e,height:t,ref:A,pointerEvents:"all",onMouseLeave:V,children:[l.jsx("rect",{fill:"transparent",width:e,height:t,rx:14}),l.jsxs(mn,{top:t/2,left:e/2,children:[[...new Array(n)].map((N,D)=>l.jsx(jm,{x:e/2,y:t/2,fill:"none",stroke:"#CFD7DF",strokeWidth:1,strokeDasharray:4,r:E*(D+1)/n},`web1-${Math.random()}`)),f.map((N,D)=>l.jsxs(l.Fragment,{children:[l.jsx(x0,{from:M,to:z[D],stroke:f.length===1?Xe(0).dark:"#CFD7DF",strokeWidth:1},`radar-line-${Math.random()}`),l.jsx(wa,{x:z[D].x,y:z[D].y,textAnchor:k(z[D].x),verticalAnchor:k(z[D].y),dx:p6[k(z[D].x)],dy:p6[k(z[D].y)],fontSize:10,fill:"#666666",width:a??100,children:`${s?P(f[(D+f.length-1)%f.length],s.symbol,s.position):f[(D+f.length-1)%f.length]}`})]})),u.map((N,D)=>l.jsx("polygon",{points:O(N.data).pointString,fill:Xe(D).light,fillOpacity:.2,stroke:Xe(D).dark,strokeWidth:1},`polypath-${Math.random()}`)),u.map((N,D)=>O(N.data).points.map((Q,q)=>l.jsx(jm,{cx:Q.x,cy:Q.y,r:5,fill:"transparent",onMouseMove:ne=>{var oe;return B(ne,{yAxisLabel:((oe=r.find(re=>re.id===N.id))==null?void 0:oe.name)??"",xAxisValue:f[q],yAxisValue:N.data[q],xAxisLabel:o??"Category",legendDarkColor:Xe(D).dark,legendLightColor:Xe(D).light})},onMouseOut:V},`radar-point-${Math.random()}`)))]})]}),x&&v&&l.jsx(C,{top:m,left:g,unstyled:!0,applyPositionStyle:!0,children:l.jsx(f6,{xAxisLabel:v.xAxisLabel??"",xValue:v.xAxisValue,yAxisLabel:v.yAxisLabel??"",yValue:v.yAxisValue,tooltipTitle:i,showSideBySide:!0,legendValue:v.yAxisLabel??"",legendDarkColor:v.legendDarkColor,legendLightColor:v.legendLightColor})},Math.random())]})});h6.displayName="RadarChartBase";const g6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(h6,{ref:t,width:n,height:r,...e})}));g6.displayName="RadarChart";const Lj=g6;function v6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}v6.defaultProps={xValue:void 0,yValue:void 0};const Bj=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),zj=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},m6={xAccessor:e=>e.x,yAccessor:e=>e.y},b6=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,y6=10,Wj=5,Of=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,maxNodesInMiniMode:g=Wj,tooltipStackCharLimit:m=y6,seriesSelectorTitle:x,preselectedNodes:y},w)=>{const[b,A]=d.useState(()=>(y&&y<=e.length?e.slice(0,y):e).map(M=>M.id)),C=d.useRef(null);Bn(C,w,`${a}-${i}-StackedBarChart`);const $=d.useMemo(()=>o.map((T,M)=>{const k=e.find(B=>B.id===T.id);return{points:T.data.map((B,V)=>({x:r[V],y:Number(B),nodeId:T.id,color:(k==null?void 0:k.color)??Xe(M)}))}}).slice(0,h==="mini"?g:o.length),[o,h,g,e,r]),P=d.useMemo(()=>h==="full"?$.filter(T=>b.includes(T.points[0].nodeId)):$,[$,b,h]);return l.jsxs("div",{ref:C,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,padding:.5,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(n8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(_o,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:T=>u?b6(T,u.symbol,u.position):T,rangePadding:{end:10},tickComponent:T=>l.jsx(zj,{tickData:T,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(_o,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:T=>f?b6(Ht(T>=1e3?"~s":"")(T),f.symbol,f.position):Ht(T>=1e3?"~s":"")(T),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(sj,{children:P.map(T=>l.jsx(oj,{data:T.points,dataKey:T.points[0].nodeId,xAccessor:m6.xAccessor,yAccessor:m6.yAccessor,colorAccessor:M=>M.color.light,radiusTop:!0,radius:2},T.points[0].nodeId))}),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:Bj,renderTooltip:({tooltipData:T})=>{var B,V,j,W,E,I;const M=e.find(U=>{var z;return U.id===((z=T==null?void 0:T.nearestDatum)==null?void 0:z.datum.nodeId)}),k=((B=T==null?void 0:T.nearestDatum)==null?void 0:B.datum)&&((V=T==null?void 0:T.nearestDatum)==null?void 0:V.datum.x.length)<m;return l.jsx(v6,{xValue:(j=T==null?void 0:T.nearestDatum)==null?void 0:j.datum.x,yValue:(W=T==null?void 0:T.nearestDatum)==null?void 0:W.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!k,tooltipTitle:p,legendValue:(M==null?void 0:M.name)||"",legendDarkColor:((E=T==null?void 0:T.nearestDatum)==null?void 0:E.datum.color.dark)||Xe(0).dark,legendLightColor:((I=T==null?void 0:T.nearestDatum)==null?void 0:I.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:x??a}),"(",P.length??0,"/",$.length,")"]}),l.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(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return M&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),M.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:b.includes(M.id),onCheckedChange:k=>{let B=[...b];k?B=[...b,M.id]:B.splice(b.indexOf(M.id),1),A(B)}})})]},M.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:$.map(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),M==null?void 0:M.name]},M==null?void 0:M.id)})})]})}),Vj={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:y6,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};Of.defaultProps=Vj,Of.displayName="StackedBarChartBase";const w6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Of,{ref:t,width:n,height:r,...e})}));w6.displayName="StackedBarChart";const jj=w6,Hj=({nodes:e,selectedNodeIds:t,setSelectedNodeIds:n,seriesSelectorTitle:r})=>l.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-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:r}),"(",t.length??0,"/",e.length,")"]}),l.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})=>l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:i.light,borderColor:i.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),a]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:t.includes(o),onCheckedChange:s=>{let c=[...t];s?c=[...t,o]:c.splice(t.indexOf(o),1),n(c)}})})]},o))})]});function x6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,otherDataPoints:i=[],pointMetaData:s,seriesMetaData:c}){var p;const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Header,{label:"Review Cycle",value:(p=s==null?void 0:s.reviewCycle)==null?void 0:p.name}),l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),i.map(({label:h,value:v})=>l.jsx(ke.Item,{label:h,value:v},h)),l.jsx(ke.Footer,{nodeData:c})]})}x6.defaultProps={xValue:void 0,yValue:void 0};var Uj=["id","markerWidth","markerHeight","markerUnits","children"];function _f(){return _f=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},_f.apply(this,arguments)}function Gj(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 Df(e){var t=e.id,n=e.markerWidth,r=n===void 0?3:n,o=e.markerHeight,a=o===void 0?3:o,i=e.markerUnits,s=i===void 0?"userSpaceOnUse":i,c=e.children,u=Gj(e,Uj);return d.createElement("defs",null,d.createElement("marker",_f({id:t,markerWidth:r,markerHeight:a,markerUnits:s},u),c))}Df.propTypes={id:ie.string.isRequired,size:ie.number,markerWidth:ie.oneOfType([ie.string,ie.number]),markerHeight:ie.oneOfType([ie.string,ie.number]),markerUnits:ie.string,refX:ie.oneOfType([ie.string,ie.number]),refY:ie.oneOfType([ie.string,ie.number]),strokeWidth:ie.number,children:ie.node.isRequired};var Yj=["id","size","strokeWidth"];function Ff(){return Ff=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},Ff.apply(this,arguments)}function Xj(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 qj(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=Xj(e,Yj),s=r+a*2,c=r,u=s/2,f="0 0, "+r+" "+r/2+", 0 "+r;return d.createElement(Df,Ff({id:t,markerWidth:s,markerHeight:s,refX:c,refY:u,orient:"auto",markerUnits:"strokeWidth",fill:"none",strokeWidth:a},i),d.createElement("g",{transform:"translate("+a+", "+a+")"},d.createElement("polyline",{points:f})))}var Kj=["id","size","strokeWidth"];function If(){return If=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},If.apply(this,arguments)}function Qj(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 Zj(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=Qj(e,Kj),s=r*2,c=s+a,u=c/2;return d.createElement(Df,If({id:t,markerWidth:c,markerHeight:c,refX:0,refY:u,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:a},i),d.createElement("circle",{r,cx:u,cy:u}))}function Jj({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsxs(l.Fragment,{children:[l.jsx(Zj,{id:"marker-circle",stroke:"#666",size:6,refX:7,fill:"transparent",strokeWidth:2}),l.jsx(qj,{id:"marker-arrow",stroke:"#666",size:14,strokeWidth:2,markerUnits:"userSpaceOnUse"}),l.jsx(Wm,{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:pa,shapeRendering:"geometricPrecision",markerStart:"url(#marker-circle)",markerEnd:"url(#marker-arrow)"})]})}const Rj=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),eH=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),kl={xAccessor:e=>e==null?void 0:e.x,yAccessor:e=>e==null?void 0:e.y},C6=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,tH=10,nH=5,A6=d.forwardRef(({rowsCount:e=3,nodes:t,height:n,width:r,xAxisLabel:o,yAxisLabel:a,xAxisDomain:i,yAxisDomain:s,xAxisUnitSymbol:c,yAxisUnitSymbol:u,tooltipTitle:f,mode:p="mini",xAxisCharLimit:h,connectNulls:v=!1,maxNodesInMiniMode:g=nH,tooltipStackCharLimit:m=tH,withBackground:x=!0},y)=>{const w=d.useRef(null),b=e===1;Bn(w,y,`${o}-${a}-DirectedLineChart`);const A=d.useMemo(()=>t.map(({seriesMetaData:k},B)=>{const{employee:V}=k;return{id:V.id,name:V.name,color:Xe(B)}}).slice(0,p==="mini"?g:t.length),[t,p,g]),[C,$]=d.useState(()=>A.filter((k,B)=>p==="full"||B<g).map(k=>k.id)),P=d.useMemo(()=>t.map((k,B)=>({nodeId:k.seriesMetaData.employee.id,points:k.xValues.map((V,j)=>{var E;let W=null;return b?W=1/t.length*(B+1)+1/(t.length*10)*(j+1):W=((E=k==null?void 0:k.yValues)==null?void 0:E[j])??null,{x:k.xValues[j],y:W,pointMetaData:k.pointsMetaData[j],nodeId:k.seriesMetaData.employee.id,color:Xe(B)}})})).slice(0,p==="mini"?g:t.length),[t,p,g,b]),T=d.useMemo(()=>p==="full"?P.filter(({nodeId:k})=>C.includes(k)):P,[P,p,C]),M=d.useMemo(()=>Math.floor((r-(p==="mini"?0:150))/(t[0].xValues.length*8)),[r,p,t]);return l.jsx("div",{ref:w,id:"directed-line-chart",className:te("rabbit-ds flex flex-col",x?"bg-[white]":""),style:{width:r,height:n},children:l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{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:[l.jsx(_o,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:k=>c?C6(k,c.symbol,c.position):k,tickComponent:k=>l.jsx(Ra,{textLabel:k.formattedValue||"",x:k.x,y:k.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:h??M}),label:`${o} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(_o,{hideTicks:!0,numTicks:b?0:6,strokeWidth:b?0:1,orientation:"left",stroke:"#CFD7DF",label:a?`${a} ➔`:"",tickFormat:k=>u?C6(k,u.symbol,u.position):k,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((k,B)=>l.jsxs(l.Fragment,{children:[l.jsx(Jj,{data:k.points,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor,connectNulls:v}),l.jsx(H8,{dataKey:`Performance Management ${B}`,data:k.points,size:8,renderGlyph:Rj,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,showVerticalCrosshair:!0,showHorizontalCrosshair:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:eH,renderTooltip:({tooltipData:k})=>{var j,W,E,I,U,z,O,N,D;const B=t.find(Q=>{var q;return Q.id===((q=k==null?void 0:k.nearestDatum)==null?void 0:q.datum.nodeId)}),V=((j=k==null?void 0:k.nearestDatum)==null?void 0:j.datum)&&String((W=k==null?void 0:k.nearestDatum)==null?void 0:W.datum.x).length<m;return l.jsx(x6,{xValue:(E=k==null?void 0:k.nearestDatum)==null?void 0:E.datum.x,yValue:(I=k==null?void 0:k.nearestDatum)==null?void 0:I.datum.y,xAxisLabel:o,yAxisLabel:a,showSideBySide:!!V,tooltipTitle:f,otherDataPoints:((O=(z=(U=k==null?void 0:k.nearestDatum)==null?void 0:U.datum)==null?void 0:z.pointMetaData)==null?void 0:O.otherDataPoints)??[],seriesMetaData:B==null?void 0:B.seriesMetaData,pointMetaData:(D=(N=k==null?void 0:k.nearestDatum)==null?void 0:N.datum)==null?void 0:D.pointMetaData})}})]})}),p==="full"&&l.jsx(Hj,{nodes:A,seriesSelectorTitle:"Team members",selectedNodeIds:C,setSelectedNodeIds:$})]})})});A6.displayName="LineBase";const S6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(A6,{ref:t,width:n,height:r,...e})}));S6.displayName="DirectedLineChart";const E6=S6,rH=[{"#FFEFD4":"#AF5C20"},{"#DBF2D3":"#44812F"},{"#BFE8C6":"#1A5724"},{"#FFE7C5":"#8C6A00"},{"#FAD4D4":"#C62C02"},{"#EAEAEA":"#333333"},{"#E6F1FD":"#1565BC"},{"#FFE1D9":"#C62C02"}];function oH({box:e,showCountData:t=!1}){function n(r){if(!r)return"#333";const o=rH.find(a=>a[r]);return o?o[r]:r}return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex shrink grow basis-0 flex-col items-start",children:[l.jsx("div",{className:"flex items-start gap-2.5",children:l.jsxs("span",{className:"text-3xs",style:{color:n(n(e==null?void 0:e.color))},children:[" ",e==null?void 0:e.label]})}),t&&l.jsxs("span",{className:"text-3xs text-body-secondary",children:[e==null?void 0:e.count," Member",yb(e==null?void 0:e.count)]})]}),t&&l.jsx("div",{className:"flex items-start",children:l.jsx("div",{className:"flex items-center justify-center rounded-radius-600 bg-surface-grey-subtle/40 px-0.5",children:l.jsxs("span",{className:"text-2xs leading-400 text-body-secondary",children:[e==null?void 0:e.percentage,"%"]})})})]})}const aH=({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 f,p,h,v;const s=e===1?"OVERALL":"PERFORMANCE",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},iH=({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 f,p,h,v;const s="POTENTIAL",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},M6=d.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:c=0,mode:u="mini",showCountData:f=!1},p)=>{const h=d.useRef(null);return Bn(h,p,"GridChart"),l.jsxs("div",{ref:h,className:"flex flex-row",style:{position:o,top:c,left:s,width:i,margin:a,height:"100%"},children:[l.jsx("div",{style:{flexGrow:1,display:"grid",gridTemplateRows:iH({rows:e,columns:t,boxData:r}),gridTemplateColumns:aH({rows:e,columns:t,boxData:r}),gap:n,height:"100%"},children:r==null?void 0:r.map((v,g)=>l.jsx("div",{style:{padding:"8px",backgroundColor:(v==null?void 0:v.color)??"#CFD7DF"},children:l.jsx(oH,{box:v,showCountData:f})},v.label+v.color+g))}),u==="full"&&l.jsx("div",{className:"inline-flex w-64 shrink-0 grow-0"})]})});M6.displayName="GridChart";const $6=M6,P6=d.forwardRef(({directedLineChartProps:e,gridChartProps:t,mode:n="mini"},r)=>{const o=d.useRef(null);return Bn(o,r,`${e.xAxisLabel}-${e.yAxisLabel}-GridDirectedLineChart`),l.jsxs("div",{ref:o,className:"relative h-full w-full",children:[l.jsx("div",{className:"absolute mx-[50px] mb-[50px] mt-[10px] h-[calc(100%-60px)] w-[calc(100%-100px)]",children:l.jsx($6,{...t,mode:n})}),l.jsxs("div",{className:"absolute h-full w-full",children:[l.jsx(E6,{...e,mode:n}),l.jsx("div",{})]})]})});P6.displayName="GridDirectedLineChart";const sH=P6,Nl="ToggleGroup",[T6,GY]=rt(Nl,[io]),k6=io(),lH=d.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return d.createElement(cH,K({},o,{ref:t}))}if(n==="multiple"){const o=r;return d.createElement(uH,K({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Nl}\``)}),[N6,O6]=T6(Nl),cH=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=ut({prop:n,defaultProp:r,onChange:o});return d.createElement(N6,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:s,onItemDeactivate:d.useCallback(()=>s(""),[s])},d.createElement(_6,K({},a,{ref:t})))}),uH=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=ut({prop:n,defaultProp:r,onChange:o}),c=d.useCallback(f=>s((p=[])=>[...p,f]),[s]),u=d.useCallback(f=>s((p=[])=>p.filter(h=>h!==f)),[s]);return d.createElement(N6,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u},d.createElement(_6,K({},a,{ref:t})))}),[dH,fH]=T6(Nl),_6=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:s=!0,...c}=e,u=k6(n),f=Hn(i),p={role:"group",dir:f,...c};return d.createElement(dH,{scope:n,rovingFocus:o,disabled:r},o?d.createElement(qc,K({asChild:!0},u,{orientation:a,dir:f,loop:s}),d.createElement(be.div,K({},p,{ref:t}))):d.createElement(be.div,K({},p,{ref:t})))}),Lf="ToggleGroupItem",pH=d.forwardRef((e,t)=>{const n=O6(Lf,e.__scopeToggleGroup),r=fH(Lf,e.__scopeToggleGroup),o=k6(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,s={...e,pressed:a,disabled:i},c=d.useRef(null);return r.rovingFocus?d.createElement(Kc,K({asChild:!0},o,{focusable:!i,active:a,ref:c}),d.createElement(D6,K({},s,{ref:t}))):d.createElement(D6,K({},s,{ref:t}))}),D6=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=O6(Lf,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?i:void 0;return d.createElement(P1,K({},s,o,{ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}}))}),hH=lH,gH=pH;function vH({children:e,...t}){return l.jsx(hH,{className:"flex gap-2",...t,children:e})}function mH({value:e,disabled:t,selected:n,icon:r,label:o,count:a,...i}){return l.jsx(gH,{asChild:!0,value:e,...i,children:l.jsx("button",{"data-deer-btn":!0,type:"button",className:te("rabbit-ds inline-flex h-7 w-auto flex-col items-center justify-center rounded-radius-round border border-solid p-0 hover:cursor-pointer","data-[state=off]:border-card-grey-subtle data-[state=off]:bg-surface-grey-subtle data-[state=off]:text-body-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:l.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 rounded-radius-round px-4 py-1",children:[r?l.jsx(Ae,{IconSVG:r,size:"small"}):null,l.jsxs("div",{className:"text-sm font-semibold",children:[o?l.jsx("span",{children:o}):null," ",a?l.jsxs("span",{children:["(",a,")"]}):null]})]})})})}const ei="NavigationMenu",[Bf,bH,yH]=wr(ei),[zf,wH,xH]=wr(ei),[Wf,YY]=rt(ei,[yH,xH]),[CH,jr]=Wf(ei),[AH,XY]=Wf(ei),SH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:c="horizontal",dir:u,...f}=e,[p,h]=d.useState(null),v=Me(t,M=>h(M)),g=Hn(u),m=d.useRef(0),x=d.useRef(0),y=d.useRef(0),[w,b]=d.useState(!0),[A="",C]=ut({prop:r,onChange:M=>{const k=M!=="",B=s>0;k?(window.clearTimeout(y.current),B&&b(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>b(!0),s)),o==null||o(M)},defaultProp:a}),$=d.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>C(""),150)},[C]),P=d.useCallback(M=>{window.clearTimeout(x.current),C(M)},[C]),T=d.useCallback(M=>{A===M?window.clearTimeout(x.current):m.current=window.setTimeout(()=>{window.clearTimeout(x.current),C(M)},i)},[A,C,i]);return d.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(x.current),window.clearTimeout(y.current)},[]),d.createElement(EH,{scope:n,isRootMenu:!0,value:A,dir:g,orientation:c,rootNavigationMenu:p,onTriggerEnter:M=>{window.clearTimeout(m.current),w?T(M):P(M)},onTriggerLeave:()=>{window.clearTimeout(m.current),$()},onContentEnter:()=>window.clearTimeout(x.current),onContentLeave:$,onItemSelect:M=>{C(k=>k===M?"":M)},onItemDismiss:()=>C("")},d.createElement(be.nav,K({"aria-label":"Main","data-orientation":c,dir:g},f,{ref:v})))}),EH=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:i,value:s,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:h,onContentLeave:v}=e,[g,m]=d.useState(null),[x,y]=d.useState(new Map),[w,b]=d.useState(null);return d.createElement(CH,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:oi(s),baseId:dt(),dir:o,orientation:a,viewport:g,onViewportChange:m,indicatorTrack:w,onIndicatorTrackChange:b,onTriggerEnter:Je(f),onTriggerLeave:Je(p),onContentEnter:Je(h),onContentLeave:Je(v),onItemSelect:Je(c),onItemDismiss:Je(u),onViewportContentChange:d.useCallback((A,C)=>{y($=>($.set(A,C),new Map($)))},[]),onViewportContentRemove:d.useCallback(A=>{y(C=>C.has(A)?(C.delete(A),new Map(C)):C)},[])},d.createElement(Bf.Provider,{scope:t},d.createElement(AH,{scope:t,items:x},i)))},MH="NavigationMenuList",$H=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(MH,n),a=d.createElement(be.ul,K({"data-orientation":o.orientation},r,{ref:t}));return d.createElement(be.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange},d.createElement(Bf.Slot,{scope:n},o.isRootMenu?d.createElement(B6,{asChild:!0},a):a))}),PH="NavigationMenuItem",[TH,F6]=Wf(PH),kH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=dt(),i=r||a||"LEGACY_REACT_AUTO_VALUE",s=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(()=>{}),p=d.useRef(!1),h=d.useCallback((g="start")=>{if(s.current){f.current();const m=Vf(s.current);m.length&&jf(g==="start"?m:m.reverse())}},[]),v=d.useCallback(()=>{if(s.current){const g=Vf(s.current);g.length&&(f.current=BH(g))}},[]);return d.createElement(TH,{scope:n,value:i,triggerRef:c,contentRef:s,focusProxyRef:u,wasEscapeCloseRef:p,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:v,onContentFocusOutside:v},d.createElement(be.li,K({},o,{ref:t})))}),I6="NavigationMenuTrigger",NH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=jr(I6,e.__scopeNavigationMenu),i=F6(I6,e.__scopeNavigationMenu),s=d.useRef(null),c=Me(s,i.triggerRef,t),u=j6(a.baseId,i.value),f=H6(a.baseId,i.value),p=d.useRef(!1),h=d.useRef(!1),v=i.value===a.value;return d.createElement(d.Fragment,null,d.createElement(Bf.ItemSlot,{scope:n,value:i.value},d.createElement(W6,{asChild:!0},d.createElement(be.button,K({id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":V6(v),"aria-expanded":v,"aria-controls":f},o,{ref:c,onPointerEnter:fe(e.onPointerEnter,()=>{h.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:fe(e.onPointerMove,Hf(()=>{r||h.current||i.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(i.value),p.current=!0)})),onPointerLeave:fe(e.onPointerLeave,Hf(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:fe(e.onClick,()=>{a.onItemSelect(i.value),h.current=v}),onKeyDown:fe(e.onKeyDown,g=>{const x={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];v&&g.key===x&&(i.onEntryKeyDown(),g.preventDefault())})})))),v&&d.createElement(d.Fragment,null,d.createElement(Rh,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:g=>{const m=i.contentRef.current,x=g.relatedTarget,y=x===s.current,w=m==null?void 0:m.contains(x);(y||!w)&&i.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&d.createElement("span",{"aria-owns":f})))}),L6="navigationMenu.linkSelect",OH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return d.createElement(W6,{asChild:!0},d.createElement(be.a,K({"data-active":r?"":void 0,"aria-current":r?"page":void 0},a,{ref:t,onClick:fe(e.onClick,i=>{const s=i.target,c=new CustomEvent(L6,{bubbles:!0,cancelable:!0});if(s.addEventListener(L6,u=>o==null?void 0:o(u),{once:!0}),ii(s,c),!c.defaultPrevented&&!i.metaKey){const u=new CustomEvent(_l,{bubbles:!0,cancelable:!0});ii(s,u)}},{checkForDefaultPrevented:!1})})))}),Ol="NavigationMenuContent",_H=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=jr(Ol,e.__scopeNavigationMenu),a=F6(Ol,e.__scopeNavigationMenu),i=Me(a.contentRef,t),s=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?d.createElement(DH,K({forceMount:n},c,{ref:i})):d.createElement(Tt,{present:n||s},d.createElement(FH,K({"data-state":V6(s)},c,{ref:i,onPointerEnter:fe(e.onPointerEnter,o.onContentEnter),onPointerLeave:fe(e.onPointerLeave,Hf(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...c.style}})))}),DH=d.forwardRef((e,t)=>{const n=jr(Ol,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ht(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ht(()=>()=>o(e.value),[e.value,o]),null}),_l="navigationMenu.rootContentDismiss",FH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:c,...u}=e,f=jr(Ol,n),p=d.useRef(null),h=Me(p,t),v=j6(f.baseId,r),g=H6(f.baseId,r),m=bH(n),x=d.useRef(null),{onItemDismiss:y}=f;d.useEffect(()=>{const b=p.current;if(f.isRootMenu&&b){const A=()=>{var C;y(),s(),b.contains(document.activeElement)&&((C=o.current)===null||C===void 0||C.focus())};return b.addEventListener(_l,A),()=>b.removeEventListener(_l,A)}},[f.isRootMenu,e.value,o,y,s]);const w=d.useMemo(()=>{const A=m().map(k=>k.value);f.dir==="rtl"&&A.reverse();const C=A.indexOf(f.value),$=A.indexOf(f.previousValue),P=r===f.value,T=$===A.indexOf(r);if(!P&&!T)return x.current;const M=(()=>{if(C!==$){if(P&&$!==-1)return C>$?"from-end":"from-start";if(T&&C!==-1)return C>$?"to-start":"to-end"}return null})();return x.current=M,M},[f.previousValue,f.value,f.dir,m,r]);return d.createElement(B6,{asChild:!0},d.createElement(Xo,K({id:g,"aria-labelledby":v,"data-motion":w,"data-orientation":f.orientation},u,{ref:h,onDismiss:()=>{var b;const A=new Event(_l,{bubbles:!0,cancelable:!0});(b=p.current)===null||b===void 0||b.dispatchEvent(A)},onFocusOutside:fe(e.onFocusOutside,b=>{var A;c();const C=b.target;(A=f.rootNavigationMenu)!==null&&A!==void 0&&A.contains(C)&&b.preventDefault()}),onPointerDownOutside:fe(e.onPointerDownOutside,b=>{var A;const C=b.target,$=m().some(T=>{var M;return(M=T.ref.current)===null||M===void 0?void 0:M.contains(C)}),P=f.isRootMenu&&((A=f.viewport)===null||A===void 0?void 0:A.contains(C));($||P||!f.isRootMenu)&&b.preventDefault()}),onKeyDown:fe(e.onKeyDown,b=>{const A=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!A){const P=Vf(b.currentTarget),T=document.activeElement,M=P.findIndex(V=>V===T),B=b.shiftKey?P.slice(0,M).reverse():P.slice(M+1,P.length);if(jf(B))b.preventDefault();else{var $;($=a.current)===null||$===void 0||$.focus()}}}),onEscapeKeyDown:fe(e.onEscapeKeyDown,b=>{i.current=!0})})))}),IH="FocusGroup",B6=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(IH,n);return d.createElement(zf.Provider,{scope:n},d.createElement(zf.Slot,{scope:n},d.createElement(be.div,K({dir:o.dir},r,{ref:t}))))}),z6=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],LH="FocusGroupItem",W6=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=wH(n),a=jr(LH,n);return d.createElement(zf.ItemSlot,{scope:n},d.createElement(be.button,K({},r,{ref:t,onKeyDown:fe(e.onKeyDown,i=>{if(["Home","End",...z6].includes(i.key)){let c=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&c.reverse(),z6.includes(i.key)){const p=c.indexOf(i.currentTarget);c=c.slice(p+1)}setTimeout(()=>jf(c)),i.preventDefault()}})})))});function Vf(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 jf(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function BH(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 V6(e){return e?"open":"closed"}function j6(e,t){return`${e}-trigger-${t}`}function H6(e,t){return`${e}-content-${t}`}function Hf(e){return t=>t.pointerType==="mouse"?e(t):void 0}const zH=SH,WH=$H,VH=kH,jH=NH,U6=OH,HH=_H,UH=Ge(["rabbit-ds h-full w-full px-3 py-2 [&>*:first-child]:h-full"],{variants:{variant:{default:""},defaultVariant:{variant:"default"}}});function GH(){return l.jsx("div",{className:"relative h-full w-full",children:l.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:[l.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"}}),l.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"}}),l.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"}}),l.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"}}),l.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)"}}),l.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 G6=d.forwardRef(({className:e,children:t,...n},r)=>l.jsxs("div",{className:"rabbit-ds relative h-screen w-20",children:[l.jsx("div",{className:"absolute h-full w-full",children:l.jsx(GH,{})}),l.jsx(zH,{className:te(UH({className:e})),orientation:"vertical",ref:r,...n,children:l.jsx(WH,{className:"m-0 flex h-full flex-col p-0",children:t})})]}));G6.displayName="LeftNav";const Uf=d.forwardRef(({children:e,asChild:t=!1,...n},r)=>{const o=t?dn:"div";return l.jsx(VH,{asChild:!0,children:l.jsx(o,{ref:r,className:"rabbit-ds",...n,children:e})})});Uf.displayName="LeftNavItem",Uf.defaultProps={asChild:!1};const YH=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"}}}),Y6=d.forwardRef(({children:e,align:t,...n},r)=>l.jsx("div",{ref:r,className:te(YH({variant:t})),...n,children:e}));Y6.displayName="LeftNavItem";const X6=d.forwardRef((e,t)=>l.jsx(U6,{ref:t,...e,className:"rabbit-ds z-20 flex size-1400 h-1400 w-1400 cursor-pointer items-center justify-center rounded-radius-100 border-none bg-transparent focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",children:l.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:[l.jsx("g",{clipPath:"url(#clip0_1397_29183)",children:l.jsxs("g",{clipPath:"url(#clip1_1397_29183)",filter:"url(#filter0_d_1397_29183)",children:[l.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"}),l.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"}),l.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"}),l.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"}),l.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"}),l.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"}),l.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"}),l.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"})]})}),l.jsxs("defs",{children:[l.jsxs("filter",{id:"filter0_d_1397_29183",x:"-8",y:"-6",width:"40",height:"40",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),l.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"}),l.jsx("feOffset",{dy:"2"}),l.jsx("feGaussianBlur",{stdDeviation:"4"}),l.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),l.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"}),l.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1397_29183"}),l.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1397_29183",result:"shape"})]}),l.jsx("clipPath",{id:"clip0_1397_29183",children:l.jsx("rect",{width:"24",height:"24",rx:"8",fill:"white"})}),l.jsx("clipPath",{id:"clip1_1397_29183",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})]})]})}));X6.displayName="LeftNavHome";const XH=Ge(["rabbit-ds relative flex h-14 w-14 items-center justify-center rounded-radius-200 font-sans text-[10px] text-body-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"}}),qH=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"}}),q6=d.forwardRef(({className:e,variant:t,badgeText:n,icon:r,iconSize:o,isActive:a=!1,children:i,...s},c)=>l.jsx("div",{className:"rabbit-ds",children:l.jsxs(U6,{"data-deer-btn":!0,className:te(XH({variant:t,className:e})),ref:c,"data-active":a,...s,children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsxs("div",{className:"relative flex items-center justify-center",children:[l.jsx(Ae,{IconSVG:r,size:"large"}),t==="withNotification"&&l.jsxs("div",{className:"absolute left-3 flex h-5 w-6 items-center justify-center rounded-radius-300 bg-functional-warn px-2 text-xs text-white",children:[l.jsx("span",{className:"sr-only",children:"Notification"}),n]})]}),l.jsx("div",{className:te(qH({variant:t==="gradient"?t:"default"}),"text-xs"),children:i})]}),t==="withMenu"&&l.jsx("div",{className:"absolute right-0 flex h-14 w-3 items-center justify-center",children:l.jsx(Ae,{IconSVG:b1,size:"large"})})]})}));q6.displayName="LeftNavButton";const KH=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 QH({className:e,isCollapsed:t,...n}){return l.jsx("button",{"data-deer-btn":!0,type:"button",className:te(KH({variant:t?"collapsed":"default"}),e),...n,children:l.jsx(Ae,{IconSVG:p1,className:t?"rotate-180":""})})}const K6=d.createContext({isOpen:!1,toggleOpen:()=>{}}),ZH=()=>d.useContext(K6);function Q6({...e}){const{isOpen:t,toggleOpen:n}=ZH();return l.jsx(QH,{className:`absolute right-0 top-5 z-20 ${t?"":"translate-x-full"}`,isCollapsed:!t,onClick:n,...e})}function JH(e){const{children:t,defaultOpen:n=!1}=e,r=e.open!==void 0,[o,a]=d.useState(n),i=d.useCallback(()=>{a(f=>!f)},[]),s=r?e.open:o,c=r?e.onToggle:i,u=d.useMemo(()=>({isOpen:s,toggleOpen:c}),[s,c]);return l.jsx(K6.Provider,{value:u,children:l.jsxs("div",{className:te("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:[l.jsx(Q6,{}),l.jsx("div",{className:s?"h-full p-5":"invisible h-0 w-0 scale-0 overflow-hidden opacity-0",children:t})]})})}function RH({children:e}){return l.jsx("div",{className:te("nav-group flex flex-col gap-1","after:my-4 after:h-[1px] after:w-full after:bg-accent last:after:hidden"),children:e})}function eU({children:e}){return l.jsx("div",{className:"p-2 text-xs font-semibold text-body-secondary",children:e})}function tU({children:e,...t}){return l.jsx(Zh,{...t,children:e})}const nU=Ge("max-w-[28%] shrink-0",{variants:{orientation:{horizontal:"ml-2",vertical:"mt-2 w-full [&>div]:w-full [&_button]:w-full"}},defaultVariants:{orientation:"horizontal"}});function rU({className:e,orientation:t,...n}){return l.jsx("div",{className:nU({orientation:t}),children:l.jsx(Dt,{className:te(e,"h-auto min-h-10"),variant:"transparentOutline",...n})})}const oU={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"}},aU=d.forwardRef(function({title:t,achieved:n,status:r,explanation:o,truncateExplanation:a=!0},i){const s=oU[r];return l.jsx("div",{ref:i,className:te("rabbit-ds","mr-auto",a?"w-[70%]":""),children:l.jsxs("div",{className:"flex w-full flex-col gap-1",children:[l.jsxs("div",{className:"mt-1 flex items-center",children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:m1}),l.jsx("div",{className:"ml-1 text-sm",children:t})]}),l.jsxs("div",{className:"my-1 flex items-end gap-[18px]",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-xs text-body-secondary",children:"Achieved"}),l.jsxs("span",{className:te(s.colorScheme,"!bg-transparent text-3xl font-semibold"),children:[n,"%"]})]}),l.jsx(N3,{colorScheme:s.colorScheme,className:"mb-1",children:s.label})]}),o&&l.jsxs("div",{className:te("flex w-full gap-1",a?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",a?"truncate":""),children:o})]})]})})});function iU({employeeName:e,employeeProfilePhoto:t,reviewCycleName:n,reviewType:r,dueBy:o}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:r})]}),l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"text-body-secondary",children:[n," • "]}),l.jsxs("span",{className:"text-body-secondary",children:["Due by ",o]})]})]})]})})}const Z6=d.forwardRef(({employeeName:e,employeeProfilePhoto:t,designation:n,explanation:r,truncateExplanation:o=!0},a)=>l.jsx("div",{ref:a,className:te("rabbit-ds mr-auto",o?"w-[65%]":""),children:l.jsxs("div",{className:"flex w-full gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:te("flex w-full flex-col items-start text-sm","justify-center"),children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:n})]}),r&&l.jsxs("div",{className:te("mt-1 flex w-full gap-1",o?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",o?"truncate":""),children:r})]})]})]})}));Z6.displayName="SharePraiseNudgeData";const J6=d.forwardRef(({employeeName:e,employeeProfilePhoto:t,designation:n,requestReason:r,truncateExplanation:o=!0},a)=>l.jsx("div",{ref:a,className:te("rabbit-ds mr-auto",o?"w-[65%]":""),children:l.jsxs("div",{className:"flex w-full gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex w-full flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:n})]}),l.jsxs("div",{className:te("mt-1 flex w-full gap-1",o?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",o?"truncate":""),children:r})]})]})]})}));J6.displayName="RequestedFeedbackNudgeData";const sU=Ge("",{variants:{orientation:{horizontal:"flex-row",vertical:"min-w-max flex-col"}},defaultVariants:{orientation:"horizontal"}});function lU({className:e,children:t,orientation:n}){return l.jsx("div",{className:te("rabbit-ds","flex w-full items-center rounded-radius-200 border border-solid border-[#F3F5F8] bg-[#FDFDFD] p-2",sU({orientation:n}),e),children:t})}function cU({nudgeCardList:e,title:t,imgSrc:n,description:r,pageSize:o=3,kebabMenu:a,variant:i="default"}){const[s,c]=d.useState(1),u=e.slice(0,o*s),f=e.length>o,p=e.length===u.length,h=i==="informational",v=()=>{c(g=>p?1:g+1)};return l.jsxs("div",{className:te("rabbit-ds","flex w-full flex-col items-start gap-[7px] rounded-radius-200 bg-white px-4 py-3 shadow-[0px_0px_2px_0px_rgba(0,0,0,0.24)]"),children:[l.jsxs("div",{className:"flex w-full items-start justify-between",children:[l.jsxs("div",{className:"mt-1 flex items-center gap-4",children:[n?l.jsx(hn,{className:"h-16 w-16",children:l.jsx(gn,{src:n,alt:t})}):null,h?l.jsx("div",{className:"flex flex-col gap-[7px]",children:u}):l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-semibold",children:t}),l.jsx("span",{className:"text-sm",children:r})]})]}),a]}),!h&&u,f&&l.jsx("div",{className:"mx-auto",children:l.jsxs(Dt,{variant:"text",onClick:v,iconRight:p?d1:Gr,children:["View ",p?"less":"more"]})})]})}function uU({surveyName:e,date:t}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ae,{IconSVG:x1}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsx("span",{className:"font-semibold",children:e}),l.jsx(Dc,{date:t,showRelativeTime:!0})]})]})})}const R6=d.forwardRef(function({employeeProfilePhoto:t,employeeName:n,scheduleDate:r,duration:o,subTitle:a,explanation:i,truncateExplanation:s=!0},c){return l.jsx("div",{ref:c,className:te("rabbit-ds","mr-auto",s?"w-[70%]":""),children:l.jsxs("div",{className:te("flex items-center gap-2 text-sm","flex-row [&>div]:items-start"),children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:n})}),l.jsxs("div",{className:"flex w-full flex-col items-center gap-1",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[n," • "]}),r?l.jsx(Dc,{date:r,duration:o,timeFormat:"HH:mm a",showTime:!0,className:"text-body-secondary"}):l.jsx("span",{className:"font-semibold",style:{color:"#C62C02"},children:a})]}),i&&l.jsxs("div",{className:te("flex w-[90%] gap-1",s?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",s?"truncate":""),children:i})]})]})]})})});R6.defaultProps={subTitle:void 0,scheduleDate:void 0};function dU({label:e,onClick:t,customCompProps:n}){const[r,o]=d.useState(1);return l.jsxs(ru,{children:[l.jsx(Qi,{children:l.jsx("span",{children:e})}),l.jsx(nu,{children:l.jsx(Zi,{children:l.jsx(so,{children:l.jsxs("div",{className:"flex flex-col p-2",children:[l.jsx(Ql,{htmlFor:n==null?void 0:n.label,className:"text-xs",children:n==null?void 0:n.label}),l.jsx(T1,{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}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Dt,{className:"mt-2",onClick:()=>t(r),disabled:r<1||Number.isNaN(r),children:n==null?void 0:n.buttonText})})]})})})})]})}function fU({options:e}){const[t,n]=d.useState(!1),r=(o,a)=>{o(a),n(!1)};return l.jsxs(Xi,{open:t,children:[l.jsx(qi,{asChild:!0,onClick:()=>n(!0),children:l.jsx(Dt,{variant:"text",size:"smallIcon",children:l.jsx(Ae,{IconSVG:v1})})}),l.jsx(oa,{className:"w-56",onFocusOutside:()=>n(!1),onPointerDownOutside:()=>n(!1),children:l.jsx(so,{children:e.map(({type:o,onClick:a,label:i,customCompProps:s})=>!o||o==="default"?l.jsx(aa,{onClick:()=>r(a),children:l.jsx("span",{children:i})},i):l.jsx(dU,{onClick:c=>r(a,c),label:i,customCompProps:s},i))})})]})}const e7=aa,t7=so,n7=Ki,r7=es,o7=Ji,a7=Ri,i7=d.forwardRef(({className:e,children:t,align:n="end",...r},o)=>l.jsx(oa,{ref:o,align:n,...r,children:t}));i7.displayName="SplitButtonDropdownContent";const pU=Ge("",{variants:{size:{normal:"icon",small:"smallIcon",icon:"icon",smallIcon:"smallIcon",nav:"icon"}},defaultVariants:{size:"normal"}});function hU({children:e,size:t,status:n,variant:r,...o}){return l.jsx("div",{className:"rabbit-ds flex flex-row",children:l.jsxs(Xi,{children:[l.jsx(Dt,{variant:r,status:n,size:t,...o,className:"rounded-r-none",children:e}),l.jsx(qi,{asChild:!0,children:l.jsx(Dt,{variant:r,status:n,className:"rounded-l-none border-l-0",size:pU({size:t}),iconLeft:Gr})})]})})}e7.displayName="SplitButtonDropdownItem",t7.displayName="SplitButtonDropdownGroup",n7.displayName="SplitButtonDropdownRadioGroup",r7.displayName="SplitButtonDropdownLabel",o7.displayName="SplitButtonDropdownCheckboxItem",a7.displayName="SplitButtonDropdownRadioItem";const s7=({bold:e=!1,xbold:t=!1,color:n="text-body-primary"})=>te("rabbit-ds-text",t?"font-bold":e?"font-semibold":"font-normal",n),gU=({children:e,className:t,...n})=>l.jsx("h3",{className:te("text-350sm leading-500",s7(n),t),children:e}),vU=({children:e,className:t,...n})=>l.jsx("p",{className:te("text-300sm leading-400",s7(n),t),children:e}),l7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("rabbit-ds flex gap-200 p-300",t),...n,ref:r,children:e}));l7.displayName="ListItemComp";const c7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));c7.displayName="ListItemCompLeading";const u7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("flex grow flex-col justify-center",t),...n,ref:r,children:e}));u7.displayName="ListItemCompContent";const d7=({children:e,className:t,...n})=>l.jsx(gU,{bold:!0,className:te("text-body-primary",t),...n,children:e});d7.displayName="ListItemCompTitle";const f7=({children:e,className:t,...n})=>l.jsx(vU,{className:te("text-body-secondary",t),...n,children:e});f7.displayName="ListItemCompDescription";const p7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));p7.displayName="ListItemCompAction",_.AICard=Hy,_.Accordion=$2,_.AccordionContent=k2,_.AccordionItem=P2,_.AccordionTrigger=T2,_.Add=wb,_.AddPerson=xb,_.Alert=N2,_.AlertDescription=_2,_.AlertDialogAction=Cp,_.AlertDialogCancel=xp,_.AlertDialogComponent=Qx,_.AlertDialogContainer=yp,_.AlertDialogContent=Pc,_.AlertDialogDescription=kc,_.AlertDialogOverlay=$c,_.AlertDialogPortal=wp,_.AlertDialogTitle=Tc,_.AlertDialogTrigger=Ap,_.AlertIcon=O2,_.Avatar=hn,_.AvatarBadge=ts,_.AvatarFallback=Pi,_.AvatarGroup=Mu,_.AvatarImage=gn,_.Breadcrumb=B3,_.BreadcrumbEllipsis=U3,_.BreadcrumbItem=W3,_.BreadcrumbLink=V3,_.BreadcrumbList=z3,_.BreadcrumbPage=j3,_.BreadcrumbSeparator=H3,_.Button=Dt,_.Calendar=Cb,_.Caption=Nc,_.Card=Yo,_.CardContent=oc,_.CardDescription=o2,_.CardHeader=r2,_.CardKPI=SP,_.CardTitle=rc,_.Carousel=kT,_.CarouselContainer=NT,_.CarouselNextButton=_T,_.CarouselPrevButton=OT,_.Channel=Ab,_.Check=Ho,_.CheckCircleOutline=l1,_.Checkbox=ci,_.ChevronDown=Gr,_.ChevronLeft=Sb,_.ChevronLeftCircle=c1,_.ChevronRight=li,_.ChevronRightCircle=u1,_.ChevronUp=d1,_.Chip=P9,_.ChipGroup=vH,_.ChipGroupItem=mH,_.CircleChevronRight=Eb,_.Close=f1,_.CollapseNavigation=p1,_.CollapsibleCard=My,_.ColumnFilter=h1,_.ColumnFilterCheck=C1,_.Company=Mb,_.CompanySettings=$b,_.Country=Pb,_.Cross=Tb,_.Currency=kb,_.DateTime=Dc,_.Delete=Nb,_.Develop=Ob,_.DirectedLineChart=E6,_.DisplayName=_b,_.DonutChart=Ij,_.Download=Db,_.Dropdown=Xi,_.DropdownCheckboxItem=Ji,_.DropdownChip=Kh,_.DropdownContent=oa,_.DropdownGroup=so,_.DropdownItem=aa,_.DropdownLabel=es,_.DropdownPortal=nu,_.DropdownRadioGroup=Ki,_.DropdownRadioItem=Ri,_.DropdownSeparator=ou,_.DropdownSub=ru,_.DropdownSubContent=Zi,_.DropdownSubTrigger=Qi,_.DropdownTrigger=qi,_.EmployeeIdBadge=Fb,_.Engagement=Ib,_.EngagementNudgeData=uU,_.ErrorOutline=ql,_.ExpandDown=Lb,_.ExpandRight=g1,_.Feedback=Bb,_.Gear=zb,_.Goal=Wb,_.GoalFrequency=Vb,_.GoalsCollaborators=jb,_.GoalsNudgeData=aU,_.GridChart=$6,_.GridDirectedLineChart=sH,_.Help=Hb,_.Help2=Ub,_.HistogramChart=_j,_.HistoryComments=Gb,_.Home=Yb,_.HoverCard=yP,_.HoverCardContent=gg,_.HoverCardPortal=xP,_.HoverCardTrigger=wP,_.Icon=Ae,_.Info=Xb,_.InfoWorkZero=br,_.Initiatives=qb,_.Input=T1,_.KebabMenu=v1,_.KnowTeamNudgeData=R6,_.Label=Ql,_.LeftNav=G6,_.LeftNavButton=q6,_.LeftNavGroup=Y6,_.LeftNavHome=X6,_.LeftNavItem=Uf,_.LeftNavItemContent=HH,_.LeftNavItemDropdown=Xi,_.LeftNavItemDropdownCheckboxItem=Ji,_.LeftNavItemDropdownContent=oa,_.LeftNavItemDropdownGroup=so,_.LeftNavItemDropdownItem=aa,_.LeftNavItemDropdownLabel=es,_.LeftNavItemDropdownPortal=nu,_.LeftNavItemDropdownRadioGroup=Ki,_.LeftNavItemDropdownRadioItem=Ri,_.LeftNavItemDropdownSeparator=ou,_.LeftNavItemDropdownSub=ru,_.LeftNavItemDropdownSubContent=Zi,_.LeftNavItemDropdownSubTrigger=Qi,_.LeftNavItemDropdownTrigger=qi,_.LeftNavItemTrigger=jH,_.LineChart=mj,_.ListItem=Zh,_.ListItemComp=l7,_.ListItemCompAction=p7,_.ListItemCompContent=u7,_.ListItemCompDescription=f7,_.ListItemCompLeading=c7,_.ListItemCompTitle=d7,_.ListItemIcon=BE,_.ListItemText=IE,_.Logout=Kb,_.Manager=Qb,_.ManagerWithBorder=Zb,_.MeshLogo=A1,_.MeshMaven=w9,_.MeshMavenAsk=x9,_.MeshMavenDisabledThumbsUp=C9,_.MeshMavenGlassesOnDefault=A9,_.MeshMavenWithHording=S9,_.MeshMavenWithOrangeBulb=E9,_.MeshMavenWithThumbsUp=M9,_.Metric=yg,_.MetricCard=bg,_.MetricCardStatText=Tu,_.MetricCardText=ps,_.MetricCardTitle=wg,_.Milestone=Jb,_.MyOneOnOne=Rb,_.MySettings=e9,_.NavCollapseButtonL2=Q6,_.NavGroupL2=RH,_.NavGroupTitleL2=eU,_.NavItemL2=tU,_.NavL2=JH,_.NewPassword=t9,_.Notifications=n9,_.NudgeAction=rU,_.NudgeCard=cU,_.NudgeCardItem=lU,_.NudgeKebabMenu=fU,_.Objective=m1,_.OneOnOne=r9,_.Overflow=b1,_.Peer=o9,_.Person=a9,_.Product=i9,_.ProfileCard=ku,_.ProfileCardItem=xg,_.ProfileCardKey=Cg,_.ProfileCardValue=Ag,_.ProgressBar=W1,_.ProgressInfo=CP,_.ProgressSlider=gy,_.RadarChart=Lj,_.RequestFeedback=s9,_.RequestedFeedbackNudgeData=J6,_.Reset=l9,_.Reviews=c9,_.ReviewsNudgeData=iU,_.Role=u9,_.SankeyChart=$j,_.Search=y1,_.Select=MM,_.SelectContent=h3,_.SelectGroup=$M,_.SelectItem=v3,_.SelectLabel=g3,_.SelectSeparator=m3,_.SelectTrigger=p3,_.SelectValue=PM,_.SelfScore=d9,_.Settings=f9,_.SettingsFeedback=p9,_.SettingsGoals=h9,_.SettingsSchedule=g9,_.ShareFeedback=v9,_.SharePraiseNudgeData=Z6,_.SliderDrag=w1,_.SplitButton=hU,_.SplitButtonDropdownCheckboxItem=o7,_.SplitButtonDropdownContent=i7,_.SplitButtonDropdownGroup=t7,_.SplitButtonDropdownItem=e7,_.SplitButtonDropdownLabel=r7,_.SplitButtonDropdownRadioGroup=n7,_.SplitButtonDropdownRadioItem=a7,_.SplitDetails=m9,_.StackedBarChart=jj,_.Survey=x1,_.Switch=jy,_.Tabs=$3,_.TabsContent=k3,_.TabsList=P3,_.TabsTrigger=T3,_.Tag=N3,_.Task=b9,_.Team=y9,_.Toaster=F$,_.Tooltip=gu,_.TooltipContent=ss,_.TooltipPortal=mu,_.TooltipProvider=hu,_.TooltipTrigger=vu,_.TrendingDown=S1,_.TrendingUp=E1,_.getInitialsFromName=Tp,_.toast=E$,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
96
+ `}),R.appendChild(G.createTextNode(Pt))}ee.timeEnd("clone node"),me==null||me(Ne),ge!==!1&&re(Ne)&&(ee.time("embed web font"),yield PU(Ne,H),ee.timeEnd("embed web font")),ee.time("embed node"),A7(Ne,H);const Fe=ce.length;let Ie=0;const qe=()=>m(this,null,function*(){for(;;){const Pt=ce.pop();if(!Pt)break;try{yield Pt}catch(Vn){_e("Failed to run task",Vn)}ve==null||ve(++Ie,Fe)}});ve==null||ve(Ie,Fe),yield Promise.all([...Array(4)].map(qe)),ee.timeEnd("embed node"),$e==null||$e(Ne);const je=LU(Ne,H);return le&&je.insertBefore(le,je.children[0]),R&&je.insertBefore(R,je.children[0]),we&&m7(H),Ee==null||Ee(je),je})}function LU(S,L){const{width:H,height:G}=L,ee=zt(H,G,S.ownerDocument),ce=ee.ownerDocument.createElementNS(ee.namespaceURI,"foreignObject");return ce.setAttributeNS(null,"x","0%"),ce.setAttributeNS(null,"y","0%"),ce.setAttributeNS(null,"width","100%"),ce.setAttributeNS(null,"height","100%"),ce.append(S),ee.appendChild(ce),ee}function Wl(S,L){return m(this,null,function*(){var H;const G=yield Wt(S,L),ee=yield S7(G),ce=tt(ee,G.isEnable("removeControlCharacter"));G.autoDestruct||(G.svgStyleElement=$t(G.ownerDocument),G.svgDefsElement=(H=G.ownerDocument)==null?void 0:H.createElementNS(Bt,"defs"),G.svgStyles.clear());const R=Qe(ce,ee.ownerDocument);return yield zn(R,G)})}function BU(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{log:G,type:ee,quality:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to blob");const pe=yield fr(le,ee,ce);if(["image/png","image/jpeg"].includes(ee)&&R){const ge=yield ct(pe.slice(0,33));let ve=new Uint8Array(ge);return ee==="image/png"?ve=M(ve,R):ee==="image/jpeg"&&(ve=x(ve,R)),G.timeEnd("canvas to blob"),new Blob([ve,pe.slice(33)],{type:ee})}return G.timeEnd("canvas to blob"),pe})}function Wo(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{log:G,quality:ee,type:ce,dpi:R}=H,le=yield Wl(H);G.time("canvas to data url");let pe=le.toDataURL(ce,ee);if(["image/png","image/jpeg"].includes(ce)&&R&&U&&z){const[ge,ve]=pe.split(",");let we=0,me=!1;if(ce==="image/png"){const je=j(ve);je>=0?(we=Math.ceil((je+28)/3)*4,me=!0):we=33/3*4}else ce==="image/jpeg"&&(we=18/3*4);const $e=ve.substring(0,we),Ee=ve.substring(we),Ne=window.atob($e),Fe=new Uint8Array(Ne.length);for(let je=0;je<Fe.length;je++)Fe[je]=Ne.charCodeAt(je);const Ie=ce==="image/png"?M(Fe,R,me):x(Fe,R),qe=window.btoa(String.fromCharCode(...Ie));pe=[ge,",",qe,Ee].join("")}return G.timeEnd("canvas to data url"),pe})}function E7(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{width:G,height:ee,ownerDocument:ce}=H,R=yield Wo(H),le=zt(G,ee,ce),pe=le.ownerDocument.createElementNS(le.namespaceURI,"image");return pe.setAttributeNS(null,"href",R),pe.setAttributeNS(null,"height","100%"),pe.setAttributeNS(null,"width","100%"),le.appendChild(pe),tt(le,H.isEnable("removeControlCharacter"))})}function zU(S,L){return m(this,null,function*(){const H=yield Wt(S,L),{ownerDocument:G,width:ee,height:ce,scale:R,type:le}=H,pe=le==="image/svg+xml"?yield E7(H):yield Wo(H),ge=Qe(pe,G);return ge.width=Math.floor(ee*R),ge.height=Math.floor(ce*R),ge.style.width=`${ee}px`,ge.style.height=`${ce}px`,ge})}function WU(S,L){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},L),{type:"image/jpeg"})))})}function VU(S,L){return m(this,null,function*(){const H=yield Wt(S,L),G=yield Wl(H);return G.getContext("2d").getImageData(0,0,G.width,G.height).data})}function jU(S,L){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},L),{type:"image/png"})))})}function HU(S,L){return m(this,null,function*(){return Wo(yield Wt(S,v(h({},L),{type:"image/webp"})))})}n.createContext=Il,n.destroyContext=m7,n.domToBlob=BU,n.domToCanvas=Wl,n.domToDataUrl=Wo,n.domToForeignObjectSvg=S7,n.domToImage=zU,n.domToJpeg=WU,n.domToPixel=VU,n.domToPng=jU,n.domToSvg=E7,n.domToWebp=HU,n.loadMedia=wt,n.waitUntilLoad=An,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})})})(xf,xf.exports);var uj=xf.exports;const Bn=(e,t,n)=>{d.useImperativeHandle(t,()=>({download(){e.current&&uj.domToPng(e.current,{scale:5}).then(r=>{const o=document.createElement("a");o.download=`${n}.png`,o.href=r,o.click()})}}))},U8=[{name:"default",dark:"var(--chart-default-dark, #1565BC)",light:"var(--chart-default-light, #99D2F9)"},{name:"green",dark:"#1A6400",light:"#B1E39F"},{name:"purple",dark:"#734DBB",light:"#E7DAFF"},{name:"bronze_yellow",dark:"#7E6000",light:"#FFCEFB"},{name:"plum",dark:"#7D1779",light:"#E1AADD"},{name:"indigo",dark:"#4657AE",light:"#CDD5FF"},{name:"brown",dark:"#8A4A00",light:"#FCC88B"},{name:"cardinal",dark:"#BE1442",light:"#FFD0D0"},{name:"dark_green",dark:"#00675E",light:"#A1DFD5"},{name:"maroon",dark:"#891E01",light:"#FFAE99"},{name:"golden_brown",dark:"#90591A",light:"#FFDEB6"},{name:"maroon",dark:"#800000",light:"#F2CECE"},{name:"green_yellow",dark:"#6A6A00",light:"#FFFFC7"},{name:"blue",dark:"#000075",light:"#CFCFFF"},{name:"black",dark:"#000000",light:"#E3E1E1"},{name:"grey",dark:"#323846",light:"#D0DFFF"},{name:"pink",dark:"#BE012F",light:"#FFD9E2"},{name:"royal_blue",dark:"#002FDC",light:"#D7DFFF"},{name:"magenta",dark:"#B402AA",light:"#FFCEFB"}];function Xe(e){return U8[e%U8.length]}const Sl=(e,t)=>d.Children.map(e,n=>d.isValidElement(n)&&typeof n.type=="function"&&n.type.displayName===t.displayName?n:null);function Cf({value:e,darkColor:t,lightColor:n}){return l.jsxs("div",{className:"inline-flex items-center justify-start gap-2 px-2 py-1",children:[l.jsx("div",{style:{backgroundColor:n,borderColor:t},className:"relative h-3 w-3 rounded-radius-600 border"}),l.jsx("div",{className:"flex items-start justify-start",children:l.jsx("div",{className:"text-xs font-normal leading-none text-body-primary",children:e})})]})}function Af({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm basis-full flex-col items-start justify-start px-1 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function Sf({label:e,value:t}){return l.jsxs("div",{className:"inline-flex max-w-sm flex-col items-start justify-start px-2 py-0.5",children:[l.jsx("div",{className:"text-[10px] font-normal leading-none text-body-secondary",children:e}),l.jsx("div",{className:"flex items-start justify-start text-sm font-medium",children:t||"-"})]})}function Ef({nodeData:e}){const{employee:t}=e,{name:n,imageUrl:r}=t;return l.jsxs("div",{className:"inline-flex max-w-sm items-center justify-start px-2 py-0.5",children:[l.jsx(hn,{size:"md",children:l.jsx(gn,{src:r,alt:"Avatar"})}),l.jsx("div",{className:"flex items-start justify-start px-2 text-sm font-medium",children:n||"-"})]})}function ke({children:e,showSideBySide:t,tooltipTitle:n}){const r=Sl(e,Cf),o=Sl(e,Af),a=Sl(e,Sf),i=Sl(e,Ef);return l.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-radius-200 bg-white p-2 shadow-card-basic",children:[l.jsx("div",{className:"px-2 py-1 text-xs font-medium leading-none text-body-primary",children:n}),a,l.jsxs("div",{className:"flex w-full flex-col items-start justify-start rounded-radius-200 p-2",children:[t&&l.jsxs("div",{className:te("flex w-full justify-between"),children:[o&&o[0],!!(o!=null&&o[1])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[1]]}),t&&(o==null?void 0:o[2])&&l.jsxs("div",{className:te("mt-3 flex w-full justify-between"),children:[o&&o[2],!!(o!=null&&o[3])&&l.jsx("div",{className:"mx-3 w-0 border-r"}),o&&o[3]]}),!t&&l.jsx("div",{className:te("grid w-full auto-rows-auto gap-3"),children:o})]}),r&&r.length>0?l.jsx("div",{className:"h-25 w-full bg-surface-grey-subtle px-2"}):null,r,i]})}Cf.displayName="Legend",Af.displayName="Item",Sf.displayName="Header",Ef.displayName="Footer",ke.Legend=Cf,ke.Item=Af,ke.Header=Sf,ke.Footer=Ef,ke.defaultProps={showSideBySide:!1};function G8({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}G8.defaultProps={xValue:void 0,yValue:void 0};function dj({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsx(Wm,{data:a,stroke:a[0].color.dark,strokeWidth:1,x:i=>{var s,c;return((s=o==null?void 0:o.xScale)==null?void 0:s.call(o,t(i)))+((c=o==null?void 0:o.xScale)==null?void 0:c.bandwidth())/2},y:i=>{var s;return(s=o==null?void 0:o.yScale)==null?void 0:s.call(o,n(i))}})}const fj=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),pj=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},hj=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),El={xAccessor:e=>e.x,yAccessor:e=>e.y},Y8=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,X8=10,gj=5,Mf=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,connectNulls:g=!1,maxNodesInMiniMode:m=gj,tooltipStackCharLimit:x=X8,seriesSelectorTitle:y,preselectedNodes:w},b)=>{const[A,C]=d.useState(()=>(w&&w<=e.length?e.slice(0,w):e).map(k=>k.id)),$=d.useRef(null);Bn($,b,`${a}-${i}-LineChart`);const P=d.useMemo(()=>o.map((M,k)=>{const B=e.find(V=>V.id===M.id);return{points:M.data.map((V,j)=>({x:r[j],y:Number(V),nodeId:M.id,color:(B==null?void 0:B.color)??Xe(k)}))}}).slice(0,h==="mini"?m:o.length),[o,h,m,e,r]),T=d.useMemo(()=>h==="full"?P.filter(M=>A.includes(M.points[0].nodeId)):P,[P,A,h]);return l.jsxs("div",{ref:$,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(n8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(_o,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:M=>u?Y8(M,u.symbol,u.position):M,rangePadding:{end:10},tickComponent:M=>l.jsx(pj,{tickData:M,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(_o,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:M=>f?Y8(Ht(M>=1e3?"~s":"")(M),f.symbol,f.position):Ht(M>=1e3?"~s":"")(M),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),T.map((M,k)=>l.jsxs(l.Fragment,{children:[l.jsx(dj,{data:M.points,xAccessor:El.xAccessor,yAccessor:El.yAccessor,connectNulls:g}),l.jsx(H8,{dataKey:`Performance Management ${k}`,data:M.points,size:8,renderGlyph:fj,xAccessor:El.xAccessor,yAccessor:El.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:hj,renderTooltip:({tooltipData:M})=>{var V,j,W,E,I,U;const k=e.find(z=>{var O;return z.id===((O=M==null?void 0:M.nearestDatum)==null?void 0:O.datum.nodeId)}),B=((V=M==null?void 0:M.nearestDatum)==null?void 0:V.datum)&&((j=M==null?void 0:M.nearestDatum)==null?void 0:j.datum.x.length)<x;return l.jsx(G8,{xValue:(W=M==null?void 0:M.nearestDatum)==null?void 0:W.datum.x,yValue:(E=M==null?void 0:M.nearestDatum)==null?void 0:E.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!B,tooltipTitle:p,legendValue:(k==null?void 0:k.name)||"",legendDarkColor:((I=M==null?void 0:M.nearestDatum)==null?void 0:I.datum.color.dark)||Xe(0).dark,legendLightColor:((U=M==null?void 0:M.nearestDatum)==null?void 0:U.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:y??a}),"(",T.length??0,"/",P.length,")"]}),l.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:P.map(M=>{const k=e.find(B=>B.id===M.points[0].nodeId);return k&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),k.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:A.includes(k.id),onCheckedChange:B=>{let V=[...A];B?V=[...A,k.id]:V.splice(A.indexOf(k.id),1),C(V)}})})]},k.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:P.map(M=>{const k=e.find(B=>B.id===M.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:M.points[0].color.light,borderColor:M.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),k==null?void 0:k.name]},k==null?void 0:k.id)})})]})}),vj={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:X8,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};Mf.defaultProps=vj,Mf.displayName="LineBase";const q8=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Mf,{ref:t,width:n,height:r,...e})}));q8.displayName="LineChart";const mj=q8;function K8(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 bj(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 $f(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 yj(e,t){return e.sourceLinks.length?e.depth:t-1}function Ml(e){return function(){return e}}function Q8(e,t){return $l(e.source,t.source)||e.index-t.index}function Z8(e,t){return $l(e.target,t.target)||e.index-t.index}function $l(e,t){return e.y0-t.y0}function Pf(e){return e.value}function wj(e){return e.index}function xj(e){return e.nodes}function Cj(e){return e.links}function J8(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function R8({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 Aj(){let e=0,t=0,n=1,r=1,o=24,a=8,i,s=wj,c=yj,u,f,p=xj,h=Cj,v=6;function g(){const E={nodes:p.apply(null,arguments),links:h.apply(null,arguments)};return m(E),x(E),y(E),w(E),C(E),R8(E),E}g.update=function(E){return R8(E),E},g.nodeId=function(E){return arguments.length?(s=typeof E=="function"?E:Ml(E),g):s},g.nodeAlign=function(E){return arguments.length?(c=typeof E=="function"?E:Ml(E),g):c},g.nodeSort=function(E){return arguments.length?(u=E,g):u},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?(p=typeof E=="function"?E:Ml(E),g):p},g.links=function(E){return arguments.length?(h=typeof E=="function"?E:Ml(E),g):h},g.linkSort=function(E){return arguments.length?(f=E,g):f},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?(v=+E,g):v};function m({nodes:E,links:I}){for(const[z,O]of E.entries())O.index=z,O.sourceLinks=[],O.targetLinks=[];const U=new Map(E.map((z,O)=>[s(z,O,E),z]));for(const[z,O]of I.entries()){O.index=z;let{source:N,target:D}=O;typeof N!="object"&&(N=O.source=J8(U,N)),typeof D!="object"&&(D=O.target=J8(U,D)),N.sourceLinks.push(O),D.targetLinks.push(O)}if(f!=null)for(const{sourceLinks:z,targetLinks:O}of E)z.sort(f),O.sort(f)}function x({nodes:E}){for(const I of E)I.value=I.fixedValue===void 0?Math.max($f(I.sourceLinks,Pf),$f(I.targetLinks,Pf)):I.fixedValue}function y({nodes:E}){const I=E.length;let U=new Set(E),z=new Set,O=0;for(;U.size;){for(const N of U){N.depth=O;for(const{target:D}of N.sourceLinks)z.add(D)}if(++O>I)throw new Error("circular link");U=z,z=new Set}}function w({nodes:E}){const I=E.length;let U=new Set(E),z=new Set,O=0;for(;U.size;){for(const N of U){N.height=O;for(const{source:D}of N.targetLinks)z.add(D)}if(++O>I)throw new Error("circular link");U=z,z=new Set}}function b({nodes:E}){const I=K8(E,O=>O.depth)+1,U=(n-e-o)/(I-1),z=new Array(I);for(const O of E){const N=Math.max(0,Math.min(I-1,Math.floor(c.call(null,O,I))));O.layer=N,O.x0=e+N*U,O.x1=O.x0+o,z[N]?z[N].push(O):z[N]=[O]}if(u)for(const O of z)O.sort(u);return z}function A(E){const I=bj(E,U=>(r-t-(U.length-1)*i)/$f(U,Pf));for(const U of E){let z=t;for(const O of U){O.y0=z,O.y1=z+O.value*I,z=O.y1+i;for(const N of O.sourceLinks)N.width=N.value*I}z=(r-z+i)/(U.length+1);for(let O=0;O<U.length;++O){const N=U[O];N.y0+=z*(O+1),N.y1+=z*(O+1)}V(U)}}function C(E){const I=b(E);i=Math.min(a,(r-t)/(K8(I,U=>U.length)-1)),A(I);for(let U=0;U<v;++U){const z=Math.pow(.99,U),O=Math.max(1-z,(U+1)/v);P(I,z,O),$(I,z,O)}}function $(E,I,U){for(let z=1,O=E.length;z<O;++z){const N=E[z];for(const D of N){let Q=0,q=0;for(const{source:oe,value:re}of D.targetLinks){let J=re*(D.layer-oe.layer);Q+=j(oe,D)*J,q+=J}if(!(q>0))continue;let ne=(Q/q-D.y0)*I;D.y0+=ne,D.y1+=ne,B(D)}u===void 0&&N.sort($l),T(N,U)}}function P(E,I,U){for(let z=E.length,O=z-2;O>=0;--O){const N=E[O];for(const D of N){let Q=0,q=0;for(const{target:oe,value:re}of D.sourceLinks){let J=re*(oe.layer-D.layer);Q+=W(D,oe)*J,q+=J}if(!(q>0))continue;let ne=(Q/q-D.y0)*I;D.y0+=ne,D.y1+=ne,B(D)}u===void 0&&N.sort($l),T(N,U)}}function T(E,I){const U=E.length>>1,z=E[U];k(E,z.y0-i,U-1,I),M(E,z.y1+i,U+1,I),k(E,r,E.length-1,I),M(E,t,0,I)}function M(E,I,U,z){for(;U<E.length;++U){const O=E[U],N=(I-O.y0)*z;N>1e-6&&(O.y0+=N,O.y1+=N),I=O.y1+i}}function k(E,I,U,z){for(;U>=0;--U){const O=E[U],N=(O.y1-I)*z;N>1e-6&&(O.y0-=N,O.y1-=N),I=O.y0-i}}function B({sourceLinks:E,targetLinks:I}){if(f===void 0){for(const{source:{sourceLinks:U}}of I)U.sort(Z8);for(const{target:{targetLinks:U}}of E)U.sort(Q8)}}function V(E){if(f===void 0)for(const{sourceLinks:I,targetLinks:U}of E)I.sort(Z8),U.sort(Q8)}function j(E,I){let U=E.y0-(E.sourceLinks.length-1)*i/2;for(const{target:z,width:O}of E.sourceLinks){if(z===I)break;U+=O+i}for(const{source:z,width:O}of I.targetLinks){if(z===E)break;U-=O}return U}function W(E,I){let U=I.y0-(I.targetLinks.length-1)*i/2;for(const{source:z,width:O}of I.targetLinks){if(z===E)break;U+=O+i}for(const{target:z,width:O}of E.sourceLinks){if(z===I)break;U-=O}return U}return g}function Sj({tooltipData:e,fromLabel:t,toLabel:n,weightLabel:r,tooltipTitle:o}){var s,c,u,f;const a=e.source,i=e.target;return l.jsxs(ke,{tooltipTitle:o,children:[l.jsx(ke.Item,{label:t,value:a.name}),l.jsx(ke.Item,{label:n,value:i.name}),l.jsx(ke.Item,{label:r,value:e.weight.toString()}),l.jsx(ke.Legend,{value:a.name,darkColor:(s=Xe((a.index||0)+1))==null?void 0:s.dark,lightColor:(c=Xe((a.index||0)+1))==null?void 0:c.light}),l.jsx(ke.Legend,{value:i.name,darkColor:(u=Xe((i.index||0)+1))==null?void 0:u.dark,lightColor:(f=Xe((i.index||0)+1))==null?void 0:f.light})]})}const e6=80,t6=20,Ej=30,Mj=12,n6=d.forwardRef(({height:e,width:t,tooltipTitle:n,nodes:r,links:o,groups:a,weightLabel:i},s)=>{const c=d.useMemo(()=>Aj().nodeId(E=>E.id).nodeWidth(Mj).nodePadding(Ej).nodeAlign(E=>E.group),[]),u=d.useRef(null);Bn(u,s,`${n}-SankeyChart`);const[f,p]=d.useState(""),[h,v]=d.useState(null),{tooltipData:g,tooltipLeft:m,tooltipTop:x,tooltipOpen:y,showTooltip:w,hideTooltip:b}=Ua(),{containerBounds:A,containerRef:C,TooltipInPortal:$}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),P=d.useMemo(()=>c.extent([[e6,t6],[t-e6,e-t6-50]])({nodes:r,links:o.map(E=>({...E,value:Number(E.weight)}))}),[e,t,c,r,o]),T=d.useMemo(()=>Math.max(...P.nodes.map(E=>E.depth??0)),[P]),M=d.useMemo(()=>{const E={};let I=-1/0;return P.nodes.forEach(U=>{const{group:z}=U;E[z]?(E[z].x=Math.max(E[z].x??-1/0,U.x0??-1/0),E[z].y=Math.max(E[z].y??-1/0,U.y1??-1/0)):(E[z]={},E[z].x=U.x0,E[z].y=U.y1),I=Math.max(I,E[z].y??-1/0),E[z].y=I}),Object.keys(E).forEach(U=>{E[U].y=I}),E},[P]),k=d.useCallback(E=>{const I=c.nodeId()(E);p(f===I?"":I)},[f,c]),B=d.useCallback(()=>{p(""),v(null)},[]),V=d.useMemo(()=>f===""&&h===null?new Set:new Set(P.links.filter(E=>c.nodeId()(E.source)===f||c.nodeId()(E.target)===f||(h==null?void 0:h.source)===E.source&&(h==null?void 0:h.target)===E.target)),[f,P,h,c]),j=d.useCallback((E,I)=>{const U=("clientX"in E?E.clientX:0)-A.left,z=("clientY"in E?E.clientY:0)-A.top;v(I),U&&z&&w({tooltipLeft:U,tooltipTop:z,tooltipData:I})},[w,A]),W=d.useCallback(()=>{B(),b()},[B,b]);return l.jsxs("div",{ref:u,className:"rabbit-ds h-min w-min bg-white",id:"sankey-chart",children:[l.jsxs("svg",{height:e,width:t,ref:C,children:[l.jsx("g",{children:P.links.map(E=>l.jsx(iz,{data:E,source:I=>({x:I.source.x1,y:I.y0}),target:I=>({x:I.target.x0,y:I.y1}),x:I=>I.x??0,y:I=>I.y??0,fill:"none",pointerEvents:"stroke",onMouseLeave:()=>W(),onMouseMove:I=>j(I,E),stroke:Xe((E.source.index||0)+1).light,strokeWidth:E.width,strokeOpacity:V.has(E)?.7:.4},E.index))}),l.jsx("g",{children:P.nodes.map(E=>{var I,U,z;return l.jsx("g",{children:l.jsx(Vm,{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:()=>k(E),onMouseLeave:()=>B(),radius:2,fill:f===E.id?(I=Xe((E.index||0)+1))==null?void 0:I.dark:(U=Xe((E.index||0)+1))==null?void 0:U.light,stroke:(z=Xe((E.index||0)+1))==null?void 0:z.dark,all:!0})},E.index)})}),l.jsx("g",{children:a.map(E=>l.jsx(Ra,{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))}),l.jsxs("g",{children:[P.nodes.map(E=>l.jsx(Ra,{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)),P.nodes.map(E=>E.value&&l.jsx(wa,{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))]})]}),y&&g&&l.jsx($,{top:x,left:m,unstyled:!0,applyPositionStyle:!0,children:l.jsx(Sj,{tooltipData:g,fromLabel:`From: ${a[g.source.group].name}`,toLabel:`To: ${a[g.target.group].name}`,weightLabel:i,tooltipTitle:n})},Math.random())]})});n6.displayName="Sankey";const r6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>n&&r&&l.jsx(n6,{ref:t,width:n,height:r,...e})}));r6.displayName="SankeyChart";const $j=r6;function Pj(e){return"bandwidth"in e?e.bandwidth():0}var Tj=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Tf(){return Tf=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},Tf.apply(this,arguments)}function kj(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 o6(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,c=s===void 0?"#eaf0f6":s,u=e.strokeWidth,f=u===void 0?1:u,p=e.strokeDasharray,h=e.className,v=e.children,g=e.numTicks,m=g===void 0?10:g,x=e.lineStyle,y=e.offset,w=e.tickValues,b=kj(e,Tj),A=w??m0(a,m),C=(y??0)+Pj(a)/2,$=A.map(function(P,T){var M,k=((M=rl(a(P)))!=null?M:0)+C;return{index:T,from:new Nn({x:0,y:k}),to:new Nn({x:i,y:k})}});return d.createElement(mn,{className:gt("visx-rows",h),top:n,left:o},v?v({lines:$}):$.map(function(P){var T=P.from,M=P.to,k=P.index;return d.createElement(fz,Tf({key:"row-line-"+k,from:T,to:M,stroke:c,strokeWidth:f,strokeDasharray:p,style:x},b))}))}o6.propTypes={tickValues:ie.array,width:ie.number.isRequired};function a6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,legendValue:a,legendDarkColor:i,legendLightColor:s}){const c=e==null?void 0:e.toString(),u=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:!0,children:[l.jsx(ke.Item,{label:r,value:c}),l.jsx(ke.Item,{label:o,value:u}),l.jsx(ke.Legend,{value:a,darkColor:i,lightColor:s})]})}a6.defaultProps={xValue:void 0,yValue:void 0};const i6=20,s6=50,kf=80,Pl=50,Nj=10,Oj=25,Nf=d.forwardRef(({tooltipTitle:e,xAxisLabel:t,yAxisLabel:n,domain:r,binCount:o,data:a,width:i,height:s,maxBinCount:c=Oj,minBinCount:u=Nj,integerBins:f=!1,integerYAxis:p=!1},h)=>{const v=d.useMemo(()=>Ls(a),[a]),{histogramDomain:g,threshold:m,thresholdInteger:x}=d.useMemo(()=>{const O=v[0]??0,N=O===v[1]?u+O:v[1]??0,D=N-O>u?N:u+O,Q=Math.min(Math.max(N-O,u),c),q=Math.floor(v[0]??0),ne=Math.ceil(D);return{histogramDomain:r||(f?[q,ne]:[O,N]),threshold:Q,thresholdInteger:Math.ceil(Q)}},[v,r,f,c,u]),y=d.useMemo(()=>Oo({domain:g,range:[Pl,i-s6],round:!0,nice:!0}),[g,i]),w=d.useMemo(()=>PF().domain(y.domain()).thresholds(o||(f?x:m))(a),[y,o,a,m,x,f]),b=d.useMemo(()=>Oo({domain:[0,Nd(w,O=>O.length)??0],range:[s-kf,i6],round:!0,nice:!0}),[w,s]),A=d.useMemo(()=>b.ticks().filter(O=>p?Number.isInteger(O):O),[p,b]),C=d.useRef(null);Bn(C,h,`${t}-${n}-Histogram`);const{tooltipData:$,tooltipLeft:P,tooltipTop:T,tooltipOpen:M,showTooltip:k,hideTooltip:B}=Ua(),{containerBounds:V,containerRef:j,TooltipInPortal:W}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),E=i-Pl-s6,I=s-i6-kf-100,U=d.useCallback((O,N)=>{const D=("clientX"in O?O.clientX:0)-V.left,Q=("clientY"in O?O.clientY:0)-V.top;D&&Q&&k({tooltipLeft:D,tooltipTop:Q,tooltipData:N})},[k,V]),z=d.useCallback(()=>{B()},[B]);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:i,height:s},ref:C,children:[l.jsxs("svg",{width:i,height:s,ref:j,children:[l.jsx(_0,{orientation:"bottom",scale:y,top:s-kf,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"}}),l.jsx(_0,{orientation:"left",scale:b,left:Pl,hideTicks:!0,strokeWidth:1,stroke:"#CFD7DF",tickFormat:O=>p?Number(O)>=1e3?Ht("~s")(Number(Ht("d")(O))):Ht("d")(O):Number(O)>=1e3?Ht("~s")(O):Ht("")(O),tickValues:A,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"}}),l.jsxs(mn,{children:[l.jsx(o6,{scale:b,width:E,height:I,left:Pl,top:0,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),w.map(O=>{const N=Math.abs(b(0)-b(O.length)),D=Math.abs(y(O.x1??0)-y(O.x0??0));return l.jsx("g",{children:l.jsx(KB,{x:y(O.x0??0),y:b(O.length),width:D,height:N&&N-1,fill:Xe(0).light,stroke:Xe(0).dark,strokeWidth:1,onMouseMove:Q=>U(Q,O),onMouseLeave:()=>z()})},Math.random())})]})]}),M&&$&&l.jsx(W,{top:T,left:P,unstyled:!0,applyPositionStyle:!0,children:l.jsx(a6,{xAxisLabel:t,xValue:`${$.x0} to ${$.x1}`,yAxisLabel:n,yValue:$.length,tooltipTitle:e,legendValue:n,legendDarkColor:Xe(0).dark,legendLightColor:Xe(0).light})},Math.random()),b.domain()[2]]})}),l6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Nf,{ref:t,width:n,height:r,...e})}));Nf.defaultProps={domain:void 0,binCount:void 0,integerBins:!1,integerYAxis:!1},Nf.displayName="HistogramBase",l6.displayName="HistogramChart";const _j=l6;function c6({tooltipTitle:e,label:t,value:n,unit:r,legendValue:o,legendDarkColor:a,legendLightColor:i}){return l.jsxs(ke,{tooltipTitle:e,children:[l.jsx(ke.Item,{label:t,value:`${n} ${r}`}),l.jsx(ke.Legend,{value:o,darkColor:a||"",lightColor:i||""})]})}c6.defaultProps={};const Dj=e=>e.value,Fj=e=>e.label,u6=d.forwardRef(({width:e,height:t,unit:n="%",data:r,tooltipTitle:o,legendTitle:a},i)=>{const s=e/2,c=t/2,u=d.useMemo(()=>Math.min(e-.35*e,t-50)/2,[e,t]),{tooltipData:f,tooltipLeft:p,tooltipTop:h,tooltipOpen:v,showTooltip:g,hideTooltip:m}=Ua(),{containerBounds:x,containerRef:y,TooltipInPortal:w}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),b=d.useRef(null),A=d.useCallback(($,P)=>{const T=("clientX"in $?$.clientX:0)-x.left,M=("clientY"in $?$.clientY:0)-x.top;T&&M&&g({tooltipLeft:T,tooltipTop:M,tooltipData:P})},[g,x]),C=d.useCallback(()=>{m()},[m]);return Bn(b,i,"DonutChart"),l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:b,children:[l.jsx("svg",{width:e,height:t,className:"rabbit-ds",ref:y,children:l.jsx(mn,{top:c-20,left:s,children:l.jsx(jB,{data:r,pieValue:Dj,outerRadius:u-10,innerRadius:u-Math.min(e*.07,22)-10,cornerRadius:2,padAngle:.025,children:$=>l.jsx(l.Fragment,{children:$.arcs.map(P=>{const T=Fj(P.data);return l.jsx("g",{children:l.jsx("path",{d:$.path(P)??void 0,fill:P.data.color,onMouseLeave:C,onMouseMove:M=>A(M,{label:a,value:P.value,tooltipTitle:o,unit:n,legendValue:T,legendDarkColor:P.data.labelColor,legendLightColor:P.data.color})})},`arc-${T}`)})})})})}),v&&f&&l.jsx(w,{top:h,left:p,unstyled:!0,applyPositionStyle:!0,children:l.jsx(c6,{unit:f.unit,label:f.label,value:f.value,tooltipTitle:o,legendValue:f.legendValue??"",legendDarkColor:f.legendDarkColor,legendLightColor:f.legendLightColor})},Math.random()),l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-2 text-[10px] font-semibold text-body-secondary",style:{fontSize:Math.min(e*.04,10)},children:r.map($=>l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:$.color,borderColor:$.labelColor,color:$.labelColor,width:Math.min(e*.04,10),height:Math.min(e*.04,10)},className:"h-3 w-3 rounded-radius-round border"}),`${$.label}: ${$.value}${n}`]},$.label))})]})});u6.displayName="DonutChartBase";const d6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(u6,{ref:t,width:n,height:r,...e})}));d6.displayName="DonutChart";const Ij=d6;function f6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}f6.defaultProps={xValue:void 0,yValue:void 0};const Tl={top:60,left:20,right:20,bottom:20},p6={start:10,end:-10,middle:0},h6=d.forwardRef(({width:e,height:t,levels:n=5,nodes:r,xAxisLabel:o,xAxisCharLimit:a,tooltipTitle:i,xAxisUnitSymbol:s,yAxisDomain:c,series:u=[],xAxisValues:f},p)=>{const h=d.useRef(null);Bn(h,p,"RadarChart");const{tooltipData:v,tooltipLeft:g,tooltipTop:m,tooltipOpen:x,showTooltip:y,hideTooltip:w}=Ua(),{containerBounds:b,containerRef:A,TooltipInPortal:C}=Ga({detectBounds:!0,debounce:500,scroll:!0,zIndex:1500}),$=d.useCallback((N,D)=>{const Q=Math.PI*2/N;return[...new Array(N)].map((q,ne)=>({x:D*Math.sin(ne*Q),y:D*Math.cos(ne*Q)}))},[]),P=d.useCallback((N,D,Q)=>Q==="pre"?`${D}${N}`:`${N}${D}`,[]),T=d.useCallback((N,D,Q)=>{const q=Math.PI*2/N.length,ne=new Array(N.length).fill({x:0,y:0,data:null}),oe=new Array(N.length+1).fill("").reduce((re,J,ae)=>{if(ae>N.length)return re;const Y=D(Q(N[ae-1]))*Math.sin(ae*q),Z=D(Q(N[ae-1]))*Math.cos(ae*q);return ne[ae-1]={x:Y,y:Z,data:N[ae-1]},`${re}${Y},${Z} `});return{points:ne,pointString:oe}},[]),M=d.useMemo(()=>new Nn({x:0,y:0}),[]),k=d.useCallback(N=>Math.round(N)===0?"middle":N>0?"start":"end",[]),B=d.useCallback((N,D)=>{const Q=("clientX"in N?N.clientX:0)-b.left,q=("clientY"in N?N.clientY:0)-b.top;Q&&q&&y({tooltipLeft:Q,tooltipTop:q,tooltipData:D})},[y,b]),V=d.useCallback(()=>{w()},[w]),j=d.useMemo(()=>e-Tl.left-Tl.right,[e]),W=d.useMemo(()=>t-Tl.top-Tl.bottom,[t]),E=d.useMemo(()=>Math.min(j,W)/2,[j,W]),I=u.length?u.reduce((N,D)=>{const Q=D.data.filter(q=>q);return Math.max(N,...Q)},-1/0):0,U=Oo({range:[0,E],domain:c??[0,I]}),z=$(f.length,E),O=N=>T(N,D=>U(D)??0,D=>D);return l.jsxs("div",{className:"rabbit-ds flex flex-col bg-white",style:{width:e,height:t},ref:h,children:[l.jsxs("svg",{width:e,height:t,ref:A,pointerEvents:"all",onMouseLeave:V,children:[l.jsx("rect",{fill:"transparent",width:e,height:t,rx:14}),l.jsxs(mn,{top:t/2,left:e/2,children:[[...new Array(n)].map((N,D)=>l.jsx(jm,{x:e/2,y:t/2,fill:"none",stroke:"#CFD7DF",strokeWidth:1,strokeDasharray:4,r:E*(D+1)/n},`web1-${Math.random()}`)),f.map((N,D)=>l.jsxs(l.Fragment,{children:[l.jsx(x0,{from:M,to:z[D],stroke:f.length===1?Xe(0).dark:"#CFD7DF",strokeWidth:1},`radar-line-${Math.random()}`),l.jsx(wa,{x:z[D].x,y:z[D].y,textAnchor:k(z[D].x),verticalAnchor:k(z[D].y),dx:p6[k(z[D].x)],dy:p6[k(z[D].y)],fontSize:10,fill:"#666666",width:a??100,children:`${s?P(f[(D+f.length-1)%f.length],s.symbol,s.position):f[(D+f.length-1)%f.length]}`})]})),u.map((N,D)=>l.jsx("polygon",{points:O(N.data).pointString,fill:Xe(D).light,fillOpacity:.2,stroke:Xe(D).dark,strokeWidth:1},`polypath-${Math.random()}`)),u.map((N,D)=>O(N.data).points.map((Q,q)=>l.jsx(jm,{cx:Q.x,cy:Q.y,r:5,fill:"transparent",onMouseMove:ne=>{var oe;return B(ne,{yAxisLabel:((oe=r.find(re=>re.id===N.id))==null?void 0:oe.name)??"",xAxisValue:f[q],yAxisValue:N.data[q],xAxisLabel:o??"Category",legendDarkColor:Xe(D).dark,legendLightColor:Xe(D).light})},onMouseOut:V},`radar-point-${Math.random()}`)))]})]}),x&&v&&l.jsx(C,{top:m,left:g,unstyled:!0,applyPositionStyle:!0,children:l.jsx(f6,{xAxisLabel:v.xAxisLabel??"",xValue:v.xAxisValue,yAxisLabel:v.yAxisLabel??"",yValue:v.yAxisValue,tooltipTitle:i,showSideBySide:!0,legendValue:v.yAxisLabel??"",legendDarkColor:v.legendDarkColor,legendLightColor:v.legendLightColor})},Math.random())]})});h6.displayName="RadarChartBase";const g6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(h6,{ref:t,width:n,height:r,...e})}));g6.displayName="RadarChart";const Lj=g6;function v6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,legendValue:i,legendDarkColor:s,legendLightColor:c}){const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),l.jsx(ke.Legend,{value:i,darkColor:s,lightColor:c})]})}v6.defaultProps={xValue:void 0,yValue:void 0};const Bj=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),zj=({tickData:e,xAxisCharLimit:t})=>{var a;const n=d.useContext(bt),r=(a=n==null?void 0:n.xScale)==null?void 0:a.bandwidth(),o=Math.floor(r/5);return l.jsx(Ra,{textLabel:e.formattedValue||"",x:e.x,y:e.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle",angle:r&&r<25?-45:0},axisCharLimit:t??o})},m6={xAccessor:e=>e.x,yAccessor:e=>e.y},b6=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,y6=10,Wj=5,Of=d.forwardRef(({nodes:e,height:t,width:n,xAxisValues:r,series:o,xAxisLabel:a,yAxisLabel:i,xAxisDomain:s,yAxisDomain:c,xAxisUnitSymbol:u,yAxisUnitSymbol:f,tooltipTitle:p,mode:h,xAxisCharLimit:v,maxNodesInMiniMode:g=Wj,tooltipStackCharLimit:m=y6,seriesSelectorTitle:x,preselectedNodes:y},w)=>{const[b,A]=d.useState(()=>(y&&y<=e.length?e.slice(0,y):e).map(M=>M.id)),C=d.useRef(null);Bn(C,w,`${a}-${i}-StackedBarChart`);const $=d.useMemo(()=>o.map((T,M)=>{const k=e.find(B=>B.id===T.id);return{points:T.data.map((B,V)=>({x:r[V],y:Number(B),nodeId:T.id,color:(k==null?void 0:k.color)??Xe(M)}))}}).slice(0,h==="mini"?g:o.length),[o,h,g,e,r]),P=d.useMemo(()=>h==="full"?$.filter(T=>b.includes(T.points[0].nodeId)):$,[$,b,h]);return l.jsxs("div",{ref:C,id:"line-chart",className:"rabbit-ds flex flex-col bg-white",style:{width:n,height:t},children:[l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{margin:{top:10,left:70,right:50,bottom:50},xScale:{type:"band",nice:!0,padding:.5,...s&&{domain:s}},yScale:{type:"linear",nice:!0,...c&&{domain:c}},children:[l.jsx(n8,{columns:!1,numTicks:6,lineStyle:{stroke:"#EBEFF3",strokeWidth:1}}),l.jsx(_o,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:30,tickFormat:T=>u?b6(T,u.symbol,u.position):T,rangePadding:{end:10},tickComponent:T=>l.jsx(zj,{tickData:T,xAxisCharLimit:v}),label:`${a} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(_o,{hideTicks:!0,numTicks:6,strokeWidth:1,orientation:"left",stroke:"#CFD7DF",label:`${i} ➔`,tickFormat:T=>f?b6(Ht(T>=1e3?"~s":"")(T),f.symbol,f.position):Ht(T>=1e3?"~s":"")(T),tickLabelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666"},labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dx:-35,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(sj,{children:P.map(T=>l.jsx(oj,{data:T.points,dataKey:T.points[0].nodeId,xAccessor:m6.xAccessor,yAccessor:m6.yAccessor,colorAccessor:M=>M.color.light,radiusTop:!0,radius:2},T.points[0].nodeId))}),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:Bj,renderTooltip:({tooltipData:T})=>{var B,V,j,W,E,I;const M=e.find(U=>{var z;return U.id===((z=T==null?void 0:T.nearestDatum)==null?void 0:z.datum.nodeId)}),k=((B=T==null?void 0:T.nearestDatum)==null?void 0:B.datum)&&((V=T==null?void 0:T.nearestDatum)==null?void 0:V.datum.x.length)<m;return l.jsx(v6,{xValue:(j=T==null?void 0:T.nearestDatum)==null?void 0:j.datum.x,yValue:(W=T==null?void 0:T.nearestDatum)==null?void 0:W.datum.y,xAxisLabel:a,yAxisLabel:i,showSideBySide:!!k,tooltipTitle:p,legendValue:(M==null?void 0:M.name)||"",legendDarkColor:((E=T==null?void 0:T.nearestDatum)==null?void 0:E.datum.color.dark)||Xe(0).dark,legendLightColor:((I=T==null?void 0:T.nearestDatum)==null?void 0:I.datum.color.light)||Xe(0).light})}})]})}),h==="full"&&l.jsxs("div",{className:"inline-flex w-64 shrink-0 grow-0 basis-auto flex-col items-start justify-start gap-0.5 rounded-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:x??a}),"(",P.length??0,"/",$.length,")"]}),l.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(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return M&&l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),M.name]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:b.includes(M.id),onCheckedChange:k=>{let B=[...b];k?B=[...b,M.id]:B.splice(b.indexOf(M.id),1),A(B)}})})]},M.id)})})]})]}),h==="mini"&&l.jsx("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-[10px] font-semibold text-body-secondary",children:$.map(T=>{const M=e.find(k=>k.id===T.points[0].nodeId);return l.jsxs("div",{className:"flex items-center justify-center gap-1",children:[l.jsx("div",{style:{backgroundColor:T.points[0].color.light,borderColor:T.points[0].color.dark},className:"h-3 w-3 rounded-radius-round border"}),M==null?void 0:M.name]},M==null?void 0:M.id)})})]})}),Vj={xAxisUnitSymbol:void 0,yAxisUnitSymbol:void 0,mode:"mini",xAxisCharLimit:void 0,tooltipStackCharLimit:y6,xAxisDomain:void 0,yAxisDomain:void 0,connectNulls:!1};Of.defaultProps=Vj,Of.displayName="StackedBarChartBase";const w6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(Of,{ref:t,width:n,height:r,...e})}));w6.displayName="StackedBarChart";const jj=w6,Hj=({nodes:e,selectedNodeIds:t,setSelectedNodeIds:n,seriesSelectorTitle:r})=>l.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-radius-100 border border-solid border-[color:var(--Accent,#EBEFF3)] bg-[#FDFDFD] p-4 pr-0 text-xs",children:[l.jsxs("div",{className:"pb-1 text-xs font-semibold",children:[l.jsx("span",{className:"pr-1",children:r}),"(",t.length??0,"/",e.length,")"]}),l.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})=>l.jsxs("div",{className:"flex w-full items-center justify-between gap-1 py-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{style:{backgroundColor:i.light,borderColor:i.dark},className:"mr-1 h-3 w-3 rounded-radius-round border"}),a]}),l.jsx("div",{className:"flex items-center",children:l.jsx(ci,{checked:t.includes(o),onCheckedChange:s=>{let c=[...t];s?c=[...t,o]:c.splice(t.indexOf(o),1),n(c)}})})]},o))})]});function x6({xValue:e,yValue:t,tooltipTitle:n,xAxisLabel:r,yAxisLabel:o,showSideBySide:a,otherDataPoints:i=[],pointMetaData:s,seriesMetaData:c}){var p;const u=e==null?void 0:e.toString(),f=t==null?void 0:t.toString();return l.jsxs(ke,{tooltipTitle:n,showSideBySide:a,children:[l.jsx(ke.Header,{label:"Review Cycle",value:(p=s==null?void 0:s.reviewCycle)==null?void 0:p.name}),l.jsx(ke.Item,{label:r,value:u}),l.jsx(ke.Item,{label:o,value:f}),i.map(({label:h,value:v})=>l.jsx(ke.Item,{label:h,value:v},h)),l.jsx(ke.Footer,{nodeData:c})]})}x6.defaultProps={xValue:void 0,yValue:void 0};var Uj=["id","markerWidth","markerHeight","markerUnits","children"];function _f(){return _f=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},_f.apply(this,arguments)}function Gj(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 Df(e){var t=e.id,n=e.markerWidth,r=n===void 0?3:n,o=e.markerHeight,a=o===void 0?3:o,i=e.markerUnits,s=i===void 0?"userSpaceOnUse":i,c=e.children,u=Gj(e,Uj);return d.createElement("defs",null,d.createElement("marker",_f({id:t,markerWidth:r,markerHeight:a,markerUnits:s},u),c))}Df.propTypes={id:ie.string.isRequired,size:ie.number,markerWidth:ie.oneOfType([ie.string,ie.number]),markerHeight:ie.oneOfType([ie.string,ie.number]),markerUnits:ie.string,refX:ie.oneOfType([ie.string,ie.number]),refY:ie.oneOfType([ie.string,ie.number]),strokeWidth:ie.number,children:ie.node.isRequired};var Yj=["id","size","strokeWidth"];function Ff(){return Ff=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},Ff.apply(this,arguments)}function Xj(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 qj(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=Xj(e,Yj),s=r+a*2,c=r,u=s/2,f="0 0, "+r+" "+r/2+", 0 "+r;return d.createElement(Df,Ff({id:t,markerWidth:s,markerHeight:s,refX:c,refY:u,orient:"auto",markerUnits:"strokeWidth",fill:"none",strokeWidth:a},i),d.createElement("g",{transform:"translate("+a+", "+a+")"},d.createElement("polyline",{points:f})))}var Kj=["id","size","strokeWidth"];function If(){return If=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},If.apply(this,arguments)}function Qj(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 Zj(e){var t=e.id,n=e.size,r=n===void 0?9:n,o=e.strokeWidth,a=o===void 0?1:o,i=Qj(e,Kj),s=r*2,c=s+a,u=c/2;return d.createElement(Df,If({id:t,markerWidth:c,markerHeight:c,refX:0,refY:u,orient:"auto-start-reverse",markerUnits:"strokeWidth",strokeWidth:a},i),d.createElement("circle",{r,cx:u,cy:u}))}function Jj({data:e,xAccessor:t,yAccessor:n,connectNulls:r=!1}){const o=d.useContext(bt),a=r?e.filter(i=>i.y!==null):e;return a.length===0?null:l.jsxs(l.Fragment,{children:[l.jsx(Zj,{id:"marker-circle",stroke:"#666",size:6,refX:7,fill:"transparent",strokeWidth:2}),l.jsx(qj,{id:"marker-arrow",stroke:"#666",size:14,strokeWidth:2,markerUnits:"userSpaceOnUse"}),l.jsx(Wm,{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:pa,shapeRendering:"geometricPrecision",markerStart:"url(#marker-circle)",markerEnd:"url(#marker-arrow)"})]})}const Rj=({x:e,y:t,datum:n,size:r})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.light,r:r/2}),eH=({x:e,y:t,datum:n})=>l.jsx(ho,{cx:e,cy:t,stroke:n.color.dark,strokeWidth:1,fill:n.color.dark,r:5,style:{zIndex:1500}}),kl={xAccessor:e=>e==null?void 0:e.x,yAccessor:e=>e==null?void 0:e.y},C6=(e,t,n)=>n==="pre"?`${t}${e}`:`${e}${t}`,tH=10,nH=5,A6=d.forwardRef(({rowsCount:e=3,nodes:t,height:n,width:r,xAxisLabel:o,yAxisLabel:a,xAxisDomain:i,yAxisDomain:s,xAxisUnitSymbol:c,yAxisUnitSymbol:u,tooltipTitle:f,mode:p="mini",xAxisCharLimit:h,connectNulls:v=!1,maxNodesInMiniMode:g=nH,tooltipStackCharLimit:m=tH,withBackground:x=!0},y)=>{const w=d.useRef(null),b=e===1;Bn(w,y,`${o}-${a}-DirectedLineChart`);const A=d.useMemo(()=>t.map(({seriesMetaData:k},B)=>{const{employee:V}=k;return{id:V.id,name:V.name,color:Xe(B)}}).slice(0,p==="mini"?g:t.length),[t,p,g]),[C,$]=d.useState(()=>A.filter((k,B)=>p==="full"||B<g).map(k=>k.id)),P=d.useMemo(()=>t.map((k,B)=>({nodeId:k.seriesMetaData.employee.id,points:k.xValues.map((V,j)=>{var E;let W=null;return b?W=1/t.length*(B+1)+1/(t.length*10)*(j+1):W=((E=k==null?void 0:k.yValues)==null?void 0:E[j])??null,{x:k.xValues[j],y:W,pointMetaData:k.pointsMetaData[j],nodeId:k.seriesMetaData.employee.id,color:Xe(B)}})})).slice(0,p==="mini"?g:t.length),[t,p,g,b]),T=d.useMemo(()=>p==="full"?P.filter(({nodeId:k})=>C.includes(k)):P,[P,p,C]),M=d.useMemo(()=>Math.floor((r-(p==="mini"?0:150))/(t[0].xValues.length*8)),[r,p,t]);return l.jsx("div",{ref:w,id:"directed-line-chart",className:te("rabbit-ds flex flex-col",x?"bg-[white]":""),style:{width:r,height:n},children:l.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-row",children:[l.jsx("div",{className:"h-full min-h-0 w-full min-w-0",children:l.jsxs(dr,{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:[l.jsx(_o,{hideTicks:!0,orientation:"bottom",stroke:"#CFD7DF",strokeWidth:1,numTicks:6,tickFormat:k=>c?C6(k,c.symbol,c.position):k,tickComponent:k=>l.jsx(Ra,{textLabel:k.formattedValue||"",x:k.x,y:k.y,textStyles:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,fill:"#666666",textAnchor:"middle"},axisCharLimit:h??M}),label:`${o} ➔`,labelProps:{fontFamily:"system-ui",fontSize:"10px",fontWeight:600,dy:10,fill:"#666666",textAnchor:"middle",verticalAnchor:"middle"}}),l.jsx(_o,{hideTicks:!0,numTicks:b?0:6,strokeWidth:b?0:1,orientation:"left",stroke:"#CFD7DF",label:a?`${a} ➔`:"",tickFormat:k=>u?C6(k,u.symbol,u.position):k,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((k,B)=>l.jsxs(l.Fragment,{children:[l.jsx(Jj,{data:k.points,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor,connectNulls:v}),l.jsx(H8,{dataKey:`Performance Management ${B}`,data:k.points,size:8,renderGlyph:Rj,xAccessor:kl.xAccessor,yAccessor:kl.yAccessor})]})),l.jsx(hl,{showDatumGlyph:!0,scroll:!0,showVerticalCrosshair:!0,showHorizontalCrosshair:!0,debounce:500,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,detectBounds:!0,unstyled:!0,applyPositionStyle:!0,renderGlyph:eH,renderTooltip:({tooltipData:k})=>{var j,W,E,I,U,z,O,N,D;const B=t.find(Q=>{var q;return Q.id===((q=k==null?void 0:k.nearestDatum)==null?void 0:q.datum.nodeId)}),V=((j=k==null?void 0:k.nearestDatum)==null?void 0:j.datum)&&String((W=k==null?void 0:k.nearestDatum)==null?void 0:W.datum.x).length<m;return l.jsx(x6,{xValue:(E=k==null?void 0:k.nearestDatum)==null?void 0:E.datum.x,yValue:(I=k==null?void 0:k.nearestDatum)==null?void 0:I.datum.y,xAxisLabel:o,yAxisLabel:a,showSideBySide:!!V,tooltipTitle:f,otherDataPoints:((O=(z=(U=k==null?void 0:k.nearestDatum)==null?void 0:U.datum)==null?void 0:z.pointMetaData)==null?void 0:O.otherDataPoints)??[],seriesMetaData:B==null?void 0:B.seriesMetaData,pointMetaData:(D=(N=k==null?void 0:k.nearestDatum)==null?void 0:N.datum)==null?void 0:D.pointMetaData})}})]})}),p==="full"&&l.jsx(Hj,{nodes:A,seriesSelectorTitle:"Team members",selectedNodeIds:C,setSelectedNodeIds:$})]})})});A6.displayName="LineBase";const S6=d.forwardRef((e,t)=>l.jsx(tr,{debounceTime:10,children:({width:n,height:r})=>l.jsx(A6,{ref:t,width:n,height:r,...e})}));S6.displayName="DirectedLineChart";const E6=S6,rH=[{"#FFEFD4":"#AF5C20"},{"#DBF2D3":"#44812F"},{"#BFE8C6":"#1A5724"},{"#FFE7C5":"#8C6A00"},{"#FAD4D4":"#C62C02"},{"#EAEAEA":"#333333"},{"#E6F1FD":"#1565BC"},{"#FFE1D9":"#C62C02"}];function oH({box:e,showCountData:t=!1}){function n(r){if(!r)return"#333";const o=rH.find(a=>a[r]);return o?o[r]:r}return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex shrink grow basis-0 flex-col items-start",children:[l.jsx("div",{className:"flex items-start gap-2.5",children:l.jsxs("span",{className:"text-3xs",style:{color:n(n(e==null?void 0:e.color))},children:[" ",e==null?void 0:e.label]})}),t&&l.jsxs("span",{className:"text-3xs text-body-secondary",children:[e==null?void 0:e.count," Member",yb(e==null?void 0:e.count)]})]}),t&&l.jsx("div",{className:"flex items-start",children:l.jsx("div",{className:"flex items-center justify-center rounded-radius-600 bg-surface-grey-subtle/40 px-0.5",children:l.jsxs("span",{className:"text-2xs leading-400 text-body-secondary",children:[e==null?void 0:e.percentage,"%"]})})})]})}const aH=({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 f,p,h,v;const s=e===1?"OVERALL":"PERFORMANCE",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},iH=({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 f,p,h,v;const s="POTENTIAL",c=((p=(f=i==null?void 0:i.scoreRange)==null?void 0:f[s])==null?void 0:p.maxScore)??0,u=((v=(h=i==null?void 0:i.scoreRange)==null?void 0:h[s])==null?void 0:v.minScore)??0;return`${a} minmax(20px, ${c-u}fr)`},"")),r},M6=d.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:c=0,mode:u="mini",showCountData:f=!1},p)=>{const h=d.useRef(null);return Bn(h,p,"GridChart"),l.jsxs("div",{ref:h,className:"flex flex-row",style:{position:o,top:c,left:s,width:i,margin:a,height:"100%"},children:[l.jsx("div",{style:{flexGrow:1,display:"grid",gridTemplateRows:iH({rows:e,columns:t,boxData:r}),gridTemplateColumns:aH({rows:e,columns:t,boxData:r}),gap:n,height:"100%"},children:r==null?void 0:r.map((v,g)=>l.jsx("div",{style:{padding:"8px",backgroundColor:(v==null?void 0:v.color)??"#CFD7DF"},children:l.jsx(oH,{box:v,showCountData:f})},v.label+v.color+g))}),u==="full"&&l.jsx("div",{className:"inline-flex w-64 shrink-0 grow-0"})]})});M6.displayName="GridChart";const $6=M6,P6=d.forwardRef(({directedLineChartProps:e,gridChartProps:t,mode:n="mini"},r)=>{const o=d.useRef(null);return Bn(o,r,`${e.xAxisLabel}-${e.yAxisLabel}-GridDirectedLineChart`),l.jsxs("div",{ref:o,className:"relative h-full w-full",children:[l.jsx("div",{className:"absolute mx-[50px] mb-[50px] mt-[10px] h-[calc(100%-60px)] w-[calc(100%-100px)]",children:l.jsx($6,{...t,mode:n})}),l.jsxs("div",{className:"absolute h-full w-full",children:[l.jsx(E6,{...e,mode:n}),l.jsx("div",{})]})]})});P6.displayName="GridDirectedLineChart";const sH=P6,Nl="ToggleGroup",[T6,GY]=rt(Nl,[io]),k6=io(),lH=d.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return d.createElement(cH,K({},o,{ref:t}))}if(n==="multiple"){const o=r;return d.createElement(uH,K({},o,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Nl}\``)}),[N6,O6]=T6(Nl),cH=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=ut({prop:n,defaultProp:r,onChange:o});return d.createElement(N6,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:s,onItemDeactivate:d.useCallback(()=>s(""),[s])},d.createElement(_6,K({},a,{ref:t})))}),uH=d.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=ut({prop:n,defaultProp:r,onChange:o}),c=d.useCallback(f=>s((p=[])=>[...p,f]),[s]),u=d.useCallback(f=>s((p=[])=>p.filter(h=>h!==f)),[s]);return d.createElement(N6,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u},d.createElement(_6,K({},a,{ref:t})))}),[dH,fH]=T6(Nl),_6=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:s=!0,...c}=e,u=k6(n),f=Hn(i),p={role:"group",dir:f,...c};return d.createElement(dH,{scope:n,rovingFocus:o,disabled:r},o?d.createElement(qc,K({asChild:!0},u,{orientation:a,dir:f,loop:s}),d.createElement(be.div,K({},p,{ref:t}))):d.createElement(be.div,K({},p,{ref:t})))}),Lf="ToggleGroupItem",pH=d.forwardRef((e,t)=>{const n=O6(Lf,e.__scopeToggleGroup),r=fH(Lf,e.__scopeToggleGroup),o=k6(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,s={...e,pressed:a,disabled:i},c=d.useRef(null);return r.rovingFocus?d.createElement(Kc,K({asChild:!0},o,{focusable:!i,active:a,ref:c}),d.createElement(D6,K({},s,{ref:t}))):d.createElement(D6,K({},s,{ref:t}))}),D6=d.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=O6(Lf,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?i:void 0;return d.createElement(P1,K({},s,o,{ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}}))}),hH=lH,gH=pH;function vH({children:e,...t}){return l.jsx(hH,{className:"flex gap-2",...t,children:e})}function mH({value:e,disabled:t,selected:n,icon:r,label:o,count:a,...i}){return l.jsx(gH,{asChild:!0,value:e,...i,children:l.jsx("button",{"data-deer-btn":!0,type:"button",className:te("rabbit-ds inline-flex h-7 w-auto flex-col items-center justify-center rounded-radius-round border border-solid p-0 hover:cursor-pointer","data-[state=off]:border-card-grey-subtle data-[state=off]:bg-surface-grey-subtle data-[state=off]:text-body-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:l.jsxs("div",{className:"flex flex-row items-center justify-center gap-1 rounded-radius-round px-4 py-1",children:[r?l.jsx(Ae,{IconSVG:r,size:"small"}):null,l.jsxs("div",{className:"text-sm font-semibold",children:[o?l.jsx("span",{children:o}):null," ",a?l.jsxs("span",{children:["(",a,")"]}):null]})]})})})}const ei="NavigationMenu",[Bf,bH,yH]=wr(ei),[zf,wH,xH]=wr(ei),[Wf,YY]=rt(ei,[yH,xH]),[CH,jr]=Wf(ei),[AH,XY]=Wf(ei),SH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:c="horizontal",dir:u,...f}=e,[p,h]=d.useState(null),v=Me(t,M=>h(M)),g=Hn(u),m=d.useRef(0),x=d.useRef(0),y=d.useRef(0),[w,b]=d.useState(!0),[A="",C]=ut({prop:r,onChange:M=>{const k=M!=="",B=s>0;k?(window.clearTimeout(y.current),B&&b(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout(()=>b(!0),s)),o==null||o(M)},defaultProp:a}),$=d.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>C(""),150)},[C]),P=d.useCallback(M=>{window.clearTimeout(x.current),C(M)},[C]),T=d.useCallback(M=>{A===M?window.clearTimeout(x.current):m.current=window.setTimeout(()=>{window.clearTimeout(x.current),C(M)},i)},[A,C,i]);return d.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(x.current),window.clearTimeout(y.current)},[]),d.createElement(EH,{scope:n,isRootMenu:!0,value:A,dir:g,orientation:c,rootNavigationMenu:p,onTriggerEnter:M=>{window.clearTimeout(m.current),w?T(M):P(M)},onTriggerLeave:()=>{window.clearTimeout(m.current),$()},onContentEnter:()=>window.clearTimeout(x.current),onContentLeave:$,onItemSelect:M=>{C(k=>k===M?"":M)},onItemDismiss:()=>C("")},d.createElement(be.nav,K({"aria-label":"Main","data-orientation":c,dir:g},f,{ref:v})))}),EH=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:i,value:s,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:p,onContentEnter:h,onContentLeave:v}=e,[g,m]=d.useState(null),[x,y]=d.useState(new Map),[w,b]=d.useState(null);return d.createElement(CH,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:oi(s),baseId:dt(),dir:o,orientation:a,viewport:g,onViewportChange:m,indicatorTrack:w,onIndicatorTrackChange:b,onTriggerEnter:Je(f),onTriggerLeave:Je(p),onContentEnter:Je(h),onContentLeave:Je(v),onItemSelect:Je(c),onItemDismiss:Je(u),onViewportContentChange:d.useCallback((A,C)=>{y($=>($.set(A,C),new Map($)))},[]),onViewportContentRemove:d.useCallback(A=>{y(C=>C.has(A)?(C.delete(A),new Map(C)):C)},[])},d.createElement(Bf.Provider,{scope:t},d.createElement(AH,{scope:t,items:x},i)))},MH="NavigationMenuList",$H=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(MH,n),a=d.createElement(be.ul,K({"data-orientation":o.orientation},r,{ref:t}));return d.createElement(be.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange},d.createElement(Bf.Slot,{scope:n},o.isRootMenu?d.createElement(B6,{asChild:!0},a):a))}),PH="NavigationMenuItem",[TH,F6]=Wf(PH),kH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=dt(),i=r||a||"LEGACY_REACT_AUTO_VALUE",s=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(()=>{}),p=d.useRef(!1),h=d.useCallback((g="start")=>{if(s.current){f.current();const m=Vf(s.current);m.length&&jf(g==="start"?m:m.reverse())}},[]),v=d.useCallback(()=>{if(s.current){const g=Vf(s.current);g.length&&(f.current=BH(g))}},[]);return d.createElement(TH,{scope:n,value:i,triggerRef:c,contentRef:s,focusProxyRef:u,wasEscapeCloseRef:p,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:v,onContentFocusOutside:v},d.createElement(be.li,K({},o,{ref:t})))}),I6="NavigationMenuTrigger",NH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=jr(I6,e.__scopeNavigationMenu),i=F6(I6,e.__scopeNavigationMenu),s=d.useRef(null),c=Me(s,i.triggerRef,t),u=j6(a.baseId,i.value),f=H6(a.baseId,i.value),p=d.useRef(!1),h=d.useRef(!1),v=i.value===a.value;return d.createElement(d.Fragment,null,d.createElement(Bf.ItemSlot,{scope:n,value:i.value},d.createElement(W6,{asChild:!0},d.createElement(be.button,K({id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":V6(v),"aria-expanded":v,"aria-controls":f},o,{ref:c,onPointerEnter:fe(e.onPointerEnter,()=>{h.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:fe(e.onPointerMove,Hf(()=>{r||h.current||i.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(i.value),p.current=!0)})),onPointerLeave:fe(e.onPointerLeave,Hf(()=>{r||(a.onTriggerLeave(),p.current=!1)})),onClick:fe(e.onClick,()=>{a.onItemSelect(i.value),h.current=v}),onKeyDown:fe(e.onKeyDown,g=>{const x={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];v&&g.key===x&&(i.onEntryKeyDown(),g.preventDefault())})})))),v&&d.createElement(d.Fragment,null,d.createElement(Rh,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:g=>{const m=i.contentRef.current,x=g.relatedTarget,y=x===s.current,w=m==null?void 0:m.contains(x);(y||!w)&&i.onFocusProxyEnter(y?"start":"end")}}),a.viewport&&d.createElement("span",{"aria-owns":f})))}),L6="navigationMenu.linkSelect",OH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return d.createElement(W6,{asChild:!0},d.createElement(be.a,K({"data-active":r?"":void 0,"aria-current":r?"page":void 0},a,{ref:t,onClick:fe(e.onClick,i=>{const s=i.target,c=new CustomEvent(L6,{bubbles:!0,cancelable:!0});if(s.addEventListener(L6,u=>o==null?void 0:o(u),{once:!0}),ii(s,c),!c.defaultPrevented&&!i.metaKey){const u=new CustomEvent(_l,{bubbles:!0,cancelable:!0});ii(s,u)}},{checkForDefaultPrevented:!1})})))}),Ol="NavigationMenuContent",_H=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=jr(Ol,e.__scopeNavigationMenu),a=F6(Ol,e.__scopeNavigationMenu),i=Me(a.contentRef,t),s=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?d.createElement(DH,K({forceMount:n},c,{ref:i})):d.createElement(Tt,{present:n||s},d.createElement(FH,K({"data-state":V6(s)},c,{ref:i,onPointerEnter:fe(e.onPointerEnter,o.onContentEnter),onPointerLeave:fe(e.onPointerLeave,Hf(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...c.style}})))}),DH=d.forwardRef((e,t)=>{const n=jr(Ol,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return ht(()=>{r(e.value,{ref:t,...e})},[e,t,r]),ht(()=>()=>o(e.value),[e.value,o]),null}),_l="navigationMenu.rootContentDismiss",FH=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:c,...u}=e,f=jr(Ol,n),p=d.useRef(null),h=Me(p,t),v=j6(f.baseId,r),g=H6(f.baseId,r),m=bH(n),x=d.useRef(null),{onItemDismiss:y}=f;d.useEffect(()=>{const b=p.current;if(f.isRootMenu&&b){const A=()=>{var C;y(),s(),b.contains(document.activeElement)&&((C=o.current)===null||C===void 0||C.focus())};return b.addEventListener(_l,A),()=>b.removeEventListener(_l,A)}},[f.isRootMenu,e.value,o,y,s]);const w=d.useMemo(()=>{const A=m().map(k=>k.value);f.dir==="rtl"&&A.reverse();const C=A.indexOf(f.value),$=A.indexOf(f.previousValue),P=r===f.value,T=$===A.indexOf(r);if(!P&&!T)return x.current;const M=(()=>{if(C!==$){if(P&&$!==-1)return C>$?"from-end":"from-start";if(T&&C!==-1)return C>$?"to-start":"to-end"}return null})();return x.current=M,M},[f.previousValue,f.value,f.dir,m,r]);return d.createElement(B6,{asChild:!0},d.createElement(Xo,K({id:g,"aria-labelledby":v,"data-motion":w,"data-orientation":f.orientation},u,{ref:h,onDismiss:()=>{var b;const A=new Event(_l,{bubbles:!0,cancelable:!0});(b=p.current)===null||b===void 0||b.dispatchEvent(A)},onFocusOutside:fe(e.onFocusOutside,b=>{var A;c();const C=b.target;(A=f.rootNavigationMenu)!==null&&A!==void 0&&A.contains(C)&&b.preventDefault()}),onPointerDownOutside:fe(e.onPointerDownOutside,b=>{var A;const C=b.target,$=m().some(T=>{var M;return(M=T.ref.current)===null||M===void 0?void 0:M.contains(C)}),P=f.isRootMenu&&((A=f.viewport)===null||A===void 0?void 0:A.contains(C));($||P||!f.isRootMenu)&&b.preventDefault()}),onKeyDown:fe(e.onKeyDown,b=>{const A=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!A){const P=Vf(b.currentTarget),T=document.activeElement,M=P.findIndex(V=>V===T),B=b.shiftKey?P.slice(0,M).reverse():P.slice(M+1,P.length);if(jf(B))b.preventDefault();else{var $;($=a.current)===null||$===void 0||$.focus()}}}),onEscapeKeyDown:fe(e.onEscapeKeyDown,b=>{i.current=!0})})))}),IH="FocusGroup",B6=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=jr(IH,n);return d.createElement(zf.Provider,{scope:n},d.createElement(zf.Slot,{scope:n},d.createElement(be.div,K({dir:o.dir},r,{ref:t}))))}),z6=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],LH="FocusGroupItem",W6=d.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=wH(n),a=jr(LH,n);return d.createElement(zf.ItemSlot,{scope:n},d.createElement(be.button,K({},r,{ref:t,onKeyDown:fe(e.onKeyDown,i=>{if(["Home","End",...z6].includes(i.key)){let c=o().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&c.reverse(),z6.includes(i.key)){const p=c.indexOf(i.currentTarget);c=c.slice(p+1)}setTimeout(()=>jf(c)),i.preventDefault()}})})))});function Vf(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 jf(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function BH(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 V6(e){return e?"open":"closed"}function j6(e,t){return`${e}-trigger-${t}`}function H6(e,t){return`${e}-content-${t}`}function Hf(e){return t=>t.pointerType==="mouse"?e(t):void 0}const zH=SH,WH=$H,VH=kH,jH=NH,U6=OH,HH=_H,UH=Ge(["rabbit-ds h-full w-full px-3 py-2 [&>*:first-child]:h-full"],{variants:{variant:{default:""},defaultVariant:{variant:"default"}}});function GH(){return l.jsx("div",{className:"relative h-full w-full",children:l.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:[l.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"}}),l.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"}}),l.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"}}),l.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"}}),l.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)"}}),l.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 G6=d.forwardRef(({className:e,children:t,...n},r)=>l.jsxs("div",{className:"rabbit-ds relative h-screen w-20",children:[l.jsx("div",{className:"absolute h-full w-full",children:l.jsx(GH,{})}),l.jsx(zH,{className:te(UH({className:e})),orientation:"vertical",ref:r,...n,children:l.jsx(WH,{className:"m-0 flex h-full flex-col p-0",children:t})})]}));G6.displayName="LeftNav";const Uf=d.forwardRef(({children:e,asChild:t=!1,...n},r)=>{const o=t?dn:"div";return l.jsx(VH,{asChild:!0,children:l.jsx(o,{ref:r,className:"rabbit-ds",...n,children:e})})});Uf.displayName="LeftNavItem",Uf.defaultProps={asChild:!1};const YH=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"}}}),Y6=d.forwardRef(({children:e,align:t,...n},r)=>l.jsx("div",{ref:r,className:te(YH({variant:t})),...n,children:e}));Y6.displayName="LeftNavItem";const X6=d.forwardRef((e,t)=>l.jsx(U6,{ref:t,...e,className:"rabbit-ds z-20 flex size-1400 h-1400 w-1400 cursor-pointer items-center justify-center rounded-radius-100 border-none bg-transparent focus:text-primary-focus focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",children:l.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:[l.jsx("g",{clipPath:"url(#clip0_1397_29183)",children:l.jsxs("g",{clipPath:"url(#clip1_1397_29183)",filter:"url(#filter0_d_1397_29183)",children:[l.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"}),l.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"}),l.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"}),l.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"}),l.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"}),l.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"}),l.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"}),l.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"})]})}),l.jsxs("defs",{children:[l.jsxs("filter",{id:"filter0_d_1397_29183",x:"-8",y:"-6",width:"40",height:"40",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),l.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"}),l.jsx("feOffset",{dy:"2"}),l.jsx("feGaussianBlur",{stdDeviation:"4"}),l.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),l.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"}),l.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1397_29183"}),l.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1397_29183",result:"shape"})]}),l.jsx("clipPath",{id:"clip0_1397_29183",children:l.jsx("rect",{width:"24",height:"24",rx:"8",fill:"white"})}),l.jsx("clipPath",{id:"clip1_1397_29183",children:l.jsx("rect",{width:"24",height:"24",fill:"white"})})]})]})}));X6.displayName="LeftNavHome";const XH=Ge(["rabbit-ds relative flex h-14 w-14 items-center justify-center rounded-radius-200 font-sans text-[10px] text-body-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"}}),qH=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"}}),q6=d.forwardRef(({className:e,variant:t,badgeText:n,icon:r,iconSize:o,isActive:a=!1,children:i,...s},c)=>l.jsx("div",{className:"rabbit-ds",children:l.jsxs(U6,{"data-deer-btn":!0,className:te(XH({variant:t,className:e})),ref:c,"data-active":a,...s,children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsxs("div",{className:"relative flex items-center justify-center",children:[l.jsx(Ae,{IconSVG:r,size:"large"}),t==="withNotification"&&l.jsxs("div",{className:"absolute left-3 flex h-5 w-6 items-center justify-center rounded-radius-300 bg-functional-warn px-2 text-xs text-white",children:[l.jsx("span",{className:"sr-only",children:"Notification"}),n]})]}),l.jsx("div",{className:te(qH({variant:t==="gradient"?t:"default"}),"text-xs"),children:i})]}),t==="withMenu"&&l.jsx("div",{className:"absolute right-0 flex h-14 w-3 items-center justify-center",children:l.jsx(Ae,{IconSVG:b1,size:"large"})})]})}));q6.displayName="LeftNavButton";const KH=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 QH({className:e,isCollapsed:t,...n}){return l.jsx("button",{"data-deer-btn":!0,type:"button",className:te(KH({variant:t?"collapsed":"default"}),e),...n,children:l.jsx(Ae,{IconSVG:p1,className:t?"rotate-180":""})})}const K6=d.createContext({isOpen:!1,toggleOpen:()=>{}}),ZH=()=>d.useContext(K6);function Q6({...e}){const{isOpen:t,toggleOpen:n}=ZH();return l.jsx(QH,{className:`absolute right-0 top-5 z-20 ${t?"":"translate-x-full"}`,isCollapsed:!t,onClick:n,...e})}function JH(e){const{children:t,defaultOpen:n=!1}=e,r=e.open!==void 0,[o,a]=d.useState(n),i=d.useCallback(()=>{a(f=>!f)},[]),s=r?e.open:o,c=r?e.onToggle:i,u=d.useMemo(()=>({isOpen:s,toggleOpen:c}),[s,c]);return l.jsx(K6.Provider,{value:u,children:l.jsxs("div",{className:te("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:[l.jsx(Q6,{}),l.jsx("div",{className:s?"h-full p-5":"invisible h-0 w-0 scale-0 overflow-hidden opacity-0",children:t})]})})}function RH({children:e}){return l.jsx("div",{className:te("nav-group flex flex-col gap-1","after:my-4 after:h-[1px] after:w-full after:bg-accent last:after:hidden"),children:e})}function eU({children:e}){return l.jsx("div",{className:"p-2 text-xs font-semibold text-body-secondary",children:e})}function tU({children:e,...t}){return l.jsx(Zh,{...t,children:e})}const nU=Ge("max-w-[28%] shrink-0",{variants:{orientation:{horizontal:"ml-2",vertical:"mt-2 w-full [&>div]:w-full [&_button]:w-full"}},defaultVariants:{orientation:"horizontal"}});function rU({className:e,orientation:t,...n}){return l.jsx("div",{className:nU({orientation:t}),children:l.jsx(Dt,{className:te(e,"h-auto min-h-10"),variant:"transparentOutline",...n})})}const oU={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"}},aU=d.forwardRef(function({title:t,achieved:n,status:r,explanation:o,truncateExplanation:a=!0},i){const s=oU[r];return l.jsx("div",{ref:i,className:te("rabbit-ds","mr-auto",a?"w-[70%]":""),children:l.jsxs("div",{className:"flex w-full flex-col gap-1",children:[l.jsxs("div",{className:"mt-1 flex items-center",children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:m1}),l.jsx("div",{className:"ml-1 text-sm",children:t})]}),l.jsxs("div",{className:"my-1 flex items-end gap-[18px]",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-xs text-body-secondary",children:"Achieved"}),l.jsxs("span",{className:te(s.colorScheme,"!bg-transparent text-3xl font-semibold"),children:[n,"%"]})]}),l.jsx(N3,{colorScheme:s.colorScheme,className:"mb-1",children:s.label})]}),o&&l.jsxs("div",{className:te("flex w-full gap-1",a?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",a?"truncate":""),children:o})]})]})})});function iU({employeeName:e,employeeProfilePhoto:t,reviewCycleName:n,reviewType:r,dueBy:o}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:r})]}),l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"text-body-secondary",children:[n," • "]}),l.jsxs("span",{className:"text-body-secondary",children:["Due by ",o]})]})]})]})})}const Z6=d.forwardRef(({employeeName:e,employeeProfilePhoto:t,designation:n,explanation:r,truncateExplanation:o=!0},a)=>l.jsx("div",{ref:a,className:te("rabbit-ds mr-auto",o?"w-[65%]":""),children:l.jsxs("div",{className:"flex w-full gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:te("flex w-full flex-col items-start text-sm","justify-center"),children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:n})]}),r&&l.jsxs("div",{className:te("mt-1 flex w-full gap-1",o?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",o?"truncate":""),children:r})]})]})]})}));Z6.displayName="SharePraiseNudgeData";const J6=d.forwardRef(({employeeName:e,employeeProfilePhoto:t,designation:n,requestReason:r,truncateExplanation:o=!0},a)=>l.jsx("div",{ref:a,className:te("rabbit-ds mr-auto",o?"w-[65%]":""),children:l.jsxs("div",{className:"flex w-full gap-2",children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:"Avatar"})}),l.jsxs("div",{className:"flex w-full flex-col items-start text-sm",children:[l.jsxs("div",{className:"flex w-full gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[e," • "]}),l.jsx("span",{className:"text-sm text-body-secondary",children:n})]}),l.jsxs("div",{className:te("mt-1 flex w-full gap-1",o?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",o?"truncate":""),children:r})]})]})]})}));J6.displayName="RequestedFeedbackNudgeData";const sU=Ge("",{variants:{orientation:{horizontal:"flex-row",vertical:"min-w-max flex-col"}},defaultVariants:{orientation:"horizontal"}});function lU({className:e,children:t,orientation:n}){return l.jsx("div",{className:te("rabbit-ds","flex w-full items-center rounded-radius-200 border border-solid border-[#F3F5F8] bg-[#FDFDFD] p-2",sU({orientation:n}),e),children:t})}function cU({nudgeCardList:e,title:t,imgSrc:n,description:r,pageSize:o=3,kebabMenu:a,variant:i="default"}){const[s,c]=d.useState(1),u=e.slice(0,o*s),f=e.length>o,p=e.length===u.length,h=i==="informational",v=()=>{c(g=>p?1:g+1)};return l.jsxs("div",{className:te("rabbit-ds","flex w-full flex-col items-start gap-[7px] rounded-radius-200 bg-white px-4 py-3 shadow-[0px_0px_2px_0px_rgba(0,0,0,0.24)]"),children:[l.jsxs("div",{className:"flex w-full items-start justify-between",children:[l.jsxs("div",{className:"mt-1 flex items-center gap-4",children:[n?l.jsx(hn,{className:"h-16 w-16",children:l.jsx(gn,{src:n,alt:t})}):null,h?l.jsx("div",{className:"flex flex-col gap-[7px]",children:u}):l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-semibold",children:t}),l.jsx("span",{className:"text-sm",children:r})]})]}),a]}),!h&&u,f&&l.jsx("div",{className:"mx-auto",children:l.jsxs(Dt,{variant:"text",onClick:v,iconRight:p?d1:Gr,children:["View ",p?"less":"more"]})})]})}function uU({surveyName:e,date:t}){return l.jsx("div",{className:"rabbit-ds mr-auto",children:l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Ae,{IconSVG:x1}),l.jsxs("div",{className:"flex flex-col items-start text-sm",children:[l.jsx("span",{className:"font-semibold",children:e}),l.jsx(Dc,{date:t,showRelativeTime:!0})]})]})})}const R6=d.forwardRef(function({employeeProfilePhoto:t,employeeName:n,scheduleDate:r,duration:o,subTitle:a,explanation:i,truncateExplanation:s=!0},c){return l.jsx("div",{ref:c,className:te("rabbit-ds","mr-auto",s?"w-[70%]":""),children:l.jsxs("div",{className:te("flex items-center gap-2 text-sm","flex-row [&>div]:items-start"),children:[l.jsx(hn,{size:"xl",children:l.jsx(gn,{src:t,alt:n})}),l.jsxs("div",{className:"flex w-full flex-col items-center gap-1",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"font-semibold",children:[n," • "]}),r?l.jsx(Dc,{date:r,duration:o,timeFormat:"HH:mm a",showTime:!0,className:"text-body-secondary"}):l.jsx("span",{className:"font-semibold",style:{color:"#C62C02"},children:a})]}),i&&l.jsxs("div",{className:te("flex w-[90%] gap-1",s?"items-center":"items-start"),children:[l.jsx(Ae,{"aria-hidden":!0,size:"small",className:"text-body-secondary",IconSVG:br}),l.jsx("span",{className:te("w-full text-xs text-body-secondary",s?"truncate":""),children:i})]})]})]})})});R6.defaultProps={subTitle:void 0,scheduleDate:void 0};function dU({label:e,onClick:t,customCompProps:n}){const[r,o]=d.useState(1);return l.jsxs(ru,{children:[l.jsx(Qi,{children:l.jsx("span",{children:e})}),l.jsx(nu,{children:l.jsx(Zi,{children:l.jsx(so,{children:l.jsxs("div",{className:"flex flex-col p-2",children:[l.jsx(Ql,{htmlFor:n==null?void 0:n.label,className:"text-xs",children:n==null?void 0:n.label}),l.jsx(T1,{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}),l.jsx("div",{className:"flex justify-end",children:l.jsx(Dt,{className:"mt-2",onClick:()=>t(r),disabled:r<1||Number.isNaN(r),children:n==null?void 0:n.buttonText})})]})})})})]})}function fU({options:e}){const[t,n]=d.useState(!1),r=(o,a)=>{o(a),n(!1)};return l.jsxs(Xi,{open:t,children:[l.jsx(qi,{asChild:!0,onClick:()=>n(!0),children:l.jsx(Dt,{variant:"text",size:"smallIcon",children:l.jsx(Ae,{IconSVG:v1})})}),l.jsx(oa,{className:"w-56",onFocusOutside:()=>n(!1),onPointerDownOutside:()=>n(!1),children:l.jsx(so,{children:e.map(({type:o,onClick:a,label:i,customCompProps:s})=>!o||o==="default"?l.jsx(aa,{onClick:()=>r(a),children:l.jsx("span",{children:i})},i):l.jsx(dU,{onClick:c=>r(a,c),label:i,customCompProps:s},i))})})]})}const e7=aa,t7=so,n7=Ki,r7=es,o7=Ji,a7=Ri,i7=d.forwardRef(({className:e,children:t,align:n="end",...r},o)=>l.jsx(oa,{ref:o,align:n,...r,children:t}));i7.displayName="SplitButtonDropdownContent";const pU=Ge("",{variants:{size:{normal:"icon",small:"smallIcon",icon:"icon",smallIcon:"smallIcon",nav:"icon"}},defaultVariants:{size:"normal"}});function hU({children:e,size:t,status:n,variant:r,...o}){return l.jsx("div",{className:"rabbit-ds flex flex-row",children:l.jsxs(Xi,{children:[l.jsx(Dt,{variant:r,status:n,size:t,...o,className:"rounded-r-none",children:e}),l.jsx(qi,{asChild:!0,children:l.jsx(Dt,{variant:r,status:n,className:"rounded-l-none border-l-0",size:pU({size:t}),iconLeft:Gr})})]})})}e7.displayName="SplitButtonDropdownItem",t7.displayName="SplitButtonDropdownGroup",n7.displayName="SplitButtonDropdownRadioGroup",r7.displayName="SplitButtonDropdownLabel",o7.displayName="SplitButtonDropdownCheckboxItem",a7.displayName="SplitButtonDropdownRadioItem";const s7=({bold:e=!1,xbold:t=!1,color:n="text-body-primary"})=>te("rabbit-ds-text",t?"font-bold":e?"font-semibold":"font-normal",n),gU=({children:e,className:t,...n})=>l.jsx("h3",{className:te("text-350sm leading-500",s7(n),t),children:e}),vU=({children:e,className:t,...n})=>l.jsx("p",{className:te("text-300sm leading-400",s7(n),t),children:e}),l7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("rabbit-ds flex gap-200 p-300",t),...n,ref:r,children:e}));l7.displayName="ListItemComp";const c7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));c7.displayName="ListItemCompLeading";const u7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("flex grow flex-col justify-center",t),...n,ref:r,children:e}));u7.displayName="ListItemCompContent";const d7=({children:e,className:t,...n})=>l.jsx(gU,{bold:!0,className:te("text-body-primary",t),...n,children:e});d7.displayName="ListItemCompTitle";const f7=({children:e,className:t,...n})=>l.jsx(vU,{className:te("text-body-secondary",t),...n,children:e});f7.displayName="ListItemCompDescription";const p7=d.forwardRef(({children:e,className:t,...n},r)=>l.jsx("div",{className:te("flex shrink-0 items-center gap-200",t),...n,ref:r,children:e}));p7.displayName="ListItemCompAction",_.AICard=Hy,_.Accordion=$2,_.AccordionContent=k2,_.AccordionItem=P2,_.AccordionTrigger=T2,_.Add=wb,_.AddPerson=xb,_.Alert=N2,_.AlertDescription=_2,_.AlertDialogAction=Cp,_.AlertDialogCancel=xp,_.AlertDialogComponent=Qx,_.AlertDialogContainer=yp,_.AlertDialogContent=Pc,_.AlertDialogDescription=kc,_.AlertDialogOverlay=$c,_.AlertDialogPortal=wp,_.AlertDialogTitle=Tc,_.AlertDialogTrigger=Ap,_.AlertIcon=O2,_.Avatar=hn,_.AvatarBadge=ts,_.AvatarFallback=Pi,_.AvatarGroup=Mu,_.AvatarImage=gn,_.Breadcrumb=B3,_.BreadcrumbEllipsis=U3,_.BreadcrumbItem=W3,_.BreadcrumbLink=V3,_.BreadcrumbList=z3,_.BreadcrumbPage=j3,_.BreadcrumbSeparator=H3,_.Button=Dt,_.Calendar=Cb,_.Caption=Nc,_.Card=Yo,_.CardContent=oc,_.CardDescription=o2,_.CardHeader=r2,_.CardKPI=SP,_.CardTitle=rc,_.Carousel=kT,_.CarouselContainer=NT,_.CarouselNextButton=_T,_.CarouselPrevButton=OT,_.Channel=Ab,_.Check=Ho,_.CheckCircleOutline=l1,_.Checkbox=ci,_.ChevronDown=Gr,_.ChevronLeft=Sb,_.ChevronLeftCircle=c1,_.ChevronRight=li,_.ChevronRightCircle=u1,_.ChevronUp=d1,_.Chip=P9,_.ChipGroup=vH,_.ChipGroupItem=mH,_.CircleChevronRight=Eb,_.Close=f1,_.CollapseNavigation=p1,_.CollapsibleCard=My,_.ColumnFilter=h1,_.ColumnFilterCheck=C1,_.Company=Mb,_.CompanySettings=$b,_.Country=Pb,_.Cross=Tb,_.Currency=kb,_.DateTime=Dc,_.Delete=Nb,_.Develop=Ob,_.DirectedLineChart=E6,_.DisplayName=_b,_.DonutChart=Ij,_.Download=Db,_.Dropdown=Xi,_.DropdownCheckboxItem=Ji,_.DropdownChip=Kh,_.DropdownContent=oa,_.DropdownGroup=so,_.DropdownItem=aa,_.DropdownLabel=es,_.DropdownPortal=nu,_.DropdownRadioGroup=Ki,_.DropdownRadioItem=Ri,_.DropdownSeparator=ou,_.DropdownSub=ru,_.DropdownSubContent=Zi,_.DropdownSubTrigger=Qi,_.DropdownTrigger=qi,_.EmployeeIdBadge=Fb,_.Engagement=Ib,_.EngagementNudgeData=uU,_.ErrorOutline=ql,_.ExpandDown=Lb,_.ExpandRight=g1,_.Feedback=Bb,_.Gear=zb,_.Goal=Wb,_.GoalFrequency=Vb,_.GoalsCollaborators=jb,_.GoalsNudgeData=aU,_.GridChart=$6,_.GridDirectedLineChart=sH,_.Help=Hb,_.Help2=Ub,_.HistogramChart=_j,_.HistoryComments=Gb,_.Home=Yb,_.HoverCard=yP,_.HoverCardContent=gg,_.HoverCardPortal=xP,_.HoverCardTrigger=wP,_.Icon=Ae,_.Info=Xb,_.InfoWorkZero=br,_.Initiatives=qb,_.Input=T1,_.KebabMenu=v1,_.KnowTeamNudgeData=R6,_.Label=Ql,_.LeftNav=G6,_.LeftNavButton=q6,_.LeftNavGroup=Y6,_.LeftNavHome=X6,_.LeftNavItem=Uf,_.LeftNavItemContent=HH,_.LeftNavItemDropdown=Xi,_.LeftNavItemDropdownCheckboxItem=Ji,_.LeftNavItemDropdownContent=oa,_.LeftNavItemDropdownGroup=so,_.LeftNavItemDropdownItem=aa,_.LeftNavItemDropdownLabel=es,_.LeftNavItemDropdownPortal=nu,_.LeftNavItemDropdownRadioGroup=Ki,_.LeftNavItemDropdownRadioItem=Ri,_.LeftNavItemDropdownSeparator=ou,_.LeftNavItemDropdownSub=ru,_.LeftNavItemDropdownSubContent=Zi,_.LeftNavItemDropdownSubTrigger=Qi,_.LeftNavItemDropdownTrigger=qi,_.LeftNavItemTrigger=jH,_.LineChart=mj,_.ListItem=Zh,_.ListItemComp=l7,_.ListItemCompAction=p7,_.ListItemCompContent=u7,_.ListItemCompDescription=f7,_.ListItemCompLeading=c7,_.ListItemCompTitle=d7,_.ListItemIcon=BE,_.ListItemText=IE,_.Logout=Kb,_.Manager=Qb,_.ManagerWithBorder=Zb,_.MeshLogo=A1,_.MeshMaven=w9,_.MeshMavenAsk=x9,_.MeshMavenDisabledThumbsUp=C9,_.MeshMavenGlassesOnDefault=A9,_.MeshMavenWithHording=S9,_.MeshMavenWithOrangeBulb=E9,_.MeshMavenWithThumbsUp=M9,_.Metric=yg,_.MetricCard=bg,_.MetricCardStatText=Tu,_.MetricCardText=ps,_.MetricCardTitle=wg,_.Milestone=Jb,_.MyOneOnOne=Rb,_.MySettings=e9,_.NavCollapseButtonL2=Q6,_.NavGroupL2=RH,_.NavGroupTitleL2=eU,_.NavItemL2=tU,_.NavL2=JH,_.NewPassword=t9,_.Notifications=n9,_.NudgeAction=rU,_.NudgeCard=cU,_.NudgeCardItem=lU,_.NudgeKebabMenu=fU,_.Objective=m1,_.OneOnOne=r9,_.Overflow=b1,_.Peer=o9,_.Person=a9,_.Product=i9,_.ProfileCard=ku,_.ProfileCardItem=xg,_.ProfileCardKey=Cg,_.ProfileCardValue=Ag,_.ProgressBar=W1,_.ProgressInfo=CP,_.ProgressSlider=gy,_.RadarChart=Lj,_.RequestFeedback=s9,_.RequestedFeedbackNudgeData=J6,_.Reset=l9,_.Reviews=c9,_.ReviewsNudgeData=iU,_.Role=u9,_.SankeyChart=$j,_.Search=y1,_.Select=MM,_.SelectContent=h3,_.SelectGroup=$M,_.SelectItem=v3,_.SelectLabel=g3,_.SelectSeparator=m3,_.SelectTrigger=p3,_.SelectValue=PM,_.SelfScore=d9,_.Settings=f9,_.SettingsFeedback=p9,_.SettingsGoals=h9,_.SettingsSchedule=g9,_.ShareFeedback=v9,_.SharePraiseNudgeData=Z6,_.SliderDrag=w1,_.SplitButton=hU,_.SplitButtonDropdownCheckboxItem=o7,_.SplitButtonDropdownContent=i7,_.SplitButtonDropdownGroup=t7,_.SplitButtonDropdownItem=e7,_.SplitButtonDropdownLabel=r7,_.SplitButtonDropdownRadioGroup=n7,_.SplitButtonDropdownRadioItem=a7,_.SplitDetails=m9,_.StackedBarChart=jj,_.Survey=x1,_.Switch=jy,_.Tabs=$3,_.TabsContent=k3,_.TabsList=P3,_.TabsTrigger=T3,_.Tag=N3,_.Task=b9,_.Team=y9,_.Toaster=F$,_.Tooltip=gu,_.TooltipContent=ss,_.TooltipPortal=mu,_.TooltipProvider=hu,_.TooltipTrigger=vu,_.TrendingDown=S1,_.TrendingUp=E1,_.getInitialsFromName=Tp,_.toast=E$,Object.defineProperty(_,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.37.1",
4
+ "version": "1.37.2",
5
5
  "main": "./dist/@mesh.ai/rabbit.umd.js",
6
6
  "module": "./dist/@mesh.ai/rabbit.es.js ",
7
7
  "types": "./dist/index.d.ts",