PageSourceSearch

https://doorstephub.com/_next/static/chunks/9024.628a591e0b9b2768.js

js doorstephub.com collected 2026-10-02 06:22:20 UTC 10,929 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9024],{59024:function(e,t,a){a.r(t),a.d(t,{PartnerLoginModal:function(){return x}});var n=a(57437),r=a(2265),i=a(99376),s=a(34924),o=a(57586),l=a(32489),d=a(14438),c=a(66067),u=a(69695),m=a(54587),p=a(80225);function x(e){let{isOpen:t,onClose:a}=e,x=(0,i.useRouter)(),[b,h]=(0,r.useState)("mobile"),[f,g]=(0,r.useState)(""),[y,v]=(0,r.useState)(""),[w,j]=(0,r.useState)({mobile:!1,otp:!1}),[N,k]=(0,r.useState)({mobile:"",otp:""}),[S,C]=(0,r.useState)(()=>(0,p.nm)("whatsapp")),[E,P]=(0,r.useState)("");(0,r.useEffect)(()=>{if(!t){h("mobile"),g(""),v(""),k({mobile:"",otp:""}),P("");return}let e=!0;return(async()=>{let t=await (0,p.fN)();e&&C(t)})(),()=>{e=!1}},[t]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&(null==a||a())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,a]);let D=async e=>{if(e.preventDefault(),k(e=>({...e,mobile:""})),!/^[6-9]\d{9}$/.test(f)){k(e=>({...e,mobile:S.invalidMessage}));return}j(e=>({...e,mobile:!0}));try{let e=await (0,m.ZO)(f),t=(0,p.CP)((null==e?void 0:e.gateway)||S.gateway),a=(0,p.nm)(t);C(a);let n=(null==e?void 0:e.details)||(null==e?void 0:e.message)||a.otpSentMessage;P(n),v(""),d.toast.success(n),h("otp")}catch(e){k(t=>({...t,mobile:e.message||"Failed to send OTP"}))}finally{j(e=>({...e,mobile:!1}))}},M=async e=>{if(e.preventDefault(),k(e=>({...e,otp:""})),!/^\d{4,6}$/.test(y)){k(e=>({...e,otp:"Enter a valid OTP."}));return}j(e=>({...e,otp:!0}));try{let{token:e,userId:t}=await (0,m.b4)(f,y);if(!e)throw Error("No auth token received.");let n=null;try{n=await (0,m.DP)(e,t)}catch(e){n=null}if((0,m.Gy)({token:e,userId:t,phone:f,profile:n}),null==a||a(),n){d.toast.success("Partner login successful"),localStorage.getItem("pending_subscription_plan")?(localStorage.removeItem("pending_subscription_plan"),x.push("/partner/dashboard/subscription")):x.push("/partner/dashboard");return}d.toast.info("Complete your partner registration to continue"),x.push("/service-partner#join-partner"),window.dispatchEvent(new CustomEvent("partner:continue-registration"))}catch(e){k(t=>({...t,otp:e.message||"OTP verification failed"}))}finally{j(e=>({...e,otp:!1}))}};return t?(0,n.jsxs)("div",{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",children:[(0,n.jsx)(s.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},onClick:a,className:"absolute inset-0 bg-black/60 backdrop-blur-sm","aria-hidden":"true"}),(0,n.jsxs)(s.E.div,{initial:{scale:.95,opacity:0,y:16},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:16},onClick:e=>e.stopPropagation(),className:"relative z-10 w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-2xl border border-[#037166]/20 bg-white shadow-2xl",children:[(0,n.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between border-b border-gray-100 bg-white px-5 py-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-lg font-bold text-gray-900",children:"Partner Login"}),(0,n.jsx)("p",{className:"text-xs text-gray-500",children:"Verify your mobile to access the partner dashboard"})]}),(0,n.jsx)("button",{type:"button",onClick:a,"aria-label":"Close",className:"p-2 rounded-lg border border-gray-200 text-gray-500 hover:bg-gray-50",children:(0,n.jsx)(l.Z,{className:"w-4 h-4"})})]}),(0,n.jsx)("div",{className:"p-5 sm:p-6",children:(0,n.jsx)(o.M,{mode:"wait",children:"mobile"===b?(0,n.jsx)(s.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},children:(0,n.jsx)(c.U,{phone:f,onPhoneChange:g,onSubmit:D,loading:w.mobile,error:N.mobile,otpCopy:S})},"mobile"):(0,n.jsx)(s.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:(0,n.jsx)(u.C,{phone:f,otp:y,onOtpChange:v,onSubmit:M,onBack:()=>h("mobile"),loading:w.otp,error:N.otp,otpCopy:S,otpMessage:E})},"otp")})})]})]}):null}},66067:function(e,t,a){a.d(t,{U:function(){return l}});var n=a(57437),r=a(72517),i=a(13041),s=a(82718),o=a(80225);function l(e){let{phone:t,onPhoneChange:a,onSubmit:l,loading:d,error:c,otpCopy:u}=e,m=u||(0,o.nm)("whatsapp"),p=/^[6-9]\d{9}$/.test(t);return(0,n.jsxs)("form",{className:"w-full max-w-md mx-auto py-2",onSubmit:l,children:[(0,n.jsxs)("div",{className:"text-center mb-8",children:[(0,n.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full bg-[#037166]/10 text-[#037166] text-[11px] font-bold uppercase tracking-wider mb-5",children:"Step 1 of 4 \xb7 Phone Verification"}),(0,n.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-[#037166] to-[#04a99d] flex items-center justify-center mx-auto mb-5 shadow-lg shadow-[#037166]/20",children:(0,n.jsx)(i.Z,{className:"w-8 h-8 text-white"})}),(0,n.jsxs)("h2",{className:"text-2xl sm:text-[1.65rem] font-extrabold text-[#0f172a] tracking-tight",children:["Enter ",m.label]}),(0,n.jsx)("p",{className:"text-sm text-[#64748b] mt-2 leading-relaxed max-w-xs mx-auto",children:m.loginSubtitle})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-[#e2e8f0] bg-[#f8fafc] p-5 sm:p-6 space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{htmlFor:"partner-phone",className:"block text-xs font-bold uppercase tracking-wide text-[#475569] mb-2",children:m.label}),(0,n.jsxs)("div",{className:"relative flex items-center",children:[(0,n.jsx)("span",{className:"absolute left-4 text-[#037166] text-sm font-bold select-none",children:"+91"}),(0,n.jsx)("input",{id:"partner-phone",type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:m.placeholder,value:t,onChange:e=>{a(e.target.value.replace(/\D/g,"").slice(0,10))},maxLength:10,autoFocus:!0,className:"w-full h-12 py-3.5 pl-14 pr-4 rounded-xl border border-[#cbd5e1] bg-white text-[#0f172a] text-lg font-semibold tracking-widest placeholder:text-gray-300 placeholder:font-normal placeholder:tracking-normal focus:border-[#04a99d] focus:ring-2 focus:ring-[#04a99d]/25 outline-none transition-all"})]}),(0,n.jsx)("p",{className:"text-[11px] text-[#94a3b8] mt-2",children:"Indian number \xb7 10 digits starting with 6–9"})]}),c&&(0,n.jsx)("p",{className:"text-sm text-red-600 font-medium bg-red-50 border border-red-100 rounded-lg px-3 py-2",children:c}),(0,n.jsx)(r.z,{type:"submit",disabled:d||!p,className:"h-12 w-full rounded-xl bg-gradient-to-r from-[#037166] to-[#04a99d] text-white font-bold hover:opacity-95 shadow-md shadow-[#037166]/25 disabled:opacity-50",children:d?"Sending OTP...":(0,n.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,n.jsx)(s.Z,{className:"w-4 h-4"}),m.sendButton]})})]})]})}},69695:function(e,t,a){a.d(t,{C:function(){return l}});var n=a(57437),r=a(2265),i=a(72517),s=a(84286),o=a(80225);function l(e){let{phone:t,otp:a,onOtpChange:l,onSubmit:d,onBack:c,loading:u,error:m,otpCopy:p,otpMessage:x}=e,b=p||(0,o.nm)("whatsapp"),h=(0,r.useRef)([]),f=a.split("").concat(Array(6-a.length).fill("")),g=(e,t)=>{let n=t.replace(/\D/g,"").slice(-1),r=a.split("");if(n){var i;r[e]=n,l(r.join("").slice(0,6)),e<5&&(null===(i=h.current[e+1])||void 0===i||i.focus())}},y=(e,t)=>{if("Backspace"===t.key){let t=a.split("");if(!f[e]&&e>0){var n;t[e-1]="",l(t.join("")),null===(n=h.current[e-1])||void 0===n||n.focus()}else t[e]="",l(t.join(""))}};return(0,n.jsxs)("form",{className:"w-full max-w-md mx-auto py-2",onSubmit:d,children:[(0,n.jsxs)("div",{className:"text-center mb-8",children:[(0,n.jsx)("span",{className:"inline-flex items-center px-3 py-1 rounded-full bg-[#037166]/10 text-[#037166] text-[11px] font-bold uppercase tracking-wider mb-5",children:"Step 2 of 4 \xb7 Security Check"}),(0,n.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-[#037166] to-[#04a99d] flex items-center justify-center mx-auto mb-5 shadow-lg shadow-[#037166]/20",children:(0,n.jsx)(s.Z,{className:"w-8 h-8 text-white"})}),(0,n.jsx)("h2",{className:"text-2xl sm:text-[1.65rem] font-extrabold text-[#0f172a] tracking-tight",children:b.otpScreenTitle}),(0,n.jsx)("p",{className:"text-sm text-[#64748b] mt-2 leading-relaxed",children:x||b.otpScreenSubtitle(t)}),(0,n.jsx)("button",{type:"button",onClick:c,className:"text-xs text-[#037166] font-semibold mt-2 hover:underline",children:b.changeNumberLabel})]}),(0,n.jsxs)("div",{className:"rounded-2xl border border-[#e2e8f0] bg-[#f8fafc] p-5 sm:p-6 space-y-5",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs font-bold uppercase tracking-wide text-[#475569] mb-3 text-center",children:"6-Digit OTP"}),(0,n.jsx)("div",{className:"flex justify-center gap-2 sm:gap-3",onPaste:e=>{var t;e.preventDefault();let a=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6);l(a),null===(t=h.current[Math.min(a.length,5)])||void 0===t||t.focus()},children:f.map((e,t)=>(0,n.jsx)("input",{ref:e=>h.current[t]=e,type:"text",inputMode:"numeric",maxLength:1,value:e,onCh
1ange:e=>g(t,e.target.value),onKeyDown:e=>y(t,e),className:"w-10 h-12 sm:w-11 sm:h-12 text-center font-bold text-xl rounded-xl border border-[#cbd5e1] bg-white text-[#0f172a] focus:border-[#04a99d] focus:ring-2 focus:ring-[#04a99d]/25 outline-none transition-all",autoFocus:0===t&&0===a.length},t))})]}),m&&(0,n.jsx)("p",{className:"text-sm text-red-600 font-medium bg-red-50 border border-red-100 rounded-lg px-3 py-2 text-center",children:m}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,n.jsx)(i.z,{type:"button",variant:"outline",onClick:c,disabled:u,className:"h-12 rounded-xl border-[#cbd5e1] bg-white text-[#334155] font-semibold hover:bg-[#f1f5f9]",children:"Back"}),(0,n.jsx)(i.z,{type:"submit",disabled:u||a.length<6,className:"h-12 rounded-xl bg-gradient-to-r from-[#037166] to-[#04a99d] text-white font-bold hover:opacity-95 shadow-md shadow-[#037166]/25 disabled:opacity-50",children:u?"Verifying...":"Verify OTP"})]})]})]})}},72517:function(e,t,a){a.d(t,{z:function(){return s}});var n=a(57437),r=a(2265),i=a(48320);let s=r.forwardRef((e,t)=>{let{className:a,variant:r,size:s,...o}=e;return(0,n.jsx)("button",{className:(0,i.cn)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50",{default:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",glass:"glass-button-premium text-white"}[r||"default"],{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8"}[s||"default"],a),ref:t,...o})});s.displayName="Button"},82718:function(e,t,a){a.d(t,{Z:function(){return n}});let n=(0,a(79205).Z)("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]])},48320:function(e,t,a){a.d(t,{cn:function(){return i}});var n=a(61994),r=a(53335);function i(){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))}}}]);

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.