"};function ft(e,t){for(var n=0;n'.concat(a.playback,"")),Object(l.a)(o.icon,"jw-idle-label"),o.icon.appendChild(s))}return o}var n,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vt(e,t)}(t,e),n=t,(i=[{key:"element",value:function(){return this.el}}])&>(n.prototype,i),o&>(n,o),t}(r.a);function kt(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return'
")},zt={link:function(e){var t=e.link,n=e.title,i=e.logo;return'').concat(i).concat(n||"","")},info:function(e,t){return'")},share:function(e,t){return'")},keyboardShortcuts:function(e,t){return'")}},Pt=n(23),At=n(6),Lt=n(13);function Rt(e,t){for(var n=0;nJW Player '.concat(e,""),a={items:[{type:"info"},{title:Object(Lt.e)(i)?"".concat(o," ").concat(i):"".concat(i," ").concat(o),type:"link",featured:!0,showLogo:!0,link:"https://jwplayer.com/learn-more?e=".concat(It[n])}]},r=t.get("provider"),s=a.items;if(r&&r.name.indexOf("flash")>=0){var l="Flash Version "+Object(At.a)();s.push({title:l,type:"link",link:"http://www.adobe.com/software/flash/about/"})}return this.shortcutsTooltip&&s.splice(s.length-1,0,{type:"keyboardShortcuts"}),a}},{key:"rightClick",value:function(e){if(this.lazySetup(),this.mouseOverContext)return!1;this.hideMenu(),this.showMenu(e),this.addHideMenuHandlers()}},{key:"getOffset",value:function(e){var t=Object(l.c)(this.wrapperElement),n=e.pageX-t.left,i=e.pageY-t.top;return this.model.get("touchMode")&&(i-=100),{x:n,y:i}}},{key:"showMenu",value:function(e){var t=this,n=this.getOffset(e);return this.el.style.left=n.x+"px",this.el.style.top=n.y+"px",this.outCount=0,Object(l.a)(this.playerContainer,"jw-flag-rightclick-open"),Object(l.a)(this.el,"jw-open"),clearTimeout(this._menuTimeout),this._menuTimeout=setTimeout((function(){return t.hideMenu()}),3e3),!1}},{key:"hideMenu",value:function(e){e&&this.el&&this.el.contains(e.target)||(Object(l.o)(this.playerContainer,"jw-flag-rightclick-open"),Object(l.o)(this.el,"jw-open"))}},{key:"lazySetup",value:function(){var e,t,n,i,o=this,a=(e=this.buildArray(),t=this.model.get("localization"),n=e.items,i=(void 0===n?[]:n).map((function(e){return _t(e,t)})),'
'+'
'.concat(i.join(""),"
")+"
");if(this.el){if(this.html!==a){this.html=a;var r=Bt(a);Object(l.h)(this.el);for(var s=r.childNodes.length;s--;)this.el.appendChild(r.firstChild)}}else this.html=a,this.el=Bt(this.html),this.wrapperElement.appendChild(this.el),this.hideMenuHandler=function(e){return o.hideMenu(e)},this.overHandler=function(){o.mouseOverContext=!0},this.outHandler=function(e){o.mouseOverContext=!1,e.relatedTarget&&!o.el.contains(e.relatedTarget)&&++o.outCount>1&&o.hideMenu()},this.infoOverlayHandler=function(){o.mouseOverContext=!1,o.hideMenu(),o.infoOverlay.open()},this.shortcutsTooltipHandler=function(){o.mouseOverContext=!1,o.hideMenu(),o.shortcutsTooltip.open()}}},{key:"setup",value:function(e,t,n){this.wrapperElement=n,this.model=e,this.mouseOverContext=!1,this.playerContainer=t,this.ui=new u.a(n).on("longPress",this.rightClick,this)}},{key:"addHideMenuHandlers",value:function(){this.removeHideMenuHandlers(),this.wrapperElement.addEventListener("touchstart",this.hideMenuHandler),document.addEventListener("touchstart",this.hideMenuHandler),o.OS.mobile||(this.wrapperElement.addEventListener("click",this.hideMenuHandler),document.addEventListener("click",this.hideMenuHandler),this.el.addEventListener("mouseover",this.overHandler),this.el.addEventListener("mouseout",this.outHandler)),this.el.querySelector(".jw-info-overlay-item").addEventListener("click",this.infoOverlayHandler),this.shortcutsTooltip&&this.el.querySelector(".jw-shortcuts-item").addEventListener("click",this.shortcutsTooltipHandler)}},{key:"removeHideMenuHandlers",value:function(){this.wrapperElement&&(this.wrapperElement.removeEventListener("click",this.hideMenuHandler),this.wrapperElement.removeEventListener("touchstart",this.hideMenuHandler)),this.el&&(this.el.querySelector(".jw-info-overlay-item").removeEventListener("click",this.infoOverlayHandler),this.el.removeEventListener("mouseover",this.overHandler),this.el.removeEventListener("mouseout",this.outHandler),this.shortcutsTooltip&&this.el.querySelector(".jw-shortcuts-item").removeEventListener("click",this.shortcutsTooltipHandler)),document.removeEventListener("click",this.hideMenuHandler),document.removeEventListener("touchstart",this.hideMenuHandler)}},{key:"destroy",value:function(){clearTimeout(this._menuTimeout),this.removeHideMenuHandlers(),this.el&&(this.hideMenu(),this.hideMenuHandler=null,this.el=null),this.wrapperElement&&(this.wrapperElement.oncontextmenu=null,this.wrapperElement=null),this.model&&(this.model=null),this.ui&&(this.ui.destroy(),this.ui=null)}}])&&Rt(t.prototype,n),i&&Rt(t,i),e}(),Nt=function(e){return'")},Ht=function(e){return'"},Ft=function(e){return'"};function qt(e){return(qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dt(e,t){return!t||"object"!==qt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Wt(e,t){return(Wt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yt(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:Nt;Qt(this,e),this.el=Object(l.e)(i(t)),this.ui=new u.a(this.el).on("click tap enter",n,this)}return Xt(e,[{key:"destroy",value:function(){this.ui.destroy()}}]),e}(),Jt=function(e){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ft;return Qt(this,t),Dt(this,Ut(t).call(this,e,n,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wt(e,t)}(t,e),Xt(t,[{key:"activate",value:function(){Object(l.v)(this.el,"jw-settings-item-active",!0),this.el.setAttribute("aria-checked","true"),this.active=!0}},{key:"deactivate",value:function(){Object(l.v)(this.el,"jw-settings-item-active",!1),this.el.setAttribute("aria-checked","false"),this.active=!1}}]),t}(Kt),Gt=function(e,t){return e?'