1 line
116 KiB
Handlebars
1 line
116 KiB
Handlebars
<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html; charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link rel="shortcut icon"type=image/x-icon href={{{domainurl}}}favicon.ico><script src=scripts/common-0.0.1.js></script><script src=scripts/meshcentral.js></script><script src=scripts/agent-redir-ws-0.1.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-0.2.0.js></script><script src=scripts/amt-redir-ws-0.1.0.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><script keeplink=1 src=scripts/filesaver.js></script><title>{{{title}}}</title><style>a{color:#036;text-decoration:underline}#footer a{color:#fff;text-decoration:underline}#footer a:hover{color:#fff;text-decoration:none}.i1{background:url(../images/icons50.png) 0 0;height:50px;width:50px;border:none}.i2{background:url(../images/icons50.png) -50px 0;height:50px;width:50px;border:none}.i3{background:url(../images/icons50.png) -100px 0;height:50px;width:50px;border:none}.i4{background:url(../images/icons50.png) -150px 0;height:50px;width:50px;border:none}.i5{background:url(../images/icons50.png) -200px 0;height:50px;width:50px;border:none}.i6{background:url(../images/icons50.png) -250px 0;height:50px;width:50px;border:none}.m0{background:url(../images/images16.png) -32px 0;height:16px;width:16px;border:none;float:left}.m1{background:url(../images/images16.png) -16px 0;height:16px;width:16px;border:none;float:left}.m2{background:url(../images/images16.png) -96px 0;height:16px;width:16px;border:none;float:left}.m3{background:url(../images/images16.png) -112px 0;height:16px;width:16px;border:none;float:left}.gray{filter:gray;-webkit-filter:grayscale(100%) opacity(60%)}.DevSt{padding-left:5px;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#ddd}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.fileIcon4{background:url(../images/meshicon16.png);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:#fff;clear:both}</style><body onload='"undefined"!=typeof startup&&startup()'style="overflow-y:hidden;margin:0;padding:0;border:0;color:#000;font-size:13px;font-family:\'Trebuchet MS\',Arial,Helvetica,sans-serif"><div id=container><div id=mastheadx></div><div id=masthead style="background:url(logo.png) 0 0;background-size:341px 50px;background-color:#036;background-repeat:no-repeat;height:50px;width:100%;overflow:hidden"><div style="width:calc(100% - 50px);overflow:hidden"><div style=float:left;height:66px;color:#c8c8c8;padding-left:10px;padding-top:6px><strong><font style=font-size:36px;font-family:Arial,Helvetica,sans-serif>{{{title}}}</font></strong></div><div style=float:left;height:66px;color:#c8c8c8;padding-left:5px;padding-top:10px><strong><font style=font-size:12px;font-family:Arial,Helvetica,sans-serif>{{{title2}}}</font></strong></div></div><img id=topMenuIcon class=noselect style=position:absolute;right:0;top:10px;bottom:50px;color:#c8c8c8;font-size:44px;margin-right:8px;cursor:pointer;display:none onclick=topMenu() src=/images/3bars-30.png width=30 height=30></div><div id=page_content style=overflow-y:scroll;position:absolute;bottom:32px;top:50px;width:100%><div id=column_l style=width:100%;padding:0;position:absolute;bottom:0;top:0><div id=p0 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p0message style=text-align:center;width:100%><span id=p0span>Server verbroken</span>,<href onclick=reload() style=cursor:pointer><u>klik om opnieuw verbinding te maken</u></href>.</div></div></div><div id=p1 style=display:none;width:100%;height:100%><div style=display:flex;align-items:center;width:100%;height:100%><div id=p1message style=text-align:center;width:100%></div></div></div><div id=p2 style=display:none><div id=xdevices></div></div><div id=p3 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large><span id=p3userName></span></strong><br></div></table><div id=p3info style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div style=margin-left:8px><div id=p3AccountActions><p><strong>Gebruikersaccount beveiliging</strong><div style=margin-left:9px;margin-bottom:8px><div id=manageAuthApp style=margin-top:5px;display:none><a onclick=account_manageAuthApp() style=cursor:pointer>Beheer authenticator-app</a></div><div id=manageOtp style=margin-top:5px;display:none><a onclick=account_manageOtp(0) style=cursor:pointer>Beheer back-up codes</a></div></div><p><strong>gebruikersacties</strong><div style=margin-left:9px;margin-bottom:8px><div style=margin-top:5px><span id=verifyEmailId style=display:none><a onclick=account_showVerifyEmail() style=cursor:pointer>Verifieer Email</a></span></div><div style=margin-top:5px><span id=changeEmailId style=display:none><a onclick=account_showChangeEmail() style=cursor:pointer>Verander e-mailadres</a></span></div><div style=margin-top:5px><a onclick=account_showChangePassword() style=cursor:pointer>Verander wachtwoord</a><span id=p2nextPasswordUpdateTime></span></div><div style=margin-top:5px><a onclick=account_showDeleteAccount() style=cursor:pointer>Verwijder account</a></div></div><br style=clear:both></div><strong>Apparaatgroepen</strong> <span id=p3createMeshLink1>( <a onclick=account_createMesh() style=cursor:pointer><img src=images/icon-addnew.png width=12 height=12 border=0> Nieuw</a> )</span><br><br><div id=p3meshes></div><div id=p3noMeshFound style=margin-left:9px;display:none>Geen apparaatgroepen.<span id=p3createMeshLink2> <a onclick=account_createMesh() style=cursor:pointer><strong>Begin hier!</strong></a></span></div><br style=clear:both></div></div></div><div id=p5 style=display:none><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><img src=/images/user-50.png width=50 height=50><td><div style=margin-left:5px><strong style=font-size:large>Mijn bestanden</strong><br></div></table><div id=p5myfiles style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><table id=p5toolbar style=width:100%;height:78px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5FolderUp disabled onclick=p5folderup() value=Omhoog> <input type=button style="width:calc(100%/5 - 5px)"id=p5SelectAllButton disabled onclick=p5selectallfile() value="Selecteer alles"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RenameFileButton disabled value=Hernoemen onclick=p5renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5DeleteFileButton disabled value=Verwijderen onclick=p5deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5NewFolderButton disabled value=Map onclick=p5createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p5UploadButton disabled value=Uploaden onclick=p5uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CutButton disabled value=Knippen onclick=p5copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5CopyButton disabled value=Kopie onclick=p5copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5PasteButton disabled value=Plakken onclick=p5pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p5RefreshButton value=Ververs onclick=p5refreshFiles() onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p5currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p5sortdropdown onchange=updateFiles()><option value=1 selected>Sorteren op naam<option value=2>Sorteren op grootte<option value=3>Sorteren op datum<option value=4>Aflopend op naam<option value=5>Aflopend op grootte<option value=6>Aflopend op datum</select></table></table><div id=p5filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p5files></span></div><table id=p5toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0;background-color:#d3d9d6 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px> <span id=p5bottomstatus></span><td id=p5rightOfButtons style=text-align:right;padding:3px></table></div></div><div id=p10 style=display:none;position:absolute;bottom:0;top:0;width:100%;overflow:hidden><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0;position:absolute;top:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td><a id=MainComputerImage style=cursor:pointer onclick=p10showiconselector()></a><td><div style=margin-left:5px><strong><span id=p10deviceName></span></strong><br><span id=MainComputerState></span></div></table><div id=p10general style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%><div id=p10html style=margin-left:8px;margin-right:8px></div><div id=p10html2></div><div id=p10html3></div></div><div id=p10desktop style=overflow:hidden;position:absolute;top:55px;bottom:0;width:100%;display:none><div id=deskarea1 style=position:absolute;top:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><span id=p14power></span> <input id=DeskSoftInput style=width:25px;display:none;opacity:.2 onblur=toggleSoftKeys(0) onkeypress="return ondeskkeypress(event)"onkeydown="return ondeskkeydown(event)"onkeyup="return ondeskkeyup(event)"></div><div style=margin-left:3px><input type=button id=connectbutton1 value=Verbinden onclick=connectDesktop(event,1) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=connectbutton1h value="HW verbinden"onclick=connectDesktop(event,2) onkeypress=return!1 onkeydown=return!1 disabled> <input type=button id=disconnectbutton1 value=Verbreken onclick=connectDesktop(event,0) onkeypress=return!1 onkeydown=return!1> <span id=deskstatus>Verbroken</span></div></div></div><div id=deskarea3 style="position:absolute;top:25px;width:100%;height:calc(100% - 50px)"><div id=deskarea3x style=background:#000;text-align:center;height:100%;position:relative><div id=DeskParent style=height:100%><canvas id=Desk width=640 height=200 style=width:100%;-ms-touch-action:none;margin-left:0 oncontextmenu=return!1 onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas></div><div id=DeskTools style="position:absolute;width:400px;height:100%;background-color:gray;top:0;right:0;border-left:2px solid #d3d3d3;display:none"><a id=DeskToolsRefreshButton style=float:right;padding:3px;cursor:pointer onclick=refreshDeskTools()>Ververs</a><div id=DeskToolsBar style="position:absolute;padding:3px;border-radius:3px 3px 0 0;top:5px;left:4px;bottom:26px;background-color:#d3d3d3;cursor:pointer">Processen</div><div style=position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:#d3d3d3;text-align:left><div style="border-bottom:1px solid #a9a9a9;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer onclick=sortProcess(0)>PID</a><a style=cursor:pointer onclick=sortProcess(1)>Naam</a></div><div id=DeskToolsProcesses style=overflow-y:scroll;position:absolute;top:24px;bottom:0;width:100%></div></div></div></div></div><div id=deskarea4 style=position:absolute;bottom:0;width:100%;height:25px><div style=padding-top:2px;padding-bottom:2px;background:silver><div style=float:right;text-align:right><select id=termdisplays style=display:none onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select> <span id=DeskToastButton><img src=images/icon-notify.png onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px></span> </div><div><input id=deskActionsBtn type=button style=margin-left:3px onkeypress=return!1 onkeydown=return!1 value=Akties onclick=deviceActionFunction()> <input type=button value=Instellingen onkeypress=return!1 onkeydown=return!1 onclick=showDesktopSettings()> <input type=button onkeypress=return!1 onkeydown=return!1 value="Power Actie's..."onclick=showPowerActionDlg() style=display:none> <input id=DeskSpecialKeys type=button value="Speciale toetsen"onkeypress=return!1 onkeydown=return!1 onclick=sendSpecialKeys()> <input id=DeskSoftKeys type=button value=Toetsenbord onkeypress=return!1 onkeydown=return!1 onclick=toggleSoftKeys(1)> <label><span id=DeskControlSpan style=display:none><input id=DeskControl type=checkbox onkeypress=return!1 onkeydown=return!1>Invoer</span></label></div></div></div></div><div id=p10files style=overflow-y:scroll;position:absolute;top:55px;bottom:0;width:100%;display:none><table id=p13toolbar style=width:100%;height:111px cellpadding=0 cellspacing=0><tr><td style="background-color:silver;border-bottom:2px solid #000;padding:2px"><div style=float:right;text-align:right><input id=filesActionsBtn type=button onkeypress=return!1 onkeydown=return!1 value=Akties onclick=deviceActionFunction() style=margin-right:2px></div><div style=margin-left:2px><input id=p13AutoConnect value="Automatisch verbinden"onclick=autoConnectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button style=display:none> <input id=p13Connect value=Verbinden onclick=connectFiles(event) onkeypress=return!1 onkeydown=return!1 type=button> <span id=p13Status>Verbroken</span></div><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign=bottom><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13FolderUp disabled onclick=p13folderup() value=Omhoog> <input type=button style="width:calc(100%/5 - 5px)"id=p13SelectAllButton disabled onclick=p13selectallfile() value="Selecteer alles"onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RenameFileButton disabled value=Hernoemen onclick=p13renamefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13DeleteFileButton disabled value=Verwijderen onclick=p13deletefile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13NewFolderButton disabled value=Map onclick=p13createfolder() onkeypress=return!1 onkeydown=return!1></div><div style=width:100%;text-align:center><input type=button style="width:calc(100%/5 - 5px)"id=p13UploadButton disabled value=Uploaden onclick=p13uploadFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CutButton disabled value=Knippen onclick=p13copyFile(1) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13CopyButton disabled value=Kopie onclick=p13copyFile(0) onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13PasteButton disabled value=Plakken onclick=p13pasteFile() onkeypress=return!1 onkeydown=return!1> <input type=button style="width:calc(100%/5 - 5px)"id=p13RefreshButton disabled value=Ververs onclick=p13folderup(9999) onkeypress=return!1 onkeydown=return!1></div><tr><td style=background-color:#e4e9e7;height:28px><table style=width:100%><tr><td id=p13currentpath style=overflow:hidden;padding-left:4px;padding-top:2px><td style=text-align:right;padding-right:4px><select id=p13sortdropdown onchange=p13updateFiles()><option value=1 selected>Sorteren op naam<option value=2>Sorteren op grootte<option value=3>Sorteren op datum<option value=4>Aflopend op naam<option value=5>Aflopend op grootte<option value=6>Aflopend op datum</select></table></table><div id=p13filetable style="width:100%;height:calc(100% - 133px);overflow:auto;-webkit-user-select:none"><span id=p13files></span></div><table id=p13toolbarBottom style=width:100%;height:22px;position:absolute;bottom:0 cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#d3d9d6> <span id=p13bottomstatus></span></table></div></div><div id=p20 style=display:none;position:absolute;bottom:0;top:0;width:100%><table cellspacing=0 style=margin:0;padding:0;border-spacing:0;border:0><tr style=padding:0><td style=padding:0;color:#c8c8c8;text-align:center;cursor:pointer width=60px valign=top onclick=goBack()><div style=padding:0;background-color:#036;width:10px;height:10px;float:right;border:0><div style="background-color:#fff;width:10px;height:10px;border-radius:10px 0 0 0;border-right:1px solid #fff;border-bottom:1px solid #fff"></div></div><div style="padding:0;font-size:25px;background-color:#036;width:50px;border-radius:0 0 10px 0;height:36px">◀</div><td onclick=p20editmesh(1)><img src=/images/meshicon50.png width=50 height=50><td onclick=p20editmesh(1)><div style=margin-left:5px><strong style=font-size:large><span id=p20meshName></span></strong><br></div></table><div id=p20info style=margin-left:8px;margin-right:8px></div></div></div></div><div id=footer style=height:32px;width:100%;text-align:center;background-color:#113962;position:absolute;bottom:0><table id=footerMenu cellpadding=0 cellspacing=0 style=height:32px;width:100%;color:#fff;cursor:pointer;table-layout:fixed></table></div></div><div id=dialog style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:5px;position:fixed;top:90px;width:300px;display:none"><div style="width:100%;background-color:#036;color:#fff;border-radius:5px 5px 0 0"><div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div><div id=id_dialogtitle style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=id_dialogMessage style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><div id=id_dialogOptions></div></div><div id=dialog3 style=margin:auto;margin:3px><select id=deskkeys style=width:100%><option value=10>Ctrl+Alt+Del<option value=11>Tab<option value=5>Win<option value=0>Win+pijl naar omlaag<option value=1>Win+ pijl omhoog<option value=2>Win+L<option value=3>Win+M<option value=4>Shift+Win+M<option value=6>Win+R<option value=7>Alt-F4<option value=8>Ctrl-W<option value=9>Alt-Tab</select></div><div id=dialog7 style=margin:auto;margin:3px><div id=d7meshkvm><h4 style="width:100%;border-bottom:1px solid gray">Agent Extern bureaublad</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir=rtl></select><div style=height:20px>Kwaliteit</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir=rtl><option selected value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Schalen</div></div><div style="margin:3px 0 3px 0"><select id=d7framelimiter style=float:right;width:200px;height:20px dir=rtl><option selected value=50>Snel<option value=100>Gemiddeld<option value=400>Traag<option value=1000>erg traag</select><div style=height:20px>Beoordeel</div></div></div><div id=d7amtkvm><h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4><div style=height:26px><select id=d7desktopmode style=float:right;width:200px><option value=1>RLE8, snelste<option value=2>RLE16, Aanbevolen<option value=3>RAW8, langzaam<option value=4>RAW16, Zeer langzaam</select><div>codering</div></div><div style=height:60px><div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:#fff"><label><input type=checkbox id=d7showfocus>Toon focus tool</label><br><label><input type=checkbox id=d7showcursor>Lokale muiscursor weergeven</label><br></div><div>anders</div></div></div></div></div><div id=idx_dlgButtonBar style=padding:10px;margin-bottom:20px><input id=idx_dlgCancelButton type=button value=Afbreken style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Oke style=float:right;width:80px onclick=dialogclose(1)></div></div><div id=topMenu style="z-index:1000;background-color:#eee;box-shadow:0 0 15px #666;font-family:Arial,Helvetica,sans-serif;border-radius:0 0 5px 5px;position:fixed;top:50px;right:5px;width:170px;display:none"><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(2)>Mijn bestanden</div><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer"onclick=topMenu(1)>Mijn Account</div><div id=logoutMenuOption><a href=/logout><div style="padding:12px;border-top:1px solid gray;color:#000;cursor:pointer">Uitloggen</div></a></div></div><iframe name=fileUploadFrame style=display:none></iframe><script>"use strict";var webState="{{{webstate}}}";for(var i in""!=webState&&(webState=JSON.parse(decodeURIComponent(webState))),webState)localStorage.setItem(i,webState[i]);webState.loctag||localStorage.removeItem("loctag");var files,args=parseUriArgs(),debugLevel=parseInt("{{{debuglevel}}}"),features=parseInt("{{{features}}}"),sessionTime=parseInt("{{{sessiontime}}}"),domain="{{{domain}}}",domainUrl="{{{domainurl}}}",authCookie="{{{authCookie}}}",authRelayCookie="{{{authRelayCookie}}}",authCookieRenewTimer=null,meshserver=null,xdr=null,serverinfo=null,nodes=[],meshes={},filetree={},userinfo=null,users=(serverinfo=null,null),nodeShortIdent=0,serverPublicNamePort="{{{serverDnsName}}}:{{{serverPublicPort}}}",debugmode=!1,attemptWebRTC=0!=(128&features),StatusStrs=["Verbroken","Verbinden...","Setup...","Verbonden","Intel® AMT verbonden"],passRequirements="{{{passRequirements}}}";""!=passRequirements&&(passRequirements=JSON.parse(decodeURIComponent(passRequirements)));var sessionActivity=Date.now();function startup(){if(0==(32&features)){var e=null;try{e=top.location.toString().toLowerCase()}catch(e){}if(top!=self&&(null==e||0==top.active))return void(top.location=self.location)}if(!args.locale){var t=getstore("loctag",0);null!=t&&"*"!=t&&(args.locale=t)}(window.onresize=center)(),QV("changeEmailId",0==(2097152&features)),QH("p1message","Verbinden..."),go(1),(meshserver=MeshServerCreateControl(domainUrl,authCookie)).onStateChanged=onStateChanged,meshserver.onMessage=onMessage,meshserver.Start();var n=localStorage.getItem("desktopsettings");null!=n&&(desktopsettings=JSON.parse(n)),applyDesktopSettings()}function onStateChanged(e,t,n,o){if(0==t){if(setDialogMode(0),go(0),"noauth"==o)return void QH("p0span","Kan authenticatie niet uitvoeren");2==n?setTimeout(serverPoll,5e3):QH("p0span","Kan geen websocket aansluiten"),null!=authCookieRenewTimer&&(clearInterval(authCookieRenewTimer),authCookieRenewTimer=null)}else 2==t&&(meshserver.send({action:"meshes"}),meshserver.send({action:"nodes"}),meshserver.send({action:"files"}),xxcurrentView<2&&go(2),authCookieRenewTimer=setInterval(function(){meshserver.send({action:"authcookie"})},18e5));QV("topMenuIcon",2==t)}function serverPoll(){xdr=null;try{xdr=new XDomainRequest}catch(e){}(xdr=xdr||new XMLHttpRequest).open("HEAD",window.location.href),xdr.timeout=15e3,xdr.onload=function(){reload()},xdr.onerror=xdr.ontimeout=function(){setTimeout(serverPoll,1e4)},xdr.send()}function updateSelf(){if(QV("verifyEmailId",!0!==userinfo.emailVerified&&null!=userinfo.email&&1==serverinfo.emailcheck),QV("manageAuthApp",4096&features),QV("manageOtp",0!=(4096&features)&&(1==userinfo.otpsecret||0<userinfo.otphkeys)),QV("p3createMeshLink1",!1),QV("p3createMeshLink2",!1),"number"==typeof userinfo.passchange)if(-1==userinfo.passchange)QH("p2nextPasswordUpdateTime"," - Reset bij volgende inlog.");else if(null!=passRequirements&&"number"==typeof passRequirements.reset){var e=userinfo.passchange+86400*passRequirements.reset-Math.floor(Date.now()/1e3);e<0?QH("p2nextPasswordUpdateTime"," - Reset bij volgende inlog."):e<3600?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} minuten{1}.",Math.floor(e/60),addLetterS(Math.floor(e/60)))):e<86400?QH("p2nextPasswordUpdateTime",format(" - Reset in {0} uur{1}.",Math.floor(e/3600),addLetterS(Math.floor(e/3600)))):QH("p2nextPasswordUpdateTime",format(" - Reset in {0} dag(en){1}."),Math.floor(e/86400),addLetterS(Math.floor(e/86400)))}}function addLetterS(e){return 1<e?"s":""}function setSessionActivity(){sessionActivity=Date.now()}function checkIdleSessionTimeout(){Date.now()-sessionActivity>serverinfo.timeout&&(window.location.href="logout")}function onMessage(e,t){switch(t.action){case"serverinfo":(serverinfo=t.serverinfo).timeout&&(setInterval(checkIdleSessionTimeout,1e4),checkIdleSessionTimeout()),QV("p3AccountActions",0==(4&features)&&0==serverinfo.domainauth),QV("logoutMenuOption",0==(4&features)&&0==serverinfo.domainauth);break;case"authcookie":authCookie=t.cookie,authRelayCookie=t.rcookie;break;case"userinfo":userinfo=t.userinfo,QH("p3userName",userinfo.name),updateSelf();break;case"users":for(var n in users={},t.users)users[t.users[n]._id]=t.users[n];updateUsers();break;case"wssessioncount":wssessions=t.wssessions,updateUsers();break;case"meshes":for(var n in meshes={},t.meshes)meshes[t.meshes[n]._id]=t.meshes[n];updateMeshes(),updateDevices();break;case"files":filetree=setupBackPointers(t.filetree),updateFiles();break;case"nodes":for(var n in nodes=[],t.nodes)for(var o in t.nodes[n])meshes[n]?(t.nodes[n][o].namel=t.nodes[n][o].name.toLowerCase(),t.nodes[n][o].rname?t.nodes[n][o].rnamel=t.nodes[n][o].rname.toLowerCase():t.nodes[n][o].rnamel=t.nodes[n][o].namel,t.nodes[n][o].meshnamel=meshes[n].name.toLowerCase(),t.nodes[n][o].meshid=n,t.nodes[n][o].state=t.nodes[n][o].state?t.nodes[n][o].state:0,t.nodes[n][o].desc=t.nodes[n][o].desc,t.nodes[n][o].icon||(t.nodes[n][o].icon=1),t.nodes[n][o].ident=++nodeShortIdent,nodes.push(t.nodes[n][o])):console.log("Invalid mesh (1): "+n);updateDevices(),0==xxcurrentView&&go(parseInt("{{viewmode}}")),gotoDevice("{{currentNode}}",parseInt("{{viewmode}}"));break;case"powertimeline":if(t.nodeid!=powerTimelineReq)break;powerTimelineNode=t.nodeid,powerTimeline=t.timeline,powerTimelineUpdate=Date.now()+3e5,currentNode._id==t.nodeid&&drawDeviceTimeline();break;case"otpauth-request":if(2==xxdialogMode&&"otpauth-request"==xxdialogTag){var i=t.secret;52==i.length?i=i.split(/(.............)/).filter(Boolean).join(" "):32==i.length&&(i=(i=i.split(/(....)/).filter(Boolean).join(" ")).substring(0,20)+"<br/>"+i.substring(20)),QH("d2optinfo",'Installeer <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2" rel="noreferrer noopener" target=_blank> Google Authenticator </a> of een compatibele toepassing, gebruik <a href="\' + message.url +\'" rel="noreferrer noopener" target=_blank> deze link </a> of voer hieronder het geheim in. Voer vervolgens het huidige 6-cijferige token in om 2-staps aanmelding te activeren.<br /><br /><div style=width:100%;text-align:center><tt id=d2optsecret secret="'+t.secret+'" style=font-size:15px>'+i+'</tt><br /><br />Token: <input type=text onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" onkeyup=account_addOtpCheck(event) onkeydown=account_addOtpCheck() maxlength=6 id=d2otpauthinput type=text></div>'),QV("idx_dlgOkButton",!0),QE("idx_dlgOkButton",!1),Q("d2otpauthinput").focus()}break;case"otpauth-setup":if(xxdialogMode)return;setDialogMode(2,"Verificatie-app",1,null,t.success?"<b style=color:green>Tweestapsverificatie successvol</b>. U hebt nu een geldig token nodig om opnieuw in te loggen.":"<b style=color:red>Tweestapsverificatie mislukt</b>. Wis het geheim van de applicatie en probeer het opnieuw. Je hebt maar een paar minuten om de juiste code in te voeren.");break;case"otpauth-clear":if(xxdialogMode)return;setDialogMode(2,"Verificatie-app",1,null,t.success?"<b style=color:green> Tweestapsverificatie verwijderd</b>. Je kan deze functie ten allen tijde weer inschakelen.":"<b style=color:red>Tweestapsverificatie verwijdering mislukt</b>. Probeer het opnieuw.");break;case"otpauth-getpasswords":if(xxdialogMode)return;var a="Eenmalige tokens kunnen worden gebruikt als secundaire authenticatie. Genereer een set, druk ze af en bewaar ze op een veilige plaats.";if(a+="<div style='border-radius:6px;border: 2px dashed #888;width:100%;margin-top:8px'><div style='padding:8px;font-family:Arial, Helvetica, sans-serif;font-size:20px;font-weight:bold'><table style=width:100%;text-align:center>",t.passwords){var s=0;for(var l in t.passwords){++s%2&&(a+="<tr>");for(var r=""+t.passwords[l].p;r.length<8;)r="0"+r;!0===t.passwords[l].u?a+="<td>"+r.substring(0,4)+" "+r.substring(4):a+="<td><strike style=color:#BBB>"+r.substring(0,4)+" "+r.substring(4)}}else a+="<tr><td>geen actieve tokens";a+="</table></div></div><br />",a+="<div><input type=button value='Sluiten' onclick=setDialogMode(0) style=float:right></input>",a+="<input type=button value='Nieuw token' onclick='account_manageOtp(1);'></input>",null!=t.passwords&&(a+="<input type=button value='Wissen' onclick='account_manageOtp(2);'></input>"),setDialogMode(2,"Beheer back-up codes",8,null,a+="</div><br />","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 g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g){m=nodes[g];currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(g,1),updateDevices()}break;case"changenode":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g)(m=nodes[g]).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":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g){m=nodes[g];null==meshes[t.event.newMeshId]?(currentNode==m&&(10<=xxcurrentView&&xxcurrentView<20&&(setDialogMode(0),go(2)),currentNode=null),nodes.splice(g,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":g=-1;for(var l in nodes)if(nodes[l]._id==t.event.nodeid){g=l;break}if(-1!=g)(m=nodes[g]).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<backStack.length&&backStack.pop(),goStack())}function goForward(e){xxdialogMode||(backStack.push(e),goStack())}function goStack(){if(0!=backStack.length){var e=backStack[backStack.length-1],t=e.split("/")[0];"node"==t&&(setupDeviceMenu(0),gotoDevice(e)),"mesh"==t&&gotoMesh(e),"account"==t&&go(3),"devices"==t&&go(2),"files"==t&&go(5)}else go(2)}function updateFooterMenu(e){for(;null!=e&&e.length<3;)e.push({n:""});var t="",n="";if(null!=e)for(var o in e)t+='<td style="cursor:pointer'+(""==n?"":";border-left:solid 1px white")+'" onclick="'+e[o].f+'">'+e[o].n,n=e[o].n;QH("footerMenu","<tr>"+t)}function account_manageAuthApp(){xxdialogMode||0==(4096&features)||(1==userinfo.otpsecret?account_removeOtp():account_addOtp())}function account_addOtp(){xxdialogMode||1==userinfo.otpsecret||0==(4096&features)||(setDialogMode(2,"Verificatie-app",2,function(){meshserver.send({action:"otpauth-setup",secret:Q("d2optsecret").attributes.secret.value,token:Q("d2otpauthinput").value})},"<div id=d2optinfo>Laden...</div>","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,"Verificatie-app",3,function(){meshserver.send({action:"otpauth-clear"})},"Bevestig de verwijdering van de Tweestapsverificatie applicatie?")}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 verificatie",3,account_showVerifyEmailEx,"Klik op OK om een verificatiebericht te sturen naar:<br /><div style=padding:8px><b>"+EscapeHtml(userinfo.email)+"</b></div>Wacht enkele minuten om de verificatie te ontvangen.")}function account_showVerifyEmailEx(){meshserver.send({action:"verifyemail",email:userinfo.email})}function account_showChangeEmail(){xxdialogMode||(setDialogMode(2,"Email Adres wijzigen",3,account_changeEmail,addHtmlValue("Email","<input id=dp3email style=width:170px maxlength=256 onchange=account_validateEmail() onkeyup=account_validateEmail(event) />")),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="<form method=post><table style=margin-left:10px><input type=hidden name=action value=deleteaccount /><input type=hidden name=authcookie value="+authCookie+" /><tr>";e+="<td align=right>Wachtwoord:</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr><tr><td align=right>Wachtwoord:</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateDeleteAccount() onkeyup=account_validateDeleteAccount() /></td>",e+="</tr></table><div style=padding:10px;margin-bottom:4px>",e+='<input id=account_dlgCancelButton type=button value="Afbreken" style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)>',e+='<input id=account_dlgOkButton type=submit value="Oke" style="float:right;width:80px" onclick=dialogclose(1)>',setDialogMode(2,"Verwijder account",0,null,e+="</div><br /></form>"),account_validateDeleteAccount(),Q("apassword1").focus()}}function account_showChangePassword(){if(xxdialogMode)return!1;var e="<table style=margin-left:10px>";if(e+="<tr><td align=right>"+nobreak("Oud wachtwoord:")+"</td><td><input id=apassword0 type=password name=apassword0 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nieuw wachtwoord:")+"</td><td><input id=apassword1 type=password name=apassword1 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /> <b><span id=dxPassWarn></span></b></td></tr>",e+="<tr><td align=right>"+nobreak("Nieuw wachtwoord:")+"</td><td><input id=apassword2 type=password name=apassword2 autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>",65536&features&&(e+="<tr><td align=right>wachtwoord hint:</td><td><input id=apasswordhint name=apasswordhint maxlength=250 type=text autocomplete=off onchange=account_validateNewPassword() onkeyup=account_validateNewPassword() onkeydown=account_validateNewPassword() /></td></tr>"),e+="</table>",passRequirements){var t=[],n=0;for(var o in passRequirements)"reset"!=o&&"hint"!=o&&(t.push(o+":"+passRequirements[o]),n++);0<n&&(e+="<br /><span style=font-size:x-small>"+format("Vereisten: {0}.",t.join(", "))+"</span>")}return setDialogMode(2,"Verander wachtwoord",3,account_showChangePasswordEx,e+="<br />"),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<userinfo.otphkeys||0<userinfo.otpkeys){var e=addHtmlValue("Naam","<input id=dp3meshname style=width:170px maxlength=64 onchange=account_validateMeshCreate() onkeyup=account_validateMeshCreate() />");e+=addHtmlValue("Typen","<div style=width:170px;margin:0;padding:0><select id=dp3meshtype style=width:100% onchange=account_validateMeshCreate() ><option value=2>Software Agent Groep</option><option value=1>Intel® AMT alleen</option></select></div>"),setDialogMode(2,"Apparaatgroep aanmaken",3,account_createMeshEx,e+=addHtmlValue("Omschrijving","<div style=width:170px;margin:0;padding:0><textarea id=dp3meshdesc maxlength=1024 style=width:100%;resize:none></textarea></div>")),account_validateMeshCreate(),Q("dp3meshname").focus()}else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de "Mijn account" en bekijk het gedeelte "Accountbeveiliging".');else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de "Mijn account" om een e-mailadres te wijzigen en te verifiëren.');else setDialogMode(2,"Nieuwe apparaatgroep",1,null,"Dit account heeft niet de rechten om een nieuwe apparaatgroep te maken.")}function account_validateMeshCreate(){QE("idx_dlgOkButton",0<Q("dp3meshname").value.length)}function account_createMeshEx(e,t){meshserver.send({action:"createmesh",meshname:Q("dp3meshname").value,meshtype:Q("dp3meshtype").value,desc:Q("dp3meshdesc").value})}function account_validateDeleteAccount(){QE("account_dlgOkButton",0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value)}function account_validateNewPassword(){var e="",t=0<Q("apassword0").value.length&&0<Q("apassword1").value.length&&Q("apassword1").value==Q("apassword2").value&&Q("apassword0").value!=Q("apassword1").value;if(65536&features&&Q("apasswordhint").value==Q("apassword1").value&&(t=!1),""!=Q("apassword1").value)if(null==passRequirements||""==passRequirements){var n=checkPasswordStrength(Q("apassword1").value);e=80<=n?"<span style=color:green>Strong<span>":60<=n?"<span style=color:blue>●<span>":"<span style=color:red>●<span>"}else{0==checkPasswordRequirements(Q("apassword1").value,passRequirements)&&(t=!1,e="<span style=color:red>Beleid<span>")}QH("dxPassWarn",e),QE("idx_dlgOkButton",t)}function checkPasswordStrength(e){var t=0,n={},o=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;a<e.length;a++)n[e[a]]=(n[e[a]]||0)+1,t+=5/n[e[a]];for(var s in i)o+=1==i[s]?1:0;return parseInt(t+10*(o-1))}function checkPasswordRequirements(e,t){if(null==t||""==t||"object"!=typeof t)return!0;if(t.min&&e.length<t.min)return!1;if(t.max&&e.length>t.max)return!1;for(var n=0,o=0,i=0,a=0,s=0;s<e.length;s++)/\d/.test(e[s])&&n++,/[a-z]/.test(e[s])&&o++,/[A-Z]/.test(e[s])&&i++,/\W/.test(e[s])&&a++;return!(t.num&&n<t.num)&&(!(t.lower&&o<t.lower)&&(!(t.upper&&i<t.upper)&&!(t.nonalpha&&a<t.nonalpha)))}function updateMeshes(){var e="",t=0;for(i in meshes){t++;var n=meshes[i].links[userinfo._id].rights,o="Gedeeltelijke rechten";4294967295==n?o="Volledige beheerder":0==n&&(o="Geen rechten"),e+="<div style=cursor:pointer onclick=goForward('"+i+"')>",e+='<div style="float:left;margin-left:4px"><img src="/images/meshicon50.png" width=50 height=50 /></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+EscapeHtml(meshes[i].name)+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+o+"</div></div>",e+="</div></div>"}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="",n="",o="<a style=cursor:pointer onclick=p5folderup(0)>Root</a>",i="Root",a=filetree,s=1,l=[],r=filetreelinkpath,d=[],p=document.getElementsByName("fc"),c=0;c<p.length;c++)p[c].checked&&d.push(p[c].value);for(var c in filetreelinkpath="",filetreelocation){if(null==a.f||null==a.f[filetreelocation[c]])break;if(l.push(filetreelocation[c]),i+=" / "+filetreelocation[c],1==s){var u=filetreelocation[c].split("/");e=window.location+u[0]+"files/"+u[2],filetreelinkpath+=filetreelocation[c]}else""!=filetreelinkpath&&(filetreelinkpath+="/"+filetreelocation[c],2<s&&(e+="/"+filetreelocation[c]));o+=" / <a style=cursor:pointer onclick=p5folderup("+s+")>"+(null!=(a=a.f[filetreelocation[c]]).n?a.n:filetreelocation[c])+"</a>",s++}filetreelocation=l;var m=i.toLowerCase().startsWith("root / "+userinfo._id+" / public"),g=p5sort_files(a.f);for(var c in g){var h,v=g[c],f=v.n;h=40<(h=f).length?EscapeHtml(f.substring(0,40))+"...":EscapeHtml(f),f=EscapeHtml(f);var k="";null!=v.s&&(k=getFileSizeStr(v.s));var b="";if(v.t<3||4==v.t){b="<div class=filelist file=999><input file=999 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+f+"'> <span style=float:right;padding-right:4px>"+(1==v.t||4==v.t?p5getQuotabar(v):"")+"</span><span><div class=fileIcon"+v.t+'></div><a style=cursor:pointer onclick=p5folderset("'+encodeURIComponent(v.nx)+'")>'+h+"</a></span></div>"}else{var w=h,y="";m&&(y=" (<a style=cursor:pointer onclick='p5showPublicLink(\""+e+"/"+v.nx+"\")'>Link</a>)"),0<v.s&&(w='<a rel="noreferrer noopener" target="_blank" href="downloadfile.ashx?link='+encodeURIComponent(filetreelinkpath+"/"+v.nx)+'">'+h+"</a>"+y),b="<div class=filelist file=3><input file=3 style=float:left name=fc class=fcb type=checkbox onchange=p5setActions() value='"+v.nx+"'> <span style=float:right;padding-right:4px>"+k+"</span><span><div class=fileIcon"+v.t+"></div>"+w+"</span></div>"}v.t<3?t+=b:n+=b}if(QH("p5rightOfButtons",p5getQuotabar(a)),QH("p5files",t+n),QH("p5currentpath",o),QE("p5FolderUp",0!=filetreelocation.length),QV("p5PublicShare",m),r==filetreelinkpath){p=document.getElementsByName("fc");for(c=0;c<p.length;c++)p[c].checked=0<=d.indexOf(p[c].value)}p5setActions()}}function getNiceSize(e){return e<=0?"Opslag overschrijden":e<2048?format("{0}b over",e):e<2097152?format("{0}k over",Math.round(e/1024)):e<2147483648?format("{0}m over",Math.round(e/1024/1024)):format("{0}g over",Math.round(e/1024/1024/1024))}function p5getQuotabar(e){for(;1<e.t&&4!=e.t;)e=e.parent;return 1!=e.t&&4!=e.t||null==e.maxbytes?"":getNiceSize(e.maxbytes-e.s)+" <progress style=height:10px;width:100px value="+e.s+" max="+e.maxbytes+" />"}function p5showPublicLink(e){setDialogMode(2,"Publieke link",1,null,'<input type=text style=width:100% value="'+e+'" readonly />')}function p5sort_filename(e,t){return e.ln>t.ln?1*sortorder:e.ln<t.ln?-1*sortorder:0}function p5sort_timestamp(e,t){return e.d>t.d?1*sortorder:e.d<t.d?-1*sortorder:0}function p5sort_bysize(e,t){return e.s==t.s?p5sort_filename(e,t):(e.s-t.s)*sortorder}function p5sort_files(e){var t=[],n=Q("p5sortdropdown").value;for(var o in e)e[o].nx=o,null==e[o].n&&(e[o].n=o),e[o].ln=e[o].n.toLowerCase(),t.push(e[o]);return sortorder=1,3<n&&(sortorder=-1,n-=3),1==n?t.sort(p5sort_filename):2==n?t.sort(p5sort_bysize):3==n&&t.sort(p5sort_timestamp),t}function p5setActions(){var e=getFileSelCount(),t=getFileCount(),n=getFileSelCount(!1);QE("p5DeleteFileButton",0<e&&0<filetreelocation.length),QE("p5NewFolderButton",0<filetreelocation.length),QE("p5UploadButton",0<filetreelocation.length),QE("p5RenameFileButton",1==e&&0<filetreelocation.length),QE("p5SelectAllButton",0<t),Q("p5SelectAllButton").value=0<e?"Geen":"alles",QE("p5CutButton",0<n&&e==n),QE("p5CopyButton",0<n&&e==n),QE("p5PasteButton",null!=p5clipboard&&0<p5clipboard.length&&0<filetreelocation.length)}function getFileSelCount(e){for(var t=0,n=document.getElementsByName("fc"),o=0;o<n.length;o++)!n[o].checked||0==e&&"3"!=n[o].attributes.file.value||t++;return t}function getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked&&"999"==t[n].attributes.file.value&&e++;return e}function getFileCount(){return document.getElementsByName("fc").length}function p5selectallfile(){for(var e=0==getFileSelCount(),t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked=e;p5setActions()}function setupBackPointers(e){if(null!=e.f){var t=0,n=0;for(var o in e.f)setupBackPointers(e.f[o]),(e.f[o].parent=e).f[o].s&&(t+=e.f[o].s),e.f[o].c&&(n+=e.f[o].c),3==e.f[o].t&&n++;e.s=t,e.c=n}return e}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function p5folderup(e){if(null==e)filetreelocation.pop();else for(;filetreelocation.length>e;)filetreelocation.pop();return updateFiles(),!1}function p5folderset(e){return filetreelocation.push(decodeURIComponent(e)),updateFiles(),!1}function p5createfolder(){setDialogMode(2,"Nieuwe map",3,p5createfolderEx,"<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% />"),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5createfolderEx(){meshserver.send({action:"fileoperation",fileop:"createfolder",path:filetreelocation,newfolder:Q("p5renameinput").value})}function p5deletefile(){var e=getFileSelCount(),t=0<getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p5recdeleteinput>Recursieve verwijdering</label><br>":"<input type=checkbox id=p5recdeleteinput style='display:none'>";setDialogMode(2,"Verwijderen",3,p5deletefileEx,1<e?format("Verwijder {0} gelecteerde items?",e)+t:"Verwijder geselecteerde item?"+t)}function p5deletefileEx(){for(var e=[],t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked&&e.push(t[n].value);meshserver.send({action:"fileoperation",fileop:"delete",path:filetreelocation,delfiles:e,rec:Q("p5recdeleteinput").checked})}function p5renamefile(){for(var e,t=document.getElementsByName("fc"),n=0;n<t.length;n++)t[n].checked&&(e=t[n].value);setDialogMode(2,"Hernoemen",3,p5renamefileEx,'<input type=text id=p5renameinput maxlength=64 onkeyup=p5fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"fileoperation",fileop:"rename",path:filetreelocation,oldname:e}),focusTextBox("p5renameinput"),p5fileNameCheck()}function p5renamefileEx(e,t){t.newname=Q("p5renameinput").value,meshserver.send(t)}function p5fileNameCheck(e){var t=isFilenameValid(Q("p5renameinput").value);QE("idx_dlgOkButton",t),1==t&&e&&13==e.keyCode&&dialogclose(1)}var isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,n=/^\./,o=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!n.test(e)&&!o.test(e)&&"."!=e[0]}}();function p5uploadFile(){setDialogMode(2,"Upload bestand",3,p5uploadFileEx,'<form method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame><input type=text name=link style=display:none id=p5uploadpath value="'+encodeURIComponent(filetreelinkpath)+'" /><input type=file name=files id=p5uploadinput style=width:100% multiple=multiple onchange="updateUploadDialogOk(\'p5uploadinput\')" /><input type=hidden name=authCookie value='+authCookie+" /><input type=submit id=p5loginSubmit style=display:none /></form>"),updateUploadDialogOk("p5uploadinput")}function p5uploadFileEx(){Q("p5loginSubmit").click()}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}var p5clipboard=null,p5clipboardFolder=null,p5clipboardCut=0;function p5copyFile(e){var t=document.getElementsByName("fc");p5clipboard=[],p5clipboardCut=e,p5clipboardFolder=Clone(filetreelocation);for(var n=0;n<t.length;n++)t[n].checked&&"3"==t[n].attributes.file.value&&p5clipboard.push(t[n].value);p5updateClipview()}function p5pasteFile(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Bevestig {0} van {1} vermelding {2} voor deze locatie?",0==p5clipboardCut?"copy":"move",p5clipboard.length,1<p5clipboard.length?"s":"")),setDialogMode(2,"Plakken",3,p5pasteFileEx,e)}function p5pasteFileEx(){meshserver.send({action:"fileoperation",fileop:0==p5clipboardCut?"copy":"move",scpath:p5clipboardFolder,path:filetreelocation,names:p5clipboard}),p5folderup(999),1==p5clipboardCut&&(p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview())}function p5updateClipview(){var e="";null!=p5clipboard&&0<p5clipboard.length&&(e=format("Houd {0} item {1} vast voor {2}",p5clipboard.length,1<p5clipboard.length?"s":"",0==p5clipboardCut?"kopie":"verplaatsen")+', <a href=# onclick="return p5clearClip()" style=cursor:pointer>Wissen</a>.'),QH("p5bottomstatus",e),p5setActions()}function p5clearClip(){return p5clipboardFolder=p5clipboard=null,p5clipboardCut=0,p5updateClipview(),!1}function p5fileDragDrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer&&0!=e.dataTransfer.files.length&&0!=filetreelocation.length)for(var t=[],n=[],o=[],i=[],a=e.dataTransfer.files.length,s=0;s<e.dataTransfer.files.length;s++){var l=new FileReader,r=e.dataTransfer.files[s];t.push(r.name),n.push(r.size),o.push(r.type),l.onload=function(e){i.push(e.target.result),0==--a&&(Q("p5fileDragName").value=t.join("*"),Q("p5fileDragSize").value=n.join("*"),Q("p5fileDragType").value=o.join("*"),Q("p5fileDragData").value=i.join("*"),Q("p5fileDragLink").value=encodeURIComponent(filetreelinkpath),Q("p5loginSubmit2").click())},l.readAsDataURL(r)}}var p5dragtimer=null;function p5fileDragOver(e){haltEvent(e),null!=p5dragtimer&&(clearTimeout(p5dragtimer),p5dragtimer=null);var t=!0;0==filetreelocation.length&&(t=!1),QV("bigok",t),QV("bigfail",!t)}function p5fileDragLeave(e){haltEvent(e),"p5filetable"!=e.target.id?(QV("bigfail",!1),QV("bigok",!1)):p5dragtimer=setTimeout("QV('bigfail',false);QV('bigok',false);p5dragtimer=null;",200)}function ondeskkeypress(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeys(e)}}function ondeskkeydown(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyDown(e)}}function ondeskkeyup(e){if(toggleSoftKeys(0),Q("DeskSoftInput").value="",setSessionActivity(),desktop&&!xxdialogMode&&10==xxcurrentView){if(null!=currentNode){var t=meshes[currentNode.meshid].links[userinfo._id].rights;if(0==(4294967295==t||0!=(8&t)&&0==(256&t)))return!1;if(1==(4294967295!=t&&0!=(8&t)&&0==(256&t)&&0!=(4096&t))&&(1==e.altKey||1==e.ctrlKey||e.keyCode<32&&8!=e.keyCode&&13!=e.keyCode||90<e.keyCode))return!1}return desktop.m.handleKeyUp(e)}}var updateDevicesTimer=null;function updateDevices(){null==updateDevicesTimer&&(updateDevicesTimer=setTimeout(updateDevicesEx,200))}var deviceHeaderCount,sort=0,deviceHeaderId=0,deviceHeaders={},showRealNames=!1,deviceHeaderTotal=0,deviceHeadersTitles=(deviceHeaders={},{});function updateDevicesEx(){null!=updateDevicesTimer&&(clearTimeout(updateDevicesTimer),updateDevicesTimer=null);var e="",t=0,n=null,o=0,i={};for(var a in deviceHeaderCount={},deviceHeaders={},deviceHeadersTitles={},(deviceHeaderTotal=deviceHeaderId=0)==sort?nodes.sort(meshSort):1==sort?nodes.sort(powerSort):2==sort&&(1==showRealNames?nodes.sort(deviceHostSort):nodes.sort(deviceSort)),nodes)if(0!=nodes[a].v){var s=meshes[nodes[a].meshid].links[userinfo._id];if(null!=s){s.rights;if(0==sort){if(nodes.sort(meshSort),nodes[a].meshid!=n){deviceHeaderSet();var l="";1==meshes[nodes[a].meshid].mtype&&(l="<span style=color:lightgray>, Intel® AMT alleen</span>"),null!=n&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=padding-top:4px><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+nodes[a].meshid+'")>'+EscapeHtml(meshes[nodes[a].meshid].name)+"</span>"+l+"<span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",i[n=nodes[a].meshid]=1,t=0}}else 1==sort?nodes[a].pwr!==n&&(deviceHeaderSet(),null!==n&&(2==t&&(e+="<td><div style=width:301px></div></td>"),""!=e&&(e+="</tr></table>")),e+="<div class=DevSt style=width:100%;padding-top:4px><span>"+PowerStateStr2(nodes[a].pwr)+"</span><span id=DevxHeader"+deviceHeaderId+" style=color:lightgray></span></div>",n=nodes[a].pwr,t=0):2==sort&&null==n&&(n="1");o++;var r=EscapeHtml(nodes[a].name);0==r.length&&(r="<i>Geen</i>"),null!=nodes[a].rname&&0<nodes[a].rname.length&&(r+=" / "+EscapeHtml(nodes[a].rname));var d=EscapeHtml(nodes[a].name);1==showRealNames&&null!=nodes[a].rname&&(d=EscapeHtml(nodes[a].rname)),0==d.length&&(d="<i>Geen</i>");var p=nodes[a].icon,c=NodeStateStr(nodes[a]);nodes[a].conn&&0!=nodes[a].conn||(p+=" gray"),e+="<div style=cursor:pointer onclick=goForward('"+nodes[a]._id+"')>",e+='<div class="i'+p+'" style="float:left;margin-left:4px"></div>',e+='<div style="width:auto;height:40px;background-color:lightgray;margin-top:5px;margin-bottom:5px;margin-left:60px;padding-top:5px;padding-bottom:5px;border-radius:8px 0px 0px 8px">',e+="<div><div style=padding-left:12px;padding-top:2px><b>"+d+"</b></div><div style=padding-left:12px;padding-top:3px;color:gray>"+c+"</div></div>",e+="</div></div>",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]&&(""!=n&&""!=e&&(e+="</tr></table>"),e+="<div><div colspan=3 class=DevSt><span style=float:right>",e+='</span><span id=MxMESH style=cursor:pointer onclick=goForward("'+u._id+'")>'+EscapeHtml(u.name)+"</span></div>",1==u.mtype&&(e+="<div style=padding:10px><i>Geen Intel® AMT-apparaten in deze groep"),2==u.mtype&&(e+="<div style=padding:10px><i>Geen apparaten in deze groep"),e+=".</i></div></div>",n=u._id,o++)}}for(var a in 0==o?QH("xdevices",'<div style="margin-top:50px;text-align:center"><span style="font-size:30px">Geen apparaten</span><br /><br />Gebruik de desktopversie van deze website om apparaten toe te voegen.</div>'):QH("xdevices",e),deviceHeaderSet(),deviceHeaders)QH(a,deviceHeaders[a]);for(var a in deviceHeadersTitles)Q(a).title=deviceHeadersTitles[a]}var powerStatetable=["","ingeschakeld","Slaap","Slaap","Slaap","Slaapstand","Uitzetten","Aanwezig"],powerStateStrings=["","ingeschakeld","Slapen","Slapen","Slaapstand","Slaapstand","softwarematig uit","Aanwezig"],powerStateStrings2=["","Apparaat is ingeschakeld","Apparaat bevindt zich in slaapstand (S1)","Apparaat bevindt zich in slaapstand (S2)","Apparaat bevindt zich in diepe slaapstand (S3)","Apparaat is in slaapstand (S4)","Apparaat is uitgeschakeld (S5)","Apparaat is aanwezig, maar de stroomstatus kan niet worden bepaald"],powerColorTable=["#00000000","black","blue","blue","lightblue","blueviolet","darkgreen","lightseagreen","lightseagreen"];function NodeStateStr(e){var t=[];return 0<e.state&&e.state<powerStatetable.length&&state.push(powerStatetable[e.state]),e.conn&&(0!=(1&e.conn)&&t.push("<span>Agent</span>"),0!=(2&e.conn)?t.push("<span>CIRA</span>"):0!=(4&e.conn)&&t.push("<span>Intel® AMT</span>"),0!=(8&e.conn)&&t.push("<span>Relay</span>"),0!=(16&e.conn)&&t.push("<span>MQTT</span>")),null!=e.pwr&&0!=e.pwr&&t.push(powerStateStrings[e.pwr]),t.join(", ")}function PowerStateStr(e){return e<powerStatetable.length?powerStatetable[e]:""}function PowerStateStr2(e){return 0!=e&&e<powerStatetable.length?powerStatetable[e]:"Onbekend"}function onSortSelectChange(e){sort=document.getElementById("sortselect").selectedIndex,e||putstore("sort",sort),updateDevicesEx()}function deviceHeaderSet(){if(0!=deviceHeaderId){deviceHeaders["DevxHeader"+deviceHeaderId]=", "+deviceHeaderTotal+(1==deviceHeaderTotal?" apparaat":" apparaten");var e="";for(var t in deviceHeaderCount)0<e.length&&(e+=", "),e+=deviceHeaderCount[t]+" "+PowerStateStr2(t);deviceHeadersTitles["DevxHeader"+deviceHeaderId]=e,deviceHeaderId++,deviceHeaderCount={},deviceHeaderTotal=0}else deviceHeaderId=1}function meshSort(e,t){return e.meshnamel>t.meshnamel?1:e.meshnamel<t.meshnamel?-1:e.meshid==t.meshid?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:0}function powerSort(e,t){var n=e.pwr?e.pwr:0,o=t.pwr?t.pwr:0;return n==o?1==showRealNames?e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0:e.namel>t.namel?1:e.namel<t.namel?-1:0:o<n?1:n<o?-1:0}function deviceSort(e,t){return e.namel>t.namel?1:e.namel<t.namel?-1:0}function deviceHostSort(e,t){return e.rnamel>t.rnamel?1:e.rnamel<t.rnamel?-1:0}function refreshDevice(e){currentNode&¤tNode._id==e&&gotoDevice(e,xxcurrentView,!0)}function getNodeRights(e){var t=getNodeFromId(e);return meshes[t.meshid].links[userinfo._id].rights}var currentNode,currentDevicePanel=0,powerTimelineNode=null,powerTimelineReq=null,powerTimelineUpdate=null,powerTimeline=null;function getCurrentNode(){return currentNode}function gotoDevice(e,t,n){if(!0===userinfo.emailVerified||1!=serverinfo.emailcheck||4294967295==userinfo.siteadmin)if(!(262144&features)||1==userinfo.otpsecret||0<userinfo.otphkeys||0<userinfo.otpkeys){var o=getNodeFromId(e);if(null!=o){var i=meshes[o.meshid];if(null!=i){var a=i.links[userinfo._id].rights;if(!currentNode||currentNode._id!=o._id||1==n){currentNode=o;var s=EscapeHtml(o.name);0==s.length&&(s="<i>Geen</i>"),0!=(4&a)&&(s="<span onclick=showEditNodeValueDialog(0) style=cursor:pointer>"+s+"</span>"),QH("p10deviceName",s);var l="<table style=width:100%>";l+=addDeviceAttribute("<span>Groep</span>",'<a onclick=goForward("'+o.meshid+'") style=cursor:pointer>'+EscapeHtml(meshes[o.meshid].name)+"</a>"),null!=o.rname&&(l+=addDeviceAttribute("<span>Naam</span>","<span>"+EscapeHtml(o.rname)+"</span>")),1!=i.mtype&&o.name==o.host||(0!=(4&a)?o.host?l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer>"+EscapeHtml(o.host)+"</span>"):l+=addDeviceAttribute("Hostname","<span onclick=showEditNodeValueDialog(1) style=cursor:pointer><i>Geen</i></span>"):l+=addDeviceAttribute("Hostname",EscapeHtml(o.host)));var r=o.desc?EscapeHtml(o.desc):"<i>Geen</i>";l+=addDeviceAttribute("Omschrijving",0!=(4&a)?"<span onclick=showEditNodeValueDialog(2) style=cursor:pointer>"+r+"</span>":r);var d=["Onbekend","Windows 32bit console","Windows 64bit console","Windows 32bit service","Windows 64bit service","Linux 32bit","Linux 64bit","MIPS","XENx86","Android ARM","Linux ARM","MacOS 32bit","Android x86","PogoPlug ARM","Android APK","Linux Poky x86-32bit","MacOS 64bit","ChromeOS","Linux Poky x86-64bit","Linux NoKVM x86-32bit","Linux NoKVM x86-64bit","Windows MinCore console","Windows MinCore service","NodeJS","ARM-Linaro","ARMv6l / ARMv7l","ARMv8 64bit","ARMv6l / ARMv7l / NoKVM","Onbekend","Onbekend","FreeBSD x86-64"];if(null!=o.agent&&null!=o.agent.id&&null!=o.agent.ver){var p="";p=o.agent.id<=d.length?d[o.agent.id]:d[0],0!=o.agent.ver&&(p+=" v"+o.agent.ver),l+=addDeviceAttribute("Agent",p)}if(null!=o.intelamt){p="";var c={0:nobreak("Niet geactiveerd (Pre)"),1:nobreak("Niet geactiveerd (In)"),2:nobreak("Geactiveerd")};null!=o.intelamt.ver&&null==o.intelamt.state?p+="<i>"+nobreak("Onbekende staat")+"</i>, v"+o.intelamt.ver:null==o.intelamt.ver&&2==o.intelamt.state?p+="<i>Geactiveerd</i>":null==o.intelamt.ver||null==o.intelamt.state?p+="<i>Onbekende versie en staat</i>":(p+=c[o.intelamt.state],o.intelamt.flags&&(2&o.intelamt.flags?p=" <span>CCM</span>":4&o.intelamt.flags&&(p=" <span>ACM</span>")),p+=", v"+o.intelamt.ver),1==o.intelamt.tls&&(p+=", <span>TLS</span>"),2==o.intelamt.state&&(null!=o.intelamt.user&&""!=o.intelamt.user||(p+=0!=(4&a)?', <i style=color:#FF0000;cursor:pointer onclick=editDeviceAmtSettings("'+o._id+'")>'+nobreak("Geen referenties")+"</i>":", <i style=color:#FF0000>Geen referenties</i>"),p+=" ",0!=(4&a)&&(p+='<img src=images/link4.png height=10 width=10 style=cursor:pointer onclick=editDeviceAmtSettings("'+o._id+'")>'));var u="Intel® ME";"number"==typeof o.intelamt.sku&&(0!=(8&o.intelamt.sku)?u="Intel® AMT":0!=(16&o.intelamt.sku)&&(u="Intel® SM")),l+=addDeviceAttribute(u,p)}if(null!=o.agent&&null!=o.agent.tag&&"mailto:"!=o.agent.tag){var m=EscapeHtml(o.agent.tag);m.startsWith("mailto:")&&(m='<a href="'+m+'">'+m.substring(7)+"</a>"),l+=addDeviceAttribute("Agent Tag",m)}var g=o.conn;if(g&&1<g){var h=[];0!=(1&o.conn)&&h.push("<span>Agent</span>"),0!=(2&o.conn)?h.push("<span>Intel® AMT CIRA</span>"):0!=(4&o.conn)&&h.push("<span>Intel® AMT</span>"),0!=(8&o.conn)&&h.push("<span>Agent Relay</span>"),0!=(16&o.conn)&&h.push("<span>MQTT</span>"),l+=addDeviceAttribute("connectiviteit",h.join(", "))}var v="<i>Geen</i>";if(null!=o.tags)for(var f in v="",o.tags)v+='<span style="background-color:lightgray;padding:3px;margin-right:4px;border-radius:5px">'+o.tags[f]+"</span>";l+=addDeviceAttribute("Tags",0!=(4&a)?"<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>"+v+"</span>":v),l+="</table><br />",0!=(76&a)&&(l+="<input type=button value=Actions onclick=deviceActionFunction() />"),QH("p10html",l),setupFiles(),l="<div style=float:right;font-size:x-small;margin-right:10px>",0!=(4&a)&&(l+='<a style=cursor:pointer onclick=p10showDeleteNodeDialog("'+o._id+'")>Verwijder apparaat</a>'),l+="</div><div style=font-size:x-small>",l+="</div><br>",QH("p10html3",l);var k=PowerStateStr(o.state);0!=(1&g)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Mesh Agent</span>"),0!=(2&g)?(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel® AMT verbonden</span>"):0!=(4&g)&&(0<k.length&&(k+=", "),k+="<span style=font-size:10px>Intel® AMT gedetecteerd</span>"),0!=(16&g)&&(0<k.length&&(k+="<br/>"),k+="<span style=font-size:12px>MQTT-kanaal verbonden</span>"),QH("MainComputerState",k),QH("MainComputerImage",'<div class="i'+o.icon+'"></div>'),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,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat tweefactorauthenticatie is ingeschakeld. Dit is vereist voor extra beveiliging. Ga naar de "Mijn account" en bekijk het gedeelte "Accountbeveiliging".');else setDialogMode(2,"Gebruikersaccount beveiliging",1,null,'Geen toegang tot een apparaat totdat een e-mailadres is geverifieerd. Dit is vereist voor wachtwoordherstel. Ga naar de "Mijn account" om een e-mailadres te wijzigen en te verifiëren.')}function deviceToastFunction(){xxdialogMode||setDialogMode(2,"undefined",3,deviceToastFunctionEx,"<textarea id=d2devToast style=width:100%;height:80px;resize:none;overflow-y:scroll></textarea>")}function deviceToastFunctionEx(){meshserver.send({action:"toast",nodeids:[currentNode._id],title:"MeshCentral",msg:Q("d2devToast").value})}function setupDeviceMenu(e,t){var n=0;currentNode&&(n=meshes[currentNode.meshid].links[userinfo._id].rights),null!=e&&(currentDevicePanel=e),QV("p10general",0==currentDevicePanel),QV("p10desktop",1==currentDevicePanel),QV("p10files",2==currentDevicePanel);var o=[];0!=currentDevicePanel&&o.push({n:"General",f:"setupDeviceMenu(0)"}),1!=currentDevicePanel&&null!=currentNode&&(8&n||256&n)&&(1==meshes[currentNode.meshid].mtype&&("number"!=typeof currentNode.intelamt.sku||0!=(8¤tNode.intelamt.sku))||currentNode.agent&&1¤tNode.agent.caps)&&o.push({n:"Desktop",f:"setupDeviceMenu(1)"}),2!=currentDevicePanel&&null!=currentNode&&8&n&&(4294967295==n||0==(1024&n))&&2==currentNode.mtype&&4¤tNode.agent.caps&&o.push({n:"Files",f:"setupDeviceMenu(2)"}),updateFooterMenu(o)}function deviceActionFunction(){if(!xxdialogMode){var e=meshes[currentNode.meshid].links[userinfo._id].rights,t="Selecteer een bewerking die u op dit apparaat wilt uitvoeren.<br /><br />",n="<select id=d2deviceop style=float:right;width:170px>";0!=(64&e)&&(n+="<option value=100>Wakker worden</option>"),0!=(8&e)&&(n+="<option value=4>Slaap</option><option value=3>Reset</option><option value=2>Uitzetten</option>"),setDialogMode(2,"Apparaatactie",3,deviceActionFunctionEx,t+=addHtmlValue("Operatie",n+="</select>"))}}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&&powerTimelineUpdate<Date.now()&&(powerTimelineUpdate=null,meshserver.send({action:"powertimeline",nodeid:currentNode._id}))}function drawDeviceTimeline(){var e=null,t=Date.now();currentNode._id==powerTimelineNode&&(e=powerTimeline);var n=new Date;n.setHours(0,0,0,0);(n=new Date(n.getTime()-5184e5)).getTime();var o=[];if(null!=e&&1<e.length){o.push([0,e[1],e[0]]);for(var i=e[1],a=2;a<e.length;a+=2){var s=e[a],l=t;e.length>a+1&&(l=e[a+1]),o.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(),g=m+864e5;for(var h in o){var v=o[h];if(1==isTimeBlockInside(m,g,v[0],v[1])){var f=Math.max(m,v[0]),k=Math.min(Math.min(g,v[1]),t),b=Math.round((k-f)*c/864e5);0<b&&(u+="<div style=display:table-cell;width:"+b+"px;background-color:"+powerColor(v[2])+";height:16px></div>")}}r+="<tr style="+(d%2==0?"background-color:#DDD":"")+"><td><div> "+printDate(p)+"<div></div></div></td><td><div>"+u+"</div></td></tr>",++d,p=new Date(p.getTime()-864e5)}QH("p10html2",'<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse;width:calc(100% - 18px);margin:9px" border=0 cellpadding=2 cellspacing=0><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:center;width:90px>Day</th><th scope=col style=text-align:center>Power State</th></tr>'+r+"</tbody></table>")}function powerColor(e){return e<powerColorTable.length?powerColorTable[e]:"yellow"}function isTimeBlockInside(e,t,n,o){return n<e&&t<o||(e<n&&n<t||e<o&&o<t)}function addDeviceAttribute(e,t){return"<tr><td style=width:100px;color:gray>"+e+"</td><td style=overflow:hidden>"+t+"</td></tr>"}function editDeviceAmtSettings(e,t){if(!xxdialogMode){var n="",o=getNodeFromId(e),i=3;0!=(4&getNodeRights(e))&&(n+=addHtmlValue("Gebruikersnaam",'<input id=dp10username style=width:170px maxlength=32 autocomplete=nope placeholder="admin" onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />'),n+=addHtmlValue("wachtwoord","<input id=dp10password type=password style=width:170px autocomplete=nope maxlength=32 onchange=validateDeviceAmtSettings() onkeyup=validateDeviceAmtSettings() />"),n+=addHtmlValue("Veiligheid","<select id=dp10tls style=width:176px><option value=0>Geen TLS beveiliging</option><option value=1>TLS beveiliging vereist</option></select>"),null!=o.intelamt.user&&""!=o.intelamt.user&&(i=7),setDialogMode(2,"Bewerk Intel® AMT-gegevens",i,editDeviceAmtSettingsEx,n,{node:o,func:t}),null!=o.intelamt.user&&""!=o.intelamt.user?Q("dp10username").value=o.intelamt.user:Q("dp10username").value="admin",Q("dp10tls").value=o.intelamt.tls,validateDeviceAmtSettings())}}function validateDeviceAmtSettings(){QE("idx_dlgOkButton",passwordcheck(Q("dp10password").value))}function editDeviceAmtSettingsEx(e,t){if(2==e)meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:"",pass:""}});else{var n=Q("dp10username").value;""==n&&(n="admin");var o=Q("dp10password").value;""==o&&(n=""),meshserver.send({action:"changedevice",nodeid:t.node._id,intelamt:{user:n,pass:o,tls:Q("dp10tls").value}}),t.node.intelamt.user=n,t.node.intelamt.tls=Q("dp10tls").value,t.func&&setTimeout(t.func,300)}}function p10showDeleteNodeDialog(e){xxdialogMode||(setDialogMode(2,"Verwijder apparaat",3,p10showDeleteNodeDialogEx,format("Verwijder {0}?",EscapeHtml(currentNode.name))+"<br /><br /><input id=p10check type=checkbox onchange=p10validateDeleteNodeDialog() />Bevestig",e),p10validateDeleteNodeDialog())}function p10validateDeleteNodeDialog(){QE("idx_dlgOkButton",Q("p10check").checked)}function p10showDeleteNodeDialogEx(e,t){meshserver.send({action:"removedevices",nodeids:[t]})}function p10showiconselector(){if(!xxdialogMode&&0!=(4&meshes[currentNode.meshid].links[userinfo._id].rights)){"<div style=display:inline-block class=i1 onclick=p10setIcon(1)></div>","<div style=display:inline-block class=i2 onclick=p10setIcon(2)></div>","<div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br>","<div style=display:inline-block class=i4 onclick=p10setIcon(4)></div>","<div style=display:inline-block class=i5 onclick=p10setIcon(5)></div>","<div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>",setDialogMode(2,"Pictogram selectie",0,null,"<table align=center><td><div style=display:inline-block class=i1 onclick=p10setIcon(1)></div><div style=display:inline-block class=i2 onclick=p10setIcon(2)></div><div style=display:inline-block class=i3 onclick=p10setIcon(3)></div><br><div style=display:inline-block class=i4 onclick=p10setIcon(4)></div><div style=display:inline-block class=i5 onclick=p10setIcon(5)></div><div style=display:inline-block class=i6 onclick=p10setIcon(6)></div></table>"),QV("id_dialogclose",!0)}}function p10setIcon(e){setDialogMode(0),meshserver.send({action:"changedevice",nodeid:currentNode._id,icon:e})}var desktop,desktopNode,showEditNodeValueDialog_modes=["Apparaat naam","Hostname","Omschrijving","Tags"],showEditNodeValueDialog_modes2=["name","host","desc","tags"],showEditNodeValueDialog_modes3=["","","","Groep1, Groep2, Groep3"];function showEditNodeValueDialog(e){if(!xxdialogMode){setDialogMode(2,"Bewerk apparaat",3,showEditNodeValueDialogEx,addHtmlValue(showEditNodeValueDialog_modes[e],'<input id=dp10devicevalue style=width:170px maxlength=64 placeholder="'+showEditNodeValueDialog_modes3[e]+'" onchange=p10editdevicevalueValidate('+e+",event) onkeyup=p10editdevicevalueValidate("+e+",event) />"),e);var t=currentNode[showEditNodeValueDialog_modes2[e]];null==t&&(t=""),Array.isArray(t)&&(t=t.join(", ")),Q("dp10devicevalue").value=t,p10editdevicevalueValidate(),Q("dp10devicevalue").focus()}}function showEditNodeValueDialogEx(e,t){var n={action:"changedevice",nodeid:currentNode._id};n[showEditNodeValueDialog_modes2[t]]=Q("dp10devicevalue").value,meshserver.send(n)}function p10editdevicevalueValidate(e,t){var n=1<e||0<Q("dp10devicevalue").value.length;QE("idx_dlgOkButton",n),null!=t&&1==n&&13==t.keyCode&&dialogclose(1)}var desktopsettings={encoding:2,showfocus:!1,showmouse:!0,showcad:!0,quality:40,scaling:1024,framerate:50};function setupDesktop(){desktopNode!=currentNode&&null!=desktop&&(desktop.Stop(),desktop=desktopNode=null),desktopNode==currentNode&&null!=desktop||(QH("DeskParent",'<canvas id=Desk width=640 height=200 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>'),desktopNode=currentNode,Q("Desk").addEventListener("DOMMouseScroll",function(e){return dmousewheel(e)}),Q("Desk").addEventListener("mousewheel",function(e){return dmousewheel(e)})),desktopNode=currentNode,updateDesktopButtons(),Q("Desk").toBlob||QV("deskSaveBtn",!1)}function updateDesktopButtons(){var e=meshes[currentNode.meshid],t=0;null!=desktop&&(t=desktop.State);var n=e.links[userinfo._id].rights;QV("disconnectbutton1",0!=t),QV("connectbutton1",0==t&&2==e.mtype&&(8&n||256&n)),QV("connectbutton1h",0==t&&8&n&&(1==e.mtype||null!=currentNode.intelamt&&2==currentNode.intelamt.state&&null!=currentNode.intelamt.ver&&"number"==typeof currentNode.intelamt.sku&&0!=(8¤tNode.intelamt.sku))),QV("d7amtkvm",!(null==currentNode.intelamt||null==currentNode.intelamt.ver&&1!=e.mtype||0!=t&&2!=desktop.contype)),QV("d7meshkvm",2==e.mtype&&(0==t||1==desktop.contype));var o=0!=(1¤tNode.conn);QE("connectbutton1",o);var i=0!=(6¤tNode.conn);QE("connectbutton1h",i),QV("DeskToastButton",0!=(16384&n)&¤tNode.agent&¤tNode.agent.id<5&&8&n),QV("deskActionsBtn",8&n),Q("DeskControl").checked=0!=(8&n),0==o&&QV("DeskTools",!1)}function connectDesktop(e,t){if(setSessionActivity(),null==desktop)if(desktopNode=currentNode,2==t){if(null==desktopNode.intelamt.user||""==desktopNode.intelamt.user)return void editDeviceAmtSettings(desktopNode._id,connectDesktop);(desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk"),authCookie)).debugmode=debugmode,desktop.onStateChanged=onDesktopStateChange,desktop.m.bpp=1==desktopsettings.encoding||3==desktopsettings.encoding?1:2,desktop.m.useZRLE=desktopsettings.encoding<3,desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id,16994,"*","*",0),desktop.contype=2}else(desktop=CreateAgentRedirect(meshserver,CreateAgentRemoteDesktop("Desk"),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).debugmode=debugmode,desktop.m.debugmode=debugmode,desktop.attemptWebRTC=attemptWebRTC,desktop.onStateChanged=onDesktopStateChange,desktop.m.CompressionLevel=desktopsettings.quality,desktop.m.ScalingLevel=desktopsettings.scaling,desktop.m.FrameRateTimer=desktopsettings.framerate,desktop.m.onDisplayinfo=deskDisplayInfo,desktop.m.onScreenSizeChange=deskAdjust,desktop.Start(desktopNode._id),desktop.contype=1;else desktop.Stop(),desktopNode=desktop=null}function onDesktopStateChange(e,t){var n=t;3==n&&2==e.contype&&n++;var o=StatusStrs[n];switch(null!=desktop&&1==desktop.webRtcActive&&(o+=", WebRTC"),QH("deskstatus",o),t){case 0:desktop.Stop(),desktopNode=desktop=null,QV("termdisplays",!1),1==fullscreen&&deskToggleFull()}updateDesktopButtons(),deskAdjust(),setTimeout(deskAdjust,50)}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),updateDesktopButtons(),setDialogMode(7,"Instellingen extern bureaublad",3,showDesktopSettingsChanged))}function showDesktopSettingsChanged(){desktopsettings.encoding=d7desktopmode.value,desktopsettings.showfocus=d7showfocus.checked,desktopsettings.showmouse=d7showcursor.checked,desktopsettings.quality=d7bitmapquality.value,desktopsettings.scaling=d7bitmapscaling.value,desktopsettings.framerate=d7framelimiter.value,localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings)),applyDesktopSettings(),desktop&&(1==desktop.contype&&0!=desktop.State&&desktop.m.SendCompressionLevel(1,desktopsettings.quality,desktopsettings.scaling,desktopsettings.framerate),2==desktop.contype&&0!=desktop.State&&(desktop.Stop(),setTimeout(function(){connectDesktop(null,2)},50)))}function applyDesktopSettings(){var e="",t=512&features?[90,70,50,40,30,20,10,5,1]:[50,40,30,20,10,5,1];for(var n in t)e+="<option value="+t[n]+">"+t[n]+"%</option>";QH("d7bitmapquality",e),d7desktopmode.value=desktopsettings.encoding,d7showfocus.checked=desktopsettings.showfocus,d7showcursor.checked=desktopsettings.showmouse,d7bitmapquality.value=40,0<=t.indexOf(parseInt(desktopsettings.quality))&&(d7bitmapquality.value=desktopsettings.quality),d7bitmapscaling.value=desktopsettings.scaling,desktopsettings.framerate&&(d7framelimiter.value=desktopsettings.framerate)}var fullscreen=!1;function deskAdjust(){var e=(Q("DeskParent").clientHeight-Q("Desk").clientHeight)/2;if(e<0){var t=Q("DeskParent").clientHeight,n=9999;desktop&&(n=desktop.m.width/desktop.m.height*t),QS("Desk")["max-height"]=t+"px",QS("Desk")["max-width"]=n+"px",e=0}else QS("Desk")["max-height"]=null,QS("Desk")["max-width"]=null;QS("Desk")["margin-top"]=e+"px",QS("Desk")["margin-bottom"]=e+"px"}function deskSendKeys(){if(!xxdialogMode&&null!=desktop&&3==desktop.State){var e=Q("deskkeys").value;0==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65364,1],[65364,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,40],[desktop.m.KeyAction.UP,40],[desktop.m.KeyAction.EXUP,91]]):1==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65362,1],[65362,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,38],[desktop.m.KeyAction.UP,38],[desktop.m.KeyAction.EXUP,91]]):2==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[108,1],[108,0],[65511,0]]):desktop.sendCtrlMsg('{"action":"lock"}'):3==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[109,1],[109,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91]]):4==e?2==desktop.contype?desktop.m.sendkey([[65505,1],[65511,1],[109,1],[109,0],[65511,0],[65505,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,16],[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,77],[desktop.m.KeyAction.UP,77],[desktop.m.KeyAction.EXUP,91],[desktop.m.KeyAction.UP,16]]):5==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.EXUP,91]]):6==e?2==desktop.contype?desktop.m.sendkey([[65511,1],[114,1],[114,0],[65511,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,91],[desktop.m.KeyAction.DOWN,82],[desktop.m.KeyAction.UP,82],[desktop.m.KeyAction.EXUP,91]]):7==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65473,1],[65473,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,115],[desktop.m.KeyAction.UP,115],[desktop.m.KeyAction.EXUP,18]]):8==e?2==desktop.contype?desktop.m.sendkey([[65507,1],[119,1],[119,0],[65507,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,17],[desktop.m.KeyAction.DOWN,87],[desktop.m.KeyAction.UP,87],[desktop.m.KeyAction.EXUP,17]]):9==e?2==desktop.contype?desktop.m.sendkey([[65513,1],[65289,1],[65289,0],[65513,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.EXDOWN,18],[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9],[desktop.m.KeyAction.EXUP,18]]):10==e?desktop.m.sendcad():11==e&&(2==desktop.contype?desktop.m.sendkey([[65289,1],[65289,0]]):desktop.m.SendKeyMsgKC([[desktop.m.KeyAction.DOWN,9],[desktop.m.KeyAction.UP,9]]))}}function sendSpecialKeys(){xxdialogMode||null==desktop||3!=desktop.State||setDialogMode(3,"Speciale toetsen",3,deskSendKeys)}function toggleSoftKeys(e){QV("DeskSoftInput",1==e),1==e&&Q("DeskSoftInput").focus()}function toggleDeskTools(){setSessionActivity(),xxdialogMode||("none"==QS("DeskTools").display?(QV("DeskTools",!0),Q("DeskTools").nodeid=currentNode._id,refreshDeskTools()):QV("DeskTools",!1))}function refreshDeskTools(){setSessionActivity(),QV("DeskToolsRefreshButton",!1),setTimeout(refreshDeskToolsEx,500),meshserver.send({action:"msg",type:"ps",nodeid:currentNode._id})}function refreshDeskToolsEx(){QV("DeskToolsRefreshButton",!0)}var filesNode,deskTools={sort:1,msg:null};function sortProcess(e){deskTools.sort=e,showDeskToolsProcesses(deskTools.msg)}function sortProcessPid(e,t){return e.p>t.p?1:e.p<t.p?-1:0}function sortProcessName(e,t){return e.d>t.d?1:e.d<t.d?-1:0}function showDeskToolsProcesses(e){if(null!=(deskTools.msg=e)){if(Q("DeskTools").nodeid==e.nodeid){var t=[],n=null;try{n=JSON.parse(e.value)}catch(e){}if(console.log(n),null!=n){for(var o in n)t.push({p:parseInt(o),c:n[o].cmd,d:n[o].cmd.toLowerCase(),u:n[o].user});0==deskTools.sort?t.sort(sortProcessPid):1==deskTools.sort&&t.sort(sortProcessName);var i="";for(var a in t)0!=t[a].p&&(i+="<div class=deskToolsBar><div style=width:50px;float:left;text-align:right;padding-right:5px>"+t[a].p+"</div><a style=float:right;padding-right:5px;cursor:pointer onclick=stopProcess("+t[a].p+',"'+t[a].c+'")><img width=10 height=10 src="images/trash.png"></a><div style=float:right;padding-right:5px>'+(t[a].u?t[a].u:"")+"</div><div>"+t[a].c+"</div></div>");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,n,o){var i=Q("termdisplays").value;if(0<t.length){var a="";for(var s in t)a+="<option"+(i==t[s]?" selected":"")+">"+t[s]+"</option>";QH("termdisplays",a)}QV("termdisplays",0<t.length)}function deskGetDisplayNumbers(e){desktop.m.GetDisplayNumbers()}function deskSetDisplay(e){setSessionActivity();var t=0,n=Q("termdisplays").value;t="alle schermen"==n?65535:parseInt(n.substring(8)),desktop.m.SetDisplay(t)}function dmousedown(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousedown(e)}function dmouseup(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mouseup(e)}function dmousemove(e){setSessionActivity(),xxdialogMode||null==desktop||desktop.m.mousemove(e)}function dmousewheel(e){return setSessionActivity(),!(xxdialogMode||null==desktop||!desktop.m.mousewheel)&&(desktop.m.mousewheel(e),haltEvent(e),!0)}function drotate(e){xxdialogMode||null==desktop||(desktop.m.setRotation(desktop.m.rotation+e),deskAdjust(),deskAdjust())}function stopProcess(e,t){return setDialogMode(2,"Proces controle",3,stopProcessEx,format('Stop process #{0} "{1}"?',e,t),e),!1}function stopProcessEx(e,t){meshserver.send({action:"msg",type:"pskill",nodeid:currentNode._id,value:t}),setTimeout(refreshDeskTools,300)}function setupFiles(){var e=filesNode==currentNode,t=0!=(1&(filesNode=currentNode).conn);QE("p13Connect",t),0!=e&&0!=t||!files||(files.Stop(),files=null)}function onFilesStateChange(e,t){setSessionActivity(),p13Connect.value=0==t?"Verbinden":"Verbreken";var n=StatusStrs[t];switch(1==files.webRtcActive&&(n+=", WebRTC"),Q("p13Status").textContent=n,t){case 0:QH("p13files",""),p13filetree=null,p13filetreelocation=[],QH("p13currentpath",""),QE("p13FolderUp",!1),p13setActions(),null!=files&&(files.Stop(),files=null);break;case 3:p13targetpath="",files.sendText({action:"ls",reqid:1,path:""})}}function CreateRemoteFiles(e){var t={protocol:5};return t.onFileUpdate=e,t.xxStateChange=function(e){},t.ProcessData=function(e){t.onFileUpdate(e)},t}var autoConnectFilesTimer=null;function autoConnectFiles(e){autoConnectFilesTimer=null==autoConnectFilesTimer?setInterval(connectFiles,100):(clearInterval(autoConnectFilesTimer),null)}function connectFiles(e){files?(files.Stop(),files=null):((files=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotFiles),serverPublicNamePort,authCookie,authRelayCookie,domainUrl)).attemptWebRTC=attemptWebRTC,files.onStateChanged=onFilesStateChange,files.Start(filesNode._id)),p13clipboard=p13clipboardFolder=null,p13clipboardCut=0,p13updateClipview()}var p13sortorder,p13filetree=null,p13targetpath=null,p13filetreelocation=[];function p13gotFiles(e){if(setSessionActivity(),0<e.length&&123!=e.charCodeAt(0))p13gotDownloadBinaryData(e);else if("download"!=(e=JSON.parse(decode_utf8(e))).action)if(e.path=e.path.replace(/\//g,"\\"),null!=p13filetree&&e.path==p13filetree.path){var t=p13getCheckedNames();p13filetree=e,p13updateFiles(t)}else{for(var n=e.path.replace(/\//g,"\\"),o=p13targetpath.replace(/\//g,"\\");0<n.length&&"\\"==n[0];)n=n.substring(1);for(;0<o.length&&"\\"==o[0];)o=o.substring(1);(n==o||"\\"==e.path&&""==p13targetpath)&&(p13filetree=e,p13updateFiles())}else p13gotDownloadCommand(e)}function p13getCheckedNames(){for(var e=[],t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&e.push(p13filetree.dir[t[n].value].n);return e}function p13updateFiles(e){var t="",n="",o="<a style=cursor:pointer onclick=p13folderup(0)>Root</a>",i=p13filetree.path.split("\\");for(var a in p13filetreelocation=[],i)""!=i[a]&&p13filetreelocation.push(i[a]);for(var a in p13filetreelocation)o+=" / <a style=cursor:pointer onclick=p13folderup("+(parseInt(a)+1)+")>"+p13filetreelocation[a]+"</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="<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'> <span style=float:right></span><span><div class=fileIcon"+d.t+'></div><a style=cursor:pointer onclick=p13folderset("'+encodeURIComponent(d.nx)+'")>'+r+"</a></span></div>"}else{var m=r;0<d.s&&(m='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick="p13downloadfile(\''+encodeURIComponent(s+"/"+p)+"','"+encodeURIComponent(p)+"',"+d.s+')">'+r+"</a>"),u="<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p13setActions() value='"+d.nx+"'> <span style=float:right;padding-right:4px>"+c+"</span><span><div class=fileIcon"+d.t+"></div>"+m+"</span></div>"}d.t<3?t+=u:n+=u}if(QH("p13files",t+n),QH("p13currentpath",o),QE("p13FolderUp",0!=p13filetreelocation.length),null!=e){var g=document.getElementsByName("fd");for(a=0;a<g.length;a++)0<=e.indexOf(p13filetree.dir[g[a].value].n)&&(g[a].checked=!0)}p13setActions()}function p13folderset(e){p13targetpath=joinPaths(p13filetree.path,p13filetree.dir[e].n).split("\\").join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13folderup(e){if(null==e)p13filetreelocation.pop();else for(;p13filetreelocation.length>e;)p13filetreelocation.pop();p13targetpath=p13filetreelocation.join("/"),files.sendText({action:"ls",reqid:1,path:p13targetpath})}function p13sort_filename(e,t){return e.ln>t.ln?1*p13sortorder:e.ln<t.ln?-1*p13sortorder:0}function p13sort_timestamp(e,t){return e.d>t.d?1*p13sortorder:e.d<t.d?-1*p13sortorder:0}function p13sort_bysize(e,t){return e.s==t.s?p13sort_filename(e,t):(e.s-t.s)*p13sortorder}function p13sort_files(e){var t=[],n=Q("p13sortdropdown").value;for(var o in e)e[o].nx=o,null==e[o].s&&(e[o].s=0),null==e[o].n&&(e[o].n=o),e[o].ln=e[o].n.toLowerCase(),t.push(e[o]);return p13sortorder=1,3<n&&(p13sortorder=-1,n-=3),1==n?t.sort(p13sort_filename):2==n?t.sort(p13sort_bysize):3==n&&t.sort(p13sort_timestamp),t}function p13setActions(){if(null==p13filetree)QE("p13DeleteFileButton",!1),QE("p13NewFolderButton",!1),QE("p13UploadButton",!1),QE("p13RenameFileButton",!1),QE("p13SelectAllButton",!1),Q("p13SelectAllButton").value="alles",QE("p13RefreshButton",!1),QE("p13CutButton",!1),QE("p13CopyButton",!1),QE("p13PasteButton",!1);else{var e=p13getFileSelCount(),t=p13getFileCount(),n=p13getFileSelCount(!1),o=0<currentNode.agent.id&¤tNode.agent.id<5;QE("p13DeleteFileButton",0<e&&(0<p13filetreelocation.length||0==o)),QE("p13NewFolderButton",0<p13filetreelocation.length||0==o),QE("p13UploadButton",0<p13filetreelocation.length||0==o),QE("p13RenameFileButton",1==e&&(0<p13filetreelocation.length||0==o)),QE("p13SelectAllButton",0<t),Q("p13SelectAllButton").value=0<e?"Geen":"alles",QE("p13RefreshButton",!0),QE("p13CutButton",0<e&&e==n&&(0<p13filetreelocation.length||0==o)),QE("p13CopyButton",0<e&&e==n&&(0<p13filetreelocation.length||0==o)),QE("p13PasteButton",(0<p13filetreelocation.length||0==o)&&null!=p13clipboard&&0<p13clipboard.length)}}function p13getFileSelCount(e){for(var t=0,n=document.getElementsByName("fd"),o=0;o<n.length;o++)!n[o].checked||0==e&&"3"!=n[o].attributes.file.value||t++;return t}function p13getFileSelDirCount(){for(var e=0,t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&"999"==t[n].attributes.file.value&&e++;return e}function p13getFileCount(){return document.getElementsByName("fd").length}function p13selectallfile(){for(var e=0==p13getFileSelCount(),t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked=e;p13setActions()}function p13createfolder(){setDialogMode(2,"Nieuwe map",3,p13createfolderEx,"<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% />"),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13createfolderEx(){files.sendText({action:"mkdir",reqid:1,path:p13filetreelocation.join("/")+"/"+Q("p13renameinput").value}),p13folderup(999)}function p13deletefile(){var e=p13getFileSelCount(),t=0<p13getFileSelDirCount()?"<br /><br /><label><input type=checkbox id=p13recdeleteinput>Recursieve verwijdering</label><br>":"<input type=checkbox id=p13recdeleteinput style='display:none'>";setDialogMode(2,"Verwijderen",3,p13deletefileEx,1<e?format("Verwijder {0} gelecteerde items?",e)+t:"Verwijder geselecteerde item?"+t)}function p13deletefileEx(){for(var e=[],t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&e.push(p13filetree.dir[t[n].value].n);files.sendText({action:"rm",reqid:1,path:p13filetreelocation.join("/"),delfiles:e,rec:Q("p13recdeleteinput").checked}),p13folderup(999)}function p13renamefile(){for(var e,t=document.getElementsByName("fd"),n=0;n<t.length;n++)t[n].checked&&(e=p13filetree.dir[t[n].value].n);setDialogMode(2,"Hernoemen",3,p13renamefileEx,'<input type=text id=p13renameinput maxlength=64 onkeyup=p13fileNameCheck(event) style=width:100% value="'+e+'" />',{action:"rename",path:p13filetreelocation.join("/"),oldname:e}),focusTextBox("p13renameinput"),p13fileNameCheck()}function p13renamefileEx(e,t){t.newname=Q("p13renameinput").value,files.sendText(t),p13folderup(999)}function p13fileNameCheck(e){var t=isFilenameValid(Q("p13renameinput").value);QE("idx_dlgOkButton",t),1==t&&null!=e&&13==e.keyCode&&dialogclose(1)}function p13uploadFile(){setDialogMode(2,"Upload bestand",3,p13uploadFileEx,"<input type=file name=files id=p13uploadinput style=width:100% multiple=multiple onchange=\"updateUploadDialogOk('p13uploadinput')\" />"),updateUploadDialogOk("p13uploadinput")}function p13uploadFileEx(){p13doUploadFiles(Q("p13uploadinput").files)}function p13viewfile(){for(var e=document.getElementsByName("fd"),t=0;t<e.length;t++)if(e[t].checked){p13filetree.dir[e[t].value].s<=204800?p13downloadfile(encodeURIComponent(p13filetreelocation.join("/")+"/"+p13filetree.dir[e[t].value].n),encodeURIComponent(p13filetree.dir[e[t].value].n),p13filetree.dir[e[t].value].s,"viewer"):messagebox("Bestandsberwerker","Alleen bestanden kleiner dan 200k kunnen worden bewerkt.");break}}var downloadFile,uploadFile,currentMesh,p13clipboard=null,p13clipboardFolder=null,p13clipboardCut=0;function p13copyFile(e){var t=document.getElementsByName("fd");p13clipboard=[],p13clipboardCut=e,p13clipboardFolder=p13targetpath;for(var n=0;n<t.length;n++)t[n].checked&&"3"==t[n].attributes.file.value&&p13clipboard.push(p13filetree.dir[t[n].value].n);p13updateClipview()}function p13pasteFile(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format("Bevestig kopieën van {0} vermeldingen tot deze locatie?",p13clipboard.length):format("Bevestig kopie van 1 vermelding tot deze locatie?"):1<p13clipboard.length?format("Verplaatsing van {0} vermeldingen naar deze locatie bevestigen?",p13clipboard.length):format("Verplaatsing van 1 vermelding naar deze locatie bevestigen?")),setDialogMode(2,"Plakken",3,p13pasteFileEx,e)}function p13pasteFileEx(){files.sendText({action:0==p13clipboardCut?"copy":"move",reqid:1,scpath:p13clipboardFolder,dspath:p13targetpath,names:p13clipboard}),p13folderup(999),1==p13clipboardCut&&(p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview())}function p13updateClipview(){var e="";null!=p13clipboard&&0<p13clipboard.length&&(e=0==p13clipboardCut?1<p13clipboard.length?format('{0} items vasthouden voor kopiëren, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.',p13clipboard.length):format('1 item vasthouden voor kopiëren, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.'):1<p13clipboard.length?format('{0} items vasthouden voor verplaatsen, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.',p13clipboard.length):format('1 item vasthouden voor verplaatsen, <a href=# onclick="return p13clearClip()" style=cursor:pointer>Wissen</a>.')),QH("p13bottomstatus",e),p13setActions()}function p13clearClip(){return p13clipboardFolder=p13clipboard=null,p13clipboardCut=0,p13updateClipview(),!1}function updateUploadDialogOk(e){QE("idx_dlgOkButton",""!=Q(e).value)}function getFileSelCount(e){for(var t=0,n=document.getElementsByName("fc"),o=0;o<n.length;o++)!n[o].checked||0==e&&"3"!=n[o].attributes.file.value||t++;return t}function getFileCount(){return document.getElementsByName("fc").length}function p13downloadfile(e,t,n){xxdialogMode||downloadFile||!files||(downloadFile={path:decodeURIComponent(e),file:decodeURIComponent(t),size:n,tsize:0,data:"",state:0,id:Math.random()},files.sendText({action:"download",sub:"start",id:downloadFile.id,path:downloadFile.path}),setDialogMode(2,"Download Bestand",10,p13downloadFileCancel,"<div>"+downloadFile.file+"</div><br /><progress id=d2progressBar style=width:100% value=0 max="+n+" />"))}function p13downloadFileCancel(){setDialogMode(0),files.sendText({action:"download",sub:"cancel",id:downloadFile.id}),downloadFile=null}function p13gotDownloadCommand(e){null!=downloadFile&&e.id==downloadFile.id&&("start"==e.sub?(downloadFile.state=1,files.sendText({action:"download",sub:"startack",id:downloadFile.id})):"cancel"==e.sub&&(downloadFile=null,setDialogMode(0)))}function p13gotDownloadBinaryData(e){downloadFile&&0!=downloadFile.state&&(4<e.length&&(downloadFile.tsize+=e.length-4,downloadFile.data+=e.substring(4),Q("d2progressBar").value=downloadFile.tsize),0!=(1&ReadInt(e,0))?(saveAs(data2blob(downloadFile.data),downloadFile.file),downloadFile=null,setDialogMode(0)):files.sendText({action:"download",sub:"ack",id:downloadFile.id}))}function p13doUploadFiles(e){xxdialogMode||((uploadFile={}).xpath=p13filetreelocation.join("/"),uploadFile.xfiles=e,uploadFile.xfilePtr=-1,setDialogMode(2,"Upload bestand",10,p13uploadFileCancel,"<div id=p13dfileName>Verbinden...</div><br /><progress id=d2progressBar style=width:100% value=0 max=0 />"),p13uploadReconnect())}function onFileUploadStateChange(e,t){switch(t){case 0:p13folderup(9999);break;case 3:p13uploadNextFile();break;default:console.log("Unknown onFileUploadStateChange state",t)}}function p13uploadReconnect(){uploadFile.ws=CreateAgentRedirect(meshserver,CreateRemoteFiles(p13gotUploadData),serverPublicNamePort,authCookie,authRelayCookie,domainUrl),uploadFile.ws.attemptWebRTC=!1,uploadFile.ws.ctrlMsgAllowed=!1,uploadFile.ws.onStateChanged=onFileUploadStateChange,uploadFile.ws.Start(filesNode._id)}function p13uploadNextFile(){if(uploadFile.xfilePtr++,uploadFile.xfiles.length>uploadFile.xfilePtr){uploadFile.xptr=0;var e=uploadFile.xfiles[uploadFile.xfilePtr];QH("p13dfileName",e.name),Q("d2progressBar").max=e.size,Q("d2progressBar").value=0,uploadFile.xreader=new FileReader,uploadFile.xreader.onload=function(){uploadFile.xdata=uploadFile.xreader.result,uploadFile.ws.sendText({action:"upload",reqid:uploadFile.xfilePtr,path:uploadFile.xpath,name:e.name,size:uploadFile.xdata.byteLength})},uploadFile.xreader.readAsArrayBuffer(e)}else p13uploadFileCancel()}function p13uploadFileCancel(e,t){null!=uploadFile&&(null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile=null),setDialogMode(0)}function p13gotUploadData(e){var t=JSON.parse(e);if(null!=uploadFile&&parseInt(uploadFile.xfilePtr)==parseInt(t.reqid))if("uploadstart"==t.action){p13uploadNextPart(!1);for(var n=0;n<8;n++)p13uploadNextPart(!0)}else"uploadack"==t.action?p13uploadNextPart(!1):"uploaderror"==t.action&&p13uploadFileCancel()}function p13uploadNextPart(e){var t=uploadFile.xdata,n=uploadFile.xptr,o=uploadFile.xptr+4096;if(o>t.byteLength){if(1==e)return;o=t.byteLength}if(n==t.byteLength)null!=uploadFile.ws&&(uploadFile.ws.Stop(),uploadFile.ws=null),uploadFile.xfiles.length>uploadFile.xfilePtr+1?p13uploadReconnect():p13uploadFileCancel();else{var i=t.slice(n,o);uploadFile.ws.send(i),uploadFile.xptr=o,Q("d2progressBar").value=o}}function p20updateMesh(){if(null!=currentMesh){QH("p20meshName",EscapeHtml(currentMesh.name));var e=format("Onbekend #{0}",currentMesh.mtype),t=currentMesh.links[userinfo._id].rights;1==currentMesh.mtype&&(e="Intel® AMT alleen, geen agent"),2==currentMesh.mtype&&(e="Beheerd met behulp van een software-agent");var n="";n+=addHtmlValue("Naam",addLinkConditional(EscapeHtml(currentMesh.name),"p20editmesh(1)",0!=(1&t))),n+=addHtmlValue("Omschrijving",addLinkConditional(currentMesh.desc&&""!=currentMesh.desc?EscapeHtml(currentMesh.desc):"<i>Geen</i>","p20editmesh(2)",0!=(1&t))),n+=addHtmlValue("Typen",e),n+="<br style=clear:both><br>";var o=currentMesh.links[userinfo._id];o&&0!=(2&o.rights)&&(n+="<div style=margin-bottom:6px><a onclick=p20showAddMeshUserDialog() style=cursor:pointer><img src=images/icon-addnew.png border=0 height=12 width=12> gebruiker toevoegen</a></div>"),n+='<table style="color:black;background-color:#EEE;border-color:#AAA;border-width:1px;border-style:solid;border-collapse:collapse" border=0 cellpadding=2 cellspacing=0 width=100%><tbody><tr style=background-color:#AAAAAA;font-weight:bold><th scope=col style=text-align:left;width:430px>Gebruikersautorisaties</th></tr>';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<t.name?-1:0}),a){var l="",r="Gedeeltelijke rechten",d=a[s].rights;4294967295==d?r="Volledige beheerder":0==d&&(r="Geen rechten"),s==userinfo._id||4294967295!=t&&0==(2&t)||(l='<a onclick=p20deleteUser(event,"'+encodeURIComponent(a[s].id)+'") style=cursor:pointer><img src=images/trash.png border=0 height=10 width=10></a>'),n+='<tr onclick=p20viewuser("'+encodeURIComponent(a[s].id)+'") style=height:32px;cursor:pointer'+(i%2==0?";background-color:#DDD":"")+"><td>",n+="<div style=float:right>"+l+"</div><div style=float:right;padding-right:4px>"+r+"</div><div class=m2></div><div> "+EscapeHtml(decodeURIComponent(a[s].name))+"<div></div></div>",n+="</td></tr>",++i}n+="</tbody></table>",4294967295==t&&(n+="<div style=font-size:small;text-align:right;margin-top:6px><span><a onclick=p20showDeleteMeshDialog() style=cursor:pointer>Verwijder groep</a></span></div>"),QH("p20info",n)}}function p20showDeleteMeshDialog(){if(xxdialogMode)return!1;var e=format("Weet je zeker dat je groep {0} wilt verwijderen? Als u de apparaatgroep verwijdert, wordt ook alle informatie over apparaten binnen deze groep verwijderd.",EscapeHtml(currentMesh.name))+"<br /><br />";return setDialogMode(2,"Verwijder groep",3,p20showDeleteMeshDialogEx,e+="<label><input id=p20check type=checkbox onchange=p20validateDeleteMeshDialog() />Bevestig</label>"),p20validateDeleteMeshDialog(),!1}function p20validateDeleteMeshDialog(){QE("idx_dlgOkButton",Q("p20check").checked)}function p20showDeleteMeshDialogEx(e,t){meshserver.send({action:"deletemesh",meshid:currentMesh._id,meshname:currentMesh.name})}function p20editmesh(e){if(!xxdialogMode){var t=addHtmlValue("Naam","<input id=dp20meshname style=width:170px maxlength=32 onchange=p20editmeshValidate() onkeyup=p20editmeshValidate() />");setDialogMode(2,"Bewerk apparaatgroep",3,p20editmeshEx,t+=addHtmlValue("Omschrijving","<input id=dp20meshdesc style=width:170px maxlength=1024 onkeyup=p20editmeshValidate() />")),Q("dp20meshname").value=currentMesh.name,currentMesh.desc&&(Q("dp20meshdesc").value=currentMesh.desc),p20editmeshValidate(),2==e?Q("dp20meshdesc").focus():Q("dp20meshname").focus()}}function p20editmeshEx(){meshserver.send({action:"editmesh",meshid:currentMesh._id,meshname:Q("dp20meshname").value,desc:Q("dp20meshdesc").value})}function p20editmeshValidate(){QE("idx_dlgOkButton",0<Q("dp20meshname").value.length)}function p20showAddMeshUserDialog(){if(!xxdialogMode){var e=addHtmlValue("User","<input id=dp20username style=width:170px maxlength=32 onchange=p20validateAddMeshUserDialog() onkeyup=p20validateAddMeshUserDialog() />");e+='<div style="border:2px groove gray;background-color:white;max-height:120px;overflow-y:scroll">',e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20fulladmin>Volledige beheerder</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editmesh>Bewerk apparaatgroep</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20manageusers>Beheer apparaatgroep gebruikers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20managecomputers>Beheer apparaatgroep computers</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotecontrol>Extern beheer</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remoteview style=margin-left:12px>Alleen extern meekijken</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20remotelimitedinput style=margin-left:12px>Alleen beperkte invoer</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noterminal style=margin-left:12px>Geen terminal toegang</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20nofiles style=margin-left:12px>Geen bestandstoegang</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20noamt style=margin-left:12px>Geen Intel® AMT</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshagentconsole>Mesh Agent Console</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20meshserverfiles>Serverbestanden</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20wakedevices>apparaat wekken</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20editnotes>Apparaatnotities bewerken</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20limitevents>Toon alleen eigen gebeurtenissen</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20chatnotify>Chat & Melden</label><br>",e+="<label><input type=checkbox onchange=p20validateAddMeshUserDialog() id=p20uninstall>deinstallatie agent</label><br>",setDialogMode(2,"Gebruiker toevoegen aan Mesh",3,p20showAddMeshUserDialogEx,e+="</div>"),p20validateAddMeshUserDialog(),Q("dp20username").focus()}}function p20validateAddMeshUserDialog(){var e=currentMesh.links[userinfo._id].rights,t=!Q("p20fulladmin").checked;QE("p20fulladmin",4294967295==e),QE("p20editmesh",t&&4294967295==e),QE("p20manageusers",t),QE("p20managecomputers",t),QE("p20remotecontrol",t),QE("p20meshagentconsole",t),QE("p20meshserverfiles",t),QE("p20wakedevices",t),QE("p20editnotes",t),QE("p20limitevents",t),QE("p20remoteview",t&&Q("p20remotecontrol").checked),QE("p20remotelimitedinput",t&&Q("p20remotecontrol").checked&&!Q("p20remoteview").checked),QE("p20noterminal",t&&Q("p20remotecontrol").checked),QE("p20nofiles",t&&Q("p20remotecontrol").checked),QE("p20noamt",t&&Q("p20remotecontrol").checked),QE("p20chatnotify",t),QE("p20uninstall",t)}function p20showAddMeshUserDialogEx(){var e=0;1==Q("p20fulladmin").checked?e=4294967295:(1==Q("p20editmesh").checked&&(e+=1),1==Q("p20manageusers").checked&&(e+=2),1==Q("p20managecomputers").checked&&(e+=4),1==Q("p20remotecontrol").checked&&(e+=8),1==Q("p20meshagentconsole").checked&&(e+=16),1==Q("p20meshserverfiles").checked&&(e+=32),1==Q("p20wakedevices").checked&&(e+=64),1==Q("p20editnotes").checked&&(e+=128),1==Q("p20remoteview").checked&&(e+=256),1==Q("p20noterminal").checked&&(e+=512),1==Q("p20nofiles").checked&&(e+=1024),1==Q("p20noamt").checked&&(e+=2048),1==Q("p20remotelimitedinput").checked&&(e+=4096),1==Q("p20limitevents").checked&&(e+=8192),1==Q("p20chatnotify").checked&&(e+=16384),1==Q("p20uninstall").checked&&(e+=32768));var t=Q("dp20username").value.split(","),n=[];for(var o in t)n.push(t[o].trim());meshserver.send({action:"addmeshuser",meshid:currentMesh._id,meshname:currentMesh.name,usernames:n,meshadmin:e})}function p20viewuser(e){if(!xxdialogMode){e=decodeURIComponent(e);var t=[],n=currentMesh.links[userinfo._id].rights,o=currentMesh.links[e].rights;4294967295==o?t.push("Volledige beheerder"):(0!=(1&o)&&t.push("Bewerk apparaatgroep"),0!=(2&o)&&t.push("Beheer apparaatgroep gebruikers"),0!=(4&o)&&t.push("Beheer apparaatgroep computers"),0!=(8&o)&&t.push("Extern beheer"),0!=(16&o)&&t.push("Agentconsole"),0!=(32&o)&&t.push("Serverbestanden"),0!=(64&o)&&t.push("apparaat wekken"),0!=(128&o)&&t.push("Notities bewerken"),0!=(256&o)&&t.push("Alleen extern meekijken"),0!=(512&o)&&t.push("Geen terminal"),0!=(1024&o)&&t.push("Geen bestanden"),0!=(2048&o)&&t.push("Geen Intel® AMT"),0!=(8&o)&&0!=(4096&o)&&0==(256&o)&&t.push("Beperkte invoer"),0!=(8192&o)&&t.push("Alleen eigen gebeurtenissen"),0!=(16384&o)&&t.push("Chat & Melden"),0!=(32768&o)&&t.push("deinstallatie")),0==t.length&&t.push("Geen rechten");var i=1,a=addHtmlValue("Gebruiker",EscapeHtml(decodeURIComponent(e.split("/")[2])));a+=addHtmlValue("machtigingen",t.join(",")),userinfo._id!=e&&(4294967295==n||0!=(2&n)&&4294967295!=o)&&(i+=4),setDialogMode(2,"Apparaatgroep gebruiker",i,p20viewuserEx,a,e)}}function p20viewuserEx(e,t){2==e&&setDialogMode(2,"externe Mesh gebruiker",3,p20viewuserEx2,format("Bevestig de verwijdering van gebruiker {0}?",t.split("/")[2]),t)}function p20deleteUser(e,t){haltEvent(e),p20viewuserEx(2,decodeURIComponent(t))}function p20viewuserEx2(e,t){meshserver.send({action:"removemeshuser",meshid:currentMesh._id,meshname:currentMesh.name,userid:t})}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,xxcurrentView=-1;function go(e){if(setSessionActivity(),!xxdialogMode&&xxcurrentView!=e){updateFooterMenu(),setDialogMode(0);for(var t=0;t<32;t++)QV("p"+t,t==e);xxcurrentView=e}}function setDialogMode(e,t,n,o,i,a){setSessionActivity(),xxdialogMode=e,xxdialogFunc=o,xxdialogButtons=n,xxdialogTag=a,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&n),QV("idx_dlgCancelButton",2&n),QV("id_dialogclose",2&n||8&n),QV("idx_dlgButtonBar",7&n),t&&QH("id_dialogtitle",t);for(var s=1;s<24;s++)QV("dialog"+s,s==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){setSessionActivity();var t=xxdialogFunc,n=xxdialogButtons,o=xxdialogTag;setDialogMode(),(8&n||e)&&t&&t(e,o)}function putstore(e,t){try{if("undefined"==typeof localStorage||localStorage.getItem(e)==t)return;null==t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}if("_"!=e[0]){for(var n={},o=0,i=localStorage.length;o<i;++o){var a=localStorage.key(o);"_"!=a[0]&&(n[a]=localStorage.getItem(a))}meshserver.send({action:"userWebState",state:JSON.stringify(n)})}}function getstore(e,t){try{if("undefined"==typeof localStorage)return t;var n=localStorage.getItem(e);return null==n||null==n?t:n}catch(e){return t}}function center(){QS("dialog").left=(getDocWidth()-300)/2+"px",deskAdjust(),deskAdjust()}function messagebox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){QH("id_dialogMessage",t),setDialogMode(1,e)}function getDocWidth(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth&&0!=document.documentElement.clientWidth?document.documentElement.clientWidth:document.getElementsByTagName("body")[0].clientWidth}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function haltReturn(e){13==e.keyCode&&haltEvent(e)}function validateEmail(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function reload(){window.location.href=window.location.href}function getNodeFromId(e){for(var t in nodes)if(nodes[t]._id==e)return nodes[t];return null}function addHtmlValue(e,t){return"<table><td style=width:120px>"+e+"<td><b>"+t+"</b></table>"}function addHtmlValue2(e,t){return"<div><div style=display:inline-block;float:right>"+t+"</div><div style=display:inline-block>"+e+"</div></div>"}function addLink(e,t){return"<a style=cursor:pointer;color:darkblue;text-decoration:none onclick='"+t+"'>♦ "+e+"</a>"}function addLinkConditional(e,t,n){return n?addLink(e,t):e}function passwordcheck(e){return/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()]).{8,}/.test(e)}function getFileSizeStr(e){return 1==e?"1 byte":format("{0} bytes",e)}function joinPaths(){var e=[];for(var t in arguments){var n=arguments[t];if(null!=n&&""!=n){for(;n.endsWith("/")||n.endsWith("\\");)n=n.substring(0,n.length-1);for(;n.startsWith("/")||n.startsWith("\\");)n=n.substring(1);e.push(n)}}return e.join("/")}function focusTextBox(e){setTimeout(function(){Q(e).selectionStart=Q(e).selectionEnd=65535,Q(e).focus()},0)}isFilenameValid=function(){var t=/^[^\\/:\*\?"<>\|]+$/,n=/^\./,o=/^(nul|prn|con|lpt[0-9]|com[0-9])(\.|$)/i;return function(e){return t.test(e)&&!n.test(e)&&!o.test(e)&&"."!=e[0]}}();function parseUriArgs(){var e,t={},n=window.document.location.href.split(/[\?&|\=]/);for(o in n.splice(0,1),n)switch(o%2){case 0:e=decodeURIComponent(n[o]);break;case 1:t[e]=decodeURIComponent(n[o]);var o=parseInt(t[e]);o==t[e]&&(t[e]=o)}return t}function printDate(e){return e.toLocaleDateString(args.locale)}function printTime(e){return e.toLocaleTimeString(args.locale)}function printDateTime(e){return e.toLocaleString(args.locale)}function format(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==n[t]?n[t]:e})}function nobreak(e){return e.split(" ").join(" ")}</script> |