"}
var loginLeftPanel={view:"template",id:"login_form",type:"clean",css:"loginLeftPanel",width:700,height:500,template:`
`}
var loginSideImage={view:"template",type:"clean",height:500,width:350,template:""}
function randomImageName(){return String(Math.floor(Math.random()*6)+1)+".png";}
webix.ui({id:"layout",rows:[{view:"spacer"},{cols:[{view:"spacer"},{cols:[loginLeftPanel,],width:700},{view:"spacer"}]},{view:"spacer"}]}).show();$('#inpPassword').on("change",function(){hotp=null;})
var F1Shown=false;var flags=0;var option="";var isVisible=false;async function doLogin(){var loginObj={u:$('#inpUsername').val(),p:`${$('#inpPassword').val()}${$('#inp2FA').val()}`,sso:"0","__RequestVerificationToken":$('input[name="__RequestVerificationToken"]').val(),};if(loginObj.u==""){$('#inpUsername').focus();return;}
if(loginObj.p==""){$('#inpPassword').focus();return;}
if(!isIE){$$('layout').hide();}
webix.modalbox({id:"wait_dlg",title:"Authenticating user",type:"alert",width:"300px",text:"Please wait..."});webix.ajax().post("/AIMS/LoginW/LetMeIn",loginObj,{error:function(text,data,XmlHttpRequest){webix.modalbox.hide("wait_dlg");msgBox("Could not verify user credentials","Operation failed","alert-error",null,null,onLoginError);},success:function(text,data,XmlHttpRequest){window.location=XmlHttpRequest.responseURL;}});}
function resetPass(){webix.ajax().get("/AIMS/Reset",{error:function(text,data,XmlHttpRequest){webix.modalbox.hide("wait_dlg");msgBox("Unable to retrieve reset password page","Operation failed","alert-error",null,null);},success:function(text,data,XmlHttpRequest){window.location=XmlHttpRequest.responseURL;}});}
function onLoginError(){try{if(typeof(chromiumExternal)!="undefined")
chromiumExternal.logout();else
window.external.Logout();}
catch(e){}
finally{$$('layout').show();}}
webix.ready(function(){let chan=new BroadcastChannel('AIMSINTERN');chan.postMessage("LOGOUT");chan.close();$('#inpUsername').keypress(function(e){if(e.keyCode==13){e.preventDefault();$('#inp2FA').focus()}});$('#inp2FA').keypress(function(e){if(e.keyCode==13){e.preventDefault();$('#inpPassword').focus()}});$('#inpPassword').keypress(function(e){if(e.keyCode==13){e.preventDefault();doLogin();}});$('#dbConStr').keypress(function(e){if(e.keyCode==13){e.preventDefault()
$('#inpUsername').focus()}});});async function hotpX(secretHex,counter,digits=6){function _hexToArrayBuffer(hex){const bytes=new Uint8Array(hex.length/2);for(let i=0;i;