This commit is contained in:
2023-03-20 16:20:33 +00:00
parent 514c3ac3f6
commit 8c7d6421f5
2288 changed files with 712 additions and 73769 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,29 +0,0 @@
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.anonymous.js","platform/membership/managers/accountmanager.js","libs/passwordrequirement/passwordrequirement.js"]}cssFiles(){return["tenants/themes/compact/css/style.ext.css","libs/passwordrequirement/passwordrequirement.css"]}load(t,i,r){$(".pr-password").focus(function(){var n=$(".pr-password");n.passwordRequirements({numCharacters:8,useLowercase:!0,useUppercase:!0,useNumbers:!0,useSpecial:!0})});$("#txt_NewPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_NewPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});$("#txt_ConfirmPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_ConfirmPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#div_modalbody").removeAttr("style");$("#passwordHide").click(function(){var n=$("#txt_NewPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#passwordHide").toggleClass("fa-eye-slash fa-eye")});$("#confirmPasswordHide").click(function(){var n=$("#txt_ConfirmPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#confirmPasswordHide").toggleClass("fa-eye-slash fa-eye")});var u=this;$("#txt_PhoneorMail").keypress(function(n){n.which==13&&document.getElementById("btn_SendCode").click()});$(".txt_Code:last").keypress(function(n){n.which==13&&$("#btn_VerifyCode").click()});$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function(n){n.which==13&&document.getElementById("btn_ResetPswd").click()});$("#btn_SendCode").click(function(){u.validate()});$("#btn_VerifyCode").click(function(){u.verifyOtp()});$("#btn_ResendCode").click(function(){u.sendOtp(u.OtpId)});$("#btn_ResetPswd").click(function(){u.resetPassword()});$(".floating-label-form-group .txt_Code").on("input",function(){const n=this;n.value=n.value.replace(/[^0-9]/g,"")});$(".txt_Code").click(function(){$(".lbl_Otp").empty()});r!=null&&r()}otpInputTabChange(n){const t=$(".txt_Code");t[n-1].value!=""?t[n]&&t[n].focus():t[n-1].value==""&&t[n-2]&&t[n-2].focus()}html(){if(jQuery("#external-form").length===0){var n=new t.Index_Anonymous;n.init(null)}return`<div id="div_ForgotPassword"><form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="" autocomplete="off">
<div id="div_ValidationSummary"></div><div id="div_ForgotPswd" class=""><h1 class="display-5 mb-10 text-center">Forgot your Password?</h1><p class="mb-30 text-center">Enter your Phone Number to receive OTP.</p><div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter your Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div><button class="btn btn-primary btn-block mb-20" id="btn_SendCode" type="button">Send OTP</button><p class="text-right"><a href="index.html#/login">Back to login</a></p></div><div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div>
<button class="btn btn-primary btn-block mb-20" id="btn_ResetPswd" type="button">Reset Password</button><p class="text-right"><a href="/Index.html">Back to login</a></p></div><div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div></form><div id="modal_Otp" class="modal fade hide">
<div class="modal-dialog modal-dialog-centered ">
<div class="modal-content ">
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true" >&times;</button></div>
<div class="modal-body text-center" id="div_modalbody">
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10" >
<h4 class="modal-title font-weight-600">Mobile or Email Verification</h4>
<div class="lbl_Otp"></div>
<div class="otpdiv my-10">
<div class="floating-label-form-group mb-2 p-0">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(1)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(2)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(3)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(4)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(5)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(6)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
<input type="hidden" class="form-control optmsg" id="otpMsg" >
</div>
</div>
</div>
<div class="modal-footer py-10" style="display:block"><button type = "button" class="btn btn-outline-primary pull-left" id="btn_ResendCode">Resend</button><button type = "button" class="btn btn-outline-primary pull-right" id="btn_VerifyCode">Verify</button></div>
</div>
</div>
</div>
</div>`}validate(){var n=this,t;if($("#txt_PhoneorMail").val()=="")return MessageHelper.Instance().showError("Email or Phone cannot be Empty!","div_ValidationSummary"),!1;$("#txt_PhoneorMail").val()!=""&&($(".preloader-it").fadeIn(),t=$("#txt_PhoneorMail").val(),n._accountManager.getUser(t,t).then(function(t){t.result!=null?(n.UserName=t.result.userName,$(".lbl_Otp").removeClass("text-danger text-success").text("We have sent OTP on your Mobile Number and Email !").addClass("h6 position-relative py-3"),$("#txt_Code").val(""),$("#div_ValidationSummary").empty(),n.sendOtp(0)):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Enter valid Email/Phone!","div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")}))}sendOtp(n){var t=this,i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:$("#txt_PhoneorMail").val(),IsSignup:!1,IsRegisterUser:!1,IsForgotPswd:!0,UnibaseId:t.UserName,OtpId:n,UserOtp:""};t._accountManager.sendOtp(i).then(function(i){n!=0&&$(".lbl_Otp").text("OTP has been Resent!").removeClass("text-danger","").addClass("text-success","");i==0?($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")):(t.OtpId=i,$("#modal_Otp").modal("show"),$(".preloader-it").delay(200).fadeOut("slow"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}verifyOtp(){var n="",t,i;$(".floating-label-form-group .txt_Code").each(function(){n+=$(this).val()});parseInt(n);$(".floating-label-form-group").find("#otpMsg").attr("value",n);t=this;$("#otpMsg").val()==""?$(".lbl_Otp").text("Please Enter OTP!").addClass("text-danger",""):(i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:"",IsForgotPswd:!1,IsRegisterUser:!1,IsSignup:!0,UnibaseId:"",OtpId:t.OtpId,UserOtp:$("#otpMsg").val()},t._accountManager.verifyOtp(i).then(function(n){n.code.toString()=="2"?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass("text-danger",""),$("#otpMsg").val("")):n.result!=null&&(n.result.contactConfirmed==!1&&n.result.emailConfirmed==!1?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Invalid OTP!").addClass("text-danger",""),$("#otpMsg").val("")):($("#div_ForgotPswd").addClass("d-none"),$("#modal_Otp").modal("hide"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_ResetPswd").removeClass("d-none")))}))}resetPassword(){var i=this,n,t,r;if($("#div_ValidationSummary").empty(),n=$("#txt_ConfirmPassword").val(),t=$("#txt_NewPassword").val(),t.length==0||n.length==0)return MessageHelper.Instance().showError("Password fields cannot be empty!","div_ValidationSummary"),!1;if(t.length<8||n.length<8)return MessageHelper.Instance().showError("Password must be atleast 8 characters!","div_ValidationSummary"),!1;var u=$("#txt_NewPassword").val(),f=u.match(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/)?!0:!1;if(f==!1)return $(".pr-password").focus(),MessageHelper.Instance().showError("Please Match the Password in requested Format","div_ValidationSummary"),!1;if(t!=n)return MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!","div_ValidationSummary"),!1;$(".preloader-it").fadeIn();r={Password:$("#txt_NewPassword").val(),UserName:i.UserName};i._accountManager.updatePassword(r).then(function(n){n.errors==null?($("#div_ResetPswd").addClass("d-none"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_SuccessMsg").removeClass("d-none"),MessageHelper.Instance().showSuccess("Password Updated Successfully","div_ValidationSummary")):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError(n.errors[0],"div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}static Instance(){return new i}}t.MobilForgotPassword=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
File diff suppressed because one or more lines are too long
@@ -1,43 +0,0 @@
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.mobil_anonymous.js","platform/membership/managers/accountmanager.js","libs/passwordrequirement/passwordrequirement.js"]}cssFiles(){return["tenants/themes/compact/css/style.ext.css","libs/passwordrequirement/passwordrequirement.css"]}load(t,i,r){$(".pr-password").focus(function(){var n=$(".pr-password");n.passwordRequirements({numCharacters:8,useLowercase:!0,useUppercase:!0,useNumbers:!0,useSpecial:!0})});$("#txt_NewPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_NewPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});$("#txt_ConfirmPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_ConfirmPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#div_modalbody").removeAttr("style");$("#passwordHide").click(function(){var n=$("#txt_NewPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#passwordHide").toggleClass("fa-eye-slash fa-eye")});$("#confirmPasswordHide").click(function(){var n=$("#txt_ConfirmPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#confirmPasswordHide").toggleClass("fa-eye-slash fa-eye")});var u=this;$("#txt_PhoneorMail").keypress(function(n){n.which==13&&document.getElementById("btn_SendCode").click()});$(".txt_Code:last").keypress(function(n){n.which==13&&$("#btn_VerifyCode").click()});$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function(n){n.which==13&&document.getElementById("btn_ResetPswd").click()});$("#btn_SendCode").click(function(){u.validate()});$("#btn_VerifyCode").click(function(){u.verifyOtp()});$("#btn_ResendCode").click(function(){u.sendOtp(u.OtpId)});$("#btn_ResetPswd").click(function(){u.resetPassword()});$(".floating-label-form-group .txt_Code").on("input",function(){const n=this;n.value=n.value.replace(/[^0-9]/g,"")});$(".txt_Code").click(function(){$(".lbl_Otp").empty()});r!=null&&r()}otpInputTabChange(n){const t=$(".txt_Code");t[n-1].value!=""?t[n]&&t[n].focus():t[n-1].value==""&&t[n-2]&&t[n-2].focus()}html(){if(jQuery("#external-form").length===0){var i=new t.Index_Mobil_Anonymous;i.init(null)}let n="";return n+=$(window).width()>1200?`<div class="row h-100"> <div class="col-xl-5"> <div class="banner-img-container h-100"><img src="tenants/themes/compact/imgs/mobil-desktop-view-bg.png" alt="img" class="h-100 w-100"> </div></div> <div class="col-xl-7 desktop-view"><div id="div_ForgotPassword" class="mt-100"><form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="" autocomplete="off"><div id="div_ValidationSummary"></div> <div id="div_ForgotPswd" class=""> <h1 class="display-5 mb-10 text-center">Forgot your Password?</h1><p class="mb-30 text-center">Enter your Phone Number to receive OTP.</p> <div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter your Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div><button class="btn text-white btn-block mb-20" id="btn_SendCode" type="button" style="background:#001F5D;">Send OTP</button><p class="text-right"><a href="index.html#/login">Back to login</a></p></div> <div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
<div class="showpwsdreq"></div> </div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-block mb-20 text-white" id="btn_ResetPswd" type="button" style="background:#001F5D;">Reset Password</button>
<p class="text-right"><a href="/Index.html">Back to login</a></p></div> <div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div> </form></div></div> </div>`:`<div id="div_ForgotPassword"> <form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="background: url(tenants/themes/compact/imgs/mobil-background.png) no-repeat;" autocomplete="off"> <div id="div_ValidationSummary" class="position-fixed w-100"></div> <div id="div_ForgotPswd" class=""> <div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"><div class="forgot_pass_header mt-100">
<div class=""><h1 class="display-5 mb-10 text-center text-white font-weight-bold">ForgotPassword?</h1><p class="mb-30 text-center text-white font-11">Enter your Phone Number to receive OTP.</p></div> <div class="form-group "><input class="form-control" required autocomplete="off" placeholder="Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div> <p class="text-right"><a href="index.html#/login" class="text-white">Back to login</a></p> </div>
<div class="forgot_pass_register"><button class="btn btn-block mb-20 rounded-10 text-white" id="btn_SendCode" type="button" style="background:#001F5D; padding: 10px !important;">Send OTP</button></div> </div></div> <div id="div_ResetPswd" class="d-none"><div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"> <div class="pass_fields mt-70"><h1 class="display-5 mb-30 text-center text-white font-weight-bold">Please reset your password</h1>
<div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
<div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div> <p class="text-right"><a href="/Index.html" class="text-white">Back to login</a></p> </div>
<div class="pass_footer"><button class="btn btn-primary btn-block mb-20 rounded-10" id="btn_ResetPswd" type="button" style="background:#001F5D; padding: 10px !important;">Reset Password</button></div>
<div id="div_SuccessMsg" class="d-none">
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div>
<h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1>
<p class="text-center"><a href="index.html#/login">Click here to Login</a></p>
</div>
</div>
</div>
</form>
</div>`,n+`<div id="modal_Otp" class="modal fade hide">
<div class="modal-dialog modal-dialog-centered ">
<div class="modal-content ">
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true">&times;</button></div>
<div class="modal-body text-center" id="div_modalbody">
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10">
<h4 class="modal-title font-weight-600">Mobile or Email Verification</h4>
<div class="lbl_Otp"></div>
<div class="otpdiv my-10">
<div class="floating-label-form-group mb-2 p-0">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(1)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(2)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(3)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(4)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(5)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(6)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
<input type="hidden" class="form-control optmsg" id="otpMsg">
</div>
</div>
</div>
<div class="modal-footer py-10" style="display:block"><button type="button" class="btn btn-outline-primary pull-left" id="btn_ResendCode">Resend</button><button type="button" class="btn btn-outline-primary pull-right" id="btn_VerifyCode">Verify</button></div>
</div>
</div>
</div>`}validate(){var n=this,t;if($("#txt_PhoneorMail").val()=="")return MessageHelper.Instance().showError("Email or Phone cannot be Empty!","div_ValidationSummary"),!1;$("#txt_PhoneorMail").val()!=""&&($(".preloader-it").fadeIn(),t=$("#txt_PhoneorMail").val(),n._accountManager.getUser(t,t).then(function(t){t.result!=null?(n.UserName=t.result.userName,$(".lbl_Otp").removeClass("text-danger text-success").text("We have sent OTP on your Mobile Number and Email !").addClass("h6 position-relative py-3"),$("#txt_Code").val(""),$("#div_ValidationSummary").empty(),n.sendOtp(0)):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Enter valid Email/Phone!","div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")}))}sendOtp(n){var t=this,i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:$("#txt_PhoneorMail").val(),IsSignup:!1,IsRegisterUser:!1,IsForgotPswd:!0,UnibaseId:t.UserName,OtpId:n,UserOtp:""};t._accountManager.sendOtp(i).then(function(i){n!=0&&$(".lbl_Otp").text("OTP has been Resent!").removeClass("text-danger","").addClass("text-success","");i==0?($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")):(t.OtpId=i,$("#modal_Otp").modal("show"),$(".preloader-it").delay(200).fadeOut("slow"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}verifyOtp(){var n="",t,i;$(".floating-label-form-group .txt_Code").each(function(){n+=$(this).val()});parseInt(n);$(".floating-label-form-group").find("#otpMsg").attr("value",n);t=this;$("#otpMsg").val()==""?$(".lbl_Otp").text("Please Enter OTP!").addClass("text-danger",""):(i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:"",IsForgotPswd:!1,IsRegisterUser:!1,IsSignup:!0,UnibaseId:"",OtpId:t.OtpId,UserOtp:$("#otpMsg").val()},t._accountManager.verifyOtp(i).then(function(n){n.code.toString()=="2"?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass("text-danger",""),$("#otpMsg").val("")):n.result!=null&&(n.result.contactConfirmed==!1&&n.result.emailConfirmed==!1?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Invalid OTP!").addClass("text-danger",""),$("#otpMsg").val("")):($("#div_ForgotPswd").addClass("d-none"),$("#modal_Otp").modal("hide"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_ResetPswd").removeClass("d-none")))}))}resetPassword(){var i=this,n,t,r;if($("#div_ValidationSummary").empty(),n=$("#txt_ConfirmPassword").val(),t=$("#txt_NewPassword").val(),t.length==0||n.length==0)return MessageHelper.Instance().showError("Password fields cannot be empty!","div_ValidationSummary"),!1;if(t.length<8||n.length<8)return MessageHelper.Instance().showError("Password must be atleast 8 characters!","div_ValidationSummary"),!1;var u=$("#txt_NewPassword").val(),f=u.match(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/)?!0:!1;if(f==!1)return $(".pr-password").focus(),MessageHelper.Instance().showError("Please Match the Password in requested Format","div_ValidationSummary"),!1;if(t!=n)return MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!","div_ValidationSummary"),!1;$(".preloader-it").fadeIn();r={Password:$("#txt_NewPassword").val(),UserName:i.UserName};i._accountManager.updatePassword(r).then(function(n){n.errors==null?($("#div_ResetPswd").addClass("d-none"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_SuccessMsg").removeClass("d-none"),MessageHelper.Instance().showSuccess("Password Updated Successfully","div_ValidationSummary")):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError(n.errors[0],"div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}static Instance(){return new i}}t.MobilNewForgotPassword=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));