"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5036],{60551:(e,t,o)=>{o.d(t,{$N:()=>le,AM:()=>Ae,AUTH_EVENTS:()=>Ie,AX:()=>de,CE:()=>l,D2:()=>C,DB:()=>r,DR:()=>X,Dd:()=>pe,Dm:()=>he,E0:()=>w,EJ:()=>re,FF:()=>ue,Gg:()=>$,HI:()=>Ee,HZ:()=>Oe,IH:()=>Se,Il:()=>g,Jd:()=>c,Jl:()=>oe,Jx:()=>s,L4:()=>Z,LOGINTYPE:()=>ve,Lo:()=>ie,Lv:()=>ye,MB:()=>u,MJ:()=>q,Nf:()=>F,Q2:()=>R,Qj:()=>Q,SV:()=>Y,Sx:()=>z,TB:()=>_e,U:()=>N,VU:()=>_,Wv:()=>G,Xe:()=>te,YH:()=>J,Z0:()=>me,ZU:()=>P,__:()=>Le,_j:()=>W,aA:()=>n,bU:()=>H,cY:()=>a,cf:()=>ce,dP:()=>ge,eA:()=>m,ek:()=>we,ex:()=>p,f5:()=>E,gH:()=>A,i3:()=>x,iL:()=>Re,j1:()=>O,jF:()=>d,j_:()=>j,k5:()=>f,l4:()=>U,n0:()=>K,n4:()=>y,nB:()=>I,oS:()=>Te,qI:()=>k,qL:()=>fe,tI:()=>se,tT:()=>v,uG:()=>i,up:()=>M,vK:()=>D,w9:()=>V,w_:()=>S,wf:()=>ae,wk:()=>B,xj:()=>T,y:()=>ne,yL:()=>b,yV:()=>Pe,yW:()=>L,ym:()=>ee,zb:()=>Ce,zp:()=>h});const r="Login or Signup",n="OTP Verification",i="Verify Account",a="Help us Know You Better",s="+91",l="Mobile Number",c="Email Id",d="Enter Name",u="Invalid phone number",g="Invalid email id",p="Must be atleast 3 letters, alphabets only",E="Continue With Google",f="Use Mobile Number",w="Use Email ID",h="Enter OTP received on",S="By continuing, I agree to Nykaa’s",_=45,O="USER_REG",A={BACKSPACE:"Backspace",DELETE:"Delete",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",SPACEBAR:" "},m="Password",C="Proceed",I="Get OTP",v="Create a new account",L="SMS",R="Whatsapp",T="Resend OTP",y="login_skip_click",P={GMAIL:"Gmail",GOOGLE:"Google",EMAIL:"Email",FACEBOOK:"Facebook"},N="Tried getting the current url from storage but could not",$="Error setting MOB_NO in localstorage",U="Error getting MOB_NO from localstorage",G="Error setting auto fill flag (Atf) in localstorage",D="Error getting auto fill flag (Atf) from localstorage",b="Error deleting auto fill flag (Atf) from local storage",k="Error setting registration flag (USER_REG) in local storage",H="Error getting registration flag (USER_REG) from local storage",M="Error deleting registration flag (USER_REG) from local storage",B=38,W=40,K=13,x="on",F="in",V=1e3,Z=6,j="/terms-conditions",z={password:"Enter your Nykaa password to proceed",welcomeScreen:"Get started & grab best offers on top brands!",linkedEmail:"This mobile is not registered with us. However we found the following email(s) associated with this mobile",profileScreen:"A step closer to shopping with exciting offers"},J="Mobile OTP",Y="Email OTP",X="Or login with",q="OTP",Q="PASSWORD",ee="customerId",te="error in Login with OTP Captcha",oe="error in Login with Password Captcha",re="error in Login with OTP",ne="error in register with OTP",ie="error in Send OTP Captcha",ae="error in Check Existance Captcha",se=3,le=1020,ce="CURRENT_URL",de="REFERRAL_CODES",ue="M_NO",ge="Atf",pe={login:"login",signup:"signUp"},Ee="Hi",fe="Welcome",we="Start shopping your favourite products from all top brands",he="Account verified! Welcome to one stop shop for your favourite beauty needs.",Se="welcome back! Let’s shop some of your favourites",_e="Login with Password",Oe="Having Trouble?",Ae="Skip",me="PREV",Ce="NEXT",Ie={WELCOME_SCREEN:"welcomeScreen",NUDGE_SCREEN:"nudgeScreen",WELCOME_SCREEN_LOAD_LOCATION:"welcomeScreenLoadLocation",REGISTRATION_GET_OTP:"registrationGetOtp",PASSWORD_TO_OTP_SWITCH:"passwordToOtpSwitch",OTP_TO_PASSWORD_SWITCH:"otpToPasswordSwitch",RESEND_OTP_CLICKED:"resendOtpClicked",BACK_ARROW_CLICKED:"backArrowClicked",LOGIN_SIGNUP_START:"login_signup_start",LOGIN_PROCEED_CLICKED:"login_proceed_clicked",LOGIN_SUCCESS:"LOGIN_SUCCESS",SIGNUP_SUCCESS:"SIGNUP_SUCCESS"},ve={PHONE_EMAIL:"phone_email",EMAIL:"email",PHONE:"phone",TRUECALLER:"trueCaller",FACEBOOK:"facebook",GOOGLE:"google"},Le={SEND_OTP:"sendOtp",REGISTER:"register",LOGIN:"login",CHECK_EXISTENCE:"checkExistence"},Re="mobileEntered",Te="emailEntered",ye="Error reading web otp",Pe="Reading OTP for you..."},58329:(e,t,o)=>{o.d(t,{NO:()=>l,zJ:()=>c,cF:()=>d});var r=o(63365),n=o(470),i=o(60551);const a=()=>"undefined"==typeof window;var s=o(17325);const l=(e,t)=>{const o=(()=>{if(!a()){const{protocol:e}=window.location;return/(proSignUp)/gi.test(window.location.search)?`${e}//${window.location.host}/proSignUp`:`${e}//${window.location.host}${r.zs}`}return""})(),s=e,l=r.AE;let c=(e=>{if(e)return encodeURIComponent(e);const t=a?"":window.location.href;return encodeURIComponent(t)})((()=>{try{const e=localStorage.getItem(i.cf);if(e)return e}catch(e){n.k.error(e,i.U)}return window.location.origin})());const d=decodeURIComponent(c);if(t&&c&&0===d.indexOf("http")){const e=new URL(d);c=`${e.pathname}${e.search}&mand=1`}return encodeURI(`${r.B8}?response_type=code&redirect_uri=${o}&client_id=${s}&scope=${l}&access_type=offline&approval_prompt=force&state=${c}`)},c=e=>{let{dispatch:t,positionOfInterest:o,stepData:r,authResponseData:n}=e;t({type:s.Z.PUSH,payload:{positionOfInterest:o,stepData:r,authResponseData:n}})},d=e=>{let{dispatch:t,positionOfInterest:o,stepData:r,authResponseData:n}=e;t({type:s.Z.REPLACE,payload:{positionOfInterest:o,stepData:r,authResponseData:n}})}},55036:(e,t,o)=>{o.d(t,{Ov:()=>z,fU:()=>k,Rp:()=>L,hC:()=>R,kI:()=>T,ap:()=>F,gD:()=>G,M1:()=>b,CY:()=>W,p3:()=>B,lK:()=>K,sf:()=>H,I_:()=>M,dX:()=>x,ng:()=>V,ue:()=>D,GF:()=>P,TB:()=>y,rR:()=>N,V1:()=>j,QG:()=>m,xT:()=>U,qc:()=>C,us:()=>A,Ey:()=>v,r1:()=>$,Kv:()=>_,S8:()=>I,c8:()=>Z,GU:()=>O});var r=o(27483),n=o(470);const i="shareEarn/registerEvent",a="shareEarn/registerEventSuccess",s=e=>t=>(t({type:i}),(e=>{return t=void 0,o=void 0,a=function*(){const{referralCodes:t,registerEvent:o}=e,i={domain:"nykaa",eventType:o,referralCodes:t};try{const{data:e}=yield(0,r.Su)("/gateway-api/share_earn/v1/event","post",i),{response:t}=e;return t||new Error('"response" not found in api -> data')}catch(e){const t="Error in register event api";throw n.k.error(e,t),e}},new((i=void 0)||(i=Promise))((function(e,r){function n(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof i?o:new i((function(e){e(o)}))).then(n,s)}l((a=a.apply(t,o||[])).next())}));var t,o,i,a})(e).then((e=>(t({type:a,payload:e}),e))).catch((e=>{throw t({type:a}),e})));var l=o(81109),c=o(76863),d=o(1107),u=o(60551),g=o(63365),p=o(58329);const E=/^[6-9]([0-9]{9})$/,f=/^([A-Za-z0-9_\-.])+@([A-Za-z0-9_\-.])+\.([A-Za-z]{2,4})$/,w=/^\d{10}$/,h=/^[a-zA-Z\s]{3,}$/,{LOGIN_SIGNUP_START:S}=u.AUTH_EVENTS,_=e=>E.test(`${e}`),O=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;var o;return(null===(o=e.replace(/[^0-9]+/g,""))||void 0===o?void 0:o.slice(0,t))||""},A=e=>f.test(`${e}`),m=e=>!!(e&&`${e}`.length>0),C=e=>Array.isArray(e)&&!!e.length,I=e=>"string"==typeof e&&!!e.length,v=e=>"function"==typeof e,L=e=>{const t=Math.floor(e/3600),o=Math.floor(e%3600/60),r=Math.floor(e%3600%60),n=o<10?`0${o}`:`${o}`,i=r<10?`0${r}`:`${r}`;let a=`${i}`;return t>0?a=`${t<10?`0${t}`:`${t}`}:${n}:${i}`:o>0&&(a=`${n}:${i}`),`${a} Sec`},R=e=>{let t="@",o="";const r=e.split("@");return C(r)&&r[1]&&(o=r[1].toLowerCase(),t=o.slice(0,1).toLowerCase()),{firstCharAfterAt:t,substrAfterAt:o,splitEmail:r}},T=e=>{const{emailSuggestionList:t,firstCharAfterAt:o,substrAfterAt:r}=e,n=Object.keys(t),i=Object.values(t),a=n.findIndex((e=>e===o));return{foundIndex:a,updatedList:a>-1?i[a].filter((e=>e.includes(r))):[]}},y=e=>e===u.wk,P=e=>e===u._j,N=e=>e===u.n0,$=e=>h.test(`${e}`),U=e=>w.test(`${e}`),G=e=>{var t,o;let r=0;if(null===(t=null==e?void 0:e.location)||void 0===t?void 0:t.state){const{authStep:t}=null===(o=e.location)||void 0===o?void 0:o.state;t&&(r=t)}return r},D=e=>{const t=G(e),o=window.location.pathname+window.location.search;e.push(o,{authStep:t+1})},b=(e,t)=>{if(!Array.isArray(e))return{};const o=e;let r=G(t);const n=(null==o?void 0:o.length)-1;return!r||r<0?r=0:r>n&&(r=n),o[r]||{}},k=e=>e===g.API_PARAM_KEYS.mobileNumber,H=e=>`${u.DR} ${(e=>k(e)?u.YH:u.SV)(e)}`,M=()=>{const e=window.localStorage.getItem(u.cf);window.location.href=e||"/"},B=e=>e?`${u.qL} ${e}! ${u.ek}`:u.Dm,W=e=>`${e||u.HI}, ${u.IH}`,K=e=>{const t=((null==e?void 0:e.trim())||"").split(/\s+/);return{firstName:t[0],lastName:t.length>1?t[1]:""}},x=(e,t)=>{var o;const r=null===(o=window.localStorage)||void 0===o?void 0:o.getItem(u.AX);if(r){const o=JSON.parse(r);s({referralCodes:o,registerEvent:e})(t).then((e=>{var t;e.status===c.B.SUCCESS&&(null===(t=window.localStorage)||void 0===t||t.removeItem(u.AX))}))}},F=()=>{let e="homePage",t=null;try{return"undefined"!=typeof window&&window.localStorage&&(t=window.localStorage.getItem(u.cf),(null==t?void 0:t.includes("/p/"))?e="productDetailPage":(null==t?void 0:t.includes("/search/"))||(null==t?void 0:t.includes("/c/"))?e="productListingPage":(null==t?void 0:t.includes("/reviews/"))?e="productReviewPage":(null==t?void 0:t.includes("/widgetName/"))&&(e="recoWidget")),e||""}catch(e){return""}},V=()=>{const{googleAppId:e=""}={googleAppId:"140085884300-na7igu81hs7fcufr0bganb40su9ab4pq.apps.googleusercontent.com"},t=(0,p.NO)(e,!1);localStorage.setItem("googleLoginAttempt","true"),(0,d.AB)(S,{loginType:u.LOGINTYPE.GOOGLE,login_page:F()}),(0,l.TH)(),(0,l.HJ)(2),t&&(window.location.href=t)},Z=()=>{try{const e=`${window.location.pathname}${window.location.search}`;localStorage.setItem(u.cf,e)}catch(e){n.k.error(e,"Error: authCurrentUrlInStorage")}window.location.href="/auth"},j=e=>{const t=u.ZU.EMAIL.toLowerCase();if(!e||"string"!=typeof e)return!1;const o=null==e?void 0:e.toLowerCase().trim();return!(!o||o!==t)},z=()=>"OTPCredential"in window}}]);