You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
1.4 KiB
1 lines
1.4 KiB
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[724],{38724:function(e,r,n){n.r(r);var t=n(85893),c=n(94460),u=n(67294);let l=e=>{let{background:r="",clipViewport:n=!1,compressionLevel:t=2,dragViewport:u=!1,focusOnClick:l=!1,onConnect:i,onDisconnect:s,qualityLevel:o=6,resizeSession:d=!0,rfb:a,rfbScreen:v,scaleViewport:f=!0,showDotCursor:E=!1,url:p,viewOnly:m=!1}=e;(null==v?void 0:v.current)&&(null==a||!a.current)&&(v.current.innerHTML="",a.current=new c.Z(v.current,p),a.current.background=r,a.current.clipViewport=n,a.current.compressionLevel=t,a.current.dragViewport=u,a.current.focusOnClick=l,a.current.qualityLevel=o,a.current.resizeSession=d,a.current.scaleViewport=f,a.current.showDotCursor=E,a.current.viewOnly=m,i&&a.current.addEventListener("connect",i),s&&a.current.addEventListener("disconnect",s))},i=e=>{(null==e?void 0:e.current)&&(e.current.disconnect(),e.current=null)},s=e=>{let{onConnect:r,onDisconnect:n,rfb:c,rfbConnectArgs:s,rfbScreen:o,url:d}=e;return(0,u.useEffect)(()=>{if(s){let{url:e=d}=s;e&&l({onConnect:r,onDisconnect:n,rfb:c,rfbScreen:o,url:e,...s})}else i(c)},[d,r,n,c,s,o]),(0,u.useEffect)(()=>()=>{i(c)},[c]),(0,t.jsx)("div",{style:{width:"100%",height:"75vh"},ref:o,onMouseEnter:()=>{document.activeElement&&document.activeElement instanceof HTMLElement&&document.activeElement.blur(),(null==c?void 0:c.current)&&c.current.focus()}})};s.displayName="VncDisplay",r.default=s}}]); |