text: webpackJsonp([1],{1130:function(e,t,a){"use strict";var r=a(0),n=a.n(r),s=a(52),i=a(72),l=a(109),o=a(29),p=a(169),c=a(86),u=a(70),m=a(111),h=a(53),d=a(333),E=a(35),I=a(73),g=a(321);t.a=Object(l.e)(Object(s.b)((e,t)=>({translate:Object(h.c)(e.get("locale"))}),(e,t)=>({showError:t=>{e(E.showMessage(t))},register:t=>{e(d.dbSignup(t))},loginPage:()=>{e(Object(i.b)("/login"))}}))(Object(u.c)(e=>({textField:{minWidth:280,marginTop:20},contain:{margin:"0 auto"},paper:{minHeight:370,maxWidth:450,minWidth:337,textAlign:"center",display:"block",margin:"auto"}}))(class extends r.Component{constructor(e){super(e),this.handleEmailInputChange=(e=>{const t=e.target,a="checkbox"===t.type?t.checked:t.value;switch(t.name,this.setState({emailInput:a}),e){case"emailInput":this.setState({emailInputError:""});break;case"checkInput":this.setState({checkInputError:""})}}),this.handleFullNameInputChange=(e=>{const t=e.target,a="checkbox"===t.type?t.checked:t.value;switch(t.name,this.setState({fullNameInput:a}),e){case"fullNameInput":this.setState({fullNameInputError:""});break;case"checkInput":this.setState({checkInputError:""})}}),this.handlePasswordInputChange=(e=>{const t=e.target,a="checkbox"===t.type?t.checked:t.value;switch(t.name,this.setState({passwordInput:a}),e){case"passwordInput":this.setState({confirmInputError:"",passwordInputError:""});break;case"checkInput":this.setState({checkInputError:""})}}),this.handlePasswordConfirmInputChange=(e=>{const t=e.target,a="checkbox"===t.type?t.checked:t.value;switch(t.name,this.setState({confirmInput:a}),e){case"confirmInput":this.setState({confirmInputError:"",passwordInputError:""});break;case"checkInput":this.setState({checkInputError:""})}}),this.handleForm=(()=>{const{fullNameInput:e,emailInput:t,passwordInput:a,confirmInput:r}=this.state,{register:n,translate:s}=this.props;let i=!1,l=e.trim().toLowerCase();(l.indexOf("test")>-1||l.indexOf("demo")>-1||l.indexOf("asd")>-1||l.length<4)&&(this.setState({fullNameInputError:s("signup.validNameError")}),i=!0),I.a.isValidEmail(t)||(this.setState({emailInputError:s("signup.validEmailError")}),i=!0),""===a&&(this.setState({passwordInputError:s("signup.passwordRequiredError")}),i=!0),""===r?(this.setState({confirmInputError:s("signup.confirmRequiredError")}),i=!0):r!==a&&(this.setState({passwordInputError:s("signup.passwordEqualConfirmError"),confirmInputError:s("signup.confirmEqualPasswordError")}),i=!0),i||n({email:t,password:a,fullName:e})}),this.state={fullNameInput:"",fullNameInputError:"",emailInput:"",emailInputError:"",passwordInput:"",passwordInputError:"",confirmInput:"",confirmInputError:""},this.handleForm=this.handleForm.bind(this)}render(){const{classes:e,translate:t}=this.props;return n.a.createElement(g.f,{container:!0},n.a.createElement(g.f,{item:!0,xs:12,className:e.contain},n.a.createElement("h1",{className:"g__app-name"},m.a.settings.appName),n.a.createElement("div",{className:"animate-bottom"},n.a.createElement(o.a,{className:e.paper,elevation:1},n.a.createElement("div",{style:{padding:"48px 40px 36px"}},n.a.createElement("div",{style:{paddingLeft:"40px",paddingRight:"40px"}},n.a.createElement("h2",{className:"zoomOutLCorner animated g__paper-title"},t("signup.title"))),n.a.createElement(p.a,{className:e.textField,autoFocus:!0,onChange:this.handleFullNameInputChange,helperText:this.state.fullNameInputError,error:""!==this.state.fullNameInputError.trim(),name:"fullNameInput",label:t("signup.fullNameLabel"),type:"text"}),n.a.createElement("br",null),n.a.createElement(p.a,{className:e.textField,onChange:this.handleEmailInputChange,helperText:this.state.emailInputError,error:""!==this.state.emailInputError.trim(),name:"emailInput",label:t("signup.emailLabel"),type:"email"}),n.a.createElement("br",null),n.a.createElement(p.a,{className:e.textField,onChange:this.handlePasswordInputChange,helperText:this.state.passwordInputError,error:""!==this.state.passwordInputError.trim(),name:"passwordInput",label:t("signup.passwordLabel"),type:"password"}),n.a.createElement("br",null),n.a.createElement(p.a,{className:e.textField,onChange:this.handlePasswordConfirmInputChange,helperText:this.state.confirmInputError,error:""!==this.state.confirmInputError.trim(),name:"confirmInput",label:t("signup.confirmPasswordLabel"),type:"password"}),n.a.createElement("br",null),n.a.createElement("br",null),n.a.createElement("div",{className:"signup__button-box"},n.a.createElement("div",null,n.a.createElement(c.a,{onClick:this.props.loginPage},t("signup.loginButton"))),n.a.createElement("div",null,n.a.createElement(c.a,{variant:"contained",color:"primary",onClick:this.handleForm},t("signup.createButton")))))))))}})))},895:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(1130);t.default=r.a}});
  //# sourceMappingURL=1.e2ab163f.chunk.js.map