!function(){var e="avnavsplit.percent",t=-1,n=-1,i=document.getElementById("mover"),o=document.getElementById("left"),a=document.getElementById("right"),d=document.getElementById("split_main"),r=function(e){void 0===e&&(e=o.getBoundingClientRect().width);var t=i.getBoundingClientRect();i.style.left=e-t.width/2+"px"},c=function(t){o.style.width=t+"%",a.style.width=100-t+"%",r(),window.localStorage&&window.localStorage.setItem(e,t+""),window.setTimeout((function(){i.style.opacity=.3}),5e3)},s=function(e){var t=100*e/d.getBoundingClientRect().width;t<0&&(t=0),t>=99.999&&(t=99.999),c(t)};i.addEventListener("dragstart",(function(e){n=e.screenX,i.style.opacity=.6})),i.addEventListener("touchstart",(function(e){e.preventDefault();var n=e.changedTouches[0];t=parseInt(n.screenX),i.style.opacity=.6,r(t)})),i.addEventListener("touchmove",(function(e){var n=e.changedTouches[0];t=parseInt(n.screenX),r(t)})),i.addEventListener("touchend",(function(e){var n=e.changedTouches[0];t=parseInt(n.screenX),s(t)})),i.addEventListener("dragend",(function(e){e.preventDefault();var t=o.getBoundingClientRect().width;n<0||(t+=e.screenX-n,n=-1,s(t))}));var l=50;if(window.localStorage){var w=window.localStorage.getItem(e);w&&(l=parseInt(w))}var u=window.location.href+"",v=u=u.replace("viewer_split","avnav_viewer");if(v=v.replace(/\?.*/,""),u.match(/[?]/)||(u+="?"),u+="&splitMode=true",window.location.search.match(/split=/)){var f=window.location.search.replace(/.*split=/,"").replace(/[^0-9].*/,"");isNaN(f)||(l=f)}c(l),o.src=u+"&storePrefix=1&preventAlarms=true&ignoreAndroidBack=true",a.src=u+"&storePrefix=2",window.addEventListener("resize",(function(){r()}));const g=(e,t)=>{"string"==typeof e&&(e={type:e}),[o,a].forEach((function(n){t&&n.contentWindow===t||n.contentWindow.postMessage(e,window.location.origin)}))};window.addEventListener("message",(function(e){let t=e.data.type;if(["dimm"].indexOf(t)>=0)g(e.data,e.source);else{if("fullscreen"===t){let e=!1;document.fullscreenElement?document.exitFullscreen():(document.body.requestFullscreen(),e=!0),g({type:"fullScreenChanged",isFullScreen:e})}"settingsChanged"===t&&g("reloadSettings"),"finishSplit"===t&&(g("stopLeave"),window.setTimeout((()=>window.location.href=v),20))}})),window.avnavAndroid&&(window.avnav||(window.avnav={}),window.avnav.android||(window.avnav.android={receiveEvent:(e,t)=>{g({type:"android",key:e,param:t})}}))}();