1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{42070:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return r(8794)}])},74999:function(e,t,r){"use strict";var n=r(37182);r(67294),t.Z=function(e){let{outClass:t,innerClass:r,children:i}=e;return(0,n.tZ)("div",{className:"".concat(t||""," container-full d-flex justify-content-center"),children:(0,n.tZ)("div",{className:"d-flex containerGeral",children:(0,n.tZ)("div",{className:"".concat(r||""," geralText container-fluid"),children:i})})})}},25351:function(e,t,r){"use strict";r.d(t,{z:function(){return o}});var n=r(37182);r(67294);var i=r(70020),a=r(65422);function o(e){let{children:t}=e,r=(0,a.v9)(e=>e.loading.isLoading);return(0,n.tZ)(i.Z,{spinning:r,size:"large",children:t})}t.Z=function(e){let{children:t,loading:r}=e;return(0,n.tZ)(i.Z,{spinning:r,size:"large",children:t})}},22395:function(e,t,r){"use strict";r.d(t,{K:function(){return i}});var n=r(19182);let i=()=>({passwordRecovery:async e=>{let{email:t}=e;try{let{data:e}=await n.Z.post("primelead-user-auth/password-recover",{email:t});return e}catch(e){return console.error(e),null}},passwordReset:async e=>{let{password:t,resetCode:r}=e;try{let{data:e}=await n.Z.post("primelead-user-auth/password-reset",{password:t,passwordCode:r});return e}catch(e){return console.error(e),null}}})},8794:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return z}});var n=r(37182),i=r(11163),a=r(67294),o=r(65422),l=r(74999),s=r(48842),c=r(52469),d=r(75009),u=r(85551),h=r(58668),f=r(43639),m=r(9008),p=r.n(m),g=r(78579),v=r(68486),y=r(43692),Z=r(8993),_=r(59350),b=r.n(_),w=r(47361),S=r(62436);let k="fb_login_state",C=["utm_source","utm_medium","utm_campaign"];function x(){return"".concat(window.location.origin,"/login")}var N=()=>{let{t:e}=(0,S.$)("auth"),t=(0,o.I0)(),r=(0,i.useRouter)(),{loading:l}=(0,o.v9)(e=>e.auth),s=(0,a.useRef)(!1),{code:c,state:d,error:u}=r.query,f=!!(c&&d),m=(0,a.useCallback)(e=>{var t,n;if(e.preventDefault(),l||f)return;let i=(null===(t=window.crypto)||void 0===t?void 0:t.randomUUID)?window.crypto.randomUUID():Array.from(window.crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");!function(e){try{sessionStorage.setItem(k,JSON.stringify(e))}catch(e){console.error("Could not store the Facebook login state:",e)}}({nonce:i,redirect:r.query.redirect?String(r.query.redirect):void 0,utms:(n=r.query,C.reduce((e,t)=>(null==n?void 0:n[t])?{...e,[t]:String(n[t])}:e,{}))});let a=new URLSearchParams({client_id:w.default.FB_LEADGEN_APP_ID,config_id:w.default.FB_LOGIN_CONFIG_ID,redirect_uri:x(),response_type:"code",state:i});window.location.href="".concat(w.default.FB_GRAPH_URL,"/dialog/oauth?").concat(a.toString())},[l,f,r.query]);return(0,a.useEffect)(()=>{if(!r.isReady||s.current||!d||!c&&!u)return;s.current=!0;let n=function(){try{let e=sessionStorage.getItem(k);return sessionStorage.removeItem(k),e?JSON.parse(e):null}catch(e){return console.error("Could not read the Facebook login state:",e),null}}();if(r.replace({pathname:r.pathname,query:{...(null==n?void 0:n.redirect)?{redirect:n.redirect}:{},...(null==n?void 0:n.utms)||{}}},void 0,{shallow:!0}),u){v.Am.error(e("facebookLoginCancelled"));return}if(!n||n.nonce!==d){v.Am.error(e("facebookLoginFailed"));return}t((0,h.jh)({code:String(c),redirectUri:x(),redirect:n.redirect,utms:n.utms},r))},[r,r.isReady,c,d,u,t,e]),(0,n.BX)("div",{className:"d-flex ".concat(b().row),children:[(0,n.tZ)("div",{className:"d-flex align-self-center",children:(0,n.tZ)("h5",{children:e("or")})}),(0,n.BX)("a",{disabled:l||f,href:"#",onClick:m,className:b().facebutton,children:[(0,n.tZ)("div",{className:b().btnWrapper,children:(0,n.tZ)("img",{alt:"Facebook",src:"/buttons/facebook.png"})}),(0,n.tZ)("span",{children:e("continueWithFacebook")})]}),(0,n.tZ)("div",{style:{marginTop:6},className:"d-flex align-self-center",children:(0,n.tZ)("a",{href:"https://imobilead.me/politica-de-privacidade",target:"_blank",children:e("privacyPolicy")})})]})},P=r(34908),A=r.n(P),T=r(25675),R=r.n(T);let E=()=>{{let e=new URLSearchParams(window.location.search),t=e.get("utm_source")||"",r=e.get("utm_medium")||"",n=e.get("utm_campaign")||"",i="".concat(t?"utm_source=".concat(t,"&"):"").concat(r?"utm_medium=".concat(r,"&"):"").concat(n?"utm_campaign=".concat(n,"&"):"");return i&&"?".concat(i)||""}};var B=e=>{var t,r;let{confirmed:i,loginError:a,email:o,setEmail:l,password:s,setPassword:c,handleLogin:h,loading:f,handleKey:m,setShowModalSenha:p}=e,{t:g}=(0,S.$)("auth"),v=E();return(0,n.BX)("div",{className:A().loginContent,children:[(0,n.BX)("div",{className:A().contentLeft,children:[(0,n.tZ)(R(),{alt:"Imobilead",src:"/icos/logo.svg",width:450,height:95}),i?(0,n.tZ)(n.HY,{children:(0,n.tZ)(d.ZP,{style:{padding:"0"},status:"success",title:g("confirmationSuccessTitle"),subTitle:g("confirmationSuccessSubTitle")})}):(0,n.tZ)("div",{className:A().description,children:(0,n.tZ)("h1",{className:A().title,children:g("welcomeTitle")})}),(0,n.tZ)(Z.default,{style:{width:300},required:!0,disabled:f,status:(null==a?void 0:null===(t=a.email)||void 0===t?void 0:t.length)>0?"error":"",placeholder:g("emailPlaceholder"),value:o,size:"large",onChange:e=>l(e.target.value)}),a.email&&(0,n.tZ)("div",{style:{color:"red",fontSize:12},children:a.email}),(0,n.tZ)(Z.default.Password,{required:!0,style:{width:300},status:(null==a?void 0:null===(r=a.password)||void 0===r?void 0:r.length)>0?"error":"",placeholder:g("passwordPlaceholder"),size:"large",value:s,disabled:f,onKeyDown:m,onChange:e=>c(e.target.value)}),a.password&&(0,n.tZ)("div",{style:{color:"red",fontSize:12},children:a.password}),(0,n.BX)("div",{style:{marginTop:15},className:"d-flex justify-content-end",children:[(0,n.tZ)("span",{style:{marginRight:10},onClick:()=>p(!0),className:"cadastro",children:g("forgotPassword")}),(0,n.tZ)("span",{style:{marginRight:10},children:" - "}),(0,n.tZ)("a",{href:"https://imobilead.me/lps/cadastro/".concat(v),className:"cadastro",children:g("registerNow")})]}),(0,n.tZ)(u.ZP,{loading:f,onClick:h,variant:"contained",type:"primary",size:"large",style:{color:"#ffffff",marginTop:22,width:"200px"},children:g("enter")}),(0,n.tZ)(N,{})]}
1),(0,n.tZ)("div",{className:A().contentRight,style:{backgroundImage:"url(https://assets.imobilead.me/bgLoginWebApp.jpg)"},children:(0,n.tZ)("a",{className:A().linkBanner,href:"https://link.imobilead.me/banner-login",children:g("learnMore")})})]})},I=r(22395),L=r(32545),F=r(70572),z=function(){let{t:e}=(0,S.$)("auth"),t=(0,o.I0)(),{loading:r}=(0,o.v9)(e=>e.auth),[m,Z]=(0,a.useState)(""),[_,b]=(0,a.useState)(""),[k,C]=(0,a.useState)(!1),[x,N]=(0,a.useState)(!1),[P,A]=(0,a.useState)(!1),[T,R]=(0,a.useState)(!1),[E]=s.Z.useForm(),[z,q]=(0,a.useState)({email:"",password:""}),O=(0,i.useRouter)(),U=async()=>{try{if(r)return;if(!(0,f.u$)(m.trim()).isValid||!(0,f.hE)(_).isValid){q({password:(0,f.hE)(_).text,email:(0,f.u$)(m.trim()).text});return}t((0,h.Qb)(m.trim(),_,O))}catch(e){console.log(e)}},{passwordRecovery:X}=(0,I.K)(),$=(0,a.useCallback)(async t=>{let{email:r}=t;if(!k){C(!0);try{delete g.Z.defaults.headers.Authorization;let t=await X({email:r});if(t||(C(!1),v.Am.error(e("serverConnectionFailedShort"))),(null==t?void 0:t.status)==="error"){let e=(0,L._)(t);v.Am.error(e||t.message),C(!1);return}C(!1)}catch(t){C(!1),v.Am.error(e("serverConnectionFailedShort"))}}},[k,X,e]),j=(0,a.useCallback)(()=>{A(!P)},[P]);return(0,a.useEffect)(()=>{var e;(null==O?void 0:null===(e=O.query)||void 0===e?void 0:e.confirmed)&&R(!0)},[O]),(0,a.useEffect)(()=>{var e;(null==O?void 0:null===(e=O.query)||void 0===e?void 0:e.message)==="blocked"&&A(!0)},[O]),(0,n.BX)(n.HY,{children:[(0,n.BX)(p(),{children:[(0,n.tZ)("title",{children:e("pageTitle")}),(0,n.tZ)("link",{rel:"icon",type:"image/png",href:"/icos/push-icon.png"})]}),(0,n.BX)(l.Z,{children:[(0,n.tZ)(B,{confirmed:T,loginError:z,email:m,setEmail:Z,password:_,setPassword:b,handleKey:e=>{"Enter"===e.key&&U()},handleLogin:U,form:E,loading:r,handleSubmit:$,setShowModalSenha:N}),(0,n.tZ)(F.default,{visible:x,onClose:()=>N(!1),onSubmit:e=>X({email:e}),validateInput:e=>(0,f.u$)(e).isValid}),(0,n.tZ)(c.default,{title:e("blockedAccessTitle"),visible:P,onOk:j,onCancel:j,okText:e("close"),cancelText:e("close"),children:(0,n.tZ)(d.ZP,{style:{padding:"0"},status:"warning",title:e("blockedAccessResultTitle"),subTitle:e("blockedAccessSubTitle"),extra:(0,n.tZ)(u.ZP,{href:"https://api.whatsapp.com/send?phone=".concat(w.default.SUPPORT_WHATSAPP_NUMBER,"&text=Meu%20acesso%20est%C3%A1%20bloqueado%2C%20pode%20me%20ajudar%3F"),children:(0,n.BX)("span",{style:{display:"flex",alignItems:"center"},children:[(0,n.tZ)(y.Z,{style:{fontSize:24,color:"#2e5ca8",marginRight:10}}),e("talkToSupport")]})})})})]})]})}},70572:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(37182),i=r(52469),a=r(48842),o=r(8993),l=r(67294),s=r(25351),c=r(93251),d=r(62436);function u(e){let{visible:t,onClose:r,onSubmit:u,title:h,inputLabel:f,inputPlaceholder:m,validateInput:p}=e,{t:g}=(0,d.$)("auth"),[v,y]=(0,l.useState)(!1),[Z,_]=(0,l.useState)(!1),[b,w]=(0,l.useState)(""),[S,k]=(0,l.useState)(""),C=async()=>{if(!v){if(y(!0),k(""),p&&!p(b)){k(g("invalidField")),y(!1);return}try{let e=await u(b);if(!e)throw Error(g("serverConnectionFailed"));if((null==e?void 0:e.status)==="error"){k(e.message),y(!1);return}_(!0)}catch(e){k(g("serverConnectionFailedShort"))}finally{y(!1)}}},x=()=>{_(!1),w(""),k(""),r()};return(0,n.tZ)(i.default,{title:h||g("recoverPasswordTitle"),visible:t,onOk:Z?x:C,onCancel:x,okText:!Z&&g("sendLink"),footer:!Z&&!v&&void 0,children:(0,n.tZ)(s.Z,{loading:v,children:Z?(0,n.tZ)(c.default,{title:g("sendLinkSuccessTitle"),subTitle:g("sendLinkSuccessSubTitle"),onClose:x}):(0,n.tZ)(a.Z,{layout:"vertical",children:(0,n.tZ)(a.Z.Item,{label:f||g("recoverPasswordInputLabel"),validateStatus:S?"error":"",help:S||"",children:(0,n.tZ)(o.default,{placeholder:m||g("recoverPasswordInputPlaceholder"),value:b,onChange:e=>{w(e.target.value),S&&k("")},style:{borderColor:S?"red":void 0}})})})})})}},93251:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return o}});var n=r(37182);r(67294);var i=r(81990),a=r(62436);function o(e){let{title:t,subTitle:r,onClose:o}=e,{t:l}=(0,a.$)("auth");return(0,n.BX)("div",{style:{textAlign:"center",padding:"30px 20px",borderRadius:8,border:"1px solid #d9f7be",backgroundColor:"#f6ffed"},children:[(0,n.tZ)(i.Z,{style:{fontSize:48,color:"#52c41a",marginBottom:16}}),(0,n.tZ)("h2",{style:{marginBottom:12},children:t}),(0,n.tZ)("p",{className:"text-gray-700 font-[1.2rem]",children:r}),(0,n.tZ)("button",{onClick:o,className:"bg-primary-500 px-2 py-1 text-white text-xl rounded-md cursor-pointer hover:opacity-80",children:l("close")})]})}},19182:function(e,t,r){"use strict";var n=r(87066),i=r(44225);let a=n.Z.create({baseURL:i.NP});a.interceptors.request.use(e=>{let t="0QEP1mNvEe1NytTu6AtC32aWylBS9Tf83eumm3CO";return t&&(e.headers["x-api-key"]=t),e},e=>Promise.reject(e)),a.interceptors.response.use(e=>e,e=>Promise.reject(e)),t.Z=a},43639:function(e,t,r){"use strict";r.d(t,{gR:function(){return l},gn:function(){return s},hE:function(){return i},u$:function(){return o}});var n=r(68486);let i=e=>e&&e.length>=3?{isValid:!0,text:""}:{isValid:!1,text:"A senha deve ter no m\xednimo 3 car\xe1cteres"},a=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,o=e=>e&&a.test(e)?{isValid:!0,text:""}:{isValid:!1,text:"E-mail inv\xe1lido"},l=e=>{let t=e.errorFields.map(e=>e.errors[0]).join(", ");n.Am.error("Preencha os campos: ".concat(t))},s=e=>e?e.replace(/[^a-zA-Z0-9Ã-ÃÃ-öø-ÿÃç @#$%&()\[\]\\?.+\-"´]/g,""):""},32545:function(e,t,r){"use strict";function n(e){return(null==e?void 0:e.status)==="error"&&(null==e?void 0:e.statusCode)?({3022:"O usu\xe1rio n\xe3o est\xe1 cadastrado.",3023:"O m\xe1ximo de tentativas para a recupera\xe7\xe3o de senha foi atingida, aguarde 1h ou contate o suporte."})[e.statusCode]||e.message||"Erro desconhecido":null}r.d(t,{_:function(){return n}})},34908:function(e){e.exports={loginContent:"style_loginContent__mZho3",contentLeft:"style_contentLeft__tlIZ8",title:"style_title__rxbdq",description:"style_description__AmEAD",contentRight:"style_contentRight__YIRfV",linkBanner:"style_linkBanner__Qz5he"}},59350:function(e){e.exports={facebutton:"style_facebutton__GqBl2",btnWrapper:"style_btnWrapper__w4LOH",row:"style_row__l9JsM"}}},function(e){e.O(0,[1216,2888,9774,179],function(){return e(e.s=42070)}),_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.