function setLocationHashToHiddenField(n){var t=$('input[name="'+n+'"]');t!=null&&t.val(window.location.hash)}function checkUserName(){let n=document.querySelector("#email-login-container"),i=document.querySelector("#check-user-name-field"),t=i.value;if(t){n.classList.add("property-loading");let i=document.querySelector(".mfa-login-enabled"),r=document.querySelector("#Username"),u=document.querySelector("#Password");r.value=t;fetch("/api/login/ValidateUsername",{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({UserName:t})}).then(n=>n.json()).then(n=>n.Data).then(t=>{t.RedirectToTenantLogin?(document.getElementById("login-form").submit(),setTimeout(function(){n.classList.remove("property-loading")},5e3)):(i.setAttribute("step",1),n.classList.remove("property-loading"),u.focus())})}}document.addEventListener("DOMContentLoaded",function(){let n=document.querySelector("#check-user-name-field");n.addEventListener("keydown",function(n){n.key==="Enter"&&(n.preventDefault(),checkUserName())})})