Version 0.9.75

Ylian Saint-Hilaire committed Jan 28, 2022 at 14:43 UTC af05d7f7bc68566d16028dd7a2f32f8cf65a6074
4 files changed +60 -37
agents/agent-translations.json
+1 -1
@@ -65,7 +65,7 @@
65 "agent": "Agent",
66 "group": "Gerätegruppe",
67 "url": "Server-URL",
68 - "meshName": "Maschenname",
68 + "meshName": "MESH Name",
69 "meshId": "Gruppen-ID",
70 "serverId": "Server-ID",
71 "setup": "Konfiguration",
package.json
+1 -1
@@ -1,6 +1,6 @@
1 {
2 "name": "meshcentral",
3 - "version": "0.9.74",
3 + "version": "0.9.75",
4 "keywords": [
5 "Remote Device Management",
6 "Remote Device Monitoring",
public/scripts/amt-desktop-0.0.2-min.js
+1 -1
@@ -1 +1 @@
1 -var CreateAmtRemoteDesktop=function(a,t){var S={};function p(a){return String.fromCharCode.apply(null,a)}function m(a,t,e,n,o,r,i){var s,c,h,d,v=a[t++],f={},u=0,l=0;if(0==v){if(2==S.bpp)for(d=0;d<i;d++)b(a[t++]+(a[t++]<<8),d);else for(d=0;d<i;d++)y(a[t++],d);w(S.spare,e,n)}else if(1==v){c=a[t++]+(2==S.bpp?a[t++]<<8:0),S.canvas.fillStyle="rgb("+(1==S.bpp?(224&c)+","+((28&c)<<3)+","+L((3&c)<<6):(c>>8&248)+","+(c>>3&252)+","+((31&c)<<3))+")";var g=k(e);n=K(0,n),e=g,S.canvas.fillRect(e,n,o,r)}else if(1<v&&v<17){var p=4,m=15;if(2==S.bpp){for(d=0;d<v;d++)f[d]=a[t++]+(a[t++]<<8);for(2==v?m=p=1:v<=4&&(p=2,m=3);u<i&&t<a.byteLength;)for(c=a[t++],d=8-p;0<=d;d-=p)b(f[c>>d&m],u++)}else{for(d=0;d<v;d++)f[d]=a[t++];for(2==v?m=p=1:v<=4&&(p=2,m=3);u<i&&t<a.byteLength;)for(c=a[t++],d=8-p;0<=d;d-=p)y(f[c>>d&m],u++)}w(S.spare,e,n)}else if(128==v){if(2==S.bpp)for(;u<i&&t<a.byteLength;){for(c=a[t++]+(a[t++]<<8),l=1;l+=h=a[t++],255==h;);if(0==S.rotation)D(c,u,l),u+=l;else for(;0<=--l;)b(c,u++)}else for(;u<i&&t<a.byteLength;){for(c=a[t++],l=1;l+=h=a[t++],255==h;);if(0==S.rotation)C(c,u,l),u+=l;else for(;0<=--l;)y(c,u++)}w(S.spare,e,n)}else if(129<v){if(2==S.bpp)for(d=0;d<v-128;d++)f[d]=a[t++]+(a[t++]<<8);else for(d=0;d<v-128;d++)f[d]=a[t++];for(;u<i&&t<a.byteLength;){if(l=1,c=f[(s=a[t++])%128],127<s)for(;l+=h=a[t++],255==h;);if(0==S.rotation)(2==S.bpp?D:C)(c,u,l),u+=l;else if(2==S.bpp)for(;0<=--l;)b(c,u++);else for(;0<=--l;)y(c,u++)}w(S.spare,e,n)}}function w(a,t,e){var n,o,r;1!=S.holding&&(o=t,r=e,n=0==S.rotation?o:1==S.rotation?S.canvas.canvas.width-S.sparew2-r:2==S.rotation?S.canvas.canvas.width-S.sparew2-o:3==S.rotation?r:0,o=t,r=e,e=0==S.rotation?r:1==S.rotation?o:2==S.rotation?S.canvas.canvas.height-S.spareh2-r:3==S.rotation?S.canvas.canvas.height-S.spareh-o:0,t=n,S.canvas.putImageData(a,t,e))}function y(a,t){var e,n,o=t<<2;0<S.rotation&&(1==S.rotation?(e=t%S.sparew,n=Math.floor(t/S.sparew),o=(t=e*S.sparew2+(S.sparew2-1-n))<<2):2==S.rotation?o=S.sparew*S.spareh*4-4-o:3==S.rotation&&(e=t%S.sparew,n=Math.floor(t/S.sparew),o=(t=(S.sparew2-1-e)*S.sparew2+n)<<2)),S.spare.data[o]=224&a,S.spare.data[o+1]=(28&a)<<3,S.spare.data[o+2]=L((3&a)<<6)}function b(a,t){var e,n,o=t<<2;0<S.rotation&&(1==S.rotation?(e=t%S.sparew,n=Math.floor(t/S.sparew),o=(t=e*S.sparew2+(S.sparew2-1-n))<<2):2==S.rotation?o=S.sparew*S.spareh*4-4-o:3==S.rotation&&(e=t%S.sparew,n=Math.floor(t/S.sparew),o=(t=(S.sparew2-1-e)*S.sparew2+n)<<2)),S.spare.data[o]=a>>8&248,S.spare.data[o+1]=a>>3&252,S.spare.data[o+2]=(31&a)<<3}function C(a,t,e){for(var n=t<<2,o=224&a,r=(28&a)<<3,i=L((3&a)<<6);0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=i,n+=4}function D(a,t,e){for(var n=t<<2,o=a>>8&248,r=a>>3&252,i=(31&a)<<3;0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=i,n+=4}function k(a){return 0==S.rotation||1==S.rotation?a:2==S.rotation?a-S.canvas.canvas.width:3==S.rotation?a-S.canvas.canvas.height:0}function K(a,t){return 0==S.rotation?t:1==S.rotation?t-S.canvas.canvas.width:2==S.rotation?t-S.canvas.canvas.height:3==S.rotation?t:0}function L(a){return 127<a?a+32:a}function T(){var a;1!=S.holding&&(0<S.focusmode?(a=2*S.focusmode,S.send(String.fromCharCode(3,1)+ShortToStr(Math.max(Math.min(S.ox,S.mx)-S.focusmode,0))+ShortToStr(Math.max(Math.min(S.oy,S.my)-S.focusmode,0))+ShortToStr(a+Math.abs(S.ox-S.mx))+ShortToStr(a+Math.abs(S.oy-S.my))),S.ox=S.mx,S.oy=S.my):S.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(S.rwidth)+ShortToStr(S.rheight)))}S.canvasid=a,S.CanvasId=Q(a),S.scrolldiv=t,S.canvas=Q(a).getContext("2d"),S.protocol=2,S.state=0,S.acc=null,S.ScreenWidth=960,S.ScreenHeight=700,S.width=0,S.height=0,S.rwidth=0,S.rheight=0,S.bpp=2,S.useZRLE=!0,S.showmouse=!0,S.buttonmask=0,S.localKeyMap=!0,S.spare=null,S.sparew=0,S.spareh=0,S.sparew2=0,S.spareh2=0,S.sparecache={},S.ZRLEfirst=1,S.onScreenSizeChange=null,S.frameRateDelay=0,S.noMouseRotate=!1,S.rotation=0,S.kvmDataSupported=!1,S.onKvmData=null,S.onKvmDataPending=[],S.onKvmDataAck=-1,S.holding=!1,S.lastKeepAlive=Date.now(),S.SwapMouse=!1,S.mNagleTimer=null,S.mx=0,S.my=0,S.ox=-1,S.oy=-1,S.focusmode=0,S.inflate=ZLIB.inflateInit(-15),S.xxStateChange=function(a){0==a?(S.canvas.fillStyle="#000000",S.canvas.fillRect(0,0,S.width,S.height),S.canvas.canvas.width=S.rwidth=S.width=640,S.canvas.canvas.height=S.rheight=S.height=400,QS(S.canvasid).cursor="default"):QS(S.canvasid).cursor=S.showmouse?"default":"none"},S.ProcessBinaryData=function(a){var t;for(null==S.acc?S.acc=new Uint8Array(a):((t=new Uint8Array(S.acc.byteLength+a.byteLength)).set(S.acc,0),t.set(new Uint8Array(a),S.acc.byteLength),S.acc=t);null!=S.acc&&0<S.acc.byteLength;){var e=0,n=new DataView(S.acc.buffer);if(0==S.state&&12<=S.acc.byteLength)e=12,S.state=1,S.send("RFB 003.008\n");else if(1==S.state&&1<=S.acc.byteLength)e=S.acc[0]+1,S.send(String.fromCharCode(1)),S.state=2;else if(2==S.state&&4<=S.acc.byteLength){if(e=4,0!=n.getUint32(0))return S.Stop();S.send(String.fromCharCode(1)),S.state=3}else if(3==S.state&&24<=S.acc.byteLength){S.rotation=0;var o=n.getUint32(20);if(S.acc.byteLength<24+o)return;e=24+o,S.canvas.canvas.width=S.rwidth=S.width=S.ScreenWidth=n.getUint16(0),S.canvas.canvas.height=S.rheight=S.height=S.ScreenHeight=n.getUint16(2);var r="";S.useZRLE&&(r+=IntToStr(16)),r+=IntToStr(0),r+=IntToStr(1092),S.send(String.fromCharCode(2,0)+ShortToStr(r.length/4+1)+r+IntToStr(-223)),1==S.bpp&&S.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)),S.state=4,S.parent&&S.parent.xxStateChange(3),T(),S.ox=-1,null!=S.onScreenSizeChange&&S.onScreenSizeChange(S,S.ScreenWidth,S.ScreenHeight)}else if(4==S.state)switch(S.acc[0]){case 0:if(S.acc.byteLength<4)return;S.state=100+n.getUint16(2),e=4,null!=S.onPreDrawImage&&S.onPreDrawImage();break;case 2:e=1;break;case 3:if(S.acc.byteLength<8)return;var i=n.getUint32(4)+8;if(S.acc.byteLength<i)return;e=function(a,t){if(a.byteLength<8)return 0;t=t.getUint32(4)+8;if(a.byteLength<t)return 0;null==S.onKvmData||16<=(a=p(a.slice(8,t))).length&&"\0KvmDataChannel"==a.substring(0,15)&&(0==S.kvmDataSupported&&(S.kvmDataSupported=!0,console.log("KVM Data Channel Supported.")),(-1==S.onKvmDataAck&&16==a.length||0!=a.charCodeAt(15))&&(S.onKvmDataAck=!0),16<=a.length&&S.onKvmData(a.substring(16)),1==S.onKvmDataAck&&0<S.onKvmDataPending.length&&S.sendKvmData(S.onKvmDataPending.shift()));return t}(S.acc,n)}else if(100<S.state&&12<=S.acc.byteLength){var s=n.getUint16(0),c=n.getUint16(2),h=n.getUint16(4),d=n.getUint16(6),v=h*d,o=n.getUint32(8);if(o<17){if(h<1||64<h||d<1||64<d)return console.log("Invalid tile size ("+h+","+d+"), disconnecting."),S.Stop();if(S.sparew!=h||S.spareh!=d){S.sparew=S.sparew2=h,S.spareh=S.spareh2=d,1!=S.rotation&&3!=S.rotation||(S.sparew2=d,S.spareh2=h);r=S.sparew2+"x"+S.spareh2;if(S.spare=S.sparecache[r],!S.spare){S.sparecache[r]=S.spare=S.canvas.createImageData(S.sparew2,S.spareh2);for(var f=S.sparew2*S.spareh2<<2,u=3;u<f;u+=4)S.spare.data[u]=255}}}if(4294967073==o)S.canvas.canvas.width=S.rwidth=S.width=h,S.canvas.canvas.height=S.rheight=S.height=d,S.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(S.width)+ShortToStr(S.height)),e=12,null!=S.onScreenSizeChange&&S.onScreenSizeChange(S,S.ScreenWidth,S.ScreenHeight);else if(0==o){var l=12,g=12+v*S.bpp;if(S.acc.byteLength<g)return;if(e=g,2==S.bpp)for(u=0;u<v;u++)b(n.getUint16(l,!0),u),l+=2;else for(u=0;u<v;u++)y(S.acc[l++],u);w(S.spare,s,c)}else{if(16!=o)return S.Stop();if(S.acc.byteLength<16)return;g=n.getUint32(12);if(S.acc.byteLength<16+g)return;l=16;5<g&&0==S.acc[l]&&n.getUint16(l+1,!0)==g-5?m(S.acc,l+5,s,c,h,d,v):0<(o=S.inflate.inflate(p(new Uint8Array(S.acc.buffer.slice(l,+(l+g)))))).length?m(function(a){for(var t=new Uint8Array(a.length),e=0,n=a.length;e<n;++e)t[e]=a.charCodeAt(e);return t}(o),0,s,c,h,d,v,o.length):console.log("Invalid deflate data"),e=16+g}100==--S.state&&(S.state=4,0==S.frameRateDelay?T():setTimeout(T,S.frameRateDelay))}if(0==e)return;e!=S.acc.byteLength?S.acc=new Uint8Array(S.acc.buffer.slice(e)):S.acc=null}},S.hold=function(a){S.holding!=a&&(S.holding=a,S.canvas.fillStyle="#000000",S.canvas.fillRect(0,0,S.width,S.height),0==S.holding?(S.canvas.canvas.width==S.width&&S.canvas.canvas.height==S.height||(S.canvas.canvas.width=S.width,S.canvas.canvas.height=S.height,null!=S.onScreenSizeChange&&S.onScreenSizeChange(S,S.ScreenWidth,S.ScreenHeight)),S.Send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(S.width)+ShortToStr(S.height))):(S.UnGrabMouseInput(),S.UnGrabKeyInput()))},S.tcanvas=null,S.setRotation=function(a){for(;a<0;)a+=4;var t=a%4;if(1!=S.holding){if(t==S.rotation)return!0;var e=S.canvas.canvas.width,n=S.canvas.canvas.height;1!=S.rotation&&3!=S.rotation||(e=S.canvas.canvas.height,n=S.canvas.canvas.width),null==S.tcanvas&&(S.tcanvas=document.createElement("canvas"));var o=S.tcanvas.getContext("2d");return o.setTransform(1,0,0,1,0,0),o.canvas.width=e,o.canvas.height=n,o.rotate(-90*S.rotation*Math.PI/180),0==S.rotation&&o.drawImage(S.canvas.canvas,0,0),1==S.rotation&&o.drawImage(S.canvas.canvas,-S.canvas.canvas.width,0),2==S.rotation&&o.drawImage(S.canvas.canvas,-S.canvas.canvas.width,-S.canvas.canvas.height),3==S.rotation&&o.drawImage(S.canvas.canvas,0,-S.canvas.canvas.height),0!=S.rotation&&2!=S.rotation||(S.canvas.canvas.height=e,S.canvas.canvas.width=n),1!=S.rotation&&3!=S.rotation||(S.canvas.canvas.height=n,S.canvas.canvas.width=e),S.canvas.setTransform(1,0,0,1,0,0),S.canvas.rotate(90*t*Math.PI/180),S.rotation=t,S.canvas.drawImage(S.tcanvas,k(0),K(0,0)),S.width=S.canvas.canvas.width,S.height=S.canvas.canvas.height,null!=S.onScreenResize&&S.onScreenResize(S,S.width,S.height,S.CanvasId),!0}S.rotation=t},S.Start=function(){for(var a in S.state=0,S.acc=null,S.ZRLEfirst=1,S.inflate.inflateReset(),S.onKvmDataPending=[],S.onKvmDataAck=-1,S.kvmDataSupported=!1,S.sparecache)delete S.sparecache[a]},S.Stop=function(){S.UnGrabMouseInput(),S.UnGrabKeyInput(),S.parent&&S.parent.Stop()},S.send=function(a){S.parent&&S.parent.send(a)};var o={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};function e(a,t){var e,n;return(t=t||window.event).code&&0==S.localKeyMap?null!=(e=(n=t).code.startsWith("Key")&&4==n.code.length?n.code.charCodeAt(3)+(0==n.shiftKey?32:0):n.code.startsWith("Digit")&&6==n.code.length?n.code.charCodeAt(5):n.code.startsWith("Numpad")&&7==n.code.length?n.code.charCodeAt(6):o[n.code])&&S.sendkey(e,a):(n=e=t.keyCode,0==t.shiftKey&&65<=e&&e<=90&&(n=e+32),112<=e&&e<=124&&(n=e+65358),8==e&&(n=65288),9==e&&(n=65289),13==e&&(n=65293),16==e&&(n=65505),17==e&&(n=65507),18==e&&(n=65513),27==e&&(n=65307),33==e&&(n=65365),34==e&&(n=65366),35==e&&(n=65367),36==e&&(n=65360),37==e&&(n=65361),38==e&&(n=65362),39==e&&(n=65363),40==e&&(n=65364),45==e&&(n=65379),46==e&&(n=65535),96<=e&&e<=105&&(n=e-48),106==e&&(n=42),107==e&&(n=43),109==e&&(n=45),110==e&&(n=46),111==e&&(n=47),186==e&&(n=59),187==e&&(n=61),188==e&&(n=44),189==e&&(n=45),190==e&&(n=46),191==e&&(n=47),192==e&&(n=96),219==e&&(n=91),220==e&&(n=92),221==e&&(n=93),222==e&&(n=39),S.sendkey(n,a)),S.haltEvent(t)}S.sendkey=function(a,t){if("object"==typeof a){var e,n="";for(e in a)n+=String.fromCharCode(4,a[e][1],0,0)+IntToStr(a[e][0]);S.send(n)}else S.send(String.fromCharCode(4,t,0,0)+IntToStr(a))},S.sendKvmData=function(a){!0!==S.onKvmDataAck?S.onKvmDataPending.push(a):(a="\0KvmDataChannel\0"+a,S.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),S.onKvmDataAck=!1)},S.sendKeepAlive=function(){S.lastKeepAlive<Date.now()-5e3&&(S.lastKeepAlive=Date.now(),S.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\0KvmDataChannel\0"))},S.SendCtrlAltDelMsg=function(){S.sendcad()};var n=!(S.sendcad=function(){S.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])}),r=!1;return S.GrabMouseInput=function(){var a;1!=n&&((a=S.canvas.canvas).onmouseup=S.mouseup,a.onmousedown=S.mousedown,a.onmousemove=S.mousemove,n=!0)},S.UnGrabMouseInput=function(){var a;0!=n&&((a=S.canvas.canvas).onmousemove=null,a.onmouseup=null,a.onmousedown=null,n=!1)},S.GrabKeyInput=function(){1!=r&&(document.onkeyup=S.handleKeyUp,document.onkeydown=S.handleKeyDown,document.onkeypress=S.handleKeys,r=!0)},S.UnGrabKeyInput=function(){0!=r&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,r=!1)},S.handleKeys=function(a){return S.haltEvent(a)},S.handleKeyUp=function(a){return e(0,a)},S.handleKeyDown=function(a){return e(1,a)},S.haltEvent=function(a){return a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!1},S.mousedblclick=function(a){},S.mousedown=function(a){var t=a.button;return S.SwapMouse&&(0==t?t=2:2==t&&(t=0)),S.buttonmask|=1<<t,S.mousemove(a,1)},S.mouseup=function(a){var t=a.button;return S.SwapMouse&&(0==t?t=2:2==t&&(t=0)),S.buttonmask&=65535-(1<<t),S.mousemove(a,1)},S.mousemove=function(a,t){if(S.state<4)return!0;var e,n,o,r,i,s=S.canvas.canvas.height/Q(S.canvasid).offsetHeight,c=S.canvas.canvas.width/Q(S.canvasid).offsetWidth,h=S.getPositionOfControl(Q(S.canvasid));return S.mx=(event.pageX-h[0])*c,S.my=(event.pageY-h[1])*s,event.addx&&(S.mx+=event.addx),event.addy&&(S.my+=event.addy),1!=S.rotation&&3!=S.rotation||(S.mx=S.mx*S.rwidth/S.width,S.my=S.my*S.rheight/S.height),1!=S.noMouseRotate&&(e=S.mx,n=S.my,r=0==S.rotation?e:1==S.rotation?n:2==S.rotation?S.canvas.canvas.width-e:3==S.rotation?S.canvas.canvas.height-n:0,S.my=(o=S.mx,i=S.my,0==S.rotation?i:1==S.rotation?S.canvas.canvas.width-o:2==S.rotation?S.canvas.canvas.height-i:3==S.rotation?o:0),S.mx=r),1==t?(S.send(String.fromCharCode(5,S.buttonmask)+ShortToStr(S.mx)+ShortToStr(S.my)),null!=S.mNagleTimer&&(clearTimeout(S.mNagleTimer),S.mNagleTimer=null)):null==S.mNagleTimer&&(S.mNagleTimer=setTimeout(function(){S.send(String.fromCharCode(5,S.buttonmask)+ShortToStr(S.mx)+ShortToStr(S.my)),S.mNagleTimer=null},50)),QV("DeskFocus",S.focusmode),0!=S.focusmode&&(s=Math.min(S.mx,S.canvas.canvas.width-S.focusmode),e=Math.min(S.my,S.canvas.canvas.height-S.focusmode),n=2*S.focusmode,o=(i=Q(S.canvasid)).offsetHeight/S.canvas.canvas.height,r=i.offsetWidth/S.canvas.canvas.width,t=QS("DeskFocus"),i=S.getPositionOfControl(Q(S.canvasid).parentElement),t.left=Math.max((s-S.focusmode)*o,0)+(pos[0]-i[0])+"px",t.top=Math.max((e-S.focusmode)*r,0)+(pos[1]-i[1])+"px",t.width=n*o-6+"px",t.height=n*o-6+"px"),S.haltEvent(a)},S.getPositionOfControl=function(a){var t=Array(2);for(t[0]=t[1]=0;a;)t[0]+=a.offsetLeft,t[1]+=a.offsetTop,a=a.offsetParent;return t},S}
\ No newline at end of file
1 +var CreateAmtRemoteDesktop=function(t,e){var S={};function m(t){return String.fromCharCode.apply(null,t)}function p(t,e,a,n,r,o,i){var s,c,h,d,l=t[e++],v={},u=0,g=0;if(0==l){if(2==S.bpp)for(d=0;d<i;d++)y(t[e++]+(t[e++]<<8),d);else for(d=0;d<i;d++)C(t[e++],d);w(S.spare,a,n)}else if(1==l){S.graymode?(c=t[e++],S.lowcolor&&(c<<=4),S.canvas.fillStyle="rgb("+c+","+c+","+c+")"):(c=t[e++]+(2==S.bpp?t[e++]<<8:0),S.canvas.fillStyle="rgb("+(1==S.bpp?(224&c)+","+((28&c)<<3)+","+T((3&c)<<6):(c>>8&248)+","+(c>>3&252)+","+((31&c)<<3))+")");var f=k(a);n=x(0,n),a=f,S.canvas.fillRect(a,n,r,o)}else if(1<l&&l<17){var m=4,p=15;if(2==S.bpp){for(d=0;d<l;d++)v[d]=t[e++]+(t[e++]<<8);for(2==l?p=m=1:l<=4&&(m=2,p=3);u<i&&e<t.byteLength;)for(c=t[e++],d=8-m;0<=d;d-=m)y(v[c>>d&p],u++)}else{for(d=0;d<l;d++)v[d]=t[e++];for(2==l?p=m=1:l<=4&&(m=2,p=3);u<i&&e<t.byteLength;)for(c=t[e++],d=8-m;0<=d;d-=m)C(v[c>>d&p],u++)}w(S.spare,a,n)}else if(128==l){if(2==S.bpp)for(;u<i&&e<t.byteLength;){for(c=t[e++]+(t[e++]<<8),g=1;g+=h=t[e++],255==h;);if(0==S.rotation)D(c,u,g),u+=g;else for(;0<=--g;)y(c,u++)}else for(;u<i&&e<t.byteLength;){for(c=t[e++],g=1;g+=h=t[e++],255==h;);if(0==S.rotation)b(c,u,g),u+=g;else for(;0<=--g;)C(c,u++)}w(S.spare,a,n)}else if(129<l){if(2==S.bpp)for(d=0;d<l-128;d++)v[d]=t[e++]+(t[e++]<<8);else for(d=0;d<l-128;d++)v[d]=t[e++];for(;u<i&&e<t.byteLength;){if(g=1,c=v[(s=t[e++])%128],127<s)for(;g+=h=t[e++],255==h;);if(0==S.rotation)(2==S.bpp?D:b)(c,u,g),u+=g;else if(2==S.bpp)for(;0<=--g;)y(c,u++);else for(;0<=--g;)C(c,u++)}w(S.spare,a,n)}}function w(t,e,a){var n,r,o;1!=S.holding&&(r=e,o=a,n=0==S.rotation?r:1==S.rotation?S.canvas.canvas.width-S.sparew2-o:2==S.rotation?S.canvas.canvas.width-S.sparew2-r:3==S.rotation?o:0,r=e,o=a,a=0==S.rotation?o:1==S.rotation?r:2==S.rotation?S.canvas.canvas.height-S.spareh2-o:3==S.rotation?S.canvas.canvas.height-S.spareh-r:0,e=n,S.canvas.putImageData(t,e,a))}function C(t,e){var a,n,r=e<<2;0<S.rotation&&(1==S.rotation?(a=e%S.sparew,n=Math.floor(e/S.sparew),r=(e=a*S.sparew2+(S.sparew2-1-n))<<2):2==S.rotation?r=S.sparew*S.spareh*4-4-r:3==S.rotation&&(a=e%S.sparew,n=Math.floor(e/S.sparew),r=(e=(S.sparew2-1-a)*S.sparew2+n)<<2)),S.graymode?(S.lowcolor&&(t<<=4),S.spare.data[r]=S.spare.data[r+1]=S.spare.data[r+2]=t):(S.spare.data[r]=224&t,S.spare.data[r+1]=(28&t)<<3,S.spare.data[r+2]=T((3&t)<<6))}function y(t,e){var a,n,r=e<<2;0<S.rotation&&(1==S.rotation?(a=e%S.sparew,n=Math.floor(e/S.sparew),r=(e=a*S.sparew2+(S.sparew2-1-n))<<2):2==S.rotation?r=S.sparew*S.spareh*4-4-r:3==S.rotation&&(a=e%S.sparew,n=Math.floor(e/S.sparew),r=(e=(S.sparew2-1-a)*S.sparew2+n)<<2)),S.spare.data[r]=t>>8&248,S.spare.data[r+1]=t>>3&252,S.spare.data[r+2]=(31&t)<<3}function b(t,e,a){if(S.graymode){var n=e<<2;for(S.lowcolor&&(t<<=4);0<=--a;)S.spare.data[n]=S.spare.data[n+1]=S.spare.data[n+2]=t,n+=4}else for(var n=e<<2,r=224&t,o=(28&t)<<3,i=T((3&t)<<6);0<=--a;)S.spare.data[n]=r,S.spare.data[n+1]=o,S.spare.data[n+2]=i,n+=4}function D(t,e,a){for(var n=e<<2,r=t>>8&248,o=t>>3&252,i=(31&t)<<3;0<=--a;)S.spare.data[n]=r,S.spare.data[n+1]=o,S.spare.data[n+2]=i,n+=4}function k(t){return 0==S.rotation||1==S.rotation?t:2==S.rotation?t-S.canvas.canvas.width:3==S.rotation?t-S.canvas.canvas.height:0}function x(t,e){return 0==S.rotation?e:1==S.rotation?e-S.canvas.canvas.width:2==S.rotation?e-S.canvas.canvas.height:3==S.rotation?e:0}function T(t){return 127<t?t+32:t}function K(){var t;1!=S.holding&&(0<S.focusmode?(t=2*S.focusmode,S.send(String.fromCharCode(3,1)+ShortToStr(Math.max(Math.min(S.ox,S.mx)-S.focusmode,0))+ShortToStr(Math.max(Math.min(S.oy,S.my)-S.focusmode,0))+ShortToStr(t+Math.abs(S.ox-S.mx))+ShortToStr(t+Math.abs(S.oy-S.my))),S.ox=S.mx,S.oy=S.my):S.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(S.rwidth)+ShortToStr(S.rheight)))}S.canvasid=t,S.CanvasId=Q(t),S.scrolldiv=e,S.canvas=Q(t).getContext("2d"),S.protocol=2,S.state=0,S.acc=null,S.ScreenWidth=960,S.ScreenHeight=700,S.width=0,S.height=0,S.rwidth=0,S.rheight=0,S.bpp=2,S.useRLE=!0,S.showmouse=!0,S.buttonmask=0,S.localKeyMap=!0,S.spare=null,S.sparew=0,S.spareh=0,S.sparew2=0,S.spareh2=0,S.sparecache={},S.onScreenSizeChange=null,S.frameRateDelay=0,S.noMouseRotate=!1,S.rotation=0,S.kvmDataSupported=!1,S.onKvmData=null,S.onKvmDataPending=[],S.onKvmDataAck=-1,S.holding=!1,S.lastKeepAlive=Date.now(),S.kvmExt={},S.kvmExtChanged=null,S.useZLib=!1,S.decimationMode=0,S.graymode=!1,S.lowcolor=!1,S.mNagleTimer=null,S.mx=0,S.my=0,S.ox=-1,S.oy=-1,S.focusmode=0,S.inflate=ZLIB.inflateInit(-15),S.xxStateChange=function(t){0==t?(S.canvas.fillStyle="#000000",S.canvas.fillRect(0,0,S.width,S.height),S.canvas.canvas.width=S.rwidth=S.width=640,S.canvas.canvas.height=S.rheight=S.height=400,QS(S.canvasid).cursor="default"):QS(S.canvasid).cursor=S.showmouse?"default":"none"},S.ProcessBinaryData=function(t){var e;for(null!=S.recordedData&&!0!==S.recordedHolding&&S.recordedData.push(I(2,1,String.fromCharCode.apply(null,new Uint8Array(t)))),null==S.acc?S.acc=new Uint8Array(t):((e=new Uint8Array(S.acc.byteLength+t.byteLength)).set(S.acc,0),e.set(new Uint8Array(t),S.acc.byteLength),S.acc=e);null!=S.acc&&0<S.acc.byteLength;){var a=0,n=new DataView(S.acc.buffer);if(0==S.state&&12<=S.acc.byteLength)a=12,S.state=1,S.parent&&delete S.parent.connectTime,S.send("RFB 003.008\n");else if(1==S.state&&1<=S.acc.byteLength)a=S.acc[0]+1,S.send(String.fromCharCode(1)),S.state=2;else if(2==S.state&&4<=S.acc.byteLength){if(a=4,0!=n.getUint32(0))return S.Stop();S.send(String.fromCharCode(1)),S.state=3,S.parent&&(S.parent.disconnectCode=5e4)}else if(3==S.state&&24<=S.acc.byteLength){S.rotation=0;var r=n.getUint32(20);if(S.acc.byteLength<24+r)return;a=24+r,S.canvas.canvas.width=S.rwidth=S.width=S.ScreenWidth=n.getUint16(0),S.canvas.canvas.height=S.rheight=S.height=S.ScreenHeight=n.getUint16(2),S.DeskRecordServerInit=String.fromCharCode.apply(null,new Uint8Array(S.acc.buffer.slice(0,24+r)));var o="";S.useRLE&&(o+=IntToStr(16)),o+=IntToStr(0),o+=IntToStr(1092),S.send(String.fromCharCode(2,0)+ShortToStr(o.length/4+1)+o+IntToStr(-223)),0==S.graymode?1==S.bpp&&S.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==S.bpp&&(S.bpp=1),0==S.lowcolor?S.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):S.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0))),S.state=4,S.parent&&(S.parent.connectTime=Date.now(),S.parent.disconnectCode=0,S.parent.xxStateChange(3)),S.ox=-1,null!=S.kvmExtChanged&&(0<S.decimationMode&&S.sendKvmExtCmd(2,S.decimationMode),S.sendKvmExtCmd(4,!0===S.useZLib?1:0)),K(),null!=S.onScreenSizeChange&&S.onScreenSizeChange(S,S.ScreenWidth,S.ScreenHeight),S.parent&&(S.parent.disconnectCode=50001,9216e3<S.bpp*S.width*S.height&&(S.parent.disconnectCode=50002))}else if(4==S.state)switch(S.acc[0]){case 0:if(S.acc.byteLength<4)return;S.state=100+n.getUint16(2),a=4,!0===S.recordedHolding&&(delete S.recordedHolding,S.recordedData.push(I(2,1,String.fromCharCode.apply(null,S.acc))));break;case 2:a=1;break;case 3:if(S.acc.byteLength<8)return;var i=n.getUint32(4)+8;if(S.acc.byteLength<i)return;a=function(t,e){if(t.byteLength<8)return 0;var a=e.getUint32(4)+8;if(t.byteLength<a)return 0;{var n;null!=S.onKvmData&&(16<=(n=m(new Uint8Array(t.buffer.slice(8,a)))).length&&"\0KvmDataChannel"==n.substring(0,15)?(0==S.kvmDataSupported&&(S.kvmDataSupported=!0),(-1==S.onKvmDataAck&&16==n.length||0!=n.charCodeAt(15))&&(S.onKvmDataAck=!0),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(n.length-16)+"): "+n.substring(16)),16<=n.length&&S.onKvmData(n.substring(16)),1==S.onKvmDataAck&&0<S.onKvmDataPending.length&&S.sendKvmData(S.onKvmDataPending.shift())):13<=n.length&&"\0KvmExtCmd\0"==n.substring(0,11)?(e=n.charCodeAt(11),t=n.charCodeAt(12),1==e&&(S.kvmExt.decimationMode=t,13<n.length&&(S.kvmExt.decimationState=n.charCodeAt(13)),null!=S.kvmExtChanged&&S.kvmExtChanged(1,S.kvmExt,S.kvmExt)),2==e&&S.sendKvmExtCmd(1),3==e&&(S.kvmExt.compression=t,null!=S.kvmExtChanged&&S.kvmExtChanged(3,S.kvmExt)),4==e&&S.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",n),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+n.length+"): "+rstr2hex(n)+", "+n)))}return a}(S.acc,n)}else if(100<S.state&&12<=S.acc.byteLength){var s=n.getUint16(0),c=n.getUint16(2),h=n.getUint16(4),d=n.getUint16(6),l=h*d,r=n.getUint32(8);if(r<17){if(h<1||64<h||d<1||64<d)return console.log("Invalid tile size ("+h+","+d+"), disconnecting."),S.Stop();if(S.sparew!=h||S.spareh!=d){S.sparew=S.sparew2=h,S.spareh=S.spareh2=d,1!=S.rotation&&3!=S.rotation||(S.sparew2=d,S.spareh2=h);o=S.sparew2+"x"+S.spareh2;if(S.spare=S.sparecache[o],!S.spare){S.sparecache[o]=S.spare=S.canvas.createImageData(S.sparew2,S.spareh2);for(var v=S.sparew2*S.spareh2<<2,u=3;u<v;u+=4)S.spare.data[u]=255}}}if(4294967073==r)S.canvas.canvas.width=S.rwidth=S.width=h,S.canvas.canvas.height=S.rheight=S.height=d,S.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(S.width)+ShortToStr(S.height)),a=12,null!=S.onScreenSizeChange&&S.onScreenSizeChange(S,S.ScreenWidth,S.ScreenHeight),S.parent&&9216e3<S.bpp*S.width*S.height&&(S.parent.disconnectCode=50002);else if(0==r){var g=12,f=12+l*S.bpp;if(S.acc.byteLength<f)return;if(a=f,2==S.bpp)for(u=0;u<l;u++)y(n.getUint16(g,!0),u),g+=2;else for(u=0;u<l;u++)C(S.acc[g++],u);w(S.spare,s,c)}else{if(16!=r)return S.Stop();if(S.acc.byteLength<16)return;f=n.getUint32(12);if(S.acc.byteLength<16+f)return;g=16;5<f&&0==S.acc[g]&&n.getUint16(g+1,!0)==f-5?p(S.acc,g+5,s,c,h,d,l):0<(r=S.inflate.inflate(m(new Uint8Array(S.acc.buffer.slice(g,+(g+f)))))).length?p(function(t){for(var e=new Uint8Array(t.length),a=0,n=t.length;a<n;++a)e[a]=t.charCodeAt(a);return e}(r),0,s,c,h,d,l,r.length):console.log("Invalid deflate data"),a=16+f}100==--S.state&&(S.state=4,0==S.frameRateDelay?K():setTimeout(K,S.frameRateDelay))}if(0==a)return;a!=S.acc.byteLength?S.acc=new Uint8Array(S.acc.buffer.slice(a)):S.acc=null}},S.hold=function(t){S.holding!=t&&(S.holding=t,S.canvas.fillStyle="#000000",S.canvas.fillRect(0,0,S.width,S.height),0==S.holding?(S.canvas.canvas.width==S.width&&S.canvas.canvas.height==S.height||(S.canvas.canvas.width=S.width,S.canvas.canvas.height=S.height,null!=S.onScreenSizeChange&&S.onScreenSizeChange(S,S.ScreenWidth,S.ScreenHeight)),S.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(S.width)+ShortToStr(S.height))):(S.UnGrabMouseInput(),S.UnGrabKeyInput()))},S.tcanvas=null,S.setRotation=function(t){for(;t<0;)t+=4;var e=t%4;if(1!=S.holding){if(e==S.rotation)return!0;var a=S.canvas.canvas.width,n=S.canvas.canvas.height;1!=S.rotation&&3!=S.rotation||(a=S.canvas.canvas.height,n=S.canvas.canvas.width),null==S.tcanvas&&(S.tcanvas=document.createElement("canvas"));var r=S.tcanvas.getContext("2d");return r.setTransform(1,0,0,1,0,0),r.canvas.width=a,r.canvas.height=n,r.rotate(-90*S.rotation*Math.PI/180),0==S.rotation&&r.drawImage(S.canvas.canvas,0,0),1==S.rotation&&r.drawImage(S.canvas.canvas,-S.canvas.canvas.width,0),2==S.rotation&&r.drawImage(S.canvas.canvas,-S.canvas.canvas.width,-S.canvas.canvas.height),3==S.rotation&&r.drawImage(S.canvas.canvas,0,-S.canvas.canvas.height),0!=S.rotation&&2!=S.rotation||(S.canvas.canvas.height=a,S.canvas.canvas.width=n),1!=S.rotation&&3!=S.rotation||(S.canvas.canvas.height=n,S.canvas.canvas.width=a),S.canvas.setTransform(1,0,0,1,0,0),S.canvas.rotate(90*e*Math.PI/180),S.rotation=e,S.canvas.drawImage(S.tcanvas,k(0),x(0,0)),S.width=S.canvas.canvas.width,S.height=S.canvas.canvas.height,null!=S.onScreenResize&&S.onScreenResize(S,S.width,S.height,S.CanvasId),!0}S.rotation=e},S.Start=function(){for(var t in S.state=0,S.acc=null,S.inflate.inflateReset(),S.onKvmDataPending=[],S.onKvmDataAck=-1,S.kvmDataSupported=!1,S.kvmExt={},S.sparecache)delete S.sparecache[t]},S.Stop=function(){S.UnGrabMouseInput(),S.UnGrabKeyInput(),S.parent&&S.parent.Stop()},S.send=function(t){S.parent&&S.parent.send(t)};var r={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};function a(t,e){var a,n;return(e=e||window.event).code&&0==S.localKeyMap?null!=(a=(n=e).code.startsWith("Key")&&4==n.code.length?n.code.charCodeAt(3)+(0==n.shiftKey?32:0):n.code.startsWith("Digit")&&6==n.code.length?n.code.charCodeAt(5):n.code.startsWith("Numpad")&&7==n.code.length?n.code.charCodeAt(6):r[n.code])&&S.sendkey(a,t):(n=a=e.keyCode,0==e.shiftKey&&65<=a&&a<=90&&(n=a+32),112<=a&&a<=124&&(n=a+65358),8==a&&(n=65288),9==a&&(n=65289),13==a&&(n=65293),16==a&&(n=65505),17==a&&(n=65507),18==a&&(n=65513),27==a&&(n=65307),33==a&&(n=65365),34==a&&(n=65366),35==a&&(n=65367),36==a&&(n=65360),37==a&&(n=65361),38==a&&(n=65362),39==a&&(n=65363),40==a&&(n=65364),45==a&&(n=65379),46==a&&(n=65535),96<=a&&a<=105&&(n=a-48),106==a&&(n=42),107==a&&(n=43),109==a&&(n=45),110==a&&(n=46),111==a&&(n=47),186==a&&(n=59),187==a&&(n=61),188==a&&(n=44),189==a&&(n=45),190==a&&(n=46),191==a&&(n=47),192==a&&(n=96),219==a&&(n=91),220==a&&(n=92),221==a&&(n=93),222==a&&(n=39),S.sendkey(n,t)),S.haltEvent(e)}S.sendkey=function(t,e){if("object"==typeof t){var a,n="";for(a in t)n+=String.fromCharCode(4,t[a][1],0,0)+IntToStr(t[a][0]);S.send(n)}else S.send(String.fromCharCode(4,e,0,0)+IntToStr(t))},S.sendKvmExtCmd=function(t,e){e="\0KvmExtCmd\0"+String.fromCharCode(t)+(null!=e?String.fromCharCode(e):"");S.send(String.fromCharCode(6,0,0,0)+IntToStr(e.length)+e)},S.sendKvmData=function(t){!0!==S.onKvmDataAck?S.onKvmDataPending.push(t):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+t.length+"): "+t),t="\0KvmDataChannel\0"+t,S.send(String.fromCharCode(6,0,0,0)+IntToStr(t.length)+t),S.onKvmDataAck=!1)},S.sendKeepAlive=function(){S.lastKeepAlive<Date.now()-5e3&&(S.lastKeepAlive=Date.now(),S.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\0KvmDataChannel\0"))},S.sendClipboardData=function(t){urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Send("+t.length+"): "+rstr2hex(t)+", "+t),S.send(String.fromCharCode(6,0,0,0)+IntToStr(t.length)+t)},S.SendCtrlAltDelMsg=function(){S.sendcad()};var n=!(S.sendcad=function(){S.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])}),o=!1;function I(t,e,a){var n=Date.now();return"number"==typeof a?(S.recordedSize+=a,ShortToStr(t)+ShortToStr(e)+IntToStr(a)+IntToStr(n>>32)+IntToStr(32&n)):(S.recordedSize+=a.length,ShortToStr(t)+ShortToStr(e)+IntToStr(a.length)+IntToStr(n>>32)+IntToStr(32&n)+a)}return S.GrabMouseInput=function(){var t;1!=n&&((t=S.canvas.canvas).onmouseup=S.mouseup,t.onmousedown=S.mousedown,t.onmousemove=S.mousemove,n=!0)},S.UnGrabMouseInput=function(){var t;0!=n&&((t=S.canvas.canvas).onmousemove=null,t.onmouseup=null,t.onmousedown=null,n=!1)},S.GrabKeyInput=function(){1!=o&&(document.onkeyup=S.handleKeyUp,document.onkeydown=S.handleKeyDown,document.onkeypress=S.handleKeys,o=!0)},S.UnGrabKeyInput=function(){0!=o&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,o=!1)},S.handleKeys=function(t){return S.haltEvent(t)},S.handleKeyUp=function(t){return a(0,t)},S.handleKeyDown=function(t){return a(1,t)},S.haltEvent=function(t){return t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),!1},S.mousedblclick=function(t){},S.mousedown=function(t){return S.buttonmask|=1<<t.button,S.mousemove(t,1)},S.mouseup=function(t){return S.buttonmask&=65535-(1<<t.button),S.mousemove(t,1)},S.mousemove=function(t,e){if(S.state<4)return!0;var a,n,r,o,i,s=S.canvas.canvas.height/Q(S.canvasid).offsetHeight,c=S.canvas.canvas.width/Q(S.canvasid).offsetWidth,h=S.getPositionOfControl(Q(S.canvasid));return S.mx=(event.pageX-h[0])*c,S.my=(event.pageY-h[1])*s,event.addx&&(S.mx+=event.addx),event.addy&&(S.my+=event.addy),1!=S.rotation&&3!=S.rotation||(S.mx=S.mx*S.rwidth/S.width,S.my=S.my*S.rheight/S.height),1!=S.noMouseRotate&&(a=S.mx,n=S.my,o=0==S.rotation?a:1==S.rotation?n:2==S.rotation?S.canvas.canvas.width-a:3==S.rotation?S.canvas.canvas.height-n:0,S.my=(r=S.mx,i=S.my,0==S.rotation?i:1==S.rotation?S.canvas.canvas.width-r:2==S.rotation?S.canvas.canvas.height-i:3==S.rotation?r:0),S.mx=o),1==e?(S.send(String.fromCharCode(5,S.buttonmask)+ShortToStr(S.mx)+ShortToStr(S.my)),null!=S.mNagleTimer&&(clearTimeout(S.mNagleTimer),S.mNagleTimer=null)):null==S.mNagleTimer&&(S.mNagleTimer=setTimeout(function(){S.send(String.fromCharCode(5,S.buttonmask)+ShortToStr(S.mx)+ShortToStr(S.my)),S.mNagleTimer=null},50)),QV("DeskFocus",S.focusmode),0!=S.focusmode&&(s=Math.min(S.mx,S.canvas.canvas.width-S.focusmode),a=Math.min(S.my,S.canvas.canvas.height-S.focusmode),n=2*S.focusmode,r=(i=Q(S.canvasid)).offsetHeight/S.canvas.canvas.height,o=i.offsetWidth/S.canvas.canvas.width,e=QS("DeskFocus"),i=S.getPositionOfControl(Q(S.canvasid).parentElement),e.left=Math.max((s-S.focusmode)*r,0)+(pos[0]-i[0])+"px",e.top=Math.max((a-S.focusmode)*o,0)+(pos[1]-i[1])+"px",e.width=n*r-6+"px",e.height=n*r-6+"px"),S.haltEvent(t)},S.getPositionOfControl=function(t){var e=Array(2);for(e[0]=e[1]=0;t;)e[0]+=t.offsetLeft,e[1]+=t.offsetTop,t=t.offsetParent;return e},S.StartRecording=function(){return(null==S.recordedData||null==S.DeskRecordServerInit)&&(S.recordedHolding=!0,S.recordedData=[],S.recordedStart=Date.now(),S.recordedSize=0,S.recordedData.push(I(1,0,JSON.stringify({magic:"MeshCentralRelaySession",ver:1,time:(new Date).toLocaleString(),protocol:200,bpp:S.bpp,graymode:S.graymode,lowcolor:S.lowcolor,screenSize:[S.width,S.height]}))),S.DeskRecordServerInit=String.fromCharCode(S.width>>8,255&S.width,S.height>>8,255&S.height)+S.DeskRecordServerInit.substring(4),S.recordedData.push(I(2,1,S.DeskRecordServerInit)),S.recordedData.push(I(3,0,atob(S.CanvasId.toDataURL("image/png").split(",")[1]))),!0)},S.StopRecording=function(){if(null!=S.recordedData){var t=S.recordedData;return t.push(I(3,0,"MeshCentralMCREC")),delete S.recordedData,delete S.recordedStart,delete S.recordedSize,t}},S}
\ No newline at end of file
translate/translate.json
+57 -34
@@ -954,6 +954,18 @@
954 "tr": ", 1 bağlantı.",
955 "zh-chs": ", 1 个连接。"
956 },
957 + {
958 + "en": ", 16 grays",
959 + "xloc": [
960 + "player.handlebars->3->35"
961 + ]
962 + },
963 + {
964 + "en": ", 256 grays",
965 + "xloc": [
966 + "player.handlebars->3->36"
967 + ]
968 + },
969 {
970 "cs": ", Pouze Intel&reg; AMT",
971 "da": ", Kun Intel&reg; AMT",
@@ -1757,6 +1769,12 @@
1769 "sharing.handlebars->11->96"
1770 ]
1771 },
1772 + {
1773 + "en": "1 byte-per-pixel",
1774 + "xloc": [
1775 + "player.handlebars->3->34"
1776 + ]
1777 + },
1778 {
1779 "cs": "1 připojení",
1780 "da": "1 forbindelse",
@@ -2321,7 +2339,7 @@
2339 "tr": "10 kare/sn",
2340 "zh-chs": "10 帧/秒",
2341 "xloc": [
2324 - "player.handlebars->3->46"
2342 + "player.handlebars->3->47"
2343 ]
2344 },
2345 {
@@ -2397,7 +2415,7 @@
2415 "zh-chs": "10%",
2416 "zh-cht": "10%",
2417 "xloc": [
2400 - "player.handlebars->3->54"
2418 + "player.handlebars->3->55"
2419 ]
2420 },
2421 {
@@ -2604,6 +2622,12 @@
2622 "default.handlebars->39->1708"
2623 ]
2624 },
2625 + {
2626 + "en": "2 byte-per-pixel",
2627 + "xloc": [
2628 + "player.handlebars->3->33"
2629 + ]
2630 + },
2631 {
2632 "cs": "2 dny",
2633 "da": "2 dage",
@@ -2781,7 +2805,7 @@
2805 "tr": "20 kare/sn",
2806 "zh-chs": "20 帧/秒",
2807 "xloc": [
2784 - "player.handlebars->3->47"
2808 + "player.handlebars->3->48"
2809 ]
2810 },
2811 {
@@ -2806,7 +2830,7 @@
2830 "zh-chs": "20%",
2831 "zh-cht": "20%",
2832 "xloc": [
2809 - "player.handlebars->3->53"
2833 + "player.handlebars->3->54"
2834 ]
2835 },
2836 {
@@ -2882,10 +2906,7 @@
2906 "sv": "256 färger",
2907 "tr": "256 renk",
2908 "zh-chs": "256色",
2885 - "zh-cht": "256色",
2886 - "xloc": [
2887 - "player.handlebars->3->34"
2888 - ]
2909 + "zh-cht": "256色"
2910 },
2911 {
2912 "cs": "Záložní kódy 2FA byly vymazány",
@@ -3292,7 +3313,7 @@
3313 "zh-chs": "40%",
3314 "zh-cht": "40%",
3315 "xloc": [
3295 - "player.handlebars->3->52"
3316 + "player.handlebars->3->53"
3317 ]
3318 },
3319 {
@@ -3602,7 +3623,7 @@
3623 "zh-chs": "60%",
3624 "zh-cht": "60%",
3625 "xloc": [
3605 - "player.handlebars->3->51"
3626 + "player.handlebars->3->52"
3627 ]
3628 },
3629 {
@@ -3728,10 +3749,7 @@
3749 "sv": "65536 färger",
3750 "tr": "65536 renk",
3751 "zh-chs": "65536色",
3731 - "zh-cht": "65536色",
3732 - "xloc": [
3733 - "player.handlebars->3->36"
3734 - ]
3752 + "zh-cht": "65536色"
3753 },
3754 {
3755 "cs": "Stav přihlášení za 7 dnů",
@@ -3883,7 +3901,7 @@
3901 "zh-chs": "80%",
3902 "zh-cht": "80%",
3903 "xloc": [
3886 - "player.handlebars->3->50"
3904 + "player.handlebars->3->51"
3905 ]
3906 },
3907 {
@@ -3961,7 +3979,7 @@
3979 "zh-chs": "90%",
3980 "zh-cht": "90%",
3981 "xloc": [
3964 - "player.handlebars->3->49"
3982 + "player.handlebars->3->50"
3983 ]
3984 },
3985 {
@@ -13762,11 +13780,7 @@
13780 "sv": "Färgkvalitet",
13781 "tr": "Renk kalitesi",
13782 "zh-chs": "色彩品质",
13765 - "zh-cht": "色彩品質",
13766 - "xloc": [
13767 - "player.handlebars->3->33",
13768 - "player.handlebars->3->35"
13769 - ]
13783 + "zh-cht": "色彩品質"
13784 },
13785 {
13786 "cs": "Sloupce",
@@ -15618,7 +15632,7 @@
15632 "tr": "WebM'ye Dönüştür",
15633 "zh-chs": "转换为 WebM",
15634 "xloc": [
15621 - "player.handlebars->3->55",
15635 + "player.handlebars->3->56",
15636 "player.handlebars->p11->deskarea0->deskarea1->1"
15637 ]
15638 },
@@ -21819,7 +21833,7 @@
21833 "zh-chs": "拖放.mcrec档案或单击 “打开档案...”",
21834 "zh-cht": "拖放.mcrec檔案或單擊 “打開檔案...”",
21835 "xloc": [
21822 - "player.handlebars->3->44"
21836 + "player.handlebars->3->45"
21837 ]
21838 },
21839 {
@@ -23711,6 +23725,12 @@
23725 "default-mobile.handlebars->dialog->3->dialog7->d7amtkvm->3->1->0->1"
23726 ]
23727 },
23728 + {
23729 + "en": "Encoding Quality",
23730 + "xloc": [
23731 + "player.handlebars->3->37"
23732 + ]
23733 + },
23734 {
23735 "cs": "Kódování: RAW",
23736 "da": "Kodning: RAW",
@@ -26685,7 +26705,7 @@
26705 "zh-cht": "框速率",
26706 "xloc": [
26707 "default.handlebars->container->dialog->dialogBody->dialog7->d7meshkvm->7->1",
26688 - "player.handlebars->3->45",
26708 + "player.handlebars->3->46",
26709 "sharing.handlebars->dialog->dialogBody->dialog7->d7meshkvm->7->1"
26710 ]
26711 },
@@ -30182,7 +30202,7 @@
30202 "zh-chs": "每{0}秒索引一次",
30203 "zh-cht": "每{0}秒索引一次",
30204 "xloc": [
30185 - "player.handlebars->3->38"
30205 + "player.handlebars->3->39"
30206 ]
30207 },
30208 {
@@ -43952,7 +43972,7 @@
43972 "zh-chs": "打开档案...",
43973 "zh-cht": "打開檔案...",
43974 "xloc": [
43955 - "player.handlebars->3->56",
43975 + "player.handlebars->3->57",
43976 "player.handlebars->p11->deskarea0->deskarea1->3"
43977 ]
43978 },
@@ -47055,10 +47075,10 @@
47075 "zh-chs": "按[空格]播放/暂停。",
47076 "zh-cht": "按[空格]播放/暫停。",
47077 "xloc": [
47058 - "player.handlebars->3->39",
47078 "player.handlebars->3->40",
47079 "player.handlebars->3->41",
47061 - "player.handlebars->3->42"
47080 + "player.handlebars->3->42",
47081 + "player.handlebars->3->43"
47082 ]
47083 },
47084 {
@@ -47816,7 +47836,7 @@
47836 "xloc": [
47837 "default-mobile.handlebars->dialog->3->dialog7->d7meshkvm->3->1->0->1",
47838 "default.handlebars->container->dialog->dialogBody->dialog7->d7meshkvm->3->1",
47819 - "player.handlebars->3->48",
47839 + "player.handlebars->3->49",
47840 "sharing.handlebars->dialog->dialogBody->dialog7->d7meshkvm->3->1"
47841 ]
47842 },
@@ -53654,7 +53674,7 @@
53674 "zh-chs": "寻求",
53675 "zh-cht": "尋求",
53676 "xloc": [
53657 - "player.handlebars->3->37"
53677 + "player.handlebars->3->38"
53678 ]
53679 },
53680 {
@@ -67606,7 +67626,8 @@
67626 "zh-cht": "網絡RDP",
67627 "xloc": [
67628 "default.handlebars->39->2729",
67609 - "default.handlebars->39->904"
67629 + "default.handlebars->39->904",
67630 + "default.handlebars->contextMenu->cxwebrdp"
67631 ]
67632 },
67633 {
@@ -67649,7 +67670,8 @@
67670 "zh-chs": "网络SSH",
67671 "xloc": [
67672 "default.handlebars->39->2730",
67652 - "default.handlebars->39->906"
67673 + "default.handlebars->39->906",
67674 + "default.handlebars->contextMenu->cxwebssh"
67675 ]
67676 },
67677 {
@@ -67674,7 +67696,8 @@
67696 "zh-chs": "网络VNC",
67697 "xloc": [
67698 "default.handlebars->39->2732",
67677 - "default.handlebars->39->902"
67699 + "default.handlebars->39->902",
67700 + "default.handlebars->contextMenu->cxwebvnc"
67701 ]
67702 },
67703 {
@@ -70277,7 +70300,7 @@
70300 "zh-chs": "data:image / png; base64,",
70301 "zh-cht": "data:image / png; base64,",
70302 "xloc": [
70280 - "player.handlebars->3->43"
70303 + "player.handlebars->3->44"
70304 ]
70305 },
70306 {