function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r',e.style.width=0,e.style.height=0,e.style.overflow="hidden",e.style.position="absolute",e.style.margin=0,e.style.padding=0,document.body.appendChild(e),Array.prototype.filter.call(document.getElementsByClassName("flowplayer"),function(e){e.className=e.className.replace(/\bno-svg\b/g,"");var t=e.querySelector(".fvfp_admin_error"),t=(t&&t.parentNode.removeChild(t),e.querySelector(".fp-preload"));t&&(t.style.display="none")})}();var FV_Player_JS_Loader_Compatibility_Checker=function(){function t(e){_classCallCheck(this,t),this.passiveSupported=!1,this._checkPassiveOption(this),this.options=!!this.passiveSupported&&e}return _createClass(t,[{key:"_checkPassiveOption",value:function(t){try{var e={get passive(){return!(t.passiveSupported=!0)}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t.passiveSupported=!1}}}]),t}(),FV_Player_JS_Loader=function(){function i(e,t){_classCallCheck(this,i),this.attrName="data-fv-player-loader-src",this.browser=t,this.options=this.browser.options,this.triggerEvents=e,this.userEventListener=this.triggerListener.bind(this)}return _createClass(i,[{key:"init",value:function(){this._addEventListener(this)}},{key:"reset",value:function(){this._removeEventListener(this)}},{key:"_addEventListener",value:function(t){this.triggerEvents.forEach(function(e){return window.addEventListener(e,t.userEventListener,t.options)})}},{key:"_removeEventListener",value:function(t){this.triggerEvents.forEach(function(e){return window.removeEventListener(e,t.userEventListener,t.options)})}},{key:"_loadScriptSrc",value:function(){var r=this,e=document.querySelectorAll("script[".concat(this.attrName,"]"));window.FV_Player_JS_Loader_scripts_total=0,window.FV_Player_JS_Loader_scripts_loaded=0,e.forEach(function(e){var t=e.getAttribute(r.attrName);e.setAttribute("src",t),e.removeAttribute(r.attrName),window.FV_Player_JS_Loader_scripts_total++,e.onload=function(){window.FV_Player_JS_Loader_scripts_loaded++}}),this.reset()}},{key:"triggerListener",value:function(){var e,t;Array.prototype.filter.call(document.getElementsByClassName("flowplayer"),function(e){e.getAttribute("data-error")||(e=e.querySelector(".fp-preload"))&&(e.style.display="block")}),window.flowplayer?this._loadScriptSrc():(e=this,t=setInterval(function(){window.flowplayer&&(e._loadScriptSrc(),clearInterval(t))},100)),this._removeEventListener(this)}}],[{key:"run",value:function(){var t,e,r,o=new i(["keydown","mouseover","touchmove","touchstart","wheel"],new FV_Player_JS_Loader_Compatibility_Checker({passive:!0}));o.init(),location.hash.match(/fvp_/)?o.triggerListener():navigator.platform.match(/iPad|iPhone|iPod/)||-1!==navigator.userAgent.indexOf("Mac")&&"ontouchend"in document?(t=function(){var r=!1;return document.querySelectorAll(".flowplayer").forEach(function(e){var t=e.getBoundingClientRect();t.top>=-e.offsetHeight&&t.left>=-e.offsetWidth&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)+e.offsetHeight&&t.right<=(window.innerWidth||document.documentElement.clientWidth)+e.offsetWidth&&(r=!0)}),console.log("FV Player: Visible?",r),r&&o.triggerListener(),r})()||(e=function e(){this.removeEventListener("scroll",e),t()},window.addEventListener("load",t),window.addEventListener("scroll",e)):(r=!1,document.addEventListener("mousedown",function(e){var t;r||(t=!(r=!0),(e.path||e.composedPath&&e.composedPath()).forEach(function(e){e.getAttribute&&e.getAttribute("data-item")&&(t=e),e.className&&e.className.match(/\b(flowplayer|fp-playlist-external)\b/)&&(document.querySelectorAll("[data-fvautoplay]").forEach(function(e){e.removeAttribute("data-fvautoplay")}),window.fv_vast_conf&&(window.fv_vast_conf.autoplay=!1),e.className.match(/lightbox-starter/)||(e.className.match(/\bfp-playlist-external\b/)?(console.log("First click on playlist"),document.getElementById(e.getAttribute("rel")).setAttribute("data-fvautoplay",Array.prototype.indexOf.call(e.children,t))):(console.log("First click on player"),e.setAttribute("data-fvautoplay",0))))}))},!1))}}]),i}();FV_Player_JS_Loader.run();