!function(){var t=((t=function(t){var e=this;e.element=document.querySelectorAll(t),e.setConfig(),e.setWindowWidth(),e.listenEvent()}).prototype.setConfig=function(){var t=this;t.subNavPosition="right",t.subNavOffsetLeft=null,t.windowWidth=null,t.subNavWidth=null},t.prototype.setWindowWidth=function(){var e=this;e.windowWidth=window.innerWidth,window.onresize=function(t){e.windowWidth=window.innerWidth}},t.prototype.setOppositeDirection=function(){var t=this;"right"===t.subNavPosition?t.subNavPosition="left":"left"===t.subNavPosition&&(t.subNavPosition="right")},t.prototype.isNextSubMenuWillFitOnScreen=function(){var t=this;switch(t.subNavPosition){case"right":return 2*t.subNavWidth+t.subNavOffsetLeft<t.windowWidth;case"left":return 0<t.subNavOffsetLeft-t.subNavWidth}},t.prototype.isATag=function(t){return t.target&&"A"==t.target.nodeName},t.prototype.applyStyle=function(t){t=t.nextElementSibling;if(!t)return!1;"left"===this.subNavPosition?(t.style.left="initial",t.style.right="100%"):"right"===this.subNavPosition&&(t.style.left=null,t.style.right=null)},t.prototype.handleMouseEnterEvent=function(t){var e=this,n=t.parentElement.parentElement.getBoundingClientRect();e.subNavWidth||(e.subNavWidth=n.width),e.subNavOffsetLeft=n.x,e.isNextSubMenuWillFitOnScreen()||e.setOppositeDirection(),e.applyStyle(t)},t.prototype.listenEvent=function(){var e=this;e.element.forEach(function(t){t.addEventListener("mouseover",function(t){e.isATag(t)&&e.handleMouseEnterEvent(t.target,e)}),t.addEventListener("mouseout",function(t){e.isATag(t)&&e.handleMouseEnterEvent(t.target,e)})})},t);window.FstShowNavOnScreen=t}();