PageSourceSearch

https://ai-jobs-9b4c6.web.app/assets/index-En1lWCiz.js

js ai-jobs-9b4c6.web.app collected 2026-10-03 12:16:18 UTC 99,006 bytes, 37 lines download raw bytes

1import{r as u,j as r}from"./vendor-react-CCTJrYjA.js";import{c as H,a as Ne,ar as qa,as as Ja,ao as K,ac as Za,at as Qa,b as xe,P as o,d as St,j as en,Z as tn,E as an,dR as nn,M as Re,B as kt,G as rn,x as sn,aN as ln,aK as on,aO as cn,aL as dn,aE as un,ba as pn,e as mn,t as fn,v as xn,C as hn,R as bn,dS as vn}from"./index-XBSXkm2U.js";import{C as W,b as Y,c as X,a as $}from"./card-DkZZ-bP-.js";import{S as R}from"./skeleton-C_XZDcPq.js";import{C as gn}from"./calendar-Dd_-PhXH.js";import{C as yn,D as jn,A as Nn}from"./constants-CjuggzqO.js";import{i as Je}from"./format-CnOxO5-9.js";import{C as Te}from"./check-CmPW4_wV.js";import{a8 as de,a9 as An,aa as wn,ab as q,ac as Sn,ad as kn,ae as Et,af as En,ag as Dn,Q as _,ah as In,ai as On,aj as Cn,ak as Tn,al as Pn,o as ue,am as _n,an as Ln,ao as Mn,ap as Rn,aq as Dt,ar as Bn,as as Kn,at as Wn,G as Ae,au as $n,r as we,D as Be,av as zn,aw as Fn,$ as Se,R as It,ax as Un,ay as Vn,F as ae,az as Ot,aA as re,b as te,aB as Gn,N as M,Z as Ke,H as Ct,V as Tt,aC as Hn,W as Pt,i as L,aD as he,aE as Yn,aF as Xn,aG as qn,aH as Jn,aI as Zn,aJ as Qn,aK as er,aL as tr,aM as ar,a as nr,_ as _t,X as Lt,aN as rr,aO as ie,aP as Pe,aQ as Ze,C as be,aR as sr,aS as lr,aT as or,aU as ir,t as Mt,aV as We,aW as $e,v as Rt,aX as cr,x as Bt,y as Qe,w as dr,aY as ur,aZ as pr,a_ as ve,p as mr,z as fr,A as Kt,B as xr,E as hr,a$ as br,I as vr,L as gr,b0 as yr,J as jr,K as Nr,M as Ar,O as wr,T as et,b1 as Sr,b2 as kr,b3 as tt,Y as Er,s as Dr,U as Ir,b4 as Or,j as Cr,b5 as Tr,b6 as Pr,b7 as _r,b8 as Lr,b9 as Mr,ba as Rr,bb as Br,bc as Kr,a1 as Wt,a0 as Wr,a2 as F,a5 as U,a6 as pe,a3 as se,a4 as le,a7 as me}from"./BarChart-BKJNHyw3.js";import{m as C,i as $r}from"./vendor-redux-g1Zs77sW.js";import{T as zr}from"./tag-pjk6v3Mj.js";import{g as Fr,A as at,D as Ur,C as fe}from"./getRadiusAndStrokeWidthFromDot-Dz1sCtGp.js";import{U as Vr}from"./user-check-D3kDUBbT.js";import{U as Gr}from"./users-BAN7L6_k.js";import{B as Hr}from"./building-2-C4-jlphS.js";import{E as $t}from"./external-link-CPhkYZJv.js";import{P as Yr}from"./plus-BoF0ClHJ.js";import{u as Xr}from"./vendor-router-BIYGOb_r.js";import"./vendor-i18n-D2xN3T1g.js";import"./vendor-tanstack-DNvBXHSJ.js";import"./vendor-axios-C9j2ISth.js";import"./vendor-radix-BSsKaKmH.js";import"./vendor-motion-DUw1M4dg.js";import"./vendor-sentry-DuMTgogT.js";import"./vendor-forms-BVWUSxOb.js";import"./chevron-left-Ho-xKm9P.js";import"./chevron-right-B7cOf1bL.js";import"./vendor-d3-3ZkMy8WE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"86b38f8dc372cb6aa884f7d499b2da7d45eb9c6f"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5b412de0-d970-45c8-b651-aafda6627ab0",e._sentryDebugIdIdentifier="sentry-dbid-5b412de0-d970-45c8-b651-aafda6627ab0")}catch{}})();/**
2 * @license lucide-react v0.383.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const zt=H("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
7 * @license lucide-react v0.383.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const qr=H("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
12 * @license lucide-react v0.383.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const Jr=H("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
17 * @license lucide-react v0.383.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const nt=H("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
22 * @license lucide-react v0.383.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const Ft=H("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
27 * @license lucide-react v0.383.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const Ut=H("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);/**
32 * @license lucide-react v0.383.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const Zr=H("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);var Vt=e=>e.graphicalItems.polarItems,Qr=C([de,An],wn),ke=C([Vt,q,Qr],Sn),es=C([ke],kn),Ee=C([es,Et],En),ts=C([Ee,q,ke],Dn);C([Ee,q,ke],(e,t,a)=>a.length>0?e.flatMap(n=>a.flatMap(s=>{var l,c=_(n,(l=t.dataKey)!==null&&l!==void 0?l:s.dataKey);return{value:c,errorDomain:[]}}
36)).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:_(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]})));var rt=()=>{},as=C([Ee,q,ke,In,de,On],Cn),ns=C([q,Tn,Pn,rt,as,rt,ue,de],_n),Gt=C([q,ue,Ee,ts,Ln,de,ns],Mn),rs=C([Gt,Rn,Dt],Bn),ss=C([q,Gt,rs,de],Kn);C([Dt,ss],Wn);function st(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),a.push.apply(a,n)}return a}function lt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?st(Object(a),!0).forEach(function(n){ls(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):st(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function ls(e,t,a){return(t=os(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function os(e){var t=is(e,"string");return typeof t=="symbol"?t:t+""}function is(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var n=a.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cs=(e,t)=>t,ze=C([Vt,cs],(e,t)=>e.filter(a=>a.type==="pie").find(a=>a.id===t)),ds=[],Fe=(e,t,a)=>(a==null?void 0:a.length)===0?ds:a,Ht=C([Et,ze,Fe],(e,t,a)=>{var n=e.chartData;if(t!=null){var s;if((t==null?void 0:t.data)!=null&&t.data.length>0?s=t.data:s=n,(!s||!s.length)&&a!=null&&(s=a.map(l=>lt(lt({},t.presentationProps),l.props))),s!=null)return s}}),us=C([Ht,ze,Fe],(e,t,a)=>{if(!(e==null||t==null))return e.map((n,s)=>{var l,c=_(n,t.nameKey,t.name),i;return a!=null&&(l=a[s])!==null&&l!==void 0&&(l=l.props)!==null&&l!==void 0&&l.fill?i=a[s].props.fill:typeof n=="object"&&n!=null&&"fill"in n?i=n.fill:i=t.fill,{value:Ae(c,t.dataKey),dataKey:t.dataKey,color:i,payload:n,type:t.legendType}})}),ps=C([Ht,ze,Fe,$n],(e,t,a,n)=>{if(!(t==null||e==null))return Ps({offset:n,pieSettings:t,displayedData:e,cells:a})}),ms=["key"],fs=["onMouseEnter","onClick","onMouseLeave"],xs=["id"],hs=["id"];function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},G.apply(null,arguments)}function De(e,t){if(e==null)return{};var a,n,s=bs(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}function bs(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;a[n]=e[n]}return a}function ot(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),a.push.apply(a,n)}return a}function I(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ot(Object(a),!0).forEach(function(n){vs(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ot(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function vs(e,t,a){return(t=gs(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function gs(e){var t=ys(e,"string");return typeof t=="symbol"?t:t+""}function ys(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var n=a.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yt=zn;function js(e){var t=u.useMemo(()=>Ot(e.children,re),[e.children]),a=te(n=>us(n,e.id,t));return a==null?null:u.createElement(Gn,{legendPayload:a})}function Ns(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(u.isValidElement(e)){var t,a=(t=e.props)===null||t===void 0?void 0:t.fill;
36return typeof a=="string"?a:void 0}var n=e.fill;return typeof n=="string"?n:void 0}}var As=u.memo(e=>{var t=e.dataKey,a=e.nameKey,n=e.sectors,s=e.stroke,l=e.strokeWidth,c=e.fill,i=e.name,d=e.hide,p=e.tooltipType,m=e.formatter,f=e.id,x=e.activeShape,y=Ns(x),b=n.map(N=>{var g=N.tooltipPayload;return y==null||g==null?g:g.map(j=>I(I({},j),{},{color:y,fill:y}))}),A={dataDefinedOnItem:b,getPosition:N=>{var g;return(g=n[Number(N)])===null||g===void 0?void 0:g.tooltipPosition},settings:{stroke:s,strokeWidth:l,fill:c,dataKey:t,nameKey:a,name:Ae(i,t),hide:d,type:p,color:c,unit:"",formatter:m,graphicalItemId:f}};return u.createElement(Ct,{tooltipEntrySettings:A})}),ws=(e,t)=>e>t?"start":e<t?"end":"middle",Ss=(e,t,a)=>typeof t=="function"?ie(t(e),a,a*.8):ie(t,a,a*.8),ks=(e,t,a)=>{var n=t.top,s=t.left,l=t.width,c=t.height,i=rr(l,c),d=s+ie(e.cx,l,l/2),p=n+ie(e.cy,c,c/2),m=ie(e.innerRadius,i,0),f=Ss(a,e.outerRadius,i),x=e.maxRadius||Math.sqrt(l*l+c*c)/2;return{cx:d,cy:p,innerRadius:m,outerRadius:f,maxRadius:x}},Es=(e,t)=>{var a=he(t-e),n=Math.min(Math.abs(t-e),360);return a*n},Ds=(e,t)=>{if(u.isValidElement(e))return u.cloneElement(e,t);if(typeof e=="function")return e(t);var a=Ne("recharts-pie-label-line",typeof e!="boolean"?e.className:"");t.key;var n=De(t,ms);return u.createElement(be,G({},n,{type:"linear",className:a}))},Is=(e,t,a)=>{if(u.isValidElement(e))return u.cloneElement(e,t);var n=a;if(typeof e=="function"&&(n=e(t),u.isValidElement(n)))return n;var s=Ne("recharts-pie-label-text",sr(e));return u.createElement(lr,G({},t,{alignmentBaseline:"middle",className:s}),n)};function Os(e){var t=e.sectors,a=e.props,n=e.showLabels,s=a.label,l=a.labelLine,c=a.dataKey;if(!n||!s||!t)return null;var i=Se(a),d=Ze(s),p=Ze(l),m=typeof s=="object"&&"offsetRadius"in s&&typeof s.offsetRadius=="number"&&s.offsetRadius||20,f=t.map((x,y)=>{var b=(x.startAngle+x.endAngle)/2,A=Pe(x.cx,x.cy,x.outerRadius+m,b),N=I(I(I(I({},i),x),{},{stroke:"none"},d),{},{index:y,textAnchor:ws(A.x,x.cx)},A),g=I(I(I(I({},i),x),{},{fill:"none",stroke:x.fill},p),{},{index:y,points:[Pe(x.cx,x.cy,x.outerRadius,b),A],key:"line"});return u.createElement(Ke,{zIndex:Be.label,key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(y)},u.createElement(M,null,l&&Ds(l,g),Is(s,N,_(x,c))))});return u.createElement(M,{className:"recharts-pie-labels"},f)}function Cs(e){var t=e.sectors,a=e.props,n=e.showLabels,s=a.label;return typeof s=="object"&&s!=null&&"position"in s?u.createElement(Lt,{label:s}):u.createElement(Os,{sectors:t,props:a,showLabels:n})}function Ts(e){var t=e.sectors,a=e.activeShape,n=e.inactiveShape,s=e.allOtherPieProps,l=e.shape,c=e.id,i=e.animationElapsedTime,d=e.isAnimating,p=e.isEntrance,m=te(Xn),f=te(qn),x=te(Jn),y=s.onMouseEnter,b=s.onClick,A=s.onMouseLeave,N=De(s,fs),g=Zn(y,s.dataKey,c),j=Qn(A),E=er(b,s.dataKey,c);return t==null||t.length===0?null:u.createElement(u.Fragment,null,t.map((v,h)=>{if((v==null?void 0:v.startAngle)===0&&(v==null?void 0:v.endAngle)===0&&t.length!==1)return null;var S=x==null||x===c,D=String(h)===m&&(f==null||s.dataKey===f)&&S,k=m?n:null,O=a&&D?a:k,w=I(I({},v),{},{stroke:v.stroke,tabIndex:-1,index:h,isActive:D,animationElapsedTime:i,isAnimating:d,isEntrance:p,[ar]:h,[tr]:c});return u.createElement(M,G({key:"sector-".concat(v==null?void 0:v.startAngle,"-").concat(v==null?void 0:v.endAngle,"-").concat(v.midAngle,"-").concat(h),tabIndex:-1,className:"recharts-pie-sector"},nr(N,v,h),{onMouseEnter:g(v,h),onMouseLeave:j(v,h),onClick:E(v,h)}),u.createElement(_t,{option:O??l,DefaultShape:Yt,shapeProps:w}))}))}function Ps(e){var t,a=e.pieSettings,n=e.displayedData,s=e.cells,l=e.offset,c=a.cornerRadius,i=a.startAngle,d=a.endAngle,p=a.dataKey,m=a.nameKey,f=a.tooltipType,x=Math.abs(a.minAngle),y=Es(i,d),b=Math.abs(y),A=n.length<=1?0:(t=a.paddingAngle)!==null&&t!==void 0?t:0,N=n.filter(k=>_(k,p,0)!==0).length,g=(b>=360?N:N-1)*A,j=n.reduce((k,O)=>{var w=_(O,p,0);return k+(L(w)?w:0)},0),E=x>0&&j>0&&n.some(k=>{var O=_(k,p,0),w=(L(O)?O:0)/j;return O!==0&&w*b<x}),v=E?x:0,h=b-N*v-g,S;if(j>0){var D;S=n.map((k,O)=>{var w=_(k,p,0),z=_(k,m,O),T=ks(a,l,k),V=(L(w)?w:0)/j,P,B=I(I({},k),s&&s[O]&&s[O].props),He=B!=null&&"fill"in B&&typeof B.fill=="string"?B.fill:a.fill;O?P=D.endAngle+he(y)*A*(w!==0?1:0):P=i;var Ye=P+he(y)*((w!==0?v:0)+V*h),Xe=(P+Ye)/2,qe=(T.innerRadius+T.outerRadius)/2,Ya=[{name:z,value:w,payload:B,dataKey:p,type:f,color:He,fill:He,graphicalItemId:a.id}],Xa=Pe(T.cx,T.cy,qe,Xe);return D=I(I(I(I({},a.presentationProps),{},{percent:V,cornerRadius:typeof c=="string"?parseFloat(c):c,name:z,tooltipPayload:Ya,midAngle:Xe,middleRadius:qe,tooltipPosition:Xa},B),T),{},{value:w,dataKey:p,startAngle:P,endAngle:Ye,payload:B,paddingAngle:w!==0?he(y)*A:0}),D})}return S}function _s(e){var t=e.showLabels,a=e.sectors,n=e.children,s=u.useMemo(()=>
36!t||!a?[]:a.map(l=>({value:l.value,payload:l.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:l.cx,cy:l.cy,innerRadius:l.innerRadius,outerRadius:l.outerRadius,startAngle:l.startAngle,endAngle:l.endAngle,clockWise:!1},fill:l.fill})),[a,t]);return u.createElement(Yn,{value:t?s:void 0},n)}var Ls=(e,t)=>{if(e==null)return[];var a=[],n=e.find(l=>l.status!=="removed"),s=n?n.next.startAngle:0;return e.forEach((l,c)=>{if(l.status!=="removed"){var i=c>0?Vn(l.next,"paddingAngle",0):0;if(l.status==="matched"){var d=ae(l.prev.endAngle-l.prev.startAngle,l.next.endAngle-l.next.startAngle,t),p=I(I({},l.next),{},{startAngle:s+i,endAngle:s+d+i});a.push(p),s=p.endAngle}else{var m=ae(0,l.next.endAngle-l.next.startAngle,t),f=I(I({},l.next),{},{startAngle:s+i,endAngle:s+m+i});a.push(f),s=f.endAngle}}}),a};function Ms(e){var t=e.props,a=e.previousSectorsRef,n=e.id,s=t.sectors,l=t.activeShape,c=t.inactiveShape,i=t.animationInterpolateFn,d=Tt(t.onAnimationStart,t.onAnimationEnd),p=d.isAnimating,m=d.handleAnimationStart,f=d.handleAnimationEnd,x=Hn();return x==null?null:u.createElement(_s,{showLabels:!p,sectors:s},u.createElement(Pt,{animationInput:t,animationIdPrefix:"recharts-pie-",items:s,previousItemsRef:a,isAnimationActive:t.isAnimationActive,animationBegin:t.animationBegin,animationDuration:t.animationDuration,animationEasing:t.animationEasing,onAnimationStart:m,onAnimationEnd:f,animationInterpolateFn:i,animationMatchBy:t.animationMatchBy,layout:x},(y,b,A)=>u.createElement(M,null,u.createElement(Ts,{sectors:y,activeShape:l,inactiveShape:c,allOtherPieProps:t,shape:t.shape,id:n,animationElapsedTime:b,isAnimating:p||b<1,isEntrance:A}))),u.createElement(Cs,{showLabels:!p,sectors:s,props:t}),t.children)}var Rs={animationBegin:400,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:Ls,animationMatchBy:Fn,cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,shape:Yt,startAngle:0,stroke:"#fff",zIndex:Be.area};function Bs(e){var t=e.id,a=De(e,xs),n=e.hide,s=e.className,l=e.rootTabIndex,c=u.useMemo(()=>Ot(e.children,re),[e.children]),i=te(m=>ps(m,t,c)),d=u.useRef(null),p=Ne("recharts-pie",s);return n||i==null?(d.current=null,u.createElement(M,{tabIndex:l,className:p})):u.createElement(Ke,{zIndex:e.zIndex},u.createElement(As,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:i,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,formatter:e.formatter,id:t,activeShape:e.activeShape}),u.createElement(M,{tabIndex:l,className:p},u.createElement(Ms,{props:I(I({},a),{},{sectors:i}),previousSectorsRef:d,id:t})))}function Ks(e){var t=we(e,Rs),a=t.id,n=De(t,hs),s=Se(n);return u.createElement(It,{id:a,type:"pie"},l=>u.createElement(u.Fragment,null,u.createElement(Un,{type:"pie",id:l,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:s,maxRadius:t.maxRadius}),u.createElement(js,G({},n,{id:l})),u.createElement(Bs,G({},n,{id:l}))))}var Ue=Ks;
36Ue.displayName="Pie";var Xt=(e,t,a)=>Mt(e,"xAxis",We(e,t),a),qt=(e,t,a)=>Rt(e,"xAxis",We(e,t),a),Jt=(e,t,a)=>Mt(e,"yAxis",$e(e,t),a),Zt=(e,t,a)=>Rt(e,"yAxis",$e(e,t),a),Ws=C([ue,Xt,Jt,qt,Zt],(e,t,a,n,s)=>Bt(e,"xAxis")?Qe(t,n,!1):Qe(a,s,!1)),$s=(e,t)=>t,Qt=C([dr,$s],(e,t)=>e.filter(a=>a.type==="area").find(a=>a.id===t)),ea=e=>{var t=ue(e),a=Bt(t,"xAxis");return a?"yAxis":"xAxis"},zs=(e,t)=>{var a=ea(e);return a==="yAxis"?$e(e,t):We(e,t)},Fs=(e,t,a)=>ur(e,ea(e),zs(e,t),a),Us=C([Qt,Fs],(e,t)=>{var a;if(!(e==null||t==null)){var n=e.stackId,s=cr(e);if(!(n==null||s==null)){var l=(a=t[n])===null||a===void 0?void 0:a.stackedData,c=l==null?void 0:l.find(i=>i.key===s);if(c!=null)return c.map(i=>[i[0],i[1]])}}}),Vs=C([ue,Xt,Jt,qt,Zt,Us,or,Ws,Qt,ir],(e,t,a,n,s,l,c,i,d,p)=>{var m=c.chartData,f=c.dataStartIndex,x=c.dataEndIndex;if(!(d==null||e!=="horizontal"&&e!=="vertical"||t==null||a==null||n==null||s==null||n.length===0||s.length===0||i==null)){var y=d.data,b;if(y&&y.length>0?b=y:b=m==null?void 0:m.slice(f,x+1),b!=null)return bl({layout:e,xAxis:t,yAxis:a,xAxisTicks:n,yAxisTicks:s,dataStartIndex:f,areaSettings:d,stackedData:l,displayedData:b,chartBaseValue:p,bandSize:i})}}),Gs=["animationElapsedTime","isAnimating","isEntrance","layout","isRange","stroke","connectNulls"],Hs=["id","baseLine"];function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},ce.apply(null,arguments)}function it(e,t){if(e==null)return{};var a,n,s=Ys(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}function Ys(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;a[n]=e[n]}return a}function Xs(e){var t,a,n=e.alpha,s=e.baseLine,l=e.points,c=e.strokeWidth,i=(t=l[0])===null||t===void 0?void 0:t.x,d=(a=l[l.length-1])===null||a===void 0?void 0:a.x;if(!ve(i)||!ve(d))return null;var p=n*Math.abs(i-d),m=Math.max(...l.map(f=>f.y||0));return L(s)?m=Math.max(s,m):s&&Array.isArray(s)&&s.length&&(m=Math.max(...s.map(f=>f.y||0),m)),L(m)?u.createElement("rect",{x:i<d?i:i-p,y:0,width:p,height:Math.floor(m+(c?parseInt("".concat(c),10):1))}):null}function qs(e){var t,a,n=e.alpha,s=e.baseLine,l=e.points,c=e.strokeWidth,i=(t=l[0])===null||t===void 0?void 0:t.y,d=(a=l[l.length-1])===null||a===void 0?void 0:a.y;if(!ve(i)||!ve(d))return null;var p=n*Math.abs(i-d),m=Math.max(...l.map(f=>f.x||0));return L(s)?m=Math.max(s,m):s&&Array.isArray(s)&&s.length&&(m=Math.max(...s.map(f=>f.x||0),m)),L(m)?u.createElement("rect",{x:0,y:i<d?i:i-p,width:m+(c?parseInt("".concat(c),10):1),height:Math.floor(p)}):null}function Js(e){var t=e.alpha,a=e.layout,n=e.points,s=e.baseLine,l=e.strokeWidth;return a==="vertical"?u.createElement(qs,{alpha:t,points:n,baseLine:s,strokeWidth:l}):u.createElement(Xs,{alpha:t,points:n,baseLine:s,strokeWidth:l})}function Zs(e){var t=e.animationElapsedTime,a=t===void 0?1:t,n=e.isAnimating,s=n===void 0?!1:n,l=e.isEntrance,c=l===void 0?!1:l,i=e.layout,d=e.isRange,p=e.stroke,m=e.connectNulls,f=it(e,Gs),x=i==="vertical"?"vertical":"horizontal",y=m??!1,b=pr(),A=f.id,N=f.baseLine,g=it(f,Hs),j=Se(g),E=u.createElement(be,ce({},f,{id:A,baseLine:N,connectNulls:y,stroke:"none",className:"recharts-area-area",layout:x})),v=p!=="none"&&u.createElement(be,ce({},j,{className:"recharts-area-curve",layout:x,type:f.type,connectNulls:y,fill:"none",stroke:p,points:f.points})),h=p!=="none"&&d&&Array.isArray(N)&&u.createElement(be,ce({},j,{className:"recharts-area-curve",layout:x,type:f.type,connectNulls:y,fill:"none",stroke:p,points:N}));if(c&&(s||a<1)){var S;return u.createElement(M,null,u.createElement("defs",null,u.createElement("clipPath",{id:b},u.createElement(Js,{alpha:a,points:(S=f.points)!==null&&S!==void 0?S:[],baseLine:N,layout:x,strokeWidth:f.strokeWidth}))),u.createElement(M,{clipPath:"url(#".concat(b,")")},E,v,h))}return u.createElement(u.Fragment,null,E,v,h)}var Qs=["id"],el=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},ge.apply(null,arguments)}function ta(e,t){if(e==null)return{};var a,n,s=tl(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}function tl(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;a[n]=e[n]}return a}function ct(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),a.push.apply(a,n)}return a}function ne(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};
36t%2?ct(Object(a),!0).forEach(function(n){al(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ct(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function al(e,t,a){return(t=nl(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function nl(e){var t=rl(e,"string");return typeof t=="symbol"?t:t+""}function rl(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var n=a.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sl=(e,t)=>e==null?[]:t===1?e.flatMap(a=>a.status==="removed"?[]:[a.next]):e.flatMap(a=>a.status==="matched"?[ne(ne({},a.next),{},{x:ae(a.prev.x,a.next.x,t),y:ae(a.prev.y,a.next.y,t)})]:a.status==="added"?[a.next]:[]),aa={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationMatchBy:fr,animationInterpolateFn:sl,connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,shape:Zs,xAxisId:0,yAxisId:0,zIndex:Be.area};function ye(e,t){return e&&e!=="none"?e:t}var ll=e=>{var t=e.dataKey,a=e.name,n=e.stroke,s=e.fill,l=e.legendType,c=e.hide;return[{inactive:c,dataKey:t,type:l,color:ye(n,s),value:Ae(a,t),payload:e}]},ol=u.memo(e=>{var t=e.dataKey,a=e.data,n=e.stroke,s=e.strokeWidth,l=e.fill,c=e.name,i=e.hide,d=e.unit,p=e.formatter,m=e.tooltipType,f=e.id,x={dataDefinedOnItem:a,getPosition:vr,settings:{stroke:n,strokeWidth:s,fill:l,dataKey:t,nameKey:void 0,name:Ae(c,t),hide:i,type:m,color:ye(n,l),unit:d,formatter:p,graphicalItemId:f}};return u.createElement(Ct,{tooltipEntrySettings:x})});function il(e){var t=e.clipPathId,a=e.points,n=e.props,s=n.needClip,l=n.dot,c=n.dataKey,i=Se(n);return u.createElement(Ur,{points:a,dot:l,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:c,baseProps:i,needClip:s,clipPathId:t})}function cl(e){var t=e.showLabels,a=e.children,n=e.points,s=n.map(l=>{var c,i,d={x:(c=l.x)!==null&&c!==void 0?c:0,y:(i=l.y)!==null&&i!==void 0?i:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ne(ne({},d),{},{value:l.value,payload:l.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return u.createElement(Er,{value:t?s:void 0},a)}function dl(e){var t=e.points,a=e.baseLine,n=e.needClip,s=e.clipPathId,l=e.props,c=e.animationElapsedTime,i=e.isAnimating,d=e.isEntrance,p=l.layout,m=l.type,f=l.stroke,x=l.connectNulls,y=l.isRange,b=l.shape,A=l.id,N=ta(l,Qs),g=Dr(N),j=ne(ne({},g),{},{id:A,points:t,connectNulls:x,type:m,baseLine:a,layout:p,stroke:f,isRange:y,animationElapsedTime:c,isAnimating:i,isEntrance:d});return u.createElement(u.Fragment,null,(t==null?void 0:t.length)>1&&u.createElement(M,{clipPath:n?"url(#clipPath-".concat(s,")"):void 0},u.createElement(_t,{option:b,DefaultShape:aa.shape,shapeProps:j})),u.createElement(il,{points:t,props:N,clipPathId:s}))}function ul(e,t,a){if(L(e)){var n=L(t)?t:void 0;return ae(n,e,a)}if(Ir(e)||Or(e)){var s=L(t)?t:void 0;return ae(s,0,a)}return e}function pl(e){var t=e.needClip,a=e.clipPathId,n=e.props,s=e.previousPointsRef,l=e.previousBaselineRef,c=n.points,i=n.baseLine,d=n.isAnimationActive,p=n.animationBegin,m=n.animationDuration,f=n.animationEasing,x=n.animationMatchBy,y=n.animationInterpolateFn,b=u.useMemo(()=>({points:c,baseLine:i}),[c,i]),A=Sr(b,l),N=kr(),g=Tt(n.onAnimationStart,n.onAnimationEnd),j=g.isAnimating,E=g.handleAnimationStart,v=g.handleAnimationEnd,h=A.startValue;if(N==null)return null;var S;return Array.isArray(i)&&Array.isArray(h)?S=tt(h,i,x):Array.isArray(i)?S=tt(null,i,x):S=null,u.createElement(Pt,{animationInput:b,animationIdPrefix:"recharts-area-",items:c,previousItemsRef:s,isAnimationActive:d,animationBegin:p,animationDuration:m,animationEasing:f,onAnimationStart:E,onAnimationEnd:v,animationInterpolateFn:y,animationMatchBy:x,layout:N},(D,k,O)=>{var w;return k===1?w=i:Array.isArray(i)?w=y(S,k,N):w=O?i:ul(i,h,k),A.syncStepValue(w,k),u.createElement(cl,{showLabels:!j,points:c},n.children,u.createElement(dl,{points:D,baseLine:w,needClip:t,clipPathId:a,props:n,animationElapsedTime:k,isAnimating:j||k<1,isEntrance:O}),u.createElement(Lt,{label:n.label}))})}function ml(e){var t=e.needClip,a=e.clipPathId,n=e.props,s=u.useRef(null),l=u.useRef();return u.createElement(pl,{needClip:t,clipPathId:a,props:n,previousPointsRef:s,previousBaselineRef:l})}class fl extends u.PureComponent{render(){var t=this.props,a=t.hide,n=t.dot,s=t.points,l=t.className,c=t.top,i=t.left,d=t.needClip,p=t.xAxisId,m=t.yAxisId,f=t.width,x=t.height,y=t.id,b=t.baseLine,A=t.zIndex;if(a)return null;var N=Ne("recharts-area",l),g=y,j=Fr(n),E=j.r,v=j.strokeWidth,h=Ar(n),S=E*2+v,D=d?"url(#clipPath-".concat(h?"":"dots-").concat(g,")"):void 0;return u.createElement(Ke,{zIndex:A},u.createElement(M,{className:N},d&&u.createElement("defs",null,u.createElement(wr,{clipPathId:g,xAxisId:p,yAxisId:m}),!h&&u.createElement("clipPath",{id:"clipPath-dots-".concat(g)},u.createElement("rect",{x:i-S/2,y:c-S/2,width:f+S,height:x+S}))),u.createElement(ml,{needClip:d,clipPathId:g,props:this.props})),u.createElement(at,{points:s,mainColor:ye(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}),this.props.isRange&&Array.isArray(b)&&u.createElement(at,{points:b,mainColor:ye(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:D}))}}function xl(e){var t,a=e.activeDot,n=e.animationBegin,s=e.animationDuration,l=e.animationEasing,c=e.connectNulls,i=e.dot,d=e.fill,p=e.fillOpacity,m=e.hide,f=e.isAnimationActive,x=e.legendType,y=e.stroke,b=e.xAxisId,A=e.yAxisId,N=ta(e,el),g=gr(),j=yr(),E=jr(b,A),v=E.needClip,h=Kt(
36),S=(t=te(B=>Vs(B,e.id,h)))!==null&&t!==void 0?t:{},D=S.points,k=S.isRange,O=S.baseLine,w=Nr();if(g!=="horizontal"&&g!=="vertical"||w==null||j!=="AreaChart"&&j!=="ComposedChart")return null;var z=w.height,T=w.width,V=w.x,P=w.y;return!D||!D.length?null:u.createElement(fl,ge({},N,{activeDot:a,animationBegin:n,animationDuration:s,animationEasing:l,baseLine:O,connectNulls:c,dot:i,fill:d,fillOpacity:p,height:z,hide:m,layout:g,isAnimationActive:f,isRange:k,legendType:x,needClip:v,points:D,stroke:y,width:T,left:V,top:P,xAxisId:b,yAxisId:A}))}var hl=(e,t,a,n,s)=>{var l=a??t;if(L(l))return l;var c=e==="horizontal"?s:n,i=c.scale.domain();if(c.type==="number"){var d=Math.max(i[0],i[1]),p=Math.min(i[0],i[1]);return l==="dataMin"?p:l==="dataMax"||d<0?d:Math.max(Math.min(i[0],i[1]),0)}return l==="dataMin"?i[0]:l==="dataMax"?i[1]:i[0]};function bl(e){var t=e.areaSettings,a=t.connectNulls,n=t.baseValue,s=t.dataKey,l=e.stackedData,c=e.layout,i=e.chartBaseValue,d=e.xAxis,p=e.yAxis,m=e.displayedData,f=e.dataStartIndex,x=e.xAxisTicks,y=e.yAxisTicks,b=e.bandSize,A=l&&l.length,N=hl(c,i,n,d,p),g=c==="horizontal",j=!1,E=m.map((h,S)=>{var D,k,O,w;if(A)w=l[f+S];else{var z=_(h,s);Array.isArray(z)?(w=z,j=!0):w=[N,z]}var T=(D=(k=w)===null||k===void 0?void 0:k[1])!==null&&D!==void 0?D:null,V=T==null||A&&!a&&_(h,s)==null;if(g){var P;return{x:et({axis:d,ticks:x,bandSize:b,entry:h,index:S}),y:V?null:(P=p.scale.map(T))!==null&&P!==void 0?P:null,value:w,payload:h}}return{x:V?null:(O=d.scale.map(T))!==null&&O!==void 0?O:null,y:et({axis:p,ticks:y,bandSize:b,entry:h,index:S}),value:w,payload:h}}),v;return A||j?v=E.map(h=>{var S,D=Array.isArray(h.value)?h.value[0]:null;if(g){var k;return{x:h.x,y:D!=null&&h.y!=null&&(k=p.scale.map(D))!==null&&k!==void 0?k:null,payload:h.payload}}return{x:D!=null&&(S=d.scale.map(D))!==null&&S!==void 0?S:null,y:h.y,payload:h.payload}}):v=g?p.scale.map(N):d.scale.map(N),{points:E,baseLine:v??0,isRange:j}}function vl(e){var t=we(e,aa),a=Kt();return u.createElement(It,{id:t.id,type:"area"},n=>u.createElement(u.Fragment,null,u.createElement(xr,{legendPayload:ll(t)}),u.createElement(ol,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:n}),u.createElement(hr,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:br(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:a,connectNulls:t.connectNulls}),u.createElement(xl,ge({},t,{id:n}))))}var na=u.memo(vl,mr);na.displayName="Area";function gl(e){var t=Cr();return u.useEffect(()=>{t(Tr(e))},[t,e]),null}var yl=["layout"];function _e(){return _e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},_e.apply(null,arguments)}function jl(e,t){if(e==null)return{};var a,n,s=Nl(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)===-1&&{}.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}function Nl(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;a[n]=e[n]}return a}function dt(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),a.push.apply(a,n)}return a}function Al(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?dt(Object(a),!0).forEach(function(n){wl(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):dt(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function wl(e,t,a){return(t=Sl(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Sl(e){var t=kl(e,"string");return typeof t=="symbol"?t:t+""}function kl(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var n=a.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var El={top:5,right:5,bottom:5,left:5},ra=Al({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:El,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Kr),Dl=u.forwardRef(function(t,a){var n,s=we(t.categoricalChartProps,ra),l=s.layout,c=jl(s,yl),i=t.chart
36Name,d=t.defaultTooltipEventType,p=t.validateTooltipEventTypes,m=t.tooltipPayloadSearcher,f={chartName:i,defaultTooltipEventType:d,validateTooltipEventTypes:p,tooltipPayloadSearcher:m,eventEmitter:void 0};return u.createElement(Pr,{preloadedState:{options:f},reduxStoreName:(n=s.id)!==null&&n!==void 0?n:i},u.createElement(_r,{chartData:s.data}),u.createElement(Lr,{layout:l,margin:s.margin}),u.createElement(Mr,{throttleDelay:s.throttleDelay,throttledEvents:s.throttledEvents}),u.createElement(Rr,{baseValue:void 0,accessibilityLayer:s.accessibilityLayer,barCategoryGap:s.barCategoryGap,maxBarSize:s.maxBarSize,stackOffset:s.stackOffset,barGap:s.barGap,barSize:s.barSize,syncId:s.syncId,syncMethod:s.syncMethod,className:s.className,reverseStackOrder:s.reverseStackOrder}),u.createElement(gl,{cx:s.cx,cy:s.cy,startAngle:s.startAngle,endAngle:s.endAngle,innerRadius:s.innerRadius,outerRadius:s.outerRadius}),u.createElement(Br,_e({},c,{ref:a})))});function ut(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),a.push.apply(a,n)}return a}function pt(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ut(Object(a),!0).forEach(function(n){Il(e,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ut(Object(a)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))})}return e}function Il(e,t,a){return(t=Ol(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Ol(e){var t=Cl(e,"string");return typeof t=="symbol"?t:t+""}function Cl(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var n=a.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tl=["item"],Pl=pt(pt({},ra),{},{layout:"centric",startAngle:0,endAngle:360}),sa=u.forwardRef((e,t)=>{var a=we(e,Pl);return u.createElement(Dl,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Tl,tooltipPayloadSearcher:Wt,categoricalChartProps:a,ref:t})}),_l=["axis"],Ll=u.forwardRef((e,t)=>u.createElement(Wr,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:_l,tooltipPayloadSearcher:Wt,categoricalChartProps:e,ref:t}));const oe=[{label:"7 Days",value:7},{label:"30 Days",value:30},{label:"90 Days",value:90},{label:"All Time",value:null}],Ml=[{label:"7 Days",value:7},{label:"30 Days",value:30},{label:"90 Days",value:90}],mt="bg-blue-50 dark:bg-blue-950/60 text-blue-600 dark:text-blue-400 font-semibold",ft="hover:bg-accent/50 text-foreground",Rl=(e,t,a,n)=>{var l;if(e&&t)try{const c=typeof e=="string"?new Date(e):e,i=typeof t=="string"?new Date(t):t;return`${Je(c,"MMM d")} - ${Je(i,"MMM d")}`}catch{return"Custom Range"}const s=(l=n==null?void 0:n.find)==null?void 0:l.call(n,c=>(c==null?void 0:c.value)===a);return(s==null?void 0:s.label)||"Select"},la=({options:e=[],value:t=null,isCustomActive:a=!1,onSelectPreset:n=null,onOpenCustomMode:s=null})=>{var i;const l=d=>{n==null||n(d)},c=()=>{s==null||s()};return r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"px-2 py-1 text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Timeframe"}),(i=e==null?void 0:e.map)==null?void 0:i.call(e,d=>{const p=!a&&(d==null?void 0:d.value)===t;return r.jsxs("button",{type:"button",onClick:()=>l(d==null?void 0:d.value),className:`w-full flex items-center justify-between rounded-lg text-xs font-medium py-1.5 px-2.5 transition-colors cursor-pointer text-left ${p?mt:ft}`,children:[r.jsx("span",{children:d==null?void 0:d.label}),p&&r.jsx(Te,{className:"h-3.5 w-3.5 ml-2 shrink-0"})]},(d==null?void 0:d.label)||"opt")}),r.jsx("div",{className:"pt-1 border-t border-border/60",children:r.jsxs("button",{type:"button",onClick:c,className:`w-full flex items-center justify-between rounded-lg text-xs font-medium py-1.5 px-2.5 transition-colors cursor-pointer text-left ${a?mt:ft}`,children:[r.jsx("span",{children:"Custom Date Range..."}),a&&r.jsx(Te,{className:"h-3.5 w-3.5 ml-2 shrink-0"})]})})]})};la.propTypes={options:o.array,value:o.oneOfType([o.number,o.oneOf([null])]),isCustomActive:o.bool,onSelectPreset:o.func,onOpenCustomMode:o.func};const oa=({temporaryRange:e={},onRangeSelect:t=null,onBack:a=null,onApply:n=null,onReset:s=null})=>{const l=p=>{t==null||t(p)},c=()=>{a==null||a()},i=()=>{n==null||n()},d=()=>{s==null||s()};return r.jsxs("div",{className:"space-y-2 p-1",children:[r.jsxs("div",{className:"flex items-center justify-between pb-1 border-b border-border/60",children:[r.jsx("span",{className:"text-xs font-semibold text-foreground",children:"Select Range"}),r.jsx(xe,{variant:"ghost",size:"sm",onClick:c,className:"h-6 px-2 text-[11px] text-muted-foreground cursor-pointer",children:"Back"})]}),r.jsx(gn,{mode:"range",selected:e,onSelect:l,numberOfMonths:1,className:"rounded-md border p-1"}),r.jsxs("div",{className:"flex items-center justify-end gap-1.5 pt-1",children:[r.jsx(xe,{variant:"outline",size:"sm",onClick:d,className:"h-7 text-xs px-2 cursor-pointer",children:"Reset"}),r.jsx(xe,{size:"sm",onClick:i,disabled:!(e!=null&&e.from)||!(e!=null&&e.to),className:"h-7 text-xs px-3 bg-blue-600 hover:bg-blue-700 text-white cursor-pointer",children:"Apply"})]})]})};oa.propTypes={temporaryRange:o.object,onRangeSelect:o.func,onBack:o.func,onApply:o.func,onReset:o.func};const Bl=(e,t)=>({from:e?new Date(e):void 0,to:t?new Date(t):void 0}
36),J=({value:e=7,startDate:t=null,endDate:a=null,onChange:n=null,options:s=oe,disabled:l=!1})=>{const[c,i]=u.useState(!1),[d,p]=u.useState(!1),[m,f]=u.useState(()=>Bl(t,a)),x=!!(t||a),y=Rl(t,a,e,s),b=h=>{i(h)},A=h=>{f(h)},N=()=>{p(!0)},g=()=>{p(!1)},j=h=>{p(!1),i(!1),n==null||n({days:h,startDate:null,endDate:null})},E=()=>{m!=null&&m.from&&(m!=null&&m.to)&&(n==null||n({days:null,startDate:m.from.toISOString(),endDate:m.to.toISOString()}),i(!1),p(!1))},v=()=>{f({}),p(!1),n==null||n({days:7,startDate:null,endDate:null}),i(!1)};return r.jsxs(qa,{open:c,onOpenChange:b,children:[r.jsxs(Ja,{disabled:l,className:"h-8 w-auto min-w-[105px] inline-flex items-center justify-center rounded-full border border-blue-200/80 dark:border-blue-800/80 bg-blue-50/50 dark:bg-blue-950/30 px-3 py-1 text-xs font-semibold text-foreground hover:bg-blue-50/80 transition-colors shadow-2xs gap-1.5 focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500 shrink-0 cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50",children:[l?r.jsx(K,{className:"h-3.5 w-3.5 text-blue-600 dark:text-blue-400 shrink-0 animate-spin pointer-events-none"}):r.jsx(yn,{className:"h-3.5 w-3.5 text-blue-600 dark:text-blue-400 shrink-0 pointer-events-none"}),r.jsx("span",{className:"truncate max-w-[120px] pointer-events-none",children:y}),r.jsx(Za,{className:"h-3 w-3 text-muted-foreground opacity-60 ml-auto shrink-0 pointer-events-none"})]}),r.jsx(Qa,{align:"end",className:"rounded-xl border border-border/80 bg-card p-2 shadow-lg text-xs w-auto min-w-[180px]",children:d?r.jsx(oa,{temporaryRange:m,onRangeSelect:A,onBack:g,onApply:E,onReset:v}):r.jsx(la,{options:s,value:e,isCustomActive:x,onSelectPreset:j,onOpenCustomMode:N})})]})};J.propTypes={value:o.oneOfType([o.number,o.oneOf([null])]),startDate:o.oneOfType([o.string,o.instanceOf(Date),o.oneOf([null])]),endDate:o.oneOfType([o.string,o.instanceOf(Date),o.oneOf([null])]),onChange:o.func,options:o.arrayOf(o.shape({label:o.string.isRequired,value:o.oneOfType([o.number,o.oneOf([null])])})),disabled:o.bool};const Kl={strong:{label:"Strong Match",color:"#2563eb",badgeClass:"bg-blue-50 text-blue-700 dark:bg-blue-950/60 dark:text-blue-300 border-blue-200 dark:border-blue-800",Icon:an},moderate:{label:"Good Match",color:"#3b82f6",badgeClass:"bg-sky-50 text-sky-700 dark:bg-sky-950/60 dark:text-sky-300 border-sky-200 dark:border-sky-800",Icon:tn},stretch:{label:"Stretch Match",color:"#8b5cf6",badgeClass:"bg-indigo-50 text-indigo-700 dark:bg-indigo-950/60 dark:text-indigo-300 border-indigo-200 dark:border-indigo-800",Icon:en}},ia=({active:e=!1,payload:t=[]})=>{if(!e||t.length===0)return null;const[a]=t,n=a.payload,s=a.color||"#3b82f6";return r.jsxs("div",{className:"relative z-50 rounded-xl border border-border/80 bg-card p-2.5 shadow-xl text-xs space-y-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:s}}),r.jsx("span",{className:"font-semibold text-foreground",children:n.name})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Applications:"}),r.jsx("strong",{className:"text-foreground",children:n.count||0})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Share:"}),r.jsxs("strong",{className:"text-blue-600 dark:text-blue-400",children:[n.percentage||0,"%"]})]})]})};ia.propTypes={active:o.bool,payload:o.arrayOf(o.object)};const Oe=(e,t,a)=>{const n=Kl[e];return{key:e,name:n.label,count:t||0,percentage:a||0,value:t||0,color:n.color,badgeClass:n.badgeClass,Icon:n.Icon}},Wl=e=>[Oe("strong",e==null?void 0:e.strong_match_count,e==null?void 0:e.strong_match_pct),Oe("moderate",e==null?void 0:e.moderate_match_count,e==null?void 0:e.moderate_match_pct),Oe("stretch",e==null?void 0:e.stretch_match_count,e==null?void 0:e.stretch_match_pct)],ca=({isLoading:e=!1,averageScore:t=0,tiers:a=[]})=>{if(e)return r.jsxs("div",{className:"flex h-64 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-52 w-full rounded-xl"})]});const s=a.reduce((l,c)=>l+(c.count||0),0)>0?a:[{name:"No Data",value:1,color:"#94a3b8"}];return r.jsxs("div",{className:"flex flex-col gap-2 items-center w-full",children:[r.jsxs("div",{className:"-mt-3 sm:-mt-4 h-36 sm:h-40 w-full relative flex items-center justify-center",children:[r.jsx(F,{width:"100%",height:"100%",style:{outline:"none"},children:r.jsxs(sa,{style:{outline:"none"},children:[r.jsx(U,{wrapperStyle:{zIndex:100},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx(ia,{})}),r.jsx(Ue,{data:s,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:42,outerRadius:65,paddingAngle:2,stroke:"transparent",style:{outline:"none"},children:s.map(l=>r.jsx(re,{fill:l.color},`tier-${l.name}`))})]})}),r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none text-center z-0",children:[r.jsxs("span",{className:"text-2xl font-black tracking-tight text-foreground",children:[t,"%"]}),r.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-wider",children:"Avg Score"})]})]}),r.jsx("div",{className:"w-full p-3 sm:p-3.5 rounded-2xl bg-muted/20 border border-border/50 space-y-2",children:a.map(({name:l,count:c,percentage:i,color:d})=>r.jsxs("div",{className:"flex items-center justify-between text-xs",children:[r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx("span",{className:"h-2.5 w-2.5 rounded-full shrink-0",style:{backgroundColor:d}}),r.jsx("span",{className:"font-semibold text-foreground truncate",children:l})]}),r.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[r.jsx("span",{className:"font-bold text-foreground",children:c}),r.jsxs("span",{className:"px-2 py-0.5 rounded-md text-[10px] font-semibold border border-border/60 bg-muted/50 text-muted-foreground min-w-[36px] text-center",children:[i,"%"]})]})]},l))})]})};ca.propTypes={isLoading:o.bool,averageScore:o.number,tiers:o.arrayOf(o.object)};const $l=e=>typeof e=="object"&&e!==null?{value:e.days??null,startDate:e.startDate??null,endD
36ate:e.endDate??null}:{value:e,startDate:null,endDate:null},da=({data:e=null,isLoading:t=!1,days:a=7,onDaysChange:n=null})=>{const s=e==null?void 0:e.ai_match_score,l=(s==null?void 0:s.average_match_score)||0,c=Wl(s),{value:i,startDate:d,endDate:p}=$l(a),m=f=>{n==null||n(f)};return r.jsxs(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl h-full min-h-[400px] flex flex-col p-5 sm:p-6 overflow-visible",children:[r.jsxs(Y,{className:"p-0 pb-3 flex flex-row items-center justify-between space-y-0 border-b border-border/60",children:[r.jsxs("div",{children:[r.jsxs(X,{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(St,{className:"h-4 w-4 text-blue-600"}),"AI Match Score"]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Embeddings match across your target positions"})]}),r.jsx(J,{value:i,startDate:d,endDate:p,onChange:m,options:oe,disabled:t})]}),r.jsx($,{className:"p-0 pt-1 flex-1 flex flex-col justify-start",children:r.jsx(ca,{isLoading:t,averageScore:l,tiers:c})})]})};da.propTypes={data:o.shape({ai_match_score:o.shape({average_match_score:o.number,strong_match_count:o.number,strong_match_pct:o.number,moderate_match_count:o.number,moderate_match_pct:o.number,stretch_match_count:o.number,stretch_match_pct:o.number,has_profile_embedding:o.bool})}),isLoading:o.bool,days:o.oneOfType([o.number,o.object,o.oneOf([null])]),onDaysChange:o.func};const xt=["#2563eb","#3b82f6","#60a5fa","#93c5fd","#bfdbfe"],ht=["#0284c7","#0ea5e9","#38bdf8","#7dd3fc","#bae6fd"],Ve=({active:e=!1,payload:t=[],title:a=""})=>{if(!e||t.length===0)return null;const[n]=t,s=n.payload,l=s.fullName||a||"Domain";return r.jsxs("div",{className:"rounded-xl border border-border/80 bg-card/95 backdrop-blur-xs p-2.5 shadow-lg text-xs space-y-1",children:[r.jsx("span",{className:"font-semibold text-foreground",children:l}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Applications:"}),r.jsx("strong",{className:"text-foreground",children:s.count||0})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Share:"}),r.jsxs("strong",{className:"text-blue-600 dark:text-blue-400",children:[s.percentage||0,"%"]})]})]})};Ve.propTypes={active:o.bool,payload:o.arrayOf(o.object),title:o.string};const ua=e=>{if(!e)return"Unknown";const t=e.replace(/^Software\s+/i,"Soft ").replace(/^Information\s+/i,"Info ").replace(/^Enterprise\s+/i,"Ent ");return t.length<=7?t:`${t.slice(0,6)}..`},pa=({categories:e=[]})=>{const t=(e||[]).slice(0,5).map((a,n)=>{const s=(a==null?void 0:a.category)||"Unknown",l=ua(s);return{...a,fullName:s,label:l,color:xt[n%xt.length]}});return r.jsxs("div",{className:"space-y-3 flex-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:[r.jsx(zr,{className:"h-3.5 w-3.5 text-blue-600"}),r.jsx("span",{children:"Top Categories"})]}),r.jsx("div",{className:"h-44 w-full pt-1",children:r.jsx(F,{width:"100%",height:"100%",children:r.jsxs(pe,{data:t,margin:{top:8,right:8,left:-20,bottom:4},children:[r.jsx(fe,{strokeDasharray:"3 3",vertical:!1,opacity:.3}),r.jsx(se,{dataKey:"label",interval:0,tick:{fontSize:10,fill:"currentColor"},axisLine:{stroke:"#e2e8f0"},tickLine:!1}),r.jsx(le,{allowDecimals:!1,tick:{fontSize:10,fill:"currentColor"},axisLine:!1,tickLine:!1}),r.jsx(U,{cursor:!1,wrapperStyle:{zIndex:100},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx(Ve,{title:"Category"})}),r.jsx(me,{dataKey:"count",radius:[6,6,0,0],barSize:24,children:t.map((a,n)=>r.jsx(re,{fill:a.color},`cat-${a.fullName||n}`))})]})})})]})};pa.propTypes={categories:o.arrayOf(o.object)};const ma=({domains:e=[]})=>{const t=(e||[]).slice(0,5).map((a,n)=>{const s=(a==null?void 0:a.domain)||"Unknown",l=ua(s);return{...a,fullName:s,label:l,color:ht[n%ht.length]}});return r.jsxs("div",{className:"space-y-3 flex-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:[r.jsx(Ut,{className:"h-3.5 w-3.5 text-sky-600"}),r.jsx("span",{children:"Top Domains"})]}),r.jsx("div",{className:"h-44 w-full pt-1",children:r.jsx(F,{width:"100%",height:"100%",children:r.jsxs(pe,{data:t,margin:{top:8,right:8,left:-20,bottom:4},children:[r.jsx(fe,{strokeDasharray:"3 3",vertical:!1,opacity:.3}),r.jsx(se,{dataKey:"label",interval:0,tick:{fontSize:10,fill:"currentColor"}
36,axisLine:{stroke:"#e2e8f0"},tickLine:!1}),r.jsx(le,{allowDecimals:!1,tick:{fontSize:10,fill:"currentColor"},axisLine:!1,tickLine:!1}),r.jsx(U,{cursor:!1,wrapperStyle:{zIndex:100},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx(Ve,{title:"Domain"})}),r.jsx(me,{dataKey:"count",radius:[6,6,0,0],barSize:24,children:t.map((a,n)=>r.jsx(re,{fill:a.color},`dom-${a.fullName||n}`))})]})})})]})};ma.propTypes={domains:o.arrayOf(o.object)};const zl=(e,t,a,n)=>e?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-44 w-full rounded-xl"})]}):t?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4",children:[r.jsx(Ut,{className:"h-8 w-8 text-muted-foreground/40 mb-2"}),r.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"No domain categorization available"})]}):r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 items-center",children:[r.jsx(pa,{categories:a}),r.jsx(ma,{domains:n})]}),Fl=e=>{const t=e==null?void 0:e.domain_distribution;return{categories:(t==null?void 0:t.categories)||[],domains:(t==null?void 0:t.domains)||[]}},Ul=e=>typeof e=="object"&&e!==null?{value:e.days??null,startDate:e.startDate??null,endD
36ate:e.endDate??null}:{value:e,startDate:null,endDate:null},fa=({data:e=null,isLoading:t=!1,days:a=7,onDaysChange:n=null})=>{const{categories:s,domains:l}=Fl(e),c=s.length===0&&l.length===0,{value:i,startDate:d,endDate:p}=Ul(a),m=f=>{n==null||n(f)};return r.jsxs(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl h-full min-h-[380px] flex flex-col p-6 sm:p-7 overflow-visible",children:[r.jsxs(Y,{className:"p-0 pb-4 flex flex-row items-center justify-between space-y-0 border-b border-border/60",children:[r.jsxs("div",{children:[r.jsxs(X,{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(nn,{className:"h-4 w-4 text-blue-600"}),"Industry & Department"]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Top applied domains and departments"})]}),r.jsx(J,{value:i,startDate:d,endDate:p,onChange:m,options:oe,disabled:t})]}),r.jsx($,{className:"p-0 pt-4 flex-1 flex flex-col justify-center",children:zl(t,c,s,l)})]})};fa.propTypes={data:o.shape({domain_distribution:o.shape({categories:o.arrayOf(o.object),domains:o.arrayOf(o.object)})}),isLoading:o.bool,days:o.oneOfType([o.number,o.object,o.oneOf([null])]),onDaysChange:o.func};const Le="#2563eb",xa="Not Specified",Vl=xa,ha=({active:e=!1,payload:t=[]})=>{if(!e||t.length===0)return null;const[a]=t,n=a.payload;return r.jsxs("div",{className:"rounded-xl border border-border/80 bg-card/95 backdrop-blur-xs p-2.5 shadow-lg text-xs space-y-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:Le}}),r.jsx("span",{className:"font-semibold text-foreground",children:n.name})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Applications:"}),r.jsx("strong",{className:"text-foreground",children:n.count||0})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Share:"}),r.jsxs("strong",{className:"text-blue-600 dark:text-blue-400",children:[n.percentage||0,"%"]})]})]})};ha.propTypes={active:o.bool,payload:o.arrayOf(o.object)};const ba=({seniorityList:e=[]})=>{const t=e.map(a=>{const n=(a==null?void 0:a.seniority_name)||Vl,s=n==="NOT_SPECIFIED"?xa:n,l=s.length>7?`${s.slice(0,6)}..`:s;return{...a,name:s,shortLabel:l,color:Le}});return r.jsx("div",{className:"flex flex-col h-full pt-2",children:r.jsx("div",{className:"h-64 w-full pt-2",children:r.jsx(F,{width:"100%",height:"100%",children:r.jsxs(pe,{data:t,margin:{top:12,right:12,left:-16,bottom:8},children:[r.jsx(fe,{strokeDasharray:"3 3",vertical:!1,opacity:.3}),r.jsx(se,{dataKey:"shortLabel",interval:0,tick:{fontSize:10,fill:"currentColor"},axisLine:{stroke:"#e2e8f0"},tickLine:!1}),r.jsx(le,{allowDecimals:!1,tick:{fontSize:11,fill:"currentColor"},axisLine:!1,tickLine:!1}),r.jsx(U,{cursor:!1,wrapperStyle:{zIndex:100},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx(ha,{})}),r.jsx(me,{dataKey:"count",fill:Le,radius:[8,8,0,0],barSize:32})]})})})})};ba.propTypes={seniorityList:o.arrayOf(o.object)};const Gl=e=>typeof e=="object"&&e!==null?{value:e.days??null,startDate:e.startDate??null,endD
36ate:e.endDate??null}:{value:e,startDate:null,endDate:null},va=({data:e=null,isLoading:t=!1,days:a=7,onDaysChange:n=null})=>{var m;const s=((m=e==null?void 0:e.experience_seniority)==null?void 0:m.seniority_distribution)||[],l=s.length===0,{value:c,startDate:i,endDate:d}=Gl(a),p=f=>{n==null||n(f)};return r.jsxs(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl h-full min-h-[380px] flex flex-col p-6 sm:p-7 overflow-visible",children:[r.jsxs(Y,{className:"p-0 pb-4 flex flex-row items-center justify-between space-y-0 border-b border-border/60",children:[r.jsxs("div",{children:[r.jsxs(X,{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(nt,{className:"h-4 w-4 text-blue-600"}),"Experience & Seniority"]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Experience breakdown across your applied roles"})]}),r.jsx(J,{value:c,startDate:i,endDate:d,onChange:p,options:oe,disabled:t})]}),r.jsx($,{className:"p-0 pt-4 flex-1 flex flex-col justify-center",children:t?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-44 w-full rounded-xl"})]}):l?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4",children:[r.jsx(nt,{className:"h-8 w-8 text-muted-foreground/40 mb-2"}),r.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"No seniority details available"})]}):r.jsx(ba,{seniorityList:s})})]})};va.propTypes={data:o.shape({experience_seniority:o.shape({seniority_distribution:o.arrayOf(o.object),user_years_of_experience:o.number,user_seniority_level:o.number,avg_min_experience_required:o.number,avg_max_experience_required:o.number})}),isLoading:o.bool,days:o.oneOfType([o.number,o.object,o.oneOf([null])]),onDaysChange:o.func};const Ie=(e,t,a,n,s)=>({key:e,label:t,value:a,growth:n,growthLabel:s}),Hl=e=>Ie("7d","Last 7 Days Applied Jobs",(e==null?void 0:e.last_7_days)??0,(e==null?void 0:e.last_7_days_growth_pct)??0,"vs previous 7 days"),Yl=e=>Ie("30d","Last 30 Days Applied Jobs",(e==null?void 0:e.last_30_days)??0,(e==null?void 0:e.last_30_days_growth_pct)??0,"vs previous 30 days"),Xl=e=>Ie("90d","Last 90 Days Applied Jobs",(e==null?void 0:e.last_90_days)??0,null,"Past 3 months (Quarter)"),ql=e=>Ie("total","Overall Applied Jobs",(e==null?void 0:e.total_applied)??0,null,"Lifetime submissions"),Jl=e=>[ql(e),Hl(e),Yl(e),Xl(e)],ga=({growth:e=null,growthLabel:t="",isLoading:a=!1})=>{if(a)return r.jsx(R,{className:"h-4 w-28"});if(e===null)return r.jsx("span",{className:"text-muted-foreground font-medium",children:t});const n=e>=0,s=e<0;return r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsxs("span",{className:`inline-flex items-center font-semibold ${n?"text-blue-600":s?"text-rose-500":"text-muted-foreground"}`,children:[n?r.jsx(Jr,{className:"h-3.5 w-3.5"}):r.jsx(qr,{className:"h-3.5 w-3.5"}),e>0?`+${e}%`:`${e}%`]}),r.jsx("span",{className:"text-muted-foreground font-normal",children:t})]})};ga.propTypes={growth:o.number,growthLabel:o.string,isLoading:o.bool};const ya=({value:e=0,isLoading:t=!1})=>t?r.jsx(R,{className:"h-12 w-28"}):r.jsx("div",{className:"text-4xl sm:text-5xl font-black tracking-tight text-foreground",children:Number(e).toLocaleString()});ya.propTypes={value:o.number,isLoading:o.bool};const ja=({item:e={},isLoading:t=!1})=>r.jsx(W,{className:"relative overflow-hidden border-border/80 bg-card shadow-xs hover:border-blue-200 dark:hover:border-blue-800 transition-all rounded-xl",children:r.jsxs($,{className:"p-4 sm:p-5",children:[r.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground block",children:e.label}),r.jsx("div",{className:"mt-3",children:r.jsx(ya,{value:e.value,isLoading:t})}),r.jsx("div",{className:"mt-2.5 flex items-center text-xs",children:r.jsx(ga,{growth:e.growth,growthLabel:e.growthLabel,isLoading:t})})]})});ja.propTypes={item:o.shape({label:o.string,value:o.number,growth:o.number,growthLabel:o.string}),isLoading:o.bool};const Na=({data:e=null,isLoading:t=!1})=>{const a=(e==null?void 0:e.kpi_summary)||{},n=Jl(a);return r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:n.map(s=>r.jsx(ja,{item:s,isLoading:t},s.key))})};Na.propTypes={data:o.shape({kpi_summary:o.shape({total_applied:o.number,last_7_days:o.number,last_7_days_growth_pct:o.number,last_30_days:o.number,last_30_days_growth_pct:o.number,last_90_days:o.number,avg_applications_per_week:o.number})}),isLoading:o.bool};const Aa=({active:e=!1,payload:t=[]})=>{if(!e||t.length===0)return null;const[a]=t,n=a.payload,s=a.color||"#3b82f6";return r.jsxs("div",{className:"relative z-50 rounded-xl border border-border/80 bg-card p-2.5 shadow-xl text-xs space-y-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:s}}),r.jsx("span",{className:"font-semibold text-foreground",children:n.name})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Applications:"}),r.jsx("strong",{className:"text-foreground",children:n.count||0})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Share:"}
36),r.jsxs("strong",{className:"text-blue-600 dark:text-blue-400",children:[n.percentage||0,"%"]})]})]})};Aa.propTypes={active:o.bool,payload:o.arrayOf(o.object)};const wa=({active:e=!1,payload:t=[]})=>{if(!e||t.length===0)return null;const[a]=t,n=a.payload;return r.jsxs("div",{className:"relative z-50 rounded-xl border border-border/80 bg-card p-2.5 shadow-xl text-xs space-y-1",children:[r.jsx("span",{className:"font-semibold text-foreground",children:n.location||"Unknown"}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Applications:"}),r.jsx("strong",{className:"text-foreground",children:n.count||0})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Share:"}),r.jsxs("strong",{className:"text-blue-600 dark:text-blue-400",children:[n.percentage||0,"%"]})]})]})};wa.propTypes={active:o.bool,payload:o.arrayOf(o.object)};const bt=["#2563eb","#3b82f6","#60a5fa","#8b5cf6","#6366f1"],Sa=({workModes:e=[]})=>{const t=[...e||[]].sort((i,d)=>((d==null?void 0:d.count)??0)-((i==null?void 0:i.count)??0)),[a]=t,n=((a==null?void 0:a.type)||"WORK MODE").replace(/_/g," "),s=(a==null?void 0:a.percentage)??0,l=new Map;t.forEach((i,d)=>{const p=(i==null?void 0:i.type)||"NOT_SPECIFIED";l.set(p,bt[d%bt.length])});const c=(e||[]).map(i=>{const d=(i==null?void 0:i.type)||"NOT_SPECIFIED";return{...i,name:d.replace(/_/g," "),value:(i==null?void 0:i.count)??0,color:l.get(d)||"#2563eb"}});return r.jsxs("div",{className:"space-y-2",children:[r.jsx("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider block",children:"Work Mode Distribution"}),r.jsxs("div",{className:"h-44 w-full relative flex items-center justify-center",children:[r.jsx(F,{width:"100%",height:"100%",style:{outline:"none"},children:r.jsxs(sa,{style:{outline:"none"},children:[r.jsx(U,{wrapperStyle:{zIndex:100},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx(Aa,{})}),r.jsx(Ue,{data:c,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:40,outerRadius:65,paddingAngle:3,stroke:"transparent",style:{outline:"none"},children:c.map(i=>r.jsx(re,{fill:i.color},`mode-${i.name}`))})]})}),r.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none text-center px-1 z-0",children:[r.jsxs("span",{className:"text-base font-black text-foreground",children:[s,"%"]}),r.jsx("span",{className:"text-[9px] font-semibold text-foreground uppercase truncate max-w-[70px]",children:n})]})]}),r.jsx("div",{className:"flex flex-wrap gap-2 justify-center",children:c.map(i=>r.jsxs("div",{className:"flex items-center gap-1 text-[11px]",children:[r.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:i.color}}),r.jsxs("span",{className:"text-muted-foreground",children:[i.name,":"]}),r.jsxs("strong",{className:"text-foreground",children:[i.percentage??0,"%"]})]},i.name))})]})};Sa.propTypes={workModes:o.arrayOf(o.object)};const ka=({topLocations:e=[]})=>{const t=(e||[]).slice(0,5).map(a=>({...a,label:((a==null?void 0:a.location)||"").length>12?`${((a==null?void 0:a.location)||"").slice(0,10)}...`:(a==null?void 0:a.location)||"Unknown"}));return t.length===0?r.jsxs("div",{className:"space-y-2",children:[r.jsx("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider block",children:"Top Applied Cities / Hubs"}),r.jsx("div",{className:"h-44 flex items-center justify-center text-xs text-muted-foreground",children:"No specific cities recorded"})]}):r.jsxs("div",{className:"space-y-2",children:[r.jsx("span",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider block",children:"Top Applied Cities / Hubs"}),r.jsx("div",{className:"h-44 w-full",children:r.jsx(F,{width:"100%",height:"100%",style:{outline:"none"},children:r.jsxs(pe,{data:t,layout:"vertical",margin:{top:4,right:12,left:4,bottom:4},style:{outline:"none"},children:[r.jsx(se,{type:"number",hide:!0}),r.jsx(le,{dataKey:"label",type:"category",width:75,interval:0,tick:{fontSize:11,fill:"currentColor"}}),r.jsx(U,{cursor:!1,wrapperStyle:{zIndex:100},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx(wa,{})}),r.jsx(me,{dataKey:"count",fill:"#3b82f6",radius:[0,4,4,0],barSize:14})]})})})]})};ka.propTypes={topLocations:o.arrayOf(o.object)};const Zl=(e,t,a,n)=>e?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-44 w-full rounded-xl"})]}):t?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4",children:[r.jsx(Re,{className:"h-8 w-8 text-muted-foreground
36/40 mb-2"}),r.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"No location distribution available"})]}):r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 items-center",children:[r.jsx(Sa,{workModes:a}),r.jsx(ka,{topLocations:n})]}),Ql=(e,t)=>{const a=(t==null?void 0:t.type)||"NOT_SPECIFIED",n=(t==null?void 0:t.count)||0,s=(t==null?void 0:t.percentage)||0,l=e.get(a);if(!l){e.set(a,{...t,type:a,count:n,percentage:s});return}l.count+=n,l.percentage=Math.round((l.percentage+s)*10)/10},eo=e=>{const t=e==null?void 0:e.location_work_mode,a=(t==null?void 0:t.work_modes)||[],n=new Map;return a.forEach(s=>Ql(n,s)),{workModes:[...n.values()].sort((s,l)=>((l==null?void 0:l.count)||0)-((s==null?void 0:s.count)||0)),topLocations:(t==null?void 0:t.top_locations)||[]}},to=e=>typeof e=="object"&&e!==null?{value:e.days??null,startDate:e.startDate??null,endDate:e.endDate??null}:{value:e,startDate:null,endDate:null},Ea=({data:e=null,isLoading:t=!1,days:a=7,onDaysChange:n=null})=>{const{workModes:s,topLocations:l}=eo(e),c=s.length===0&&l.length===0,{value:i,startDate:d,endDate:p}=to(a),m=f=>{n==null||n(f)};return r.jsxs(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl h-full min-h-[380px] flex flex-col p-6 sm:p-7 overflow-visible",children:[r.jsxs(Y,{className:"p-0 pb-4 flex flex-row items-center justify-between space-y-0 border-b border-border/60",children:[r.jsxs("div",{children:[r.jsxs(X,{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(Re,{className:"h-4 w-4 text-blue-600"}),"Location & Work Mode"]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Work mode preferences and top applied hubs"})]}),r.jsx(J,{value:i,startDate:d,endDate:p,onChange:m,options:oe,disabled:t})]}),r.jsx($,{className:"p-0 pt-4 flex-1 flex flex-col justify-center",children:Zl(t,c,s,l)})]})};Ea.propTypes={data:o.shape({location_work_mode:o.shape({work_modes:o.arrayOf(o.object),top_locations:o.arrayOf(o.object)})}),isLoading:o.bool,days:o.oneOfType([o.number,o.object,o.oneOf([null])]),onDaysChange:o.func};const ee="bg-muted/60 text-foreground dark:bg-muted/40 border-border/60",ao={experience:{icon:kt,defaultTitle:"Work Experience",defaultSubtitle:"1 yr experience",boxClass:ee},location:{icon:Re,defaultTitle:"Location",defaultSubtitle:"Preferred Location",boxClass:ee},keyskills:{icon:St,defaultTitle:"Key Skills",defaultSubtitle:"Skills Match",boxClass:ee},industry:{icon:Hr,defaultTitle:"Industry",defaultSubtitle:"Target Industry",boxClass:ee},department:{icon:Gr,defaultTitle:"Department",defaultSubtitle:"Target Department",boxClass:ee}},no="bg-emerald-500",ro="bg-amber-500",so="bg-rose-500",lo="bg-emerald-500/10 text-emerald-700 dark:bg-emerald-950/50 dark:text-emerald-300 border-emerald-300 dark:border-emerald-700",oo="bg-amber-500/10 text-amber-700 dark:bg-amber-950/50 dark:text-amber-300 border-amber-300 dark:border-amber-700",io="bg-rose-500/10 text-rose-700 dark:bg-rose-950/50 dark:text-rose-300 border-rose-300 dark:border-rose-700",vt={HIGH:{label:"HIGH MATCH",badgeClass:lo,barColor:no,activeStep:3,description:"Strong overall profile alignment"},MEDIUM:{label:"MEDIUM MATCH",badgeClass:oo,barColor:ro,activeStep:2,description:"Moderate profile alignment"},LOW:{label:"LOW MATCH",badgeClass:io,barColor:so,activeStep:1,description:"Needs profile skills & exp updates"}},Da=({card:e,config:t})=>{const a=t.icon;return r.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[r.jsx("div",{className:`p-2 rounded-xl shrink-0 border ${t.boxClass}`,children:r.jsx(a,{className:"h-3.5 w-3.5"})}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("h4",{className:"font-semibold text-foreground truncate",children:(e==null?void 0:e.title)||t.defaultTitle}),r.jsx("p",{className:"text-[11px] text-muted-foreground truncate",children:(e==null?void 0:e.subtitle)||t.defaultSubtitle})]})]})};Da.propTypes={card:o.object.isRequired,config:o.object.isRequired};const co=e=>{if(e!=null&&e.match_percentage&&Number(e.match_percentage)>0)return Math.round(Number(e.match_percentage));const t=Number((e==null?void 0:e.matched_count)??0),a=Number((e==null?void 0:e.total_count)??0);return a>0?Math.round(t/a*100):0},Ia=({card:e})=>{const t=ao[e==null?void 0:e.key]||{icon:kt,defaultTitle:(e==null?void 0:e.title)||"Dimension",defaultSubtitle:"Profile alignment",boxClass:ee},a=co(e);return r.jsxs("div",{className:"grid grid-cols-12 items-center gap-2 p-2.5 rounded-xl bg-muted/30 border border-border/60 hover:bg-muted/50 transition-colors text-xs",children:[r.jsx("div",{className:"col-span-6 min-w-0",children:r.jsx(Da,{card:e,config:t})}),r.jsxs("div",{className:"col-span-6 flex items-center gap-2",children:[r.jsxs("span",{className:"font-bold text-foreground w-9 shrink-0",children:[a,"%"]}),r.jsx("div",{className:"h-2.5 flex-1 rounded-full bg-muted/60 dark:bg-muted/40 overflow-hidden",children:r.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-blue-600 to-blue-500 transition-all duration-500",style:{width:`${Math.max(a>0?6:0,a)}%`}})})]})]})};Ia.propTypes={card:o.object.isRequired};const Oa=({level:e="LOW"})=>{const t=(e==null?void 0:e.toUpperCase())||"LOW",a=vt[t]||vt.LOW;return r.jsx("div",{className:"flex items-center justify-between mb-4",children:r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(Vr,{className:"h-4 w-4 text-blue-600"}),"Profile Match Breakdown"]}),r.jsx("span",{className:`text-[10px] font-extrabold px-2 py-0.5 rounded-full border ${a.badgeClass}`,children:a.label})]}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["See how your profile aligns with applied jobs across key dimensions vs"," ",r.jsx("strong",{className:"font-semibold text-foreground",children:"last week"})]})]})})};Oa.propTypes={level:o.string};const uo=e=>{const t=(e==null?void 0:e.profile_match)||{};return{matchLevel:t.overall_match_level||"LOW",cards:t.cards||[]}},Ca=({data:e=null,isLoading:t=!1})=>{const{matchLevel:a,cards:n}=uo(e);return r.jsx(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl h-full min-h-[400px] flex flex-col p-5 sm:p-6",children:r.jsxs($,{className:"p-0 flex-1 flex flex-col space-y-4",children:[r.jsx(Oa,{level:a}),t?r.jsxs("div",{className:"flex h-64 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-52 w-full rounded-xl"})]}):r.jsxs("div",{className:"space-y-2 flex-1",children:[r.jsxs("div",{className:"grid grid-cols-12 items-center text-[11px] font-semibold uppercase tracking-wider text-muted-foreground pb-1.5 border-b border-border/60 px-1",children:[r.jsx("span",{className:"col-span-6",children:"Dimension"}),r.jsx("span",{className:"col-span-6",children:"Match Score"})]}),r.jsx("div",{className:"space-y-2",children:n.map(s=>r.jsx(Ia,{card:s},s.key||s.title))})]})]})})};Ca.propTypes={data:o.shape({profile_match:o.shape({timeframe_days:o.number,total_applied:o.number,overall_matched_count:o.number,overall_match_percentage:o.number,overall_match_level:o.string,cards:o.arrayOf(o.object)})}),isLoading:o.bool};const gt="https://industrypilot.10xscale.ai/dashboard",Ta=({skills:e=[]})=>{const t=e.slice(0,5).map(a=>({skill:(a==null?void 0:a.skill)||"Unknown",percentage:Number((a==null?void 0:a.percentage)??0),count:(a==null?void 0:a.count)??0}));return r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-blue-700 dark:text-blue-300",children:[r.jsx(Te,{className:"h-4 w-4 text-blue-600"}),r.jsx("span",{children:"Top Matched Skills in Applied Jobs (Top 5)"})]}),r.jsx("div",{className:"space-y-2.5",children:t.map(a=>r.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs p-2.5 rounded-xl bg-blue-50/40 dark:bg-blue-950/20 border border-blue-100/80 dark:border-blue-900/40 hover:bg-blue-50/70 transition-colors",children:[r.jsx("div",{className:"flex items-center gap-2 w-20 shrink-0 min-w-0",children:r.jsx("span",{className:"font-semibold text-foreground truncate",children:a.skill})}),r.jsx("div",{className:"flex-1 h-2.5 rounded-full bg-blue-100/70 dark:bg-blue-950/60 overflow-hidden mx-1",children:r.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-blue-600 to-blue-500 transition-all duration-500",style:{width:`${Math.max(5,a.percentage)}%`}})}),r.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 text-right",children:[r.jsxs("span",{className:"font-bold text-foreground",children:[a.count," jobs"]}),r.jsxs("span",{className:"text-muted-foreground text-[11px] font-medium w-12 text-right",children:["(",a.percentage,"%)"]})]})]},a.skill))})]})};Ta.propTypes={skills:o.arrayOf(o.object)};const Pa=({skills:e=[]})=>{if(e.length===0)return null;const t=e.slice(0,5);return r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-slate-700 dark:text-slate-300",children:[r.jsx(Yr,{className:"h-4 w-4 text-blue-600"}),r.jsx("span",{children:"Skills to Unlock More Jobs (Top 5 High-Demand Gap)"})]}),r.jsx("div",{className:"space-y-2.5",children:t.map(a=>{const n=Number((a==null?void 0:a.percentage)??0);return r.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs p-2.5 rounded-xl bg-muted/30 border border-border/60 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-2 w-24 shrink-0 min-w-0",children:[r.jsx("span",{className:"font-semibold text-foreground truncate",children:a==null?void 0:a.skill}),n>=80&&r.jsx("span",{className:"px-1.5 py-0.2 text-[9px] font-bold rounded bg-sky-50 text-sky-700 dark:bg-sky-950/60 dark:text-sky-300 border border-sky-200 dark:border-sky-800 shrink-0",children:"High Demand"})]}),r.jsx("div",{className:"flex-1 h-2.5 rounded-full bg-muted/60 overflow-hidden mx-1",children:r.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-blue-600 to-blue-500 transition-all duration-500",style:{width:`${Math.max(5,n)}%`}})}),r.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 text-right",children:[r.jsxs("span",{className:"font-bold text-foreground",children:[(a==null?void 0:a.count)??0," jobs"]}),r.jsxs("span",{className:"text-muted-foreground text-[11px] font-medium w-12 text-right",children:["(",n,"%)"]})]})]},a==null?void 0:a.skill)})})]})};Pa.propTypes={skills:o.arrayOf(o.object)};const po=(e,t,a,n)=>e?r.jsxs("div",{className:"flex h-64 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-52 w-full rounded-md"})]}):t?r.jsxs("div",{className:"flex h-56 flex-col items-center justify-center text-center p-4",children:[r.jsx(Ft,{className:"h-8 w-8 text-muted-foreground
36/40 mb-2"}),r.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"No skill extraction data available"})]}):r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:[r.jsx(Ta,{skills:a}),r.jsx(Pa,{skills:n})]}),mo=e=>{const t=e==null?void 0:e.skills_alignment;return{matchedSkills:(t==null?void 0:t.top_matched_skills)||[],missingSkills:(t==null?void 0:t.top_missing_skills)||[]}},_a=({data:e=null,isLoading:t=!1})=>{var i;const{matchedSkills:a,missingSkills:n}=mo(e),s=a.length===0&&n.length===0,l=n.slice(0,3).map(d=>d==null?void 0:d.skill).filter(Boolean).join(", "),c=()=>{typeof window<"u"&&gt&&window.open(gt,"_blank","noopener,noreferrer")};return r.jsxs(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl p-6 sm:p-7",children:[r.jsx(Y,{className:"p-0 pb-4 flex flex-row items-center justify-between space-y-0 border-b border-border/60",children:r.jsxs("div",{children:[r.jsxs(X,{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(Ft,{className:"h-4 w-4 text-blue-600"}),"Skills Alignment & Demand Intelligence"]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Real-time comparison of matched skills and high-demand missing skills"})]})}),r.jsxs($,{className:"p-0 pt-4 flex flex-col h-full",children:[po(t,s,a,n),!t&&!s&&n.length>0&&r.jsx("div",{className:"flex justify-center mt-4 w-full",children:r.jsxs("button",{type:"button",onClick:c,className:"inline-flex items-center justify-center gap-2 rounded-xl bg-blue-50/60 dark:bg-blue-950/30 px-4 py-2.5 border border-blue-200/70 dark:border-blue-800/70 text-xs text-muted-foreground text-center max-w-fit shadow-2xs hover:bg-blue-100/70 dark:hover:bg-blue-900/40 hover:border-blue-300 dark:hover:border-blue-700 transition-all cursor-pointer group",children:[r.jsx(Zr,{className:"h-4 w-4 text-blue-600 shrink-0 group-hover:scale-110 transition-transform"}),r.jsxs("span",{children:[r.jsxs("strong",{className:"text-foreground font-semibold",children:["Recommendation:"," "]}),"Adding top missing skills like"," ",r.jsx("strong",{className:"text-blue-700 dark:text-blue-300 font-semibold",children:l||((i=n[0])==null?void 0:i.skill)})," ","can boost match rates across new roles."]}),r.jsx($t,{className:"h-3.5 w-3.5 text-blue-600 shrink-0 opacity-70 group-hover:opacity-100 transition-opacity ml-1"})]})})]})]})};_a.propTypes={data:o.shape({skills_alignment:o.shape({top_matched_skills:o.arrayOf(o.object),top_missing_skills:o.arrayOf(o.object),total_unique_skills_required:o.number})}),isLoading:o.bool};const Me="#2563eb",fo=e=>e?e.toLowerCase().replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase()):"Unknown",yt=(e,t)=>{var n,s;const a=t==null?void 0:t.toLowerCase();return!!(a&&(((n=e==null?void 0:e.value)==null?void 0:n.toLowerCase())===a||((s=e==null?void 0:e.label)==null?void 0:s.toLowerCase())===a))},jt=e=>e&&e!=="Unknown"?e:null,xo=(e,t)=>{const a=(Nn||[]).find(n=>yt(n,e)||yt(n,t));return(a==null?void 0:a.value)||e||t||null},ho=(e,t)=>{const a=jt(e),n=jt(t);return!a&&!n?null:xo(a,n)},bo=e=>typeof e=="object"&&e!==null?{value:(e==null?void 0:e.days)??null,startDate:(e==null?void 0:e.startDate)??null,endDate:(e==null?void 0:e.endDate)??null}:{value:e,startDate:null,endDate:null},La=({name:e="Unknown",count:t=0,percentage:a=0})=>r.jsxs("div",{className:"relative z-50 rounded-xl border border-border/80 bg-card p-2.5 shadow-xl text-xs space-y-1 select-none",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:Me}}),r.jsx("span",{className:"font-semibold text-foreground",children:e})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Applications:"}),r.jsx("strong",{className:"text-foreground",children:t})]}),r.jsxs("div",{className:"text-muted-foreground font-medium flex justify-between gap-4",children:[r.jsx("span",{children:"Share:"}),r.jsxs("strong",{className:"text-blue-600 dark:text-blue-400",children:[a,"%"]})]}
36),r.jsxs("div",{className:"pt-1 text-[10px] text-blue-600 dark:text-blue-400 font-medium flex items-center gap-1 border-t border-border/40 mt-1",children:[r.jsx("span",{children:"Click to view applied jobs"}),r.jsx($t,{className:"h-3 w-3"})]})]});La.propTypes={name:o.string,count:o.number,percentage:o.number};const Ma=({active:e=!1,payload:t=[]})=>{if(!e)return null;const[a]=t;if(!a)return null;const n=a.payload;return n?r.jsx(La,{name:n.name,count:n.count,percentage:n.percentage}):null};Ma.propTypes={active:o.bool,payload:o.arrayOf(o.object)};const Ra=({sources:e=[],onSourceClick:t=null})=>{const a=(e||[]).map(s=>{const l=fo(s==null?void 0:s.source_name),c=(l==null?void 0:l.length)>8?`${l.slice(0,7)}..`:l;return{...s,name:l,shortLabel:c,color:Me}}),n=s=>{t&&s&&t(s)};return r.jsx("div",{className:"flex flex-col h-full pt-2",children:r.jsx("div",{className:"h-64 w-full pt-2",children:r.jsx(F,{width:"100%",height:"100%",style:{outline:"none"},children:r.jsxs(pe,{data:a,margin:{top:12,right:12,left:-16,bottom:8},style:{outline:"none"},onClick:s=>{var l,c;(c=(l=s==null?void 0:s.activePayload)==null?void 0:l[0])!=null&&c.payload&&n(s.activePayload[0].payload)},children:[r.jsx(fe,{strokeDasharray:"3 3",vertical:!1,opacity:.3}),r.jsx(se,{dataKey:"shortLabel",interval:0,tick:{fontSize:10,fill:"currentColor"},axisLine:{stroke:"#e2e8f0"},tickLine:!1}),r.jsx(le,{allowDecimals:!1,tick:{fontSize:11,fill:"currentColor"},axisLine:!1,tickLine:!1}),r.jsx(U,{cursor:{fill:"rgba(37, 99, 235, 0.06)",cursor:"pointer"},wrapperStyle:{zIndex:100,cursor:"pointer"},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx(Ma,{})}),r.jsx(me,{dataKey:"count",fill:Me,radius:[8,8,0,0],barSize:32,className:"cursor-pointer hover:opacity-85 transition-opacity",onClick:s=>n(s)})]})})})})};Ra.propTypes={sources:o.arrayOf(o.object),onSourceClick:o.func};const Ba=({data:e=null,isLoading:t=!1,days:a=7,onDaysChange:n=null})=>{const s=$r(),l=Xr(),c=e==null?void 0:e.source_breakdown,i=(c==null?void 0:c.sources)||[],d=i.length===0,{value:p,startDate:m,endDate:f}=bo(a),x=b=>{n==null||n(b)},y=b=>{var g,j,E;const A=ho(b==null?void 0:b.source_name,b==null?void 0:b.name),N={...jn,action_type:"APPLIED",source:A?[A]:[]};s(ln(!0)),s(on("APPLIED")),s(cn(!1)),s(dn(!1)),s(un(N)),s(pn({tab:"APPLIED",filters:N})),l((E=(j=(g=mn)==null?void 0:g.route)==null?void 0:j.jobs)==null?void 0:E.LIST)};return r.jsxs(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl h-full min-h-[380px] flex flex-col p-5 sm:p-6 overflow-visible",children:[r.jsxs(Y,{className:"p-0 pb-3 flex flex-row items-center justify-between space-y-0 border-b border-border/60",children:[r.jsxs("div",{children:[r.jsxs(X,{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(rn,{className:"h-4 w-4 text-blue-600"}),"Application Sources Breakdown"]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Top channels where you submitted applications"})]}),r.jsx(J,{value:p,startDate:m,endDate:f,onChange:x,options:oe,disabled:t})]}),r.jsx($,{className:"p-0 pt-3 flex-1 flex flex-col justify-center",children:t?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-44 w-full rounded-xl"})]}):d?r.jsxs("div",{className:"flex h-52 flex-col items-center justify-center text-center p-4",children:[r.jsx(sn,{className:"h-8 w-8 text-muted-foreground/40 mb-2"}),r.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"No source distribution available"})]}):r.jsx(Ra,{sources:i,onSourceClick:y})})]})};Ba.propTypes={data:o.shape({source_breakdown:o.shape({sources:o.arrayOf(o.object),top_source:o.string,total_sources_count:o.number})}),isLoading:o.bool,days:o.oneOfType([o.number,o.object,o.oneOf([null])]),onDaysChange:o.func};const vo=["KPI_SUMMARY","VOLUME_TRENDS","SOURCE_BREAKDOWN","AI_MATCH_SCORE","SKILLS_ALIGNMENT","LOCATION_WORK_MODE","EXPERIENCE_SENIORITY","DOMAIN_DISTRIBUTION","PROFILE_MATCH"],Nt=e=>e instanceof Date?e.toISOString():e??void 0,go=(e,t,a,n)=>{const s=Nt(a),l=Nt(n);return{sections:e,days:!!(s||l)?void 0:t,start_date:s,end_date:l}}
36,yo=({sections:e=vo,days:t=7,startDate:a=null,endDate:n=null,signal:s}={})=>{const l=go(e,t,a,n);return fn.get(`${xn}/applications/analytics`,{params:l,paramsSerializer:{indexes:null},signal:s}).then(c=>{var i;return((i=c.data)==null?void 0:i.data)??c.data})},jo="Failed to load application analytics",No=3,Ao=1e3,Ce=e=>{var t,a;return((a=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:a.message)||(e==null?void 0:e.message)||jo},Ge=e=>(e==null?void 0:e.name)==="CanceledError"||(e==null?void 0:e.name)==="AbortError",At=(e={})=>Object.fromEntries(Object.entries(e||{}).filter(([,t])=>t!=null)),wo=e=>new Promise(t=>{setTimeout(t,e)}),So=e=>!!(e&&e>=400&&e<500&&e!==429),ko=async(e,t,a,n)=>{var s;return Ge(e)||n!=null&&n.aborted||So((s=e==null?void 0:e.response)==null?void 0:s.status)?!0:(t<a&&await wo(Ao*t),!1)},Eo=e=>typeof e=="number"||e===null?{days:e,startDate:null,endDate:null}:{days:(e==null?void 0:e.days)??null,startDate:(e==null?void 0:e.startDate)??null,endDate:(e==null?void 0:e.endDate)??null},Ka=async(e,t,a=null,n=null,s=null,l=No)=>{let c=null;for(let i=1;i<=l;i+=1){if(s!=null&&s.aborted)return null;try{return await yo({sections:[e],days:t,startDate:a,endDate:n,signal:s})}catch(d){if(c=d,await ko(d,i,l,s))return null}}throw c},Do=(e=[])=>{const t={};return e.forEach(({section:a})=>{a&&(t[a]=!0)}),t},Io=async({config:e,signal:t,onSuccess:a,onError:n,onFinish:s})=>{const{section:l,days:c,startDate:i,endDate:d}=e||{};if(l)try{const p=await Ka(l,c,i,d,t);p&&a(p)}catch(p){!Ge(p)&&!(t!=null&&t.aborted)&&n(l,p)}finally{s(l)}},Oo=async({sectionConfigs:e,signal:t,onSectionSuccess:a,onSectionError:n,onSectionFinish:s})=>{let l=!1,c=null;const i=e.map(d=>Io({config:d,signal:t,onSuccess:p=>{l=!0,a(p)},onError:(p,m)=>{c=m,n(p,m)},onFinish:s}));return await Promise.allSettled(i),{hasAnySuccess:l,lastFailureError:c}},Co=()=>{const[e,t]=u.useState(null),[a,n]=u.useState(!0),[s,l]=u.useState({}),[c,i]=u.useState({}),[d,p]=u.useState(null),m=u.useCallback(async(x=[],y=null)=>{l(Do(x)),i({}),n(!0),p(null);const{hasAnySuccess:b,lastFailureError:A}=await Oo({sectionConfigs:x,signal:y,onSectionSuccess:N=>t(g=>({...g||{},...At(N)})),onSectionError:(N,g)=>i(j=>({...j||{},[N]:Ce(g)})),onSectionFinish:N=>l(g=>({...g||{},[N]:!1}))});n(!1),!b&&A&&!(y!=null&&y.aborted)&&p(Ce(A))},[]),f=u.useCallback(async(x,y={},b=null)=>{const{days:A,startDate:N,endDate:g}=Eo(y);l(j=>({...j||{},[x]:!0})),i(j=>({...j||{},[x]:null}));try{const j=await Ka(x,A,N,g,b);return j&&t(E=>({...E||{},...At(j)})),j}catch(j){return!Ge(j)&&!(b!=null&&b.aborted)&&i(E=>({...E||{},[x]:Ce(j)})),null}finally{l(j=>({...j||{},[x]:!1}))}},[]);return{data:e,isLoading:a,loadingSections:s,sectionErrors:c,error:d,fetchAllWithConfigs:m,fetchSection:f}},wt={fontSize:11,fill:"var(--muted-foreground)"},To=e=>[...e.keys()].sort(),Po=(e,t)=>{if(!e||!t)return null;try{const a=new Date(e),n=new Date(t),s=Math.ceil((n.getTime()-a.getTime())/(1e3*60*60*24))+1;return Math.max(1,s)}catch{return 30}},_o=e=>{if(typeof e=="number")return e;if(typeof e=="object"&&e!==null){const t=Po(e.startDate,e.endDate);if(t!==null)return t;if(typeof e.days=="number")return e.days;if(e.days===null)return null}return 30},Lo=(e,t=[])=>typeof e=="object"&&(e!=null&&e.endDate)?String(e.endDate).slice(0,10):t.length>0?t[t.length-1]:new Date().toISOString().slice(0,10),Mo=(e,t,a)=>{const n=new Date(`${t}T00:00:00Z`),s=[];let l=0;for(let c=a-1;c>=0;c--){const i=new Date(n);i.setUTCDate(i.getUTCDate()-c);const d=i.toISOString().slice(0,10),p=e.get(d),m=Number((p==null?void 0:p.count)??0);(p==null?void 0:p.cumulative_count)!=null?l=Number(p.cumulative_count):l+=m,s.push({date:d,displayDate:d.slice(5),count:m,cumulative:l})}return s},Ro=(e=[],t=30)=>{if(!e||e.length===0)return[];const a=new Map;e.forEach(i=>{i!=null&&i.date&&a.set(i.date,i)});const n=To(a),s=_o(t),l=Lo(t,n);if(!l)return[];const c=s===null?Math.max(n.length,1):Math.max(s||30,n.length);return Mo(a,l,c)},Bo=(e=[],t=30)=>Ro(e,t),Wa=({data:e=null,label:t=""})=>r.jsxs("div",{className:"rounded-lg border border-border/80 bg-card p-3 shadow-md text-xs space-y-1",children:[r.jsx("div",{className:"font-semibold text-foreground",children:(e==null?void 0:e.date)||t}),r.jsxs("div",{className:"flex items-center justify-between gap-4 text-blue-600",children:[r.jsx("span",{children:"Applications:"}),r.jsx("span",{className:"font-bold",children:(e==null?void 0:e.count)??0})]}),r.jsxs("div",{className:"flex items-center justify-between gap-4 text-muted-foreground",children:[r.jsx("span",{children:"Cumulative:"}),r.jsx("span",{className:"font-semibold",children:(e==null?void 0:e.cumulative)??0})]})]});Wa.propTypes={data:o.object,label:o.string};const $a=({active:e=!1,payload:t=[],label:a=""})=>{var n;return!e||t.length===0?null:r.jsx(Wa,{data:(n=t[0])==null?void 0:n.payload,label:a})};$a.propTypes={active:o.bool,payload:o.arrayOf(o.object),label:o.string};const Ko=e=>r.jsx("div",{className:"h-72 w-full",children:r.jsx(F,{width:"100%",height:"100%",children:r.jsxs(Ll,{data:e,margin:{top:10,right:10,left:-20,bottom:0},children:[r.jsx("defs",{children:r.jsxs("linearGradient",{id:"appliedGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[r.jsx("stop",{offset:"5%",
36stopColor:"#2563eb",stopOpacity:.4}),r.jsx("stop",{offset:"95%",stopColor:"#2563eb",stopOpacity:0})]})}),r.jsx(fe,{strokeDasharray:"3 3",className:"stroke-border/40",vertical:!1}),r.jsx(se,{dataKey:"displayDate",tickLine:!1,axisLine:!1,tick:wt,interval:"preserveStartEnd"}),r.jsx(le,{allowDecimals:!1,tickLine:!1,axisLine:!1,tick:wt}),r.jsx(U,{cursor:!1,wrapperStyle:{zIndex:100},allowEscapeViewBox:{x:!0,y:!0},content:r.jsx($a,{})}),r.jsx(na,{type:"monotone",dataKey:"count",stroke:"#2563eb",strokeWidth:2,fillOpacity:1,fill:"url(#appliedGradient)",dot:{r:2,fill:"#2563eb"},activeDot:{r:5,fill:"#1d4ed8"}})]})})}),Wo=e=>typeof e=="object"&&e!==null?{value:e.days??null,startDate:e.startDate??null,endDate:e.endDate??null}:{value:e,startDate:null,endDate:null},za=({totalInPeriod:e=0,isLoading:t=!1,days:a=7,onDaysChange:n=null})=>{const s=d=>{n==null||n(d)},{value:l,startDate:c,endDate:i}=Wo(a);return r.jsxs("div",{className:"flex items-center gap-2.5",children:[!t&&e>0&&r.jsxs("span",{className:"text-xs font-semibold px-2.5 py-1 rounded-lg bg-blue-50 text-blue-700 dark:bg-blue-950/50 dark:text-blue-300 border border-blue-200/80 hidden sm:inline-block",children:[e," Applied"]}),r.jsx(J,{value:l,startDate:c,endDate:i,onChange:s,options:Ml,disabled:t})]})};za.propTypes={totalInPeriod:o.number,isLoading:o.bool,days:o.oneOfType([o.number,o.object,o.oneOf([null])]),onDaysChange:o.func};const $o=()=>r.jsxs("div",{className:"flex h-72 flex-col items-center justify-center text-center p-4",children:[r.jsx(zt,{className:"h-8 w-8 text-muted-foreground/40 mb-2"}),r.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"No application submissions recorded in this period"})]}),Fa=({peakDate:e=null,peakCount:t=0})=>!e||t<=0?null:r.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground border-t border-border/60 pt-2",children:[r.jsxs("span",{children:["Peak Day:"," ",r.jsx("strong",{className:"text-foreground font-semibold",children:e})]}),r.jsxs("span",{className:"font-semibold text-blue-600",children:[t," ",t===1?"application":"applications"]})]});Fa.propTypes={peakDate:o.string,peakCount:o.number};const Ua=({isLoading:e=!1,isEmpty:t=!1,formattedData:a=[],peakDate:n=null,peakCount:s=0})=>e?r.jsxs("div",{className:"flex h-72 flex-col items-center justify-center text-center p-4 space-y-3",children:[r.jsx(K,{className:"h-7 w-7 text-blue-600 animate-spin"}),r.jsx(R,{className:"h-60 w-full rounded-md"})]}):t?r.jsx($o,{}):r.jsxs(r.Fragment,{children:[Ko(a),r.jsx(Fa,{peakDate:n,peakCount:s})]});Ua.propTypes={isLoading:o.bool,isEmpty:o.bool,formattedData:o.array,peakDate:o.string,peakCount:o.number};const zo=e=>{const t=e==null?void 0:e.volume_trends;return{timeline:(t==null?void 0:t.timeline)||[],totalInPeriod:(t==null?void 0:t.total_in_period)??0,peakDate:(t==null?void 0:t.peak_date)||null,peakCount:(t==null?void 0:t.peak_count)??0}},Va=({data:e=null,isLoading:t=!1,days:a=30,onDaysChange:n=null})=>{const{timeline:s,totalInPeriod:l,peakDate:c,peakCount:i}=zo(e),d=Bo(s,a),p=d.length===0,m=f=>{n==null||n(f)};return r.jsxs(W,{className:"border-border/80 bg-card shadow-xs rounded-2xl h-full min-h-[400px] flex flex-col p-6 sm:p-7 overflow-visible",children:[r.jsxs(Y,{className:"p-0 pb-4 flex flex-row items-center justify-between space-y-0 border-b border-border/60",children:[r.jsxs("div",{children:[r.jsxs(X,{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[r.jsx(zt,{className:"h-4 w-4 text-blue-600"}),"Application Momentum & Velocity"]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Daily job submissions and momentum curve"})]}),r.jsx(za,{totalInPeriod:l,isLoading:t,days:a,onDaysChange:m})]}),r.jsx($,{className:"p-0 pt-4 flex-1 flex flex-col",children:r.jsx(Ua,{isLoading:t,isEmpty:p,formattedData:d,peakDate:c,peakCount:i})})]})};Va.propTypes={data:o.shape({volume_trends:o.shape({timeline:o.arrayOf(o.shape({date:o.string,count:o.number,cumulative_count:o.number})),total_in_period:o.number,peak_date:o.string,peak_count:o.number})}),isLoading:o.bool,days:o.oneOfType([o.number,o.object,o.oneOf([null])]),onDaysChange:o.func};const Fo=[{section:"KPI_SUMMARY"},{section:"PROFILE_MATCH",days:7},{section:"SKILLS_ALIGNMENT"},{section:"AI_MATCH_SCORE",days:7},{section:"VOLUME_TRENDS",days:30},{section:"SOURCE_BREAKDOWN",days:7},{section:"LOCATION_WORK_MODE",days:7},{section:"EXPERIENCE_SENIORITY",days:7},{section:"DOMAIN_DISTRIBUTION",days:7}],Ga=({error:e=null,onRetry:t=null})=>{if(!e)return null;const a=()=>{t==null||t()};return r.jsxs("div",{className:"flex items-center justify-between rounded-xl bg-destructive/10 p-3.5 border border-destructive/20 text-destructive text-xs",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(hn,{className:"h-4 w-4 shrink-0"}),r.jsx("span",{children:e})]}),r.jsxs(xe,{variant:"outline",size:"sm",onClick:a,className:"h-7 text-xs border-destructive/30 hover:bg-destructive/20 cursor-pointer",children:[r.jsx(bn,{className:"h-3 w-3 mr-1"}),"Retry"]})]})};Ga.propTypes={error:o.string,onRetry:o.func};const Z=e=>
36{if(e==null)return{days:null,startDate:null,endDate:null};if(typeof e=="number")return{days:e,startDate:null,endDate:null};const t=(e==null?void 0:e.days)??null,a=(e==null?void 0:e.startDate)??null,n=(e==null?void 0:e.endDate)??null;return{days:t,startDate:a,endDate:n}},Q=(e,t={})=>({section:e,days:t==null?void 0:t.days,startDate:t==null?void 0:t.startDate,endDate:t==null?void 0:t.endDate}),Uo=(e={})=>[{section:"KPI_SUMMARY"},{section:"PROFILE_MATCH",days:7},{section:"SKILLS_ALIGNMENT"},Q("AI_MATCH_SCORE",e.aiMatch),Q("VOLUME_TRENDS",e.volume),Q("SOURCE_BREAKDOWN",e.source),Q("LOCATION_WORK_MODE",e.location),Q("EXPERIENCE_SENIORITY",e.seniority),Q("DOMAIN_DISTRIBUTION",e.domain)],Vo=e=>{const[t,a]=u.useState({days:7,startDate:null,endDate:null}),[n,s]=u.useState({days:30,startDate:null,endDate:null}),[l,c]=u.useState({days:7,startDate:null,endDate:null}),[i,d]=u.useState({days:7,startDate:null,endDate:null}),[p,m]=u.useState({days:7,startDate:null,endDate:null}),[f,x]=u.useState({days:7,startDate:null,endDate:null}),y=v=>{const h=Z(v);a(h),e("AI_MATCH_SCORE",h)},b=v=>{const h=Z(v);s(h),e("VOLUME_TRENDS",h)},A=v=>{const h=Z(v);c(h),e("SOURCE_BREAKDOWN",h)},N=v=>{const h=Z(v);d(h),e("LOCATION_WORK_MODE",h)},g=v=>{const h=Z(v);m(h),e("EXPERIENCE_SENIORITY",h)},j=v=>{const h=Z(v);x(h),e("DOMAIN_DISTRIBUTION",h)},E=u.useCallback(()=>Uo({aiMatch:t,volume:n,source:l,location:i,seniority:p,domain:f}),[t,n,l,i,p,f]);return{daysState:{aiMatchDays:t,volumeDays:n,sourceDays:l,locationDays:i,seniorityDays:p,domainDays:f},handlers:{handleAiMatchDaysChange:y,handleVolumeDaysChange:b,handleSourceDaysChange:A,handleLocationDaysChange:N,handleSeniorityDaysChange:g,handleDomainDaysChange:j},getConfigs:E}},Go=()=>{const{data:e,loadingSections:t,error:a,fetchAllWithConfigs:n,fetchSection:s}=Co(),{daysState:l,handlers:c,getConfigs:i}=Vo(s);u.useEffect(()=>{const m=new AbortController;return n(Fo,m.signal),()=>{m.abort()}},[n]);const d=()=>n(i()),p=t||{};return r.jsxs("div",{className:"space-y-6 pb-12",children:[r.jsx(Ga,{error:a,onRetry:d}),r.jsx(Na,{data:e,isLoading:!!p.KPI_SUMMARY}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-4 items-stretch",children:[r.jsx("div",{className:"lg:col-span-4 h-full",children:r.jsx(Ca,{data:e,isLoading:!!p.PROFILE_MATCH})}),r.jsx("div",{className:"lg:col-span-5 h-full",children:r.jsx(Ba,{data:e,isLoading:!!p.SOURCE_BREAKDOWN,days:l.sourceDays,onDaysChange:c.handleSourceDaysChange})}),r.jsx("div",{className:"lg:col-span-3 h-full",children:r.jsx(da,{data:e,isLoading:!!p.AI_MATCH_SCORE,days:l.aiMatchDays,onDaysChange:c.handleAiMatchDaysChange})})]}),r.jsx("div",{className:"w-full",children:r.jsx(Va,{data:e,isLoading:!!p.VOLUME_TRENDS,days:l.volumeDays,onDaysChange:c.handleVolumeDaysChange})}),r.jsx(_a,{data:e,isLoading:!!p.SKILLS_ALIGNMENT}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6",children:[r.jsx(Ea,{data:e,isLoading:!!p.LOCATION_WORK_MODE,days:l.locationDays,onDaysChange:c.handleLocationDaysChange}),r.jsx(va,{data:e,isLoading:!!p.EXPERIENCE_SENIORITY,days:l.seniorityDays,onDaysChange:c.handleSeniorityDaysChange}),r.jsx(fa,{data:e,isLoading:!!p.DOMAIN_DISTRIBUTION,days:l.domainDays,onDaysChange:c.handleDomainDaysChange})]})]})},je="analytics",Ho="text-muted-foreground hover:text-foreground",Ha=({activeTab:e=je,onSelectAnalytics:t=null})=>{const a=()=>{t&&t()};return r.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Progress Tracker"}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Manage recruiting stages and monitor detailed job application analytics."})]}),r.jsx("div",{className:"flex items-center rounded-xl bg-muted p-1 border border-border",children:r.jsxs("button",{type:"button",onClick:a,className:`flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-xs font-semibold transition-all cursor-pointer ${e===je?"bg-card text-blue-600 dark:text-blue-400 shadow-xs border border-border/80":Ho}
36`,children:[r.jsx(vn,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}),r.jsx("span",{children:"Analytics & Stats"})]})})]})};Ha.propTypes={activeTab:o.string,onSelectAnalytics:o.func};const Ni=()=>{const[e,t]=u.useState(je),a=()=>{t(je)};return r.jsxs("div",{className:"w-full max-w-[1600px] mx-auto px-4 sm:px-6 lg:px-8 space-y-6",children:[r.jsx(Ha,{activeTab:e,onSelectAnalytics:a}),r.jsx(Go,{})]})};export{Ni as ProgressTracker,Ni as default};
37//# sourceMappingURL=index-En1lWCiz.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.