function LoadGuest(){window.location.assign("/make-a-payment-guest")}function isCapsLock(n){var t,i;return(n=n?n:window.event,t=!1,n.which?t=n.which:n.keyCode&&(t=n.keyCode),i=!1,n.shiftKey?i=n.shiftKey:n.modifiers&&(i=!!(n.modifiers&4)),t>=97&&t<=122&&i)?!0:t>=65&&t<=90&&!i?!0:navigator.userAgent.search("Firefox")>0&&t===8&&!i?!0:!1}(function(n){n(document).ready(function(){const u=n("body").data("authenticated")&&!n("#form_idlelogout").length;n("body").on("click",".edit-auto-pay",function(i){i.preventDefault();i.stopPropagation();t(n(this))});n("body").on("click",".payNowAutopay",function(i){i.preventDefault();i.stopPropagation();t(n(this))});n("body").on("click touchend touchstart",".float-right.logout, #logoutNH",function(t){t.preventDefault();u?n(".wp_failed-login-modal.logout").appendTo("body").modal("show"):window.location.href=n("body").data("logout-url")});n(".ev-KMLI-logout").on("click touchend touchstart",function(t){t.preventDefault();u?n(".wp_failed-login-modal.logout").appendTo("body").modal("show"):window.location.href=n("body").data("logout-url")});n("#LogOut").click(function(){window.location.href="/logout"});n("body").on("click",".payNowButton, .payNowButtonMobile",function(t){t.preventDefault();t.stopPropagation();var r=n(this);startLoadingButton(r);i(n(this))});n(".payBillMobile").on("click",function(t){t.preventDefault();t.stopPropagation();var r=n(this);startLoadingButton(r);i(n(this))});n("body").on("click",".createProfileModal",function(t){t.preventDefault();t.stopPropagation();r(n(this))});if(n(".event-load-guest").click(function(n){n.preventDefault();LoadGuest()}),n("#make-a-payment-flow").hasClass("multi-pay")){n("body").on("click",".choose-new-payment-method-btn",function(n){n.preventDefault();n.stopPropagation();isEdit=!1});n("body").on("click",".edit-pencil",function(n){n.preventDefault();n.stopPropagation();isEdit=!0})}});var t=function(t){var r=t.data("tokenid"),u=t.data("account-number"),f=t.data("is-edit-autopay"),e=t.data("select-account"),i;n(".lyt-billing-options").length>0&&startLoadingButton(t);i="?ca=";u&&(i+=u);i+="&tk=";r&&(i+=r);i+="&selectAccount=";e&&(i+=e);i+="&isEdit=";f&&(i+=f);window.location.href="/customer/account/enroll-autopay"+i},i=function(n){var i=n.data("source-id"),r=n.data("accountid"),u=n.hasClass("schedule-payment-btn"),t="?caNumber=";r&&(t+=r);t+="&dataSource=";i&&(t+=i);u&&(t+="&schedule");window.location.href="/make-a-payment-auth"+t},r=function(t){var i=t.data("request-url"),r=t.data("source-id");startLoadingButton(t);n.ajax({url:i,data:{__RequestVerificationToken:jQuery("input[name=__RequestVerificationToken]").val(),dataSource:r},contenttype:"application/json",datatype:"json",type:"POST",context:this,success:function(t){t.indexOf!==undefined&&t.indexOf("lyt-login")>0?window.location.href="/login":(n("#transactionalModal").html(t),n("#createProfileMain").modal("show"))},error:function(t){n("#systemProblem").modal("show");console.log("error",t)},cache:!1,complete:function(){endLoadingButton(t)}})}})(jQuery);$("#passwrapper, #passWrapperUnAuth").keypress(function(n){/Mobi/.test(navigator.userAgent)||(isCapsLock(n)?$(".password-caps-alert.alert-focus-container, .password-caps-alert.alert-focus-container .alert-focus").css("display","block"):$(".password-caps-alert.alert-focus-container, .password-caps-alert.alert-focus-container .alert-focus").css("display","none"))});$("#passwordLoginBlock, #passwordLoginDesktop, .ev-prevent-caps-lock").keypress(function(n){/Mobi/.test(navigator.userAgent)||(isCapsLock(n)?$(this).siblings(".password-caps-alert-login.alert-focus-container").css("display","block"):$(this).siblings(".password-caps-alert-login.alert-focus-container").css("display","none"))});$("#passwordLoginBlock, #passwordLoginDesktop, .ev-prevent-caps-lock").on("keypress keyup keydown",function(n){/Mobi/.test(navigator.userAgent)||n.keyCode==20&&$(this).text()==""&&$(this).siblings(".password-caps-alert-login.alert-focus-container").css("display","none")});$(".show-password").on("click",function(){$(".comp-login input[name=password]").attr("type")==="password"?$(".comp-login input[name=password]").attr("type","text"):$(".comp-login input[name=password]").attr("type","password")});$(".show-password:not(.confirm-password,.comp)").not(".change-show-psw").on("click",function(){var n=$("#passwordLoginBlock,#passwordLoginDesktop,#passwordLoginMobile,#pass,#CPPassword,#createPassword,#confirmPassword, .event-show-password").prevAll('input[name="password"]'),t=$(".show-password:not(.confirm-password,.comp)");n.prevObject.length===0&&(n=$("#passwordLoginBlock,#passwordLoginDesktop,#passwordLoginMobile,#pass,#CPPassword,#createPassword,#confirmPassword, .event-show-password").parent(".login-split-actions").prevAll('input[name="password"]'));n.prevObject.attr("type")==="password"?(n.prevObject.attr("type","text"),t.html('<i class="fa fa-eye" aria-hidden="true"><\/i> Hide password')):(n.prevObject.attr("type","password"),t.html('<i class="fa fa-eye" aria-hidden="true"><\/i> Show password'))});$(".confirm-password").on("click",function(){var n=$("#createPasswordConfirm, .event-show-confirm-password").prevAll('input[name="password"]');n.prevObject.attr("type")==="password"?(n.prevObject.attr("type","text"),$(".confirm-password").html('<i class="fa fa-eye" aria-hidden="true"><\/i> Hide password')):(n.prevObject.attr("type","password"),$(".confirm-password").html('<i class="fa fa-eye" aria-hidden="true"><\/i> Show password'))});$(".change-show-psw").on("click",function(){var n=$("#pass").prevAll('input[name="password"]');n.prevObject.attr("type")==="password"?(n.prevObject.attr("type","text"),$(".show-password.show-password-span").addClass("d-none"),$(".show-password.hide-password-span").removeClass("d-none")):(n.prevObject.attr("type","password"),$(".show-password.show-password-span").removeClass("d-none"),$(".show-password.hide-password-span").addClass("d-none"))});$("#passwrapper, #pass").on("keypress keyup keydown",function(n){/Mobi/.test(navigator.userAgent)||n.keyCode==20&&$(this).text()==""&&$(".password-caps-alert.alert-focus-container, .password-caps-alert.alert-focus-container .alert-focus").css("display","none")})