1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5613],{27036:function(e,s,n){"use strict";var a=n(64836);s.Z=void 0;var r=a(n(64938)),t=n(85893),o=(0,r.default)((0,t.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");s.Z=o},12120:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/signup",function(){return n(70493)}])},70493:function(e,s,n){"use strict";n.r(s),n.d(s,{__N_SSG:function(){return T},default:function(){return G}});var a=n(85893),r=n(801),t=n(67294),o=n(37023),c=n(40044),i=n(58467),l=n(72132),d=n(60845),u=n(45332),m=n(11163);let p=()=>{let e=(0,m.useRouter)(),{t:s}=(0,d.$G)("common"),[n,a]=t.useState(0),[r,o]=t.useState({}),[c,p]=t.useState({}),[h,g]=t.useState(!1);function x(e){let{name:n,email:t,lgpd:o,password:c,confirmPassword:i}=r,l={};if(p({}),n||(l.name=s("name_required")),t||(l.email=s("mail_required")),t&&!(0,u.oH)(t)&&(l.email=s("mail_invalid")),o||(l.lgpd=s("please_accept_the_terms")),Object.keys(l).length)return p(l);e?a(e):(c||(l.password=s("password_required")),i||(l.confirmPassword=s("confirm_password_required")),c&&i&&c!==i&&(l.confirmPassword=s("password_dont_match")),Object.keys(l).length?p(l):j())}let _=(e,s)=>{1===s?x(s):a(s)};async function j(){try{var n;let{name:a,email:t,password:o}=r;g(!0);let c=await i.ZP.post("/auth/signup",{email:t,password:o,name:a});if(g(!1),(null===(n=c.data.error)||void 0===n?void 0:n.message)==="email_already_exists")return l.Am.error(s("email_already_exists"));_iub.cons.sendData(),l.Am.success("cadastro realizado com sucesso, verifique seu e-mail"),setTimeout(()=>{e.replace("/auth/signin")},5e3)}catch(e){console.log(e)}}return{userData:r,errors:c,onSubmitForm:x,tabIndex:n,onChangeTab:_,onChangeData:e=>o(s=>({...s,...e})),onNext:()=>x(1),processing:h}};var h=n(50135),g=n(69368),x=n(56815),_=n(83321),j=n(44574);let b=(e,s)=>{let[n,a]=t.useState({name:s.name||"",email:s.email||"",lgpd:s.lgpd||!1});return t.useEffect(()=>{e(n)},[n]),{data:n,setData:a}},f=e=>{let{onChange:s,userData:n,onNext:r,errors:t}=e,{t:o}=(0,d.$G)("common"),{data:c,setData:i}=b(s,n);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"text-content",children:[(0,a.jsx)("h1",{className:"title",children:o("create_account_title")}),(0,a.jsx)("p",{className:"subtitle",children:o("connect_to_inspire")})]}),(0,a.jsxs)("div",{id:"signup-form",className:"form",children:[(0,a.jsx)("label",{children:o("name")}),(0,a.jsx)(h.Z,{className:"textfield",name:"name",placeholder:o("enter_name"),variant:"standard",value:c.name,onChange:e=>i(s=>({...s,name:e.target.value})),error:!!t.name,helperText:t.name}),(0,a.jsx)("label",{children:o("email")}),(0,a.jsx)(h.Z,{className:"textfield",name:"email",placeholder:o("enter_your_email"),variant:"standard",value:c.email,onChange:e=>i(s=>({...s,email:e.target.value})),error:!!t.email,helperText:t.email}),(0,a.jsxs)("div",{className:"terms",children:[(0,a.jsxs)("div",{className:"content-politic",children:[(0,a.jsx)(g.Z,{color:"default",className:"checker",name:"checkLgpd",checked:c.lgpd,onChange:e=>i(s=>({...s,lgpd:e.target.checked}))}),(0,a.jsxs)("label",{className:"text-politic",children:[o("accept_the"),(0,a.jsx)("strong",{children:(0,a.jsx)("a",{href:"https://www.iubenda.com/termos-e-condicoes/84558789",children:o("terms")})})," ",o("and")," ",(0,a.jsx)("strong",{children:(0,a.jsx)("a",{href:"https://www.iubenda.com/privacy-policy/84558789",children:o("usage_policies")})})]})]}),!!t.lgpd&&(0,a.jsx)(x.Z,{error:!0,children:t.lgpd})]}),(0,a.jsx)("p",{className:"subtitle case",children:o("social_networks")}),(0,a.jsx)(j.Z,{}),(0,a.jsx)(_.Z,{className:"btn-form",variant:"contained",onClick:r,children:o("advance")})]})]})};var v=n(79332),w=n(87109),N=n(93946),k=n(98456),y=n(27036),Z=n(22961),C=n(72450);let P=(e,s)=>{let[n,a]=t.useState(!1),[r,o]=t.useState(e.password||""),[c,i]=t.useState(e.confirmPassword||""),[l,d]=t.useState({eigthCaracter:!1,number:!1,uppercase:!1,lowercase:!1});return t.useEffect(()=>{s({confirmPassword:c})},[c]),{showPassword:n,onTogglePassword:()=>a(e=>!e),password:r,confirmPassword:c,onChangePassword:function(e){let{value:n}=e.target;o(n);let a={eigthCaracter:!0,number:!0,uppercase:!0,lowercase:!0};d({eigthCaracter:!1,number:!1,uppercase:!1,lowercase:!1}),n.match(/([A-Z])/)||(a.uppercase=!1),n.match(/([a-z])/)||(a.lowercase=!1),n.match(/([0-9])/)||(a.number=!1),n.length<8&&(a.eigthCaracter=!1),d(a),a.eigthCaracter&&a.lowercase&&a.number&&a.uppercase?s({password:n}):s({password:""})},passwordRules:l,onConfirmPasswordChange:i}},D=e=>{let{userData:s,onChange:n,onSubmitForm:r,errors:t,processing:o}=e,{t:c}=(0,d.$G)("common"),{showPassword:i,onTogglePassword:l,password:u,onChangePassword:m,passwordRules:p,confirmPassword:g,onConfirmPasswordChange:b}=P(s,n);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"text-content",children:[(0,a.jsx)("h1",{className:"title",children:c("create_account_title")}),(0,a.jsx)("p",{className:"sub-title",children:c("connect_to_inspire")})]}),(0,a.jsxs)("div",{className:"form",children:[(0,a.jsx)("label",{children:c("password")}),(0,a.jsx)(v.Z,{id:"standard-adornment-password",type:i?"text":"password",value:u,onChange:m,className:"textfield password",placeholder:c("created_a_password"),error:!!t.password,endAdornment:(0,a.jsx)(w.Z,{position:"end",children:(0,a.jsx)(N.Z,{"aria-label":"toggle password visibility",onClick:l,onMouseDown:e=>e.preventDefault(),children:i?(0,a.jsx)(C.Z,{}):(0,a.jsx)(Z.Z,{})})})}),!!t.password&&(0,a.jsx)(x.Z,{error:!0,children:t.password}),(0,a.jsxs)("div",{className:"check-list",children:[(0,a.jsxs)("span",{style:{color:p.eigthCaracter?"green":"gray"},children:[(0,a.jsx)(y.Z,{className:"checkIcon"}),(0,a.jsx)("p",{children:c("8_caracteres")})]}),(0,a.jsxs)("span",{style:{color:p.uppercase?"green":"gray"},children:[(0,a.jsx)(y.Z,{className:"checkIcon"}),(0,a.jsx)("p",{children:c("upper_case")})]}),(0,a.jsxs)("span",{style:{color:p.lowercase?"green":"gray"},children:[(0,a.jsx)(y.Z,{className:"checkIcon"}),(0,a.jsx)("p",{children:c("lower_case")})]}),(0,a.jsxs)("span",{style:{color:p.number?"green":"gray"},children:[(0,a.jsx)(y.Z,{className:"checkIcon"}),(0,a.jsx)("p",{children:c("1_number")})]})]}),(0,a.jsx)("label",{children:c("repeat_the_password")}),(0,a.jsx)(h.Z,{className:"textfield",value:g,onChange:e=>b(e.target.value),placeholder:c("repeat_entered_password"),type:i?"text":"password",variant:"standard",error:!!t.confirmPassword,helperText:t.confirmPassword}
1),(0,a.jsx)("p",{className:"sub-title case",children:c("social_networks")}),(0,a.jsx)(j.Z,{}),(0,a.jsx)(_.Z,{className:"btn-form",onClick:r,variant:"contained",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(k.Z,{className:"loading"}),c("loading")]}):c("register")})]})]})};var S=n(4298),I=n.n(S);function A(e){let{children:s,value:n,index:r,...t}=e;return(0,a.jsx)("div",{role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r),className:"tab tab-".concat(r),...t,children:n===r&&s})}function L(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}let E=()=>{let{userData:e,errors:s,onNext:n,onSubmitForm:t,tabIndex:i,onChangeTab:l,onChangeData:d,processing:u}=p();return(0,a.jsxs)("div",{className:"signup",children:[(0,a.jsx)(I(),{id:"iubenda_init_cons",children:'var _iub = _iub || {};\n _iub.cons_instructions = _iub.cons_instructions || [];\n _iub.cons_instructions.push(["init", {\n api_key: "cyaXyYnNOYeLHOUyNVSsLyqszS17F7gt"\n }]);\n '}),(0,a.jsx)(I(),{src:"https://cdn.iubenda.com/cons/iubenda_cons.js",async:!0}),(0,a.jsx)("div",{className:"left-side"}),(0,a.jsxs)("div",{className:"right-side",children:[(0,a.jsx)(r.K7,{}),(0,a.jsxs)(o.Z,{classes:{root:"tabslist-root",indicator:"color-tab"},value:i,onChange:l,children:[(0,a.jsx)(c.Z,{className:"tab-btn",classes:{root:"tab-root"},...L(0)}),(0,a.jsx)(c.Z,{className:"tab-btn",classes:{root:"tab-root"},...L(1)})]}),(0,a.jsx)(A,{value:i,index:0,children:(0,a.jsx)(f,{onChange:d,errors:s,userData:e,onNext:n})}),(0,a.jsx)(A,{value:i,index:1,children:(0,a.jsx)(D,{onChange:d,errors:s,userData:e,onSubmitForm:()=>t(null),processing:u})})]}),(0,a.jsx)(I(),{id:"iubenda_load_cons_signup",children:'_iub.cons_instructions.push(["load", {\n form: {\n selector: document.getElementById("signup-form"),\n map: {\n subject: {\n full_name: "name",\n email: "email"\n },\n preferences: {\n checkLgpd: "checkLgpd",\n }\n }\n },\n consent: {\n legal_notices: [{\n identifier: "privacy_policy",\n },\n {\n identifier: \'cookie_policy\',\n },\n {\n identifier: "terms",\n }\n ],\n }\n },\n {\n success: function(response) {\n console.log(\'consent database iub seccess\')\n console.log(response);\n },\n error: function(response) {\n console.log(\'consent database iub error\')\n console.log(response);\n }\n }\n ])'})]})};var T=!0,G=E},44574:function(e,s,n){"use strict";n.d(s,{Z:function(){return j}});var a=n(85893),r=n(801),t=n(29661),o=n.n(t),c=n(93645),i=n(18228),l=n.n(i);n(67294);var d=n(61875),u=n(72132),m=n(20483),p=n(11163),h=n(21313),g=n(58467);let x=()=>{let{authenticate:e}=(0,m.aC)();(0,p.useRouter)();let{toggleLoader:s}=(0,h.U2)();async function n(n){console.log("\uD83D\uDE80 ~ loginInWithFacebook ~ response:",n);try{if("unknown"===n.status)return;s(!0);let a=await g.ZP.post("/auth/signin",{email:n.email,facebookToken:n.accessToken,isfromAdminPanel:!0});if(s(),a.data.error){let e=a.data.error.message;u.Am.error(e)}await e(a.data)}catch(e){s(),u.Am.error(e)}}async function a(){}async function r(n){console.log("\uD83D\uDE80 ~ loginInWithGoogle ~ response:",n);try{s(!0);let a=await g.ZP.post("/auth/signin",{googleToken:n.tokenId,isfromAdminPanel:!0});if(console.log("\uD83D\uDE80 ~ loginInWithGoogle ~ res:",null==a?void 0:a.data),s(),a.data.error){let e=a.data.error.message;u.Am.error(e)}await e(a.data)}catch(e){s(),u.Am.error(e.message)}}let t=()=>{alert("Voc\xea foi desconectado com sucesso")},{linkedInLogin:o}=(0,d.HL)({clientId:"77wrilfnn5vo9g",redirectUri:"".concat("https://appcasacor.com.br","/linkedin"),scope:"r_liteprofile,r_emailaddress",onSuccess:async n=>{try{s(!0);let a=await g.ZP.post("/auth/signin",{linkedinToken:n,redirectUri:"".concat("https://appcasacor.com.br","/linkedin"),isfromAdminPanel:!0});if(s(),a.data.error)throw a.data.error;await e(a.data)}catch(e){s(),u.Am.error(e.message)}},onError:e=>{u.Am.error("string"==typeof e?e:(null==e?void 0:e.message)||"Erro ao logar com LinkedIn")}});return{loginInWithFacebook:n,loginInWithGoogle:r,onLoginInWithGoogleError:function(e){u.Am.error(e)},GoogleLogoutSuccess:t,loginInWithLinkedin:o,loginInWithApple:a}},_=()=>{let{loginInWithFacebook:e,loginInWithGoogle:s,onLoginInWithGoogleError:n,loginInWithLinkedin:t,loginInWithApple:i}=x();return(0,a.jsxs)("div",{className:o()["social-buttons"],children:[(0,a.jsx)("div",{className:o()["btn-content-social"],onClick:t,children:(0,a.jsx)(r.pA,{className:o().icon})}),(0,a.jsx)(l(),{appId:"911852782835557",fields:"name,email,picture",scope:"public_profile,email",callback:e,render:e=>(0,a.jsx)("div",{className:o()["btn-content-social"],onClick:e.onClick,children:(0,a.jsx)(r.Vq,{className:o().icon})})}),(0,a.jsx)(c.GoogleLogin,{clientId:"30220021503-ogsi2a2cn6h6itv6mgkan2phkmspddhm.apps.googleusercontent.com",render:e=>(0,a.jsx)("div",{className:o()["btn-content-social"],onClick:e.onClick,children:(0,a.jsx)(r._8,{className:o().icon})}),buttonText:"Login",onSuccess:s,onFailure:n,cookiePolicy:"single_host_origin",isSignedIn:!1})]})};var j=_},29661:function(e){e.exports={"social-buttons":"socialLoginProviders_social-buttons__DDtaN","btn-content-social":"socialLoginProviders_btn-content-social__I_x4s",icon:"socialLoginProviders_icon__DXGX6"}}},function(e){e.O(0,[3243,135,1237,3607,4233,9774,2888,179],function(){return e(e.s=12120)}),_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.