(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{58698:function(e,t,n){"use strict";n.r(t);var r=n(67294),i=n(25617),o=n(46776),s=n(84017),l=n(53664),a=n(57263),c=n(85893);t.default=function(e){var t=e.onOTPSent,n=e.onError,u=(0,r.useState)(),d=u[0],p=u[1],h=(0,r.useState)(!1),f=h[0],m=h[1],v=(0,r.useState)(!1),b=v[0],y=v[1],_=(0,i.v9)(function(e){return e.global}),g=_.phone,x=void 0===g?"":g,w=_.otpPhone,S=void 0===w?"":w,j=(0,i.I0)();return(0,r.useEffect)(function(){S?p(S):x&&p(x)},[x,S]),(0,c.jsxs)("div",{className:"d-flex flex-column",children:[(0,c.jsx)(a.Z,{country:"IN",error:b,international:!1,label:!1,onChange:function(e){y(!1),p(e.target.value)},placeholder:"Enter 10 Digit Mobile Number",value:d}),(0,c.jsx)("button",{className:"btn btn-primary w-100 mt-4",disabled:!d||b||f,onClick:function(){if(m(!0),!(0,s.yf)(d||"")){y("Invalid mobile number"),m(!1);return}(0,o.OA)(d).then(function(){m(!1),j({type:l.F9,data:{otpPhone:d}}),t&&t(d)}).catch(function(e){m(!1),y(e.message),n&&n(e)})},type:"button",children:f?"Requesting...":"Request OTP"})]})}},89204:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return j}});var r=n(59499),i=n(50029),o=n(90116),s=n(53967),l=n.n(s),a=n(64687),c=n.n(a),u=n(67294),d=n(46776),p=n(80954),h=n.n(p),f=n(25617),m=n(13872),v=n(53664),b=n(87046),y=n(83279),_=n(1852),g=[".text-ellipsis-1{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:1){.text-ellipsis-1{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;}}",".text-ellipsis-2{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:2){.text-ellipsis-2{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}}",".text-ellipsis-3{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:3){.text-ellipsis-3{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;}}",".text-ellipsis-4{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:4){.text-ellipsis-4{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;}}",".text-ellipsis-5{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}","@supports(-webkit-line-clamp:5){.text-ellipsis-5{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;}}",".otp-field,.otp-field[readonly]{width:45px;height:45px;}",".otp-field:focus,.otp-field[readonly]:focus{box-shadow:none;border-color:#2e81f7;}",".otp-field::-webkit-outer-spin-button,.otp-field::-webkit-inner-spin-button,.otp-field[readonly]::-webkit-outer-spin-button,.otp-field[readonly]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}",".otp-field::-webkit-input-placeholder,.otp-field[readonly]::-webkit-input-placeholder{color:#b3b3b3;}",".otp-field::-moz-placeholder,.otp-field[readonly]::-moz-placeholder{color:#b3b3b3;}",".otp-field:-ms-input-placeholder,.otp-field[readonly]:-ms-input-placeholder{color:#b3b3b3;}",".otp-field::placeholder,.otp-field[readonly]::placeholder{color:#b3b3b3;}",".otp-field[type=number],.otp-field[readonly][type=number]{-moz-appearance:textfield;}"];g.__hash="391900837";var x=n(85893);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t input")).forEach(function(e){return e.value=""}),(0,d.OA)(z).then(function(){O(20),F(!1)}).catch(function(e){F(e.message)})},1e3)},[z]),D=function(e){var t=e.clipboardData.getData("text")||"",n=document.querySelectorAll("#otp > input");if(!/[0-9]{4}/.test(t)){e.preventDefault();return}var r=t.split("");r.forEach(function(e,t){n[t].value=e||void 0}),F(!1),4===r.length?n[r.length-1].focus():(n[r.length].focus(),e.preventDefault())},I=function(){N(!0);var e,t=parseInt((0,o.Z)(document.querySelectorAll("#otp > input")).map(function(e){return(null==e?void 0:e.value)||""}).join(""),10);if(!/^\d{4}$/.test(t))return N(!1),F("Invalid OTP Entered");var n=null;return(0,d.gl)({mobile:z,otp:t}).then((e=(0,i.Z)(c().mark(function e(t){var r,i,o,l,u,d,p;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F(!1),i=(r=t.data.validateOtp).isNew,o=r.accessToken,l=r.refreshToken,n=u=r.user,T({type:v.F9,data:S(S({},i?{signupToken:o}:{phone:z}),{},{otpPhone:void 0})}),i||(p=(d=new b.Z).get("leadData")||{},d.set("leadData",S(S({},p),{},{phone:u.mobile})),T((0,m.YR)({token:{accessToken:o,refreshToken:l}})),T({type:v.RT,data:u}),window.document.dispatchEvent(new CustomEvent("prepp-login-successful",{detail:a}))),s&&s(S({isNew:i,accessToken:o},u));case 7:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})).catch(function(e){F(e.message),r&&r()}).finally(function(){N(!1),n&&((0,y.$l)({Name:n.name,Email:n.email,Phone:n.mobile}),(0,y.L9)("Web Session Started",{mobile:n.mobile,email:n.email,name:n.name,previous_screen_name:p,CT_source:C?"mobile":"desktop",location:window.location.pathname}))})},q=function(e,t){if(e.preventDefault(),e.ctrlKey||e.metaKey)return!1;var n=document.querySelectorAll("#otp > input"),r=e.key;if(["Backspace","Enter","ArrowRight","ArrowLeft"].includes(r)||/[0-9]/.test(r))switch(F(!1),r){case"Backspace":var i=n[t].value;i&&""!==i?n[t].value="":0!==t&&(n[t-1].value="",n[t-1].focus());break;case"Enter":(0,o.Z)(n).every(function(e){return e.value&&1===e.value.length})&&I();break;case"ArrowRight":t!==n.length-1&&n[t+1].focus();break;case"ArrowLeft":0!==t&&n[t-1].focus();break;default:/[0-9]/.test(r)&&(n[t].value=r,t!==n.length-1&&n[t+1].focus())}return!0};return(0,u.useEffect)(function(){if(j>0){var e=setInterval(function(){return O(function(e){return e-1})},1e3);return function(){return clearInterval(e)}}},[j]),(0,u.useEffect)(function(){setTimeout(function(){document.querySelectorAll("#otp > input")[0].focus()},100)},[]),(0,x.jsxs)("div",{className:"jsx-".concat(g.__hash)+" d-flex flex-column",children:[(0,x.jsxs)("div",{className:"jsx-".concat(g.__hash)+" text-gray mb-4",children:["Enter 4 digit code sent to your phone ",z,", Please Verify Your Mobile Number"]}),(0,x.jsx)("div",{id:"otp",className:"jsx-".concat(g.__hash)+" d-flex mb-4",children:[,,,,].fill().map(function(e,t){return(0,x.jsx)("input",{autoComplete:"one-time-code",inputMode:"numeric",maxLength:"1",name:"otp",onKeyDown:function(e){return!P&&q(e,t)},onPaste:D,placeholder:"0",type:"text",className:"jsx-".concat(g.__hash)+" otp-field form-control ps-4 me-2"},"otp_input_".concat(t))})}),R&&(0,x.jsx)("span",{className:"jsx-".concat(g.__hash)+" fs-md text-danger",children:R}),(0,x.jsx)("p",{className:"jsx-".concat(g.__hash)+" mb-4",children:j>0?(0,x.jsxs)(x.Fragment,{children:["Resend Code in ",(0,x.jsxs)("span",{className:"jsx-".concat(g.__hash)+" text-primary",children:[j," sec"]})]}):(0,x.jsx)("button",{onClick:A,type:"button",className:"jsx-".concat(g.__hash)+" btn btn-link text-primary text-decoration-none m-0 p-0",children:"Request Again"})}),(0,x.jsx)("button",{disabled:P,onClick:I,type:"button",className:"jsx-".concat(g.__hash)+" btn btn-primary",children:P?"Submitting...":"Submit OTP"}),(void 0===t||t)&&(0,x.jsx)("button",{onClick:n,type:"button",className:"jsx-".concat(g.__hash)+" btn btn-link px-0 align-self-start",children:"Edit mobile number"}),(0,x.jsx)(l(),{id:g.__hash,children:g})]})}},10231:function(e,t,n){"use strict";n.d(t,{H:function(){return i},i:function(){return o}});var r=n(1852),i=function(e){var t=e.children;return(0,r.useMediaQuery)({minWidth:992})&&t},o=function(e){var t=e.children;return(0,r.useMediaQuery)({maxWidth:991})&&t}},64987:function(e,t,n){"use strict";var r=n(40385),i=n(10231),o=n(85893);t.Z=function(e){var t=e.children;return(0,o.jsxs)("div",{className:"d-flex h-100 page-min-height",children:[(0,o.jsx)(i.H,{children:(0,o.jsx)("div",{className:"col-6 bg-primary",children:(0,o.jsxs)("div",{className:"d-flex flex-column align-items-center justify-content-center h-100 text-white",children:[(0,o.jsx)("div",{className:" text-center fs-xlg fw-bold mb-2",children:"Your Personal Government Exam Guide"}),(0,o.jsx)("div",{className:"text-center w-75 mx-auto mb-4",children:"Start Your Journey With Free Videos, Test Series, Quizzes, Notes, & Information About Government Exams"}),(0,o.jsx)("div",{className:"w-50",children:(0,o.jsx)(r.Z,{alt:"Prepp Exam Guide",height:1146,layout:"responsive",lazy:!0,src:"public/prepp/assets/leadform-left.webp",width:1051})})]})})}),(0,o.jsx)("div",{className:"col-12 col-lg-6 bg-gray-100",children:(0,o.jsx)("div",{className:"d-flex align-items-center justify-content-center h-100",children:(0,o.jsx)("div",{className:"border p-4 bg-white",style:{maxWidth:"350px",width:"100%"},children:t})})})]})}},76283:function(e,t,n){var r=n(34155);n(91479);var i=n(67294),o=i&&"object"==typeof i&&"default"in i?i:{default:i},s=void 0!==r&&r.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},a=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,i=t.optimizeForSpeed,o=void 0===i?s:i;c(l(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",c("boolean"==typeof o,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=o,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var a=document.querySelector('meta[property="csp-nonce"]');this._nonce=a?a.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(s||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t>>0},d={};function p(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return d[r]||(d[r]="jsx-"+u(e+"-"+n)),d[r]}function h(e,t){var n=e+t;return d[n]||(d[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),d[n]}var f=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,i=t.optimizeForSpeed,o=void 0!==i&&i;this._sheet=r||new a({name:"styled-jsx",optimizeForSpeed:o}),this._sheet.inject(),r&&"boolean"==typeof o&&(this._sheet.setOptimizeForSpeed(o),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),r=n.styleId,i=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var o=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=o,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return o.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var i=p(r,n);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return h(i,e)}):[h(i,t)]}}return{styleId:p(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=i.createContext(null);m.displayName="StyleSheetContext";var v=o.default.useInsertionEffect||o.default.useLayoutEffect,b=new f;function y(e){var t=b||i.useContext(m);return t&&v(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}y.dynamic=function(e){return e.map(function(e){return p(e[0],e[1])}).join(" ")},t.style=y},53967:function(e,t,n){e.exports=n(76283).style},90985:function(e,t,n){"use strict";n.r(t);var r,i=n(50029),o=n(59499),s=n(64687),l=n.n(s),a=n(11163),c=n(67294),u=n(25617),d=n(58698),p=n(89204),h=n(64987),f=n(40925),m=n(21584),v=n(85893);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var y=function(e){var t=e.referrer,n=(0,c.useState)(!1),r=n[0],i=n[1],s=(0,c.useState)(!0),l=s[0],h=s[1],y=(0,u.I0)(),_=(0,a.useRouter)();return((0,c.useEffect)(function(){(0,m.zt)("prepp-token")?_.replace("/"):h(!1)},[_]),l)?(0,v.jsxs)("div",{className:"d-flex flex-column align-items-center justify-content-center",style:{minHeight:"300px"},children:[(0,v.jsx)("div",{className:"spinner-border text-primary",role:"status"}),(0,v.jsx)("p",{className:"mt-3",children:"Loading..."})]}):r?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("h1",{className:"fs-lg fw-600 text-center",children:"OTP Verification"}),(0,v.jsx)(p.default,function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};s&&s.event.push(e,t)},a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s&&s.onUserLogin.push({Site:o(o({},e),{},{"msg-whatsapp":!0})})}},36429:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return n(90985)}])},91479:function(){}},function(e){e.O(0,[1852,385,5731,2888,9774,179],function(){return e(e.s=36429)}),_N_E=e.O()}]);