"+i.substring(20)),QH("d2optinfo",'Install Google Authenticator or a compatible application, use this link or enter the secret below. Then, enter the current 6 digit token to activate 2-Step login.
'+i+'
Token:
'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"2-step login activation successful. You will now need a valid token to login again.":"2-step login activation failed. Clear the secret from the application and try again. You only have a few minutes to enter the proper code.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Authenticator App",1,null,t.success?"2-step login activation removed. You can reactivate this feature at any time.":"2-step login activation removal failed. Try again.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="One time tokens can be used as secondary authentication. Generate a set, print them and keep them in a safe place.";if(a+="
",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="
","otpauth-manage");break;case"event":if(t.event.noact)break;switch(t.event.action){case"userWebState":if(null!=localStorage){var d=JSON.parse(t.event.state);for(var l in d)localStorage.setItem(l,d[l]);null!=d.loctag&&d.loctag!=oldLoctag&&(null!=d.loctag?args.locale=d.loctag:delete args.locale,updateDevices(),updateMeshes())}break;case"accountchange":if(userinfo.name==t.event.account.name){var p=t.event.account.siteadmin?t.event.account.siteadmin:0,c=userinfo.siteadmin?userinfo.siteadmin:0;(t.event.account.quota!=userinfo.quota||0==(8&userinfo.siteadmin)&&0!=(8&t.event.account.siteadmin))&&meshserver.send({action:"files"}),userinfo=t.event.account,c!=p&&updateSiteAdmin(),updateSelf()}break;case"createmesh":null!=t.event.links[userinfo._id]&&(meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},updateMeshes(),updateDevices(),meshserver.send({action:"files"}));break;case"meshchange":if(null==meshes[t.event.meshid])meshes[t.event.meshid]={_id:t.event.meshid,name:t.event.name,mtype:t.event.mtype,desc:t.event.desc,links:t.event.links},meshserver.send({action:"nodes"});else{if(meshes[t.event.meshid].name!=t.event.name)for(var l in meshes[t.event.meshid].name=t.event.name,nodes)nodes[l].meshid==t.event.meshid&&(nodes[l].meshnamel=t.event.name.toLowerCase());if(meshes[t.event.meshid].desc=t.event.desc,meshes[t.event.meshid].links=t.event.links,null==meshes[t.event.meshid].links[userinfo._id]){20==xxcurrentView&¤tMesh==meshes[t.event.meshid]&&go(2),delete meshes[t.event.meshid];var u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,10<=xxcurrentView&&xxcurrentView<20&¤tNode&¤tNode.meshid==t.event.meshid&&(setDialogMode(0),go(2))}}updateMeshes(),updateDevices(),meshserver.send({action:"files"}),20==xxcurrentView&¤tMesh._id==t.event.meshid&&p20updateMesh();break;case"deletemesh":meshes[t.event.meshid]&&(delete meshes[t.event.meshid],updateMeshes(),meshserver.send({action:"files"}));u=[];for(var l in nodes)nodes[l].meshid!=t.event.meshid&&u.push(nodes[l]);nodes=u,updateDevices(),20<=xxcurrentView&&xxcurrentView<30&¤tMesh._id==t.event.meshid&&(setDialogMode(0),go(2)),10<=xxcurrentView&&xxcurrentView<20&¤tNode&¤tNode.meshid==t.event.meshid&&(setDialogMode(0),go(2));break;case"addnode":var m=t.event.node;if(!meshes[m.meshid])break;if(null!=getNodeFromId(m._id))break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices();break;case"removenode":var h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1),updateDevices()}break;case"changenode":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).name=t.event.node.name,m.rname=t.event.node.rname,m.host=t.event.node.host,m.desc=t.event.node.desc,m.publicip=t.event.node.publicip,m.iploc=t.event.node.iploc,m.wifiloc=t.event.node.wifiloc,m.gpsloc=t.event.node.gpsloc,m.tags=t.event.node.tags,m.userloc=t.event.node.userloc,null!=t.event.node.agent&&(null==m.agent&&(m.agent={}),null!=t.event.node.agent.ver&&(m.agent.ver=t.event.node.agent.ver),null!=t.event.node.agent.id&&(m.agent.id=t.event.node.agent.id),null!=t.event.node.agent.caps&&(m.agent.caps=t.event.node.agent.caps),null!=t.event.node.agent.core?m.agent.core=t.event.node.agent.core:m.agent.core&&delete m.agent.core,m.agent.tag=t.event.node.agent.tag),null!=t.event.node.intelamt&&(null==m.intelamt&&(m.intelamt={}),null!=t.event.node.intelamt.state&&(m.intelamt.state=t.event.node.intelamt.state),null!=t.event.node.intelamt.host&&(m.intelamt.user=t.event.node.intelamt.host),null!=t.event.node.intelamt.user&&(m.intelamt.user=t.event.node.intelamt.user),null!=t.event.node.intelamt.tls&&(m.intelamt.tls=t.event.node.intelamt.tls),null!=t.event.node.intelamt.ver&&(m.intelamt.ver=t.event.node.intelamt.ver),null!=t.event.node.intelamt.tag&&(m.intelamt.tag=t.event.node.intelamt.tag),null!=t.event.node.intelamt.uuid&&(m.intelamt.uuid=t.event.node.intelamt.uuid),null!=t.event.node.intelamt.realm&&(m.intelamt.realm=t.event.node.intelamt.realm)),m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,t.event.node.icon&&(m.icon=t.event.node.icon),refreshDevice(m._id),updateDevices();break;case"nodemeshchange":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h){m=nodes[h];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(h,1)):(m.meshid=t.event.newMeshId,m.meshnamel=meshes[t.event.newMeshId].name.toLowerCase()),updateDevices(),refreshDevice(t.event.nodeid)}else{m=t.event.node;if(!meshes[m.meshid])break;m.namel=m.name.toLowerCase(),m.rname?m.rnamel=m.rname.toLowerCase():m.rnamel=m.namel,m.meshnamel=meshes[m.meshid].name.toLowerCase(),m.state=0,m.icon||(m.icon=1),m.ident=++nodeShortIdent,nodes.push(m),updateDevices()}break;case"nodeconnect":h=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){h=l;break}if(-1!=h)(m=nodes[h]).conn=t.event.conn,m.pwr=t.event.pwr,updateDevices();break;case"login":null!=users&&users["user/"+domain+"/"+t.event.username.toLowerCase()]&&(users["user/"+domain+"/"+t.event.username.toLowerCase()].login=t.event.time)}}}function topMenu(e){null!=xxdialogMode&&0!=xxdialogMode&&999!=xxdialogMode||(void 0===e?1==("none"==QS("topMenu").display)?0!=xxdialogMode&&null!=xxdialogMode||(QV("topMenu",!0),xxdialogMode=999):(QV("topMenu",!1),xxdialogMode=0):(QV("topMenu",!1),xxdialogMode=0,1==e&&3!=xxcurrentView&&goForward("account"),2==e&&5!=xxcurrentView&&goForward("files")))}var filetreelinkpath,backStack=[];function goBack(){xxdialogMode||(0'+e[n].n,o=e[n].n;QH("footerMenu","
","otpauth-request"),meshserver.send({action:"otpauth-request"}))}function account_addOtpCheck(e){var t=6==Q("d2otpauthinput").value.length;QE("idx_dlgOkButton",t),e&&13==e.keyCode&&t&&dialogclose(1)}function account_removeOtp(){xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||setDialogMode(2,"Authenticator App",3,function(){meshserver.send({action:"otpauth-clear"})},"Confirm removal of authenticator application 2-step login?")}function account_manageOtp(e){2==xxdialogMode&&"otpauth-manage"==xxdialogTag&&dialogclose(0),xxdialogMode||1!=userinfo.otpsecret||0==(4096&features)||meshserver.send({action:"otpauth-getpasswords",subaction:e})}function account_showVerifyEmail(){xxdialogMode||1==userinfo.emailVerified||1!=serverinfo.emailcheck||setDialogMode(2,"Email Verification",3,account_showVerifyEmailEx,"Click ok to send a verification mail to:
"+EscapeHtml(userinfo.email)+"
Please wait a few minute to receive the verification.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Změna emailové adresy",3,account_changeEmail,addHtmlValue("Email","")),null!=userinfo.email&&(Q("dp3email").value=userinfo.email),account_validateEmail(),Q("dp3email").focus())}function account_validateEmail(e,t){QE("idx_dlgOkButton",validateEmail(Q("dp3email").value)&&Q("dp3email").value!=userinfo.email),null!=e&&13==e.keyCode&&dialogclose(1)}function account_changeEmail(){meshserver.send({action:"changeemail",email:Q("dp3email").value})}function account_showDeleteAccount(){if(!xxdialogMode){var e=""),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="
";if(e+="
"+nobreak("Staré heslo:")+"
",e+="
"+nobreak("Nové heslo:")+"
",e+="
"+nobreak("Nové heslo:")+"
",65536&features&&(e+="
Password hint:
"),e+="
",passRequirements){var t=[],o=0;for(var n in passRequirements)"reset"!=n&&"hint"!=n&&(t.push(n+":"+passRequirements[n]),o++);0"+format("Requirements: {0}.",t.join(", "))+"")}return setDialogMode(2,"Změnit heslo",3,account_showChangePasswordEx,e+=" "),Q("apassword0").focus(),account_validateNewPassword(),!1}function account_showChangePasswordEx(){if(Q("apassword1").value==Q("apassword2").value){var e={action:"changepassword",oldpass:Q("apassword0").value,newpass:Q("apassword1").value};65536&features&&(e.hint=Q("apasswordhint").value),meshserver.send(e)}}function account_createMesh(){if(!xxdialogMode)if(4294967295==userinfo.siteadmin||0==(64&userinfo.siteadmin))if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0");e+=addHtmlValue("Typ",""),setDialogMode(2,"Vytvořit skupinu zařízení",3,account_createMeshEx,e+=addHtmlValue("Popis","")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.');else setDialogMode(2,"Nová skupina zařízení",1,null,"This account does not have the rights to create a new device group.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0Strong":60<=o?"●":"●"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="Policy")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,o={},n=0,i={digits:/\d/.test(e),lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),nonWords:/\W/.test(e)};if(!e)return 0;for(var a=0;at.max)return!1;for(var o=0,n=0,i=0,a=0,s=0;s",e+='',e+='
',e+="
"+EscapeHtml(meshes[i].name)+"
"+n+"
",e+="
"}QH("p3meshes",e),QV("p3noMeshFound",0==t)}function gotoMesh(e){null==(currentMesh=meshes[e])&&goBack(),p20updateMesh(),go(20)}var sortorder,filetreelocation=[];function p5refreshFiles(){meshserver.send({action:"files"})}function updateFiles(){if(QV("MainMenuMyFiles",0==(8&features)),0==(8&features)){for(var e,t="",o="",n="Root",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),h=p5sort_files(a.f);for(var c in h){var f,g=h[c],v=g.n;f=40<(f=v).length?EscapeHtml(v.substring(0,40))+"...":EscapeHtml(v),v=EscapeHtml(v);var k="";null!=g.s&&(k=getFileSizeStr(g.s));var y="";if(g.t<3||4==g.t){y="
",deviceHeaderTotal++,void 0===deviceHeaderCount[nodes[a].state]?deviceHeaderCount[nodes[a].state]=1:deviceHeaderCount[nodes[a].state]++}}if(0==sort)for(var a in meshes){var u=meshes[a],m=u.links[userinfo._id];if(null!=m){m.rights;null==i[u._id]&&(""!=o&&""!=e&&(e+=""),e+="
",e+=''+EscapeHtml(u.name)+"
",1==u.mtype&&(e+="
No Intel® AMT devices in this group"),2==u.mtype&&(e+="
Žádné zařízení v této skupině"),e+=".
",o=u._id,n++)}}for(var a in 0==n?QH("xdevices",'
Žádné zařízení
Use the desktop version of this website to add devices.
'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","Zapnuto","Spánek","Spánek","Spánek","Hibernating","Vypnout","Present"],powerStateStrings=["","Zapnuto","Sleeping","Sleeping","Deep Sleep","Hibernating","Soft-Off","Present"],powerStateStrings2=["","Zařízení je zapnuto","Zařízení je ve stavu spánku (S1)","Device is in sleep state (S2)","Zařízení je v hlubokém spánku (S3)","Device is hibernating (S4)","Device is in soft-off state (S5)","Device is present, but power state cannot be determined"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0Agent"),0!=(2&e.conn)?t.push("CIRA"):0!=(4&e.conn)&&t.push("Intel® AMT"),0!=(8&e.conn)&&t.push("Relay"),0!=(16&e.conn)&&t.push("MQTT")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return et.meshnamel?1:e.meshnamelt.rnamel?1:e.rnamelt.namel?1:e.namelt.rnamel?1:e.rnamelt.namel?1:e.namelt.namel?1:e.namelt.rnamel?1:e.rnamelNic"),0!=(4&a)&&(s=""+s+""),QH("p10deviceName",s);var l="
",QH("p10html3",l);var k=PowerStateStr(n.state);0!=(1&h)&&(0Mesh Agent"),0!=(2&h)?(0Intel® AMT connected"):0!=(4&h)&&(0Intel® AMT detected"),0!=(16&h)&&(0"),k+="MQTT channel connected"),QH("MainComputerState",k),QH("MainComputerImage",''),powerTimelineNode!=currentNode._id&&powerTimelineReq!=currentNode._id&&(QH("p10html2",""),powerTimelineReq=currentNode._id,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}setupDesktop(),go(t=t||10),setupDeviceMenu()}else goBack()}else goBack()}else setDialogMode(2,"Account Security",1,null,'Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the "My Account" and look at the "Account Security" section.');else setDialogMode(2,"Account Security",1,null,'Unable to access a device until a email address is verified. This is required for password recovery. Go to the "My Account" to change and verify an email address.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"Device Toast",3,deviceToastFunctionEx,"")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var o=0;currentNode&&(o=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var n=[];0!=currentDevicePanel&&n.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&o||256&o)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8¤tNode.intelamt.sku))||currentNode.agent&&1¤tNode.agent.caps)&&n.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&o&&(4294967295==o||0==(1024&o))&&2==currentNode.mtype&&4¤tNode.agent.caps&&n.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(n)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Vyber operaci na tomto zařízení.
",o=""))}}function deviceActionFunctionEx(){var e=Q("d2deviceop").value;100==e?meshserver.send({action:"wakedevices",nodeids:[currentNode._id]}):meshserver.send({action:"poweraction",nodeids:[currentNode._id],actiontype:e})}function updateDeviceTimeline(){2==meshserver.State&&null!=powerTimelineNode&&null!=powerTimelineUpdate&&null!=currentNode&&powerTimelineNode==powerTimelineReq&¤tNode._id==powerTimelineNode&&powerTimelineUpdatea+1&&(l=e[a+1]),n.push([i,i+l,s]),i+=l}}var r="",d=1,p=new Date,c=Q("masthead").offsetWidth-122;p.setHours(0,0,0,0);for(a=0;a<7;a++){var u="",m=p.getTime(),h=m+864e5;for(var f in n){var g=n[f];if(1==isTimeBlockInside(m,h,g[0],g[1])){var v=Math.max(m,g[0]),k=Math.min(Math.min(h,g[1]),t),y=Math.round((k-v)*c/864e5);0
");QH("DeskToolsProcesses",i)}}}else QH("DeskToolsProcesses","")}function deskSaveImage(){if(setSessionActivity(),!xxdialogMode&&null!=desktop&&3==desktop.State){var e=new Date,t="Desktop-"+currentNode.name+"-"+e.getFullYear()+"-"+("0"+(e.getMonth()+1)).slice(-2)+"-"+("0"+e.getDate()).slice(-2)+"-"+("0"+e.getHours()).slice(-2)+"-"+("0"+e.getMinutes()).slice(-2);Q("Desk").toBlob(function(e){saveAs(e,t+".jpg")})}}function deskDisplayInfo(e,t,o,n){var i=Q("termdisplays").value;if(0"+t[s]+"";QH("termdisplays",a)}QV("termdisplays",0Root",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)n+=" / "+p13filetreelocation[a]+"";var s=p13filetreelocation.join("/"),l=p13sort_files(p13filetree.dir);for(var a in l){var r,d=l[a],p=d.n;r=70<(r=p).length?EscapeHtml(p.substring(0,70))+"...":EscapeHtml(p),p=EscapeHtml(p);var c="";null!=d.s&&(c=getFileSizeStr(d.s));var u="";if(d.t<3){u="
';var i=1,a=[];for(var s in currentMesh.links)a.push({id:s,name:s.split("/")[2],rights:currentMesh.links[s].rights});for(var s in a.sort(function(e,t){return e.name>t.name?1:e.name'),o+='
"),QH("p20info",o)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Are you sure you want to delete group {0}? Deleting the device group will also delete all information about devices within this group.",EscapeHtml(currentMesh.name))+"