1import{a as Q,d as q,e as K,r as i,j as t,a9 as m,B as f,T as g,aX as X,b7 as Z,d6 as J,aP as V,aY as W,aZ as ee,o as P,cC as R,C as N,cG as E,b2 as te,b3 as oe,b4 as L,b5 as a,b6 as se,b9 as ne}from"./vendor-DxY5zB1V.js";import{k as re,B as r}from"./index-DIVRgxhc.js";import{u as ae}from"./i18n-vendor-Dggl82tu.js";import{m as D}from"./framer-BYc2LoRk.js";(function(){try{var x=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};x.SENTRY_RELEASE={id:"528416b83098ea6885c0c42b0e44112098bbd26c"};var b=new x.Error().stack;b&&(x._sentryDebugIds=x._sentryDebugIds||{},x._sentryDebugIds[b]="57ac7ba6-b721-41e9-8078-59ce3c821568",x._sentryDebugIdIdentifier="sentry-dbid-57ac7ba6-b721-41e9-8078-59ce3c821568")}catch{}})();const s="'Baloo 2', sans-serif",xe=()=>{const{t:x,i18n:b}=ae(),l=(b.language||"").startsWith("kn"),$=Q(),p=q(),n=p.palette.mode==="dark",U=K(p.breakpoints.down("md")),[y,w]=i.useState([]),[S,_]=i.useState([]),[z,v]=i.useState(!1),[F,A]=i.useState(null),[u,G]=i.useState(""),[j,M]=i.useState(1),[k,Y]=i.useState(1),[H,O]=i.useState(0),d=n?r.yellow:r.yellowLight,c=n?"rgba(245,168,0,0.15)":"rgba(17,24,39,0.12)",T=n?"linear-gradient(160deg, #1C1010 0%, #130B0B 100%)":p.palette.background.paper,C=p.palette.text.primary;return i.useEffect(()=>{v(!0),A(null),re(j,50).then(e=>{var h,B,I;const o=Array.isArray((h=e==null?void 0:e.data)==null?void 0:h.data)?e.data.data:[];(B=e==null?void 0:e.data)!=null&&B.totalPages&&Y(e.data.totalPages),(I=e==null?void 0:e.data)!=null&&I.total&&O(e.data.total),_(o),w(o)}).catch(e=>{var o,h;return A(((h=(o=e==null?void 0:e.response)==null?void 0:o.data)==null?void 0:h.message)||(e==null?void 0:e.message)||"Failed to load aspirants")}).finally(()=>v(!1))},[j]),i.useEffect(()=>{if(!u.trim()){w(S);return}const e=u.toLowerCase();w(S.filter(o=>(o.name||"").toLowerCase().includes(e)||(o.party||"").toLowerCase().includes(e)||(o.electionName||"").toLowerCase().includes(e)||(o.constituencyName||"").toLowerCase().includes(e)))},[S,u]),t.jsxs(m,{spacing:3,sx:{fontFamily:s},children:[t.jsx(D.div,{initial:{opacity:0,y:-12},animate:{opacity:1,y:0},transition:{duration:.4},children:t.jsxs(m,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{sm:"center"},spacing:1.5,children:[t.jsxs(f,{children:[t.jsx(g,{sx:{fontFamily:s,fontWeight:800,fontSize:{xs:"1.4rem",md:"1.8rem"},color:C},children:l?"ನà³à²à²¦à²¾à²¯à²¿à²¤ à²à²à²¾à²à²à³à²·à²¿à²à²³à³":"Registered Aspirants"}),t.jsxs(g,{variant:"body2",color:"text.secondary",sx:{fontFamily:s,mt:.3},children:[l?"à²à²à³à²à³":"Total"," â ",H||y.length]})]}),t.jsx(X,{size:"small",value:u,onChange:e=>G(e.target.value),placeholder:l?"ಹà³à²¸à²°à³, ಪà²à³à²· ಹà³à²¡à³à²à²¿...":"Search by name, party, election...",InputProps:{startAdornment:t.jsx(Z,{position:"start",children:t.jsx(J,{fontSize:"small"})})},sx:{minWidth:{xs:"100%",sm:280},"& .MuiOutlinedInput-root":{borderRadius:2}}})]})}),z?t.jsx(f,{sx:{display:"flex",justifyContent:"center",py:10},children:t.jsx(V,{})}):F?t.jsx(g,{color:"error",sx:{textAlign:"center",py:4},children:F}):y.length===0?t.jsx(g,{sx:{textAlign:"center",py:6,color:"text.secondary",fontFamily:s},children:l?"à²à²à²¾à²à²à³à²·à²¿à²à²³à³ à²à²à²¡à³à²¬à²à²¦à²¿à²²à³à²²":"No aspirants found"}):U?t.jsx(m,{spacing:1.5,children:y.map((e,o)=>t.jsx(D.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:o*.03},children:t.jsx(W,{onClick:()=>e.id&&$(`/guest/aspirants/${e.id}/view`),sx:{borderRadius:"12px",border:`1px solid ${c}`,background:T,cursor:"pointer",overflow:"hidden",boxShadow:n?"0 8px 24px rgba(0,0,0,0.4)":"0 4px 14px rgba(17,24,39,0.06)",transition:"transform 0.22s ease, box-shadow 0.22s ease",position:"relative","&::before":{content:'""',position:"absolute",left:0,top:0,bottom:0,width:"4px",background:`linear-gradient(180deg, ${r.red} 0%, ${r.yellow} 55%, ${r.brown} 100%)`},"&:hover":{transform:"translateY(-2px)",boxShadow:n?"0 14px 36px rgba(0,0,0,0.6)":"0 10px 28px rgba(17,24,39,0.12)",borderColor:n?"rgba(245,168,0,0.35)":"rgba(245,168,0,0.4)"}},children:t.jsx(ee,{sx:{p:1.5,pl:2.5},children:t.jsxs(m,{direction:"row",spacing:1.5,alignItems:"center",children:[t.jsx(f,{sx:{p:"2px",borderRadius:"50%",flexShrink:0,background:`conic-gradient(${r.red} 0deg 90deg, ${r.yellow} 90deg 180deg, ${r.red} 180deg 270deg, ${r.yellow} 270deg 360deg)`},children:t.jsx(P,{src:e.selfieUrl||void 0,alt:e.name||"",sx:{width:46,height:46,bgcolor:n?"#1C1010":"#fff",color:d,fontWeight:700,border:`2px solid ${n?"#1C1010":"#fff"}`},children:!e.selfieUrl&&(e.name?e.name.charAt(0).toUpperCase():t.jsx(R,{fontSize:"small"}))})}),t.jsxs(f,{sx:{flex:1,minWidth:0},children:[t.jsx(g,{sx:{fontWeight:800,fontFamily:s,fontSize:"0.95rem",color:C},children:e.name||""}),t.jsx(m,{direction:"row",spacing:.6,flexWrap:"wrap",sx:{mt:.4},children:t.jsx(N,{label:e.party||"Independent",size:"small",sx:{fontSize:"0.68rem",height:18,fontFamily:s,bgcolor:"rgba(245,168,0,0.12)",color:d,border:"1px solid rgba(245,168,0,0.25)"}})}),t.jsxs(g,{variant:"caption",color:"text.secondary",sx:{fontFamily:s,display:"block",mt:.3,lineHeight:1.3},children:[e.electionName||"",e.constituencyName?` · ${e.constituencyName}`:""]})]}),t.jsx(E,{sx:{color:"text.disabled",fontSize:"1.2rem",flexShrink:0}})]})})})},e.id??o))}):t.jsx(W,{sx:{borderRadius:"14px",border:`1px solid ${c}`,background:T,overflow:"hidden",boxShadow:n?"0 12px 40px rgba(0,0,0,0.45)":"0 8px 24px rgba(17,24,39,0.07)"},children:t.jsxs(te,{children:[t.jsx(oe,{children:t.jsxs(L,{sx:{bgcolor:n?"rgba(245,168,0,0.06)":"rgba(245,168,0,0.04)"},children:[t.jsx(a,{sx:{fontWeight:800,fontFamily:s,fontSize:"0.85rem",color:d,borderBottom:`1px solid ${c}`},children:"#"}),t.jsx(a,{sx:{fontWeight:800,fontFamily:s,fontSize:"0.85rem",color:d,borderBottom:`1px solid ${c}`},children:l?"ಹà³à²¸à²°à³":"Name"}),t.jsx(a,{sx:{fontWeight:800,fontFamily:s,fontSize:"0.85rem",color:d,borderBottom:`1px solid ${c}`},children:l?"ಪà²à³à²·":"Party"}),t.jsx(a,{sx:{fontWeight:800,fontFamily:s,fontSize:"0.85rem",color:d,borderBottom:`1px solid ${c}`},children:l?"à²à³à²¨à²¾à²µà²£à³":"Election"}),t.jsx(a,{sx:{fontWeight:800,fontFamily:s,fontSize:"0.85rem",color:d,borderBottom:`1px solid ${c}`},children:l?"à²à³à²·à³à²¤à³à²°":"Constituency"}),t.jsx(a,{sx:{borderBottom:`1px solid ${c}`}})]})}),t.jsx(se,{children:y.map((e,o)=>t.jsxs(L,{onClick:()=>e.id&&$(`/guest/aspirants/${e.id}/view`),sx:{cursor:"pointer",borderBottom:`1px solid ${c}`,"&:hover":{bgcolor:n?"rgba(245,168,0,0.05)":"rgba(245,168,0,0.03)"},"&:last-child td":{border:0}},children:[t.jsx(a,{sx:{color:"text.secondary",fontFamily:s,fontSize:"0.82rem"},children:(j-1)*50+o+1}),t.jsx(a,{children:t.jsxs(m,{direction:"row",alignItems:"center",spacing:1.5,children:[t.jsx(f,{sx:{p:"2px",borderRadius:"50%",background:`conic-gradient(${r.red} 0deg 90deg, ${r.yellow} 90deg 180deg, ${r.red} 180deg 270deg, ${r.yellow} 270deg 360deg)`},children:t.jsx(P,{src:e.selfieUrl||void 0,alt:e.name||"",sx:{width:34,he
1ight:34,bgcolor:n?"#1C1010":"#fff",color:d,fontWeight:700,border:`2px solid ${n?"#1C1010":"#fff"}`,fontSize:"0.85rem"},children:!e.selfieUrl&&(e.name?e.name.charAt(0).toUpperCase():t.jsx(R,{sx:{fontSize:"1rem"}}))})}),t.jsx(g,{sx:{fontFamily:s,fontWeight:700,fontSize:"0.9rem",color:C},children:e.name||""})]})}),t.jsx(a,{sx:{fontFamily:s,fontSize:"0.88rem"},children:t.jsx(N,{label:e.party||"Independent",size:"small",sx:{fontSize:"0.68rem",height:20,fontFamily:s,bgcolor:"rgba(245,168,0,0.1)",color:d,border:"1px solid rgba(245,168,0,0.22)"}})}),t.jsx(a,{sx:{fontFamily:s,fontSize:"0.88rem",color:"text.secondary"},children:e.electionName||""}),t.jsx(a,{sx:{fontFamily:s,fontSize:"0.88rem",color:"text.secondary"},children:e.constituencyName||""}),t.jsx(a,{sx:{width:32,p:.5},children:t.jsx(E,{sx:{color:"text.disabled",fontSize:"1.1rem"}})})]},e.id??o))})]})}),!z&&k>1&&t.jsx(f,{sx:{display:"flex",justifyContent:"center",mt:1},children:t.jsx(ne,{count:k,page:j,onChange:(e,o)=>{M(o),window.scrollTo({top:0,behavior:"smooth"})},color:"primary",shape:"rounded"})})]})};export{xe as default};
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.