try{const e=(e,r)=>{let t={};return t[e]={theme:"relax",text:r,type:e,layout:"topRight",progressBar:!0,closeWith:["click","button"],timeout:6e3,sounds:{sources:["/storage/sounds/Ting.mp3"],volume:.5,conditions:["docHidden","docVisible"]}},"success"===t[e].type&&(t[e].theme="relax"),"error"===t[e].type&&(t[e].theme="sunset"),new Noty(t[e]).show()},r=document.querySelector("input.image"),t=document.querySelector(".submit-btn"),i=document.querySelector("form"),s=document.querySelector("#name").value.trim(),o=document.querySelector("#email").value.trim(),l=document.querySelector("#password").value.trim(),a=/\S+@\S+\.\S+/,n=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/,m=o.indexOf("@"),u=o.indexOf(".");t.addEventListener("click",(t=>{if(""===s)return e("error","Name is Required ❌");if(""===o)return e("error","Email is Required ❌");if(""===l)return e("error","Password is Required ❌");if(s.length<3){e("error","Name must be at least 6 Characters Long ❌")}else if(l.length<6){e("error","Password must be at least 6 Characters Long ❌")}else if(o.match(a))if(o.match(n))if(m<1||u<m+2||u+2>=o.length){e("error","Invalid Email Address ❌")}else{if(r.files.length>0){if(r.files[0].size>3145728){return void e("error","Image size must be less than 3MB ❌")}if("image/jpeg"!==r.files[0].type&&"image/png"!==r.files[0].type&&"image/jpg"!==r.files[0].type&&"image/gif"!==r.files[0].type&&"image/svg"!==r.files[0].type){return void e("error","Image must be in jpeg, png, jpg, gif or svg format ❌")}}i.submit()}else{e("error","Invalid Email Address ❌")}else{e("error","Invalid Email Address ❌")}}))}catch(e){console.log(e)}