1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[437],{18125:(e,t,n)=>{async function r(){if(!window.Razorpay)return new Promise((e,t)=>{let n=document.createElement("script");n.src="https://checkout.razorpay.com/v1/checkout.js",n.onload=e,n.onerror=()=>t(Error("Failed to load Razorpay SDK")),document.body.appendChild(n)})}async function s({subscriptionId:e,orderId:t,name:n="Skillioz",description:a="",prefillEmail:i="",prefillContact:l="",onSuccess:o,onDismiss:c}={}){await r();let d="rzp_live_Sx1CwMTXXQ6m6W";if(!d)throw Error("Razorpay authentication key is missing. Add NEXT_PUBLIC_RAZORPAY_KEY_ID to .env.local");let u={key:d,name:n,description:a,prefill:{email:i,contact:l},handler:o||function(e){},modal:{ondismiss:c||function(){}}};if(e)u.subscription_id=e;else if(t)u.order_id=t;else throw Error("Razorpay: either subscriptionId or orderId must be provided.");new window.Razorpay(u).open()}n.d(t,{Vf:()=>s})},20437:(e,t,n)=>{n.d(t,{A:()=>b});var r=n(95155),s=n(12115),a=n(33210),i=n(12651),l=n(13545),o=n(52530),c=n(86787),d=n(83109),u=n(73321),x=n(66865),m=n(64272),f=n(59547),p=n(18125),h=n(12214);let b=()=>{let e=(0,h.Vr)(h.dK.CANDIDATE_GAMIFIED_FLOW),{isOpen:t,handleModalClose:n,handleCheckout:b,loading:w,countdown:y,offerData:g,isReactivatedOffer:v}=(()=>{let e="cv:pricing-back-attempt",t=(0,h.Vr)(h.dK.CANDIDATE_GAMIFIED_FLOW);(0,u.usePathname)();let n=(0,d.getCookie)("token"),r=!!n,a=(0,u.useSearchParams)().get("payment"),{activePlan:i,planActive:l,userData:o,getUser:b,razorPriceId:w}=(0,x.L)(),y=(0,m.d4)(e=>e.subscription),[g,v]=(0,s.useState)(!1),[k,I]=(0,s.useState)(!1),[N,j]=(0,s.useState)(null),[E,S]=(0,s.useState)(!1),[_,A]=(0,s.useState)(!1),[L,C]=(0,s.useState)(600),[D,R]=(0,s.useState)(!1),F=(0,s.useRef)(null),z=(0,s.useRef)(!1),M=(0,s.useRef)(!1),P=(0,s.useRef)(!1),T=(0,s.useRef)(!1),V=(0,s.useRef)(0),K=e=>"number"!=typeof e?.remainingSeconds?null:Math.max(0,Math.floor(e.remainingSeconds)),O=e=>{let t=Number(e?.occurrence??e?.occurence??e?.occurance);return!Number.isFinite(t)||t<0?0:Math.floor(t)},U=({navigateBackAfterClose:e=!1}={})=>!T.current&&!g&&(T.current=!0,V.current=O(N),R(e),v(!0),!0),W="cvpremium"===a,Y=l||i&&("active"===i.subscriptionStatus||"grace"===i.subscriptionStatus)||y&&y.plan_type&&"free"!==y.plan_type,B=o?.claimedOffer===!0,X=e=>e?.data?.data||e?.data||e||null;(0,s.useEffect)(()=>{if(!r||Y||!W||B){I(!1),j(null),S(!1);return}(async()=>{try{let e=await (0,f.CJ)("/job-seeker/cv-subscription/exit-intent-offer",n),t=X(e),r=t?.eligible===!0;j(t),I(r)}catch(e){c.A.error(t("exitIntent.logs.eligibilityError"),e),j(null),I(!1)}})()},[r,Y,W,B,n]),(0,s.useEffect)(()=>{if(!k||g)return;let e=e=>{e.clientY<=10&&U()};return document.addEventListener("mouseleave",e),()=>{document.removeEventListener("mouseleave",e)}},[k,g]),(0,s.useEffect)(()=>{if(!W){M.current=!1;return}k&&!M.current&&(window.history.pushState({exitIntentGuard:!0},""),M.current=!0);let t=()=>{if(!k){z.current=!0,window.history.back();return}g||U({navigateBackAfterClose:!0})||((e=1)=>{R(!1),z.current=!0,window.history.go(-e)})(2)},n=()=>{t()},r=()=>{if(z.current){z.current=!1;return}k&&(window.history.pushState({exitIntentGuard:!0},""),t())};return window.addEventListener(e,n),window.addEventListener("popstate",r),()=>{window.removeEventListener(e,n),window.removeEventListener("popstate",r)}},[W,k,g]),(0,s.useEffect)(()=>{if(!g){V.current=0,S(!1);return}S(V.current>=1)},[g]),(0,s.useEffect)(()=>{if(!g){P.current=!1,S(!1),F.current&&clearInterval(F.current);return}if(!P.current){P.current=!0;let e=K(N),r=O(N),s="number"==typeof e&&e>0,a=async()=>{try{let e=await (0,f.AX)("/job-seeker/cv-subscription/exit-intent-offer/open",{},n),t=X(e);if(t){j(t);let e=K(t);C(e??600)}}catch(e){c.A.error(t("exitIntent.logs.openError"),e)}};0!==r&&s?s&&C(e):a()}let e=K(N),r=null!==e&&e>0?e:600;if(C(r),r<=0){F.current&&clearInterval(F.current);return}return F.current=setInterval(()=>{C(e=>e<=1?(clearInterval(F.current),0):e-1)},1e3),()=>{F.current&&clearInterval(F.current)}},[g,N?.remainingSeconds,N?.active,n]),(0,s.useEffect)(()=>{g&&!(L>0)&&(v(!1),S(!1),R(!1),F.current&&(clearInterval(F.current),F.current=null))},[g,L]);let $=async e=>{if(!w)return;let r="week"===e?w?.CV_BUILDER_WEEKLY?.INR?.id:w?.CV_BUILDER_MONTHLY?.INR?.id;if(r){A(!0);try{let s=await (0,f.AX)("/job-seeker/cv-subscription/razorpay-checkout",{planId:r,product:"premium"},n);if(s?.status===201){R(!1),v(!1);let{subscriptionId:n}=s.data.data;await (0,p.Vf)({subscriptionId:n,name:t("exitIntent.checkout.builderName"),description:"week"===e?t("exitIntent.checkout.weekDescription"):t("exitIntent.checkout.monthDescription"),prefillEmail:o?.email||"",prefillContact:o?.phone||"",onSuccess:async e=>{try{await b()}catch(e){c.A.error(t("exitIntent.logs.checkoutError"),e)}window.location.replace("/cv/payment-success?product=premium-home")},onDismiss:()=>{}})}else throw Error("Checkout session creation failed")}catch(e){c.A.error(t("exitIntent.logs.checkoutError"),e)}finally{A(!1)}}};
1return{isOpen:g,setIsOpen:v,handleModalClose:(e=!1)=>{v(!1),S(!1);let t=D?2:+!!e;0!==t&&(R(!1),z.current=!0,window.history.go(-t))},isEligible:k,offerData:N,isReactivatedOffer:E,countdown:L,formatTime:()=>{let e=Math.floor(L/60),t=L%60;return`${String(e).padStart(2,"0")}:${String(t).padStart(2,"0")}`},handleCheckout:$,loading:_}})(),[k,I]=(0,s.useState)("monthly"),N=(0,s.useRef)(null);if((0,s.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t&&n()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[t,n]),(0,s.useEffect)(()=>{if(!t)return;let e=N.current?.querySelectorAll('button, [href], input, select, textarea, [tabindex="0"]');if(!e||0===e.length)return;let n=e[0],r=e[e.length-1],s=e=>{"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(r.focus(),e.preventDefault()):document.activeElement===r&&(n.focus(),e.preventDefault()))};return window.addEventListener("keydown",s),n.focus(),()=>{window.removeEventListener("keydown",s)}},[t]),!t)return null;let j=String(Math.floor(y/60)).padStart(2,"0"),E=String(y%60).padStart(2,"0"),S=g?.pricing?.CV_BUILDER_WEEKLY,_=g?.pricing?.CV_BUILDER_MONTHLY,A=g?.discountPct||20,L=S?.currency||_?.currency||"INR",C=(e,t)=>{if("number"!=typeof e)return null;let n=e/100,r=Number.isInteger(n)?n.toString():n.toFixed(2);return`${"INR"===t?"â¹":"USD"===t?"$":"EUR"===t?"â¬":t}${r}`},D=C(S?.standardAmount,L)||e("exitIntent.plans.weeklyStandardFallback"),R=C(S?.firstPaymentAmount,L)||e("exitIntent.plans.weeklyFirstPaymentFallback"),F=C(_?.standardAmount,L)||e("exitIntent.plans.monthlyStandardFallback"),z=C(_?.firstPaymentAmount,L)||e("exitIntent.plans.monthlyFirstPaymentFallback"),M=e(v?"exitIntent.header.introTitle.reactivated":"exitIntent.header.introTitle.default");return(0,r.jsxs)("div",{className:"fixed inset-0 z-[9999] bg-black/75 backdrop-blur-[3px] overflow-y-auto overscroll-contain",style:{WebkitOverflowScrolling:"touch"},children:[(0,r.jsx)("div",{className:"absolute inset-0 cursor-default",onClick:n}),(0,r.jsx)("div",{className:"relative min-h-full flex items-start sm:items-center justify-center px-2 py-2 sm:p-4",children:(0,r.jsxs)("div",{ref:N,className:"relative w-[95vw] sm:w-[500px] max-w-[500px] max-h-none sm:max-h-[calc(100vh-32px)] bg-[#191b2b] rounded-[18px] overflow-hidden sm:overflow-y-auto sm:overscroll-contain shadow-[0_24px_50px_rgba(0,0,0,0.45)] transform transition-all duration-300 scale-100 flex flex-col z-[10000] sm:[scrollbar-width:none] sm:[&::-webkit-scrollbar]:hidden",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",children:[(0,r.jsxs)("div",{className:"relative bg-[#eb4025] w-full pt-5 pb-5 px-5 text-center flex flex-col items-center justify-center",children:[(0,r.jsx)("div",{className:"absolute top-6 left-10 w-3 h-3 bg-yellow-400 rotate-12 rounded-sm opacity-90"}),(0,r.jsx)("div",{className:"absolute top-16 left-6 w-2.5 h-2.5 bg-[#00e5ff] rotate-45 opacity-80"}),(0,r.jsx)("div",{className:"absolute top-26 left-14 w-2 h-2 bg-pink-500 rounded-full opacity-90"}),(0,r.jsx)("div",{className:"absolute top-8 right-12 w-3.5 h-3.5 bg-emerald-400 rotate-12 rounded-sm opacity-95"}),(0,r.jsx)("div",{className:"absolute top-20 right-6 w-2.5 h-2.5 bg-purple-500 -rotate-12 opacity-85"}),(0,r.jsx)("div",{className:"absolute top-28 right-16 w-2 h-2 bg-orange-300 rotate-45 rounded-sm opacity-90"}),(0,r.jsx)("button",{onClick:()=>n(),className:"absolute right-3.5 top-3.5 text-white/80 hover:text-white transition-colors","aria-label":e("exitIntent.header.closeAriaLabel"),children:(0,r.jsx)(a.A,{size:21,strokeWidth:2.2})}),(0,r.jsx)("span",{className:"text-white/85 text-[0.625rem] sm:text-xs font-extrabold tracking-[0.2em] uppercase mb-1.5",children:e("exitIntent.header.preTitle")}),(0,r.jsxs)("h2",{id:"modal-title",className:"text-5xl sm:text-6xl font-extrabold text-white tracking-tight leading-[0.9] my-1",children:[A,"% ",e("exitIntent.header.discountSuffix")]}),(0,r.jsx)("p",{className:"text-white text-base sm:text-lg font-semibold tracking-normal mb-4 leading-none",children:e("exitIntent.header.firstSubscription")}),(0,r.jsx)("div",{className:"border border-white/25 bg-white/12 text-white rounded-full px-6 py-1.5 text-sm sm:text-base font-semibold tracking-normal leading-none",children:M})]}),(0,r.jsxs)("div",{className:"p-5 flex flex-col items-center",children:[(0,r.jsxs)("div",{className:"bg-[#242637] border border-[#35384a] p-4 rounded-[12px] text-left flex items-start gap-2.5 w-full mb-3.5",children:[v?(0,r.jsx)(i.A,{className:"flex-shrink-0 mt-0.5",size:15,style:{color:"#09DE22"}}):(0,r.jsx)(l.A,{className:"text-amber-500 flex-shrink-0 mt-0.5",size:15}),(0,r.jsx)("p",{className:"text-[#d9dcee] text-xs md:text-[13px] leading-[1.5]",children:v?e("exitIntent.urgency.reactivated"):(0,r.jsxs)(r.Fragment,{children:[e("exitIntent.urgency.defaultPrefix")," ",(0,r.jsx)("strong",{className:"text-white font-bold",children:e("exitIntent.urgency.defaultHighlight")}),". ",e("exitIntent.urgency.defaultSuffix")]})})]}),v&&(0,r.jsxs)("div",{className:"bg-[#173828] border border-[#2f7c5c] p-3 rounded-[12px] text-left flex items-center gap-2.5 w-full mb-5",children:[(0,r.jsx)(o.A,{className:"flex-shrink-0 -scale-x-100",size:15,style:{color:"#09DE22"}}),(0,r.jsx)("p",{className:"text-sm md:text-[15px] font-semibold",style:{color:"#09DE22"},children:e("exitIntent.urgency.badge")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4 mb-5",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)("div",{className:"bg-[#2a2d42] border border-[#3a3e58] rounded-[12px] w-[64px] h-[52px] flex items-center justify-center text-[32px] font-extrabold text-white shadow-inner",children:j}),(0,r.jsx)("span",{className:"text-[10px] text-[#7f839b] font-semibold tracking-[0.18em] uppercase mt-1.5",children:e("exitIntent.countdown.minutes")})]}),(0,r.jsx)("span",{className:"text-[32px] font-bold text-[#aeb3c8] -mt-4",children:":"}),(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)("div",{className:"bg-[#2a2d42] border border-[#3a3e58] rounded-[12px] w-[64px] h-[52px] flex items-center justify-center text-[32px] font-extrabold text-white shadow-inner",children:E}),(0,r.jsx)("span",{className:"text-[10px] text-[#7f839b] font-semibold tracking-[0.18em] uppercase mt-1.5",children:e("exitIntent.countdown.seconds")})]})]}),(0,r.jsx)("div",{className:"flex items-center justify-center gap-3 text-sm font-medium mb-5 leading-none",children:"weekly"===k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"line-through text-[#6f748a]",children:[D,e("exitIntent.plans.weeklySuffix")]}),(0,r.jsx)("span",{className:"text-[#7a7f96]",children:"â"}),(0,r.jsxs)("span",{className:"text-4xl font-black text-white cursor-default",children:[R,e("exitIntent.plans.weeklySuffix")]}),(0,r.jsx)("span",{className:"text-[#71758c] px-1",children:e("exitIntent.plans.connector")}
1),(0,r.jsxs)("button",{onClick:()=>I("monthly"),className:"text-[#7f859e] hover:text-white transition-colors focus:outline-none underline decoration-blue-500 underline-offset-4",children:[z,e("exitIntent.plans.monthlySuffix")]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"line-through text-[#6f748a]",children:[F,e("exitIntent.plans.monthlySuffix")]}),(0,r.jsx)("span",{className:"text-[#7a7f96]",children:"â"}),(0,r.jsxs)("span",{className:"text-4xl font-black text-white cursor-default",children:[z,e("exitIntent.plans.monthlySuffix")]}),(0,r.jsx)("span",{className:"text-[#71758c] px-1",children:e("exitIntent.plans.connector")}),(0,r.jsxs)("button",{onClick:()=>I("weekly"),className:"text-[#7f859e] hover:text-white transition-colors focus:outline-none underline decoration-dotted decoration-blue-500 underline-offset-4",children:[R,e("exitIntent.plans.weeklySuffix")]})]})}),(0,r.jsx)("button",{onClick:()=>{b("weekly"===k?"week":"month")},disabled:w,className:"w-full h-[52px] px-6 rounded-[16px] bg-white hover:bg-slate-100 text-black font-extrabold text-base tracking-[-0.01em] shadow-[0_8px_20px_rgba(255,255,255,0.18)] active:scale-[0.98] transition-all disabled:opacity-50 disabled:cursor-not-allowed mb-4",children:e(w?"exitIntent.actions.ctaLoading":"exitIntent.actions.ctaDefault")}),(0,r.jsx)("button",{onClick:n,className:"text-[#a2a6bb] hover:text-slate-200 text-xs font-medium tracking-normal transition-colors hover:underline mb-4 cursor-pointer",children:e("exitIntent.actions.closeLater")}),(0,r.jsxs)("p",{className:"text-[10px] md:text-xs text-[#8d91a5] leading-[1.35] text-center w-[80%]",children:[e("exitIntent.disclaimer.prefix")," ",(0,r.jsx)("span",{className:"font-semibold",style:{color:"#09DE22"},children:e("exitIntent.disclaimer.upiHighlight")}),". ",e("exitIntent.disclaimer.suffix")]})]})]})})]})}}}]);
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.