PageSourceSearch

https://www.excelrs.dev/_next/static/chunks/app/competitions/%5Bslug%5D/page-a3c1d11447b19aed.js

js excelrs.dev collected 2026-10-02 01:54:55 UTC 29,221 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3515],{90674:function(e,t,a){Promise.resolve().then(a.t.bind(a,231,23)),Promise.resolve().then(a.bind(a,38830))},16463:function(e,t,a){"use strict";var n=a(71169);a.o(n,"useParams")&&a.d(t,{useParams:function(){return n.useParams}}),a.o(n,"usePathname")&&a.d(t,{usePathname:function(){return n.usePathname}}),a.o(n,"useRouter")&&a.d(t,{useRouter:function(){return n.useRouter}}),a.o(n,"useSearchParams")&&a.d(t,{useSearchParams:function(){return n.useSearchParams}})},38830:function(e,t,a){"use strict";a.d(t,{default:function(){return z}});var n=a(57437),r=a(58357),l=a(2265),o=a(16463),i=a(85016),s=a(29338),d=a(11240),c=a(48281),u=a(37151),m=a(21902),f=a(17583),x=a(52022),p=a(71510),h=a(48298),g=a(87385),b=a(40933),w=a(99687),y=a(49321),v=a(3274),j=a(89733),N=a(48185),k=a(54662),S=a(96450),I=a(77975),C=a(77440);let _=[{icon:(0,n.jsx)(i.Z,{className:"h-10 w-10 text-yellow-600"}),title:"Win Exciting Prizes",details:"Stand a chance to win cash rewards, certificates, and more.",funFact:"Did you know? Winning competitions boosts your resume!",iconBg:"bg-yellow-100"},{icon:(0,n.jsx)(s.Z,{className:"h-10 w-10 text-purple-600"}),title:"Showcase Your Skills",details:"Demonstrate your expertise and problem-solving abilities.",funFact:"Tip: Showcasing skills can double your job opportunities.",iconBg:"bg-purple-100"},{icon:(0,n.jsx)(d.Z,{className:"h-10 w-10 text-blue-600"}),title:"Network with Peers",details:"Connect with like-minded participants and industry experts.",funFact:"Networking is the #1 way to discover new opportunities!",iconBg:"bg-blue-100"},{icon:(0,n.jsx)(c.Z,{className:"h-10 w-10 text-green-600"}),title:"Earn Recognition",details:"Get recognized for your achievements and hard work.",funFact:"Recognition can lead to mentorship and career growth.",iconBg:"bg-green-100"},{icon:(0,n.jsx)(u.Z,{className:"h-10 w-10 text-orange-500"}),title:"Boost Creativity",details:"Tackle real-world challenges and think outside the box.",funFact:"Creative thinkers are 3x more likely to be promoted!",iconBg:"bg-orange-100"},{icon:(0,n.jsx)(m.Z,{className:"h-10 w-10 text-pink-600"}),title:"Sharpen Focus",details:"Compete under pressure and improve your concentration.",funFact:"Focused individuals complete tasks 40% faster.",iconBg:"bg-pink-100"},{icon:(0,n.jsx)(f.Z,{className:"h-10 w-10 text-indigo-600"}),title:"Get Feedback",details:"Receive valuable feedback from judges and peers.",funFact:"Feedback accelerates learning and improvement.",iconBg:"bg-indigo-100"},{icon:(0,n.jsx)(x.Z,{className:"h-10 w-10 text-red-600"}),title:"Build Confidence",details:"Gain confidence by competing and presenting your work.",funFact:"Confident individuals are more likely to lead teams.",iconBg:"bg-red-100"}];function z(e){let{competition:t}=e,a=(0,o.useRouter)(),{openLoginModal:d}=(0,C.N)(),{user:c,isHydrated:u}=(0,S.useAuthStore)(),[m,f]=(0,l.useState)(null),[x,z]=(0,l.useState)(""),[E,P]=(0,l.useState)(!1),[Z,A]=(0,l.useState)(""),[O,L]=(0,l.useState)(!1),[R,T]=(0,l.useState)(!1),F=e=>{let t=window.location.href,a="".concat(e.title,": ").concat(e.details,"\n").concat(t);navigator.share?(navigator.share({title:e.title,text:a,url:t}),z("Shared!")):(navigator.clipboard.writeText(a),z("Copied to clipboard!")),setTimeout(()=>z(""),1500)},B=async()=>{P(!0),A("");try{if(!(null==c?void 0:c._id)){localStorage.setItem("redirectAfterLogin",window.location.pathname),d(),P(!1);return}await (0,I.kG)(c._id,{competitionId:t._id}),L(!0),A("Enrollment successful!")}catch(t){var e;(null==t?void 0:null===(e=t.message)||void 0===e?void 0:e.toLowerCase().includes("already enrolled"))?L(!0):A(t.message||"Enrollment failed")}P(!1)};(0,l.useEffect)(()=>{(async()=>{if(!c||!(null==t?void 0:t._id))return T(!0);try{let e=await fetch("".concat(r.CT,"/enrolls?userId=").concat(c._id,"&type=competition"));if(!e.ok)return T(!0);let a=await e.json();Array.isArray(null==a?void 0:a.enrollments)&&a.enrollments.find(e=>e.competitionId===t._id)&&L(!0)}catch(e){}T(!0)})()},[c,null==t?void 0:t._id]),(0,l.useEffect)(()=>{u&&c&&localStorage.getItem("redirectAfterLogin")===window.location.pathname&&!O&&(P(!0),(0,I.kG)(c._id,{
1competitionId:t._id}).then(()=>L(!0)).catch(()=>{}).finally(()=>{P(!1),localStorage.removeItem("redirectAfterLogin")}))},[c,u,O,null==t?void 0:t._id]);let D=new Date(t.registration_last_date)<new Date;return console.log("Competition Over:",t),(0,n.jsxs)("div",{className:"bg-gradient-to-br from-blue-100 to-purple-100 min-h-screen flex flex-col gap-10 pb-10",children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("div",{className:"absolute top-4 right-4 z-30 flex items-center gap-3",children:[(0,n.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-gradient-to-r from-purple-600 to-blue-600 text-white font-semibold shadow-lg hover:from-purple-700 hover:to-blue-700 transition",onClick:()=>a.push("/"),type:"button",children:[(0,n.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Dashboard"]}),(0,n.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-semibold shadow-lg hover:from-blue-700 hover:to-purple-700 transition",onClick:()=>F(_[0]),type:"button",children:[(0,n.jsx)(p.Z,{className:"w-5 h-5"})," Share"]})]}),x&&(0,n.jsx)("span",{className:"absolute top-16 right-4 z-40 bg-white text-blue-700 px-3 py-1 rounded shadow animate-fade-in font-semibold text-sm",children:x}),(0,n.jsxs)("div",{className:"w-full h-[350px] md:h-[450px] flex items-center justify-center overflow-hidden",children:[(null==t?void 0:t.image)&&(0,n.jsx)("img",{src:t.image,alt:t.title,className:"object-cover object-center z-0 w-full h-full"}),(0,n.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-black/60 via-blue-900/40 to-purple-900/60 z-10"}),(null==t?void 0:t.description)&&(0,n.jsx)("div",{className:"absolute z-30 bottom-4 right-4 max-w-xs md:max-w-xl w-[95vw] md:w-auto animate-fade-in-up delay-100 flex justify-end items-end pointer-events-none",children:(0,n.jsxs)("div",{className:"flex items-start gap-2 md:gap-3 bg-white/30 backdrop-blur-md rounded-xl px-4 py-3 md:px-8 md:py-6 shadow-2xl border border-white/40 pointer-events-auto",style:{minWidth:"180px"},children:[(0,n.jsx)(i.Z,{className:"w-6 h-6 md:w-8 md:h-8 text-blue-500 mt-1"}),(0,n.jsx)("p",{className:"text-sm md:text-lg lg:text-2xl text-gray-900 font-semibold italic text-left leading-relaxed line-clamp-4",children:t.description})]})})]})]}),(0,n.jsx)("div",{className:"max-w-5xl mx-auto w-full px-4 animate-fade-in-up",children:(0,n.jsx)("h1",{className:"text-4xl md:text-5xl font-bold bg-gradient-to-r from-purple-600 to-blue-600 bg-clip-text text-transparent",children:t.title})}),(0,n.jsx)("section",{className:"max-w-5xl mx-auto w-full px-4 animate-fade-in-up",children:(0,n.jsxs)(N.Zb,{className:"bg-white/80 backdrop-blur-lg shadow-xl border-0",children:[D&&(0,n.jsx)("div",{className:"flex w-full mt-4 mb-2 justify-center md:justify-end",children:(0,n.jsxs)("div",{className:"flex items-center gap-2 md:gap-3 text-red-500 text-base md:text-lg font-bold  px-4 py-3 md:px-6 md:py-4 animate-fade-in-up w-full max-w-xs md:max-w-fit text-center",children:[(0,n.jsx)(h.Z,{className:"w-6 h-6 md:w-7 md:h-7 text-red-500"}),(0,n.jsx)("span",{className:"block w-full",children:"This competition has ended"})]})}),(0,n.jsx)(N.aY,{className:"p-10",children:(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-10 items-center justify-center",children:[(0,n.jsxs)("div",{className:"space-y-6 w-full mx-auto max-w-md ",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4 text-lg md:text-xl",children:[(0,n.jsx)(g.Z,{className:"h-7 w-7 text-blue-600 bg-blue-100 rounded-full p-1"}),(0,n.jsxs)("span",{className:"font-bold text-gray-700",children:["Starts On : ",new Date(t.start_date).toLocaleDateString()]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4 text-lg md:text-xl",children:[(0,n.jsx)(b.Z,{className:"h-7 w-7 text-purple-600 bg-purple-100 rounded-full p-1"}),(0,n.jsxs)("span",{className:"font-bold text-gray-700",children:["Starts At : ",t.start_time]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsx)("div",{className:"w-7 h-7 flex items-center rounded-full p-1 bg-yellow-100",children:(0,n.jsx)(s.Z,{className:"h-7 w-7 text-yellow-600 fill-yellow-600"})}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("span",{className:"text-gray-700 font-bold",children:"Certificate Score"}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-2xl font-bold text-yellow-600",children:t.score||100}),(0,n.jsx)("span",{className:"text-sm text-gray-500",children:"points on completion"})]})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 text-lg",children:[(0,n.jsx)(h.Z,{className:"h-7 w-7 text-red-500 rounded-full p-1 bg-red-100"}),(0,n.jsxs)("span",{className:" font-bold text-gray-700",children:["Registration Closes On : ",new Date(t.registration_last_date).toLocaleDateString()]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4 text-lg md:text-xl",children:[(0,n.jsx)(w.Z,{className:"h-7 w-7 text-green-600 bg-green-100 rounded-full p-1"}),(0,n.jsxs)("span",{className:"font-bold text-gray-700",children:["Mode : ",t.mode]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4 text-lg md:text-xl",children:[(0,n.jsx)(y.Z,{className:"h-8 w-8 text-blue-600 bg-blue-100 rounded-full p-1"}),(0,n.jsxs)("span",{className:"font-bold text-gray-700",children:["Location : ",t.location]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-4 text-lg md:text-xl",children:[(0,n.jsx)(i.Z,{className:"h-7 w-7 text-pink-600 bg-pink-100 rounded-full p-1 "}),(0,n.jsxs)("span",{className:"font-bold text-gray-700",children:["Prize : ",t.prizeMoney]})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-8 justify-center items-center",children:[(0,n.jsxs)(j.z,{className:"w-full md:w-auto bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-700 hover:to-blue-700 text-xl font-bold shadow-lg py-4 px-8 flex items-center justify-center",size:"lg",onClick:B,disabled:D||E||O,children:[E?(0,n.jsx)(v.Z,{className:"animate-spin mr-2 h-5 w-5"}):null,D?"Competition Ended":O?"Enrolled":"Enroll Now"]}),Z&&(0,n.jsx)("span",{className:"text-green-600 font-semibold mt-2",children:Z}),(0,n.jsx)("span",{className:"text-base text-gray-400 mt-2",children:"Limited seats available!"})]})]})})]})}),(0,n.jsx)("section",{className:"max-w-5xl mx-auto w-full px-4 animate-fade-in-up",children:(0,n.jsx)(N.Zb,{className:"bg-white/90 backdrop-blur-lg shadow-xl border-0",children:(0,n.jsxs)(N.aY,{className:"p-10",children:[(0,n.jsx)("h2",{className:"text-3xl font-extrabold mb-6 text-gradient bg-gradient-to-r from-purple-600 to-blue-600 bg-clip-text text-transparent",children:"About this Competition"}),(0,n.jsx)("blockquote",{className:"border-l-4 border-blue-400 pl-4 italic text-gray-700 text-xl mb-3",children:t.description}),(0,n.jsx)("p",{className:"text-lg text-gray-500 mt-2",children:"Join this competition to test your knowledge, compete with peers, and win amazing rewards. Stay tuned for more details!"})]})})}),(0,n.jsx)("section",{className:"max-w-5xl mx-auto w-full px-4 animate-fade-in-up mt-8",children:(0,n.jsx)(N.Zb,{className:"bg-white/90 backdrop-blur-lg shadow-xl border-0",children:(0,n.jsxs)(N.aY,{className:"p-10",children:[(0,n.jsx)("h2",{className:"text-3xl font-extrabold mb-8 text-gradient bg-gradient-to-r from-purple-600 to-blue-600 bg-clip-text text-transparent",children:"Competition Benefits"}),(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-8",children:_.map((e,t)=>(0,n.jsxs)(k.Vq,{open:m===t,onOpenChange:e=>f(e?t:null),children:[(0,n.jsx)(k.hg,{asChild:!0,children:(0,n.jsxs)("div",{className:"flex flex-col items-center p-6 rounded-xl bg-gradient-to-br from-blue-100 to-purple-100 shadow hover:scale-105 transition-transform duration-200 cursor-pointer relative",children:[(0,n.jsx)("div",{className:"w-14 h-14 flex items-center justify-center rounded-full mb-2 shadow-lg ".concat(e.iconBg," animate-fade-in"),children:e.icon}),(0,n.jsx)("span",{className:"font-bold text-lg text-gray-700 text-center mt-2",children:e.title})]})}),(0,n.jsx)(k.cZ,{className:"bg-gradient-to-br from-white via-blue-50 to-purple-100 shadow-2xl border-0 max-w-xl rounded-2xl p-12 animate-fade-in",children:(0,n.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,n.jsx)("div",{className:"w-16 h-16 flex items-center justify-center rounded-full mb-4 shadow-xl ".concat(e.iconBg," animate-bounce"),children:e.icon}),(0,n.jsxs)(k.fK,{children:[(0,n.jsx)(k.$N,{className:"text-3xl font-extrabold mb-2 text-gradient bg-gradient-to-r from-purple-600 to-blue-600 bg-clip-text text-transparent",children:e.title}),(0,n.jsx)(k.Be,{className:"text-base text-gray-700 mb-4",children:e.details})]}),(0,n.jsx)("div",{className:"w-full h-px bg-gradient-to-r from-blue-200 via-purple-200 to-blue-200 my-2"}),(0,n.jsx)("div",{className:"bg-gradient-to-r from-blue-200 to-purple-200 rounded-lg px-4 py-2 mb-4 text-sm font-semibold text-blue-900 shadow animate-fade-in",children:e.funFact}),(0,n.jsxs)("button",{className:"flex items-center gap-2 px-5 py-2.5 rounded-lg bg-gradient-to-r from-blue-600 to-purple-600 text-white font-semibold hover:from-blue-700 hover:to-purple-700 transition mb-2 text-base shadow-lg mt-2",onClick:()=>F(e),type:"button",children:[(0,n.jsx)(p.Z,{className:"w-5 h-5"})," Share"]}),x&&(0,n.jsx)("span",{className:"text-green-600 text-sm mt-1 animate-fade-in font-medium",children:x})]})})]},t))})]})})})]})}},89733:function(e,t,a){"use strict";a.d(t,{z:function(){return d}});var n=a(57437),r=a(2265),l=a(71538),o=a(13027),i=a(49354);let s=(0,o.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 shadow hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white shadow-sm hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dar
1k:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 shadow-sm hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=r.forwardRef((e,t)=>{let{className:a,variant:r,size:o,asChild:d=!1,...c}=e,u=d?l.g7:"button";return(0,n.jsx)(u,{className:(0,i.cn)(s({variant:r,size:o,className:a})),ref:t,...c})});d.displayName="Button"},48185:function(e,t,a){"use strict";a.d(t,{Ol:function(){return i},Zb:function(){return o},aY:function(){return d},ll:function(){return s}});var n=a(57437),r=a(2265),l=a(49354);let o=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("rounded-xl border border-neutral-200 bg-white text-neutral-950 shadow dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",a),...r})});o.displayName="Card";let i=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",a),...r})});i.displayName="CardHeader";let s=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("font-semibold leading-none tracking-tight",a),...r})});s.displayName="CardTitle",r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("text-sm text-neutral-500 dark:text-neutral-400",a),...r})}).displayName="CardDescription";let d=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",a),...r})});d.displayName="CardContent",r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",a),...r})}).displayName="CardFooter"},54662:function(e,t,a){"use strict";a.d(t,{$N:function(){return p},Be:function(){return h},GG:function(){return u},Vq:function(){return s},cZ:function(){return f},fK:function(){return x},hg:function(){return d}});var n=a(57437),r=a(2265),l=a(30721),o=a(74697),i=a(49354);let s=l.fC,d=l.xz,c=l.h_,u=l.x8,m=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)(l.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...r})});m.displayName=l.aV.displayName;let f=r.forwardRef((e,t)=>{let{className:a,children:r,...s}=e;return(0,n.jsxs)(c,{children:[(0,n.jsx)(m,{}),(0,n.jsxs)(l.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",a),...s,children:[r,(0,n.jsxs)(l.x8,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[(0,n.jsx)(o.Z,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=l.VY.displayName;let x=e=>{let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};x.displayName="DialogHeader";let p=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)(l.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",a),...r})});p.displayName=l.Dx.displayName;let h=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,n.jsx)(l.dk,{ref:t,className:(0,i.cn)("text-sm text-neutral-500 dark:text-neutral-400",a),...r})});h.displayName=l.dk.displayName},58357:function(e,t,a){"use strict";a.d(t,{CT:function(){return n},bz:function(){return l},nL:function(){return r}});let n=(a(20357).env.NEXT_PUBLIC_CLOUD_API_URL||"https://excelrs-cloud-new-1069037816864.asia-south1.run.app").replace(/\/+$/,""),r="https://powr-api.lawazia.tech";function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=String(e||"").replace(/^\/+/,"");return t?"".concat(r,"/").concat(t):r}},77440:function(e,t,a){"use strict";a.d(t,{N:function(){return i},U:function(){return o}});var n=a(57437),r=a(2265);let l=(0,r.createContext)(void 0);function o(e){let{children:t}=e,[a,o]=(0,r.useState)(!1),[i,s]=(0,r.useState)(void 0),[d,c]=(0,r.useState)(void 0),u=e=>{c(null==e?void 0:e.redirectTo),o(!0)};return(0,r.useEffect)(()=>{let e=()=>{u()};return window.addEventListener("openLoginModal",e),()=>{window.removeEventListener("openLoginModal",e)}},[]),(0,n.jsx)(l.Provider,{value:{isOpen:a,openLoginModal:u,closeLoginModal:()=>{o(!1),s(void 0),c(void 0)},onLoginSuccess:i,setOnLoginSuccess:e=>{s(()=>e)},redirectTo:d},children:t})}function i(){let e=(0,r.useContext)(l);if(!e)throw Error("useLoginModal must be used within LoginModalProvider");return e}},49354:function(e,t,a){"use strict";a.d(t,{cn:function(){return l}});var n=a(44839),r=a(96164);function l(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.m6)((0,n.W)(t))}},77975:function(e,t,a){"use strict";a.d(t,{ZV:function(){return d},bp:function(){return m},kG:function(){return u},zy:function(){return c}});var n=a(58357),r=a(96450),l=a(89502);let o=n.CT,i=()=>{try{{let e=window.location.pathname+window.location.search;localStorage.setItem("redirectAfterLogin",e),localStorage.removeItem("auth-token"),localStorage.removeItem("token");try{let e=r.useAuthStore.getState();"function"==typeof(null==e?void 0:e.setToken)&&e.setToken(void 0)}catch(e){}window.location.href="/login"}}catch(e){}},s=e=>{let t=e;if(!t)try{t=t||localStorage.getItem("token")||localStorage.getItem("authToken")||localStorage.getItem("auth-token")||void 0}catch(e){}let a={"Content-Type":"application/json"};return t&&(a.Authorization="Bearer ".concat(t)),a},d=async(e,t)=>{let a=await fetch("".concat(o,"certificates"),{method:"POST",headers:s(void 0),body:JSON.stringify({userId:e,trainingId:t})});if(!a.ok){if(401===a.status)throw i(),Error("Unauthorized");if(409===a.status)return{alreadyExists:!0,...await a.json()};throw Error("Failed to create certificate")}return a.json()},c=async(e,t)=>{let a=await fetch("".concat(o,"/certificates"),{method:"POST",headers:s(r.useAuthStore.getState().token||void 0),body:JSON.stringify({userId:e,internshipId:t})});if(!a.ok){if(401===a.status)throw i(),Error("Unauthorized");if(409===a.status)return{alreadyExists:!0,...await a.json()};throw Error("Failed to create certificate for internship")}return a.json()},u=async(e,t,a)=>{let n={userId:e};t.trainingId&&(n.trainingId=t.trainingId),t.internshipId&&(n.internshipId=t.internshipId),t.competitionId&&(n.competitionId=t.competitionId),t.hackathonId&&(n.hackathonId=t.hackathonId),t.teamName&&(n.teamName=t.teamName),t.paymentId&&(n.paymentId=t.paymentId),t.batchId&&(n.batchId=t.batchId),t.razorpayPaymentId&&(n.razorpayPaymentId=t.razorpayPaymentId),t.razorpayOrderId&&(n.razorpayOrderId=t.razorpayOrderId),t.razorpaySignature&&(n.razorpaySignature=t.razorpaySignature),t.paymentStatus&&(n.paymentStatus=t.paymentStatus);let r=()=>fetch("".concat(o,"/enrolls"),{method:"POST",headers:s(a),body:JSON.stringify(n)}),d=await r();if(428===d.status){if(!await (0,l.AP)())throw Error(l.L$);d=await r()}if(!d.ok){if(409===d.status)return{alreadyEnrolled:!0,...await d.json().catch(()=>({}))};if(401===d.status){try{{let e={action:"enroll",options:{trainingId:n.trainingId,internshipId:n.internshipId,competitionId:n.competitionId,paymentId:n.paymentId}};localStorage.setItem("pendingEnroll",JSON.stringify(e))}}catch(e){}throw i(),Error("Unauthorized")}let e=await d.text().catch(()=>"");throw Error("Failed to enroll".concat(e?": ".concat(e):""))}return d.json()},m=async(e,t,a,n)=>{let r=await fetch("".concat(o,"/enrolls/transaction"),{method:"PATCH",headers:s(a),body:JSON.stringify({trainingId:e,transactionId:t,...n?{batchId:n}:{}})}),l=await r.json().catch(()=>({}));
1if(!r.ok){if(401===r.status)throw i(),Error("Unauthorized");throw Error((null==l?void 0:l.message)||"Failed to submit reference")}return l}},96450:function(e,t,a){"use strict";a.r(t),a.d(t,{useAuthStore:function(){return d}});var n=a(10903),r=a(89291),l=a(44785),o=a(34080),i=a(76934);let s=a(20357).env.NEXT_PUBLIC_PROJECT_ID||"678db178f70e70f6056b2c3d",d=(0,n.U)()((0,r.tJ)((e,t)=>({user:null,token:null,refreshToken:null,isHydrated:!1,setAuthData:function(t,a){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e({user:t,token:a,refreshToken:n,isHydrated:!0}),l.Z.set("auth-token",a,{expires:7,secure:!0,sameSite:"lax"}),localStorage.setItem("auth-token",a),localStorage.setItem("accessToken",a),localStorage.setItem("token",a),localStorage.setItem("user",JSON.stringify(t)),n?localStorage.setItem("refreshToken",n):localStorage.removeItem("refreshToken")},clearAuthData:()=>{(0,i.notifyImpersonationExit)({projectId:s}).catch(()=>{}),(0,o.P4)();let a=t();if(null!==a.user||null!==a.token||null!==a.refreshToken){e({user:null,token:null,refreshToken:null,isHydrated:!0});try{localStorage.removeItem("auth-store")}catch(e){console.warn("Failed to clear localStorage:",e)}}}}),{name:"auth-store",storage:(0,r.FL)(()=>localStorage),skipHydration:!0,onRehydrateStorage:()=>e=>{e&&(e.isHydrated=!0)}}));try{d.persist.rehydrate()}catch(e){console.warn("Failed to rehydrate auth store:",e)}},89502:function(e,t,a){"use strict";a.d(t,{AP:function(){return m},L$:function(){return l},Ne:function(){return d},Q:function(){return o},UB:function(){return u},aM:function(){return c},in:function(){return s},jK:function(){return i},r5:function(){return f}});var n=a(10903),r=a(58357);let l="Add your college and graduation year to enroll.";function o(e){return!!(String((null==e?void 0:e.collegeId)||(null==e?void 0:e.collegeName)||"").trim()&&String((null==e?void 0:e.graduationYear)||"").trim())}function i(e){return[null==e?void 0:e.trainings,null==e?void 0:e.internships,null==e?void 0:e.competitions,null==e?void 0:e.hackathons].some(e=>Array.isArray(e)&&e.length>0)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date().getFullYear();return Array.from({length:6},(t,a)=>String(e+a))}function d(){return localStorage.getItem("auth-token")||localStorage.getItem("token")||null}async function c(e){let t=await fetch("".concat(r.CT,"/users/me"),{headers:{Authorization:"Bearer ".concat(e)}});return t.ok?t.json().catch(()=>null):null}let u=(0,n.U)((e,t)=>({open:!1,resolve:null,finish:a=>{let{resolve:n}=t();e({open:!1,resolve:null}),null==n||n(a)}}));function m(){let{resolve:e}=u.getState();return null==e||e(!1),new Promise(e=>{u.setState({open:!0,resolve:e})})}async function f(e){let t=e||d();if(!t)return!0;let a=await c(t).catch(()=>null);return!!(!a||o(a))||m()}},71538:function(e,t,a){"use strict";a.d(t,{Z8:function(){return c},g7:function(){return u}});var n,r=a(2265),l=a(1584),o=a(57437),i=Symbol.for("react.lazy"),s=(n||(n=a.t(r,2)))[" use ".trim().toString()];function d(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===i&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}function c(e){let t=function(e){let t=r.forwardRef((e,t)=>{let{children:a,...n}=e;if(d(a)&&"function"==typeof s&&(a=s(a._payload)),r.isValidElement(a)){var o;let e,i;let s=(o=a,(e=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?o.ref:(e=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?o.props.ref:o.props.ref||o.ref),d=function(e,t){let a={...t};for(let n in t){let r=e[n],l=t[n];/^on[A-Z]/.test(n)?r&&l?a[n]=(...e)=>{let t=l(...e);return r(...e),t}:r&&(a[n]=r):"style"===n?a[n]={...r,...l}:"className"===n&&(a[n]=[r,l].filter(Boolean).join(" "))}return{...e,...a}}(n,a.props);return a.type!==r.Fragment&&(d.ref=t?(0,l.F)(t,s):s),r.cloneElement(a,d)}return r.Children.count(a)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),a=r.forwardRef((e,a)=>{let{children:n,...l}=e;d(n)&&"function"==typeof s&&(n=s(n._payload));let i=r.Children.toArray(n),c=i.find(f);if(c){let e=c.props.children,n=i.map(t=>t!==c?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,o.jsx)(t,{...l,ref:a,children:r.isValidElement(e)?r.cloneElement(e,void 0,n):null})}return(0,o.jsx)(t,{...l,ref:a,children:n})});return a.displayName=`${e}.Slot`,a}var u=c("Slot"),m=Symbol("radix.slottable");function f(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===m}},13027:function(e,t,a){"use strict";a.d(t,{j:function(){return o}});var n=a(44839);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=n.W,o=(e,t)=>a=>{var n;if((null==t?void 0:t.variants)==null)return l(e,null==a?void 0:a.class,null==a?void 0:a.className);let{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(e=>{let t=null==a?void 0:a[e],n=null==i?void 0:i[e];if(null===t)return null;let l=r(t)||r(n);return o[e][l]}),d=a&&Object.entries(a).reduce((e,t)=>
1{let[a,n]=t;return void 0===n||(e[a]=n),e},{});return l(e,s,null==t?void 0:null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:a,className:n,...r}=t;return Object.entries(r).every(e=>{let[t,a]=e;return Array.isArray(a)?a.includes({...i,...d}[t]):({...i,...d})[t]===a})?[...e,a,n]:e},[]),null==a?void 0:a.class,null==a?void 0:a.className)}}},function(e){e.O(0,[9715,7971,7279,231,251,5171,9465,4868,721,2971,7023,1744],function(){return e(e.s=90674)}),_N_E=e.O()}]);

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.