UNPKG

angular-no-vnc

Version:
2 lines 96.6 kB
angular.module("noVNC.util",[]).factory("Base64",[function(){"use strict";return{toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(e){var t="",n=this.toBase64Table,r=e.length,o=r%3,i=0,s=0;for(i=0;r-2>i;i+=3)t+=n[e[i]>>2],t+=n[((3&e[i])<<4)+(e[i+1]>>4)],t+=n[((15&e[i+1])<<2)+(e[i+2]>>6)],t+=n[63&e[i+2]];return 2===o?(s=r-o,t+=n[e[s]>>2],t+=n[((3&e[s])<<4)+(e[s+1]>>4)],t+=n[(15&e[s+1])<<2],t+=n[64]):1===o&&(s=r-o,t+=n[e[s]>>2],t+=n[(3&e[s])<<4],t+=n[64],t+=n[64]),t},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(e,t){t="undefined"!=typeof t?t:0;var n,r,o,i,s,a,c=this.toBinaryTable,u=this.base64Pad,l=0,d=0,f=e.indexOf("=")-t;for(0>f&&(f=e.length-t),r=3*(f>>2)+Math.floor(f%4/1.5),n=new Array(r),o=0,i=t;i<e.length;i++)s=c[127&e.charCodeAt(i)],a=e.charAt(i)===u,-1!==s?(d=d<<6|s,l+=6,l>=8&&(l-=8,a||(n[o++]=d>>l&255),d&=(1<<l)-1)):console.error("Illegal character code "+e.charCodeAt(i)+" at position "+i);if(l)throw{name:"Base64-Error",message:"Corrupted base64 string"};return n}}}]),angular.module("noVNC.util").factory("DES",function(){"use strict";return function(e){function t(e){var t,n,r,o,i,s,a,c,u,l,d=[],f=[],h=[];for(n=0,r=56;56>n;++n,r-=8)r+=-5>r?65:-3>r?31:-1>r?63:27===r?35:0,o=7&r,d[n]=0!==(e[r>>>3]&1<<o)?1:0;for(t=0;16>t;++t){for(o=t<<1,i=o+1,h[o]=h[i]=0,s=28;59>s;s+=28)for(n=s-28;s>n;++n)r=n+w[t],f[n]=s>r?d[r]:d[r-28];for(n=0;24>n;++n)0!==f[b[n]]&&(h[o]|=1<<23-n),0!==f[b[n+24]]&&(h[i]|=1<<23-n)}for(t=0,u=0,l=0;16>t;++t)a=h[u++],c=h[u++],v[l]=(16515072&a)<<6,v[l]|=(4032&a)<<10,v[l]|=(16515072&c)>>>10,v[l]|=(4032&c)>>>6,++l,v[l]=(258048&a)<<12,v[l]|=(63&a)<<16,v[l]|=(258048&c)>>>4,v[l]|=63&c,++l}function n(e){var t,n,r,o,i=0,s=e.slice(),a=0;for(n=s[i++]<<24|s[i++]<<16|s[i++]<<8|s[i++],r=s[i++]<<24|s[i++]<<16|s[i++]<<8|s[i++],o=252645135&(n>>>4^r),r^=o,n^=o<<4,o=65535&(n>>>16^r),r^=o,n^=o<<16,o=858993459&(r>>>2^n),n^=o,r^=o<<2,o=16711935&(r>>>8^n),n^=o,r^=o<<8,r=r<<1|r>>>31&1,o=2863311530&(n^r),n^=o,r^=o,n=n<<1|n>>>31&1,i=0;8>i;++i)o=r<<28|r>>>4,o^=v[a++],t=y[63&o],t|=g[o>>>8&63],t|=f[o>>>16&63],t|=l[o>>>24&63],o=r^v[a++],t|=_[63&o],t|=p[o>>>8&63],t|=h[o>>>16&63],t|=d[o>>>24&63],n^=t,o=n<<28|n>>>4,o^=v[a++],t=y[63&o],t|=g[o>>>8&63],t|=f[o>>>16&63],t|=l[o>>>24&63],o=n^v[a++],t|=_[63&o],t|=p[o>>>8&63],t|=h[o>>>16&63],t|=d[o>>>24&63],r^=t;for(r=r<<31|r>>>1,o=2863311530&(n^r),n^=o,r^=o,n=n<<31|n>>>1,o=16711935&(n>>>8^r),r^=o,n^=o<<8,o=858993459&(n>>>2^r),r^=o,n^=o<<2,o=65535&(r>>>16^n),n^=o,r^=o<<16,o=252645135&(r>>>4^n),n^=o,r^=o<<4,o=[r,n],i=0;8>i;i++)s[i]=(o[i>>>2]>>>8*(3-i%4))%256,s[i]<0&&(s[i]+=256);return s}function r(e){return n(e.slice(0,8)).concat(n(e.slice(8,16)))}var o,i,s,a,c,u,l,d,f,h,g,p,y,_,b=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],w=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],m=0,v=[];return o=65536,i=1<<24,s=o|i,a=4,c=1024,u=a|c,l=[s|c,m|m,o|m,s|u,s|a,o|u,m|a,o|m,m|c,s|c,s|u,m|c,i|u,s|a,i|m,m|a,m|u,i|c,i|c,o|c,o|c,s|m,s|m,i|u,o|a,i|a,i|a,o|a,m|m,m|u,o|u,i|m,o|m,s|u,m|a,s|m,s|c,i|m,i|m,m|c,s|a,o|m,o|c,i|a,m|c,m|a,i|u,o|u,s|u,o|a,s|m,i|u,i|a,m|u,o|u,s|c,m|u,i|c,i|c,m|m,o|a,o|c,m|m,s|a],o=1<<20,i=1<<31,s=o|i,a=32,c=32768,u=a|c,d=[s|u,i|c,m|c,o|u,o|m,m|a,s|a,i|u,i|a,s|u,s|c,i|m,i|c,o|m,m|a,s|a,o|c,o|a,i|u,m|m,i|m,m|c,o|u,s|m,o|a,i|a,m|m,o|c,m|u,s|c,s|m,m|u,m|m,o|u,s|a,o|m,i|u,s|m,s|c,m|c,s|m,i|c,m|a,s|u,o|u,m|a,m|c,i|m,m|u,s|c,o|m,i|a,o|a,i|u,i|a,o|a,o|c,m|m,i|c,m|u,i|m,s|a,s|u,o|c],o=1<<17,i=1<<27,s=o|i,a=8,c=512,u=a|c,f=[m|u,s|c,m|m,s|a,i|c,m|m,o|u,i|c,o|a,i|a,i|a,o|m,s|u,o|a,s|m,m|u,i|m,m|a,s|c,m|c,o|c,s|m,s|a,o|u,i|u,o|c,o|m,i|u,m|a,s|u,m|c,i|m,s|c,i|m,o|a,m|u,o|m,s|c,i|c,m|m,m|c,o|a,s|u,i|c,i|a,m|c,m|m,s|a,i|u,o|m,i|m,s|u,m|a,o|u,o|c,i|a,s|m,i|u,m|u,s|m,o|u,m|a,s|a,o|c],o=8192,i=1<<23,s=o|i,a=1,c=128,u=a|c,h=[s|a,o|u,o|u,m|c,s|c,i|u,i|a,o|a,m|m,s|m,s|m,s|u,m|u,m|m,i|c,i|a,m|a,o|m,i|m,s|a,m|c,i|m,o|a,o|c,i|u,m|a,o|c,i|c,o|m,s|c,s|u,m|u,i|c,i|a,s|m,s|u,m|u,m|m,m|m,s|m,o|c,i|c,i|u,m|a,s|a,o|u,o|u,m|c,s|u,m|u,m|a,o|m,i|a,o|a,s|c,i|u,o|a,o|c,i|m,s|a,m|c,i|m,o|m,s|c],o=1<<25,i=1<<30,s=o|i,a=256,c=1<<19,u=a|c,g=[m|a,o|u,o|c,s|a,m|c,m|a,i|m,o|c,i|u,m|c,o|a,i|u,s|a,s|c,m|u,i|m,o|m,i|c,i|c,m|m,i|a,s|u,s|u,o|a,s|c,i|a,m|m,s|m,o|u,o|m,s|m,m|u,m|c,s|a,m|a,o|m,i|m,o|c,s|a,i|u,o|a,i|m,s|c,o|u,i|u,m|a,o|m,s|c,s|u,m|u,s|m,s|u,o|c,m|m,i|c,s|m,m|u,o|a,i|a,m|c,m|m,i|c,o|u,i|a],o=1<<22,i=1<<29,s=o|i,a=16,c=16384,u=a|c,p=[i|a,s|m,m|c,s|u,s|m,m|a,s|u,o|m,i|c,o|u,o|m,i|a,o|a,i|c,i|m,m|u,m|m,o|a,i|u,m|c,o|c,i|u,m|a,s|a,s|a,m|m,o|u,s|c,m|u,o|c,s|c,i|m,i|c,m|a,s|a,o|c,s|u,o|m,m|u,i|a,o|m,i|c,i|m,m|u,i|a,s|u,o|c,s|m,o|u,s|c,m|m,s|a,m|a,m|c,s|m,o|u,m|c,o|a,i|u,m|m,s|c,i|m,o|a,i|u],o=1<<21,i=1<<26,s=o|i,a=2,c=2048,u=a|c,y=[o|m,s|a,i|u,m|m,m|c,i|u,o|u,s|c,s|u,o|m,m|m,i|a,m|a,i|m,s|a,m|u,i|c,o|u,o|a,i|c,i|a,s|m,s|c,o|a,s|m,m|c,m|u,s|u,o|c,m|a,i|m,o|c,i|m,o|c,o|m,i|u,i|u,s|a,s|a,m|a,o|a,i|m,i|c,o|m,s|c,m|u,o|u,s|c,m|u,i|a,s|u,s|m,o|c,m|m,m|a,s|u,m|m,o|u,s|m,m|c,i|a,i|c,m|c,o|a],o=1<<18,i=1<<28,s=o|i,a=64,c=4096,u=a|c,_=[i|u,m|c,o|m,s|u,i|m,i|u,m|a,i|m,o|a,s|m,s|u,o|c,s|c,o|u,m|c,m|a,s|m,i|a,i|c,m|u,o|c,o|a,s|a,s|c,m|u,m|m,m|m,s|a,i|a,i|c,o|u,o|m,o|u,o|m,s|c,m|c,m|a,s|a,m|c,o|u,i|c,m|a,i|a,s|m,s|a,i|m,o|m,i|u,m|m,s|u,o|a,i|a,s|m,i|c,i|u,m|m,s|u,o|c,o|c,m|u,m|u,o|a,i|m,s|c],t(e),{encrypt:r}}});var display=angular.module("noVNC.display",["noVNC.util"]);display.factory("changeCursor",["Base64",function(e){"use strict";return function(t,n,r,o,i,s,a,c){var u,l,d,f,h,g,p,y,_,b,w=[],m=s,v=a;for(m>v?v=m:m=v,w.push16le=function(e){this.push(255&e,e>>8&255)},w.push32le=function(e){this.push(255&e,e>>8&255,e>>16&255,e>>24&255)},l=40,d=m*v*4,h=Math.ceil(m*v/8),f=Math.ceil(m*v/8),w.push16le(0),w.push16le(2),w.push16le(1),w.push(m),w.push(v),w.push(0),w.push(0),w.push16le(o),w.push16le(i),w.push32le(l+d+h+f),w.push32le(22),w.push32le(l),w.push32le(m),w.push32le(2*v),w.push16le(1),w.push16le(32),w.push32le(0),w.push32le(h+f),w.push32le(0),w.push32le(0),w.push32le(0),w.push32le(0),b=v-1;b>=0;b-=1)for(_=0;m>_;_+=1)_>=s||b>=a?(w.push(0),w.push(0),w.push(0),w.push(0)):(p=b*Math.ceil(s/8)+Math.floor(_/8),y=r[p]<<_%8&128?255:0,c?(p=s*b+_,u=c[n[p]],w.push(u[2]),w.push(u[1]),w.push(u[0]),w.push(y)):(p=4*(s*b+_),w.push(n[p+2]),w.push(n[p+1]),w.push(n[p]),w.push(y)));for(b=0;v>b;b+=1)for(_=0;_<Math.ceil(m/8);_+=1)w.push(0);for(b=0;v>b;b+=1)for(_=0;_<Math.ceil(m/8);_+=1)w.push(0);g="data:image/x-icon;base64,"+e.encode(w),t.style.cursor="url("+g+") "+o+" "+i+", default"}}]),display.factory("Display",["Util","changeCursor","Base64","requestAnimFrame",function(e,t,n,r){"use strict";return function(n){function o(){e.Debug(">> Display.constructor");var n,r,o,i,s=e.Engine;if(!f.target)throw"target must be set";if("string"==typeof f.target)throw"target must be a DOM element";if(n=f.target,!n.getContext)throw"no getContext method";if(h||(h=n.getContext("2d")),e.Debug("User Agent: "+navigator.userAgent),s.gecko&&e.Debug("Browser: gecko "+s.gecko),s.webkit&&e.Debug("Browser: webkit "+s.webkit),s.trident&&e.Debug("Browser: trident "+s.trident),s.presto&&e.Debug("Browser: presto "+s.presto),d.clear(),!("createImageData"in h))throw"Canvas does not support createImageData";for(f.render_mode="canvas rendering",null===f.prefer_js&&(e.Info("Prefering javascript operations"),f.prefer_js=!0),v=h.createImageData(16,16),o=[],r=0;256>r;r+=1)o.push(255);try{i=n.style.cursor,t(f.target,o,o,2,2,8,8),n.style.cursor?(null===f.cursor_uri&&(f.cursor_uri=!0),e.Info("Data URI scheme cursor supported")):(null===f.cursor_uri&&(f.cursor_uri=!1),e.Warn("Data URI scheme cursor not supported")),n.style.cursor=i}catch(a){e.Error("Data URI scheme cursor test exception: "+a),f.cursor_uri=!1}return e.Debug("<< Display.constructor"),d}var i,s,a,c,u,l,d={},f={},h=null,g=[],p=0,y=0,_={x:0,y:0,w:0,h:0},b={x1:0,y1:0,x2:-1,y2:-1},w="",m=null,v=null,K=0,X=0;return e.conf_defaults(f,d,n,[["target","wo","dom",null,"Canvas element for rendering"],["context","ro","raw",null,"Canvas 2D context for rendering (read-only)"],["logo","rw","raw",null,'Logo to display when cleared: {"width": width, "height": height, "data": data}'],["true_color","rw","bool",!0,"Use true-color pixel data"],["colourMap","rw","arr",[],"Colour map array (when not true-color)"],["scale","rw","float",1,"Display area scale factor 0.0 - 1.0"],["viewport","rw","bool",!1,"Use a viewport set with viewportChange()"],["width","rw","int",null,"Display area width"],["height","rw","int",null,"Display area height"],["render_mode","ro","str","","Canvas rendering mode (read-only)"],["prefer_js","rw","str",null,"Prefer Javascript over canvas methods"],["cursor_uri","rw","raw",null,"Can we render cursor using data URI"]]),d.get_context=function(){return h},d.set_scale=function(e){u(e)},d.set_width=function(e){d.resize(e,y)},d.get_width=function(){return p},d.set_height=function(e){d.resize(p,e)},d.get_height=function(){return y},u=function(e){"undefined"==typeof e?e=f.scale:e>1?e=1:.1>e&&(e=.1),f.scale=e},c=function(e){var t,n;t=f.true_color?e:f.colourMap[e[0]],n="rgb("+t[2]+","+t[1]+","+t[0]+")",n!==w&&(h.fillStyle=n,w=n)},d.viewportChange=function(t,n,r,o){var i,s,a,c,u,l,d,g=f.target,w=_,m=b,v=null;f.viewport||(e.Debug("Setting viewport to full display region"),t=-w.w,n=-w.h,r=p,o=y),"undefined"==typeof t&&(t=0),"undefined"==typeof n&&(n=0),"undefined"==typeof r&&(r=w.w),"undefined"==typeof o&&(o=w.h),r>p&&(r=p),o>y&&(o=y),(w.w!==r||w.h!==o)&&(r<w.w&&m.x2>w.x+r-1&&(m.x2=w.x+r-1),w.w=r,o<w.h&&m.y2>w.y+o-1&&(m.y2=w.y+o-1),w.h=o,w.w>0&&w.h>0&&g.width>0&&g.height>0&&(v=h.getImageData(0,0,g.width<w.w?g.width:w.w,g.height<w.h?g.height:w.h)),g.width=w.w,g.height=w.h,v&&h.putImageData(v,0,0)),c=w.x+w.w-1,u=w.y+w.h-1,0>t&&w.x+t<0&&(t=-w.x),c+t>=p&&(t-=c+t-p+1),w.y+n<0&&(n=-w.y),u+n>=y&&(n-=u+n-y+1),(0!==t||0!==n)&&(e.Debug("viewportChange deltaX: "+t+", deltaY: "+n),w.x+=t,c+=t,w.y+=n,u+=n,w.x>m.x1&&(m.x1=w.x),c<m.x2&&(m.x2=c),w.y>m.y1&&(m.y1=w.y),u<m.y2&&(m.y2=u),0>t?(s=0,l=-t):(s=w.w-t,l=t),0>n?(a=0,d=-n):(a=w.h-n,d=n),i=h.fillStyle,h.fillStyle="rgb(255,255,255)",0!==t&&(h.drawImage(g,0,0,w.w,w.h,-t,0,w.w,w.h),h.fillRect(s,0,l,w.h)),0!==n&&(h.drawImage(g,0,0,w.w,w.h,0,-n,w.w,w.h),h.fillRect(0,a,w.w,d)),h.fillStyle=i)},d.getCleanDirtyReset=function(){var e,t=_,n=b,r=[],o=t.x+t.w-1,i=t.y+t.h-1;return e={x:n.x1,y:n.y1,w:n.x2-n.x1+1,h:n.y2-n.y1+1},n.x1>=n.x2||n.y1>=n.y2?r.push({x:t.x,y:t.y,w:t.w,h:t.h}):(t.x<n.x1&&r.push({x:t.x,y:t.y,w:n.x1-t.x+1,h:t.h}),o>n.x2&&r.push({x:n.x2+1,y:t.y,w:o-n.x2,h:t.h}),t.y<n.y1&&r.push({x:n.x1,y:t.y,w:n.x2-n.x1+1,h:n.y1-t.y}),i>n.y2&&r.push({x:n.x1,y:n.y2+1,w:n.x2-n.x1+1,h:i-n.y2})),b={x1:t.x,y1:t.y,x2:t.x+t.w-1,y2:t.y+t.h-1},{cleanBox:e,dirtyBoxes:r}},d.absX=function(e){return e+_.x},d.absY=function(e){return e+_.y},d.resize=function(e,t){w="",p=e,y=t,u(f.scale),d.viewportChange()},d.resizeAndScale=function(e,t,n){w="",u(n),f.target.style.width=e*f.scale+"px",f.target.style.height=t*f.scale+"px",d.viewportChange()},d.clear=function(){f.logo?(d.resize(f.logo.width,f.logo.height),d.blitStringImage(f.logo.data,0,0)):(d.resize(0,0),h.clearRect(0,0,_.w,_.h)),g=[]},d.fillRect=function(e,t,n,r,o){c(o),h.fillRect(e-_.x,t-_.y,n,r)},d.copyImage=function(e,t,n,r,o,i){var s=e-_.x,a=t-_.y,c=n-_.x,u=r-_.y;h.drawImage(f.target,s,a,o,i,c,u,o,i)},d.startTile=function(e,t,n,r,o){var i,s,a,c,u,l;if(K=e,X=t,m=16===n&&16===r?v:h.createImageData(n,r),i=m.data,f.prefer_js)for(s=f.true_color?o:f.colourMap[o[0]],a=s[2],c=s[1],u=s[0],l=0;n*r*4>l;l+=4)i[l]=a,i[l+1]=c,i[l+2]=u,i[l+3]=255;else d.fillRect(e,t,n,r,o)},d.subTile=function(e,t,n,r,o){var i,s,a,c,u,l,h,g,p,y,_;if(f.prefer_js)for(i=m.data,h=m.width,a=f.true_color?o:f.colourMap[o[0]],c=a[2],u=a[1],l=a[0],y=e+n,_=t+r,g=t;_>g;g+=1)for(p=e;y>p;p+=1)s=4*(p+g*h),i[s]=c,i[s+1]=u,i[s+2]=l,i[s+3]=255;else d.fillRect(K+e,X+t,n,r,o)},d.finishTile=function(){f.prefer_js&&h.putImageData(m,K-_.x,X-_.y)},i=function(e,t,n,r,o,i,s,a){var c,u,l,d;for(c=h.createImageData(o,i),d=c.data,u=0,l=a;o*i*4>u;u+=4,l+=3)d[u]=s[l],d[u+1]=s[l+1],d[u+2]=s[l+2],d[u+3]=255;h.putImageData(c,e-n,t-r)},s=function(e,t,n,r,o,i,s,a){var c,u,l,d;for(c=h.createImageData(o,i),d=c.data,u=0,l=a;o*i*4>u;u+=4,l+=4)d[u]=s[l+2],d[u+1]=s[l+1],d[u+2]=s[l],d[u+3]=255;h.putImageData(c,e-n,t-r)},a=function(e,t,n,r,o,i,s,a){var c,u,l,d,g,p;for(c=h.createImageData(o,i),d=c.data,p=f.colourMap,u=0,l=a;o*i*4>u;u+=4,l+=1)g=p[s[l]],d[u]=g[2],d[u+1]=g[1],d[u+2]=g[0],d[u+3]=255;h.putImageData(c,e-n,t-r)},d.blitImage=function(e,t,n,r,o,i){f.true_color?s(e,t,_.x,_.y,n,r,o,i):a(e,t,_.x,_.y,n,r,o,i)},d.blitRgbImage=function(e,t,n,r,o,s){f.true_color?i(e,t,_.x,_.y,n,r,o,s):a(e,t,_.x,_.y,n,r,o,s)},d.blitStringImage=function(e,t,n){var r=new Image;r.onload=function(){h.drawImage(r,t-_.x,n-_.y)},r.src=e},d.drawImage=function(e,t,n){h.drawImage(e,t-_.x,n-_.y)},d.renderQ_push=function(e){g.push(e),1===g.length&&l()},l=function(){for(var e,t=!0;t&&g.length>0;){switch(e=g[0],e.type){case"copy":d.copyImage(e.old_x,e.old_y,e.x,e.y,e.width,e.height);break;case"fill":d.fillRect(e.x,e.y,e.width,e.height,e.color);break;case"blit":d.blitImage(e.x,e.y,e.width,e.height,e.data,0);break;case"blitRgb":d.blitRgbImage(e.x,e.y,e.width,e.height,e.data,0);break;case"img":e.img.complete?d.drawImage(e.img,e.x,e.y):t=!1}t&&(e=g.shift())}g.length>0&&r(l)},d.changeCursor=function(n,r,o,i,s,a){return f.cursor_uri===!1?void e.Warn("changeCursor called but no cursor data URI support"):void(f.true_color?t(f.target,n,r,o,i,s,a):t(f.target,n,r,o,i,s,a,f.colourMap))},d.defaultCursor=function(){f.target.style.cursor="default"},o()}}]);var input=angular.module("noVNC.input",["noVNC.keyboard","noVNC.util"]);input.factory("Keyboard",["Util","KeyEventDecoder","kbdUtil","VerifyCharModifier","TrackKeyState","EscapeModifiers",function(e,t,n,r,o,i){"use strict";return function(s){function a(t){h.onKeyPress&&(e.Debug("onKeyPress "+("keydown"===t.type?"down":"up")+", keysym: "+t.keysym.keysym+"("+t.keysym.keyname+")"),h.onKeyPress(t.keysym.keysym,"keydown"===t.type))}function c(t){return h.focused&&g.keydown(t)?(e.stopEvent(t),!1):!0}function u(t){return h.focused&&g.keypress(t)?(e.stopEvent(t),!1):!0}function l(t){return h.focused&&g.keyup(t)?(e.stopEvent(t),!1):!0}function d(){e.Debug(">> Keyboard.allKeysUp"),g.releaseAll(),e.Debug("<< Keyboard.allKeysUp")}var f={},h={};e.conf_defaults(h,f,s,[["target","wo","dom",document,"DOM element that captures keyboard input"],["focused","rw","bool",!1,"Capture and send key events"],["onKeyPress","rw","func",null,"Handler for key press/release"]]);var g=t(n.ModifierSync(),r(o(i(a))));return f.grab=function(){var t=h.target;e.addEvent(t,"keydown",c),e.addEvent(t,"keyup",l),e.addEvent(t,"keypress",u),e.addEvent(window,"blur",d)},f.ungrab=function(){var t=h.target;e.removeEvent(t,"keydown",c),e.removeEvent(t,"keyup",l),e.removeEvent(t,"keypress",u),e.removeEvent(window,"blur",d),d()},f.sync=function(e){g.syncModifiers(e)},f}}]),input.factory("Mouse",["Util",function(e){"use strict";return function(t){function n(){g.target.setCapture&&g.target.setCapture(),p=!0}function r(){g.target.releaseCapture&&g.target.releaseCapture(),p=!1}function o(){y=null}function i(t,n){var r,i,s;if(!g.focused)return!0;if(g.notify&&g.notify(t),r=t?t:window.event,i=e.getEventPosition(t,g.target,g.scale),t.touches||t.changedTouches){if(1===n){if(null==y)_=i;else{clearTimeout(y);var a=_.x-i.x,c=_.y-i.y,u=Math.sqrt(a*a+c*c);u<20*window.devicePixelRatio&&(i=_)}y=setTimeout(o,500)}s=g.touchButton}else s=r.which?1<<r.button:(1&r.button)+2*(2&r.button)+(4&r.button)/2;return g.onMouseButton&&(e.Debug("onMouseButton "+(n?"down":"up")+", x: "+i.x+", y: "+i.y+", bmask: "+s),g.onMouseButton(i.x,i.y,n,s)),e.stopEvent(t),!1}function s(e){n(),i(e,1)}function a(e){p&&(i(e,0),r())}function c(t){var n,r,o,i;return g.focused?(g.notify&&g.notify(t),n=t?t:window.event,r=e.getEventPosition(t,g.target,g.scale),i=n.detail?-1*n.detail:n.wheelDelta/40,o=i>0?8:16,g.onMouseButton&&(g.onMouseButton(r.x,r.y,1,o),g.onMouseButton(r.x,r.y,0,o)),e.stopEvent(t),!1):!0}function u(t){var n,r;return g.focused?(g.notify&&g.notify(t),n=t?t:window.event,r=e.getEventPosition(t,g.target,g.scale),g.onMouseMove&&g.onMouseMove(r.x,r.y),e.stopEvent(t),!1):!0}function l(t){var n,r;return g.focused?(n=t?t:window.event,r=e.getEventPosition(t,g.target,g.scale),r.realx>=0&&r.realy>=0&&r.realx<g.target.offsetWidth&&r.realy<g.target.offsetHeight?(e.stopEvent(t),!1):!0):!0}function d(){g.keyboard.set_focused(!0)}function f(){g.keyboard.set_focused(!1)}var h={},g={},p=!1,y=null,_=null;return e.conf_defaults(g,h,t,[["target","ro","dom",document,"DOM element that captures mouse input"],["keyboard","ro","dom",null,"keyboard object"],["notify","ro","func",null,"Function to call to notify whenever a mouse event is received"],["focused","rw","bool",!0,"Capture and send mouse clicks/movement"],["scale","rw","float",1,"Viewport scale factor 0.0 - 1.0"],["onMouseButton","rw","func",null,"Handler for mouse button click/release"],["onMouseMove","rw","func",null,"Handler for mouse movement"],["touchButton","rw","int",1,"Button mask (1, 2, 4) for touch devices (0 means ignore clicks)"]]),h.grab=function(){var t=g.target;"ontouchstart"in document.documentElement?(e.addEvent(t,"touchstart",s),e.addEvent(window,"touchend",a),e.addEvent(t,"touchend",a),e.addEvent(t,"touchmove",u)):(e.addEvent(t,"mousedown",s),e.addEvent(window,"mouseup",a),e.addEvent(t,"mouseup",a),e.addEvent(t,"mousemove",u),e.addEvent(t,"mouseenter",d),e.addEvent(t,"mouseleave",f),e.addEvent(t,e.Engine.gecko?"DOMMouseScroll":"mousewheel",c)),e.addEvent(document,"click",l),e.addEvent(document.body,"contextmenu",l)},h.ungrab=function(){var t=g.target;"ontouchstart"in document.documentElement?(e.removeEvent(t,"touchstart",s),e.removeEvent(window,"touchend",a),e.removeEvent(t,"touchend",a),e.removeEvent(t,"touchmove",u)):(e.removeEvent(t,"mousedown",s),e.removeEvent(window,"mouseup",a),e.removeEvent(t,"mouseup",a),e.removeEvent(t,"mousemove",u),e.removeEvent(t,"mouseenter",d),e.removeEvent(t,"mouseleave",f),e.removeEvent(t,e.Engine.gecko?"DOMMouseScroll":"mousewheel",c)),e.removeEvent(document,"click",l),e.removeEvent(document.body,"contextmenu",l)},h}}]);var unzip=angular.module("noVNC.jsunzip",[]);unzip.factory("JSUnzip",["TINF",function(e){"use strict";return function(){this.getInt=function(e,t){switch(t){case 4:return(255&this.data.charCodeAt(e+3))<<24|(255&this.data.charCodeAt(e+2))<<16|(255&this.data.charCodeAt(e+1))<<8|255&this.data.charCodeAt(e+0);case 2:return(255&this.data.charCodeAt(e+1))<<8|255&this.data.charCodeAt(e+0);default:return 255&this.data.charCodeAt(e)}},this.getDOSDate=function(e,t){var n=31&e,r=(e>>5&15)-1,o=1980+(e>>9&127),i=2*(31&t),s=t>>5&63,a=t>>11&31;return new Date(o,r,n,a,s,i)},this.open=function(e){if(this.data=e,this.files=[],this.data.length<22)return{status:!1,error:"Invalid data"};for(var t=this.data.length-22;t>=0&&101010256!==this.getInt(t,4);)--t;if(0>t)return{status:!1,error:"Invalid data"};if(0!==this.getInt(t+4,2)||0!==this.getInt(t+6,2))return{status:!1,error:"No multidisk support"};var n=this.getInt(t+8,2),r=this.getInt(t+16,4),o=this.getInt(t+20,2);this.comment=this.data.slice(t+22,t+22+o);for(var i=r,s=0;n>s;++s){if(33639248!==this.getInt(i+0,4))return{status:!1,error:"Invalid data"};if(this.getInt(i+6,2)>20)return{status:!1,error:"Unsupported version"};if(1&this.getInt(i+8,2))return{status:!1,error:"Encryption not implemented"};var a=this.getInt(i+10,2);if(0!==a&&8!==a)return{status:!1,error:"Unsupported compression method"};var c=this.getInt(i+12,2),u=this.getInt(i+14,2),l=this.getDOSDate(u,c),d=this.getInt(i+20,4),f=this.getInt(i+24,4),h=this.getInt(i+28,2),g=this.getInt(i+30,2),p=this.getInt(i+32,2),y=this.getInt(i+42,4),_=this.data.slice(i+46,i+46+h),b=this.data.slice(i+46+h+g,i+46+h+g+p);if(67324752!==this.getInt(y+0,4))return{status:!1,error:"Invalid data"};var w=this.getInt(y+26,2),m=this.getInt(y+28,2),v=y+30+w+m;this.files[_]={fileComment:b,compressionMethod:a,compressedSize:d,uncompressedSize:f,localFileContent:v,lastModifiedDate:l},i+=46+h+g+p}return{status:!0}};var t=null;this.read=function(n){var r=this.files[n];if(r){if(8===r.compressionMethod){t||(t=new e,t.init());var o=t.uncompress(this.data,r.localFileContent);return o.status===t.OK?{status:!0,data:o.data}:{status:!1,error:o.error}}return{status:!0,data:this.data.slice(r.localFileContent,r.localFileContent+r.uncompressedSize)}}return{status:!1,error:'File "'+n+"\" doesn't exist in zip"}}}}]),unzip.factory("TINF",[function(){"use strict";return function(){function e(e,t,n,r,o){for(var i=0;24>t;)n|=(255&e[r++])<<t,t+=8;return i=n&65535>>16-o,n>>=o,t-=o,[t,n,r,i]}this.OK=0,this.DATA_ERROR=-3,this.WINDOW_SIZE=32768,this.TREE=function(){this.table=new Array(16),this.trans=new Array(288)},this.DATA=function(e){this.source="",this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=[],this.history=[],this.ltree=new e.TREE,this.dtree=new e.TREE},this.sltree=new this.TREE,this.sdtree=new this.TREE,this.length_bits=new Array(30),this.length_base=new Array(30),this.dist_bits=new Array(30),this.dist_base=new Array(30),this.clcidx=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],this.build_bits_base=function(e,t,n,r){var o,i;for(o=0;n>o;++o)e[o]=0;for(o=0;30-n>o;++o)e[o+n]=Math.floor(o/n);for(i=r,o=0;30>o;++o)t[o]=i,i+=1<<e[o]},this.build_fixed_trees=function(e,t){var n;for(n=0;7>n;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;24>n;++n)e.trans[n]=256+n;for(n=0;144>n;++n)e.trans[24+n]=n;for(n=0;8>n;++n)e.trans[168+n]=280+n;for(n=0;112>n;++n)e.trans[176+n]=144+n;for(n=0;5>n;++n)t.table[n]=0;for(t.table[5]=32,n=0;32>n;++n)t.trans[n]=n},this.build_tree=function(e,t,n,r){var o,i,s=new Array(16);for(o=0;16>o;++o)e.table[o]=0;for(o=0;r>o;++o)e.table[t[n+o]]++;for(e.table[0]=0,i=0,o=0;16>o;++o)s[o]=i,i+=e.table[o];for(o=0;r>o;++o)t[n+o]&&(e.trans[s[t[n+o]]++]=o)},this.getbit=function(e){var t;return e.bitcount--||(e.tag=255&e.source[e.sourceIndex++],e.bitcount=7),t=1&e.tag,e.tag>>=1,t},this.read_bits=function(t,n,r){if(!n)return r;var o=e(t.source,t.bitcount,t.tag,t.sourceIndex,n);return t.bitcount=o[0],t.tag=o[1],t.sourceIndex=o[2],o[3]+r},this.decode_symbol=function(e,t){for(;e.bitcount<16;)e.tag=e.tag|(255&e.source[e.sourceIndex++])<<e.bitcount,e.bitcount+=8;var n=0,r=0,o=0;do r=2*r+((e.tag&1<<o)>>o),++o,n+=t.table[o],r-=t.table[o];while(r>=0);return e.tag>>=o,e.bitcount-=o,t.trans[n+r]},this.decode_trees=function(e,t,n){var r,o,i,s,a,c,u=new this.TREE,l=new Array(320);for(r=this.read_bits(e,5,257),o=this.read_bits(e,5,1),i=this.read_bits(e,4,4),s=0;19>s;++s)l[s]=0;for(s=0;i>s;++s){var d=this.read_bits(e,3,0);l[this.clcidx[s]]=d}for(this.build_tree(u,l,0,19),a=0;r+o>a;){var f=this.decode_symbol(e,u);switch(f){case 16:var h=l[a-1];for(c=this.read_bits(e,2,3);c;--c)l[a++]=h;break;case 17:for(c=this.read_bits(e,3,3);c;--c)l[a++]=0;break;case 18:for(c=this.read_bits(e,7,11);c;--c)l[a++]=0;break;default:l[a++]=f}}this.build_tree(t,l,0,r),this.build_tree(n,l,r,o)},this.inflate_block_data=function(e,t,n){for(var r=e.dest,o=r.length;;){var i=this.decode_symbol(e,t);if(256===i)return this.OK;if(256>i)r[o++]=i,e.history.push(i);else{var s,a,c,u;if(i-=257,s=this.read_bits(e,this.length_bits[i],this.length_base[i]),a=this.decode_symbol(e,n),c=e.history.length-this.read_bits(e,this.dist_bits[a],this.dist_base[a]),0>c)throw"Invalid zlib offset "+c;for(u=c;c+s>u;++u)r[o++]=e.history[u],e.history.push(e.history[u])}}},this.inflate_uncompressed_block=function(e){var t,n,r;if(e.bitcount>7){var o=Math.floor(e.bitcount/8);e.sourceIndex-=o,e.bitcount=0,e.tag=0}if(t=e.source[e.sourceIndex+1],t=256*t+e.source[e.sourceIndex],n=e.source[e.sourceIndex+3],n=256*n+e.source[e.sourceIndex+2],t!==(65535&~n))return this.DATA_ERROR;for(e.sourceIndex+=4,r=t;r;--r)e.history.push(e.source[e.sourceIndex]),e.dest[e.dest.length]=e.source[e.sourceIndex++];return e.bitcount=0,this.OK},this.inflate_fixed_block=function(e){return this.inflate_block_data(e,this.sltree,this.sdtree)},this.inflate_dynamic_block=function(e){return this.decode_trees(e,e.ltree,e.dtree),this.inflate_block_data(e,e.ltree,e.dtree)},this.init=function(){this.build_fixed_trees(this.sltree,this.sdtree),this.build_bits_base(this.length_bits,this.length_base,4,3),this.build_bits_base(this.dist_bits,this.dist_base,2,1),this.length_bits[28]=0,this.length_base[28]=258,this.reset()},this.reset=function(){this.d=new this.DATA(this),delete this.header},this.uncompress=function(e,t){var n,r=this.d;r.source=e,r.sourceIndex=t,r.bitcount=0,r.dest=[],"undefined"==typeof this.header&&(this.header=this.read_bits(r,16,0));var o=0;do{var i,s;switch(n=this.getbit(r),i=this.read_bits(r,2,0)){case 0:s=this.inflate_uncompressed_block(r);break;case 1:s=this.inflate_fixed_block(r);break;case 2:s=this.inflate_dynamic_block(r);break;default:return{status:this.DATA_ERROR}}if(s!==this.OK)return{status:this.DATA_ERROR};o++}while(!n&&r.sourceIndex<r.source.length);return r.history=r.history.slice(-this.WINDOW_SIZE),{status:this.OK,data:r.dest}}}}]);var keyboard=angular.module("noVNC.keyboard",[]);keyboard.factory("kbdUtil",["keysyms",function(e){"use strict";function t(e){var t={536:350,537:351,538:354,539:355},n=t[e];return n?n:e}function n(){return navigator&&!!/mac/i.exec(navigator.platform)}function r(){return navigator&&!!/win/i.exec(navigator.platform)}function o(){return navigator&&!!/linux/i.exec(navigator.platform)}function i(e,t){var n={};for(var r in t)65505!==parseInt(r)&&(n[r]=t[r]);var o=0;for(var i in t)n[i]&&++o;return s(e,n)?o>e.length:o>0}function s(e,t){if(0===e.length)return!1;for(var n=0;n<e.length;++n)if(!t[e[n]])return!1;return!0}function a(t){function a(t,n){function r(t){return{keysym:e.lookup(t),type:p[t]?"keydown":"keyup"}}var o=[];return void 0!==t.ctrlKey&&t.ctrlKey!==p[l]&&n!==l&&(p[l]=t.ctrlKey,o.push(r(l))),void 0!==t.altKey&&t.altKey!==p[d]&&n!==d&&(p[d]=t.altKey,o.push(r(d))),void 0!==t.altGraphKey&&t.altGraphKey!==p[f]&&n!==f&&(p[f]=t.altGraphKey,o.push(r(f))),void 0!==t.shiftKey&&t.shiftKey!==p[h]&&n!==h&&(p[h]=t.shiftKey,o.push(r(h))),void 0!==t.metaKey&&t.metaKey!==p[g]&&n!==g&&(p[g]=t.metaKey,o.push(r(g))),o}function c(e,t){var n=u(e),r=n?n.keysym:null;return null!==r&&void 0!==p[r]&&(p[r]=t),a(e,r)}var l=65507,d=65513,f=65027,h=65505,g=65511;t||(t=n()?[d]:r()?[d,l]:o()?[f]:[]);var p={};return p[l]=!1,p[d]=!1,p[f]=!1,p[h]=!1,p[g]=!1,{keydown:function(e){return c(e,!0)},keyup:function(e){return c(e,!1)},syncAny:function(e){return a(e)},hasShortcutModifier:function(){return i(t,p)},activeCharModifier:function(){return s(t,p)?t:null}}}function c(e){return"keyCode"in e&&"key"in e?e.key+":"+e.keyCode:"keyCode"in e?e.keyCode:e.key}function u(n){var r;if(n.char&&1===n.char.length?r=n.char.charCodeAt():n.charCode?r=n.charCode:n.keyCode&&"keypress"===n.type&&(r=n.keyCode),r){var o=e.fromUnicode(t(r));if(o)return o}return n.keyCode?e.lookup(l(n.keyCode,n.shiftKey)):n.which?e.lookup(l(n.which,n.shiftKey)):null}function l(e,t){if("number"!=typeof e)return null;if(e>=48&&57>=e)return e;if(e>=65&&90>=e)return t?e:e+32;if(e>=96&&105>=e)return 65456+(e-96);switch(e){case 32:return 32;case 106:return 65450;case 107:return 65451;case 108:return 65452;case 109:return 65453;case 110:return 65454;case 111:return 65455;case 187:return 43;case 188:return 44;case 189:return 45;case 190:return 46}return d({keyCode:e})}function d(e){if(!e.keyCode)return null;var t=e.keyCode;if(t>=112&&135>=t)return 65470+t-112;switch(t){case 8:return 65288;case 13:return 65293;case 9:return 65289;case 27:return 65307;case 46:return 65535;case 36:return 65360;case 35:return 65367;case 33:return 65365;case 34:return 65366;case 45:return 65379;case 37:return 65361;case 38:return 65362;case 39:return 65363;case 40:return 65364;case 16:return 65505;case 17:return 65507;case 18:return 65513;case 224:return 65031;case 225:return 65027;case 91:return 65516;case 92:return 65517;case 93:return 65383;default:return null}}return{hasShortcutModifier:i,hasCharModifier:s,ModifierSync:a,getKey:c,getKeysym:u,keysymFromKeyCode:l,nonCharacterKey:d,substituteCodepoint:t}}]),keyboard.factory("KeyEventDecoder",["kbdUtil",function(e){"use strict";return function(t,n){function r(e){for(var t=0;t<e.length;++t)n(e[t])}function o(r,o){var i={type:o},s=e.getKey(r);s&&(i.keyId=s);var a=e.getKeysym(r),c=t.hasShortcutModifier()||!!t.activeCharModifier();a&&("keydown"!==o||e.nonCharacterKey(r)||c)&&(i.keysym=a);var u=16===r.keyCode||"Shift"===r.key,l=!u&&("keydown"!==o||t.hasShortcutModifier()||!!e.nonCharacterKey(r)),d="keydown"===o&&t.activeCharModifier()&&!e.nonCharacterKey(r),f=t.activeCharModifier();if(f&&a){for(var h=!1,g=0;g<f.length;++g)f[g]===a.keysym&&(h=!0);"keypress"!==o||h||(i.escape=t.activeCharModifier())}return d&&n({type:"stall"}),n(i),l}return{keydown:function(e){return r(t.keydown(e)),o(e,"keydown")},keypress:function(e){return o(e,"keypress")},keyup:function(e){return r(t.keyup(e)),o(e,"keyup")},syncModifiers:function(e){r(t.syncAny(e))},releaseAll:function(){n({type:"releaseall"})}}}}]),keyboard.factory("VerifyCharModifier",function(){"use strict";return function(e){function t(){if(!r)for(;0!==n.length;){var t=n[0];switch(n=n.splice(1),t.type){case"stall":return void o();case"keydown":0!==n.length&&"keypress"===n[0].type&&(!n[0].escape||t.keysym&&t.keysym.keysym===n[0].keysym.keysym||(t.escape=n[0].escape),t.keysym=n[0].keysym,n=n.splice(1))}"stall"!==t.type&&e(t)}}var n=[],r=null,o=function(){r=setTimeout(function(){clearTimeout(r),r=null,t()},5)};return function(e){n.push(e),t()}}}),keyboard.factory("TrackKeyState",function(){"use strict";return function(e){var t=[];return function(n){var r=0!==t.length?t[t.length-1]:null,o=function(){function e(){}return function(t){return e.prototype=t,new e}};switch(n.type){case"keydown":r&&n.keyId&&r.keyId===n.keyId||(r={keyId:n.keyId,keysyms:{}},t.push(r)),n.keysym&&(r.keysyms[n.keysym.keysym]=n.keysym,r.ignoreKeyPress=!0,e(n));break;case"keypress":r||(r={keyId:n.keyId,keysyms:{}},t.push(r)),n.keysym||console.log("keypress with no keysym:",n),n.keysym&&!r.ignoreKeyPress&&(r.keysyms[n.keysym.keysym]=n.keysym,n.type="keydown",e(n));break;case"keyup":if(0===t.length)return;for(var i=null,s=0;s!==t.length;++s)if(t[s].keyId===n.keyId){i=s;break}null===i&&(i=t.length-1);var a=t.splice(i,1)[0];for(var c in a.keysyms){var u=o(),l=u(n);l.keysym=a.keysyms[c],e(l)}break;case"releaseall":for(var d=0;d<t.length;++d)for(var f in t[d].keysyms){var h=t[d].keysyms[f];e({keyId:0,keysym:h,type:"keyup"})}t=[]}}}}),keyboard.factory("EscapeModifiers",function(){"use strict";return function(e){return function(t){if("keydown"!==t.type||void 0===t.escape)return void e(t);for(var n=0;n<t.escape.length;++n)e({type:"keyup",keyId:0,keysym:keysyms.lookup(t.escape[n])});e(t);for(var r=0;r<t.escape.length;++r)e({type:"keydown",keyId:0,keysym:keysyms.lookup(t.escape[r])})}}}),angular.module("noVNC.keyboard").constant("keysym",{XK_VoidSymbol:16777215,XK_BackSpace:65288,XK_Tab:65289,XK_Linefeed:65290,XK_Clear:65291,XK_Return:65293,XK_Pause:65299,XK_Scroll_Lock:65300,XK_Sys_Req:65301,XK_Escape:65307,XK_Delete:65535,XK_Home:65360,XK_Left:65361,XK_Up:65362,XK_Right:65363,XK_Down:65364,XK_Prior:65365,XK_Page_Up:65365,XK_Next:65366,XK_Page_Down:65366,XK_End:65367,XK_Begin:65368,XK_Select:65376,XK_Print:65377,XK_Execute:65378,XK_Insert:65379,XK_Undo:65381,XK_Redo:65382,XK_Menu:65383,XK_Find:65384,XK_Cancel:65385,XK_Help:65386,XK_Break:65387,XK_Mode_switch:65406,XK_script_switch:65406,XK_Num_Lock:65407,XK_KP_Space:65408,XK_KP_Tab:65417,XK_KP_Enter:65421,XK_KP_F1:65425,XK_KP_F2:65426,XK_KP_F3:65427,XK_KP_F4:65428,XK_KP_Home:65429,XK_KP_Left:65430,XK_KP_Up:65431,XK_KP_Right:65432,XK_KP_Down:65433,XK_KP_Prior:65434,XK_KP_Page_Up:65434,XK_KP_Next:65435,XK_KP_Page_Down:65435,XK_KP_End:65436,XK_KP_Begin:65437,XK_KP_Insert:65438,XK_KP_Delete:65439,XK_KP_Equal:65469,XK_KP_Multiply:65450,XK_KP_Add:65451,XK_KP_Separator:65452,XK_KP_Subtract:65453,XK_KP_Decimal:65454,XK_KP_Divide:65455,XK_KP_0:65456,XK_KP_1:65457,XK_KP_2:65458,XK_KP_3:65459,XK_KP_4:65460,XK_KP_5:65461,XK_KP_6:65462,XK_KP_7:65463,XK_KP_8:65464,XK_KP_9:65465,XK_F1:65470,XK_F2:65471,XK_F3:65472,XK_F4:65473,XK_F5:65474,XK_F6:65475,XK_F7:65476,XK_F8:65477,XK_F9:65478,XK_F10:65479,XK_F11:65480,XK_L1:65480,XK_F12:65481,XK_L2:65481,XK_F13:65482,XK_L3:65482,XK_F14:65483,XK_L4:65483,XK_F15:65484,XK_L5:65484,XK_F16:65485,XK_L6:65485,XK_F17:65486,XK_L7:65486,XK_F18:65487,XK_L8:65487,XK_F19:65488,XK_L9:65488,XK_F20:65489,XK_L10:65489,XK_F21:65490,XK_R1:65490,XK_F22:65491,XK_R2:65491,XK_F23:65492,XK_R3:65492,XK_F24:65493,XK_R4:65493,XK_F25:65494,XK_R5:65494,XK_F26:65495,XK_R6:65495,XK_F27:65496,XK_R7:65496,XK_F28:65497,XK_R8:65497,XK_F29:65498,XK_R9:65498,XK_F30:65499,XK_R10:65499,XK_F31:65500,XK_R11:65500,XK_F32:65501,XK_R12:65501,XK_F33:65502,XK_R13:65502,XK_F34:65503,XK_R14:65503,XK_F35:65504,XK_R15:65504,XK_Shift_L:65505,XK_Shift_R:65506,XK_Control_L:65507,XK_Control_R:65508,XK_Caps_Lock:65509,XK_Shift_Lock:65510,XK_Meta_L:65511,XK_Meta_R:65512,XK_Alt_L:65513,XK_Alt_R:65514,XK_Super_L:65515,XK_Super_R:65516,XK_Hyper_L:65517,XK_Hyper_R:65518,XK_space:32,XK_exclam:33,XK_quotedbl:34,XK_numbersign:35,XK_dollar:36,XK_percent:37,XK_ampersand:38,XK_apostrophe:39,XK_quoteright:39,XK_parenleft:40,XK_parenright:41,XK_asterisk:42,XK_plus:43,XK_comma:44,XK_minus:45,XK_period:46,XK_slash:47,XK_0:48,XK_1:49,XK_2:50,XK_3:51,XK_4:52,XK_5:53,XK_6:54,XK_7:55,XK_8:56,XK_9:57,XK_colon:58,XK_semicolon:59,XK_less:60,XK_equal:61,XK_greater:62,XK_question:63,XK_at:64,XK_A:65,XK_B:66,XK_C:67,XK_D:68,XK_E:69,XK_F:70,XK_G:71,XK_H:72,XK_I:73,XK_J:74,XK_K:75,XK_L:76,XK_M:77,XK_N:78,XK_O:79,XK_P:80,XK_Q:81,XK_R:82,XK_S:83,XK_T:84,XK_U:85,XK_V:86,XK_W:87,XK_X:88,XK_Y:89,XK_Z:90,XK_bracketleft:91,XK_backslash:92,XK_bracketright:93,XK_asciicircum:94,XK_underscore:95,XK_grave:96,XK_quoteleft:96,XK_a:97,XK_b:98,XK_c:99,XK_d:100,XK_e:101,XK_f:102,XK_g:103,XK_h:104,XK_i:105,XK_j:106,XK_k:107,XK_l:108,XK_m:109,XK_n:110,XK_o:111,XK_p:112,XK_q:113,XK_r:114,XK_s:115,XK_t:116,XK_u:117,XK_v:118,XK_w:119,XK_x:120,XK_y:121,XK_z:122,XK_braceleft:123,XK_bar:124,XK_braceright:125,XK_asciitilde:126,XK_nobreakspace:160,XK_exclamdown:161,XK_cent:162,XK_sterling:163,XK_currency:164,XK_yen:165,XK_brokenbar:166,XK_section:167,XK_diaeresis:168,XK_copyright:169,XK_ordfeminine:170,XK_guillemotleft:171,XK_notsign:172,XK_hyphen:173,XK_registered:174,XK_macron:175,XK_degree:176,XK_plusminus:177,XK_twosuperior:178,XK_threesuperior:179,XK_acute:180,XK_mu:181,XK_paragraph:182,XK_periodcentered:183,XK_cedilla:184,XK_onesuperior:185,XK_masculine:186,XK_guillemotright:187,XK_onequarter:188,XK_onehalf:189,XK_threequarters:190,XK_questiondown:191,XK_Agrave:192,XK_Aacute:193,XK_Acircumflex:194,XK_Atilde:195,XK_Adiaeresis:196,XK_Aring:197,XK_AE:198,XK_Ccedilla:199,XK_Egrave:200,XK_Eacute:201,XK_Ecircumflex:202,XK_Ediaeresis:203,XK_Igrave:204,XK_Iacute:205,XK_Icircumflex:206,XK_Idiaeresis:207,XK_ETH:208,XK_Eth:208,XK_Ntilde:209,XK_Ograve:210,XK_Oacute:211,XK_Ocircumflex:212,XK_Otilde:213,XK_Odiaeresis:214,XK_multiply:215,XK_Oslash:216,XK_Ooblique:216,XK_Ugrave:217,XK_Uacute:218,XK_Ucircumflex:219,XK_Udiaeresis:220,XK_Yacute:221,XK_THORN:222,XK_Thorn:222,XK_ssharp:223,XK_agrave:224,XK_aacute:225,XK_acircumflex:226,XK_atilde:227,XK_adiaeresis:228,XK_aring:229,XK_ae:230,XK_ccedilla:231,XK_egrave:232,XK_eacute:233,XK_ecircumflex:234,XK_ediaeresis:235,XK_igrave:236,XK_iacute:237,XK_icircumflex:238,XK_idiaeresis:239,XK_eth:240,XK_ntilde:241,XK_ograve:242,XK_oacute:243,XK_ocircumflex:244,XK_otilde:245,XK_odiaeresis:246,XK_division:247,XK_oslash:248,XK_ooblique:248,XK_ugrave:249,XK_uacute:250,XK_ucircumflex:251,XK_udiaeresis:252,XK_yacute:253,XK_thorn:254,XK_ydiaeresis:255}),angular.module("noVNC.keyboard").factory("keysyms",function(){"use strict"; function e(e){return e?{keysym:e,keyname:t?t[e]:e}:void 0}var t=null,n={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:92,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:126,160:160,161:161,162:162,163:163,164:164,165:165,166:166,167:167,168:168,169:169,170:170,171:171,172:172,173:173,174:174,175:175,176:176,177:177,178:178,179:179,180:180,181:181,182:182,183:183,184:184,185:185,186:186,187:187,188:188,189:189,190:190,191:191,192:192,193:193,194:194,195:195,196:196,197:197,198:198,199:199,200:200,201:201,202:202,203:203,204:204,205:205,206:206,207:207,208:208,209:209,210:210,211:211,212:212,213:213,214:214,215:215,216:216,217:217,218:218,219:219,220:220,221:221,222:222,223:223,224:224,225:225,226:226,227:227,228:228,229:229,230:230,231:231,232:232,233:233,234:234,235:235,236:236,237:237,238:238,239:239,240:240,241:241,242:242,243:243,244:244,245:245,246:246,247:247,248:248,249:249,250:250,251:251,252:252,253:253,254:254,255:255,256:960,257:992,258:451,259:483,260:417,261:433,262:454,263:486,264:710,265:742,266:709,267:741,268:456,269:488,270:463,271:495,272:464,273:496,274:938,275:954,278:972,279:1004,280:458,281:490,282:460,283:492,284:728,285:760,286:683,287:699,288:725,289:757,290:939,291:955,292:678,293:694,294:673,295:689,296:933,297:949,298:975,299:1007,300:16777516,301:16777517,302:967,303:999,304:681,305:697,308:684,309:700,310:979,311:1011,312:930,313:453,314:485,315:934,316:950,317:421,318:437,321:419,322:435,323:465,324:497,325:977,326:1009,327:466,328:498,330:957,331:959,332:978,333:1010,336:469,337:501,338:5052,339:5053,340:448,341:480,342:931,343:947,344:472,345:504,346:422,347:438,348:734,349:766,350:426,351:442,352:425,353:441,354:478,355:510,356:427,357:443,358:940,359:956,360:989,361:1021,362:990,363:1022,364:733,365:765,366:473,367:505,368:475,369:507,370:985,371:1017,372:16777588,373:16777589,374:16777590,375:16777591,376:5054,377:428,378:444,379:431,380:447,381:430,382:446,399:16777615,402:2294,415:16777631,416:16777632,417:16777633,431:16777647,432:16777648,437:16777653,438:16777654,439:16777655,466:16777681,486:16777702,487:16777703,601:16777817,629:16777845,658:16777874,711:439,728:418,729:511,731:434,733:445,901:1966,902:1953,904:1954,905:1955,906:1956,908:1959,910:1960,911:1963,912:1974,913:1985,914:1986,915:1987,916:1988,917:1989,918:1990,919:1991,920:1992,921:1993,922:1994,923:1995,924:1996,925:1997,926:1998,927:1999,928:2e3,929:2001,931:2002,932:2004,933:2005,934:2006,935:2007,936:2008,937:2009,938:1957,939:1961,940:1969,941:1970,942:1971,943:1972,944:1978,945:2017,946:2018,947:2019,948:2020,949:2021,950:2022,951:2023,952:2024,953:2025,954:2026,955:2027,956:2028,957:2029,958:2030,959:2031,960:2032,961:2033,962:2035,963:2034,964:2036,965:2037,966:2038,967:2039,968:2040,969:2041,970:1973,971:1977,972:1975,973:1976,974:1979,1025:1715,1026:1713,1027:1714,1028:1716,1029:1717,1030:1718,1031:1719,1032:1720,1033:1721,1034:1722,1035:1723,1036:1724,1038:1726,1039:1727,1040:1761,1041:1762,1042:1783,1043:1767,1044:1764,1045:1765,1046:1782,1047:1786,1048:1769,1049:1770,1050:1771,1051:1772,1052:1773,1053:1774,1054:1775,1055:1776,1056:1778,1057:1779,1058:1780,1059:1781,1060:1766,1061:1768,1062:1763,1063:1790,1064:1787,1065:1789,1066:1791,1067:1785,1068:1784,1069:1788,1070:1760,1071:1777,1072:1729,1073:1730,1074:1751,1075:1735,1076:1732,1077:1733,1078:1750,1079:1754,1080:1737,1081:1738,1082:1739,1083:1740,1084:1741,1085:1742,1086:1743,1087:1744,1088:1746,1089:1747,1090:1748,1091:1749,1092:1734,1093:1736,1094:1731,1095:1758,1096:1755,1097:1757,1098:1759,1099:1753,1100:1752,1101:1756,1102:1728,1103:1745,1105:1699,1106:1697,1107:1698,1108:1700,1109:1701,1110:1702,1111:1703,1112:1704,1113:1705,1114:1706,1115:1707,1116:1708,1118:1710,1119:1711,1168:1725,1169:1709,1170:16778386,1171:16778387,1174:16778390,1175:16778391,1178:16778394,1179:16778395,1180:16778396,1181:16778397,1186:16778402,1187:16778403,1198:16778414,1199:16778415,1200:16778416,1201:16778417,1202:16778418,1203:16778419,1206:16778422,1207:16778423,1208:16778424,1209:16778425,1210:16778426,1211:16778427,1240:16778456,1241:16778457,1250:16778466,1251:16778467,1256:16778472,1257:16778473,1262:16778478,1263:16778479,1329:16778545,1330:16778546,1331:16778547,1332:16778548,1333:16778549,1334:16778550,1335:16778551,1336:16778552,1337:16778553,1338:16778554,1339:16778555,1340:16778556,1341:16778557,1342:16778558,1343:16778559,1344:16778560,1345:16778561,1346:16778562,1347:16778563,1348:16778564,1349:16778565,1350:16778566,1351:16778567,1352:16778568,1353:16778569,1354:16778570,1355:16778571,1356:16778572,1357:16778573,1358:16778574,1359:16778575,1360:16778576,1361:16778577,1362:16778578,1363:16778579,1364:16778580,1365:16778581,1366:16778582,1370:16778586,1371:16778587,1372:16778588,1373:16778589,1374:16778590,1377:16778593,1378:16778594,1379:16778595,1380:16778596,1381:16778597,1382:16778598,1383:16778599,1384:16778600,1385:16778601,1386:16778602,1387:16778603,1388:16778604,1389:16778605,1390:16778606,1391:16778607,1392:16778608,1393:16778609,1394:16778610,1395:16778611,1396:16778612,1397:16778613,1398:16778614,1399:16778615,1400:16778616,1401:16778617,1402:16778618,1403:16778619,1404:16778620,1405:16778621,1406:16778622,1407:16778623,1408:16778624,1409:16778625,1410:16778626,1411:16778627,1412:16778628,1413:16778629,1414:16778630,1415:16778631,1417:16778633,1418:16778634,1488:3296,1489:3297,1490:3298,1491:3299,1492:3300,1493:3301,1494:3302,1495:3303,1496:3304,1497:3305,1498:3306,1499:3307,1500:3308,1501:3309,1502:3310,1503:3311,1504:3312,1505:3313,1506:3314,1507:3315,1508:3316,1509:3317,1510:3318,1511:3319,1512:3320,1513:3321,1514:3322,1548:1452,1563:1467,1567:1471,1569:1473,1570:1474,1571:1475,1572:1476,1573:1477,1574:1478,1575:1479,1576:1480,1577:1481,1578:1482,1579:1483,1580:1484,1581:1485,1582:1486,1583:1487,1584:1488,1585:1489,1586:1490,1587:1491,1588:1492,1589:1493,1590:1494,1591:1495,1592:1496,1593:1497,1594:1498,1600:1504,1601:1505,1602:1506,1603:1507,1604:1508,1605:1509,1606:1510,1607:1511,1608:1512,1609:1513,1610:1514,1611:1515,1612:1516,1613:1517,1614:1518,1615:1519,1616:1520,1617:1521,1618:1522,1619:16778835,1620:16778836,1621:16778837,1632:16778848,1633:16778849,1634:16778850,1635:16778851,1636:16778852,1637:16778853,1638:16778854,1639:16778855,1640:16778856,1641:16778857,1642:16778858,1648:16778864,1657:16778873,1662:16778878,1670:16778886,1672:16778888,1681:16778897,1688:16778904,1700:16778916,1705:16778921,1711:16778927,1722:16778938,1726:16778942,1729:16778945,1740:16778956,1746:16778962,1748:16778964,1776:16778992,1777:16778993,1778:16778994,1779:16778995,1780:16778996,1781:16778997,1782:16778998,1783:16778999,1784:16779e3,1785:16779001,3458:16780674,3459:16780675,3461:16780677,3462:16780678,3463:16780679,3464:16780680,3465:16780681,3466:16780682,3467:16780683,3468:16780684,3469:16780685,3470:16780686,3471:16780687,3472:16780688,3473:16780689,3474:16780690,3475:16780691,3476:16780692,3477:16780693,3478:16780694,3482:16780698,3483:16780699,3484:16780700,3485:16780701,3486:16780702,3487:16780703,3488:16780704,3489:16780705,3490:16780706,3491:16780707,3492:16780708,3493:16780709,3494:16780710,3495:16780711,3496:16780712,3497:16780713,3498:16780714,3499:16780715,3500:16780716,3501:16780717,3502:16780718,3503:16780719,3504:16780720,3505:16780721,3507:16780723,3508:16780724,3509:16780725,3510:16780726,3511:16780727,3512:16780728,3513:16780729,3514:16780730,3515:16780731,3517:16780733,3520:16780736,3521:16780737,3522:16780738,3523:16780739,3524:16780740,3525:16780741,3526:16780742,3530:16780746,3535:16780751,3536:16780752,3537:16780753,3538:16780754,3539:16780755,3540:16780756,3542:16780758,3544:16780760,3545:16780761,3546:16780762,3547:16780763,3548:16780764,3549:16780765,3550:16780766,3551:16780767,3570:16780786,3571:16780787,3572:16780788,3585:3489,3586:3490,3587:3491,3588:3492,3589:3493,3590:3494,3591:3495,3592:3496,3593:3497,3594:3498,3595:3499,3596:3500,3597:3501,3598:3502,3599:3503,3600:3504,3601:3505,3602:3506,3603:3507,3604:3508,3605:3509,3606:3510,3607:3511,3608:3512,3609:3513,3610:3514,3611:3515,3612:3516,3613:3517,3614:3518,3615:3519,3616:3520,3617:3521,3618:3522,3619:3523,3620:3524,3621:3525,3622:3526,3623:3527,3624:3528,3625:3529,3626:3530,3627:3531,3628:3532,3629:3533,3630:3534,3631:3535,3632:3536,3633:3537,3634:3538,3635:3539,3636:3540,3637:3541,3638:3542,3639:3543,3640:3544,3641:3545,3642:3546,3647:3551,3648:3552,3649:3553,3650:3554,3651:3555,3652:3556,3653:3557,3654:3558,3655:3559,3656:3560,3657:3561,3658:3562,3659:3563,3660:3564,3661:3565,3664:3568,3665:3569,3666:3570,3667:3571,3668:3572,3669:3573,3670:3574,3671:3575,3672:3576,3673:3577,4304:16781520,4305:16781521,4306:16781522,4307:16781523,4308:16781524,4309:16781525,4310:16781526,4311:16781527,4312:16781528,4313:16781529,4314:16781530,4315:16781531,4316:16781532,4317:16781533,4318:16781534,4319:16781535,4320:16781536,4321:16781537,4322:16781538,4323:16781539,4324:16781540,4325:16781541,4326:16781542,4327:16781543,4328:16781544,4329:16781545,4330:16781546,4331:16781547,4332:16781548,4333:16781549,4334:16781550,4335:16781551,4336:16781552,4337:16781553,4338:16781554,4339:16781555,4340:16781556,4341:16781557,4342:16781558,7682:16784898,7683:16784899,7690:16784906,7691:16784907,7710:16784926,7711:16784927,7734:16784950,7735:16784951,7744:16784960,7745:16784961,7766:16784982,7767:16784983,7776:16784992,7777:16784993,7786:16785002,7787:16785003,7808:16785024,7809:16785025,7810:16785026,7811:16785027,7812:16785028,7813:16785029,7818:16785034,7819:16785035,7840:16785056,7841:16785057,7842:16785058,7843:16785059,7844:16785060,7845:16785061,7846:16785062,7847:16785063,7848:16785064,7849:16785065,7850:16785066,7851:16785067,7852:16785068,7853:16785069,7854:16785070,7855:16785071,7856:16785072,7857:16785073,7858:16785074,7859:16785075,7860:16785076,7861:16785077,7862:16785078,7863:16785079,7864:16785080,7865:16785081,7866:16785082,7867:16785083,7868:16785084,7869:16785085,7870:16785086,7871:16785087,7872:16785088,7873:16785089,7874:16785090,7875:16785091,7876:16785092,7877:16785093,7878:16785094,7879:16785095,7880:16785096,7881:16785097,7882:16785098,7883:16785099,7884:16785100,7885:16785101,7886:16785102,7887:16785103,7888:16785104,7889:16785105,7890:16785106,7891:16785107,7892:16785108,7893:16785109,7894:16785110,7895:16785111,7896:16785112,7897:16785113,7898:16785114,7899:16785115,7900:16785116,7901:16785117,7902:16785118,7903:16785119,7904:16785120,7905:16785121,7906:16785122,7907:16785123,7908:16785124,7909:16785125,7910:16785126,7911:16785127,7912:16785128,7913:16785129,7914:16785130,7915:16785131,7916:16785132,7917:16785133,7918:16785134,7919:16785135,7920:16785136,7921:16785137,7922:16785138,7923:16785139,7924:16785140,7925:16785141,7926:16785142,7927:16785143,7928:16785144,7929:16785145,8194:2722,8195:2721,8196:2723,8197:2724,8199:2725,8200:2726,8201:2727,8202:2728,8210:2747,8211:2730,8212:2729,8213:1967,8215:3295,8216:2768,8217:2769,8218:2813,8220:2770,8221:2771,8222:2814,8224:2801,8225:2802,8226:2790,8229:2735,8230:2734,8240:2773,8242:2774,8243:2775,8248:2812,8254:1150,8304:16785520,8308:16785524,8309:16785525,8310:16785526,8311:16785527,8312:16785528,8313:16785529,8320:16785536,8321:16785537,8322:16785538,8323:16785539,8324:16785540,8325:16785541,8326:16785542,8327:16785543,8328:16785544,8329:16785545,8352:16785568,8353:16785569,8354:16785570,8355:16785571,8356:16785572,8357:16785573,8358:16785574,8359:16785575,8360:16785576,8361:3839,8362:16785578,8363:16785579,8364:8364,8453:2744,8470:1712,8471:2811,8478:2772,8482:2761,8531:2736,8532:2737,8533:2738,8534:2739,8535:2740,8536:2741,8537:2742,8538:2743,8539:2755,8540:2756,8541:2757,8542:2758,8592:2299,8593:2300,8594:2301,8595:2302,8658:2254,8660:2253,8706:2287,8709:16785925,8711:2245,8712:16785928,8713:16785929,8715:16785931,8728:3018,8730:2262,8731:16785947,8732:16785948,8733:2241,8734:2242,8743:2270,8744:2271,8745:2268,8746:2269,8747:2239,8748:16785964,8749:16785965,8756:2240,8757:16785973,8764:2248,8771:2249,8773:16785992,8775:16785991,8800:2237,8801:2255,8802:16786018,8803:16786019,8804:2236,8805:2238,8834:2266,8835:2267,8866:3068,8867:3036,8868:3010,8869:3022,8968:3027,8970:3012,8981:2810,8992:2212,8993:2213,9109:3020,9115:2219,9117:2220,9118:2221,9120:2222,9121:2215,9123:2216,9124:2217,9126:2218,9128:2223,9132:2224,9143:2209,9146:2543,9147:2544,9148:2546,9149:2547,9225:2530,9226:2533,9227:2537,9228:2531,9229:2532,9251:2732,9252:2536,9472:2211,9474:2214,9484:2210,9488:2539,9492:2541,9496:2538,9500:2548,9508:2549,9516:2551,9524:2550,9532:2542,9618:2529,9642:2791,9643:2785,9644:2779,9645:2786,9646:2783,9647:2767,9650:2792,9651:2787,9654:2781,9655:2765,9660:2793,9661:2788,9664:2780,9665:2764,9670:2528,9675:2766,9679:2782,9702:2784,9734:2789,9742:2809,9747:2762,9756:2794,9758:2795,9792:2808,9794:2807,9827:2796,9829:2798,9830:2797,9837:2806,9839:2805,10003:2803,10007:2804,10013:2777,10016:2800,10216:2748,10217:2750,10240:16787456,10241:16787457,10242:16787458,10243:16787459,10244:16787460,10245:16787461,10246:16787462,10247:16787463,10248:16787464,10249:16787465,10250:16787466,10251:16787467,10252:16787468,10253:16787469,10254:16787470,10255:16787471,10256:16787472,10257:16787473,10258:16787474,10259:16787475,10260:16787476,10261:16787477,10262:16787478,10263:16787479,10264:16787480,10265:16787481,10266:16787482,10267:16787483,10268:16787484,10269:16787485,10270:16787486,1027