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