@theoplayer/web-ui 1.8.0 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +4 -4
- package/dist/THEOplayerUI.d.ts +27 -4
- package/dist/THEOplayerUI.es5.js +2 -2
- package/dist/THEOplayerUI.es5.mjs +2 -2
- package/dist/THEOplayerUI.js +12 -12
- package/dist/THEOplayerUI.js.map +1 -1
- package/dist/THEOplayerUI.mjs +20 -20
- package/dist/THEOplayerUI.mjs.map +1 -1
- package/dist/THEOplayerUI.node.mjs +15 -15
- package/dist/THEOplayerUI.node.mjs.map +1 -1
- package/package.json +5 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* THEOplayer Open Video UI for Web (v1.8.
|
|
2
|
+
* THEOplayer Open Video UI for Web (v1.8.2)
|
|
3
3
|
* License: MIT
|
|
4
|
-
*/import{ChromelessPlayer as e}from"theoplayer/chromeless";function t(e,r){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,r)}function r(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&t(e,r)}function a(e,r,o){return(a=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?function(e,r,a){var o=[null];o.push.apply(o,r);var n=new(Function.bind.apply(e,o));return a&&t(n,a.prototype),n}:Reflect.construct).apply(null,arguments)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n(e){var r="function"==typeof Map?new Map:void 0;return(n=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,n)}function n(){return a(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t(n,e)})(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function u(e){s()&&window.ShadyCSS.styleElement(e)}function h(e,t){void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(e,t):null!=t&&function(e,t){for(var r,a=e.style,o=l(Object.entries(t));!(r=o()).done;){var n=r.value,i=n[0],s=n[1];a.setProperty(i,s)}}(e,t)}function p(e,t){var r;return function(){if(void 0===r){var a;(r=document.createElement("template")).innerHTML=t,t=void 0,a=r,s()&&window.ShadyCSS.prepareTemplate(a,e)}return r}}var d,c,y,v,f,b,g=p("theoplayer-control-bar","<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}:host([hidden]){display:none!important}::slotted(theoplayer-time-range){-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}</style><slot></slot>"),m=function(e){function t(){var t;return(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0}).appendChild(g().content.cloneNode(!0)),t}return r(t,e),t.prototype.connectedCallback=function(){u(this)},t}(n(HTMLElement));function _(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function k(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),e}customElements.define("theoplayer-control-bar",m),(v=d||(d={})).CONFIGURATION="configuration",v.SOURCE="source",v.AUTOPLAY="autoplay",v.MUTED="muted",v.FULLSCREEN="fullscreen",v.FLUID="fluid",v.DEVICE_TYPE="device-type",v.MOBILE="mobile",v.TV="tv",v.TV_FOCUS="tv-focus",v.MOBILE_ONLY="mobile-only",v.MOBILE_HIDDEN="mobile-hidden",v.TV_ONLY="tv-only",v.TV_HIDDEN="tv-hidden",v.USER_IDLE="user-idle",v.USER_IDLE_TIMEOUT="user-idle-timeout",v.NO_AUTO_HIDE="no-auto-hide",v.DISABLED="disabled",v.HIDDEN="hidden",v.PAUSED="paused",v.ENDED="ended",v.VOLUME_LEVEL="volume-level",v.CASTING="casting",v.LOADING="loading",v.STREAM_TYPE="stream-type",v.LIVE="live",v.LIVE_ONLY="live-only",v.LIVE_HIDDEN="live-hidden",v.LIVE_THRESHOLD="live-threshold",v.DVR_THRESHOLD="dvr-threshold",v.REMAINING="remaining",v.REMAINING_WHEN_LIVE="remaining-when-live",v.SHOW_DURATION="show-duration",v.SEEK_OFFSET="seek-offset",v.MENU="menu",v.MENU_OPENED="menu-opened",v.MENU_CLOSE_ON_INPUT="menu-close-on-input",v.ARIA_LABEL="aria-label",v.ARIA_LIVE="aria-live",v.ARIA_CHECKED="aria-checked",v.HAS_AUDIO="has-audio",v.HAS_SUBTITLES="has-subtitles",v.HAS_ERROR="has-error",v.HAS_FIRST_PLAY="has-first-play",v.HAS_TITLE="has-title",v.CAST_STATE="cast-state",v.TRACK_TYPE="track-type",v.SHOW_OFF="show-off",v.PLAYING_AD="playing-ad",v.SHOW_AD_MARKERS="show-ad-markers",v.CLICKTHROUGH="clickthrough",v.PROPERTY="property",v.VALUE="value";var w=p("theoplayer-slot-container","<style>:host{display:contents}::slotted(:not([no-auto-hide])),slot{opacity:inherit}</style><slot></slot>"),x=function(e){function t(){var t;return(t=e.call(this)||this).attachShadow({mode:"open"}).appendChild(w().content.cloneNode(!0)),t}return r(t,e),t}(n(HTMLElement));function E(){}function A(e){return e.nodeType===Node.ELEMENT_NODE}function T(e){return e instanceof HTMLElement}customElements.define("theoplayer-slot-container",x);var C="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},L="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){return Array.prototype.slice.call(e)},S="function"==typeof Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){for(var r=0;r<e.length;r++)if(t(e[r],r,e))return e[r]},P="function"==typeof Array.prototype.findIndex?function(e,t){return e.findIndex(t)}:function(e,t){for(var r=0;r<e.length;r++)if(t(e[r],r,e))return r;return -1},R="function"==typeof String.prototype.startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return e.substring(0,t.length)===t},M="undefined"!=typeof Intl&&Intl.DisplayNames?function(e){var t=new Intl.DisplayNames([e,"en"],{type:"language",fallback:"none"}).of(e);if(t)return t.slice(0,1).toUpperCase()+t.slice(1)}:function(e){};function I(e,t){void 0===e.textContent?e.innerText=t:e.textContent=t}function O(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)}function N(e){if(e.shadowRoot)return e.shadowRoot.children;if("slot"===e.localName.toLowerCase()){var t=e.assignedNodes();if(t.length>0)return t.filter(A)}return T(e)?e.children:[]}function D(e){for(var t,r=[],a=l(e.assignedNodes({flatten:!0}));!(t=a()).done;){var o=t.value;A(o)&&(r.push(o),"theoplayer-slot-container"===o.nodeName.toLowerCase()&&r.push.apply(r,[].concat(L(o.children))))}return r}function q(e){var t=[];return function e(t,r){if(T(t)&&"none"!==getComputedStyle(t).display){if(t.hasAttribute("tabindex")&&Number(t.getAttribute("tabindex"))>=0){r.push(t);return}switch(t.tagName.toLowerCase()){case"button":case"input":case"textarea":case"select":case"details":r.push(t);break;case"a":t.href&&r.push(t);break;default:for(var a=N(t),o=0;o<a.length;o++)e(a[o],r)}}}(e,t),t}function B(e){var t=e.nodeName.toLowerCase();if(t.indexOf("-")>=0){if(!customElements.get(t))return customElements.whenDefined(t);customElements.upgrade(e)}}function F(e,t){return void 0===t&&(t=""),"<style>:host{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);justify-content:center;line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}:host([hidden]){display:none!important}:host(:not([disabled])){cursor:pointer}:host(:focus){-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}:host(:focus:not(:focus-visible)){-webkit-box-shadow:none;box-shadow:none}:host(:hover){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}:host([aria-checked=true]){background:#fff;background:var(--theoplayer-button-checked-background,#fff);color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]){background:transparent;background:var(--theoplayer-control-background,transparent);color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}[part$=icon],[part~=icon]{font-size:0}::slotted(img),::slotted(svg),img,svg{fill:currentColor;color:#fff;color:var(--theoplayer-icon-color,#fff);height:24px;height:var(--theoplayer-button-icon-height,var(--theoplayer-control-height,24px));max-height:100%;max-width:100%;min-width:100%;-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-button-icon-transition,none);transition:var(--theoplayer-button-icon-transition,none);vertical-align:middle;width:24px;width:var(--theoplayer-button-icon-width,var(--theoplayer-control-height,24px))}::slotted(img),img{-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-button-icon-shadow,none);box-shadow:var(--theoplayer-button-icon-shadow,none)}::slotted(svg),svg{-webkit-filter:drop-shadow(none);filter:drop-shadow(none);-webkit-filter:drop-shadow(var(--theoplayer-button-icon-shadow,none));filter:drop-shadow(var(--theoplayer-button-icon-shadow,none))}:host(:hover:not([disabled])) ::slotted(img),:host(:hover:not([disabled])) img{-webkit-box-shadow:0 0 4px hsla(0,0%,100%,.5);box-shadow:0 0 4px hsla(0,0%,100%,.5);-webkit-box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5));box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5))}:host(:hover:not([disabled])) ::slotted(svg),:host(:hover:not([disabled])) svg{-webkit-filter:drop-shadow(0 0 4px hsla(0,0%,100%,.5));filter:drop-shadow(0 0 4px rgba(255,255,255,.5));-webkit-filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5)));filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px rgba(255,255,255,.5)))}\n"+t+"</style>"+e}var U=p("theoplayer-button",F("<slot></slot>")),H=function(e){function t(t){(r=e.call(this)||this)._onClick=function(){r.disabled||r.handleClick()};var r,a,o=null!=(a=null==t?void 0:t.template)?a:U();return r.attachShadow({mode:"open"}).appendChild(o.content.cloneNode(!0)),r._upgradeProperty("disabled"),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(d.ARIA_LIVE)||this.setAttribute(d.ARIA_LIVE,"polite"),this.addEventListener("click",this._onClick)},a.disconnectedCallback=function(){this.removeEventListener("click",this._onClick)},a.attributeChangedCallback=function(e,r,a){if(e===d.DISABLED&&a!==r){var o=null!=a;this.setAttribute("aria-disabled",o?"true":"false"),o?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}t.observedAttributes.indexOf(e)>=0&&h(this)},a.handleClick=function(){},k(t,[{key:"disabled",get:function(){return this.hasAttribute(d.DISABLED)},set:function(e){O(this,d.DISABLED,e)}}],[{key:"observedAttributes",get:function(){return[d.DISABLED]}}]),t}(n(HTMLElement));function V(e){return 37<=e&&e<=40}function z(e){return 10009===e||27===e||88===e||461===e}function G(e,t){return void 0===t&&(t=""),F("<a>"+e+"</a>",":host{padding:0}a{color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));padding:10px;padding:var(--theoplayer-control-padding,10px);-webkit-text-decoration:none;text-decoration:none}:host(:focus){-webkit-box-shadow:none;box-shadow:none;outline:0}a:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}a:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}:host([aria-checked=true]) a{color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]) a{color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}\n"+t)}customElements.define("theoplayer-button",H),(f=c||(c={}))[f.ENTER=13]="ENTER",f[f.ESCAPE=27]="ESCAPE",f[f.SPACE=32]="SPACE",f[f.END=35]="END",f[f.HOME=36]="HOME",f[f.LEFT=37]="LEFT",f[f.UP=38]="UP",f[f.RIGHT=39]="RIGHT",f[f.DOWN=40]="DOWN",f[f.BACK_SAMSUNG=88]="BACK_SAMSUNG",f[f.BACK_WEBOS=461]="BACK_WEBOS",f[f.BACK_TIZEN=10009]="BACK_TIZEN";var Q=p("theoplayer-link-button",G("<slot></slot>")),Y=function(e){function t(t){(r=e.call(this)||this)._onKeyDown=function(e){!e.altKey&&e.keyCode===c.SPACE&&(e.preventDefault(),r._linkEl.click())},r._onClick=function(){r.disabled||r.handleClick()};var r,a,o=null!=(a=null==t?void 0:t.template)?a:Q(),n=r.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(o.content.cloneNode(!0)),r._linkEl=n.querySelector("a"),r._upgradeProperty("disabled"),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(d.ARIA_LIVE)||this.setAttribute(d.ARIA_LIVE,"polite"),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)},a.disconnectedCallback=function(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)},a.setLink=function(e,t){this._linkEl.href=e,this._linkEl.target=t},a.attributeChangedCallback=function(e,t,r){if(e===d.DISABLED&&r!==t){var a=null!=r;this.setAttribute("aria-disabled",a?"true":"false"),a?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}H.observedAttributes.indexOf(e)>=0&&h(this)},a.handleClick=function(){},k(t,[{key:"disabled",get:function(){return this.hasAttribute(d.DISABLED)},set:function(e){O(this,d.DISABLED,e)}}],[{key:"observedAttributes",get:function(){return[d.DISABLED]}}]),t}(n(HTMLElement));function K(e,t,r,a,o,n,i){try{var l=e[n](i),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,o)}customElements.define("theoplayer-link-button",Y),"function"==typeof SuppressedError&&SuppressedError;var W="theoplayerUiObservedProperties";function j(e){return W in e&&C(e[W])}function Z(e,t){return function(e){function a(){return e.apply(this,arguments)}return r(a,e),k(a,[{key:W,get:function(){return t}}]),a}(e)}function X(e,t,r){return J.apply(this,arguments)}function J(){var e;return e=function(e,t,r){var a;return function(e,t){var r,a,o,n,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return n={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function l(l){return function(s){return function(l){if(r)throw TypeError("Generator is already executing.");for(;n&&(n=0,l[0]&&(i=0)),i;)try{if(r=1,a&&(o=2&l[0]?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,a=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],a=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}(this,function(o){switch(o.label){case 0:if(t.contains(e))return[2];if(!(e.nodeName.indexOf("-")>=0&&!j(e)))return[3,3];return[4,Promise.resolve()];case 1:return o.sent(),[4,customElements.whenDefined(e.nodeName.toLowerCase())];case 2:o.sent(),customElements.upgrade(e),o.label=3;case 3:if(j(e)&&r(e),!((a=N(e)).length>0))return[3,5];return[4,Promise.all(L(a).map(function(e){return X(e,t,r)}))];case 4:o.sent(),o.label=5;case 5:return[2]}})},(J=function(){var t=this,r=arguments;return new Promise(function(a,o){var n=e.apply(t,r);function i(e){K(n,a,o,i,l,"next",e)}function l(e){K(n,a,o,i,l,"throw",e)}i(void 0)})}).apply(this,arguments)}var $=p("theoplayer-play-button",F('<span part="play-icon"><slot name="play-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 90 90" width="24" height="24"><path d="M77.504 50.868c-7.236 5.156-16.584 10.914-28.04 17.269-11.044 6.207-20.729 11.081-29.053 14.625l-9.224 3.43c-.581-2.493-1.125-6.188-1.632-11.08-1.143-9.75-1.715-20.513-1.715-32.288 0-10.781.777-20.858 2.333-30.234l2.251-10.772 9.787 3.29c8.476 3.375 17.663 8.166 27.563 14.373 10.48 6.562 19.472 12.805 26.97 18.73 3.749 2.982 6.449 5.279 8.099 6.891l-7.339 5.766"/></svg>\n</slot></span><span part="pause-icon"><slot name="pause-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M2.108 1.914Q2.108.5 3.522.5h4.171q1.415 0 1.415 1.414v20.172q0 1.414-1.415 1.414H3.522q-1.414 0-1.414-1.414zm12.784 0Q14.892.5 16.307.5h4.171q1.414 0 1.414 1.414v20.172q0 1.414-1.414 1.414h-4.171q-1.415 0-1.415-1.414z"/></svg>\n</slot></span><span part="replay-icon"><slot name="replay-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M12 23q-3.725 0-6.438-2.375Q2.85 18.25 2.275 14.7q-.1-.625.325-1.088.425-.462 1.125-.462.6 0 1.087.437.488.438.663 1.113.5 2.225 2.313 3.688Q9.6 19.85 12 19.85q2.8 0 4.75-1.963 1.95-1.962 1.95-4.762t-1.962-4.75q-1.963-1.95-4.763-1.95H11.8l.525.525q.375.375.363.85-.013.475-.363.825t-.85.363q-.5.012-.85-.338l-2.7-2.7q-.225-.225-.337-.513-.113-.287-.113-.587t.113-.588q.112-.287.337-.512L10.6 1.075q.35-.35.875-.363.525-.012.875.363.35.35.338.85-.013.5-.363.85l-.5.5h.15q2.05 0 3.85.775 1.8.775 3.15 2.112Q20.325 7.5 21.1 9.287q.775 1.788.775 3.838t-.775 3.85q-.775 1.8-2.112 3.137-1.338 1.338-3.138 2.113Q14.05 23 12 23Z"/></svg>\n</slot></span>',":host(:not([ended])) [part=replay-icon],:host(:not([paused])) [part=play-icon],:host([ended]) [part=pause-icon],:host([ended]) [part=play-icon],:host([paused]) [part=pause-icon]{display:none!important}")),ee=["seeking","seeked","ended","emptied","sourcechange"],et=function(e){function t(){var t;return(t=e.call(this,{template:$()})||this)._onPlay=function(){t.paused=!1,t._updateEnded()},t._onPause=function(){t.paused=!0,t._updateEnded()},t._updateFromPlayer=function(){var e,r;t.paused=null==(r=null==(e=t._player)?void 0:e.paused)||r,t._updateEnded(),t._updateDisabled()},t._updateDisabled=function(){var e;t.disabled=(null==(e=t._player)?void 0:e.source)===void 0},t._upgradeProperty("paused"),t._upgradeProperty("ended"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},a._updateEnded=function(){var e,t;this.ended=null!=(t=null==(e=this._player)?void 0:e.ended)&&t},a.handleClick=function(){void 0!==this._player&&void 0!==this._player.source&&(this._player.paused?this._player.play():this._player.pause())},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel())},a._updateAriaLabel=function(){var e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(d.ARIA_LABEL,e)},k(t,[{key:"paused",get:function(){return this.hasAttribute(d.PAUSED)},set:function(e){O(this,d.PAUSED,e)}},{key:"ended",get:function(){return this.hasAttribute(d.ENDED)},set:function(e){O(this,d.ENDED,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener("play",this._onPlay),this._player.removeEventListener("pause",this._onPause),this._player.removeEventListener(ee,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(ee,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.PAUSED,d.ENDED])}}]),t}(Z(H,["player"]));customElements.define("theoplayer-play-button",et);var er=p("theoplayer-mute-button",F('<span part="off-icon"><slot name="off-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m19.225 22.55-2.25-2.275q-.175.1-.35.187-.175.088-.375.163-.525.2-1.075-.138-.55-.337-.55-1.062 0-.225.088-.425.087-.2.287-.325.05-.025.138-.088.087-.062.137-.087l-2.65-2.7v2.425q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5H3.525q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113.462-.462 1.112-.462H5.2L1.35 4.2Q1 3.85 1 3.375t.35-.825q.35-.35.85-.35t.85.35L20.9 20.9q.35.35.35.825t-.35.825q-.35.35-.838.35-.487 0-.837-.35ZM16.25 3.325q2.6 1.1 4.188 3.425 1.587 2.325 1.587 5.225 0 1.425-.4 2.7-.4 1.275-1.125 2.4L18.775 15.3q.425-.75.638-1.588.212-.837.212-1.737 0-2.125-1.175-3.875t-3.1-2.575q-.325-.125-.525-.4t-.2-.625q0-.65.525-1.038.525-.387 1.1-.137Zm.925 10.35-2.55-2.6V7.65q1.275.6 2.088 1.762.812 1.163.812 2.588 0 .45-.087.875-.088.425-.263.8ZM12.625 9l-3.45-3.575.775-.775q.75-.75 1.713-.338.962.413.962 1.463Z"/></svg>\n</slot></span><span part="low-icon"><slot name="low-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M3.55 15.85q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113Q2.9 8.15 3.55 8.15h2.925l3.5-3.5q.75-.75 1.713-.338.962.413.962 1.463v12.45q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5Zm11.1.45V7.65q1.3.625 2.088 1.8.787 1.175.787 2.55 0 1.375-.787 2.525-.788 1.15-2.088 1.775Z"/></svg>\n</slot></span><span part="high-icon"><slot name="high-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M16.275 20.625q-.575.25-1.1-.15-.525-.4-.525-1.05 0-.35.188-.613.187-.262.512-.387 1.925-.825 3.113-2.575 1.187-1.75 1.187-3.875T18.463 8.1q-1.188-1.75-3.113-2.575-.325-.125-.512-.4-.188-.275-.188-.625 0-.65.525-1.038.525-.387 1.1-.137 2.6 1.1 4.175 3.425 1.575 2.325 1.575 5.225 0 2.9-1.575 5.225-1.575 2.325-4.175 3.425ZM3.55 15.85q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113Q2.9 8.15 3.55 8.15h2.925l3.5-3.5q.75-.75 1.713-.338.962.413.962 1.463v12.45q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5Zm11.1.45V7.65q1.3.625 2.088 1.8.787 1.175.787 2.55 0 1.375-.787 2.525-.788 1.15-2.088 1.775Z"/></svg>\n</slot></span>',":host(:not([volume-level=high])) [part=high-icon],:host(:not([volume-level=low])) [part=low-icon],:host(:not([volume-level=off])) [part=off-icon]{display:none!important}")),ea=["volumechange"],eo=function(e){function t(){var t;return(t=e.call(this,{template:er()})||this)._updateFromPlayer=function(){var e="off";if(void 0!==t._player){var r=t._player.volume;e=t._player.muted?"off":r<.5?"low":"high"}t.setAttribute(d.VOLUME_LEVEL,e)},t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},a.handleClick=function(){void 0!==this._player&&(this._player.muted=!this._player.muted,this._updateFromPlayer())},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel())},a._updateAriaLabel=function(){var e="off"===this.getAttribute(d.VOLUME_LEVEL)?"unmute":"mute";this.setAttribute(d.ARIA_LABEL,e)},k(t,[{key:"volumeLevel",get:function(){return this.getAttribute(d.VOLUME_LEVEL)||"off"}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(ea,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(ea,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.VOLUME_LEVEL])}}]),t}(Z(H,["player"]));customElements.define("theoplayer-mute-button",eo);var en=p("theoplayer-seek-button",F('<span part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M12 22.25q-1.925 0-3.6-.738-1.675-.737-2.912-1.974Q4.25 18.3 3.525 16.625q-.725-1.675-.725-3.6 0-1.9.725-3.575.725-1.675 1.963-2.925 1.237-1.25 2.925-1.975Q10.1 3.825 12 3.825h.15l-.7-.7q-.3-.325-.313-.788-.012-.462.313-.812.35-.35.813-.35.462 0 .812.325l2.65 2.675q.325.325.325.8 0 .475-.325.8l-2.65 2.65q-.325.325-.8.325-.475 0-.825-.35-.3-.325-.3-.8 0-.475.3-.8l.7-.7H12q-2.9 0-4.912 2.012-2.013 2.013-2.013 4.913 0 2.9 2.013 4.925Q9.1 19.975 12 19.975q2.6 0 4.55-1.687 1.95-1.688 2.325-4.238.05-.45.4-.738.35-.287.8-.287.45 0 .788.275.337.275.287.7-.375 3.55-2.987 5.9Q15.55 22.25 12 22.25Z"/></svg>\n</slot></span><span part="offset"></span>',':host{position:relative}:host([seek-offset^="-"]) [part=icon]{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[part=offset]{color:#fff;color:var(--theoplayer-icon-color,#fff);font-size:7.2px;font-size:var(--theoplayer-seek-button-font-size,calc(var(--theoplayer-button-icon-height, var(--theoplayer-control-height, 24px))*.3));left:50%;position:absolute;top:52.5%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}')),ei=function(e){function t(){var t;return(t=e.call(this,{template:en()})||this)._offsetEl=t.shadowRoot.querySelector('[part="offset"]'),t._upgradeProperty("player"),t._upgradeProperty("seekOffset"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.handleClick=function(){if(void 0!==this._player){var e=this._player.duration;isNaN(e)||(this._player.currentTime=Math.max(0,Math.min(e,this._player.currentTime+this.seekOffset)))}},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===d.SEEK_OFFSET&&I(this._offsetEl,String(Math.abs(this.seekOffset))),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel()))},a._updateAriaLabel=function(){var e=this.seekOffset;this.setAttribute(d.ARIA_LABEL,e>=0?"seek forward by "+e+" seconds":"seek backward by "+-e+" seconds")},k(t,[{key:"seekOffset",get:function(){var e;return Number(null!=(e=this.getAttribute(d.SEEK_OFFSET))?e:10)},set:function(e){this.setAttribute(d.SEEK_OFFSET,String(e))}},{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.SEEK_OFFSET])}}]),t}(Z(H,["player"]));customElements.define("theoplayer-seek-button",ei);var el=":host{background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-text-color,#fff);display:inline-block;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));overflow:hidden;padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;text-align:center;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}";function es(e){return!isNaN(e)&&isFinite(e)}function eu(e,t,r){void 0===t&&(t=0);var a,o=e<0||r&&0===e,n=Math.floor(t/60%60),i=Math.floor(t/3600);if(es(e=Math.abs(e))){var l=Math.floor(e%60),s=Math.floor(e/60%60),u=Math.floor(e/3600),h=u>0||i>0;a=[h?""+u:"",(h||n>=0)&&s<10?"0"+s:""+s,l<10?"0"+l:""+l]}else a=[i>0?"--":"","--","--"];return(o?"-":"")+a.filter(function(e){return""!==e}).join(":")}var eh=[["hour","hours"],["minute","minutes"],["second","seconds"]];function ep(e,t){var r=eh[t][1===e?0:1];return e+" "+r}function ed(e,t){if(!es(e))return"";var r=e<0||t&&0===e,a=Math.floor((e=Math.abs(e))%60),o=Math.floor(e/60)%60,n=Math.floor(e/3600);return""+[0===n?"":ep(n,0),0===o?"":ep(o,1),0===a&&(n>0||o>0)?"":ep(a,2)].filter(function(e){return""!==e}).join(", ")+(r?" remaining":"")}var ec=p("theoplayer-time-display","<style>"+el+"</style><span></span>"),ey=["timeupdate","seeking","seeked","durationchange"],ev=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,o=t._player?t._player.currentTime:0,n=t._player?t._player.duration:NaN,i=null==(e=t._player)?void 0:e.seekable,l=isFinite(n)?n:i&&i.length>0?i.end(0):NaN,s=t.hasAttribute(d.REMAINING)||t.hasAttribute(d.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType,u=o;s&&(u=-((l||0)-o));var h=t.hasAttribute(d.SHOW_DURATION);r=h&&!s?eu(u,l,s)+" / "+eu(l):eu(u,l,s),a=isNaN(n)?"video not loaded, unknown time":h?ed(u,s)+" of "+ed(l):ed(u,s),I(t._spanEl,r),t.setAttribute("aria-valuetext",a)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ec().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(d.ARIA_LIVE)||this.setAttribute(d.ARIA_LIVE,"off"),this._updateFromPlayer()},a.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._updateFromPlayer(),h(this))},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(ey,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(ey,this._updateFromPlayer))}},{key:"streamType",get:function(){return this.getAttribute(d.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(d.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[d.REMAINING,d.REMAINING_WHEN_LIVE,d.SHOW_DURATION,d.STREAM_TYPE]}}]),t}(Z(HTMLElement,["player","streamType"]));customElements.define("theoplayer-time-display",ev);var ef=p("theoplayer-duration-display","<style>"+el+"</style><span></span>"),eb=["durationchange"],eg=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e=eu(t._player?t._player.duration:NaN);I(t._spanEl,e)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ef().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(d.ARIA_LIVE)||this.setAttribute(d.ARIA_LIVE,"off"),this._updateFromPlayer()},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(eb,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(eb,this._updateFromPlayer))}}]),t}(Z(HTMLElement,["player"]));function em(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e_(){return(e_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}customElements.define("theoplayer-duration-display",eg);var ek=!function(){try{var e=new Event("change");return"change"===e.type}catch(e){}return!1}()?function(e,t){var r=document.createEvent("Event");return r.initEvent(e,(null==t?void 0:t.bubbles)||!1,(null==t?void 0:t.cancelable)||!1),r}:function(e,t){return new Event(e,t)},ew=!function(){try{var e=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,(null==t?void 0:t.bubbles)||!1,(null==t?void 0:t.cancelable)||!1,null==t?void 0:t.detail),r}:function(e,t){return new CustomEvent(e,t)},ex=p("theoplayer-radio-button",F("<slot></slot>")),eE=function(e){function t(t){var r;return(r=e.call(this,e_({template:ex()},t))||this)._value=void 0,r._upgradeProperty("checked"),r}r(t,e);var a=t.prototype;return a.connectedCallback=function(){this.hasAttribute("role")||this.setAttribute("role","radio"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),e.prototype.connectedCallback.call(this)},a.handleClick=function(){this.checked=!0,this.dispatchEvent(ek("input",{bubbles:!0,composed:!0}))},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===d.ARIA_CHECKED?this.dispatchEvent(ek("change",{bubbles:!0})):r===d.VALUE&&(this.value=o),t.observedAttributes.indexOf(r)>=0&&h(this))},k(t,[{key:"checked",get:function(){return"true"===this.getAttribute(d.ARIA_CHECKED)},set:function(e){this.setAttribute(d.ARIA_CHECKED,e?"true":"false")}},{key:"value",get:function(){return this._value},set:function(e){this._value=e}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.ARIA_CHECKED,d.VALUE])}}]),t}(H);customElements.define("theoplayer-radio-button",eE);var eA=function(){function e(e,t,r,a){this.x=e,this.y=t,this.width=r,this.height=a}var t=e.prototype;return t.overlaps=function(e){return this.x<e.right&&this.right>e.x&&this.y<e.bottom&&this.bottom>e.y},t.contains=function(e){return this.x<=e.x&&e.right<=this.right&&this.y<=e.y&&e.bottom<=this.bottom},t.union=function(t){var r=Math.min(this.x,t.x),a=Math.min(this.y,t.y),o=Math.max(this.right,t.right)-r,n=Math.max(this.bottom,t.bottom)-a;return new e(r,a,o,n)},t.snapToPixels=function(){return new e(Math.round(this.x),Math.round(this.y),Math.round(this.width),Math.round(this.height))},t.clone=function(){return new e(this.x,this.y,this.width,this.height)},t.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,left:this.left,right:this.right,top:this.top,bottom:this.bottom}},e.fromRect=function(t){var r,a,o,n,i,l;return new e(null!=(a=null!=(r=t.left)?r:t.x)?a:0,null!=(n=null!=(o=t.top)?o:t.y)?n:0,null!=(i=t.width)?i:0,null!=(l=t.height)?l:0)},k(e,[{key:"left",get:function(){return this.x},set:function(e){this.x=e}},{key:"right",get:function(){return this.x+this.width},set:function(e){this.x=e-this.width}},{key:"top",get:function(){return this.y},set:function(e){this.y=e}},{key:"bottom",get:function(){return this.y+this.height},set:function(e){this.y=e-this.height}}]),e}();function eT(){var e=function(){var e,t,r=document.activeElement;if(null==r)return null;for(;null!=(t=null==(e=r.shadowRoot)?void 0:e.activeElement);)r=t;return r}();return e&&e!==document.body&&T(e)?e:null}function eC(e,t,r){var a,o,n,i=eT();if(null===i)return!1;var l=eA.fromRect(e.getBoundingClientRect()).snapToPixels(),s=eA.fromRect(i.getBoundingClientRect()).snapToPixels(),u=t.map(function(e){return{child:e,rect:eA.fromRect(e.getBoundingClientRect()).snapToPixels()}}).filter(function(e){return e.rect.width>0&&e.rect.height>0});if(r===c.LEFT||r===c.RIGHT){var h=s.clone();r===c.LEFT?(h.left=l.left,h.width=s.left-l.left):(h.left=s.right,h.width=l.right-s.right),0===(n=u.filter(function(e){return h.overlaps(e.rect)})).length&&(h.top=l.top,h.height=l.height,n=u.filter(function(e){return h.overlaps(e.rect)}))}else{var p=s.clone();r===c.UP?(p.top=l.top,p.height=s.top-l.top):(p.top=s.bottom,p.height=l.bottom-s.bottom),0===(n=u.filter(function(e){return p.overlaps(e.rect)})).length&&(p.left=l.left,p.width=l.width,n=u.filter(function(e){return p.overlaps(e.rect)}))}var d=(a=n,o=function(e){var t,r;return t=e.rect,r=0,t.right<s.left?r+=s.left-t.right:s.right<t.left&&(r+=t.left-s.right),t.bottom<s.top?r+=s.top-t.bottom:s.bottom<t.top&&(r+=t.top-s.bottom),r},function(e,t){if(0!==e.length)return e.reduce(function(e,r){return 0>=t(e,r)?e:r})}(a,function(e,t){return o(e)-o(t)}));return void 0!==d&&(d.child.focus(),!0)}var eL=p("theoplayer-radio-group","<slot></slot>"),eS=function(e){function t(){(t=e.call(this)||this)._radioButtons=[],t._onSlotChange=function(){for(var e,r,a=D(t._slot),o=[],n=l(a);!(r=n()).done;){var i=r.value;if(!eP(i)){var s=B(i);s&&o.push(s)}}o.length>0&&Promise.all(o).then(t._onSlotChange,E),t._radioButtons=a.filter(eP),t.focusedRadioButton||null==(e=t.firstRadioButton)||e.setAttribute("tabindex","0")},t._onKeyDown=function(e){if("tv"===t.deviceType&&V(e.keyCode)){eC(em(t),t._radioButtons,e.keyCode)&&(e.preventDefault(),e.stopPropagation());return}switch(e.keyCode){case c.UP:case c.LEFT:t._focusPrevButton()&&e.preventDefault();break;case c.DOWN:case c.RIGHT:t._focusNextButton()&&e.preventDefault();break;case c.HOME:e.preventDefault(),t.setFocusedRadioButton(t.firstRadioButton);break;case c.END:e.preventDefault(),t.setFocusedRadioButton(t.lastRadioButton)}},t._onButtonChange=function(e){var r=e.target;null!==r&&r.checked&&t.setCheckedRadioButton(e.target)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(eL().content.cloneNode(!0)),t._slot=r.querySelector("slot"),t._upgradeProperty("deviceType"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute("role")||this.setAttribute("role","radiogroup"),this.addEventListener("keydown",this._onKeyDown),this.shadowRoot.addEventListener("change",this._onButtonChange),this._slot.addEventListener("slotchange",this._onSlotChange),this._onSlotChange()},a.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.shadowRoot.removeEventListener("change",this._onButtonChange),this._slot.removeEventListener("slotchange",this._onSlotChange)},a.allRadioButtons=function(){return this._radioButtons},a._prevRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>0?this._radioButtons[t-1]:null},a._nextRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>=0&&t<this._radioButtons.length-1?this._radioButtons[t+1]:null},a._focusPrevButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;return!!e&&(e===this.firstRadioButton?this.setFocusedRadioButton(this.lastRadioButton):this.setFocusedRadioButton(this._prevRadioButton(e)),!0)},a._focusNextButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;return!!e&&(e===this.lastRadioButton?this.setFocusedRadioButton(this.firstRadioButton):this.setFocusedRadioButton(this._nextRadioButton(e)),!0)},a.setFocusedRadioButton=function(e){this._unfocusAll(),e&&(e.tabIndex=0,e.focus())},a._unfocusAll=function(){for(var e,t=l(this.allRadioButtons());!(e=t()).done;)e.value.tabIndex=-1},a.setCheckedRadioButton=function(e){for(var t,r=l(this.allRadioButtons());!(t=r()).done;){var a=t.value;a.checked=a===e}this.dispatchEvent(ek("change",{bubbles:!0}))},k(t,[{key:"deviceType",get:function(){return this.getAttribute(d.DEVICE_TYPE)||"desktop"},set:function(e){this.setAttribute(d.DEVICE_TYPE,e)}},{key:"focusedRadioButton",get:function(){var e;return null!=(e=S(this._radioButtons,function(e){return 0===e.tabIndex}))?e:null}},{key:"checkedRadioButton",get:function(){var e;return null!=(e=S(this._radioButtons,function(e){return e.checked}))?e:null}},{key:"firstRadioButton",get:function(){var e;return null!=(e=this._radioButtons[0])?e:null}},{key:"lastRadioButton",get:function(){var e=this._radioButtons;return e.length>0?e[e.length-1]:null}}]),t}(Z(HTMLElement,["deviceType"]));function eP(e){return e instanceof eE}customElements.define("theoplayer-radio-group",eS);var eR="theoplayermenuclose",eM="theoplayermenuchange";function eI(e,t,r){return void 0===r&&(r=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-menu-color,#fff);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);pointer-events:none}:host([hidden]){display:none!important}[part=heading]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-align:center;-ms-flex-align:center;align-items:center;align-self:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:auto}[part=heading] ::slotted(span),[part=heading]>span{padding:10px;padding:var(--theoplayer-control-padding,10px);padding-left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[part=content],[part=heading]>theoplayer-menu-close-button{pointer-events:auto}[part=content]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-item-align:center;-ms-grid-row-align:center;--theoplayer-control-hover-background:var(--theoplayer-menu-control-hover-background,hsla(0,0%,100%,.3));align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:10px;margin:var(--theoplayer-menu-margin,10px);max-height:100%;max-width:100%;max-width:var(--theoplayer-menu-max-width,100%);min-height:0;min-width:80%;min-width:var(--theoplayer-menu-min-width,80%);overflow-y:auto}"+r+'</style><div part="heading"><theoplayer-menu-close-button></theoplayer-menu-close-button>'+e+'</div><div part="content">'+t+"</div>"}var eO=p("theoplayer-menu",eI('<slot name="heading"></slot>',"<slot></slot>")),eN=function(e){function t(t){(r=e.call(this)||this)._onContentInput=function(){if(r.hasAttribute(d.MENU_CLOSE_ON_INPUT)){var e=ew(eR,{bubbles:!0,composed:!0});r.dispatchEvent(e)}};var r,a,o=null!=(a=null==t?void 0:t.template)?a:eO(),n=r.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(o.content.cloneNode(!0)),r._contentEl=n.querySelector('[part="content"]'),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(d.MENU_OPENED)||this.setAttribute("hidden",""),this._contentEl.addEventListener("input",this._onContentInput)},a.disconnectedCallback=function(){this._contentEl.removeEventListener("input",this._onContentInput)},a.openMenu=function(){this.setAttribute(d.MENU_OPENED,"")},a.closeMenu=function(){this.removeAttribute(d.MENU_OPENED)},a.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===d.MENU_OPENED){O(this,d.HIDDEN,null==a);var o=ew(eM,{bubbles:!0});this.dispatchEvent(o)}t.observedAttributes.indexOf(e)>=0&&h(this)}},k(t,[{key:"closeOnInput",get:function(){return this.hasAttribute(d.MENU_CLOSE_ON_INPUT)},set:function(e){O(this,d.MENU_CLOSE_ON_INPUT,e)}}],[{key:"observedAttributes",get:function(){return[d.MENU_OPENED,d.MENU_CLOSE_ON_INPUT]}}]),t}(n(HTMLElement));customElements.define("theoplayer-menu",eN);var eD="theoplayermenutoggle";function eq(e,t){return void 0===t&&(t=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;pointer-events:none}:host([hidden]){display:none!important}::slotted(*),:host>*{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;justify-self:stretch;min-height:0}"+t+"</style>"+e}var eB=p("theoplayer-menu-group",eq("<slot></slot>")),eF=function(e){function t(r){(a=e.call(this)||this)._menus=[],a._openMenuStack=[],a._onMenuListChange=function(){for(var e,t=[].concat(L(a.shadowRoot.children),a._menuSlot?D(a._menuSlot):[]),r=[],o=l(t);!(e=o()).done;){var n=e.value;if(!eU(n)){var i=B(n);i&&r.push(i)}}r.length>0&&Promise.all(r).then(a._onMenuListChange,E);for(var s,u=t.filter(eU),h=l(a._menus);!(s=h()).done;){var p=s.value;0>u.indexOf(p)&&a.closeMenu(p.id)}for(var d,c=l(u);!(d=c()).done;){var y=d.value;0>a._menus.indexOf(y)&&y.closeMenu()}a._menus=u},a._onToggleMenu=function(e){var t=e.detail.menu;if(a.getMenuById(t)){e.stopPropagation();var r=T(e.target)?e.target:void 0;a.isMenuOpen(t)?a.closeMenu(t):a.openMenu(t,r)}},a._onCloseMenu=function(e){a.closeCurrentMenu()&&(e.preventDefault(),e.stopPropagation())},a._onMenuChange=function(e){var r=a.getCurrentMenu_();r&&r.menu===e.target&&r.menu instanceof t&&!r.menu.hasCurrentMenu()&&a.closeCurrentMenu()},a._onKeyDown=function(e){!e.altKey&&z(e.keyCode)&&a.closeCurrentMenu()&&(e.preventDefault(),e.stopPropagation())};var a,o,n=null!=(o=null==r?void 0:r.template)?o:eB(),i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(n.content.cloneNode(!0)),a._menuSlot=i.querySelector("slot"),a}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){var e;u(this),this.hasAttribute(d.MENU_OPENED)||this.setAttribute("hidden",""),this._onMenuListChange(),this.shadowRoot.addEventListener(eD,this._onToggleMenu),this.shadowRoot.addEventListener(eR,this._onCloseMenu),this.shadowRoot.addEventListener(eM,this._onMenuChange),null==(e=this._menuSlot)||e.addEventListener("slotchange",this._onMenuListChange)},a.disconnectedCallback=function(){var e;this.shadowRoot.removeEventListener(eD,this._onToggleMenu),this.shadowRoot.removeEventListener(eR,this._onCloseMenu),this.shadowRoot.removeEventListener(eM,this._onMenuChange),null==(e=this._menuSlot)||e.removeEventListener("slotchange",this._onMenuListChange)},a.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===d.MENU_OPENED){null!=a?(this.removeAttribute("hidden"),this.removeEventListener("keydown",this._onKeyDown),this.addEventListener("keydown",this._onKeyDown)):(this.setAttribute("hidden",""),this.removeEventListener("keydown",this._onKeyDown));var o=ew(eM,{bubbles:!0});this.dispatchEvent(o)}t.observedAttributes.indexOf(e)>=0&&h(this)}},a.getMenuById=function(e){return e&&e!==this.id?S(this._menus,function(t){return t.id===e}):this},a.openMenu=function(e,t){var r=this.getMenuById(e);if(r===this&&(r=this._menus[0]),!r)return!1;var a=this.getCurrentMenu_(),o=P(this._openMenuStack,function(e){return e.menu===r});return o>=0?this.closeMenusFromIndex_(o+1):this._openMenuStack.push({menu:r,opener:t}),a&&a.menu.closeMenu(),r.openMenu(),this.setAttribute(d.MENU_OPENED,""),r.focus(),!0},a.closeMenu=function(e){var t,r,a=this.getMenuById(e);if(a===this&&(a=null==(r=this._openMenuStack[0])?void 0:r.menu),!a)return!1;var o=P(this._openMenuStack,function(e){return e.menu===a});if(o<0)return!1;var n=this._openMenuStack[o];this.closeMenusFromIndex_(o);var i=this.getCurrentMenu_();return void 0!==i?(i.menu.openMenu(),this.setAttribute(d.MENU_OPENED,""),n.opener&&i.menu.contains(n.opener)?n.opener.focus():i.menu.focus()):(this.removeAttribute(d.MENU_OPENED),null==(t=n.opener)||t.focus()),!0},a.closeMenusFromIndex_=function(e){for(var t=this._openMenuStack.length-e,r=this._openMenuStack.length-1;r>=e;r--)this._openMenuStack[r].menu.closeMenu();this._openMenuStack.splice(e,t)},a.hasCurrentMenu=function(){return this._openMenuStack.length>0},a.getCurrentMenu_=function(){return this._openMenuStack.length>0?this._openMenuStack[this._openMenuStack.length-1]:void 0},a.closeCurrentMenu=function(){var e=this.getCurrentMenu_();return void 0!==e&&(this.closeMenu(e.menu.id),!0)},a.isMenuOpen=function(e){var t=this.getMenuById(e);return!!t&&this._openMenuStack.some(function(e){return e.menu===t})},k(t,null,[{key:"observedAttributes",get:function(){return[d.MENU_OPENED]}}]),t}(n(HTMLElement));function eU(e){return!!T(e)&&(e instanceof eN||e instanceof eF)}customElements.define("theoplayer-menu-group",eF);var eH=p("theoplayer-menu-button",F("<slot></slot>")),eV=function(e){function t(t){var r;return(r=e.call(this,e_({template:eH()},t))||this)._upgradeProperty("menu"),r}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute("aria-haspopup")||this.setAttribute("aria-haspopup","true")},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t!==d.MENU||this.hasAttribute("aria-controls")&&this.getAttribute("aria-controls")!==r||this.setAttribute("aria-controls",a)},a.handleClick=function(){var e=this.menu;if(e){var t=ew(eD,{bubbles:!0,composed:!0,detail:{menu:e}});this.dispatchEvent(t)}},k(t,[{key:"menu",get:function(){return this.getAttribute(d.MENU)},set:function(e){e?this.setAttribute(d.MENU,e):this.removeAttribute(d.MENU)}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.MENU])}}]),t}(H);customElements.define("theoplayer-menu-button",eV);var ez=p("theoplayer-menu-close-button",F('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m10.525 19.275-6.375-6.35q-.175-.2-.262-.437Q3.8 12.25 3.8 12t.088-.488q.087-.237.262-.437l6.375-6.35q.375-.375.925-.388.55-.012.95.388.375.4.388.937.012.538-.363.938l-4.1 4.075H18.35q.55 0 .938.387.387.388.387.938 0 .55-.387.938-.388.387-.938.387H8.325l4.1 4.075q.35.375.363.925.012.55-.363.95-.4.4-.95.4-.55 0-.95-.4Z"/></svg>\n</slot></span>')),eG=function(e){function t(){return e.call(this,{template:ez()})}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(d.ARIA_LABEL)||this.setAttribute(d.ARIA_LABEL,"close menu")},a.handleClick=function(){var e=ew(eR,{bubbles:!0,composed:!0});this.dispatchEvent(e)},k(t,null,[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes)}}]),t}(H);customElements.define("theoplayer-menu-close-button",eG);var eQ=p("theoplayer-media-track-radio-button",F("<slot></slot>")),eY=["change","update"],eK=function(e){function t(){var t;return(t=e.call(this,{template:eQ()})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}r(t,e);var a=t.prototype;return a._updateFromTrack=function(){I(this._slotEl,this._track?function(e){var t=e.label;if(t)return t;var r=e.language;return r&&(M(r)||r)||""}(this._track):""),this.checked=!!this._track&&this._track.enabled},a._updateTrack=function(){this._track&&(this._track.enabled=this.checked)},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===d.ARIA_CHECKED&&r!==a&&this._updateTrack()},k(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(eY,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(eY,this._onTrackChange))}}]),t}(eE);customElements.define("theoplayer-media-track-radio-button",eK);var eW=":host,theoplayer-radio-group{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host([hidden]){display:none!important}",ej=p("theoplayer-text-track-radio-button",F("<slot></slot>")),eZ=["change","update"],eX=function(e){function t(){var t;return(t=e.call(this,{template:ej()})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}r(t,e);var a=t.prototype;return a._updateFromTrack=function(){I(this._slotEl,this._track?function(e){var t=e.label;if(t)return t;var r=e.language;return r&&(M(r)||r)||""}(this._track):""),this.checked=!!this._track&&"showing"===this._track.mode},a._updateTrack=function(){this._track&&(this._track.mode=this.checked?"showing":"disabled")},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===d.ARIA_CHECKED&&r!==a&&this._updateTrack()},k(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(eZ,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(eZ,this._onTrackChange))}}]),t}(eE);function eJ(e){return"subtitles"===e.kind||"captions"===e.kind}function e$(e){var t=null==e?void 0:e.targetQuality;return void 0===t||Array.isArray(t)||(t=[t]),t}function e0(e){return e?e.label&&""!==e.label?e.label:e.height?""+e.height+"p":e.bandwidth?function(e){if(e.bandwidth)return e.bandwidth>1e7?""+(e.bandwidth/1e6).toFixed(0)+"Mbps":e.bandwidth>1e6?""+(e.bandwidth/1e6).toFixed(1)+"Mbps":""+(e.bandwidth/1e3).toFixed(0)+"kbps"}(e):void 0:void 0}customElements.define("theoplayer-text-track-radio-button",eX);var e1=p("theoplayer-text-track-off-radio-button",F("<slot>Off</slot>")),e5=["change"],e2=function(e){function t(){var t;return(t=e.call(this,{template:e1()})||this)._trackList=void 0,t._onTrackChange=function(){t._updateFromTrackList()},t._upgradeProperty("trackList"),t}r(t,e);var a=t.prototype;return a._updateFromTrackList=function(){this.checked=!this._trackList||!this._trackList.filter(eJ).some(function(e){return"showing"===e.mode})},a._updateTrackList=function(){this._trackList&&this.checked&&function(e){for(var t,r=l(e);!(t=r()).done;){var a=t.value;eJ(a)&&"showing"===a.mode&&(a.mode="disabled")}}(this._trackList)},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===d.ARIA_CHECKED&&r!==a&&this._updateTrackList()},k(t,[{key:"trackList",get:function(){return this._trackList},set:function(e){this._trackList&&this._trackList.removeEventListener(e5,this._onTrackChange),this._trackList=e,this._updateFromTrackList(),e&&e.addEventListener(e5,this._onTrackChange)}}]),t}(eE);customElements.define("theoplayer-text-track-off-radio-button",e2);var e3=p("theoplayer-track-radio-group","<style>"+eW+"</style><theoplayer-radio-group></theoplayer-radio-group>"),e4=["addtrack","removetrack"],e8=function(e){function t(){(t=e.call(this)||this)._updateTracks=function(){var e=L(t._radioGroup.children),r=t._getTracks();void 0!==t._offButton&&(e=e.slice(1));for(var a,o=l(e);!(a=o()).done;){var n=a.value;(!n.track||0>r.indexOf(n.track))&&t._radioGroup.removeChild(n)}for(var i,s=l(r);!(i=s()).done;){var u=i.value;if(!function(e,t){for(var r=0;r<e.length;r++)if(e[r].track===t)return!0;return!1}(e,u)){var h=t._createTrackButton(u);t._radioGroup.appendChild(h)}}},t._onChange=function(){t.dispatchEvent(ek("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(e3().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("trackType"),t._upgradeProperty("showOffButton"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._updateOffButton(),this._updateTracks(),this.shadowRoot.addEventListener("change",this._onChange)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},a._getTracksList=function(){if(void 0!==this._player){var e=this.trackType;return"audio"===e?this._player.audioTracks:"video"===e?this._player.videoTracks:"subtitles"===e?this._player.textTracks:void 0}},a._updateTracksList=function(){var e=this._tracksList,t=this._getTracksList();e!==t&&(null==e||e.removeEventListener(e4,this._updateTracks),null==t||t.addEventListener(e4,this._updateTracks),this._tracksList=t,this._updateOffButton())},a._getTracks=function(){if(void 0===this._player)return[];var e=this.trackType;return"audio"===e?this._player.audioTracks:"video"===e?this._player.videoTracks:"subtitles"===e?this._player.textTracks.filter(eJ):[]},a._createTrackButton=function(e){if("subtitles"===this.trackType){var t=new eX;return t.track=e,t}var r=new eK;return r.track=e,r},a._updateOffButton=function(){"subtitles"===this.trackType&&this.showOffButton?(void 0===this._offButton&&(this._offButton=new e2,this._radioGroup.insertBefore(this._offButton,this._radioGroup.firstChild)),this._offButton.trackList=this._tracksList):void 0!==this._offButton&&(this._radioGroup.removeChild(this._offButton),this._offButton=void 0)},a.attributeChangedCallback=function(e,r,a){a!==r&&(e===d.TRACK_TYPE?(this._updateTracksList(),this._updateTracks()):e===d.SHOW_OFF&&(this._updateOffButton(),this._updateTracks()),t.observedAttributes.indexOf(e)>=0&&h(this))},k(t,[{key:"trackType",get:function(){return this.getAttribute(d.TRACK_TYPE)||"audio"},set:function(e){this.setAttribute(d.TRACK_TYPE,e||"audio")}},{key:"showOffButton",get:function(){return this.hasAttribute(d.SHOW_OFF)},set:function(e){O(this,d.SHOW_OFF,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(this._player=e,this._updateTracksList(),this._updateTracks())}}],[{key:"observedAttributes",get:function(){return[d.TRACK_TYPE,d.SHOW_OFF]}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-track-radio-group",e8);var e7=".theoplayer-menu-table{-ms-grid-columns:-webkit-max-content 1fr;-ms-grid-columns:max-content 1fr;-ms-grid-rows:auto auto;display:-ms-grid;display:grid;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr;grid-template-rows:auto auto}.theoplayer-menu-table>:first-child{-ms-grid-column:1;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(2){-ms-grid-column:2;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(3){-ms-grid-column:1;-ms-grid-row:2}.theoplayer-menu-table>:nth-child(4){-ms-grid-column:2;-ms-grid-row:2}.theoplayer-menu-table>*{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px)}.theoplayer-menu-table>span{display:block}";function e6(e){var t,r;return e?R(e,"rgb")?(t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i))?{r_:parseInt(t[1],10),g_:parseInt(t[2],10),b_:parseInt(t[3],10),a_:t[4]?parseFloat(t[4]):1}:null:R(e,"#")&&(r=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i))?{r_:parseInt(r[1],16),g_:parseInt(r[2],16),b_:parseInt(r[3],16),a_:1}:null:null}function e9(e){return"rgba("+e.r_+","+e.g_+","+e.b_+","+e.a_+")"}function te(e){return"rgb("+e.r_+","+e.g_+","+e.b_+")"}function tt(e,t){return{r_:e.r_,g_:e.g_,b_:e.b_,a_:t}}var tr=e6("#ffffff"),ta=e6("#000000"),to=[["White","rgb(255,255,255)"],["Yellow","rgb(255,255,0)"],["Green","rgb(0,255,0)"],["Cyan","rgb(0,255,255)"],["Blue","rgb(0,0,255)"],["Magenta","rgb(255,0,255)"],["Red","rgb(255,0,0)"],["Black","rgb(0,0,0)"]],tn=[["Monospace Serif",'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace'],["Proportional Serif",'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif'],["Monospace Sans",'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace'],["Proportional Sans",'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif']],ti=[["None","none"],["Drop shadow","dropshadow"],["Raised","raised"],["Depressed","depressed"],["Uniform","uniform"]],tl=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){if(void 0!==t._player){var e=t.property;switch(e){case"fontFamily":I(t._spanEl,function(e){if(!e)return"Default";var t=S(tn,function(t){return t[0],t[1]===e});return t?t[0]:"Custom"}(t._player.textTrackStyle.fontFamily));break;case"fontColor":case"backgroundColor":case"windowColor":I(t._spanEl,function(e){if(!e)return"Default";var t=e6(e);if(t){var r=te(t),a=S(to,function(e){return e[0],e[1]===r});if(a)return a[0]}return"Custom"}(t._player.textTrackStyle[e]));break;case"fontOpacity":I(t._spanEl,ts(t._player.textTrackStyle.fontColor));break;case"backgroundOpacity":I(t._spanEl,ts(t._player.textTrackStyle.backgroundColor));break;case"windowOpacity":I(t._spanEl,ts(t._player.textTrackStyle.windowColor));break;case"edgeStyle":I(t._spanEl,function(e){if(!e)return"Default";var t=S(ti,function(t){return t[0],t[1]===e});return t?t[0]:"Custom"}(t._player.textTrackStyle.edgeStyle));break;default:var r=t._player.textTrackStyle[e];I(t._spanEl,r||"Default")}}};var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("property"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this),this.hasAttribute(d.PROPERTY)||(this.property="fontColor")},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.attributeChangedCallback=function(e,r,a){a!==r&&(e===d.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&h(this))},k(t,[{key:"property",get:function(){return this.getAttribute(d.PROPERTY)},set:function(e){this.setAttribute(d.PROPERTY,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.textTrackStyle.removeEventListener("change",this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.textTrackStyle.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[d.PROPERTY]}}]),t}(Z(HTMLElement,["player"]));function ts(e){if(!e)return"Default";var t=e6(e);return t?""+100*t.a_+"%":"Custom"}customElements.define("theoplayer-text-track-style-display",tl);var tu=p("theoplayer-text-track-style-radio-group","<style>"+eW+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>"),th=function(e){function t(){(t=e.call(this)||this)._updateChecked=function(){for(var e,r=t._radioGroup.allRadioButtons(),a=l(r);!(e=a()).done;){var o=e.value;o.checked=o.value===t.value}},t._onChange=function(){var e=t._radioGroup.checkedRadioButton;null!==e&&t.value!==e.value&&(t.value=e.value)},t._updateFromPlayer=function(){if(void 0!==t._player)switch(t.property){case"fontColor":var e,r,a=t._player.textTrackStyle.fontColor;t.value=a?te(null!=(r=e6(a))?r:tr):"";break;case"backgroundColor":var o,n=t._player.textTrackStyle.backgroundColor;t.value=n?te(null!=(o=e6(n))?o:ta):"";break;case"windowColor":var i,l=t._player.textTrackStyle.windowColor;t.value=l?te(null!=(i=e6(l))?i:ta):"";break;case"fontOpacity":var s,u,h=t._player.textTrackStyle.fontColor;t.value=h?String((null!=(u=null==(s=e6(h))?void 0:s.a_)?u:1)*100):"";break;case"backgroundOpacity":var p,d,c=t._player.textTrackStyle.backgroundColor;t.value=c?String((null!=(d=null==(p=e6(c))?void 0:p.a_)?d:1)*100):"";break;case"windowOpacity":var y,v,f=t._player.textTrackStyle.windowColor;t.value=f?String((null!=(v=null==(y=e6(f))?void 0:y.a_)?v:1)*100):"";break;default:t.value=null!=(e=t._player.textTrackStyle[t.property])?e:""}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tu().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._upgradeProperty("property"),this._upgradeProperty("value"),this._upgradeProperty("player"),this.hasAttribute(d.PROPERTY)||(this.property="fontColor"),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a._updateToPlayer=function(){if(void 0!==this._player)switch(this.property){case"fontColor":this._player.textTrackStyle.fontColor=tp(this.value,this._player.textTrackStyle.fontColor,tr);break;case"backgroundColor":this._player.textTrackStyle.backgroundColor=tp(this.value,this._player.textTrackStyle.backgroundColor,ta);break;case"windowColor":this._player.textTrackStyle.windowColor=tp(this.value,this._player.textTrackStyle.windowColor,ta);break;case"fontOpacity":this._player.textTrackStyle.fontColor=td(this.value,this._player.textTrackStyle.fontColor,tr);break;case"backgroundOpacity":this._player.textTrackStyle.backgroundColor=td(this.value,this._player.textTrackStyle.backgroundColor,ta);break;case"windowOpacity":this._player.textTrackStyle.windowColor=td(this.value,this._player.textTrackStyle.windowColor,ta);break;default:this._player.textTrackStyle[this.property]=""==this.value?void 0:this.value}},a.attributeChangedCallback=function(e,r,a){a!==r&&(e===d.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&h(this))},k(t,[{key:"property",get:function(){return this.getAttribute(d.PROPERTY)},set:function(e){this.setAttribute(d.PROPERTY,e)}},{key:"value",get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this._updateToPlayer(),this._updateChecked(),this.dispatchEvent(ek("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.textTrackStyle.removeEventListener("change",this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.textTrackStyle.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[d.PROPERTY]}}]),t}(Z(HTMLElement,["player"]));function tp(e,t,r){var a,o,n,i=null!=(o=null==(a=e6(t))?void 0:a.a_)?o:1;if(""!==e||1!==i)return e9(tt(null!=(n=e6(e))?n:r,i))}function td(e,t,r){var a,o=null!=(a=e6(t))?a:r;if(""!==e||o.r_!==r.r_||o.g_!==r.g_||o.b_!==r.b_)return e9(tt(o,""==e?1:Number(e)/100))}customElements.define("theoplayer-text-track-style-radio-group",th);var tc=p("theoplayer-text-track-style-menu",eq('<theoplayer-menu class="theoplayer-text-track-style-menu"><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Subtitle options</slot></span><theoplayer-text-track-style-reset-button class="theoplayer-menu-heading-button" slot="heading"></theoplayer-text-track-style-reset-button><div class="theoplayer-menu-table"><span>Font family</span><theoplayer-menu-button menu="font-family-menu"><theoplayer-text-track-style-display property="fontFamily"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font color</span><theoplayer-menu-button menu="font-color-menu"><theoplayer-text-track-style-display property="fontColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font opacity</span><theoplayer-menu-button menu="font-opacity-menu"><theoplayer-text-track-style-display property="fontOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font size</span><theoplayer-menu-button menu="font-size-menu"><theoplayer-text-track-style-display property="fontSize"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background color</span><theoplayer-menu-button menu="background-color-menu"><theoplayer-text-track-style-display property="backgroundColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background opacity</span><theoplayer-menu-button menu="background-opacity-menu"><theoplayer-text-track-style-display property="backgroundOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window color</span><theoplayer-menu-button menu="window-color-menu"><theoplayer-text-track-style-display property="windowColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window opacity</span><theoplayer-menu-button menu="window-opacity-menu"><theoplayer-text-track-style-display property="windowOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Character edge style</span><theoplayer-menu-button menu="edge-style-menu"><theoplayer-text-track-style-display property="edgeStyle"></theoplayer-text-track-style-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="font-family-menu" menu-close-on-input hidden><span slot="heading">Font family</span><theoplayer-text-track-style-radio-group property="fontFamily"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value=\'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace\'>Monospace Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif\'>Proportional Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace\'>Monospace Sans</theoplayer-radio-button><theoplayer-radio-button value=\'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif\'>Proportional Sans</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-color-menu" menu-close-on-input hidden><span slot="heading">Font color</span><theoplayer-text-track-style-radio-group property="fontColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-opacity-menu" menu-close-on-input hidden><span slot="heading">Font opacity</span><theoplayer-text-track-style-radio-group property="fontOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-size-menu" menu-close-on-input hidden><span slot="heading">Font size</span><theoplayer-text-track-style-radio-group property="fontSize"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="50%">50%</theoplayer-radio-button><theoplayer-radio-button value="75%">75%</theoplayer-radio-button><theoplayer-radio-button value="100%">100%</theoplayer-radio-button><theoplayer-radio-button value="150%">150%</theoplayer-radio-button><theoplayer-radio-button value="200%">200%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-color-menu" menu-close-on-input hidden><span slot="heading">Background color</span><theoplayer-text-track-style-radio-group property="backgroundColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-opacity-menu" menu-close-on-input hidden><span slot="heading">Background opacity</span><theoplayer-text-track-style-radio-group property="backgroundOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-color-menu" menu-close-on-input hidden><span slot="heading">Window color</span><theoplayer-text-track-style-radio-group property="windowColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-opacity-menu" menu-close-on-input hidden><span slot="heading">Window opacity</span><theoplayer-text-track-style-radio-group property="windowOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="edge-style-menu" menu-close-on-input hidden><span slot="heading">Character edge style</span><theoplayer-text-track-style-radio-group property="edgeStyle"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="none">None</theoplayer-radio-button><theoplayer-radio-button value="dropshadow">Drop shadow</theoplayer-radio-button><theoplayer-radio-button value="raised">Raised</theoplayer-radio-button><theoplayer-radio-button value="depressed">Depressed</theoplayer-radio-button><theoplayer-radio-button value="uniform">Uniform</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu>',e7+"\n.theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}")),ty=function(e){function t(){return e.call(this,{template:tc()})}return r(t,e),t}(eF);customElements.define("theoplayer-text-track-style-menu",ty);var tv=p("theoplayer-language-menu",eq('<theoplayer-menu><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Language</slot></span><theoplayer-settings-menu-button class="theoplayer-menu-heading-button" menu="subtitle-options-menu" slot="heading"></theoplayer-settings-menu-button><div part="content"><div part="audio"><h2>Audio</h2><theoplayer-track-radio-group track-type="audio"></theoplayer-track-radio-group></div><div part="subtitles"><h2>Subtitles</h2><theoplayer-track-radio-group track-type="subtitles" show-off></theoplayer-track-radio-group></div></div></theoplayer-menu><theoplayer-text-track-style-menu id="subtitle-options-menu"></theoplayer-text-track-style-menu>',".theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}[part=audio],[part=subtitles],theoplayer-track-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:0}[part=content]{-ms-grid-columns:1fr;display:-ms-grid;display:grid;grid-template-columns:1fr;min-height:0}:host([has-audio][has-subtitles]) [part=content]{-ms-grid-columns:1fr 10px 1fr;grid-template-columns:1fr 10px 1fr}:host([has-audio][has-subtitles]) [part=audio]{-ms-grid-column:1;grid-column:1}:host([has-audio][has-subtitles]) [part=subtitles]{-ms-grid-column:3;grid-column:3}:host(:not([has-audio])) [part=audio],:host(:not([has-subtitles])) [part=subtitles]{display:none!important}[part=audio],[part=subtitles]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;align-self:stretch;-ms-flex-direction:column;flex-direction:column;text-align:center}h2{margin:0 0 .5em}theoplayer-track-radio-group{overflow-y:auto}")),tf=["addtrack","removetrack"],tb=function(e){function t(){var t;return(t=e.call(this,{template:tv()})||this)._updateAudioTracks=function(){var e,r,a=null!=(r=null==(e=t._player)?void 0:e.audioTracks)?r:[];O(em(t),d.HAS_AUDIO,a.length>1)},t._updateTextTracks=function(){var e,r,a=null!=(r=null==(e=t._player)?void 0:e.textTracks.filter(eJ))?r:[];O(em(t),d.HAS_SUBTITLES,a.length>0)},t._upgradeProperty("player"),t}return r(t,e),t.prototype.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&h(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(tf,this._updateAudioTracks),this._player.textTracks.removeEventListener(tf,this._updateTextTracks)),this._player=e,this._updateAudioTracks(),this._updateTextTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(tf,this._updateAudioTracks),this._player.textTracks.addEventListener(tf,this._updateTextTracks)))}}],[{key:"observedAttributes",get:function(){return[].concat(eF.observedAttributes,[d.HAS_AUDIO,d.HAS_SUBTITLES])}}]),t}(Z(eF,["player"]));customElements.define("theoplayer-language-menu",tb);var tg=p("theoplayer-language-menu-button",F('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.469 15.446a6.892 6.892 310 1 0-4.772 3.342l2.872.986q1.9.626 1.9-1.374v-2.954l2.598 1.5V22q0 2-1.899 1.374l-4.95-1.632a9.892 9.892 310 1 1 6.849-4.796zM7 10a1 1 180 1 0 0 2 1 1 180 1 0 0-2zm4 0a1 1 180 1 0 0 2h5a1 1 180 1 0 0-2zm-3 4a1 1 180 1 0 0 2h3a1 1 180 1 0 0-2zm7 0a1 1 180 1 0 0 2 1 1 180 1 0 0-2z"/></svg>\n</slot></span>')),tm=["addtrack","removetrack"],t_=function(e){function t(){var t;return(t=e.call(this,{template:tg()})||this)._updateTracks=function(){var e=void 0!==t._player&&(t._player.audioTracks.length>=2||t._player.textTracks.some(eJ));O(em(t),d.HIDDEN,!e)},t._upgradeProperty("player"),t}return r(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(d.ARIA_LABEL)||this.setAttribute(d.ARIA_LABEL,"open language menu")},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(tm,this._updateTracks),this._player.textTracks.removeEventListener(tm,this._updateTracks)),this._player=e,this._updateTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(tm,this._updateTracks),this._player.textTracks.addEventListener(tm,this._updateTracks)))}}]),t}(Z(eV,["player"]));customElements.define("theoplayer-language-menu-button",t_);var tk=p("theoplayer-playback-rate-radio-group","<style>"+eW+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>"),tw=function(e){function t(){(t=e.call(this)||this)._value=1,t._updateChecked=function(){for(var e,r=t._radioGroup.allRadioButtons(),a=l(r);!(e=a()).done;){var o=e.value;o.checked=Number(o.value)===t.value}},t._onChange=function(){var e=t._radioGroup.checkedRadioButton;null!==e&&t.value!==Number(e.value)&&(t.value=e.value)},t._updateFromPlayer=function(){void 0!==t._player&&(t.value=t._player.playbackRate)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tk().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t._upgradeProperty("value"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},k(t,[{key:"value",get:function(){return this._value},set:function(e){e=Number(e),this._value!==e&&(this._value=e,void 0!==this._player&&(this._player.playbackRate=e),this._updateChecked(),this.dispatchEvent(ek("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener("ratechange",this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("ratechange",this._updateFromPlayer))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-playback-rate-radio-group",tw);var tx=p("theoplayer-playback-rate-button",F('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 96 960 960" height="24" width="24"><path d="M418 716q24 24 61.435 23.5T536 712l171.826-250.174q12.392-19.087-1.652-32.283-14.044-13.195-33.131-.804L424 600q-27 19.13-28.5 55.565T418 716ZM204 915.218q-25.522 0-49.609-12.826-24.087-12.826-36.783-34.783-26.565-46.696-41.696-100.022Q60.782 714.261 60.782 656q0-86.391 32.913-162.566 32.913-76.174 89.956-133.217 57.044-57.044 133.436-90.24Q393.478 236.782 480 236.782q43.87 0 85.87 8.934 42 8.935 81 26.239 28.913 12.696 33.826 38.762 4.913 26.065-13.044 48.153-10.261 12.391-28.217 15.521-17.957 3.131-32.914-3.565-31.434-14.869-62.043-21.456-30.608-6.587-64.478-6.587-129.043 0-221.13 91.522Q166.783 525.826 166.783 656q0 42 10.935 79.891 10.934 37.891 30.804 73.326h542.956q23-38 32.37-75.608Q793.217 696 793.217 652q0-31.609-6.804-62.565-6.804-30.956-20.543-60.826-7.566-16.957-3.718-35.196 3.848-18.239 17.674-29.5 21.653-18.522 47.153-10.261t36.761 35.609q16.305 38 25.457 78.217 9.152 40.218 10.021 82.522 0 58.696-14.348 113.522-14.347 54.826-42.478 104.087-14.391 23.087-37.631 35.348-23.239 12.261-48.761 12.261H204ZM480 576Z"/></svg>\n</slot></span>')),tE=function(e){function t(){return e.call(this,{template:tx()})}return r(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(d.ARIA_LABEL)||this.setAttribute(d.ARIA_LABEL,"open playback speed menu")},t}(eV);customElements.define("theoplayer-playback-rate-menu-button",tE);var tA=p("theoplayer-playback-rate-menu",eI('<span slot="heading"><slot name="heading">Playback speed</slot></span>','<theoplayer-playback-rate-radio-group><theoplayer-radio-button value="0.25">0.25x</theoplayer-radio-button><theoplayer-radio-button value="0.5">0.5x</theoplayer-radio-button><theoplayer-radio-button value="1">Normal</theoplayer-radio-button><theoplayer-radio-button value="1.25">1.25x</theoplayer-radio-button><theoplayer-radio-button value="1.5">1.5x</theoplayer-radio-button><theoplayer-radio-button value="2">2x</theoplayer-radio-button></theoplayer-playback-rate-radio-group>')),tT=function(e){function t(){return e.call(this,{template:tA()})}return r(t,e),t}(eN);customElements.define("theoplayer-playback-rate-menu",tT);var tC=function(e){function t(){(t=e.call(this)||this)._playbackRate=1;var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("playbackRate"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this)},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},k(t,[{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){this._playbackRate=e,I(this._spanEl,1===e?"Normal":""+e+"x")}}]),t}(Z(HTMLElement,["playbackRate"]));customElements.define("theoplayer-playback-rate-display",tC);var tL=function(e){function t(){(t=e.call(this)||this)._activeVideoQuality=void 0,t._targetVideoQualities=void 0;var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("activeVideoQuality"),t._upgradeProperty("targetVideoQualities"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this)},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.update_=function(){var e,t=void 0!==this._targetVideoQualities&&1===this._targetVideoQualities.length,r=t?this._targetVideoQualities[0]:void 0,a=e0(null!=r?r:this._activeVideoQuality);e=t?null!=a?a:"Unknown":"Automatic"+(a?" ("+a+")":""),I(this._spanEl,e)},k(t,[{key:"activeVideoQuality",get:function(){return this._activeVideoQuality},set:function(e){this._activeVideoQuality=e,this.update_()}},{key:"targetVideoQualities",get:function(){return this._targetVideoQualities},set:function(e){this._targetVideoQualities=e,this.update_()}}]),t}(Z(HTMLElement,["activeVideoQuality","targetVideoQualities"]));customElements.define("theoplayer-active-quality-display",tL);var tS=p("theoplayer-quality-radio-button",F("<slot></slot>")),tP=["activequalitychanged","targetqualitychanged"],tR=["update"],tM=function(e){function t(){var t;return(t=e.call(this,{template:tS()})||this)._track=void 0,t._quality=void 0,t._updateFromTrack=function(){if(void 0!==t._track){var e=t._track.targetQuality;Array.isArray(e)&&(e=1===e.length?e[0]:void 0),void 0===t._quality?t.checked=void 0===e:t.checked=e===t._quality}t._updateFromQuality()},t._updateFromQuality=function(){var e;I(t._slotEl,null!=(e=e0(t._quality))?e:"Automatic")},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t._upgradeProperty("quality"),t}r(t,e);var a=t.prototype;return a._updateTargetQuality=function(){this._track&&this.checked&&(this._track.targetQuality=this._quality)},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===d.ARIA_CHECKED&&this._updateTargetQuality(),t.observedAttributes.indexOf(r)>=0&&h(this))},k(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(tP,this._updateFromTrack),this._track=e,this._updateFromTrack(),e&&e.addEventListener(tP,this._updateFromTrack))}},{key:"quality",get:function(){return this._quality},set:function(e){this._quality!==e&&(this._quality&&this._quality.removeEventListener(tR,this._updateFromQuality),this._quality=e,this._updateFromTrack(),e&&e.addEventListener(tR,this._updateFromQuality))}}]),t}(eE);customElements.define("theoplayer-quality-radio-button",tM);var tI=p("theoplayer-quality-radio-group","<style>"+eW+"</style><theoplayer-radio-group></theoplayer-radio-group>"),tO=["addtrack","removetrack","change"],tN=function(e){function t(){(t=e.call(this)||this)._onChange=function(){t.dispatchEvent(ek("change",{bubbles:!0}))},t._updateTrack=function(){var e=t._player?S(t._player.videoTracks,function(e){return e.enabled}):void 0;t._track!==e&&(t._track=e,t._update())},t._update=function(){for(var e=L(t._radioGroup.children),r=t._track?t._track.qualities:[],a=1===r.length?[void 0]:[].concat([void 0],r),o=0;o<e.length&&o<a.length;){var n=e[o];n.track=t._track,n.quality=a[o],o++}for(;o<e.length;)t._radioGroup.removeChild(e[o]),o++;for(;o<a.length;){var i=new tM;i.track=t._track,i.quality=a[o],t._radioGroup.appendChild(i),o++}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tI().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._updateTrack(),this.shadowRoot.addEventListener("change",this._onChange)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.videoTracks.removeEventListener(tO,this._updateTrack),this._player=e,this._updateTrack(),void 0!==this._player&&this._player.videoTracks.addEventListener(tO,this._updateTrack))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-quality-radio-group",tN);var tD=p("theoplayer-text-track-style-reset-button",F("<slot>Reset</slot>")),tq=function(e){function t(){return e.call(this,{template:tD()})}return r(t,e),t.prototype.handleClick=function(){if(void 0!==this._player){var e=this._player.textTrackStyle;e.fontFamily=void 0,e.fontColor=void 0,e.fontSize=void 0,e.backgroundColor=void 0,e.windowColor=void 0,e.edgeStyle=void 0}},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes)}}]),t}(Z(H,["player"]));customElements.define("theoplayer-text-track-style-reset-button",tq);var tB=p("theoplayer-settings-menu",eq('<theoplayer-menu><span slot="heading"><slot name="heading">Settings</slot></span><div class="theoplayer-menu-table"><span>Quality</span><theoplayer-menu-button menu="quality-menu"><theoplayer-active-quality-display></theoplayer-active-quality-display></theoplayer-menu-button><span>Playback speed</span><theoplayer-menu-button menu="playback-rate-menu"><theoplayer-playback-rate-display></theoplayer-playback-rate-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="quality-menu" menu-close-on-input hidden><span slot="heading">Quality</span><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-playback-rate-menu id="playback-rate-menu" menu-close-on-input hidden><span slot="heading">Playback speed</span></theoplayer-playback-rate-menu>',e7)),tF=function(e){function t(){return e.call(this,{template:tB()})}return r(t,e),t}(eF);customElements.define("theoplayer-settings-menu",tF);var tU='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M14 22.475h-4q-.475 0-.863-.337-.387-.338-.437-.813l-.3-2.2q-.2-.075-.4-.2t-.375-.25l-2.05.85q-.475.2-.937.05-.463-.15-.738-.6l-1.975-3.45q-.25-.45-.162-.95.087-.5.487-.775l1.775-1.35Q4 12.325 4 12.225v-.45q0-.1.025-.225L2.25 10.2q-.4-.3-.487-.8-.088-.5.162-.925L3.9 5.025q.25-.45.725-.588.475-.137.95.038l2.075.875q.175-.15.363-.263.187-.112.387-.187l.3-2.225q.05-.5.425-.825.375-.325.875-.325h4q.5 0 .875.325t.425.825l.3 2.225q.2.075.4.187.2.113.375.263l2.05-.875q.475-.175.938-.025.462.15.737.575l2 3.45q.25.45.15.95-.1.5-.5.775l-1.775 1.35v.675q0 .1-.025.225l1.775 1.35q.4.275.487.775.088.5-.162.95l-2 3.45q-.25.425-.725.587-.475.163-.95-.037l-2.025-.85q-.175.125-.362.25-.188.125-.388.2l-.3 2.2q-.05.475-.425.813-.375.337-.875.337ZM12 15.5q1.45 0 2.475-1.025Q15.5 13.45 15.5 12q0-1.45-1.025-2.475Q13.45 8.5 12 8.5q-1.45 0-2.475 1.025Q8.5 10.55 8.5 12q0 1.45 1.025 2.475Q10.55 15.5 12 15.5Z"/></svg>\n',tH=p("theoplayer-settings-menu-button",F('<span part="icon"><slot>'+tU+"</slot></span>")),tV=function(e){function t(){return e.call(this,{template:tH()})}return r(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(d.ARIA_LABEL)||this.setAttribute(d.ARIA_LABEL,"open settings menu")},t}(eV);customElements.define("theoplayer-settings-menu-button",tV);var tz="theoplayerfullscreenenter",tG="theoplayerfullscreenexit",tQ=p("theoplayer-fullscreen-button",F('<span part="enter-icon"><slot name="enter-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M5.9 19.225q-.475 0-.8-.325-.325-.325-.325-.8V15q0-.475.325-.812.325-.338.8-.338.5 0 .825.338.325.337.325.812v1.95H9q.475 0 .812.325.338.325.338.825 0 .475-.338.8-.337.325-.812.325Zm0-9.075q-.475 0-.8-.338-.325-.337-.325-.812V5.9q0-.475.325-.8.325-.325.8-.325H9q.475 0 .812.325.338.325.338.8 0 .5-.338.825-.337.325-.812.325H7.05V9q0 .475-.325.812-.325.338-.825.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8 0-.5.338-.825.337-.325.812-.325h1.95V15q0-.475.325-.812.325-.338.825-.338.475 0 .8.338.325.337.325.812v3.1q0 .475-.325.8-.325.325-.8.325Zm3.1-9.075q-.5 0-.825-.338-.325-.337-.325-.812V7.05H15q-.475 0-.812-.325-.338-.325-.338-.825 0-.475.338-.8.337-.325.812-.325h3.1q.475 0 .8.325.325.325.325.8V9q0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span><span part="exit-icon"><slot name="exit-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M9 19.225q-.475 0-.812-.325-.338-.325-.338-.8v-1.95H5.9q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.812.325-.338.8-.338H9q.475 0 .812.338.338.337.338.812v3.1q0 .475-.338.8-.337.325-.812.325ZM5.9 10.15q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.813.325-.337.8-.337h1.95V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .812.325.338.325.338.8V9q0 .475-.338.812-.337.338-.812.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8V15q0-.475.338-.812.337-.338.812-.338h3.1q.475 0 .8.338.325.337.325.812 0 .475-.325.812-.325.338-.8.338h-1.95v1.95q0 .475-.337.8-.338.325-.813.325Zm0-9.075q-.475 0-.812-.338-.338-.337-.338-.812V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .813.325.337.325.337.8v1.95h1.95q.475 0 .8.337.325.338.325.813 0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span>',":host(:not([fullscreen])) [part=exit-icon],:host([fullscreen]) [part=enter-icon]{display:none!important}")),tY=function(e){function t(){var t;return(t=e.call(this,{template:tQ()})||this)._upgradeProperty("fullscreen"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.handleClick=function(){if(this.fullscreen){var e=ew(tG,{bubbles:!0,composed:!0});this.dispatchEvent(e)}else{var t=ew(tz,{bubbles:!0,composed:!0});this.dispatchEvent(t)}},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel())},a._updateAriaLabel=function(){var e=this.fullscreen?"exit fullscreen":"enter fullscreen";this.setAttribute(d.ARIA_LABEL,e)},k(t,[{key:"fullscreen",get:function(){return this.hasAttribute(d.FULLSCREEN)},set:function(e){O(this,d.FULLSCREEN,e)}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.FULLSCREEN])}}]),t}(Z(H,["fullscreen"]));customElements.define("theoplayer-fullscreen-button",tY);var tK=function(){function e(){this._stops=[["transparent",100]]}var t=e.prototype;return t.add=function(e,t,r){if(!((t=Math.max(t,0))>=(r=Math.min(r,100)))){var a=P(this._stops,function(e){var r=e[1];return t<=r});if(!(a<0)){var o=this._stops[a],n=o[0],i=o[1],l=[];if(t>0&&l.push([n,t]),l.push([e,r]),r<i)l.push([n,i]),(s=this._stops).splice.apply(s,[].concat([a,1],l));else{for(var s,u,h=a+1;h<this._stops.length&&!(r<this._stops[h][1]);)h++;(u=this._stops).splice.apply(u,[].concat([a,h-a],l))}}}},t.toGradientStops=function(){for(var e,t=[],r=0,a=l(this._stops);!(e=a()).done;){var o=e.value,n=o[0],i=o[1];i<r||(t.push(n+" "+r+"%"),t.push(n+" "+i+"%"),r=i)}return t.join(", ")},e}();function tW(e,t){return void 0===t&&(t=""),"<style>:host{--thumb-height:var(--theoplayer-range-thumb-height,10px);--track-height:var(--theoplayer-range-track-height,4px);--theoplayer-range-padding:var(--theoplayer-control-padding,10px);background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;font-size:0;height:44px;height:calc(var(--theoplayer-control-height, 24px) + var(--theoplayer-range-padding)*2);padding-left:10px;padding-left:var(--theoplayer-range-padding-left,var(--theoplayer-range-padding));padding-right:10px;padding-right:var(--theoplayer-range-padding-right,var(--theoplayer-range-padding));pointer-events:auto;position:relative;-webkit-transition:background .15s linear;transition:background .15s linear;vertical-align:middle;width:100px}:host([hidden]){display:none!important}:host(:hover:not([disabled])){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}[part=container]{height:100%;position:relative}[part=background],[part=pointer]{border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);height:var(--track-height);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%));transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%))}[part=background]{background:hsla(0,0%,100%,.2);background:var(--theoplayer-range-track-background,hsla(0,0%,100%,.2));min-width:40px;width:100%;width:var(--theoplayer-range-track-width,100%)}[part=pointer]{background:transparent;background:var(--theoplayer-range-track-pointer-background,transparent);border-right:none;border-right:var(--theoplayer-range-track-pointer-border-right,none);opacity:0;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden}:host(:hover:not([disabled])) [part=pointer]{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}input[type=range]{-webkit-appearance:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;min-height:100%;padding:0;position:relative;width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);-webkit-box-shadow:1px 1px 1px transparent;box-shadow:1px 1px 1px transparent;-webkit-box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);margin-top:calc(0px - var(--thumb-height)/2 + var(--track-height)/2);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);-webkit-transform:none;transform:none;-webkit-transform:var(--theoplayer-range-thumb-transform,none);transform:var(--theoplayer-range-thumb-transform,none);-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-moz-range-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);translate:0 0;translate:var(--theoplayer-range-track-translate-x,0) var(--theoplayer-range-track-translate-y,0);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-ms-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}:host([disabled]) input[type=range]::-webkit-slider-thumb{display:none}:host([disabled]) input[type=range]::-moz-range-thumb{display:none}:host([disabled]) input[type=range]::-ms-thumb{display:none}input[type=range]::-webkit-slider-runnable-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-range-track-box-shadow,none);box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);-webkit-transform:translate(0);transform:translate(0);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-moz-range-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-track{background:transparent;background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);color:transparent;cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper,input[type=range]::-ms-tooltip{display:none}:host([disabled]) input[type=range]::-webkit-slider-runnable-track{cursor:default}:host([disabled]) input[type=range]::-moz-range-track{cursor:default}:host([disabled]) input[type=range]::-ms-track{cursor:default}input[type=range]:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}input[type=range]:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}input[type=range]:focus::-webkit-slider-runnable-track{outline:0}\n"+t+'</style><div part="container"><div part="background"></div><div part="pointer"></div>'+e+"</div>"}var tj=function(e){function t(t){(r=e.call(this)||this)._lastRangeWidth=0,r._onInput=function(){r.handleInput()},r._updatePointerBar=function(e){if(!r.disabled){var t=r._rangeEl.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a)),r.updatePointer_(a,t)}},r._onKeyDown=function(e){r.handleKeyDown_(e)};var r,a=r.attachShadow({mode:"open"});return a.appendChild(t.template.content.cloneNode(!0)),r._rangeEl=a.querySelector('input[type="range"]'),r._rangeEl.addEventListener("input",r._onInput),r._rangeEl.addEventListener("change",r._onInput),r._rangeEl.addEventListener("keydown",r._onKeyDown),r._pointerEl=a.querySelector('[part="pointer"]'),r._upgradeProperty("disabled"),r._upgradeProperty("value"),r._upgradeProperty("min"),r._upgradeProperty("max"),r._upgradeProperty("step"),r._upgradeProperty("deviceType"),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._rangeEl.setAttribute(d.ARIA_LABEL,this.getAriaLabel()),this.update(),this.addEventListener("pointermove",this._updatePointerBar)},a.disconnectedCallback=function(){this.removeEventListener("pointermove",this._updatePointerBar)},a.attributeChangedCallback=function(e,r,a){if(a!==r){var o=null!=a;e===d.DISABLED?(this.setAttribute("aria-disabled",o?"true":"false"),O(this._rangeEl,d.DISABLED,o)):e!==d.HIDDEN||o||this.update(),t.observedAttributes.indexOf(e)>=0&&h(this)}},a.handleInput=function(){this.update()},a.update=function(){this.hasAttribute(d.HIDDEN)||(this._rangeEl.setAttribute("aria-valuetext",this.getAriaValueText()),this.updateBar_())},a.updateBar_=function(){h(this,{"--theoplayer-range-track-progress-internal":"linear-gradient(to right, "+this.getBarColors().toGradientStops()+")"})},a.getBarColors=function(){var e=(this.value-this.min)/(this.max-this.min)*100;isNaN(e)&&(e=0);var t=this._rangeEl.offsetWidth;t>0&&(this._lastRangeWidth=t);var r=0;this.min<this.value&&this.value<this.max&&(r=parseInt(getComputedStyle(this).getPropertyValue("--theoplayer-range-thumb-width")||"10px")*(.5-e/100)/this._lastRangeWidth*100);var a=new tK;return a.add("var(--theoplayer-range-bar-color, #fff)",0,e+r),a},a.updatePointer_=function(e,t){this._pointerEl.style.width=""+e*t.width+"px"},a.handleKeyDown_=function(e){"tv"===this.deviceType&&V(e.keyCode)&&(e.keyCode===c.LEFT||e.keyCode===c.RIGHT?e.stopPropagation():(e.keyCode===c.UP||e.keyCode===c.DOWN)&&e.preventDefault())},k(t,[{key:"disabled",get:function(){return this.hasAttribute(d.DISABLED)},set:function(e){O(this,d.DISABLED,e)}},{key:"value",get:function(){return this._rangeEl.valueAsNumber},set:function(e){this._rangeEl.valueAsNumber=e,this.handleInput()}},{key:"min",get:function(){return Number(this._rangeEl.min)},set:function(e){this._rangeEl.min=String(e),this.update()}},{key:"max",get:function(){return Number(this._rangeEl.max)},set:function(e){this._rangeEl.max=String(e),this.update()}},{key:"step",get:function(){var e=this._rangeEl.step;return"any"===e?e:Number(e)},set:function(e){this._rangeEl.step=String(e)}},{key:"deviceType",get:function(){return this.getAttribute(d.DEVICE_TYPE)||"desktop"},set:function(e){this.setAttribute(d.DEVICE_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[d.DISABLED,d.HIDDEN]}}]),t}(Z(HTMLElement,["deviceType"])),tZ="theoplayerpreviewtimechange";function tX(e){return"linear"===e.type}var tJ=p("theoplayer-preview-thumbnail","<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}:host([hidden]){display:none!important}canvas{background:#fff;background:var(--theoplayer-preview-thumbnail-background,#fff);border-radius:2px;border-radius:var(--theoplayer-preview-thumbnail-padding,2px);display:none;padding:2px;padding:var(--theoplayer-preview-thumbnail-padding,2px)}</style><canvas></canvas>"),t$=["addtrack","removetrack"],t0=function(e){function t(){(t=e.call(this)||this)._previewTime=NaN,t._updateThumbnailTextTrack=function(){var e=t._thumbnailTextTrack,r=t._player?S(t._player.textTracks,t1):void 0;e!==r&&(t._thumbnailTextTrack=r,t.updateThumbnail_())};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tJ().content.cloneNode(!0)),t._canvasEl=r.querySelector("canvas"),t._canvasContext=t._canvasEl.getContext("2d"),t._thumbnailImageSource=document.createElement("img"),t._thumbnailImageSource.decoding="async",t._upgradeProperty("previewTime"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this)},a.updateThumbnail_=function(){var e=this._thumbnailTextTrack;if(void 0===e){this.hideThumbnail_();return}"disabled"===e.mode&&(e.mode="hidden");var t=function(e,t){if(0!==e.length){for(var r,a=e[0],o=l(e);!(r=o()).done;){var n=r.value;if(n.startTime<=t)a=n;else if(t>=n.endTime)break}return a}}(e.cues,this._previewTime);if(void 0===t){this.hideThumbnail_();return}var r=t.content.trim(),a=function(e){var t=e.match(/^(.+)#xywh=(\d+),(\d+),(\d+),(\d+)$/);if(t)return{url:t[1],x:+t[2],y:+t[3],w:+t[4],h:+t[5]}}(r),o=a?a.url:r;if(o=new URL(o,e.src||location.href).href,this._lastLoadedThumbnailUrl!==o){this.loadThumbnailImage_(o);return}this.showThumbnail_(a)},a.loadThumbnailImage_=function(e){var t=this;if(this._thumbnailImageSource.src!==e){var r=function(){t._lastLoadedThumbnailUrl=e,t.updateThumbnail_()};"function"==typeof this._thumbnailImageSource.decode?(this._thumbnailImageSource.src=e,this._thumbnailImageSource.decode().then(r,E)):(this._thumbnailImageSource.onload=r,this._thumbnailImageSource.src="",this._thumbnailImageSource.src=e)}},a.showThumbnail_=function(e){e?(this._canvasEl.width=e.w,this._canvasEl.height=e.h,this._canvasContext.drawImage(this._thumbnailImageSource,e.x,e.y,e.w,e.h,0,0,e.w,e.h)):(this._canvasEl.width=this._thumbnailImageSource.naturalWidth,this._canvasEl.height=this._thumbnailImageSource.naturalHeight,this._canvasContext.drawImage(this._thumbnailImageSource,0,0)),this._canvasEl.style.display="block"},a.hideThumbnail_=function(){this._canvasEl.style.display="none"},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.textTracks.removeEventListener(t$,this._updateThumbnailTextTrack),this._player=e,this._updateThumbnailTextTrack(),void 0!==this._player&&this._player.textTracks.addEventListener(t$,this._updateThumbnailTextTrack))}},{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this.updateThumbnail_()}}]),t}(Z(HTMLElement,["player","previewTime"]));function t1(e){return"metadata"===e.kind&&"thumbnails"===e.label}customElements.define("theoplayer-preview-thumbnail",t0);var t5=p("theoplayer-preview-time-display","<style>"+el+"</style><span></span>"),t2=["timeupdate","seeking","seeked","durationchange"],t3=function(e){function t(){(t=e.call(this)||this)._previewTime=NaN,t._update=function(){var e,r=t._previewTime,a=t._player?t._player.duration:NaN,o=null==(e=t._player)?void 0:e.seekable,n=isFinite(a)?a:o&&o.length>0?o.end(0):NaN,i=t.hasAttribute(d.REMAINING)||t.hasAttribute(d.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType;i&&(r=-((n||0)-r)),I(t._spanEl,eu(r,n,i))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(t5().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("previewTime"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._update()},a.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._update(),h(this))},k(t,[{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this._update()}},{key:"streamType",get:function(){return this.getAttribute(d.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(d.STREAM_TYPE,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(t2,this._update),this._player=e,this._update(),void 0!==this._player&&this._player.addEventListener(t2,this._update))}}],[{key:"observedAttributes",get:function(){return[d.REMAINING,d.REMAINING_WHEN_LIVE,d.STREAM_TYPE]}}]),t}(Z(HTMLElement,["player","previewTime","streamType"]));customElements.define("theoplayer-preview-time-display",t3);var t4=p("theoplayer-time-range",tW('<input type="range" min="0" max="1000" step="any" value="0"><div class="theoplayer-time-range-preview-rail"><div part="box preview-box"><slot name="preview"><theoplayer-preview-thumbnail></theoplayer-preview-thumbnail><theoplayer-preview-time-display remaining-when-live></theoplayer-preview-time-display></slot></div></div>',"input[type=range]{direction:ltr}.theoplayer-time-range-preview-rail{bottom:100%;left:0;opacity:0;pointer-events:none;position:absolute;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden;width:1%}:host(:hover:not([disabled])) .theoplayer-time-range-preview-rail{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}[part~=box]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;align-items:center;bottom:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));position:absolute;text-shadow:0 0 4px rgba(0,0,0,.75);text-shadow:var(--theoplayer-preview-text-shadow,0 0 4px rgba(0,0,0,.75));-webkit-transform:translateX(-50%);transform:translateX(-50%)}")),t8=["timeupdate","durationchange","ratechange","seeking","seeked"],t7=["play","pause","ended","readystatechange","error"],t6=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],t9=function(e){function t(){var t;return(t=e.call(this,{template:t4()})||this)._pausedWhileScrubbing=!1,t._autoAdvanceId=0,t._lastUpdateTime=0,t._lastCurrentTime=0,t._lastPlaybackRate=0,t._updateFromPlayer=function(){if(void 0!==t._player){t._lastUpdateTime=performance.now(),t._lastCurrentTime=t._player.currentTime,t._lastPlaybackRate=t._player.playbackRate;var e=t._player.seekable;if(0!==e.length?(t.min=e.start(0),t.max=e.end(0)):(t.min=0,t.max=t._player.duration),!isFinite(t._lastCurrentTime)){var r=t._player.duration===1/0;t._lastCurrentTime=r?t.max:t.min}t._rangeEl.valueAsNumber=t._lastCurrentTime,t.update(),t._updateDisabled()}},t._updateDisabled=function(){var e="live"===t.streamType;void 0!==t._player&&(e||(e=0===t._player.seekable.length)),t.disabled!==e&&(t.disabled=e)},t._pauseOnScrubStart=function(){t._pausedWhileScrubbing||void 0===t._player||t._player.paused||(t._pausedWhileScrubbing=!0,t._player.pause(),document.addEventListener("mouseup",t._playOnScrubEnd),document.addEventListener("touchend",t._playOnScrubEnd))},t._playOnScrubEnd=function(){t._pausedWhileScrubbing&&(t._pausedWhileScrubbing=!1,document.removeEventListener("mouseup",t._playOnScrubEnd),document.removeEventListener("touchend",t._playOnScrubEnd),void 0!==t._player&&t._player.paused&&t._player.play())},t._toggleAutoAdvance=function(){t.shouldAutoAdvance_()?0===t._autoAdvanceId&&(t._updateFromPlayer(),t._autoAdvanceId=requestAnimationFrame(t._autoAdvanceWhilePlaying)):0!==t._autoAdvanceId&&(t._updateFromPlayer(),cancelAnimationFrame(t._autoAdvanceId),t._autoAdvanceId=0)},t._autoAdvanceWhilePlaying=function(){if(!t.shouldAutoAdvance_()){t._autoAdvanceId=0;return}var e=(performance.now()-t._lastUpdateTime)/1e3;t._rangeEl.valueAsNumber=t._lastCurrentTime+e*t._lastPlaybackRate,t.update(),t._autoAdvanceId=requestAnimationFrame(t._autoAdvanceWhilePlaying)},t._onAdChange=function(){t.update()},t._previewRailEl=t.shadowRoot.querySelector(".theoplayer-time-range-preview-rail"),t._previewBoxEl=t._previewRailEl.querySelector('[part~="preview-box"]'),t._rangeEl.setAttribute(d.ARIA_LIVE,"off"),t._rangeEl.addEventListener("mousedown",t._pauseOnScrubStart),t._rangeEl.addEventListener("touchstart",t._pauseOnScrubStart),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._toggleAutoAdvance()},a.disconnectedCallback=function(){e.prototype.disconnectedCallback.call(this),this._toggleAutoAdvance()},a.getAriaLabel=function(){return"seek"},a.getAriaValueText=function(){var e=ed(this.value),t=ed(this.max);return e&&t?e+" of "+t:"video not loaded, unknown time"},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===d.STREAM_TYPE?this._updateDisabled():r===d.SHOW_AD_MARKERS&&this.update(),t.observedAttributes.indexOf(r)>=0&&h(this))},a.handleInput=function(){void 0!==this._player&&this._player.currentTime!==this.value&&(this._player.currentTime=this.value),e.prototype.handleInput.call(this)},a.shouldAutoAdvance_=function(){return this.isConnected&&void 0!==this._player&&!this._player.paused&&!this._player.ended&&!this._player.errorObject&&this._player.readyState>=3},a.updatePointer_=function(t,r){e.prototype.updatePointer_.call(this,t,r);var a=r.left+t*r.width,o=this._previewBoxEl.getBoundingClientRect(),n=((a=Math.max(r.left+o.width/2,Math.min(r.right-o.width/2,a)))-r.left)/r.width;if(this._previewRailEl.style.transform="translateX("+(1e4*n).toFixed(6)+"%)",void 0!==this._player){var i=this.min,l=ew(tZ,{bubbles:!0,composed:!0,detail:{previewTime:i+t*(this.max-i)}});this.dispatchEvent(l)}},a.getBarColors=function(){var t=e.prototype.getBarColors.call(this);if(!this.hasAttribute(d.SHOW_AD_MARKERS)||!this._player||!this._player.ads||this._player.ads.playing)return t;for(var r,a=this.min,o=this.max,n=l(this._player.ads.scheduledAdBreaks);!(r=n()).done;){var i=r.value;if(void 0===i.ads||!(i.ads.length>0)||i.ads.some(tX)){var s=i.timeOffset;if(s<0&&(s=this._player.duration),a<=s&&s<=o){var u=(s-a)/(o-a)*100,h=void 0,p=void 0;u+1<100?(h=u,p=u+1):(h=99,p=100),t.add("var(--theoplayer-time-range-ad-marker-color, #ffc50f)",h,p)}}}return t},a.handleKeyDown_=function(t){e.prototype.handleKeyDown_.call(this,t),"tv"===this.deviceType&&t.keyCode===c.ENTER&&void 0!==this._player&&(this._player.paused?this._player.play():this._player.pause())},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(t8,this._updateFromPlayer),this._player.removeEventListener(t7,this._toggleAutoAdvance),null==(t=this._player.ads)||t.removeEventListener(t6,this._onAdChange)),this._player=e,this._updateFromPlayer(),this._toggleAutoAdvance(),void 0!==this._player&&(this._player.addEventListener(t8,this._updateFromPlayer),this._player.addEventListener(t7,this._toggleAutoAdvance),null==(r=this._player.ads)||r.addEventListener(t6,this._onAdChange)))}},{key:"streamType",get:function(){return this.getAttribute(d.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(d.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[].concat(tj.observedAttributes,[d.SHOW_AD_MARKERS])}}]),t}(Z(tj,["player","streamType","deviceType"]));customElements.define("theoplayer-time-range",t9);var re=p("theoplayer-volume-range",tW('<input type="range" min="0" max="1" step="any" value="0">')),rt=function(e){function t(){var t;return(t=e.call(this,{template:re()})||this)._updateFromPlayer=function(){void 0!==t._player&&(t.value=t._player.volume)},t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.getAriaLabel=function(){return"volume"},a.getAriaValueText=function(){return""+Math.round(this.value/this.max*100)+"%"},a.handleInput=function(){void 0!==this._player&&this._player.volume!==this.value&&(this._player.volume=this.value),e.prototype.handleInput.call(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener("volumechange",this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("volumechange",this._updateFromPlayer))}}]),t}(Z(tj,["player","deviceType"]));customElements.define("theoplayer-volume-range",rt);var rr=p("theoplayer-error-display",'<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-error-icon-gap,10px);max-width:80%;max-width:var(--theoplayer-error-max-width,80%);min-width:0;min-width:var(--theoplayer-error-min-width,0)}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-error-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-error-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-error-icon-width,48px)}[part~=heading]{color:#fff;color:var(--theoplayer-error-heading-color,#fff);line-height:48px;line-height:var(--theoplayer-error-icon-height,48px);margin:0 0 10px;margin:var(--theoplayer-error-heading-margin,0 0 10px);padding:0}[part~=message]{color:#fff;color:var(--theoplayer-error-message-color,#fff);margin:0;margin:var(--theoplayer-error-message-margin,0);padding:0}[part~=fullscreen-controls]{-webkit-box-pack:end;-ms-flex-pack:end;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;left:0;position:absolute;right:0}:host(:not([fullscreen])) [part~=fullscreen-controls]{display:none!important}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="48" width="48"><path d="M24.15 26.4q.85 0 1.425-.575.575-.575.575-1.425v-9.2q0-.8-.6-1.375t-1.4-.575q-.85 0-1.425.575-.575.575-.575 1.425v9.2q0 .8.6 1.375t1.4.575ZM24 34.7q1 0 1.625-.625t.625-1.625q0-.95-.625-1.625T24 30.15q-1 0-1.625.675t-.625 1.625q0 1 .625 1.625T24 34.7Zm0 10q-4.4 0-8.175-1.575Q12.05 41.55 9.25 38.75q-2.8-2.8-4.375-6.575Q3.3 28.4 3.3 24q0-4.35 1.575-8.125Q6.45 12.1 9.25 9.3q2.8-2.8 6.575-4.425Q19.6 3.25 24 3.25q4.35 0 8.125 1.625Q35.9 6.5 38.7 9.3q2.8 2.8 4.425 6.575Q44.75 19.65 44.75 24q0 4.4-1.625 8.175Q41.5 35.95 38.7 38.75q-2.8 2.8-6.575 4.375Q28.35 44.7 24 44.7Z"/></svg>\n</slot></div><div part="text"><h1 part="heading"><slot name="heading">An error occurred</slot></h1><p part="message"><slot name="message"></slot></p></div><div part="fullscreen-controls"><slot name="fullscreen-controls"><theoplayer-fullscreen-button></theoplayer-fullscreen-button></slot></div>'),ra=function(e){function t(){var t,r=(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0});return r.appendChild(rr().content.cloneNode(!0)),t._messageSlot=r.querySelector('slot[name="message"]'),t._upgradeProperty("error"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this)},a.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&h(this)},k(t,[{key:"error",get:function(){return this._error},set:function(e){this._error=e,I(this._messageSlot,e?e.message:"")}},{key:"fullscreen",get:function(){return this.hasAttribute(d.FULLSCREEN)},set:function(e){O(this,d.FULLSCREEN,e)}}],[{key:"observedAttributes",get:function(){return[d.FULLSCREEN]}}]),t}(Z(HTMLElement,["error","fullscreen"]));customElements.define("theoplayer-error-display",ra);var ro=function(e){function t(t){var r;return(r=e.call(this,t)||this)._updateCastState=function(){var e=r._castApi?r._castApi.state:"unavailable";r.setAttribute(d.CAST_STATE,e)},r._upgradeProperty("castState"),r._upgradeProperty("castApi"),r}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(d.CAST_STATE)||this.setAttribute(d.CAST_STATE,"unavailable"),this._updateCastState()},a.handleClick=function(){if(this._castApi){this._updateCastState();var e=this.castState;"available"===e?this._castApi.start():("connecting"===e||"connected"===e)&&this._castApi.stop()}},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&h(this)},k(t,[{key:"castApi",get:function(){return this._castApi},set:function(e){void 0!==this._castApi&&this._castApi.removeEventListener("statechange",this._updateCastState),this._castApi=e,this._updateCastState(),void 0!==this._castApi&&this._castApi.addEventListener("statechange",this._updateCastState)}},{key:"castState",get:function(){return this.getAttribute(d.CAST_STATE)}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.CAST_STATE])}}]),t}(H),rn=p("theoplayer-chromecast-button",F('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="24" width="24"><defs><clipPath id="theoplayer-chromecast-rings-mask"><path d="M0-36h44V0H0z"/></clipPath></defs><path class="theoplayer-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/><path class="theoplayer-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/><g class="theoplayer-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theoplayer-chromecast-rings-mask)"><circle stroke="none" cx="0" cy="0" r="30"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring2" cx="0" cy="0" r="12"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring3" cx="0" cy="0" r="20"/><path class="theoplayer-chromecast-ring theoplayer-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0"/></g></svg></span>',":host([cast-state=unavailable]){display:none!important}:host([cast-state=connecting]) .theoplayer-chromecast-ring{-webkit-animation:.9s linear infinite;animation:.9s linear infinite}:host([cast-state=connecting]) .theoplayer-chromecast-ring1{-webkit-animation-name:theoplayer-chromecast-connecting-ring1;animation-name:theoplayer-chromecast-connecting-ring1}:host([cast-state=connecting]) .theoplayer-chromecast-ring2{-webkit-animation-name:theoplayer-chromecast-connecting-ring2;animation-name:theoplayer-chromecast-connecting-ring2}:host([cast-state=connecting]) .theoplayer-chromecast-ring3{-webkit-animation-name:theoplayer-chromecast-connecting-ring3;animation-name:theoplayer-chromecast-connecting-ring3}:host([cast-state=connecting]) .theoplayer-chromecast-ring4{-webkit-animation-name:theoplayer-chromecast-connecting-ring4;animation-name:theoplayer-chromecast-connecting-ring4}.theoplayer-chromecast-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-chromecast-inner{opacity:1}.theoplayer-chromecast-rings{-webkit-clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%);clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%)}@-webkit-keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}@keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}")),ri="theoplayer-chromecast-rings-mask",rl=0,rs=function(e){function t(){t=e.call(this,{template:rn()})||this;var t,r=++rl,a=t.shadowRoot.querySelector("svg clipPath#"+ri),o=t.shadowRoot.querySelector("svg .theoplayer-chromecast-rings"),n=ri+"-"+r;return null==a||a.setAttribute("id",n),o.setAttribute("clip-path",n),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},a._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop casting to Chromecast":"start casting to Chromecast";this.setAttribute(d.ARIA_LABEL,e)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t;this._player=e,this.castApi=null==e?void 0:null==(t=e.cast)?void 0:t.chromecast}}]),t}(Z(ro,["player"]));customElements.define("theoplayer-chromecast-button",rs);var ru=p("theoplayer-chromecast-display",'<style>:host{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-chromecast-display-icon-gap,10px);padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:none}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-chromecast-display-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-chromecast-display-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-chromecast-display-icon-width,48px)}[part=text]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part=heading]{color:#fff;color:var(--theoplayer-chromecast-display-heading-color,#fff);font-size:14px;font-size:var(--theoplayer-chromecast-display-heading-font-size,var(--theoplayer-text-font-size,14px));margin:0;margin:var(--theoplayer-chromecast-display-heading-margin,0);padding:0}[part=receiver]{color:#fff;color:var(--theoplayer-chromecast-display-receiver-color,#fff);font-size:17.5px;font-size:var(--theoplayer-chromecast-display-receiver-font-size,calc(var(--theoplayer-text-font-size, 14px)*1.25));margin:0;margin:var(--theoplayer-chromecast-display-receiver-margin,0);padding:0}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M86.956 910.131h65.699q9.171 0 14.801-6.413 5.631-6.413 4.076-14.067-6.099-32.801-29.132-57.242-23.033-24.442-55.051-30.941-7.654-1.555-14.067 4.076-6.413 5.63-6.413 15.164v69.336q0 8.487 5.8 14.287 5.8 5.8 14.287 5.8Zm179.365 0q14.288 0 23.635-9.565 9.348-9.565 7.348-23.261-10.944-78.191-65.681-134.428-54.737-56.237-131.928-67.181-13.696-2-23.26 7.415-9.566 9.416-9.566 23.411 0 12.13 9.311 23.059 9.312 10.929 24.08 13.332 49.566 9.566 84.913 46.696 35.348 37.131 44.914 87.131 2.403 14.768 12.595 24.08 10.192 9.311 23.639 9.311Zm127.147 0q13.904 0 23.261-9.563 9.358-9.563 8.358-23.444-5.819-64.393-33.105-122.128-27.286-57.735-70.589-101.784-43.303-44.049-100.088-71.892-56.784-27.842-121.43-33.407-13.88-1-23.443 8.53-9.563 9.531-9.563 23.377 0 13.615 9.072 23.615 9.072 10 23.62 12.19 103.526 11.636 174.956 85.018 71.43 73.382 82.858 176.796 1.801 14.298 11.995 23.495 10.195 9.197 24.098 9.197ZM123.477 241.304h692.436q31.74 0 55.762 24.021 24.021 24.022 24.021 55.762v509.826q0 31.507-24.021 55.362-24.022 23.856-55.762 23.856H525.696q-16.706 0-28.158-11.501-11.451-11.502-11.451-28.283 0-16.782 11.451-28.108 11.452-11.326 28.158-11.326h290.217V321.087H146.087v146q-6.783 6.348-16.595 11.674-9.813 5.326-23.514 5.326-16.457 0-27.783-11.452-11.326-11.451-11.326-28.158v-146q0-21.834 16.838-39.504 16.837-17.669 39.77-17.669Zm317.914 363Z"/></svg>\n</slot></div><div part="text"><p part="heading"><slot name="heading">Playing on</slot></p><p part="receiver">Chromecast Receiver</p></div>'),rh=["statechange"],rp=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a=null==(r=t._player)?void 0:null==(e=r.cast)?void 0:e.chromecast;if(void 0===a||"connected"!==a.state){t.setAttribute(d.HIDDEN,"");return}I(t._receiverNameEl,a.receiverName||""),t.removeAttribute(d.HIDDEN)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ru().content.cloneNode(!0)),t._receiverNameEl=r.querySelector('[part="receiver"]'),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(d.HIDDEN)||this.setAttribute(d.HIDDEN,""),this._updateFromPlayer()},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a,o,n,i;this._player!==e&&(null==(a=this._player)||null==(r=a.cast)||null==(t=r.chromecast)||t.removeEventListener(rh,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),null==(i=this._player)||null==(n=i.cast)||null==(o=n.chromecast)||o.addEventListener(rh,this._updateFromPlayer))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-chromecast-display",rp);var rd=p("theoplayer-airplay-button",F('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path class="theoplayer-airplay-inner" d="M5 7h14v8H5z"/><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg></span>',":host([cast-state=unavailable]){display:none!important}.theoplayer-airplay-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-airplay-inner{opacity:1}")),rc=function(e){function t(){var t;return(t=e.call(this,{template:rd()})||this)._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},a._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop playing on AirPlay":"start playing on AirPlay";this.setAttribute(d.ARIA_LABEL,e)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t;this._player=e,this.castApi=null==e?void 0:null==(t=e.cast)?void 0:t.airplay}}]),t}(Z(ro,["player"]));customElements.define("theoplayer-airplay-button",rc);var ry=p("theoplayer-loading-indicator",'<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}[part=icon]{opacity:0;-webkit-transition:visibility .15s,opacity .15s;transition:visibility .15s,opacity .15s;visibility:hidden}:host([loading]) [part=icon]{opacity:1;-webkit-transition:visibility 0s,opacity 0s;transition:visibility 0s,opacity 0s;-webkit-transition-delay:.5s;transition-delay:.5s;-webkit-transition-delay:var(--theoplayer-loading-delay,.5s);transition-delay:var(--theoplayer-loading-delay,.5s);visibility:visible}[part=icon] ::slotted(img),[part=icon] ::slotted(svg){fill:#fff;fill:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));vertical-align:middle;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress{direction:ltr;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:0;height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));letter-spacing:0;line-height:0;position:relative;white-space:nowrap;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress svg,.theoplayer-loading-spinner{height:100%;position:absolute;width:100%}.theoplayer-loading-progress svg{stroke:#fff;stroke:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff))}.theoplayer-loading-gap-patch{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;left:47.5%;overflow:hidden;position:absolute;top:0;width:5%}.theoplayer-loading-gap-patch svg{left:-900%;-webkit-transform:rotate(180deg);transform:rotate(180deg);width:2000%}.theoplayer-loading-circle-clipper{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%;overflow:hidden;position:relative;width:50%}.theoplayer-loading-circle-clipper svg{width:200%}.theoplayer-loading-circle-right svg{left:-100%}.theoplayer-loading-progress{-webkit-animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite;animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite}.theoplayer-loading-spinner{-webkit-animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-left svg{-webkit-animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-right svg{-webkit-animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}@-webkit-keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@-webkit-keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@-webkit-keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}@keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}</style><div part="icon"><slot name="icon"><div aria-hidden="true" class="theoplayer-loading-progress"><div class="theoplayer-loading-spinner"><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-left"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div><div class="theoplayer-loading-gap-patch"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="3.2"/></svg></div><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-right"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div></div></div></slot></div>'),rv=["readystatechange","play","pause","playing","seeking","seeked"],rf=function(e){function t(){var t;return(t=e.call(this)||this)._updateFromPlayer=function(){var e=void 0!==t._player&&!t._player.paused&&(t._player.seeking||t._player.readyState<3);O(em(t),d.LOADING,e)},t.attachShadow({mode:"open"}).appendChild(ry().content.cloneNode(!0)),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._updateFromPlayer()},a.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&h(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(rv,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(rv,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[d.LOADING]}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-loading-indicator",rf);var rb=p("theoplayer-gesture-receiver","<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}</style>"),rg=function(e){function t(){var t;return(t=e.call(this)||this)._pointerType="",t._onPointerDown=function(e){t._pointerType=e.pointerType},t._onClick=function(e){var r,a=null!=(r=e.pointerType)?r:t._pointerType;"touch"===a?t.handleTap(e):"mouse"===a&&t.handleMouseClick(e)},t.attachShadow({mode:"open"}).appendChild(rb().content.cloneNode(!0)),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.setAttribute("tabindex","-1"),this.setAttribute("aria-hidden","true")},a.handleTap=function(e){},a.handleMouseClick=function(e){if(void 0!==this._player){var t;void 0===this._player.source||null!=(t=this._player.ads)&&t.playing||(this._player.paused?this._player.play():this._player.pause())}},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.element.removeEventListener("pointerdown",this._onPointerDown),this._player.element.removeEventListener("click",this._onClick)),this._player=e,void 0!==this._player&&(this._player.element.addEventListener("pointerdown",this._onPointerDown),this._player.element.addEventListener("click",this._onClick)))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-gesture-receiver",rg);var rm=p("theoplayer-live-button",F('<span part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><circle cx="12" cy="12" r="7"/></svg>\n</slot></span><slot name="spacer"> </slot><span part="text"><slot name="text">LIVE</slot></span>',"[part=icon] ::slotted(svg),[part=icon] svg{fill:#8c8c8c;fill:var(--theoplayer-live-button-color,#8c8c8c)}:host([live]:not([paused])) [part=icon] ::slotted(svg),:host([live]:not([paused])) [part=icon] svg{fill:red;fill:var(--theoplayer-live-button-active-color,red)}")),r_=["play","pause","playing","emptied"],rk=["seeking","seeked","timeupdate","durationchange","emptied"],rw=function(e){function t(){var t;return(t=e.call(this,{template:rm()})||this)._updatePaused=function(){t.paused=void 0===t._player||t._player.paused},t._updateLive=function(){var e=void 0!==t._player&&function(e,t){if(e.duration===1/0){var r=e.seekable;if(r.length>0)return r.end(r.length-1)-e.currentTime<=t}return!1}(t._player,t.liveThreshold);t.live!==e&&(t.live=e)},t._upgradeProperty("paused"),t._upgradeProperty("streamType"),t._upgradeProperty("liveThreshold"),t._upgradeProperty("live"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(d.ARIA_LABEL)||this.setAttribute(d.ARIA_LABEL,"seek to live")},a.handleClick=function(){void 0!==this._player&&(this._player.hesp&&void 0!==this._player.hesp.manifest?this._player.hesp.goLive():(this._player.currentTime=1/0,this._player.play()))},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===d.LIVE_THRESHOLD&&this._updateLive(),t.observedAttributes.indexOf(r)>=0&&h(this))},k(t,[{key:"paused",get:function(){return this.hasAttribute(d.PAUSED)},set:function(e){O(this,d.PAUSED,e)}},{key:"streamType",get:function(){return this.getAttribute(d.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(d.STREAM_TYPE,e)}},{key:"liveThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(d.LIVE_THRESHOLD))?e:10)},set:function(e){e=Number(e),this.setAttribute(d.LIVE_THRESHOLD,String(isNaN(e)?0:e))}},{key:"live",get:function(){return this.hasAttribute(d.LIVE)},set:function(e){O(this,d.LIVE,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(r_,this._updatePaused),this._player.removeEventListener(rk,this._updateLive)),this._player=e,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(r_,this._updatePaused),this._player.addEventListener(rk,this._updateLive)))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[d.STREAM_TYPE,d.LIVE,d.PAUSED,d.LIVE_THRESHOLD])}}]),t}(Z(H,["player","streamType"]));customElements.define("theoplayer-live-button",rw);var rx=p("theoplayer-ad-display","<style>"+el+"\n:host{padding:5px 10px;padding:calc(var(--theoplayer-control-padding, 10px) - var(--theoplayer-ad-display-padding, 5px)) var(--theoplayer-control-padding,10px);pointer-events:none}span{background:#ffc50f;background:var(--theoplayer-ad-display-background,#ffc50f);border-radius:2px;border-radius:var(--theoplayer-ad-display-border-radius,2px);color:#000;color:var(--theoplayer-ad-display-text-color,#000);display:inline-block;padding:5px;padding:var(--theoplayer-ad-display-padding,5px)}</style><span></span>"),rE=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],rA=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,o=null==(e=t._player)?void 0:e.ads,n=(null!=(a=null==o?void 0:null==(r=o.currentAdBreak)?void 0:r.ads)?a:[]).filter(tX);if(void 0===o||!o.playing||0===n.length){I(t._spanEl,""),t.style.display="none";return}if(n.length>1){var i=S(t._player.ads.currentAds||[],tX);if(i){var l=n.indexOf(i);if(l>=0){I(t._spanEl,"Ad "+(l+1)+" of "+n.length),t.style.display="";return}}}I(t._spanEl,"Ad"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rx().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._updateFromPlayer()},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(void 0!==this._player&&(null==(t=this._player.ads)||t.removeEventListener(rE,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rE,this._updateFromPlayer)))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-ad-display",rA);var rT=p("theoplayer-ad-countdown","<style>"+el+"\n:host{pointer-events:none}</style><span></span>"),rC=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"],rL=function(e){function t(){(t=e.call(this)||this)._onAdChange=function(){var e,r,a;(null==(r=t._player)?void 0:null==(e=r.ads)?void 0:e.playing)?(t._player.removeEventListener("timeupdate",t._update),t._player.addEventListener("timeupdate",t._update)):null==(a=t._player)||a.removeEventListener("timeupdate",t._update),t._update()},t._update=function(){var e,r,a=null==(e=t._player)?void 0:e.ads,o=null==a?void 0:null==(r=a.currentAdBreak)?void 0:r.maxRemainingDuration;if(void 0===a||!a.playing||void 0===o||o<0){I(t._spanEl,""),t.style.display="none";return}o=Math.ceil(o),I(t._spanEl,"Content will resume in "+o+"s"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rT().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._update()},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener("timeupdate",this._update),null==(t=this._player.ads)||t.removeEventListener(rC,this._onAdChange)),this._player=e,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rC,this._onAdChange)))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-ad-countdown",rL);var rS=p("theoplayer-ad-clickthrough-button",G("<slot>Visit Advertiser</slot>")),rP=["adbegin","adend","adloaded","updatead","adskip"],rR=function(e){function t(){var t;return(t=e.call(this,{template:rS()})||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.clickThrough=null;return}var o=S(null!=(r=a.currentAds)?r:[],tX);if(void 0===o||"google-ima"===o.integration){t.clickThrough=null;return}var n=o.clickThrough;if(!n){t.clickThrough=null;return}t.clickThrough=n},t.disabled=!0,t.style.display="none",t._upgradeProperty("clickThrough"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer()},a.attributeChangedCallback=function(r,a,o){if(e.prototype.attributeChangedCallback.call(this,r,a,o),r===d.CLICKTHROUGH&&o!==a){var n=null!=o,i=o?String(o).trim():"#";this.setLink(i,"_blank"),this.disabled=!n,n?this.style.display="":this.style.display="none"}t.observedAttributes.indexOf(r)>=0&&h(this)},a.handleClick=function(){var e;null==(e=this._player)||e.pause()},k(t,[{key:"clickThrough",get:function(){return this.getAttribute(d.CLICKTHROUGH)},set:function(e){null==e?this.removeAttribute(d.CLICKTHROUGH):this.setAttribute(d.CLICKTHROUGH,e)}},{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(void 0!==this._player&&(null==(t=this._player.ads)||t.removeEventListener(rP,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rP,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return[].concat(Y.observedAttributes,[d.CLICKTHROUGH])}}]),t}(Z(Y,["player"]));customElements.define("theoplayer-ad-clickthrough-button",rR);var rM=p("theoplayer-ad-skip-button",F('<span part="countdown">Skip in 0 seconds</span><span part="skip"><span part="skip-text"><slot name="skip-text">Skip Ad</slot></span> <span part="skip-icon"><slot name="skip-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.5 18q-.425 0-.712-.288-.288-.287-.288-.712V7q0-.425.288-.713Q17.075 6 17.5 6t.712.287q.288.288.288.713v10q0 .425-.288.712-.287.288-.712.288ZM7.05 16.975q-.5.35-1.025.05-.525-.3-.525-.9v-8.25q0-.6.525-.888.525-.287 1.025.038l6.2 4.15q.45.3.45.825 0 .525-.45.825Z"/></svg>\n</slot></span></span>',":host{-ms-grid-columns:1fr;-ms-grid-rows:1fr;background:rgba(0,0,0,.7);background:var(--theoplayer-ad-skip-background,rgba(0,0,0,.7));border:1px solid hsla(0,0%,100%,.5);border:var(--theoplayer-ad-skip-border,1px solid hsla(0,0%,100%,.5));color:#fff;color:var(--theoplayer-ad-skip-color,#fff);display:-ms-grid;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}:host(:hover){background:rgba(0,0,0,.9);background:var(--theoplayer-ad-skip-hover-background,rgba(0,0,0,.9));border:1px solid #fff;border:var(--theoplayer-ad-skip-hover-border,1px solid #fff);color:#fff;color:var(--theoplayer-ad-skip-hover-color,var(--theoplayer-ad-skip-color,#fff))}:host([disabled]){background:transparent;background:var(--theoplayer-ad-skip-countdown-background,transparent);border:1px solid transparent;border:var(--theoplayer-ad-skip-countdown-border,1px solid transparent);color:#fff;color:var(--theoplayer-ad-skip-countdown-color,var(--theoplayer-ad-skip-color,#fff))}[part=countdown],[part=skip]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-grid-column:1;grid-column:1;-ms-grid-row:1;grid-row:1}[part=skip]{font-size:14px;font-size:var(--theoplayer-ad-skip-font-size,var(--theoplayer-text-font-size,14px));line-height:24px;line-height:var(--theoplayer-ad-skip-line-height,var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px)))}[part=skip-icon]{padding-left:10px;padding-left:var(--theoplayer-control-padding,10px)}[part=skip-icon] ::slotted(svg),[part=skip-icon] svg{height:24px;height:var(--theoplayer-ad-skip-icon-height,var(--theoplayer-control-height,24px));width:24px;width:var(--theoplayer-ad-skip-icon-width,var(--theoplayer-control-height,24px))}")),rI=["adbegin","adend","adloaded","updatead","adskip"],rO=function(e){function t(){var t;return(t=e.call(this,{template:rM()})||this)._onAdChange=function(){var e,r,a;(null==(r=t._player)?void 0:null==(e=r.ads)?void 0:e.playing)?(t._player.removeEventListener("timeupdate",t._update),t._player.addEventListener("timeupdate",t._update)):null==(a=t._player)||a.removeEventListener("timeupdate",t._update),t._update()},t._update=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.style.display="none";return}var o=S(null!=(r=a.currentAds)?r:[],tX);if(void 0===o||"google-ima"===o.integration){t.style.display="none";return}var n=o.skipOffset;if(void 0===n||n<0||void 0!==o.duration&&n>=o.duration){t.style.display="none";return}var i=t._player.currentTime;i<n?(I(t._countdownEl,"Skip in "+Math.ceil(n-i)+"s"),t._countdownEl.style.visibility="visible",t._skipEl.style.visibility="hidden",t._skipEl.style.pointerEvents="none",t.style.display="",t.setAttribute(d.DISABLED,""),t.setAttribute(d.ARIA_LIVE,"off")):(t._countdownEl.style.visibility="hidden",t._skipEl.style.visibility="visible",t._skipEl.style.pointerEvents="",t.style.display="",t.removeAttribute(d.DISABLED),t.setAttribute(d.ARIA_LIVE,"polite"))},t._countdownEl=t.shadowRoot.querySelector('[part="countdown"]'),t._skipEl=t.shadowRoot.querySelector('[part="skip"]'),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._update()},a.handleClick=function(){var e,t;null==(t=this._player)||null==(e=t.ads)||e.skip()},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&h(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener("timeupdate",this._update),null==(t=this._player.ads)||t.removeEventListener(rI,this._onAdChange)),this._player=e,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(rI,this._onAdChange)))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes)}}]),t}(Z(H,["player"]));customElements.define("theoplayer-ad-skip-button",rO),(b=y||(y={})).TopControlBar="top-control-bar",b.BottomControlBar="bottom-control-bar",b.Menu="menu";var rN=[];function rD(e){rN.push(e)}var rq=function(){if("undefined"!=typeof document)for(var e,t=l([["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]]);!(e=t()).done;){var r=e.value;if(r[1]in document)return{requestFullscreen_:r[0],exitFullscreen_:r[1],fullscreenElement_:r[2],fullscreenEnabled_:r[3],fullscreenchange_:r[4],fullscreenerror_:r[5]}}}();function rB(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;var e=navigator.userAgent;return!!e&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(e)}function rF(){if("object"!=typeof navigator)return!1;var e=navigator.userAgent;return!!e&&/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(e)}var rU="theoplayerstreamtypechange",rH="theoplayerready",rV=p("theoplayer-ui",'<style>:host{background:#000;background:var(--theoplayer-background,#000);-webkit-box-sizing:border-box;box-sizing:border-box;container-name:theoplayer-ui-container;container-type:size;display:inline-block;height:0;min-width:300px;padding-bottom:56.25%;position:relative}:host([hidden]){display:none!important}:host([fullscreen]){height:100%!important;padding:0!important;width:100%!important}:host(:-webkit-full-screen){height:100%!important;padding:0!important;width:100%!important}:host(:-ms-fullscreen){height:100%!important;padding:0!important;width:100%!important}:host(:fullscreen){height:100%!important;padding:0!important;width:100%!important}:host([fluid]){padding-bottom:56.25%;padding-bottom:calc(100%*var(--theoplayer-video-height, 9)/var(--theoplayer-video-width, 16))}[part~=chrome]{position:relative}[part~=layer]{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}[part~=chrome],[part~=layer]:not([part~=media-layer]){display:-webkit-box;display:-ms-flexbox;display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[part~=media-layer] video{border-radius:0;border-radius:var(--theoplayer-video-border-radius,0);-o-object-fit:contain;object-fit:contain;-o-object-fit:var(--theoplayer-video-object-fit,contain);object-fit:var(--theoplayer-video-object-fit,contain)}[part~=media-layer] .theoplayer-ad-linear{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10}[part~=media-layer] .theo-ad-remaining-container,[part~=media-layer] .theoplayer-ad-skip,[part~=media-layer] .theoplayer-ad-touch-clickthrough{display:none!important}[part~=chrome],[part~=vertical-layer]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part~=centered]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;justify-content:center}[part~=middle]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}[part~=vertical-layer]:before{background:transparent;background:var(--theoplayer-control-backdrop-background,transparent);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;bottom:var(--theoplayer-menu-offset-bottom,0);padding:10px;padding:var(--theoplayer-menu-layer-padding,10px);top:0;top:var(--theoplayer-menu-offset-top,0)}[part=menu]{-ms-grid-column-align:stretch;background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:stretch}[part=menu] ::slotted(*){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;justify-self:stretch}:host(:not([mobile])) [part=menu]{margin:auto 0 0 auto;margin:var(--theoplayer-menu-margin-top,auto) var(--theoplayer-menu-margin-right,0) var(--theoplayer-menu-margin-bottom,0) var(--theoplayer-menu-margin-left,auto);max-height:100%;min-width:200px;min-width:var(--theoplayer-menu-min-width,200px)}:host([mobile]) [part=menu]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([tv]) [part~=menu-layer]{left:auto}:host([tv]) [part=menu]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [part~=vertical-layer],:host([menu-opened][tv]) [part~=vertical-layer]{display:none!important}@container theoplayer-ui-container (max-width: 500px){:host(:not([mobile])) [part~=menu-layer]{bottom:0;left:0;padding:0;right:0;top:0}:host(:not([mobile])) [part=menu]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([menu-opened]) [part~=vertical-layer]{display:none!important}}[part~=error-layer]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:rgba(0,0,0,.5);background:var(--theoplayer-error-background,rgba(0,0,0,.5));justify-content:center}:host(:not([has-error])) [part~=error-layer],:host([has-error]) [part~=layer]:not([part~=media-layer]):not([part~=error-layer]){display:none!important}[part~=chrome] ::slotted(theoplayer-control-bar){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}theoplayer-gesture-receiver{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [part~=chrome] ::slotted([tv-only]),:host([tv]) [part~=chrome] ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [part~=chrome] ::slotted([live-hidden]),:host([stream-type=vod]) [part~=chrome] ::slotted([live-only]){display:none!important}:host(:not([playing-ad])) [part~=chrome] ::slotted([ad-only]),:host([playing-ad]) [part~=chrome] ::slotted([ad-hidden]){display:none!important}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])){cursor:none}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=chrome] ::slotted(:not([no-auto-hide])){opacity:0;-webkit-transition:opacity 1s;transition:opacity 1s}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=vertical-layer]:before{opacity:0;-webkit-transition:opacity 1s;transition:opacity 1s}</style><div part="layer media-layer"></div><div part="layer gesture-layer"><theoplayer-gesture-receiver></theoplayer-gesture-receiver></div><div part="layer vertical-layer"><div part="top chrome"><slot name="top-chrome"></slot></div><div part="middle chrome"><slot name="middle-chrome"></slot></div><div part="layer centered-layer centered loading"><slot name="centered-loading"></slot></div><div part="layer centered-layer centered chrome"><slot name="centered-chrome"></slot></div><div part="bottom chrome"><slot></slot></div></div><div part="layer menu-layer"><theoplayer-menu-group part="menu"><slot name="menu"></slot></theoplayer-menu-group></div><div part="layer error-layer"><slot name="error"></slot></div>'),rz=function(t){function a(e){void 0===e&&(e={}),(r=t.call(this)||this)._configuration={},r._pointerType="",r._lastPointerUpTime=0,r._stateReceivers=[],r._player=void 0,r._source=void 0,r._userIdleTimer=0,r._previewTime=NaN,r._activeVideoTrack=void 0,r._onMutation=function(e){for(var t,a=l(e);!(t=a()).done;){var o=t.value;if("childList"===o.type){for(var n=o.addedNodes,i=o.removedNodes,s=0;s<n.length;s++){var u=n[s];A(u)&&X(u,r._playerEl,r.registerStateReceiver_)}for(var h=0;h<i.length;h++){var p=i[h];A(p)&&X(p,r._playerEl,r.unregisterStateReceiver_)}}}},r._onSlotChange=function(){X(em(r),r._playerEl,r.registerStateReceiver_),r._updateTextTrackMargins()},r.registerStateReceiver_=function(e){r._stateReceivers.indexOf(e)>=0||(r._stateReceivers.push(e),r.propagateStateToReceiver_(e))},r.unregisterStateReceiver_=function(e){var t,a;!((a=(t=r._stateReceivers).indexOf(e))<0)&&(function(e,t){e.splice(t,1)}(t,a),1)&&r.removeStateFromReceiver_(e)},r._onToggleMenu=function(e){e.stopPropagation();var t=e.detail.menu;if(!r._menuGroup.getMenuById(t)){console.error('<theoplayer-ui>: cannot find menu with ID "'+t+'"');return}var a=T(e.target)?e.target:void 0;r._menuGroup.isMenuOpen(t)?r.closeMenu_():(r.closeMenu_(),r.openMenu_(t,a))},r._onCloseMenu=function(e){e.stopPropagation(),r.closeMenu_()},r._onMenuChange=function(){r._menuEl.removeEventListener("pointerdown",r._onMenuPointerDown),r._menuEl.removeEventListener("click",r._onMenuClick),r._menuGroup.hasCurrentMenu()?(r._menuEl.addEventListener("pointerdown",r._onMenuPointerDown),r._menuEl.addEventListener("click",r._onMenuClick),r.setAttribute(d.MENU_OPENED,"")):r.removeAttribute(d.MENU_OPENED)},r._onMenuPointerDown=function(e){r._pointerType=e.pointerType},r._onMenuClick=function(e){var t,a=null!=(t=e.pointerType)?t:r._pointerType;e.target===r._menuEl&&"mouse"===a&&r._menuGroup.closeCurrentMenu()&&e.preventDefault()},r._onEnterFullscreen=function(e){if(e.stopPropagation(),rq&&document[rq.fullscreenEnabled_]&&r[rq.requestFullscreen_]){var t=r[rq.requestFullscreen_]();t&&t.then&&t.then(E,E)}else r._player&&r._player.presentation.supportsMode("fullscreen")&&r._player.presentation.requestMode("fullscreen")},r._onExitFullscreen=function(e){if(e.stopPropagation(),rq){var t=document[rq.exitFullscreen_]();t&&t.then&&t.then(E,E)}r._player&&"fullscreen"===r._player.presentation.currentMode&&r._player.presentation.requestMode("inline")},r._onFullscreenChange=function(){var e=!1;if(void 0!==rq){var t=document[rq.fullscreenElement_];t&&(e=function e(t,r){if(!t||!r)return!1;if(t.contains(r))return!0;var a=r.getRootNode();return!!a.host&&e(t,a.host)}(t,em(r)))}e||void 0===r._player||"fullscreen"!==r._player.presentation.currentMode||(e=!0),O(em(r),d.FULLSCREEN,e)},r._updateAspectRatio=function(){if(void 0!==r._player){var e=r._player,t=e.videoWidth,a=e.videoHeight;t>0&&a>0?h(em(r),{"--theoplayer-video-width":""+t,"--theoplayer-video-height":""+a}):h(em(r),{"--theoplayer-video-width":"","--theoplayer-video-height":""})}},r._updateError=function(){var e=null==(t=r._player)?void 0:t.errorObject;O(em(r),d.HAS_ERROR,void 0!==e);for(var t,a,o=l(r._stateReceivers);!(a=o()).done;){var n=a.value;n[W].indexOf("error")>=0&&(n.error=e)}},r._onPlay=function(){r.setAttribute(d.HAS_FIRST_PLAY,""),r.removeAttribute(d.PAUSED),r._updateEnded()},r._onPause=function(){r.setAttribute(d.PAUSED,""),r._updateEnded()},r._updatePausedAndEnded=function(){var e=!r._player||r._player.paused;O(em(r),d.PAUSED,e),r._updateEnded()},r._updateEnded=function(){var e=!!r._player&&r._player.ended;O(em(r),d.ENDED,e)},r._updateStreamType=function(){if(void 0!==r._player){var e,t=r._player.duration;if(!isNaN(t)){if(t===1/0){e="live";var a=r.dvrThreshold,o=r._player.seekable;(a<=0||o.length>0&&o.end(o.length-1)-o.start(0)>=a)&&(e="dvr")}else e="vod";r.streamType=e}}},r._updatePlaybackRate=function(){if(void 0!==r._player)for(var e,t=r._player.playbackRate,a=l(r._stateReceivers);!(e=a()).done;){var o=e.value;o[W].indexOf("playbackRate")>=0&&(o.playbackRate=t)}},r._updateMuted=function(){void 0!==r._player&&(r.muted=r._player.muted)},r._updateActiveVideoTrack=function(){if(void 0!==r._player){var e,t,a,o,n=S(r._player.videoTracks,function(e){return e.enabled});r._activeVideoTrack!==n&&(null==(e=r._activeVideoTrack)||e.removeEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(t=r._activeVideoTrack)||t.removeEventListener("targetqualitychanged",r._updateTargetVideoQualities),r._activeVideoTrack=n,r._updateActiveVideoQuality(),r._updateTargetVideoQualities(),null==(a=r._activeVideoTrack)||a.addEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(o=r._activeVideoTrack)||o.addEventListener("targetqualitychanged",r._updateTargetVideoQualities))}},r._updateActiveVideoQuality=function(){for(var e,t,a=null==(e=r._activeVideoTrack)?void 0:e.activeQuality,o=l(r._stateReceivers);!(t=o()).done;){var n=t.value;n[W].indexOf("activeVideoQuality")>=0&&(n.activeVideoQuality=a)}},r._updateTargetVideoQualities=function(){for(var e,t=e$(r._activeVideoTrack),a=l(r._stateReceivers);!(e=a()).done;){var o=e.value;o[W].indexOf("targetVideoQualities")>=0&&(o.targetVideoQualities=t)}},r._updateCasting=function(){var e,t,a,o=null!=(a=null==(t=r._player)?void 0:null==(e=t.cast)?void 0:e.casting)&&a;O(em(r),d.CASTING,o)},r._updatePlayingAd=function(){var e,t,a,o=null!=(a=null==(t=r._player)?void 0:null==(e=t.ads)?void 0:e.playing)&&a;O(em(r),d.PLAYING_AD,o)},r._onSourceChange=function(){r.closeMenu_();var e=void 0!==r._player&&!r._player.paused;O(em(r),d.HAS_FIRST_PLAY,e)},r.setUserIdle_=function(){if(clearTimeout(r._userIdleTimer),r._userIdleTimer=0,!(r.userIdleTimeout<0)&&(r.setAttribute(d.USER_IDLE,""),"tv"==r.deviceType&&r.isUserIdle_())){var e=eT();null!==e&&e.blur()}},r.scheduleUserIdle_=function(){if(r.setUserActive_(),clearTimeout(r._userIdleTimer),r.userIdleTimeout<0){r._userIdleTimer=0;return}r._userIdleTimer=setTimeout(r.setUserIdle_,1e3*r.userIdleTimeout)},r._onTvKeyDown=function(e){if(z(e.keyCode)){r.setUserIdle_();return}var t=function e(t){if(T(t)&&"none"!==getComputedStyle(t).display){if(null!==t.getAttribute(d.TV_FOCUS))return q(t);for(var r=N(t),a=0;a<r.length;a++){var o=e(r[a]);if(o)return o}}}(em(r)),a=q(em(r)),o=eT();if(!o){var n=null!=t?t:a;n.length>0&&(n[0].focus(),o=n[0])}!r.isUserIdle_()&&(e.keyCode===c.ENTER?void 0!==r._player&&null!==o&&o.click():V(e.keyCode)&&eC(em(r),a,e.keyCode)&&(e.preventDefault(),e.stopPropagation()))},r._onKeyUp=function(e){z(e.keyCode)||r.scheduleUserIdle_()},r._onPointerUp=function(e){"touch"===e.pointerType&&(r.isPlayerOrMedia_(e.target)&&!r.hasAttribute(d.USER_IDLE)?r.setUserIdle_():(r.isUserIdle_()&&(r._lastPointerUpTime=performance.now(),r.addEventListener("click",r._onClickAfterPointerUp,!0)),r.scheduleUserIdle_()))},r._onClickAfterPointerUp=function(e){r.removeEventListener("click",r._onClickAfterPointerUp,!0),performance.now()-r._lastPointerUpTime<10&&(e.preventDefault(),e.stopPropagation())},r._onPointerMove=function(e){"mouse"===e.pointerType&&(r.setUserActive_(),r.isPlayerOrMedia_(e.target)&&r.scheduleUserIdle_())},r._onMouseLeave=function(){r.setUserIdle_()},r._onChromeSlotTransition=function(e){"opacity"===e.propertyName&&r._updateTextTrackMargins()},r._updateTextTrackMargins=function(){var e=r._player;if(void 0!==e){var t=rG(r._topChromeSlot),a=rG(r._bottomChromeSlot);e.textTrackStyle.marginTop=null==t?void 0:t.height,e.textTrackStyle.marginBottom=null==a?void 0:a.height}},r._onPreviewTimeChange=function(e){r._previewTime=e.detail.previewTime;for(var t,a=l(r._stateReceivers);!(t=a()).done;){var o=t.value;o[W].indexOf("previewTime")>=0&&(o.previewTime=r._previewTime)}};var r,a=r.attachShadow({mode:"open",delegatesFocus:!0});return a.appendChild(rV().content.cloneNode(!0)),r._configuration=e,r._playerEl=a.querySelector('[part~="media-layer"]'),r._menuEl=a.querySelector('[part~="menu-layer"]'),r._menuGroup=a.querySelector("theoplayer-menu-group"),r._topChromeEl=a.querySelector('[part~="top"]'),r._topChromeSlot=a.querySelector('slot[name="top-chrome"]'),r._bottomChromeEl=a.querySelector('[part~="bottom"]'),r._bottomChromeSlot=a.querySelector("slot:not([name])"),r._mutationObserver=new MutationObserver(r._onMutation),"undefined"!=typeof ResizeObserver&&(r._resizeObserver=new ResizeObserver(r._updateTextTrackMargins)),a.addEventListener(eD,r._onToggleMenu),a.addEventListener(tz,r._onEnterFullscreen),a.addEventListener(tG,r._onExitFullscreen),a.addEventListener(tZ,r._onPreviewTimeChange),r._topChromeSlot.addEventListener("transitionstart",r._onChromeSlotTransition),r._topChromeSlot.addEventListener("transitionend",r._onChromeSlotTransition),r._bottomChromeSlot.addEventListener("transitionstart",r._onChromeSlotTransition),r._bottomChromeSlot.addEventListener("transitionend",r._onChromeSlotTransition),r._upgradeProperty("configuration"),r._upgradeProperty("source"),r._upgradeProperty("fluid"),r._upgradeProperty("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("streamType"),r.tryInitializePlayer_(),r}r(a,t);var o=a.prototype;return o._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},o._setConfiguration=function(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()},o._setSource=function(e){this._player?this._player.source=e:this._source=e},o.connectedCallback=function(){if(u(this),this._menuGroup instanceof eF||customElements.upgrade(this._menuGroup),!this.hasAttribute(d.DEVICE_TYPE)){var e=rB()?"mobile":rF()?"tv":"desktop";this.setAttribute(d.DEVICE_TYPE,e)}this.hasAttribute(d.PAUSED)||this.setAttribute(d.PAUSED,""),this.tryInitializePlayer_();for(var t,r,a=l(this._stateReceivers);!(r=a()).done;){var o=r.value;this.propagateStateToReceiver_(o)}X(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(t=this._resizeObserver)||t.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(eR,this._onCloseMenu),this._menuGroup.addEventListener(eM,this._onMenuChange),void 0!==rq&&(document.addEventListener(rq.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rq.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),"tv"===this.deviceType&&window.addEventListener("keydown",this._onTvKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)},o.tryInitializePlayer_=function(){if(void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)){this._player=new e(this._playerEl,this._configuration),this._source&&(this._player.source=this._source,this._source=void 0),this._player.muted=this.muted,this._player.autoplay=this.autoplay;for(var t,r,a,o,n=l(this._stateReceivers);!(o=n()).done;){var i=o.value;i[W].indexOf("player")>=0&&(i.player=this._player)}this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this._player.addEventListener("resize",this._updateAspectRatio),this._player.addEventListener(["error","sourcechange","emptied"],this._updateError),this._player.addEventListener("volumechange",this._updateMuted),this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(["ended","emptied"],this._updatePausedAndEnded),this._player.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),this._player.addEventListener("ratechange",this._updatePlaybackRate),this._player.addEventListener("sourcechange",this._onSourceChange),null==(t=this._player.theoLive)||t.addEventListener("publicationloadstart",this._onSourceChange),this._player.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=this._player.cast)||r.addEventListener("castingchange",this._updateCasting),this._player.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(a=this._player.ads)||a.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd),this.dispatchEvent(ew(rH))}},o.disconnectedCallback=function(){null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange);for(var e,t,r=l(this._stateReceivers);!(t=r()).done;){var a=t.value;this.removeStateFromReceiver_(a)}this._stateReceivers.length=0,this._menuGroup.removeEventListener(eR,this._onCloseMenu),this._menuGroup.removeEventListener(eM,this._onMenuChange),void 0!==rq&&(document.removeEventListener(rq.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rq.fullscreenerror_,this._onFullscreenChange)),window.removeEventListener("keydown",this._onTvKeyDown),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("click",this._onClickAfterPointerUp,!0),this.removeEventListener("pointermove",this._onPointerMove),this.removeEventListener("mouseleave",this._onMouseLeave),this._player&&(this._player.destroy(),this._player=void 0)},o.attributeChangedCallback=function(e,t,r){if(r!==t){var o=null!=r;if(e===d.CONFIGURATION)this._setConfiguration(r?JSON.parse(r):{});else if(e===d.SOURCE)this._setSource(r?JSON.parse(r):void 0);else if(e===d.MUTED)this._player&&(this._player.muted=o);else if(e===d.AUTOPLAY)this._player&&(this._player.autoplay=o);else if(e===d.FULLSCREEN)for(var n,i=l(this._stateReceivers);!(n=i()).done;){var s=n.value;s[W].indexOf("fullscreen")>=0&&(s.fullscreen=o)}else if(e===d.DEVICE_TYPE){O(this,d.MOBILE,"mobile"===r),O(this,d.TV,"tv"===r),window.removeEventListener("keydown",this._onTvKeyDown),"tv"===r&&window.addEventListener("keydown",this._onTvKeyDown);for(var u,p=l(this._stateReceivers);!(u=p()).done;){var c=u.value;c[W].indexOf("deviceType")>=0&&(c.deviceType=r)}}else if(e===d.STREAM_TYPE){for(var y,v=l(this._stateReceivers);!(y=v()).done;){var f=y.value;f[W].indexOf("streamType")>=0&&(f.streamType=r)}var b=ew(rU,{bubbles:!0,composed:!0,detail:{streamType:r}});this.dispatchEvent(b)}else e===d.FLUID?this._updateAspectRatio():e===d.USER_IDLE||e===d.PAUSED||e===d.CASTING?this._updateTextTrackMargins():e===d.DVR_THRESHOLD&&this._updateStreamType();a.observedAttributes.indexOf(e)>=0&&h(this)}},o.propagateStateToReceiver_=function(e){var t,r=e[W];r.indexOf("player")>=0&&(e.player=this._player),r.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),r.indexOf("deviceType")>=0&&(e.deviceType=this.deviceType),r.indexOf("streamType")>=0&&(e.streamType=this.streamType),void 0!==this._player&&(r.indexOf("playbackRate")>=0&&(e.playbackRate=this._player.playbackRate),r.indexOf("error")>=0&&(e.error=this._player.errorObject),r.indexOf("activeVideoQuality")>=0&&(e.activeVideoQuality=null==(t=this._activeVideoTrack)?void 0:t.activeQuality),r.indexOf("targetVideoQualities")>=0&&(e.targetVideoQualities=e$(this._activeVideoTrack))),r.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)},o.removeStateFromReceiver_=function(e){e[W].indexOf("player")>=0&&(e.player=void 0)},o.openMenu_=function(e,t){var r=eA.fromRect(this._topChromeEl.getBoundingClientRect()),a=eA.fromRect(this._bottomChromeEl.getBoundingClientRect()),o=!0,n=!0;if(void 0!==t){var i=eA.fromRect(this.getBoundingClientRect()),l=eA.fromRect(t.getBoundingClientRect());i.width>0&&i.height>0&&(o=l.top>=i.top+i.height/2,n=l.left>=i.left+i.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,h(this,{"--theoplayer-menu-offset-top":""+Math.round(r.height)+"px","--theoplayer-menu-offset-bottom":""+Math.round(a.height)+"px","--theoplayer-menu-margin-top":o?"auto":"0","--theoplayer-menu-margin-bottom":o?"0":"auto","--theoplayer-menu-margin-left":n?"auto":"0","--theoplayer-menu-margin-right":n?"0":"auto"})},o.closeMenu_=function(){var e,t,r;null==(e=(t=this._menuGroup).closeMenu)||e.call(t),null==(r=this._menuOpener)||r.focus(),this._menuOpener=void 0},o.isUserIdle_=function(){return this.hasAttribute(d.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()},o.setUserActive_=function(){clearTimeout(this._userIdleTimer),this.removeAttribute(d.USER_IDLE)},o.isPlayerOrMedia_=function(e){return e===this||this._playerEl.contains(e)},k(a,[{key:"player",get:function(){return this._player}},{key:"configuration",get:function(){return this._configuration},set:function(e){this.removeAttribute(d.CONFIGURATION),this._setConfiguration(e)}},{key:"source",get:function(){return this._player?this._player.source:this._source},set:function(e){this.removeAttribute(d.SOURCE),this._setSource(e)}},{key:"fluid",get:function(){return this.hasAttribute(d.FLUID)},set:function(e){O(this,d.FLUID,e)}},{key:"muted",get:function(){return this.hasAttribute(d.MUTED)},set:function(e){O(this,d.MUTED,e)}},{key:"autoplay",get:function(){return this.hasAttribute(d.AUTOPLAY)},set:function(e){O(this,d.AUTOPLAY,e)}},{key:"fullscreen",get:function(){return this.hasAttribute(d.FULLSCREEN)}},{key:"paused",get:function(){return this.hasAttribute(d.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(d.ENDED)}},{key:"casting",get:function(){return this.hasAttribute(d.CASTING)}},{key:"userIdleTimeout",get:function(){var e,t="tv"===this.deviceType?5:2;return Number(null!=(e=this.getAttribute(d.USER_IDLE_TIMEOUT))?e:t)},set:function(e){e=Number(e),this.setAttribute(d.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}},{key:"deviceType",get:function(){return this.getAttribute(d.DEVICE_TYPE)||"desktop"}},{key:"streamType",get:function(){return this.getAttribute(d.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(d.STREAM_TYPE,e)}},{key:"dvrThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(d.DVR_THRESHOLD))?e:60)},set:function(e){e=Number(e),this.setAttribute(d.DVR_THRESHOLD,String(isNaN(e)?0:e))}}],[{key:"observedAttributes",get:function(){return[d.CONFIGURATION,d.SOURCE,d.MUTED,d.AUTOPLAY,d.FULLSCREEN,d.FLUID,d.DEVICE_TYPE,d.PAUSED,d.ENDED,d.CASTING,d.PLAYING_AD,d.HAS_ERROR,d.HAS_FIRST_PLAY,d.STREAM_TYPE,d.DVR_THRESHOLD,d.USER_IDLE,d.USER_IDLE_TIMEOUT]}}]),a}(n(HTMLElement));function rG(e){for(var t,r,a=D(e).filter(T),o=l(a);!(r=o()).done;){var n=r.value;if("0"!==getComputedStyle(n).opacity){var i=eA.fromRect(n.getBoundingClientRect());i.width>0&&i.height>0&&(t=t?t.union(i):i)}}return t}rz.READY_EVENT=rH,customElements.define("theoplayer-ui",rz);var rQ=p("theoplayer-default-ui",'<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative}:host([hidden]){display:none!important}theoplayer-ui{width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:-ms-fullscreen),:host(:-ms-fullscreen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}[part=title]{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);text-shadow:0 0 4px rgba(0,0,0,.75);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome] *{--theoplayer-control-height:var(--theoplayer-centered-chrome-control-height,48px)}[part=middle-chrome]{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:var(--theoplayer-mobile-control-backdrop-background,rgba(0,0,0,.5))}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:-webkit-gradient(linear,left bottom,left top,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:-webkit-gradient(linear,left top,left bottom,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}theoplayer-time-range{--theoplayer-control-height:var(--theoplayer-time-range-control-height,12px);--theoplayer-range-track-pointer-background:var(--theoplayer-time-range-track-pointer-background,hsla(0,0%,100%,.5))}[part=ad-chrome]{--theoplayer-control-height:var(--theoplayer-ad-chrome-control-height,12px);-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{-ms-flex-negative:0;flex-shrink:0}theoplayer-ad-countdown,theoplayer-ad-skip-button[disabled]{text-shadow:0 0 4px rgba(0,0,0,.75)}theoplayer-ad-countdown{min-width:0}theoplayer-ad-skip-button{-webkit-box-align:end;-ms-flex-align:end;--theoplayer-ad-skip-font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);--theoplayer-ad-skip-line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25);--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;align-items:end;border-right:0!important;justify-items:end}:host(:not([mobile])) [mobile-only],:host(:not([mobile])) theoplayer-control-bar ::slotted([mobile-only]),:host([mobile]) [mobile-hidden],:host([mobile]) theoplayer-control-bar ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [tv-only],:host(:not([tv])) theoplayer-control-bar ::slotted([tv-only]),:host([tv]) [tv-hidden],:host([tv]) theoplayer-control-bar ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui:not([playing-ad]) theoplayer-control-bar ::slotted([ad-only]),theoplayer-ui[playing-ad] [ad-hidden],theoplayer-ui[playing-ad] theoplayer-control-bar ::slotted([ad-hidden]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-ui:not([mobile]):not([casting]) theoplayer-ad-clickthrough-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:var(--theoplayer-volume-range-track-width,70px);overflow:hidden;-webkit-transition:width .2s ease-in;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display:not([stream-type=vod]){padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}theoplayer-ui[playing-ad] .theoplayer-ad-control{--theoplayer-control-height:var(--theoplayer-ad-control-height,16px)}</style><theoplayer-ui><theoplayer-control-bar slot="top-chrome" part="top-chrome"><div part="title" ad-hidden><slot name="title"></slot></div><span class="theoplayer-spacer"></span><theoplayer-language-menu-button menu="language-menu" mobile-only ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button mobile-only ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-only ad-hidden></theoplayer-chromecast-button><slot name="top-control-bar"></slot><theoplayer-ad-clickthrough-button ad-only></theoplayer-ad-clickthrough-button></theoplayer-control-bar><theoplayer-loading-indicator slot="centered-loading" no-auto-hide></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-seek-button seek-offset="-10" mobile-only ad-hidden></theoplayer-seek-button><theoplayer-play-button></theoplayer-play-button><theoplayer-seek-button seek-offset="10" mobile-only ad-hidden></theoplayer-seek-button></div><div slot="middle-chrome" part="middle-chrome"><theoplayer-chromecast-display></theoplayer-chromecast-display></div><div part="bottom-chrome"><theoplayer-control-bar part="ad-chrome" ad-only><theoplayer-ad-display></theoplayer-ad-display><theoplayer-ad-countdown></theoplayer-ad-countdown><span class="theoplayer-spacer"></span><theoplayer-ad-skip-button></theoplayer-ad-skip-button></theoplayer-control-bar><theoplayer-control-bar><theoplayer-play-button mobile-hidden ad-only class="theoplayer-ad-control"></theoplayer-play-button><theoplayer-mute-button ad-only class="theoplayer-ad-control"></theoplayer-mute-button><theoplayer-time-range show-ad-markers tv-focus class="theoplayer-ad-control"></theoplayer-time-range><theoplayer-chromecast-button tv-hidden ad-only class="theoplayer-ad-control"></theoplayer-chromecast-button><theoplayer-fullscreen-button ad-only class="theoplayer-ad-control"></theoplayer-fullscreen-button></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button tv-hidden></theoplayer-mute-button><theoplayer-volume-range mobile-hidden tv-hidden></theoplayer-volume-range><theoplayer-live-button live-only ad-hidden></theoplayer-live-button><theoplayer-time-display show-duration remaining-when-live></theoplayer-time-display><span class="theoplayer-spacer" style="pointer-events: auto"></span><theoplayer-language-menu-button menu="language-menu" mobile-hidden ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button tv-hidden mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button tv-hidden mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-fullscreen-button tv-hidden></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-error-display slot="error"></theoplayer-error-display><slot name="menu" slot="menu"></slot></theoplayer-ui>'),rY=function(e){function t(t){var r,a,o,n;return void 0===t&&(t={}),(r=e.call(this)||this)._appliedExtensions=!1,r._updateStreamType=function(){r.setAttribute(d.STREAM_TYPE,r.streamType),r._timeRange&&O(r._timeRange,d.HIDDEN,"live"===r.streamType)},r._dispatchReadyEvent=function(){r.dispatchEvent(ew(rH))},r._onTitleSlotChange=function(){r._titleSlot&&O(em(r),d.HAS_TITLE,r._titleSlot.assignedNodes().length>0)},r._shadowRoot=r.initShadowRoot(),r._ui=r._shadowRoot.querySelector("theoplayer-ui"),r._ui.addEventListener(rH,r._dispatchReadyEvent),r._ui.addEventListener(rU,r._updateStreamType),r.setConfiguration_(t),r._titleSlot=null!=(o=r._shadowRoot.querySelector('slot[name="title"]'))?o:void 0,null==(a=r._titleSlot)||a.addEventListener("slotchange",r._onTitleSlotChange),r._timeRange=null!=(n=r._shadowRoot.querySelector("theoplayer-time-range"))?n:void 0,r._upgradeProperty("configuration"),r._upgradeProperty("source"),r._upgradeProperty("fluid"),r._upgradeProperty("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("streamType"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("dvrThreshold"),r}r(t,e);var a=t.prototype;return a.initShadowRoot=function(){var e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rQ().content.cloneNode(!0)),e},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.setConfiguration_=function(e){var t;this._ui.configuration=e_({},e,{ads:e_({},null!=(t=e.ads)?t:{},{showCountdown:!1})})},a.connectedCallback=function(){if(u(this),!this.hasAttribute(d.DEVICE_TYPE)){var e=rB()?"mobile":rF()?"tv":"desktop";this.setAttribute(d.DEVICE_TYPE,e)}this._appliedExtensions||(this._appliedExtensions=!0,function(e){for(var t,r=l(rN);!(t=r()).done;)(0,t.value)(e)}(this),h(this)),this._onTitleSlotChange()},a.disconnectedCallback=function(){},a.attributeChangedCallback=function(e,r,a){if(a!==r){var o=null!=a;e===d.SOURCE?this._ui.source=a?JSON.parse(a):void 0:e===d.CONFIGURATION?this.setConfiguration_(a?JSON.parse(a):{}):e===d.MUTED?this.muted=o:e===d.AUTOPLAY?this.autoplay=o:e===d.FLUID?this.fluid=o:e===d.DEVICE_TYPE?(O(this,d.MOBILE,"mobile"===a),O(this,d.TV,"tv"===a),this._ui.setAttribute(d.DEVICE_TYPE,a)):e===d.STREAM_TYPE?this.streamType=a:e===d.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(a):e===d.DVR_THRESHOLD&&(this.dvrThreshold=Number(a)),t.observedAttributes.indexOf(e)>=0&&h(this)}},k(t,[{key:"player",get:function(){return this._ui.player}},{key:"configuration",get:function(){return this._ui.configuration},set:function(e){this.removeAttribute(d.CONFIGURATION),this.setConfiguration_(e)}},{key:"source",get:function(){return this._ui.source},set:function(e){this.removeAttribute(d.SOURCE),this._ui.source=e}},{key:"fluid",get:function(){return this._ui.fluid},set:function(e){this._ui.fluid=e}},{key:"muted",get:function(){return this._ui.muted},set:function(e){this._ui.muted=e}},{key:"autoplay",get:function(){return this._ui.autoplay},set:function(e){this._ui.autoplay=e}},{key:"streamType",get:function(){return this._ui.streamType},set:function(e){this._ui.streamType=e}},{key:"userIdleTimeout",get:function(){return this._ui.userIdleTimeout},set:function(e){this._ui.userIdleTimeout=e}},{key:"dvrThreshold",get:function(){return this._ui.dvrThreshold},set:function(e){this._ui.dvrThreshold=e}}],[{key:"observedAttributes",get:function(){return[d.CONFIGURATION,d.SOURCE,d.MUTED,d.AUTOPLAY,d.FLUID,d.DEVICE_TYPE,d.STREAM_TYPE,d.USER_IDLE_TIMEOUT,d.DVR_THRESHOLD,d.HAS_TITLE]}}]),t}(n(HTMLElement));rY.READY_EVENT=rH,customElements.define("theoplayer-default-ui",rY);var rK=p("theolive-bad-network-button",F('<span part="icon">'+tU+'<span part="warning-icon"><svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48">\n <path d="m40 936 440-760 440 760H40Zm444.175-117q12.825 0 21.325-8.675 8.5-8.676 8.5-21.5 0-12.825-8.675-21.325-8.676-8.5-21.5-8.5-12.825 0-21.325 8.675-8.5 8.676-8.5 21.5 0 12.825 8.675 21.325 8.676 8.5 21.5 8.5ZM454 708h60V484h-60v224Z"/>\n</svg></span></span>',"[part=icon]{display:inline-block;position:relative}[part=warning-icon]{display:none;height:60%;min-width:60%;position:absolute;right:-10%;top:0;width:60%}[part=warning-icon] svg{fill:red;fill:var(--theolive-bad-network-mode,red)}")),rW=function(e){function t(){var t;return(t=e.call(this,{template:rK()})||this).handleEnterBadNetworkMode_=function(){t._warningIcon&&(t._warningIcon.style.display="block")},t.handleExitBadNetworkMode_=function(){t._warningIcon&&(t._warningIcon.style.display="none")},t}return r(t,e),t.prototype.connectedCallback=function(){var t;e.prototype.connectedCallback.call(this),this.hasAttribute(d.ARIA_LABEL)||this.setAttribute(d.ARIA_LABEL,"open settings menu"),this._warningIcon=null!=(t=this.shadowRoot.querySelector('[part="warning-icon"]'))?t:void 0},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a,o;this._player!==e&&(this._player&&(null==(t=this._player.theoLive)||t.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),null==(r=this._player.theoLive)||r.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._player&&(null==(a=this._player.theoLive)||a.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),null==(o=this._player.theoLive)||o.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)))}}]),t}(Z(eV,["player"]));customElements.define("theolive-bad-network-button",rW);var rj=function(e){function t(t){var r;return(r=e.call(this,t)||this)._badNetworkMode=!1,r.handleEnterBadNetworkMode_=function(){r._badNetworkMode=!0,r.handleEnterBadNetworkMode()},r.handleExitBadNetworkMode_=function(){r._badNetworkMode=!1,r.handleExitBadNetworkMode()},r._slotEl=r.shadowRoot.querySelector("slot"),r}r(t,e);var a=t.prototype;return a.handleEnterBadNetworkMode=function(){},a.handleExitBadNetworkMode=function(){},a.attributeChangedCallback=function(e,t,r){r!==t&&e===d.ARIA_CHECKED&&t!==r&&this.handleChecked(this.checked)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a,o,n,i;this._player!==e&&(this._player&&(null==(t=this._player.theoLive)||t.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),null==(r=this._player.theoLive)||r.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._badNetworkMode=!1,this._player&&(this._badNetworkMode=null!=(i=null==(a=this._player.theoLive)?void 0:a.badNetworkMode)&&i,null==(o=this._player.theoLive)||o.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),null==(n=this._player.theoLive)||n.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this.handlePlayer())}}]),t}(Z(eE,["player"])),rZ=p("theolive-automatic-quality-selector",F("<slot></slot>")),rX=function(e){function t(){var t;return I((t=e.call(this,{template:rZ()})||this)._slotEl,"High Quality"),t}r(t,e);var a=t.prototype;return a.handleEnterBadNetworkMode=function(){this.update_()},a.handleExitBadNetworkMode=function(){this.update_()},a.handlePlayer=function(){this.update_()},a.update_=function(){var e,t,r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)!==!0;this.checked!==r&&(this.checked=r)},a.handleChecked=function(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!1)},t}(rj);customElements.define("theolive-automatic-quality-selector",rX);var rJ=p("theolive-bad-network-quality-selector",F("<slot></slot>")),r$=function(e){function t(){var t;return I((t=e.call(this,{template:rJ()})||this)._slotEl,"Low Quality"),t}r(t,e);var a=t.prototype;return a.handleEnterBadNetworkMode=function(){this.update_()},a.handleExitBadNetworkMode=function(){this.update_()},a.handlePlayer=function(){this.update_()},a.update_=function(){var e,t,r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)===!0;this.checked!==r&&(this.checked=r)},a.handleChecked=function(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!0)},t}(rj);customElements.define("theolive-bad-network-quality-selector",r$);var r0=p("theolive-bad-network-menu","<style>"+eW+"</style>\n<theoplayer-radio-group>\n <theolive-automatic-quality-selector></theolive-automatic-quality-selector>\n <theolive-bad-network-quality-selector></theolive-bad-network-quality-selector>\n</theoplayer-radio-group>\n"),r1=function(e){function t(){(t=e.call(this)||this)._onChange=function(){t.dispatchEvent(new Event("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(r0().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this.shadowRoot.addEventListener("change",this._onChange)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},t}(n(HTMLElement));customElements.define("theolive-bad-network-menu",r1);var r5=p("theolive-default-ui",'<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;font-family:Helvetica,Arial,sans-serif;position:relative;width:100%}:host([hidden]){display:none!important}theoplayer-ui{--theoplayer-loading-delay:0.1s;font-family:Helvetica,Arial,sans-serif;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:-ms-fullscreen),:host(:-ms-fullscreen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}theoplayer-menu::part(heading){display:none!important}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;justify-content:flex-end;pointer-events:none}[part=bottom-chrome],[part=middle-chrome]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap;position:relative}[part=bottom-chrome]{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:rgba(0,0,0,.5)}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:-webkit-gradient(linear,left bottom,left top,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:-webkit-gradient(linear,left top,left bottom,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}:host(:not([mobile])) [mobile-only],:host([mobile]) [mobile-hidden]{display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar,theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui[playing-ad] [ad-hidden]{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:70px;overflow:hidden;-webkit-transition:width .2s ease-in;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display{padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}p{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:20px;font-size:var(--theoplayer-text-font-size,20px)}#announcement,#loading-announcement,#offline-announcement{display:none}theolive-bad-network-button{display:none;display:var(--theolive-bad-network-button-display,none)}theoplayer-settings-menu-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;display:var(--theolive-quality-button-display,inline-flex)}</style><theoplayer-ui><p id="loading-announcement" no-auto-hide slot="centered-chrome"><slot name="loading-announcement">Loading...</slot></p><p id="offline-announcement" no-auto-hide slot="centered-chrome"><slot name="offline-announcement">The live stream hasn\'t started yet</slot></p><p id="announcement" no-auto-hide slot="centered-chrome"></p><theoplayer-loading-indicator slot="centered-loading" no-auto-hide part="loading-indicator"></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-play-button part="center-play-button"></theoplayer-play-button></div><div part="bottom-chrome"><theoplayer-control-bar><theoplayer-play-button mobile-hidden part="play-button"></theoplayer-play-button><theoplayer-mute-button part="mute-button"></theoplayer-mute-button><theoplayer-volume-range mobile-hidden part="volume-range"></theoplayer-volume-range><theoplayer-live-button ad-hidden live-only part="live-button"></theoplayer-live-button><span class="theoplayer-spacer"></span><theoplayer-settings-menu-button ad-hidden menu="all-quality-menu" part="quality-button"></theoplayer-settings-menu-button><theolive-bad-network-button ad-hidden menu="quality-menu" part="theolive-bad-network-button"></theolive-bad-network-button><theoplayer-fullscreen-button part="fullscreen-button"></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-menu id="quality-menu" slot="menu" menu-close-on-input hidden><theolive-bad-network-menu></theolive-bad-network-menu></theoplayer-menu><theoplayer-menu id="all-quality-menu" slot="menu" menu-close-on-input hidden><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-error-display slot="error" part="error-display"></theoplayer-error-display></theoplayer-ui>'),r2=function(e){function t(t){var r;return void 0===t&&(t={}),(r=e.call(this,t)||this).onReady=function(){r._ui.removeEventListener(rH,r.onReady);var e,t,a,o=r.player;o&&(null==(e=o.theoLive)||e.addEventListener("publicationloadstart",r.onLoadChannelStart),null==(t=o.theoLive)||t.addEventListener("publicationoffline",r.onChannelOffline),null==(a=o.theoLive)||a.addEventListener("publicationloaded",r.onChannelLoaded),o.addEventListener("error",r.onError))},r.onLoadChannelStart=function(){r.showMessage_("loading",void 0)},r.onChannelOffline=function(){r.showMessage_("offline",void 0)},r.onChannelLoaded=function(){r.hidePlayerError(),r.hideMessage_()},r.onError=function(e){var t=e.errorObject.code;if(t<13e3||t>=14e3){r.showMessage_("offline",void 0);return}r.stopHidingPlayerError(),r.hideMessage_()},r._loading=r._shadowRoot.querySelector("#loading-announcement"),r._offline=r._shadowRoot.querySelector("#offline-announcement"),r._announcement=r._shadowRoot.querySelector("#announcement"),r._errorDisplay=r._shadowRoot.querySelector("theoplayer-error-display"),r._playButton=r._shadowRoot.querySelector("theoplayer-play-button"),r._root=r._shadowRoot.querySelector("theoplayer-ui"),r._ui.addEventListener(rH,r.onReady),r}r(t,e);var a=t.prototype;return a.initShadowRoot=function(){var e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(r5().content.cloneNode(!0)),e},a.hidePlayerError=function(){this._root.removeAttribute("has-error"),this._errorDisplay.style.display="none"},a.stopHidingPlayerError=function(){this._root.setAttribute("has-error",""),this._errorDisplay.style.display="flex"},a.hidePlayerPlayButton_=function(){this._playButton.style.display="none"},a.stopHidingPlayerPlayButton=function(){this._playButton.style.display="inline-flex"},a.showMessage_=function(e,t){this.hidePlayerError(),this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none","loading"===e?this._loading.style.display="block":"offline"===e?this._offline.style.display="block":(this._announcement.textContent=null!=t?t:"",this._announcement.style.display="block"),this.hidePlayerPlayButton_()},a.hideMessage_=function(){this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none",this.stopHidingPlayerPlayButton()},t}(rY);customElements.define("theolive-default-ui",r2);var r3="1.8.0";export{tL as ActiveQualityDisplay,rR as AdClickThroughButton,rL as AdCountdown,rA as AdDisplay,rO as AdSkipButton,rc as AirPlayButton,d as Attribute,H as Button,ro as CastButton,rs as ChromecastButton,rp as ChromecastDisplay,eG as CloseMenuButton,tK as ColorStops,m as ControlBar,rY as DefaultUI,eg as DurationDisplay,ra as ErrorDisplay,y as ExtensionSlot,tY as FullscreenButton,rg as GestureReceiver,tb as LanguageMenu,t_ as LanguageMenuButton,Y as LinkButton,rw as LiveButton,rf as LoadingIndicator,eK as MediaTrackRadioButton,eN as Menu,eV as MenuButton,eF as MenuGroup,eo as MuteButton,et as PlayButton,tC as PlaybackRateDisplay,tT as PlaybackRateMenu,tE as PlaybackRateMenuButton,tw as PlaybackRateRadioGroup,t0 as PreviewThumbnail,t3 as PreviewTimeDisplay,tM as QualityRadioButton,tN as QualityRadioGroup,eE as RadioButton,eS as RadioGroup,tj as Range,ei as SeekButton,tF as SettingsMenu,tV as SettingsMenuButton,x as SlotContainer,Z as StateReceiverMixin,r2 as THEOliveDefaultUI,e2 as TextTrackOffRadioButton,eX as TextTrackRadioButton,tl as TextTrackStyleDisplay,ty as TextTrackStyleMenu,th as TextTrackStyleRadioGroup,tq as TextTrackStyleResetButton,ev as TimeDisplay,t9 as TimeRange,e8 as TrackRadioGroup,rz as UIContainer,rt as VolumeRange,F as buttonTemplate,G as linkButtonTemplate,eq as menuGroupTemplate,eI as menuTemplate,tW as rangeTemplate,rD as registerExtension,r3 as version};
|
|
4
|
+
*/import{ChromelessPlayer as e}from"theoplayer/chromeless";function t(e,r){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,r)}function r(e,r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&t(e,r)}function a(e,r,o){return(a=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?function(e,r,a){var o=[null];o.push.apply(o,r);var n=new(Function.bind.apply(e,o));return a&&t(n,a.prototype),n}:Reflect.construct).apply(null,arguments)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function n(e){var r="function"==typeof Map?new Map:void 0;return(n=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,n)}function n(){return a(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t(n,e)})(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function u(e){s()&&window.ShadyCSS.styleElement(e)}function h(e,t){void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss?window.ShadyCSS.styleSubtree(e,t):null!=t&&function(e,t){for(var r,a=e.style,o=l(Object.entries(t));!(r=o()).done;){var n=r.value,i=n[0],s=n[1];a.setProperty(i,s)}}(e,t)}function d(e,t){var r;return function(){if(void 0===r){var a;(r=document.createElement("template")).innerHTML=t,t=void 0,a=r,s()&&window.ShadyCSS.prepareTemplate(a,e)}return r}}var p,c,y,v,f,b,g=d("theoplayer-control-bar","<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}:host([hidden]){display:none!important}::slotted(theoplayer-time-range){-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}</style><slot></slot>"),m=function(e){function t(){var t;return(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0}).appendChild(g().content.cloneNode(!0)),t}return r(t,e),t.prototype.connectedCallback=function(){u(this)},t}(n(HTMLElement));function _(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function k(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),e}customElements.define("theoplayer-control-bar",m),(v=p||(p={})).CONFIGURATION="configuration",v.SOURCE="source",v.AUTOPLAY="autoplay",v.MUTED="muted",v.FULLSCREEN="fullscreen",v.FLUID="fluid",v.DEVICE_TYPE="device-type",v.MOBILE="mobile",v.TV="tv",v.TV_FOCUS="tv-focus",v.MOBILE_ONLY="mobile-only",v.MOBILE_HIDDEN="mobile-hidden",v.TV_ONLY="tv-only",v.TV_HIDDEN="tv-hidden",v.USER_IDLE="user-idle",v.USER_IDLE_TIMEOUT="user-idle-timeout",v.NO_AUTO_HIDE="no-auto-hide",v.DISABLED="disabled",v.HIDDEN="hidden",v.PAUSED="paused",v.ENDED="ended",v.VOLUME_LEVEL="volume-level",v.CASTING="casting",v.LOADING="loading",v.STREAM_TYPE="stream-type",v.LIVE="live",v.LIVE_ONLY="live-only",v.LIVE_HIDDEN="live-hidden",v.LIVE_THRESHOLD="live-threshold",v.DVR_THRESHOLD="dvr-threshold",v.REMAINING="remaining",v.REMAINING_WHEN_LIVE="remaining-when-live",v.SHOW_DURATION="show-duration",v.SEEK_OFFSET="seek-offset",v.MENU="menu",v.MENU_OPENED="menu-opened",v.MENU_CLOSE_ON_INPUT="menu-close-on-input",v.ARIA_LABEL="aria-label",v.ARIA_LIVE="aria-live",v.ARIA_CHECKED="aria-checked",v.HAS_AUDIO="has-audio",v.HAS_SUBTITLES="has-subtitles",v.HAS_ERROR="has-error",v.HAS_FIRST_PLAY="has-first-play",v.HAS_TITLE="has-title",v.CAST_STATE="cast-state",v.TRACK_TYPE="track-type",v.SHOW_OFF="show-off",v.PLAYING_AD="playing-ad",v.SHOW_AD_MARKERS="show-ad-markers",v.CLICKTHROUGH="clickthrough",v.PROPERTY="property",v.VALUE="value";var w=d("theoplayer-slot-container","<style>:host{display:contents}::slotted(:not([no-auto-hide])),slot{opacity:inherit}</style><slot></slot>"),E=function(e){function t(){var t;return(t=e.call(this)||this).attachShadow({mode:"open"}).appendChild(w().content.cloneNode(!0)),t}return r(t,e),t}(n(HTMLElement));function x(){}function A(e){return e.nodeType===Node.ELEMENT_NODE}function T(e){return e instanceof HTMLElement}customElements.define("theoplayer-slot-container",E);var C="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},L="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){return Array.prototype.slice.call(e)},S="function"==typeof Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){for(var r=0;r<e.length;r++)if(t(e[r],r,e))return e[r]},P="function"==typeof Array.prototype.findIndex?function(e,t){return e.findIndex(t)}:function(e,t){for(var r=0;r<e.length;r++)if(t(e[r],r,e))return r;return -1},R="function"==typeof String.prototype.startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return e.substring(0,t.length)===t},M="undefined"!=typeof Intl&&Intl.DisplayNames?function(e){var t=new Intl.DisplayNames([e,"en"],{type:"language",fallback:"none"}).of(e);if(t)return t.slice(0,1).toUpperCase()+t.slice(1)}:function(e){};function I(e,t){void 0===e.textContent?e.innerText=t:e.textContent=t}function O(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)}function N(e){if(e.shadowRoot)return e.shadowRoot.children;if("slot"===e.localName.toLowerCase()){var t=e.assignedNodes();if(t.length>0)return t.filter(A)}return T(e)?e.children:[]}function D(e){for(var t,r=[],a=l(e.assignedNodes({flatten:!0}));!(t=a()).done;){var o=t.value;A(o)&&(r.push(o),"theoplayer-slot-container"===o.nodeName.toLowerCase()&&r.push.apply(r,[].concat(L(o.children))))}return r}function q(e){var t=[];return function e(t,r){if(T(t)&&"none"!==getComputedStyle(t).display){if(t.hasAttribute("tabindex")&&Number(t.getAttribute("tabindex"))>=0){r.push(t);return}switch(t.tagName.toLowerCase()){case"button":case"input":case"textarea":case"select":case"details":r.push(t);break;case"a":t.href&&r.push(t);break;default:for(var a=N(t),o=0;o<a.length;o++)e(a[o],r)}}}(e,t),t}function B(e){var t=e.nodeName.toLowerCase();if(t.indexOf("-")>=0){if(!customElements.get(t))return customElements.whenDefined(t);customElements.upgrade(e)}}function F(e,t){return void 0===t&&(t=""),"<style>:host{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);justify-content:center;line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}:host([hidden]){display:none!important}:host(:not([disabled])){cursor:pointer}:host(:focus){-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}:host(:focus:not(:focus-visible)){-webkit-box-shadow:none;box-shadow:none}:host(:hover){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}:host([aria-checked=true]){background:#fff;background:var(--theoplayer-button-checked-background,#fff);color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]){background:transparent;background:var(--theoplayer-control-background,transparent);color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}[part$=icon],[part~=icon]{font-size:0}::slotted(img),::slotted(svg),img,svg{fill:currentColor;color:#fff;color:var(--theoplayer-icon-color,#fff);height:24px;height:var(--theoplayer-button-icon-height,var(--theoplayer-control-height,24px));max-height:100%;max-width:100%;min-width:100%;-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-button-icon-transition,none);transition:var(--theoplayer-button-icon-transition,none);vertical-align:middle;width:24px;width:var(--theoplayer-button-icon-width,var(--theoplayer-control-height,24px))}::slotted(img),img{-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-button-icon-shadow,none);box-shadow:var(--theoplayer-button-icon-shadow,none)}::slotted(svg),svg{-webkit-filter:drop-shadow(none);filter:drop-shadow(none);-webkit-filter:drop-shadow(var(--theoplayer-button-icon-shadow,none));filter:drop-shadow(var(--theoplayer-button-icon-shadow,none))}:host(:hover:not([disabled])) ::slotted(img),:host(:hover:not([disabled])) img{-webkit-box-shadow:0 0 4px hsla(0,0%,100%,.5);box-shadow:0 0 4px hsla(0,0%,100%,.5);-webkit-box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5));box-shadow:var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5))}:host(:hover:not([disabled])) ::slotted(svg),:host(:hover:not([disabled])) svg{-webkit-filter:drop-shadow(0 0 4px hsla(0,0%,100%,.5));filter:drop-shadow(0 0 4px rgba(255,255,255,.5));-webkit-filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px hsla(0,0%,100%,.5)));filter:drop-shadow(var(--theoplayer-button-hover-icon-shadow,0 0 4px rgba(255,255,255,.5)))}\n"+t+"</style>"+e}var U=d("theoplayer-button",F("<slot></slot>")),H=function(e){function t(t){(r=e.call(this)||this)._onClick=function(){r.disabled||r.handleClick()};var r,a,o=null!=(a=null==t?void 0:t.template)?a:U();return r.attachShadow({mode:"open"}).appendChild(o.content.cloneNode(!0)),r._upgradeProperty("disabled"),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(p.ARIA_LIVE)||this.setAttribute(p.ARIA_LIVE,"polite"),this.addEventListener("click",this._onClick)},a.disconnectedCallback=function(){this.removeEventListener("click",this._onClick)},a.attributeChangedCallback=function(e,r,a){if(e===p.DISABLED&&a!==r){var o=null!=a;this.setAttribute("aria-disabled",o?"true":"false"),o?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}t.observedAttributes.indexOf(e)>=0&&h(this)},a.handleClick=function(){},k(t,[{key:"disabled",get:function(){return this.hasAttribute(p.DISABLED)},set:function(e){O(this,p.DISABLED,e)}}],[{key:"observedAttributes",get:function(){return[p.DISABLED]}}]),t}(n(HTMLElement));function V(e){return 37<=e&&e<=40}function z(e){return 10009===e||27===e||88===e||461===e}function G(e,t){return void 0===t&&(t=""),F("<a>"+e+"</a>",":host{padding:0}a{color:#fff;color:var(--theoplayer-button-text-color,var(--theoplayer-text-color,#fff));padding:10px;padding:var(--theoplayer-control-padding,10px);-webkit-text-decoration:none;text-decoration:none}:host(:focus){-webkit-box-shadow:none;box-shadow:none;outline:0}a:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}a:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}:host([aria-checked=true]) a{color:#000;color:var(--theoplayer-button-checked-color,#000)}:host([disabled]) a{color:#ccc;color:var(--theoplayer-button-disabled-text-color,#ccc)}\n"+t)}customElements.define("theoplayer-button",H),(f=c||(c={}))[f.ENTER=13]="ENTER",f[f.ESCAPE=27]="ESCAPE",f[f.SPACE=32]="SPACE",f[f.END=35]="END",f[f.HOME=36]="HOME",f[f.LEFT=37]="LEFT",f[f.UP=38]="UP",f[f.RIGHT=39]="RIGHT",f[f.DOWN=40]="DOWN",f[f.BACK_SAMSUNG=88]="BACK_SAMSUNG",f[f.BACK_WEBOS=461]="BACK_WEBOS",f[f.BACK_TIZEN=10009]="BACK_TIZEN";var Q=d("theoplayer-link-button",G("<slot></slot>")),Y=function(e){function t(t){(r=e.call(this)||this)._onKeyDown=function(e){!e.altKey&&e.keyCode===c.SPACE&&(e.preventDefault(),r._linkEl.click())},r._onClick=function(){r.disabled||r.handleClick()};var r,a,o=null!=(a=null==t?void 0:t.template)?a:Q(),n=r.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(o.content.cloneNode(!0)),r._linkEl=n.querySelector("a"),r._upgradeProperty("disabled"),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(p.ARIA_LIVE)||this.setAttribute(p.ARIA_LIVE,"polite"),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)},a.disconnectedCallback=function(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)},a.setLink=function(e,t){this._linkEl.href=e,this._linkEl.target=t},a.attributeChangedCallback=function(e,t,r){if(e===p.DISABLED&&r!==t){var a=null!=r;this.setAttribute("aria-disabled",a?"true":"false"),a?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}H.observedAttributes.indexOf(e)>=0&&h(this)},a.handleClick=function(){},k(t,[{key:"disabled",get:function(){return this.hasAttribute(p.DISABLED)},set:function(e){O(this,p.DISABLED,e)}}],[{key:"observedAttributes",get:function(){return[p.DISABLED]}}]),t}(n(HTMLElement));function K(e,t,r,a,o,n,i){try{var l=e[n](i),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,o)}customElements.define("theoplayer-link-button",Y),"function"==typeof SuppressedError&&SuppressedError;var W="theoplayerUiObservedProperties";function j(e){return W in e&&C(e[W])}function Z(e,t){return function(e){function a(){return e.apply(this,arguments)}return r(a,e),k(a,[{key:W,get:function(){return t}}]),a}(e)}function X(e,t,r){return J.apply(this,arguments)}function J(){var e;return e=function(e,t,r){var a;return function(e,t){var r,a,o,n,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return n={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function l(l){return function(s){return function(l){if(r)throw TypeError("Generator is already executing.");for(;n&&(n=0,l[0]&&(i=0)),i;)try{if(r=1,a&&(o=2&l[0]?a.return:l[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,l[1])).done)return o;switch(a=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,a=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],a=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}(this,function(o){switch(o.label){case 0:if(t.contains(e))return[2];if(!(e.nodeName.indexOf("-")>=0&&!j(e)))return[3,3];return[4,Promise.resolve()];case 1:return o.sent(),[4,customElements.whenDefined(e.nodeName.toLowerCase())];case 2:o.sent(),customElements.upgrade(e),o.label=3;case 3:if(j(e)&&r(e),!((a=N(e)).length>0))return[3,5];return[4,Promise.all(L(a).map(function(e){return X(e,t,r)}))];case 4:o.sent(),o.label=5;case 5:return[2]}})},(J=function(){var t=this,r=arguments;return new Promise(function(a,o){var n=e.apply(t,r);function i(e){K(n,a,o,i,l,"next",e)}function l(e){K(n,a,o,i,l,"throw",e)}i(void 0)})}).apply(this,arguments)}var $=d("theoplayer-play-button",F('<span part="play-icon"><slot name="play-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 90 90" width="24" height="24"><path d="M77.504 50.868c-7.236 5.156-16.584 10.914-28.04 17.269-11.044 6.207-20.729 11.081-29.053 14.625l-9.224 3.43c-.581-2.493-1.125-6.188-1.632-11.08-1.143-9.75-1.715-20.513-1.715-32.288 0-10.781.777-20.858 2.333-30.234l2.251-10.772 9.787 3.29c8.476 3.375 17.663 8.166 27.563 14.373 10.48 6.562 19.472 12.805 26.97 18.73 3.749 2.982 6.449 5.279 8.099 6.891l-7.339 5.766"/></svg>\n</slot></span><span part="pause-icon"><slot name="pause-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M2.108 1.914Q2.108.5 3.522.5h4.171q1.415 0 1.415 1.414v20.172q0 1.414-1.415 1.414H3.522q-1.414 0-1.414-1.414zm12.784 0Q14.892.5 16.307.5h4.171q1.414 0 1.414 1.414v20.172q0 1.414-1.414 1.414h-4.171q-1.415 0-1.415-1.414z"/></svg>\n</slot></span><span part="replay-icon"><slot name="replay-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M12 23q-3.725 0-6.438-2.375Q2.85 18.25 2.275 14.7q-.1-.625.325-1.088.425-.462 1.125-.462.6 0 1.087.437.488.438.663 1.113.5 2.225 2.313 3.688Q9.6 19.85 12 19.85q2.8 0 4.75-1.963 1.95-1.962 1.95-4.762t-1.962-4.75q-1.963-1.95-4.763-1.95H11.8l.525.525q.375.375.363.85-.013.475-.363.825t-.85.363q-.5.012-.85-.338l-2.7-2.7q-.225-.225-.337-.513-.113-.287-.113-.587t.113-.588q.112-.287.337-.512L10.6 1.075q.35-.35.875-.363.525-.012.875.363.35.35.338.85-.013.5-.363.85l-.5.5h.15q2.05 0 3.85.775 1.8.775 3.15 2.112Q20.325 7.5 21.1 9.287q.775 1.788.775 3.838t-.775 3.85q-.775 1.8-2.112 3.137-1.338 1.338-3.138 2.113Q14.05 23 12 23Z"/></svg>\n</slot></span>',":host(:not([ended])) [part=replay-icon],:host(:not([paused])) [part=play-icon],:host([ended]) [part=pause-icon],:host([ended]) [part=play-icon],:host([paused]) [part=pause-icon]{display:none!important}")),ee=["seeking","seeked","ended","emptied","sourcechange"],et=function(e){function t(){var t;return(t=e.call(this,{template:$()})||this)._onPlay=function(){t.paused=!1,t._updateEnded()},t._onPause=function(){t.paused=!0,t._updateEnded()},t._updateFromPlayer=function(){var e,r;t.paused=null==(r=null==(e=t._player)?void 0:e.paused)||r,t._updateEnded(),t._updateDisabled()},t._updateDisabled=function(){var e;t.disabled=(null==(e=t._player)?void 0:e.source)===void 0},t._upgradeProperty("paused"),t._upgradeProperty("ended"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},a._updateEnded=function(){var e,t;this.ended=null!=(t=null==(e=this._player)?void 0:e.ended)&&t},a.handleClick=function(){void 0!==this._player&&void 0!==this._player.source&&(this._player.paused?this._player.play():this._player.pause())},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel())},a._updateAriaLabel=function(){var e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(p.ARIA_LABEL,e)},k(t,[{key:"paused",get:function(){return this.hasAttribute(p.PAUSED)},set:function(e){O(this,p.PAUSED,e)}},{key:"ended",get:function(){return this.hasAttribute(p.ENDED)},set:function(e){O(this,p.ENDED,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener("play",this._onPlay),this._player.removeEventListener("pause",this._onPause),this._player.removeEventListener(ee,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(this._player.addEventListener("play",this._onPlay),this._player.addEventListener("pause",this._onPause),this._player.addEventListener(ee,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.PAUSED,p.ENDED])}}]),t}(Z(H,["player"]));customElements.define("theoplayer-play-button",et);var er=d("theoplayer-mute-button",F('<span part="off-icon"><slot name="off-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m19.225 22.55-2.25-2.275q-.175.1-.35.187-.175.088-.375.163-.525.2-1.075-.138-.55-.337-.55-1.062 0-.225.088-.425.087-.2.287-.325.05-.025.138-.088.087-.062.137-.087l-2.65-2.7v2.425q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5H3.525q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113.462-.462 1.112-.462H5.2L1.35 4.2Q1 3.85 1 3.375t.35-.825q.35-.35.85-.35t.85.35L20.9 20.9q.35.35.35.825t-.35.825q-.35.35-.838.35-.487 0-.837-.35ZM16.25 3.325q2.6 1.1 4.188 3.425 1.587 2.325 1.587 5.225 0 1.425-.4 2.7-.4 1.275-1.125 2.4L18.775 15.3q.425-.75.638-1.588.212-.837.212-1.737 0-2.125-1.175-3.875t-3.1-2.575q-.325-.125-.525-.4t-.2-.625q0-.65.525-1.038.525-.387 1.1-.137Zm.925 10.35-2.55-2.6V7.65q1.275.6 2.088 1.762.812 1.163.812 2.588 0 .45-.087.875-.088.425-.263.8ZM12.625 9l-3.45-3.575.775-.775q.75-.75 1.713-.338.962.413.962 1.463Z"/></svg>\n</slot></span><span part="low-icon"><slot name="low-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M3.55 15.85q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113Q2.9 8.15 3.55 8.15h2.925l3.5-3.5q.75-.75 1.713-.338.962.413.962 1.463v12.45q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5Zm11.1.45V7.65q1.3.625 2.088 1.8.787 1.175.787 2.55 0 1.375-.787 2.525-.788 1.15-2.088 1.775Z"/></svg>\n</slot></span><span part="high-icon"><slot name="high-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M16.275 20.625q-.575.25-1.1-.15-.525-.4-.525-1.05 0-.35.188-.613.187-.262.512-.387 1.925-.825 3.113-2.575 1.187-1.75 1.187-3.875T18.463 8.1q-1.188-1.75-3.113-2.575-.325-.125-.512-.4-.188-.275-.188-.625 0-.65.525-1.038.525-.387 1.1-.137 2.6 1.1 4.175 3.425 1.575 2.325 1.575 5.225 0 2.9-1.575 5.225-1.575 2.325-4.175 3.425ZM3.55 15.85q-.65 0-1.112-.463-.463-.462-.463-1.112v-4.55q0-.65.463-1.113Q2.9 8.15 3.55 8.15h2.925l3.5-3.5q.75-.75 1.713-.338.962.413.962 1.463v12.45q0 1.05-.962 1.463-.963.412-1.713-.338l-3.5-3.5Zm11.1.45V7.65q1.3.625 2.088 1.8.787 1.175.787 2.55 0 1.375-.787 2.525-.788 1.15-2.088 1.775Z"/></svg>\n</slot></span>',":host(:not([volume-level=high])) [part=high-icon],:host(:not([volume-level=low])) [part=low-icon],:host(:not([volume-level=off])) [part=off-icon]{display:none!important}")),ea=["volumechange"],eo=function(e){function t(){var t;return(t=e.call(this,{template:er()})||this)._updateFromPlayer=function(){var e="off";if(void 0!==t._player){var r=t._player.volume;e=t._player.muted?"off":r<.5?"low":"high"}t.setAttribute(p.VOLUME_LEVEL,e)},t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},a.handleClick=function(){void 0!==this._player&&(this._player.muted=!this._player.muted,this._updateFromPlayer())},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel())},a._updateAriaLabel=function(){var e="off"===this.getAttribute(p.VOLUME_LEVEL)?"unmute":"mute";this.setAttribute(p.ARIA_LABEL,e)},k(t,[{key:"volumeLevel",get:function(){return this.getAttribute(p.VOLUME_LEVEL)||"off"}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(ea,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(ea,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.VOLUME_LEVEL])}}]),t}(Z(H,["player"]));customElements.define("theoplayer-mute-button",eo);var en=d("theoplayer-seek-button",F('<span part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M12 22.25q-1.925 0-3.6-.738-1.675-.737-2.912-1.974Q4.25 18.3 3.525 16.625q-.725-1.675-.725-3.6 0-1.9.725-3.575.725-1.675 1.963-2.925 1.237-1.25 2.925-1.975Q10.1 3.825 12 3.825h.15l-.7-.7q-.3-.325-.313-.788-.012-.462.313-.812.35-.35.813-.35.462 0 .812.325l2.65 2.675q.325.325.325.8 0 .475-.325.8l-2.65 2.65q-.325.325-.8.325-.475 0-.825-.35-.3-.325-.3-.8 0-.475.3-.8l.7-.7H12q-2.9 0-4.912 2.012-2.013 2.013-2.013 4.913 0 2.9 2.013 4.925Q9.1 19.975 12 19.975q2.6 0 4.55-1.687 1.95-1.688 2.325-4.238.05-.45.4-.738.35-.287.8-.287.45 0 .788.275.337.275.287.7-.375 3.55-2.987 5.9Q15.55 22.25 12 22.25Z"/></svg>\n</slot></span><span part="offset"></span>',':host{position:relative}:host([seek-offset^="-"]) [part=icon]{-webkit-transform:scaleX(-1);transform:scaleX(-1)}[part=offset]{color:#fff;color:var(--theoplayer-icon-color,#fff);font-size:7.2px;font-size:var(--theoplayer-seek-button-font-size,calc(var(--theoplayer-button-icon-height, var(--theoplayer-control-height, 24px))*.3));left:50%;position:absolute;top:52.5%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}')),ei=function(e){function t(){var t;return(t=e.call(this,{template:en()})||this)._offsetEl=t.shadowRoot.querySelector('[part="offset"]'),t._upgradeProperty("player"),t._upgradeProperty("seekOffset"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.handleClick=function(){if(void 0!==this._player){var e=this._player.duration;isNaN(e)||(this._player.currentTime=Math.max(0,Math.min(e,this._player.currentTime+this.seekOffset)))}},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===p.SEEK_OFFSET&&I(this._offsetEl,String(Math.abs(this.seekOffset))),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel()))},a._updateAriaLabel=function(){var e=this.seekOffset;this.setAttribute(p.ARIA_LABEL,e>=0?"seek forward by "+e+" seconds":"seek backward by "+-e+" seconds")},k(t,[{key:"seekOffset",get:function(){var e;return Number(null!=(e=this.getAttribute(p.SEEK_OFFSET))?e:10)},set:function(e){this.setAttribute(p.SEEK_OFFSET,String(e))}},{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.SEEK_OFFSET])}}]),t}(Z(H,["player"]));customElements.define("theoplayer-seek-button",ei);var el=":host{background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-text-color,#fff);display:inline-block;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));overflow:hidden;padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:auto;text-align:center;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}";function es(e){return!isNaN(e)&&isFinite(e)}function eu(e,t,r){void 0===t&&(t=0);var a,o=e<0||r&&0===e,n=Math.floor(t/60%60),i=Math.floor(t/3600);if(es(e=Math.abs(e))){var l=Math.floor(e%60),s=Math.floor(e/60%60),u=Math.floor(e/3600),h=u>0||i>0;a=[h?""+u:"",(h||n>=0)&&s<10?"0"+s:""+s,l<10?"0"+l:""+l]}else a=[i>0?"--":"","--","--"];return(o?"-":"")+a.filter(function(e){return""!==e}).join(":")}var eh=[["hour","hours"],["minute","minutes"],["second","seconds"]];function ed(e,t){var r=eh[t][1===e?0:1];return e+" "+r}function ep(e,t){if(!es(e))return"";var r=e<0||t&&0===e,a=Math.floor((e=Math.abs(e))%60),o=Math.floor(e/60)%60,n=Math.floor(e/3600);return""+[0===n?"":ed(n,0),0===o?"":ed(o,1),0===a&&(n>0||o>0)?"":ed(a,2)].filter(function(e){return""!==e}).join(", ")+(r?" remaining":"")}var ec=d("theoplayer-time-display","<style>"+el+"</style><span></span>"),ey=["timeupdate","seeking","seeked","durationchange"],ev=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,o=t._player?t._player.currentTime:0,n=t._player?t._player.duration:NaN,i=null==(e=t._player)?void 0:e.seekable,l=isFinite(n)?n:i&&i.length>0?i.end(0):NaN,s=t.hasAttribute(p.REMAINING)||t.hasAttribute(p.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType,u=o;s&&(u=-((l||0)-o));var h=t.hasAttribute(p.SHOW_DURATION);r=h&&!s?eu(u,l,s)+" / "+eu(l):eu(u,l,s),a=isNaN(n)?"video not loaded, unknown time":h?ep(u,s)+" of "+ep(l):ep(u,s),I(t._spanEl,r),t.setAttribute("aria-valuetext",a)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ec().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(p.ARIA_LIVE)||this.setAttribute(p.ARIA_LIVE,"off"),this._updateFromPlayer()},a.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._updateFromPlayer(),h(this))},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(ey,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(ey,this._updateFromPlayer))}},{key:"streamType",get:function(){return this.getAttribute(p.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(p.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[p.REMAINING,p.REMAINING_WHEN_LIVE,p.SHOW_DURATION,p.STREAM_TYPE]}}]),t}(Z(HTMLElement,["player","streamType"]));customElements.define("theoplayer-time-display",ev);var ef=d("theoplayer-duration-display","<style>"+el+"</style><span></span>"),eb=["durationchange"],eg=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e=eu(t._player?t._player.duration:NaN);I(t._spanEl,e)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ef().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(p.ARIA_LIVE)||this.setAttribute(p.ARIA_LIVE,"off"),this._updateFromPlayer()},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(eb,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(eb,this._updateFromPlayer))}}]),t}(Z(HTMLElement,["player"]));function em(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e_(){return(e_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}customElements.define("theoplayer-duration-display",eg);var ek=!function(){try{var e=new Event("change");return"change"===e.type}catch(e){}return!1}()?function(e,t){var r=document.createEvent("Event");return r.initEvent(e,(null==t?void 0:t.bubbles)||!1,(null==t?void 0:t.cancelable)||!1),r}:function(e,t){return new Event(e,t)},ew=!function(){try{var e=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,(null==t?void 0:t.bubbles)||!1,(null==t?void 0:t.cancelable)||!1,null==t?void 0:t.detail),r}:function(e,t){return new CustomEvent(e,t)},eE=d("theoplayer-radio-button",F("<slot></slot>")),ex=function(e){function t(t){var r;return(r=e.call(this,e_({template:eE()},t))||this)._value=void 0,r._upgradeProperty("checked"),r}r(t,e);var a=t.prototype;return a.connectedCallback=function(){this.hasAttribute("role")||this.setAttribute("role","radio"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),e.prototype.connectedCallback.call(this)},a.handleClick=function(){this.checked=!0,this.dispatchEvent(ek("input",{bubbles:!0,composed:!0}))},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===p.ARIA_CHECKED?this.dispatchEvent(ek("change",{bubbles:!0})):r===p.VALUE&&(this.value=o),t.observedAttributes.indexOf(r)>=0&&h(this))},k(t,[{key:"checked",get:function(){return"true"===this.getAttribute(p.ARIA_CHECKED)},set:function(e){this.setAttribute(p.ARIA_CHECKED,e?"true":"false")}},{key:"value",get:function(){return this._value},set:function(e){this._value=e}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.ARIA_CHECKED,p.VALUE])}}]),t}(H);customElements.define("theoplayer-radio-button",ex);var eA=function(){function e(e,t,r,a){this.x=e,this.y=t,this.width=r,this.height=a}var t=e.prototype;return t.overlaps=function(e){return this.x<e.right&&this.right>e.x&&this.y<e.bottom&&this.bottom>e.y},t.contains=function(e){return this.x<=e.x&&e.right<=this.right&&this.y<=e.y&&e.bottom<=this.bottom},t.union=function(t){var r=Math.min(this.x,t.x),a=Math.min(this.y,t.y),o=Math.max(this.right,t.right)-r,n=Math.max(this.bottom,t.bottom)-a;return new e(r,a,o,n)},t.snapToPixels=function(){return new e(Math.round(this.x),Math.round(this.y),Math.round(this.width),Math.round(this.height))},t.clone=function(){return new e(this.x,this.y,this.width,this.height)},t.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,left:this.left,right:this.right,top:this.top,bottom:this.bottom}},e.fromRect=function(t){var r,a,o,n,i,l;return new e(null!=(a=null!=(r=t.left)?r:t.x)?a:0,null!=(n=null!=(o=t.top)?o:t.y)?n:0,null!=(i=t.width)?i:0,null!=(l=t.height)?l:0)},k(e,[{key:"left",get:function(){return this.x},set:function(e){this.x=e}},{key:"right",get:function(){return this.x+this.width},set:function(e){this.x=e-this.width}},{key:"top",get:function(){return this.y},set:function(e){this.y=e}},{key:"bottom",get:function(){return this.y+this.height},set:function(e){this.y=e-this.height}}]),e}();function eT(){var e=function(){var e,t,r=document.activeElement;if(null==r)return null;for(;null!=(t=null==(e=r.shadowRoot)?void 0:e.activeElement);)r=t;return r}();return e&&e!==document.body&&T(e)?e:null}function eC(e,t,r){var a,o,n,i=eT();if(null===i)return!1;var l=eA.fromRect(e.getBoundingClientRect()).snapToPixels(),s=eA.fromRect(i.getBoundingClientRect()).snapToPixels(),u=t.map(function(e){return{child:e,rect:eA.fromRect(e.getBoundingClientRect()).snapToPixels()}}).filter(function(e){return e.rect.width>0&&e.rect.height>0});if(r===c.LEFT||r===c.RIGHT){var h=s.clone();r===c.LEFT?(h.left=l.left,h.width=s.left-l.left):(h.left=s.right,h.width=l.right-s.right),0===(n=u.filter(function(e){return h.overlaps(e.rect)})).length&&(h.top=l.top,h.height=l.height,n=u.filter(function(e){return h.overlaps(e.rect)}))}else{var d=s.clone();r===c.UP?(d.top=l.top,d.height=s.top-l.top):(d.top=s.bottom,d.height=l.bottom-s.bottom),0===(n=u.filter(function(e){return d.overlaps(e.rect)})).length&&(d.left=l.left,d.width=l.width,n=u.filter(function(e){return d.overlaps(e.rect)}))}var p=(a=n,o=function(e){var t,r;return t=e.rect,r=0,t.right<s.left?r+=s.left-t.right:s.right<t.left&&(r+=t.left-s.right),t.bottom<s.top?r+=s.top-t.bottom:s.bottom<t.top&&(r+=t.top-s.bottom),r},function(e,t){if(0!==e.length)return e.reduce(function(e,r){return 0>=t(e,r)?e:r})}(a,function(e,t){return o(e)-o(t)}));return void 0!==p&&(p.child.focus(),!0)}var eL=d("theoplayer-radio-group","<slot></slot>"),eS=function(e){function t(){(t=e.call(this)||this)._radioButtons=[],t._onSlotChange=function(){for(var e,r,a=D(t._slot),o=[],n=l(a);!(r=n()).done;){var i=r.value;if(!eP(i)){var s=B(i);s&&o.push(s)}}o.length>0&&Promise.all(o).then(t._onSlotChange,x),t._radioButtons=a.filter(eP),t.focusedRadioButton||null==(e=t.firstRadioButton)||e.setAttribute("tabindex","0")},t._onKeyDown=function(e){if("tv"===t.deviceType&&V(e.keyCode)){eC(em(t),t._radioButtons,e.keyCode)&&(e.preventDefault(),e.stopPropagation());return}switch(e.keyCode){case c.UP:case c.LEFT:t._focusPrevButton()&&e.preventDefault();break;case c.DOWN:case c.RIGHT:t._focusNextButton()&&e.preventDefault();break;case c.HOME:e.preventDefault(),t.setFocusedRadioButton(t.firstRadioButton);break;case c.END:e.preventDefault(),t.setFocusedRadioButton(t.lastRadioButton)}},t._onButtonChange=function(e){var r=e.target;null!==r&&r.checked&&t.setCheckedRadioButton(e.target)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(eL().content.cloneNode(!0)),t._slot=r.querySelector("slot"),t._upgradeProperty("deviceType"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute("role")||this.setAttribute("role","radiogroup"),this.addEventListener("keydown",this._onKeyDown),this.shadowRoot.addEventListener("change",this._onButtonChange),this._slot.addEventListener("slotchange",this._onSlotChange),this._onSlotChange()},a.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.shadowRoot.removeEventListener("change",this._onButtonChange),this._slot.removeEventListener("slotchange",this._onSlotChange)},a.allRadioButtons=function(){return this._radioButtons},a._prevRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>0?this._radioButtons[t-1]:null},a._nextRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>=0&&t<this._radioButtons.length-1?this._radioButtons[t+1]:null},a._focusPrevButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;return!!e&&(e===this.firstRadioButton?this.setFocusedRadioButton(this.lastRadioButton):this.setFocusedRadioButton(this._prevRadioButton(e)),!0)},a._focusNextButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;return!!e&&(e===this.lastRadioButton?this.setFocusedRadioButton(this.firstRadioButton):this.setFocusedRadioButton(this._nextRadioButton(e)),!0)},a.setFocusedRadioButton=function(e){this._unfocusAll(),e&&(e.tabIndex=0,e.focus())},a._unfocusAll=function(){for(var e,t=l(this.allRadioButtons());!(e=t()).done;)e.value.tabIndex=-1},a.setCheckedRadioButton=function(e){for(var t,r=l(this.allRadioButtons());!(t=r()).done;){var a=t.value;a.checked=a===e}this.dispatchEvent(ek("change",{bubbles:!0}))},k(t,[{key:"deviceType",get:function(){return this.getAttribute(p.DEVICE_TYPE)||"desktop"},set:function(e){this.setAttribute(p.DEVICE_TYPE,e)}},{key:"focusedRadioButton",get:function(){var e;return null!=(e=S(this._radioButtons,function(e){return 0===e.tabIndex}))?e:null}},{key:"checkedRadioButton",get:function(){var e;return null!=(e=S(this._radioButtons,function(e){return e.checked}))?e:null}},{key:"firstRadioButton",get:function(){var e;return null!=(e=this._radioButtons[0])?e:null}},{key:"lastRadioButton",get:function(){var e=this._radioButtons;return e.length>0?e[e.length-1]:null}}]),t}(Z(HTMLElement,["deviceType"]));function eP(e){return e instanceof ex}customElements.define("theoplayer-radio-group",eS);var eR="theoplayermenuclose",eM="theoplayermenuchange";function eI(e,t,r){return void 0===r&&(r=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;color:var(--theoplayer-menu-color,#fff);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);pointer-events:none}:host([hidden]){display:none!important}[part=heading]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-align:center;-ms-flex-align:center;align-items:center;align-self:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;pointer-events:auto}[part=heading] ::slotted(span),[part=heading]>span{padding:10px;padding:var(--theoplayer-control-padding,10px);padding-left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[part=content],[part=heading]>theoplayer-menu-close-button{pointer-events:auto}[part=content]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-item-align:center;-ms-grid-row-align:center;--theoplayer-control-hover-background:var(--theoplayer-menu-control-hover-background,hsla(0,0%,100%,.3));align-self:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:10px;margin:var(--theoplayer-menu-margin,10px);max-height:100%;max-width:100%;max-width:var(--theoplayer-menu-max-width,100%);min-height:0;min-width:80%;min-width:var(--theoplayer-menu-min-width,80%);overflow-y:auto}"+r+'</style><div part="heading"><theoplayer-menu-close-button></theoplayer-menu-close-button>'+e+'</div><div part="content">'+t+"</div>"}var eO=d("theoplayer-menu",eI('<slot name="heading"></slot>',"<slot></slot>")),eN=function(e){function t(t){(r=e.call(this)||this)._onContentInput=function(){if(r.hasAttribute(p.MENU_CLOSE_ON_INPUT)){var e=ew(eR,{bubbles:!0,composed:!0});r.dispatchEvent(e)}};var r,a,o=null!=(a=null==t?void 0:t.template)?a:eO(),n=r.attachShadow({mode:"open",delegatesFocus:!0});return n.appendChild(o.content.cloneNode(!0)),r._contentEl=n.querySelector('[part="content"]'),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(p.MENU_OPENED)||this.setAttribute("hidden",""),this._contentEl.addEventListener("input",this._onContentInput)},a.disconnectedCallback=function(){this._contentEl.removeEventListener("input",this._onContentInput)},a.openMenu=function(){this.setAttribute(p.MENU_OPENED,"")},a.closeMenu=function(){this.removeAttribute(p.MENU_OPENED)},a.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===p.MENU_OPENED){O(this,p.HIDDEN,null==a);var o=ew(eM,{bubbles:!0});this.dispatchEvent(o)}t.observedAttributes.indexOf(e)>=0&&h(this)}},k(t,[{key:"closeOnInput",get:function(){return this.hasAttribute(p.MENU_CLOSE_ON_INPUT)},set:function(e){O(this,p.MENU_CLOSE_ON_INPUT,e)}}],[{key:"observedAttributes",get:function(){return[p.MENU_OPENED,p.MENU_CLOSE_ON_INPUT]}}]),t}(n(HTMLElement));customElements.define("theoplayer-menu",eN);var eD="theoplayermenutoggle";function eq(e,t){return void 0===t&&(t=""),"<style>:host{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;pointer-events:none}:host([hidden]){display:none!important}::slotted(*),:host>*{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;justify-self:stretch;min-height:0}"+t+"</style>"+e}var eB=d("theoplayer-menu-group",eq("<slot></slot>")),eF=function(e){function t(r){(a=e.call(this)||this)._menus=[],a._openMenuStack=[],a._onMenuListChange=function(){for(var e,t=[].concat(L(a.shadowRoot.children),a._menuSlot?D(a._menuSlot):[]),r=[],o=l(t);!(e=o()).done;){var n=e.value;if(!eU(n)){var i=B(n);i&&r.push(i)}}r.length>0&&Promise.all(r).then(a._onMenuListChange,x);for(var s,u=t.filter(eU),h=l(a._menus);!(s=h()).done;){var d=s.value;0>u.indexOf(d)&&a.closeMenu(d.id)}for(var p,c=l(u);!(p=c()).done;){var y=p.value;0>a._menus.indexOf(y)&&y.closeMenu()}a._menus=u},a._onToggleMenu=function(e){var t=e.detail.menu;if(a.getMenuById(t)){e.stopPropagation();var r=T(e.target)?e.target:void 0;a.isMenuOpen(t)?a.closeMenu(t):a.openMenu(t,r)}},a._onCloseMenu=function(e){a.closeCurrentMenu()&&(e.preventDefault(),e.stopPropagation())},a._onMenuChange=function(e){var r=a.getCurrentMenu_();r&&r.menu===e.target&&r.menu instanceof t&&!r.menu.hasCurrentMenu()&&a.closeCurrentMenu()},a._onKeyDown=function(e){!e.altKey&&z(e.keyCode)&&a.closeCurrentMenu()&&(e.preventDefault(),e.stopPropagation())};var a,o,n=null!=(o=null==r?void 0:r.template)?o:eB(),i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(n.content.cloneNode(!0)),a._menuSlot=i.querySelector("slot"),a}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){var e;u(this),this.hasAttribute(p.MENU_OPENED)||this.setAttribute("hidden",""),this._onMenuListChange(),this.shadowRoot.addEventListener(eD,this._onToggleMenu),this.shadowRoot.addEventListener(eR,this._onCloseMenu),this.shadowRoot.addEventListener(eM,this._onMenuChange),null==(e=this._menuSlot)||e.addEventListener("slotchange",this._onMenuListChange)},a.disconnectedCallback=function(){var e;this.shadowRoot.removeEventListener(eD,this._onToggleMenu),this.shadowRoot.removeEventListener(eR,this._onCloseMenu),this.shadowRoot.removeEventListener(eM,this._onMenuChange),null==(e=this._menuSlot)||e.removeEventListener("slotchange",this._onMenuListChange)},a.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===p.MENU_OPENED){null!=a?(this.removeAttribute("hidden"),this.removeEventListener("keydown",this._onKeyDown),this.addEventListener("keydown",this._onKeyDown)):(this.setAttribute("hidden",""),this.removeEventListener("keydown",this._onKeyDown));var o=ew(eM,{bubbles:!0});this.dispatchEvent(o)}t.observedAttributes.indexOf(e)>=0&&h(this)}},a.getMenuById=function(e){return e&&e!==this.id?S(this._menus,function(t){return t.id===e}):this},a.openMenu=function(e,t){var r=this.getMenuById(e);if(r===this&&(r=this._menus[0]),!r)return!1;var a=this.getCurrentMenu_(),o=P(this._openMenuStack,function(e){return e.menu===r});return o>=0?this.closeMenusFromIndex_(o+1):this._openMenuStack.push({menu:r,opener:t}),a&&a.menu.closeMenu(),r.openMenu(),this.setAttribute(p.MENU_OPENED,""),r.focus(),!0},a.closeMenu=function(e){var t,r,a=this.getMenuById(e);if(a===this&&(a=null==(r=this._openMenuStack[0])?void 0:r.menu),!a)return!1;var o=P(this._openMenuStack,function(e){return e.menu===a});if(o<0)return!1;var n=this._openMenuStack[o];this.closeMenusFromIndex_(o);var i=this.getCurrentMenu_();return void 0!==i?(i.menu.openMenu(),this.setAttribute(p.MENU_OPENED,""),n.opener&&i.menu.contains(n.opener)?n.opener.focus():i.menu.focus()):(this.removeAttribute(p.MENU_OPENED),null==(t=n.opener)||t.focus()),!0},a.closeMenusFromIndex_=function(e){for(var t=this._openMenuStack.length-e,r=this._openMenuStack.length-1;r>=e;r--)this._openMenuStack[r].menu.closeMenu();this._openMenuStack.splice(e,t)},a.hasCurrentMenu=function(){return this._openMenuStack.length>0},a.getCurrentMenu_=function(){return this._openMenuStack.length>0?this._openMenuStack[this._openMenuStack.length-1]:void 0},a.closeCurrentMenu=function(){var e=this.getCurrentMenu_();return void 0!==e&&(this.closeMenu(e.menu.id),!0)},a.isMenuOpen=function(e){var t=this.getMenuById(e);return!!t&&this._openMenuStack.some(function(e){return e.menu===t})},k(t,null,[{key:"observedAttributes",get:function(){return[p.MENU_OPENED]}}]),t}(n(HTMLElement));function eU(e){return!!T(e)&&(e instanceof eN||e instanceof eF)}customElements.define("theoplayer-menu-group",eF);var eH=d("theoplayer-menu-button",F("<slot></slot>")),eV=function(e){function t(t){var r;return(r=e.call(this,e_({template:eH()},t))||this)._upgradeProperty("menu"),r}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute("aria-haspopup")||this.setAttribute("aria-haspopup","true")},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t!==p.MENU||this.hasAttribute("aria-controls")&&this.getAttribute("aria-controls")!==r||this.setAttribute("aria-controls",a)},a.handleClick=function(){var e=this.menu;if(e){var t=ew(eD,{bubbles:!0,composed:!0,detail:{menu:e}});this.dispatchEvent(t)}},k(t,[{key:"menu",get:function(){return this.getAttribute(p.MENU)},set:function(e){e?this.setAttribute(p.MENU,e):this.removeAttribute(p.MENU)}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.MENU])}}]),t}(H);customElements.define("theoplayer-menu-button",eV);var ez=d("theoplayer-menu-close-button",F('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="m10.525 19.275-6.375-6.35q-.175-.2-.262-.437Q3.8 12.25 3.8 12t.088-.488q.087-.237.262-.437l6.375-6.35q.375-.375.925-.388.55-.012.95.388.375.4.388.937.012.538-.363.938l-4.1 4.075H18.35q.55 0 .938.387.387.388.387.938 0 .55-.387.938-.388.387-.938.387H8.325l4.1 4.075q.35.375.363.925.012.55-.363.95-.4.4-.95.4-.55 0-.95-.4Z"/></svg>\n</slot></span>')),eG=function(e){function t(){return e.call(this,{template:ez()})}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"close menu")},a.handleClick=function(){var e=ew(eR,{bubbles:!0,composed:!0});this.dispatchEvent(e)},k(t,null,[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes)}}]),t}(H);customElements.define("theoplayer-menu-close-button",eG);var eQ=d("theoplayer-media-track-radio-button",F("<slot></slot>")),eY=["change","update"],eK=function(e){function t(){var t;return(t=e.call(this,{template:eQ()})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}r(t,e);var a=t.prototype;return a._updateFromTrack=function(){I(this._slotEl,this._track?function(e){var t=e.label;if(t)return t;var r=e.language;return r&&(M(r)||r)||""}(this._track):""),this.checked=!!this._track&&this._track.enabled},a._updateTrack=function(){this._track&&(this._track.enabled=this.checked)},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===p.ARIA_CHECKED&&r!==a&&this._updateTrack()},k(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(eY,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(eY,this._onTrackChange))}}]),t}(ex);customElements.define("theoplayer-media-track-radio-button",eK);var eW=":host,theoplayer-radio-group{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host([hidden]){display:none!important}",ej=d("theoplayer-text-track-radio-button",F("<slot></slot>")),eZ=["change","update"],eX=function(e){function t(){var t;return(t=e.call(this,{template:ej()})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}r(t,e);var a=t.prototype;return a._updateFromTrack=function(){I(this._slotEl,this._track?function(e){var t=e.label;if(t)return t;var r=e.language;return r&&(M(r)||r)||""}(this._track):""),this.checked=!!this._track&&"showing"===this._track.mode},a._updateTrack=function(){this._track&&(this._track.mode=this.checked?"showing":"disabled")},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===p.ARIA_CHECKED&&r!==a&&this._updateTrack()},k(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(eZ,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(eZ,this._onTrackChange))}}]),t}(ex);function eJ(e){return"subtitles"===e.kind||"captions"===e.kind}function e$(e){var t=null==e?void 0:e.targetQuality;return void 0===t||Array.isArray(t)||(t=[t]),t}function e0(e){return e?e.label&&""!==e.label?e.label:e.height?""+e.height+"p":e.bandwidth?function(e){if(e.bandwidth)return e.bandwidth>1e7?""+(e.bandwidth/1e6).toFixed(0)+"Mbps":e.bandwidth>1e6?""+(e.bandwidth/1e6).toFixed(1)+"Mbps":""+(e.bandwidth/1e3).toFixed(0)+"kbps"}(e):void 0:void 0}customElements.define("theoplayer-text-track-radio-button",eX);var e1=d("theoplayer-text-track-off-radio-button",F("<slot>Off</slot>")),e5=["change"],e2=function(e){function t(){var t;return(t=e.call(this,{template:e1()})||this)._trackList=void 0,t._onTrackChange=function(){t._updateFromTrackList()},t._upgradeProperty("trackList"),t}r(t,e);var a=t.prototype;return a._updateFromTrackList=function(){this.checked=!this._trackList||!this._trackList.filter(eJ).some(function(e){return"showing"===e.mode})},a._updateTrackList=function(){this._trackList&&this.checked&&function(e){for(var t,r=l(e);!(t=r()).done;){var a=t.value;eJ(a)&&"showing"===a.mode&&(a.mode="disabled")}}(this._trackList)},a.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===p.ARIA_CHECKED&&r!==a&&this._updateTrackList()},k(t,[{key:"trackList",get:function(){return this._trackList},set:function(e){this._trackList&&this._trackList.removeEventListener(e5,this._onTrackChange),this._trackList=e,this._updateFromTrackList(),e&&e.addEventListener(e5,this._onTrackChange)}}]),t}(ex);customElements.define("theoplayer-text-track-off-radio-button",e2);var e3=d("theoplayer-track-radio-group","<style>"+eW+"</style><theoplayer-radio-group></theoplayer-radio-group>"),e4=["addtrack","removetrack"],e8=function(e){function t(){(t=e.call(this)||this)._updateTracks=function(){var e=L(t._radioGroup.children),r=t._getTracks();void 0!==t._offButton&&(e=e.slice(1));for(var a,o=l(e);!(a=o()).done;){var n=a.value;(!n.track||0>r.indexOf(n.track))&&t._radioGroup.removeChild(n)}for(var i,s=l(r);!(i=s()).done;){var u=i.value;if(!function(e,t){for(var r=0;r<e.length;r++)if(e[r].track===t)return!0;return!1}(e,u)){var h=t._createTrackButton(u);t._radioGroup.appendChild(h)}}},t._onChange=function(){t.dispatchEvent(ek("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(e3().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("trackType"),t._upgradeProperty("showOffButton"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._updateOffButton(),this._updateTracks(),this.shadowRoot.addEventListener("change",this._onChange)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},a._getTracksList=function(){if(void 0!==this._player){var e=this.trackType;return"audio"===e?this._player.audioTracks:"video"===e?this._player.videoTracks:"subtitles"===e?this._player.textTracks:void 0}},a._updateTracksList=function(){var e=this._tracksList,t=this._getTracksList();e!==t&&(null==e||e.removeEventListener(e4,this._updateTracks),null==t||t.addEventListener(e4,this._updateTracks),this._tracksList=t,this._updateOffButton())},a._getTracks=function(){if(void 0===this._player)return[];var e=this.trackType;return"audio"===e?this._player.audioTracks:"video"===e?this._player.videoTracks:"subtitles"===e?this._player.textTracks.filter(eJ):[]},a._createTrackButton=function(e){if("subtitles"===this.trackType){var t=new eX;return t.track=e,t}var r=new eK;return r.track=e,r},a._updateOffButton=function(){"subtitles"===this.trackType&&this.showOffButton?(void 0===this._offButton&&(this._offButton=new e2,this._radioGroup.insertBefore(this._offButton,this._radioGroup.firstChild)),this._offButton.trackList=this._tracksList):void 0!==this._offButton&&(this._radioGroup.removeChild(this._offButton),this._offButton=void 0)},a.attributeChangedCallback=function(e,r,a){a!==r&&(e===p.TRACK_TYPE?(this._updateTracksList(),this._updateTracks()):e===p.SHOW_OFF&&(this._updateOffButton(),this._updateTracks()),t.observedAttributes.indexOf(e)>=0&&h(this))},k(t,[{key:"trackType",get:function(){return this.getAttribute(p.TRACK_TYPE)||"audio"},set:function(e){this.setAttribute(p.TRACK_TYPE,e||"audio")}},{key:"showOffButton",get:function(){return this.hasAttribute(p.SHOW_OFF)},set:function(e){O(this,p.SHOW_OFF,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(this._player=e,this._updateTracksList(),this._updateTracks())}}],[{key:"observedAttributes",get:function(){return[p.TRACK_TYPE,p.SHOW_OFF]}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-track-radio-group",e8);var e7=".theoplayer-menu-table{-ms-grid-columns:-webkit-max-content 1fr;-ms-grid-columns:max-content 1fr;-ms-grid-rows:auto auto;display:-ms-grid;display:grid;grid-template-columns:-webkit-max-content 1fr;grid-template-columns:max-content 1fr;grid-template-rows:auto auto}.theoplayer-menu-table>:first-child{-ms-grid-column:1;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(2){-ms-grid-column:2;-ms-grid-row:1}.theoplayer-menu-table>:nth-child(3){-ms-grid-column:1;-ms-grid-row:2}.theoplayer-menu-table>:nth-child(4){-ms-grid-column:2;-ms-grid-row:2}.theoplayer-menu-table>*{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px)}.theoplayer-menu-table>span{display:block}";function e6(e){var t,r;return e?R(e,"rgb")?(t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i))?{r_:parseInt(t[1],10),g_:parseInt(t[2],10),b_:parseInt(t[3],10),a_:t[4]?parseFloat(t[4]):1}:null:R(e,"#")&&(r=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i))?{r_:parseInt(r[1],16),g_:parseInt(r[2],16),b_:parseInt(r[3],16),a_:1}:null:null}function e9(e){return"rgba("+e.r_+","+e.g_+","+e.b_+","+e.a_+")"}function te(e){return"rgb("+e.r_+","+e.g_+","+e.b_+")"}function tt(e,t){return{r_:e.r_,g_:e.g_,b_:e.b_,a_:t}}var tr=e6("#ffffff"),ta=e6("#000000"),to=[["White","rgb(255,255,255)"],["Yellow","rgb(255,255,0)"],["Green","rgb(0,255,0)"],["Cyan","rgb(0,255,255)"],["Blue","rgb(0,0,255)"],["Magenta","rgb(255,0,255)"],["Red","rgb(255,0,0)"],["Black","rgb(0,0,0)"]],tn=[["Monospace Serif",'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace'],["Proportional Serif",'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif'],["Monospace Sans",'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace'],["Proportional Sans",'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif']],ti=[["None","none"],["Drop shadow","dropshadow"],["Raised","raised"],["Depressed","depressed"],["Uniform","uniform"]],tl=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){if(void 0!==t._player){var e=t.property;switch(e){case"fontFamily":I(t._spanEl,function(e){if(!e)return"Default";var t=S(tn,function(t){return t[0],t[1]===e});return t?t[0]:"Custom"}(t._player.textTrackStyle.fontFamily));break;case"fontColor":case"backgroundColor":case"windowColor":I(t._spanEl,function(e){if(!e)return"Default";var t=e6(e);if(t){var r=te(t),a=S(to,function(e){return e[0],e[1]===r});if(a)return a[0]}return"Custom"}(t._player.textTrackStyle[e]));break;case"fontOpacity":I(t._spanEl,ts(t._player.textTrackStyle.fontColor));break;case"backgroundOpacity":I(t._spanEl,ts(t._player.textTrackStyle.backgroundColor));break;case"windowOpacity":I(t._spanEl,ts(t._player.textTrackStyle.windowColor));break;case"edgeStyle":I(t._spanEl,function(e){if(!e)return"Default";var t=S(ti,function(t){return t[0],t[1]===e});return t?t[0]:"Custom"}(t._player.textTrackStyle.edgeStyle));break;default:var r=t._player.textTrackStyle[e];I(t._spanEl,r||"Default")}}};var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("property"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this),this.hasAttribute(p.PROPERTY)||(this.property="fontColor")},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.attributeChangedCallback=function(e,r,a){a!==r&&(e===p.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&h(this))},k(t,[{key:"property",get:function(){return this.getAttribute(p.PROPERTY)},set:function(e){this.setAttribute(p.PROPERTY,e)}},{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(null==(t=this._textTrackStyle)||t.removeEventListener("change",this._updateFromPlayer),this._player=e,this._textTrackStyle=null==e?void 0:e.textTrackStyle,this._updateFromPlayer(),null==(r=this._textTrackStyle)||r.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[p.PROPERTY]}}]),t}(Z(HTMLElement,["player"]));function ts(e){if(!e)return"Default";var t=e6(e);return t?""+100*t.a_+"%":"Custom"}customElements.define("theoplayer-text-track-style-display",tl);var tu=d("theoplayer-text-track-style-radio-group","<style>"+eW+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>"),th=function(e){function t(){(t=e.call(this)||this)._updateChecked=function(){for(var e,r=t._radioGroup.allRadioButtons(),a=l(r);!(e=a()).done;){var o=e.value;o.checked=o.value===t.value}},t._onChange=function(){var e=t._radioGroup.checkedRadioButton;null!==e&&t.value!==e.value&&(t.value=e.value)},t._updateFromPlayer=function(){if(void 0!==t._player)switch(t.property){case"fontColor":var e,r,a=t._player.textTrackStyle.fontColor;t.value=a?te(null!=(r=e6(a))?r:tr):"";break;case"backgroundColor":var o,n=t._player.textTrackStyle.backgroundColor;t.value=n?te(null!=(o=e6(n))?o:ta):"";break;case"windowColor":var i,l=t._player.textTrackStyle.windowColor;t.value=l?te(null!=(i=e6(l))?i:ta):"";break;case"fontOpacity":var s,u,h=t._player.textTrackStyle.fontColor;t.value=h?String((null!=(u=null==(s=e6(h))?void 0:s.a_)?u:1)*100):"";break;case"backgroundOpacity":var d,p,c=t._player.textTrackStyle.backgroundColor;t.value=c?String((null!=(p=null==(d=e6(c))?void 0:d.a_)?p:1)*100):"";break;case"windowOpacity":var y,v,f=t._player.textTrackStyle.windowColor;t.value=f?String((null!=(v=null==(y=e6(f))?void 0:y.a_)?v:1)*100):"";break;default:t.value=null!=(e=t._player.textTrackStyle[t.property])?e:""}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tu().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._upgradeProperty("property"),this._upgradeProperty("value"),this._upgradeProperty("player"),this.hasAttribute(p.PROPERTY)||(this.property="fontColor"),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a._updateToPlayer=function(){if(void 0!==this._player)switch(this.property){case"fontColor":this._player.textTrackStyle.fontColor=td(this.value,this._player.textTrackStyle.fontColor,tr);break;case"backgroundColor":this._player.textTrackStyle.backgroundColor=td(this.value,this._player.textTrackStyle.backgroundColor,ta);break;case"windowColor":this._player.textTrackStyle.windowColor=td(this.value,this._player.textTrackStyle.windowColor,ta);break;case"fontOpacity":this._player.textTrackStyle.fontColor=tp(this.value,this._player.textTrackStyle.fontColor,tr);break;case"backgroundOpacity":this._player.textTrackStyle.backgroundColor=tp(this.value,this._player.textTrackStyle.backgroundColor,ta);break;case"windowOpacity":this._player.textTrackStyle.windowColor=tp(this.value,this._player.textTrackStyle.windowColor,ta);break;default:this._player.textTrackStyle[this.property]=""==this.value?void 0:this.value}},a.attributeChangedCallback=function(e,r,a){a!==r&&(e===p.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&h(this))},k(t,[{key:"property",get:function(){return this.getAttribute(p.PROPERTY)},set:function(e){this.setAttribute(p.PROPERTY,e)}},{key:"value",get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this._updateToPlayer(),this._updateChecked(),this.dispatchEvent(ek("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(null==(t=this._textTrackStyle)||t.removeEventListener("change",this._updateFromPlayer),this._player=e,this._textTrackStyle=null==e?void 0:e.textTrackStyle,this._updateFromPlayer(),null==(r=this._textTrackStyle)||r.addEventListener("change",this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[p.PROPERTY]}}]),t}(Z(HTMLElement,["player"]));function td(e,t,r){var a,o,n,i=null!=(o=null==(a=e6(t))?void 0:a.a_)?o:1;if(""!==e||1!==i)return e9(tt(null!=(n=e6(e))?n:r,i))}function tp(e,t,r){var a,o=null!=(a=e6(t))?a:r;if(""!==e||o.r_!==r.r_||o.g_!==r.g_||o.b_!==r.b_)return e9(tt(o,""==e?1:Number(e)/100))}customElements.define("theoplayer-text-track-style-radio-group",th);var tc=d("theoplayer-text-track-style-menu",eq('<theoplayer-menu class="theoplayer-text-track-style-menu"><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Subtitle options</slot></span><theoplayer-text-track-style-reset-button class="theoplayer-menu-heading-button" slot="heading"></theoplayer-text-track-style-reset-button><div class="theoplayer-menu-table"><span>Font family</span><theoplayer-menu-button menu="font-family-menu"><theoplayer-text-track-style-display property="fontFamily"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font color</span><theoplayer-menu-button menu="font-color-menu"><theoplayer-text-track-style-display property="fontColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font opacity</span><theoplayer-menu-button menu="font-opacity-menu"><theoplayer-text-track-style-display property="fontOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Font size</span><theoplayer-menu-button menu="font-size-menu"><theoplayer-text-track-style-display property="fontSize"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background color</span><theoplayer-menu-button menu="background-color-menu"><theoplayer-text-track-style-display property="backgroundColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Background opacity</span><theoplayer-menu-button menu="background-opacity-menu"><theoplayer-text-track-style-display property="backgroundOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window color</span><theoplayer-menu-button menu="window-color-menu"><theoplayer-text-track-style-display property="windowColor"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Window opacity</span><theoplayer-menu-button menu="window-opacity-menu"><theoplayer-text-track-style-display property="windowOpacity"></theoplayer-text-track-style-display></theoplayer-menu-button><span>Character edge style</span><theoplayer-menu-button menu="edge-style-menu"><theoplayer-text-track-style-display property="edgeStyle"></theoplayer-text-track-style-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="font-family-menu" menu-close-on-input hidden><span slot="heading">Font family</span><theoplayer-text-track-style-radio-group property="fontFamily"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value=\'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace\'>Monospace Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif\'>Proportional Serif</theoplayer-radio-button><theoplayer-radio-button value=\'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace\'>Monospace Sans</theoplayer-radio-button><theoplayer-radio-button value=\'Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif\'>Proportional Sans</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-color-menu" menu-close-on-input hidden><span slot="heading">Font color</span><theoplayer-text-track-style-radio-group property="fontColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-opacity-menu" menu-close-on-input hidden><span slot="heading">Font opacity</span><theoplayer-text-track-style-radio-group property="fontOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="font-size-menu" menu-close-on-input hidden><span slot="heading">Font size</span><theoplayer-text-track-style-radio-group property="fontSize"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="50%">50%</theoplayer-radio-button><theoplayer-radio-button value="75%">75%</theoplayer-radio-button><theoplayer-radio-button value="100%">100%</theoplayer-radio-button><theoplayer-radio-button value="150%">150%</theoplayer-radio-button><theoplayer-radio-button value="200%">200%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-color-menu" menu-close-on-input hidden><span slot="heading">Background color</span><theoplayer-text-track-style-radio-group property="backgroundColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="background-opacity-menu" menu-close-on-input hidden><span slot="heading">Background opacity</span><theoplayer-text-track-style-radio-group property="backgroundOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-color-menu" menu-close-on-input hidden><span slot="heading">Window color</span><theoplayer-text-track-style-radio-group property="windowColor"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,255)">White</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,255,0)">Yellow</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,0)">Green</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,255,255)">Cyan</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,255)">Blue</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,255)">Magenta</theoplayer-radio-button><theoplayer-radio-button value="rgb(255,0,0)">Red</theoplayer-radio-button><theoplayer-radio-button value="rgb(0,0,0)">Black</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="window-opacity-menu" menu-close-on-input hidden><span slot="heading">Window opacity</span><theoplayer-text-track-style-radio-group property="windowOpacity"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="25">25%</theoplayer-radio-button><theoplayer-radio-button value="50">50%</theoplayer-radio-button><theoplayer-radio-button value="75">75%</theoplayer-radio-button><theoplayer-radio-button value="100">100%</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu><theoplayer-menu id="edge-style-menu" menu-close-on-input hidden><span slot="heading">Character edge style</span><theoplayer-text-track-style-radio-group property="edgeStyle"><theoplayer-radio-button value="">Default</theoplayer-radio-button><theoplayer-radio-button value="none">None</theoplayer-radio-button><theoplayer-radio-button value="dropshadow">Drop shadow</theoplayer-radio-button><theoplayer-radio-button value="raised">Raised</theoplayer-radio-button><theoplayer-radio-button value="depressed">Depressed</theoplayer-radio-button><theoplayer-radio-button value="uniform">Uniform</theoplayer-radio-button></theoplayer-text-track-style-radio-group></theoplayer-menu>',e7+"\n.theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}")),ty=function(e){function t(){return e.call(this,{template:tc()})}return r(t,e),t}(eF);customElements.define("theoplayer-text-track-style-menu",ty);var tv=d("theoplayer-language-menu",eq('<theoplayer-menu><span class="theoplayer-menu-heading" slot="heading"><slot name="heading">Language</slot></span><theoplayer-settings-menu-button class="theoplayer-menu-heading-button" menu="subtitle-options-menu" slot="heading"></theoplayer-settings-menu-button><div part="content"><div part="audio"><h2>Audio</h2><theoplayer-track-radio-group track-type="audio"></theoplayer-track-radio-group></div><div part="subtitles"><h2>Subtitles</h2><theoplayer-track-radio-group track-type="subtitles" show-off></theoplayer-track-radio-group></div></div></theoplayer-menu><theoplayer-text-track-style-menu id="subtitle-options-menu"></theoplayer-text-track-style-menu>',".theoplayer-menu-heading{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.theoplayer-menu-heading-button{-ms-flex-item-align:end;align-self:flex-end}[part=audio],[part=subtitles],theoplayer-track-radio-group{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:0}[part=content]{-ms-grid-columns:1fr;display:-ms-grid;display:grid;grid-template-columns:1fr;min-height:0}:host([has-audio][has-subtitles]) [part=content]{-ms-grid-columns:1fr 10px 1fr;grid-template-columns:1fr 10px 1fr}:host([has-audio][has-subtitles]) [part=audio]{-ms-grid-column:1;grid-column:1}:host([has-audio][has-subtitles]) [part=subtitles]{-ms-grid-column:3;grid-column:3}:host(:not([has-audio])) [part=audio],:host(:not([has-subtitles])) [part=subtitles]{display:none!important}[part=audio],[part=subtitles]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-orient:vertical;-webkit-box-direction:normal;align-self:stretch;-ms-flex-direction:column;flex-direction:column;text-align:center}h2{margin:0 0 .5em}theoplayer-track-radio-group{overflow-y:auto}")),tf=["addtrack","removetrack"],tb=function(e){function t(){var t;return(t=e.call(this,{template:tv()})||this)._updateAudioTracks=function(){var e,r,a=null!=(r=null==(e=t._player)?void 0:e.audioTracks)?r:[];O(em(t),p.HAS_AUDIO,a.length>1)},t._updateTextTracks=function(){var e,r,a=null!=(r=null==(e=t._player)?void 0:e.textTracks.filter(eJ))?r:[];O(em(t),p.HAS_SUBTITLES,a.length>0)},t._upgradeProperty("player"),t}return r(t,e),t.prototype.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&h(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a,o;this._player!==e&&(null==(t=this._audioTrackList)||t.removeEventListener(tf,this._updateAudioTracks),null==(r=this._textTrackList)||r.removeEventListener(tf,this._updateTextTracks),this._player=e,this._audioTrackList=null==e?void 0:e.audioTracks,this._textTrackList=null==e?void 0:e.textTracks,this._updateAudioTracks(),this._updateTextTracks(),null==(a=this._audioTrackList)||a.addEventListener(tf,this._updateAudioTracks),null==(o=this._textTrackList)||o.addEventListener(tf,this._updateTextTracks))}}],[{key:"observedAttributes",get:function(){return[].concat(eF.observedAttributes,[p.HAS_AUDIO,p.HAS_SUBTITLES])}}]),t}(Z(eF,["player"]));customElements.define("theoplayer-language-menu",tb);var tg=d("theoplayer-language-menu-button",F('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.469 15.446a6.892 6.892 310 1 0-4.772 3.342l2.872.986q1.9.626 1.9-1.374v-2.954l2.598 1.5V22q0 2-1.899 1.374l-4.95-1.632a9.892 9.892 310 1 1 6.849-4.796zM7 10a1 1 180 1 0 0 2 1 1 180 1 0 0-2zm4 0a1 1 180 1 0 0 2h5a1 1 180 1 0 0-2zm-3 4a1 1 180 1 0 0 2h3a1 1 180 1 0 0-2zm7 0a1 1 180 1 0 0 2 1 1 180 1 0 0-2z"/></svg>\n</slot></span>')),tm=["addtrack","removetrack"],t_=function(e){function t(){var t;return(t=e.call(this,{template:tg()})||this)._updateTracks=function(){var e=void 0!==t._player&&(t._player.audioTracks.length>=2||t._player.textTracks.some(eJ));O(em(t),p.HIDDEN,!e)},t._upgradeProperty("player"),t}return r(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"open language menu")},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a,o;this._player!==e&&(null==(t=this._audioTrackList)||t.removeEventListener(tm,this._updateTracks),null==(r=this._textTrackList)||r.removeEventListener(tm,this._updateTracks),this._player=e,this._audioTrackList=null==e?void 0:e.audioTracks,this._textTrackList=null==e?void 0:e.textTracks,this._updateTracks(),null==(a=this._audioTrackList)||a.addEventListener(tm,this._updateTracks),null==(o=this._textTrackList)||o.addEventListener(tm,this._updateTracks))}}]),t}(Z(eV,["player"]));customElements.define("theoplayer-language-menu-button",t_);var tk=d("theoplayer-playback-rate-radio-group","<style>"+eW+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>"),tw=function(e){function t(){(t=e.call(this)||this)._value=1,t._updateChecked=function(){for(var e,r=t._radioGroup.allRadioButtons(),a=l(r);!(e=a()).done;){var o=e.value;o.checked=Number(o.value)===t.value}},t._onChange=function(){var e=t._radioGroup.checkedRadioButton;null!==e&&t.value!==Number(e.value)&&(t.value=e.value)},t._updateFromPlayer=function(){void 0!==t._player&&(t.value=t._player.playbackRate)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tk().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t._upgradeProperty("value"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},k(t,[{key:"value",get:function(){return this._value},set:function(e){e=Number(e),this._value!==e&&(this._value=e,void 0!==this._player&&(this._player.playbackRate=e),this._updateChecked(),this.dispatchEvent(ek("change",{bubbles:!0})))}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener("ratechange",this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("ratechange",this._updateFromPlayer))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-playback-rate-radio-group",tw);var tE=d("theoplayer-playback-rate-button",F('<span part="icon"><slot><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 96 960 960" height="24" width="24"><path d="M418 716q24 24 61.435 23.5T536 712l171.826-250.174q12.392-19.087-1.652-32.283-14.044-13.195-33.131-.804L424 600q-27 19.13-28.5 55.565T418 716ZM204 915.218q-25.522 0-49.609-12.826-24.087-12.826-36.783-34.783-26.565-46.696-41.696-100.022Q60.782 714.261 60.782 656q0-86.391 32.913-162.566 32.913-76.174 89.956-133.217 57.044-57.044 133.436-90.24Q393.478 236.782 480 236.782q43.87 0 85.87 8.934 42 8.935 81 26.239 28.913 12.696 33.826 38.762 4.913 26.065-13.044 48.153-10.261 12.391-28.217 15.521-17.957 3.131-32.914-3.565-31.434-14.869-62.043-21.456-30.608-6.587-64.478-6.587-129.043 0-221.13 91.522Q166.783 525.826 166.783 656q0 42 10.935 79.891 10.934 37.891 30.804 73.326h542.956q23-38 32.37-75.608Q793.217 696 793.217 652q0-31.609-6.804-62.565-6.804-30.956-20.543-60.826-7.566-16.957-3.718-35.196 3.848-18.239 17.674-29.5 21.653-18.522 47.153-10.261t36.761 35.609q16.305 38 25.457 78.217 9.152 40.218 10.021 82.522 0 58.696-14.348 113.522-14.347 54.826-42.478 104.087-14.391 23.087-37.631 35.348-23.239 12.261-48.761 12.261H204ZM480 576Z"/></svg>\n</slot></span>')),tx=function(e){function t(){return e.call(this,{template:tE()})}return r(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"open playback speed menu")},t}(eV);customElements.define("theoplayer-playback-rate-menu-button",tx);var tA=d("theoplayer-playback-rate-menu",eI('<span slot="heading"><slot name="heading">Playback speed</slot></span>','<theoplayer-playback-rate-radio-group><theoplayer-radio-button value="0.25">0.25x</theoplayer-radio-button><theoplayer-radio-button value="0.5">0.5x</theoplayer-radio-button><theoplayer-radio-button value="1">Normal</theoplayer-radio-button><theoplayer-radio-button value="1.25">1.25x</theoplayer-radio-button><theoplayer-radio-button value="1.5">1.5x</theoplayer-radio-button><theoplayer-radio-button value="2">2x</theoplayer-radio-button></theoplayer-playback-rate-radio-group>')),tT=function(e){function t(){return e.call(this,{template:tA()})}return r(t,e),t}(eN);customElements.define("theoplayer-playback-rate-menu",tT);var tC=function(e){function t(){(t=e.call(this)||this)._playbackRate=1;var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("playbackRate"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this)},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},k(t,[{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){this._playbackRate=e,I(this._spanEl,1===e?"Normal":""+e+"x")}}]),t}(Z(HTMLElement,["playbackRate"]));customElements.define("theoplayer-playback-rate-display",tC);var tL=function(e){function t(){(t=e.call(this)||this)._activeVideoQuality=void 0,t._targetVideoQualities=void 0;var t,r=t.attachShadow({mode:"open"});return t._spanEl=document.createElement("span"),r.appendChild(t._spanEl),t._upgradeProperty("activeVideoQuality"),t._upgradeProperty("targetVideoQualities"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){u(this)},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.update_=function(){var e,t=void 0!==this._targetVideoQualities&&1===this._targetVideoQualities.length,r=t?this._targetVideoQualities[0]:void 0,a=e0(null!=r?r:this._activeVideoQuality);e=t?null!=a?a:"Unknown":"Automatic"+(a?" ("+a+")":""),I(this._spanEl,e)},k(t,[{key:"activeVideoQuality",get:function(){return this._activeVideoQuality},set:function(e){this._activeVideoQuality=e,this.update_()}},{key:"targetVideoQualities",get:function(){return this._targetVideoQualities},set:function(e){this._targetVideoQualities=e,this.update_()}}]),t}(Z(HTMLElement,["activeVideoQuality","targetVideoQualities"]));customElements.define("theoplayer-active-quality-display",tL);var tS=d("theoplayer-quality-radio-button",F("<slot></slot>")),tP=["activequalitychanged","targetqualitychanged"],tR=["update"],tM=function(e){function t(){var t;return(t=e.call(this,{template:tS()})||this)._track=void 0,t._quality=void 0,t._updateFromTrack=function(){if(void 0!==t._track){var e=t._track.targetQuality;Array.isArray(e)&&(e=1===e.length?e[0]:void 0),void 0===t._quality?t.checked=void 0===e:t.checked=e===t._quality}t._updateFromQuality()},t._updateFromQuality=function(){var e;I(t._slotEl,null!=(e=e0(t._quality))?e:"Automatic")},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t._upgradeProperty("quality"),t}r(t,e);var a=t.prototype;return a._updateTargetQuality=function(){this._track&&this.checked&&(this._track.targetQuality=this._quality)},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===p.ARIA_CHECKED&&this._updateTargetQuality(),t.observedAttributes.indexOf(r)>=0&&h(this))},k(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(tP,this._updateFromTrack),this._track=e,this._updateFromTrack(),e&&e.addEventListener(tP,this._updateFromTrack))}},{key:"quality",get:function(){return this._quality},set:function(e){this._quality!==e&&(this._quality&&this._quality.removeEventListener(tR,this._updateFromQuality),this._quality=e,this._updateFromTrack(),e&&e.addEventListener(tR,this._updateFromQuality))}}]),t}(ex);customElements.define("theoplayer-quality-radio-button",tM);var tI=d("theoplayer-quality-radio-group","<style>"+eW+"</style><theoplayer-radio-group></theoplayer-radio-group>"),tO=["addtrack","removetrack","change"],tN=function(e){function t(){(t=e.call(this)||this)._onChange=function(){t.dispatchEvent(ek("change",{bubbles:!0}))},t._updateTrack=function(){var e=t._player?S(t._player.videoTracks,function(e){return e.enabled}):void 0;t._track!==e&&(t._track=e,t._update())},t._update=function(){for(var e=L(t._radioGroup.children),r=t._track?t._track.qualities:[],a=1===r.length?[void 0]:[].concat([void 0],r),o=0;o<e.length&&o<a.length;){var n=e[o];n.track=t._track,n.quality=a[o],o++}for(;o<e.length;)t._radioGroup.removeChild(e[o]),o++;for(;o<a.length;){var i=new tM;i.track=t._track,i.quality=a[o],t._radioGroup.appendChild(i),o++}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tI().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this._updateTrack(),this.shadowRoot.addEventListener("change",this._onChange)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(null==(t=this._videoTracks)||t.removeEventListener(tO,this._updateTrack),this._player=e,this._videoTracks=null==e?void 0:e.videoTracks,this._updateTrack(),null==(r=this._videoTracks)||r.addEventListener(tO,this._updateTrack))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-quality-radio-group",tN);var tD=d("theoplayer-text-track-style-reset-button",F("<slot>Reset</slot>")),tq=function(e){function t(){return e.call(this,{template:tD()})}return r(t,e),t.prototype.handleClick=function(){if(void 0!==this._player){var e=this._player.textTrackStyle;e.fontFamily=void 0,e.fontColor=void 0,e.fontSize=void 0,e.backgroundColor=void 0,e.windowColor=void 0,e.edgeStyle=void 0}},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes)}}]),t}(Z(H,["player"]));customElements.define("theoplayer-text-track-style-reset-button",tq);var tB=d("theoplayer-settings-menu",eq('<theoplayer-menu><span slot="heading"><slot name="heading">Settings</slot></span><div class="theoplayer-menu-table"><span>Quality</span><theoplayer-menu-button menu="quality-menu"><theoplayer-active-quality-display></theoplayer-active-quality-display></theoplayer-menu-button><span>Playback speed</span><theoplayer-menu-button menu="playback-rate-menu"><theoplayer-playback-rate-display></theoplayer-playback-rate-display></theoplayer-menu-button></div></theoplayer-menu><theoplayer-menu id="quality-menu" menu-close-on-input hidden><span slot="heading">Quality</span><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-playback-rate-menu id="playback-rate-menu" menu-close-on-input hidden><span slot="heading">Playback speed</span></theoplayer-playback-rate-menu>',e7)),tF=function(e){function t(){return e.call(this,{template:tB()})}return r(t,e),t}(eF);customElements.define("theoplayer-settings-menu",tF);var tU='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M14 22.475h-4q-.475 0-.863-.337-.387-.338-.437-.813l-.3-2.2q-.2-.075-.4-.2t-.375-.25l-2.05.85q-.475.2-.937.05-.463-.15-.738-.6l-1.975-3.45q-.25-.45-.162-.95.087-.5.487-.775l1.775-1.35Q4 12.325 4 12.225v-.45q0-.1.025-.225L2.25 10.2q-.4-.3-.487-.8-.088-.5.162-.925L3.9 5.025q.25-.45.725-.588.475-.137.95.038l2.075.875q.175-.15.363-.263.187-.112.387-.187l.3-2.225q.05-.5.425-.825.375-.325.875-.325h4q.5 0 .875.325t.425.825l.3 2.225q.2.075.4.187.2.113.375.263l2.05-.875q.475-.175.938-.025.462.15.737.575l2 3.45q.25.45.15.95-.1.5-.5.775l-1.775 1.35v.675q0 .1-.025.225l1.775 1.35q.4.275.487.775.088.5-.162.95l-2 3.45q-.25.425-.725.587-.475.163-.95-.037l-2.025-.85q-.175.125-.362.25-.188.125-.388.2l-.3 2.2q-.05.475-.425.813-.375.337-.875.337ZM12 15.5q1.45 0 2.475-1.025Q15.5 13.45 15.5 12q0-1.45-1.025-2.475Q13.45 8.5 12 8.5q-1.45 0-2.475 1.025Q8.5 10.55 8.5 12q0 1.45 1.025 2.475Q10.55 15.5 12 15.5Z"/></svg>\n',tH=d("theoplayer-settings-menu-button",F('<span part="icon"><slot>'+tU+"</slot></span>")),tV=function(e){function t(){return e.call(this,{template:tH()})}return r(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"open settings menu")},t}(eV);customElements.define("theoplayer-settings-menu-button",tV);var tz="theoplayerfullscreenenter",tG="theoplayerfullscreenexit",tQ=d("theoplayer-fullscreen-button",F('<span part="enter-icon"><slot name="enter-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M5.9 19.225q-.475 0-.8-.325-.325-.325-.325-.8V15q0-.475.325-.812.325-.338.8-.338.5 0 .825.338.325.337.325.812v1.95H9q.475 0 .812.325.338.325.338.825 0 .475-.338.8-.337.325-.812.325Zm0-9.075q-.475 0-.8-.338-.325-.337-.325-.812V5.9q0-.475.325-.8.325-.325.8-.325H9q.475 0 .812.325.338.325.338.8 0 .5-.338.825-.337.325-.812.325H7.05V9q0 .475-.325.812-.325.338-.825.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8 0-.5.338-.825.337-.325.812-.325h1.95V15q0-.475.325-.812.325-.338.825-.338.475 0 .8.338.325.337.325.812v3.1q0 .475-.325.8-.325.325-.8.325Zm3.1-9.075q-.5 0-.825-.338-.325-.337-.325-.812V7.05H15q-.475 0-.812-.325-.338-.325-.338-.825 0-.475.338-.8.337-.325.812-.325h3.1q.475 0 .8.325.325.325.325.8V9q0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span><span part="exit-icon"><slot name="exit-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M9 19.225q-.475 0-.812-.325-.338-.325-.338-.8v-1.95H5.9q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.812.325-.338.8-.338H9q.475 0 .812.338.338.337.338.812v3.1q0 .475-.338.8-.337.325-.812.325ZM5.9 10.15q-.475 0-.8-.338-.325-.337-.325-.812 0-.475.325-.813.325-.337.8-.337h1.95V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .812.325.338.325.338.8V9q0 .475-.338.812-.337.338-.812.338Zm9.1 9.075q-.475 0-.812-.325-.338-.325-.338-.8V15q0-.475.338-.812.337-.338.812-.338h3.1q.475 0 .8.338.325.337.325.812 0 .475-.325.812-.325.338-.8.338h-1.95v1.95q0 .475-.337.8-.338.325-.813.325Zm0-9.075q-.475 0-.812-.338-.338-.337-.338-.812V5.9q0-.475.338-.8.337-.325.812-.325.475 0 .813.325.337.325.337.8v1.95h1.95q.475 0 .8.337.325.338.325.813 0 .475-.325.812-.325.338-.8.338Z"/></svg>\n</slot></span>',":host(:not([fullscreen])) [part=exit-icon],:host([fullscreen]) [part=enter-icon]{display:none!important}")),tY=function(e){function t(){var t;return(t=e.call(this,{template:tQ()})||this)._upgradeProperty("fullscreen"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.handleClick=function(){if(this.fullscreen){var e=ew(tG,{bubbles:!0,composed:!0});this.dispatchEvent(e)}else{var t=ew(tz,{bubbles:!0,composed:!0});this.dispatchEvent(t)}},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&(h(this),this._updateAriaLabel())},a._updateAriaLabel=function(){var e=this.fullscreen?"exit fullscreen":"enter fullscreen";this.setAttribute(p.ARIA_LABEL,e)},k(t,[{key:"fullscreen",get:function(){return this.hasAttribute(p.FULLSCREEN)},set:function(e){O(this,p.FULLSCREEN,e)}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.FULLSCREEN])}}]),t}(Z(H,["fullscreen"]));customElements.define("theoplayer-fullscreen-button",tY);var tK=function(){function e(){this._stops=[["transparent",100]]}var t=e.prototype;return t.add=function(e,t,r){if(!((t=Math.max(t,0))>=(r=Math.min(r,100)))){var a=P(this._stops,function(e){var r=e[1];return t<=r});if(!(a<0)){var o=this._stops[a],n=o[0],i=o[1],l=[];if(t>0&&l.push([n,t]),l.push([e,r]),r<i)l.push([n,i]),(s=this._stops).splice.apply(s,[].concat([a,1],l));else{for(var s,u,h=a+1;h<this._stops.length&&!(r<this._stops[h][1]);)h++;(u=this._stops).splice.apply(u,[].concat([a,h-a],l))}}}},t.toGradientStops=function(){for(var e,t=[],r=0,a=l(this._stops);!(e=a()).done;){var o=e.value,n=o[0],i=o[1];i<r||(t.push(n+" "+r+"%"),t.push(n+" "+i+"%"),r=i)}return t.join(", ")},e}();function tW(e,t){return void 0===t&&(t=""),"<style>:host{--thumb-height:var(--theoplayer-range-thumb-height,10px);--track-height:var(--theoplayer-range-track-height,4px);--theoplayer-range-padding:var(--theoplayer-control-padding,10px);background:transparent;background:var(--theoplayer-control-background,transparent);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;font-size:0;height:44px;height:calc(var(--theoplayer-control-height, 24px) + var(--theoplayer-range-padding)*2);padding-left:10px;padding-left:var(--theoplayer-range-padding-left,var(--theoplayer-range-padding));padding-right:10px;padding-right:var(--theoplayer-range-padding-right,var(--theoplayer-range-padding));pointer-events:auto;position:relative;-webkit-transition:background .15s linear;transition:background .15s linear;vertical-align:middle;width:100px}:host([hidden]){display:none!important}:host(:hover:not([disabled])){background:transparent;background:var(--theoplayer-control-hover-background,var(--theoplayer-control-background,transparent))}[part=container]{height:100%;position:relative}[part=background],[part=pointer]{border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);height:var(--track-height);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%));transform:translate(var(--theoplayer-range-track-translate-x,0),calc(var(--theoplayer-range-track-translate-y, 0px) - 50%))}[part=background]{background:hsla(0,0%,100%,.2);background:var(--theoplayer-range-track-background,hsla(0,0%,100%,.2));min-width:40px;width:100%;width:var(--theoplayer-range-track-width,100%)}[part=pointer]{background:transparent;background:var(--theoplayer-range-track-pointer-background,transparent);border-right:none;border-right:var(--theoplayer-range-track-pointer-border-right,none);opacity:0;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden}:host(:hover:not([disabled])) [part=pointer]{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}input[type=range]{-webkit-appearance:none;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;min-height:100%;padding:0;position:relative;width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);-webkit-box-shadow:1px 1px 1px transparent;box-shadow:1px 1px 1px transparent;-webkit-box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);margin-top:calc(0px - var(--thumb-height)/2 + var(--track-height)/2);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);-webkit-transform:none;transform:none;-webkit-transform:var(--theoplayer-range-thumb-transform,none);transform:var(--theoplayer-range-thumb-transform,none);-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-moz-range-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);translate:0 0;translate:var(--theoplayer-range-track-translate-x,0) var(--theoplayer-range-track-translate-y,0);width:10px;width:var(--theoplayer-range-thumb-width,10px)}input[type=range]::-ms-thumb{background:#fff;background:var(--theoplayer-range-thumb-background,#fff);border:none;border:var(--theoplayer-range-thumb-border,none);border-radius:10px;border-radius:var(--theoplayer-range-thumb-border-radius,10px);box-shadow:1px 1px 1px transparent;box-shadow:var(--theoplayer-range-thumb-box-shadow,1px 1px 1px transparent);cursor:pointer;height:auto;height:var(--thumb-height,auto);opacity:1;opacity:var(--theoplayer-range-thumb-opacity,1);transform:none;transform:var(--theoplayer-range-thumb-transform,none);-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-thumb-transition,none);transition:var(--theoplayer-range-thumb-transition,none);width:10px;width:var(--theoplayer-range-thumb-width,10px)}:host([disabled]) input[type=range]::-webkit-slider-thumb{display:none}:host([disabled]) input[type=range]::-moz-range-thumb{display:none}:host([disabled]) input[type=range]::-ms-thumb{display:none}input[type=range]::-webkit-slider-runnable-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);-webkit-box-shadow:none;box-shadow:none;-webkit-box-shadow:var(--theoplayer-range-track-box-shadow,none);box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);-webkit-transform:translate(0);transform:translate(0);-webkit-transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-webkit-transition:none;transition:none;-webkit-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-moz-range-track{background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-moz-transition:none;transition:none;-moz-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-track{background:transparent;background:#fff;background:var(--theoplayer-range-track-progress-internal,var(--theoplayer-range-bar-color,#fff));border:none;border:var(--theoplayer-range-track-border,none);border-radius:0;border-radius:var(--theoplayer-range-track-border-radius,0);box-shadow:none;box-shadow:var(--theoplayer-range-track-box-shadow,none);color:transparent;cursor:pointer;height:var(--track-height);min-width:40px;outline:var(--theoplayer-range-track-outline);outline-offset:var(--theoplayer-range-track-outline-offset);transform:translate(0);transform:translate(var(--theoplayer-range-track-translate-x,0),var(--theoplayer-range-track-translate-y,0));-ms-transition:none;transition:none;-ms-transition:var(--theoplayer-range-track-transition,none);transition:var(--theoplayer-range-track-transition,none);width:100%;width:var(--theoplayer-range-track-width,100%)}input[type=range]::-ms-fill-lower,input[type=range]::-ms-fill-upper,input[type=range]::-ms-tooltip{display:none}:host([disabled]) input[type=range]::-webkit-slider-runnable-track{cursor:default}:host([disabled]) input[type=range]::-moz-range-track{cursor:default}:host([disabled]) input[type=range]::-ms-track{cursor:default}input[type=range]:focus{-webkit-box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);box-shadow:inset 0 0 0 2px rgba(27,127,204,.9);-webkit-box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));box-shadow:inset 0 0 0 2px var(--theoplayer-focus-ring-color,rgba(27,127,204,.9));outline:0}input[type=range]:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}input[type=range]:focus::-webkit-slider-runnable-track{outline:0}\n"+t+'</style><div part="container"><div part="background"></div><div part="pointer"></div>'+e+"</div>"}var tj=function(e){function t(t){(r=e.call(this)||this)._rangeWidth=0,r._thumbWidth=10,r._onInput=function(){r.handleInput()},r._updatePointerBar=function(e){if(!r.disabled){var t=r._rangeEl.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a)),r.updatePointer_(a,t)}},r._onKeyDown=function(e){r.handleKeyDown_(e)};var r,a=r.attachShadow({mode:"open"});return a.appendChild(t.template.content.cloneNode(!0)),r._rangeEl=a.querySelector('input[type="range"]'),r._rangeEl.addEventListener("input",r._onInput),r._rangeEl.addEventListener("change",r._onInput),r._rangeEl.addEventListener("keydown",r._onKeyDown),r._pointerEl=a.querySelector('[part="pointer"]'),r._upgradeProperty("disabled"),r._upgradeProperty("value"),r._upgradeProperty("min"),r._upgradeProperty("max"),r._upgradeProperty("step"),r._upgradeProperty("deviceType"),r}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._rangeEl.setAttribute(p.ARIA_LABEL,this.getAriaLabel()),this.update(),this.addEventListener("pointermove",this._updatePointerBar)},a.disconnectedCallback=function(){this.removeEventListener("pointermove",this._updatePointerBar)},a.attributeChangedCallback=function(e,r,a){if(a!==r){var o=null!=a;e===p.DISABLED?(this.setAttribute("aria-disabled",o?"true":"false"),O(this._rangeEl,p.DISABLED,o)):e!==p.HIDDEN||o||this.update(),t.observedAttributes.indexOf(e)>=0&&h(this)}},a.handleInput=function(){this.update()},a.update=function(e){this.hasAttribute(p.HIDDEN)||(e||this.updateCachedWidths_(),this._rangeEl.setAttribute("aria-valuetext",this.getAriaValueText()),this.updateBar_())},a.updateBar_=function(){h(this,{"--theoplayer-range-track-progress-internal":"linear-gradient(to right, "+this.getBarColors().toGradientStops()+")"})},a.getBarColors=function(){var e=this.value,t=this.min,r=this.max,a=(e-t)/(r-t)*100;isNaN(a)&&(a=0);var o=0;t<e&&e<r&&(o=this._thumbWidth*(.5-a/100)/this._rangeWidth*100);var n=new tK;return n.add("var(--theoplayer-range-bar-color, #fff)",0,a+o),n},a.updateCachedWidths_=function(){var e=this._rangeEl.offsetWidth;e>0&&(this._rangeWidth=e);var t=parseInt(getComputedStyle(this).getPropertyValue("--theoplayer-range-thumb-width")||"10px");t>0&&(this._thumbWidth=t)},a.getMinimumStepForVisibleChange_=function(){var e=this.min,t=this.max-e;return t<=0?NaN:t/this._rangeWidth},a.updatePointer_=function(e,t){this._pointerEl.style.width=""+e*t.width+"px"},a.handleKeyDown_=function(e){"tv"===this.deviceType&&V(e.keyCode)&&(e.keyCode===c.LEFT||e.keyCode===c.RIGHT?e.stopPropagation():(e.keyCode===c.UP||e.keyCode===c.DOWN)&&e.preventDefault())},k(t,[{key:"disabled",get:function(){return this.hasAttribute(p.DISABLED)},set:function(e){O(this,p.DISABLED,e)}},{key:"value",get:function(){return this._rangeEl.valueAsNumber},set:function(e){this._rangeEl.valueAsNumber=e,this.handleInput()}},{key:"min",get:function(){return Number(this._rangeEl.min)},set:function(e){this._rangeEl.min=String(e),this.update()}},{key:"max",get:function(){return Number(this._rangeEl.max)},set:function(e){this._rangeEl.max=String(e),this.update()}},{key:"step",get:function(){var e=this._rangeEl.step;return"any"===e?e:Number(e)},set:function(e){this._rangeEl.step=String(e)}},{key:"deviceType",get:function(){return this.getAttribute(p.DEVICE_TYPE)||"desktop"},set:function(e){this.setAttribute(p.DEVICE_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[p.DISABLED,p.HIDDEN]}}]),t}(Z(HTMLElement,["deviceType"])),tZ="theoplayerpreviewtimechange";function tX(e){return"linear"===e.type}var tJ=d("theoplayer-preview-thumbnail","<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}:host([hidden]){display:none!important}canvas{background:#fff;background:var(--theoplayer-preview-thumbnail-background,#fff);border-radius:2px;border-radius:var(--theoplayer-preview-thumbnail-padding,2px);display:none;padding:2px;padding:var(--theoplayer-preview-thumbnail-padding,2px)}</style><canvas></canvas>"),t$=["addtrack","removetrack"],t0=function(e){function t(){(t=e.call(this)||this)._previewTime=NaN,t._updateThumbnailTextTrack=function(){var e=t._thumbnailTextTrack,r=t._player?S(t._player.textTracks,t1):void 0;e!==r&&(t._thumbnailTextTrack=r,t.updateThumbnail_())};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tJ().content.cloneNode(!0)),t._canvasEl=r.querySelector("canvas"),t._canvasContext=t._canvasEl.getContext("2d"),t._thumbnailImageSource=document.createElement("img"),t._thumbnailImageSource.decoding="async",t._upgradeProperty("previewTime"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this)},a.updateThumbnail_=function(){var e=this._thumbnailTextTrack;if(void 0===e){this.hideThumbnail_();return}"disabled"===e.mode&&(e.mode="hidden");var t=function(e,t){if(0!==e.length){for(var r,a=e[0],o=l(e);!(r=o()).done;){var n=r.value;if(n.startTime<=t)a=n;else if(t>=n.endTime)break}return a}}(e.cues,this._previewTime);if(void 0===t){this.hideThumbnail_();return}var r=t.content.trim(),a=function(e){var t=e.match(/^(.+)#xywh=(\d+),(\d+),(\d+),(\d+)$/);if(t)return{url:t[1],x:+t[2],y:+t[3],w:+t[4],h:+t[5]}}(r),o=a?a.url:r;if(o=new URL(o,e.src||location.href).href,this._lastLoadedThumbnailUrl!==o){this.loadThumbnailImage_(o);return}this.showThumbnail_(a)},a.loadThumbnailImage_=function(e){var t=this;if(this._thumbnailImageSource.src!==e){var r=function(){t._lastLoadedThumbnailUrl=e,t.updateThumbnail_()};"function"==typeof this._thumbnailImageSource.decode?(this._thumbnailImageSource.src=e,this._thumbnailImageSource.decode().then(r,x)):(this._thumbnailImageSource.onload=r,this._thumbnailImageSource.src="",this._thumbnailImageSource.src=e)}},a.showThumbnail_=function(e){e?(this._canvasEl.width=e.w,this._canvasEl.height=e.h,this._canvasContext.drawImage(this._thumbnailImageSource,e.x,e.y,e.w,e.h,0,0,e.w,e.h)):(this._canvasEl.width=this._thumbnailImageSource.naturalWidth,this._canvasEl.height=this._thumbnailImageSource.naturalHeight,this._canvasContext.drawImage(this._thumbnailImageSource,0,0)),this._canvasEl.style.display="block"},a.hideThumbnail_=function(){this._canvasEl.style.display="none"},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(null==(t=this._textTrackList)||t.removeEventListener(t$,this._updateThumbnailTextTrack),this._player=e,this._textTrackList=null==e?void 0:e.textTracks,this._updateThumbnailTextTrack(),null==(r=this._textTrackList)||r.addEventListener(t$,this._updateThumbnailTextTrack))}},{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this.updateThumbnail_()}}]),t}(Z(HTMLElement,["player","previewTime"]));function t1(e){return"metadata"===e.kind&&"thumbnails"===e.label}customElements.define("theoplayer-preview-thumbnail",t0);var t5=d("theoplayer-preview-time-display","<style>"+el+"</style><span></span>"),t2=["timeupdate","seeking","seeked","durationchange"],t3=function(e){function t(){(t=e.call(this)||this)._previewTime=NaN,t._update=function(){var e,r=t._previewTime,a=t._player?t._player.duration:NaN,o=null==(e=t._player)?void 0:e.seekable,n=isFinite(a)?a:o&&o.length>0?o.end(0):NaN,i=t.hasAttribute(p.REMAINING)||t.hasAttribute(p.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType;i&&(r=-((n||0)-r)),I(t._spanEl,eu(r,n,i))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(t5().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("previewTime"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._update()},a.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._update(),h(this))},k(t,[{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this._update()}},{key:"streamType",get:function(){return this.getAttribute(p.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(p.STREAM_TYPE,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(t2,this._update),this._player=e,this._update(),void 0!==this._player&&this._player.addEventListener(t2,this._update))}}],[{key:"observedAttributes",get:function(){return[p.REMAINING,p.REMAINING_WHEN_LIVE,p.STREAM_TYPE]}}]),t}(Z(HTMLElement,["player","previewTime","streamType"]));customElements.define("theoplayer-preview-time-display",t3);var t4=d("theoplayer-time-range",tW('<input type="range" min="0" max="1000" step="any" value="0"><div class="theoplayer-time-range-preview-rail"><div part="box preview-box"><slot name="preview"><theoplayer-preview-thumbnail></theoplayer-preview-thumbnail><theoplayer-preview-time-display remaining-when-live></theoplayer-preview-time-display></slot></div></div>',"input[type=range]{direction:ltr}.theoplayer-time-range-preview-rail{bottom:100%;left:0;opacity:0;pointer-events:none;position:absolute;-webkit-transition:visibility .25s,opacity .25s;transition:visibility .25s,opacity .25s;visibility:hidden;width:1%}:host(:hover:not([disabled])) .theoplayer-time-range-preview-rail{opacity:1;-webkit-transition:visibility .5s,opacity .5s;transition:visibility .5s,opacity .5s;visibility:visible}[part~=box]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;align-items:center;bottom:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));position:absolute;text-shadow:0 0 4px rgba(0,0,0,.75);text-shadow:var(--theoplayer-preview-text-shadow,0 0 4px rgba(0,0,0,.75));-webkit-transform:translateX(-50%);transform:translateX(-50%)}")),t8=["timeupdate","durationchange","ratechange","seeking","seeked"],t7=["play","pause","ended","durationchange","readystatechange","error"],t6=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],t9=function(e){function t(){var t;return(t=e.call(this,{template:t4()})||this)._pausedWhileScrubbing=!1,t._autoAdvanceId=0,t._lastUpdateTime=0,t._lastCurrentTime=0,t._lastPlaybackRate=0,t._updateFromPlayer=function(){if(void 0!==t._player){t._lastUpdateTime=performance.now(),t._lastCurrentTime=t._player.currentTime,t._lastPlaybackRate=t._player.playbackRate;var e,r,a=t._player.seekable;if(0!==a.length?(e=a.start(0),r=a.end(0)):(e=0,r=t._player.duration),!isFinite(t._lastCurrentTime)){var o=t._player.duration===1/0;t._lastCurrentTime=o?r:e}t._rangeEl.min=String(e),t._rangeEl.max=String(r),t._rangeEl.valueAsNumber=t._lastCurrentTime,t.update(),t.updateDisabled_(a)}},t._pauseOnScrubStart=function(){t._pausedWhileScrubbing||void 0===t._player||t._player.paused||(t._pausedWhileScrubbing=!0,t._player.pause(),document.addEventListener("mouseup",t._playOnScrubEnd),document.addEventListener("touchend",t._playOnScrubEnd))},t._playOnScrubEnd=function(){t._pausedWhileScrubbing&&(t._pausedWhileScrubbing=!1,document.removeEventListener("mouseup",t._playOnScrubEnd),document.removeEventListener("touchend",t._playOnScrubEnd),void 0!==t._player&&t._player.paused&&t._player.play())},t._toggleAutoAdvance=function(){t.shouldAutoAdvance_()?0===t._autoAdvanceId&&(t._updateFromPlayer(),t._autoAdvanceId=requestAnimationFrame(t._autoAdvanceWhilePlaying)):0!==t._autoAdvanceId&&(t._updateFromPlayer(),cancelAnimationFrame(t._autoAdvanceId),t._autoAdvanceId=0)},t._autoAdvanceWhilePlaying=function(){if(!t.shouldAutoAdvance_()){t._autoAdvanceId=0;return}var e=(performance.now()-t._lastUpdateTime)/1e3,r=t._lastCurrentTime+e*t._lastPlaybackRate;Math.abs(r-t.value)>=t.getMinimumStepForVisibleChange_()&&(t._rangeEl.valueAsNumber=r,t.update(!0)),t._autoAdvanceId=requestAnimationFrame(t._autoAdvanceWhilePlaying)},t._onAdChange=function(){t.update()},t._previewRailEl=t.shadowRoot.querySelector(".theoplayer-time-range-preview-rail"),t._previewBoxEl=t._previewRailEl.querySelector('[part~="preview-box"]'),t._rangeEl.setAttribute(p.ARIA_LIVE,"off"),t._rangeEl.addEventListener("mousedown",t._pauseOnScrubStart),t._rangeEl.addEventListener("touchstart",t._pauseOnScrubStart),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._toggleAutoAdvance()},a.disconnectedCallback=function(){e.prototype.disconnectedCallback.call(this),this._toggleAutoAdvance()},a.updateDisabled_=function(e){if(void 0===e){var t;e=null==(t=r._player)?void 0:t.seekable}var r=this,a="live"===this.streamType;void 0!==e&&(a||(a=0===e.length)),this.disabled!==a&&(this.disabled=a)},a.getAriaLabel=function(){return"seek"},a.getAriaValueText=function(){var e=ep(this.value),t=ep(this.max);return e&&t?e+" of "+t:"video not loaded, unknown time"},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===p.STREAM_TYPE?this.updateDisabled_():r===p.SHOW_AD_MARKERS&&this.update(),t.observedAttributes.indexOf(r)>=0&&h(this))},a.handleInput=function(){void 0!==this._player&&this._player.currentTime!==this.value&&(this._player.currentTime=this.value),e.prototype.handleInput.call(this)},a.shouldAutoAdvance_=function(){return this.isConnected&&void 0!==this._player&&!this._player.paused&&!this._player.ended&&!this._player.errorObject&&this._player.readyState>=3&&this.needToUpdateEveryFrame_()},a.needToUpdateEveryFrame_=function(){return this.getMinimumStepForVisibleChange_()<.25*this._lastPlaybackRate},a.updatePointer_=function(t,r){e.prototype.updatePointer_.call(this,t,r);var a=r.left+t*r.width,o=this._previewBoxEl.getBoundingClientRect(),n=((a=Math.max(r.left+o.width/2,Math.min(r.right-o.width/2,a)))-r.left)/r.width;if(this._previewRailEl.style.transform="translateX("+(1e4*n).toFixed(6)+"%)",void 0!==this._player){var i=this.min,l=ew(tZ,{bubbles:!0,composed:!0,detail:{previewTime:i+t*(this.max-i)}});this.dispatchEvent(l)}},a.getBarColors=function(){var t=e.prototype.getBarColors.call(this);if(!this.hasAttribute(p.SHOW_AD_MARKERS)||!this._player||!this._player.ads||this._player.ads.playing)return t;for(var r,a=this.min,o=this.max,n=l(this._player.ads.scheduledAdBreaks);!(r=n()).done;){var i=r.value;if(void 0===i.ads||!(i.ads.length>0)||i.ads.some(tX)){var s=i.timeOffset;if(s<0&&(s=this._player.duration),a<=s&&s<=o){var u=(s-a)/(o-a)*100,h=void 0,d=void 0;u+1<100?(h=u,d=u+1):(h=99,d=100),t.add("var(--theoplayer-time-range-ad-marker-color, #ffc50f)",h,d)}}}return t},a.handleKeyDown_=function(t){e.prototype.handleKeyDown_.call(this,t),"tv"===this.deviceType&&t.keyCode===c.ENTER&&void 0!==this._player&&(this._player.paused?this._player.play():this._player.pause())},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(t8,this._updateFromPlayer),this._player.removeEventListener(t7,this._toggleAutoAdvance)),null==(t=this._ads)||t.removeEventListener(t6,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._updateFromPlayer(),this._toggleAutoAdvance(),void 0!==this._player&&(this._player.addEventListener(t8,this._updateFromPlayer),this._player.addEventListener(t7,this._toggleAutoAdvance)),null==(r=this._ads)||r.addEventListener(t6,this._onAdChange))}},{key:"streamType",get:function(){return this.getAttribute(p.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(p.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[].concat(tj.observedAttributes,[p.SHOW_AD_MARKERS])}}]),t}(Z(tj,["player","streamType","deviceType"]));customElements.define("theoplayer-time-range",t9);var re=d("theoplayer-volume-range",tW('<input type="range" min="0" max="1" step="any" value="0">')),rt=function(e){function t(){var t;return(t=e.call(this,{template:re()})||this)._updateFromPlayer=function(){void 0!==t._player&&(t.value=t._player.volume)},t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.getAriaLabel=function(){return"volume"},a.getAriaValueText=function(){return""+Math.round(this.value/this.max*100)+"%"},a.handleInput=function(){void 0!==this._player&&this._player.volume!==this.value&&(this._player.volume=this.value),e.prototype.handleInput.call(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener("volumechange",this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener("volumechange",this._updateFromPlayer))}}]),t}(Z(tj,["player","deviceType"]));customElements.define("theoplayer-volume-range",rt);var rr=d("theoplayer-error-display",'<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-error-icon-gap,10px);max-width:80%;max-width:var(--theoplayer-error-max-width,80%);min-width:0;min-width:var(--theoplayer-error-min-width,0)}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-error-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-error-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-error-icon-width,48px)}[part~=heading]{color:#fff;color:var(--theoplayer-error-heading-color,#fff);line-height:48px;line-height:var(--theoplayer-error-icon-height,48px);margin:0 0 10px;margin:var(--theoplayer-error-heading-margin,0 0 10px);padding:0}[part~=message]{color:#fff;color:var(--theoplayer-error-message-color,#fff);margin:0;margin:var(--theoplayer-error-message-margin,0);padding:0}[part~=fullscreen-controls]{-webkit-box-pack:end;-ms-flex-pack:end;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;left:0;position:absolute;right:0}:host(:not([fullscreen])) [part~=fullscreen-controls]{display:none!important}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="48" width="48"><path d="M24.15 26.4q.85 0 1.425-.575.575-.575.575-1.425v-9.2q0-.8-.6-1.375t-1.4-.575q-.85 0-1.425.575-.575.575-.575 1.425v9.2q0 .8.6 1.375t1.4.575ZM24 34.7q1 0 1.625-.625t.625-1.625q0-.95-.625-1.625T24 30.15q-1 0-1.625.675t-.625 1.625q0 1 .625 1.625T24 34.7Zm0 10q-4.4 0-8.175-1.575Q12.05 41.55 9.25 38.75q-2.8-2.8-4.375-6.575Q3.3 28.4 3.3 24q0-4.35 1.575-8.125Q6.45 12.1 9.25 9.3q2.8-2.8 6.575-4.425Q19.6 3.25 24 3.25q4.35 0 8.125 1.625Q35.9 6.5 38.7 9.3q2.8 2.8 4.425 6.575Q44.75 19.65 44.75 24q0 4.4-1.625 8.175Q41.5 35.95 38.7 38.75q-2.8 2.8-6.575 4.375Q28.35 44.7 24 44.7Z"/></svg>\n</slot></div><div part="text"><h1 part="heading"><slot name="heading">An error occurred</slot></h1><p part="message"><slot name="message"></slot></p></div><div part="fullscreen-controls"><slot name="fullscreen-controls"><theoplayer-fullscreen-button></theoplayer-fullscreen-button></slot></div>'),ra=function(e){function t(){var t,r=(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0});return r.appendChild(rr().content.cloneNode(!0)),t._messageSlot=r.querySelector('slot[name="message"]'),t._upgradeProperty("error"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this)},a.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&h(this)},k(t,[{key:"error",get:function(){return this._error},set:function(e){this._error=e,I(this._messageSlot,e?e.message:"")}},{key:"fullscreen",get:function(){return this.hasAttribute(p.FULLSCREEN)},set:function(e){O(this,p.FULLSCREEN,e)}}],[{key:"observedAttributes",get:function(){return[p.FULLSCREEN]}}]),t}(Z(HTMLElement,["error","fullscreen"]));customElements.define("theoplayer-error-display",ra);var ro=function(e){function t(t){var r;return(r=e.call(this,t)||this)._updateCastState=function(){var e=r._castApi?r._castApi.state:"unavailable";r.setAttribute(p.CAST_STATE,e)},r._upgradeProperty("castState"),r._upgradeProperty("castApi"),r}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(p.CAST_STATE)||this.setAttribute(p.CAST_STATE,"unavailable"),this._updateCastState()},a.handleClick=function(){if(this._castApi){this._updateCastState();var e=this.castState;"available"===e?this._castApi.start():("connecting"===e||"connected"===e)&&this._castApi.stop()}},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&h(this)},k(t,[{key:"castApi",get:function(){return this._castApi},set:function(e){void 0!==this._castApi&&this._castApi.removeEventListener("statechange",this._updateCastState),this._castApi=e,this._updateCastState(),void 0!==this._castApi&&this._castApi.addEventListener("statechange",this._updateCastState)}},{key:"castState",get:function(){return this.getAttribute(p.CAST_STATE)}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.CAST_STATE])}}]),t}(H),rn=d("theoplayer-chromecast-button",F('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" height="24" width="24"><defs><clipPath id="theoplayer-chromecast-rings-mask"><path d="M0-36h44V0H0z"/></clipPath></defs><path class="theoplayer-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/><path class="theoplayer-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/><g class="theoplayer-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theoplayer-chromecast-rings-mask)"><circle stroke="none" cx="0" cy="0" r="30"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring2" cx="0" cy="0" r="12"/><circle class="theoplayer-chromecast-ring theoplayer-chromecast-ring3" cx="0" cy="0" r="20"/><path class="theoplayer-chromecast-ring theoplayer-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0"/></g></svg></span>',":host([cast-state=unavailable]){display:none!important}:host([cast-state=connecting]) .theoplayer-chromecast-ring{-webkit-animation:.9s linear infinite;animation:.9s linear infinite}:host([cast-state=connecting]) .theoplayer-chromecast-ring1{-webkit-animation-name:theoplayer-chromecast-connecting-ring1;animation-name:theoplayer-chromecast-connecting-ring1}:host([cast-state=connecting]) .theoplayer-chromecast-ring2{-webkit-animation-name:theoplayer-chromecast-connecting-ring2;animation-name:theoplayer-chromecast-connecting-ring2}:host([cast-state=connecting]) .theoplayer-chromecast-ring3{-webkit-animation-name:theoplayer-chromecast-connecting-ring3;animation-name:theoplayer-chromecast-connecting-ring3}:host([cast-state=connecting]) .theoplayer-chromecast-ring4{-webkit-animation-name:theoplayer-chromecast-connecting-ring4;animation-name:theoplayer-chromecast-connecting-ring4}.theoplayer-chromecast-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-chromecast-inner{opacity:1}.theoplayer-chromecast-rings{-webkit-clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%);clip-path:polygon(50% -100%,50% 50%,100% 50%,100% -100%)}@-webkit-keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring1{0%,37.5%{-webkit-transform:scale(0);transform:scale(0)}62.5%,to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring2{0%,20%{stroke-width:24;-webkit-transform:scale(.25);transform:scale(.25)}35%{stroke-width:10;-webkit-transform:scale(.5);transform:scale(.5)}55%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@keyframes theoplayer-chromecast-connecting-ring3{0%,15%{stroke-width:6.66667;-webkit-transform:scale(.6);transform:scale(.6)}45%,to{stroke-width:4;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}@keyframes theoplayer-chromecast-connecting-ring4{0%{stroke-width:4;stroke-dashoffset:0;stroke-dasharray:32,99;opacity:1;-webkit-transform:scale(1);transform:scale(1)}35%{stroke-width:2.8571;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.4);transform:scale(1.4)}50%{stroke-width:0;stroke-dashoffset:-18;stroke-dasharray:0,99;opacity:1;-webkit-transform:scale(1.5);transform:scale(1.5)}50.001%,to{opacity:0}}")),ri="theoplayer-chromecast-rings-mask",rl=0,rs=function(e){function t(){t=e.call(this,{template:rn()})||this;var t,r=++rl,a=t.shadowRoot.querySelector("svg clipPath#"+ri),o=t.shadowRoot.querySelector("svg .theoplayer-chromecast-rings"),n=ri+"-"+r;return null==a||a.setAttribute("id",n),o.setAttribute("clip-path",n),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},a._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop casting to Chromecast":"start casting to Chromecast";this.setAttribute(p.ARIA_LABEL,e)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t;this._player=e,this.castApi=null==e?void 0:null==(t=e.cast)?void 0:t.chromecast}}]),t}(Z(ro,["player"]));customElements.define("theoplayer-chromecast-button",rs);var ru=d("theoplayer-chromecast-display",'<style>:host{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;gap:10px;gap:var(--theoplayer-chromecast-display-icon-gap,10px);padding:10px;padding:var(--theoplayer-control-padding,10px);pointer-events:none}:host([hidden]){display:none!important}[part~=icon]{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;font-size:0}::slotted(img),::slotted(svg),img,svg{fill:#fff;fill:var(--theoplayer-chromecast-display-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-chromecast-display-icon-height,48px);max-height:100%;max-width:100%;min-width:100%;vertical-align:middle;width:48px;width:var(--theoplayer-chromecast-display-icon-width,48px)}[part=text]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part=heading]{color:#fff;color:var(--theoplayer-chromecast-display-heading-color,#fff);font-size:14px;font-size:var(--theoplayer-chromecast-display-heading-font-size,var(--theoplayer-text-font-size,14px));margin:0;margin:var(--theoplayer-chromecast-display-heading-margin,0);padding:0}[part=receiver]{color:#fff;color:var(--theoplayer-chromecast-display-receiver-color,#fff);font-size:17.5px;font-size:var(--theoplayer-chromecast-display-receiver-font-size,calc(var(--theoplayer-text-font-size, 14px)*1.25));margin:0;margin:var(--theoplayer-chromecast-display-receiver-margin,0);padding:0}</style><div part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M86.956 910.131h65.699q9.171 0 14.801-6.413 5.631-6.413 4.076-14.067-6.099-32.801-29.132-57.242-23.033-24.442-55.051-30.941-7.654-1.555-14.067 4.076-6.413 5.63-6.413 15.164v69.336q0 8.487 5.8 14.287 5.8 5.8 14.287 5.8Zm179.365 0q14.288 0 23.635-9.565 9.348-9.565 7.348-23.261-10.944-78.191-65.681-134.428-54.737-56.237-131.928-67.181-13.696-2-23.26 7.415-9.566 9.416-9.566 23.411 0 12.13 9.311 23.059 9.312 10.929 24.08 13.332 49.566 9.566 84.913 46.696 35.348 37.131 44.914 87.131 2.403 14.768 12.595 24.08 10.192 9.311 23.639 9.311Zm127.147 0q13.904 0 23.261-9.563 9.358-9.563 8.358-23.444-5.819-64.393-33.105-122.128-27.286-57.735-70.589-101.784-43.303-44.049-100.088-71.892-56.784-27.842-121.43-33.407-13.88-1-23.443 8.53-9.563 9.531-9.563 23.377 0 13.615 9.072 23.615 9.072 10 23.62 12.19 103.526 11.636 174.956 85.018 71.43 73.382 82.858 176.796 1.801 14.298 11.995 23.495 10.195 9.197 24.098 9.197ZM123.477 241.304h692.436q31.74 0 55.762 24.021 24.021 24.022 24.021 55.762v509.826q0 31.507-24.021 55.362-24.022 23.856-55.762 23.856H525.696q-16.706 0-28.158-11.501-11.451-11.502-11.451-28.283 0-16.782 11.451-28.108 11.452-11.326 28.158-11.326h290.217V321.087H146.087v146q-6.783 6.348-16.595 11.674-9.813 5.326-23.514 5.326-16.457 0-27.783-11.452-11.326-11.451-11.326-28.158v-146q0-21.834 16.838-39.504 16.837-17.669 39.77-17.669Zm317.914 363Z"/></svg>\n</slot></div><div part="text"><p part="heading"><slot name="heading">Playing on</slot></p><p part="receiver">Chromecast Receiver</p></div>'),rh=["statechange"],rd=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a=null==(r=t._player)?void 0:null==(e=r.cast)?void 0:e.chromecast;if(void 0===a||"connected"!==a.state){t.setAttribute(p.HIDDEN,"");return}I(t._receiverNameEl,a.receiverName||""),t.removeAttribute(p.HIDDEN)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ru().content.cloneNode(!0)),t._receiverNameEl=r.querySelector('[part="receiver"]'),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.hasAttribute(p.HIDDEN)||this.setAttribute(p.HIDDEN,""),this._updateFromPlayer()},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t;this._player!==e&&(void 0!==this._castApi&&this._castApi.removeEventListener(rh,this._updateFromPlayer),this._player=e,this._castApi=null==e?void 0:null==(t=e.cast)?void 0:t.chromecast,this._updateFromPlayer(),void 0!==this._castApi&&this._castApi.addEventListener(rh,this._updateFromPlayer))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-chromecast-display",rd);var rp=d("theoplayer-airplay-button",F('<span part="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path class="theoplayer-airplay-inner" d="M5 7h14v8H5z"/><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg></span>',":host([cast-state=unavailable]){display:none!important}.theoplayer-airplay-inner{opacity:0;-webkit-transition:opacity .5s ease-in-out;transition:opacity .5s ease-in-out}:host([cast-state=connected]) .theoplayer-airplay-inner{opacity:1}")),rc=function(e){function t(){var t;return(t=e.call(this,{template:rp()})||this)._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},a._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop playing on AirPlay":"start playing on AirPlay";this.setAttribute(p.ARIA_LABEL,e)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t;this._player=e,this.castApi=null==e?void 0:null==(t=e.cast)?void 0:t.airplay}}]),t}(Z(ro,["player"]));customElements.define("theoplayer-airplay-button",rc);var ry=d("theoplayer-loading-indicator",'<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}[part=icon]{opacity:0;-webkit-transition:visibility .15s,opacity .15s;transition:visibility .15s,opacity .15s;visibility:hidden}:host([loading]) [part=icon]{opacity:1;-webkit-transition:visibility 0s,opacity 0s;transition:visibility 0s,opacity 0s;-webkit-transition-delay:.5s;transition-delay:.5s;-webkit-transition-delay:var(--theoplayer-loading-delay,.5s);transition-delay:var(--theoplayer-loading-delay,.5s);visibility:visible}[part=icon] ::slotted(img),[part=icon] ::slotted(svg){fill:#fff;fill:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff));height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));vertical-align:middle;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress{direction:ltr;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:0;height:48px;height:var(--theoplayer-loading-icon-height,var(--theoplayer-loading-icon-width,48px));letter-spacing:0;line-height:0;position:relative;white-space:nowrap;width:48px;width:var(--theoplayer-loading-icon-width,48px)}.theoplayer-loading-progress svg,.theoplayer-loading-spinner{height:100%;position:absolute;width:100%}.theoplayer-loading-progress svg{stroke:#fff;stroke:var(--theoplayer-loading-icon-color,var(--theoplayer-icon-color,#fff))}.theoplayer-loading-gap-patch{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;left:47.5%;overflow:hidden;position:absolute;top:0;width:5%}.theoplayer-loading-gap-patch svg{left:-900%;-webkit-transform:rotate(180deg);transform:rotate(180deg);width:2000%}.theoplayer-loading-circle-clipper{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:100%;overflow:hidden;position:relative;width:50%}.theoplayer-loading-circle-clipper svg{width:200%}.theoplayer-loading-circle-right svg{left:-100%}.theoplayer-loading-progress{-webkit-animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite;animation:theoplayer-circular-progress-container-rotate 1568ms linear infinite}.theoplayer-loading-spinner{-webkit-animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-spinner-layer-rotate 5333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-left svg{-webkit-animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}.theoplayer-loading-circle-right svg{-webkit-animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:theoplayer-circular-progress-right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}@-webkit-keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes theoplayer-circular-progress-container-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@keyframes theoplayer-circular-progress-spinner-layer-rotate{12.5%{-webkit-transform:rotate(135deg);transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg);transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg);transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg);transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg);transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg);transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg);transform:rotate(945deg)}to{-webkit-transform:rotate(3turn);transform:rotate(3turn)}}@-webkit-keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@keyframes theoplayer-circular-progress-left-spin{0%{-webkit-transform:rotate(265deg);transform:rotate(265deg)}50%{-webkit-transform:rotate(130deg);transform:rotate(130deg)}to{-webkit-transform:rotate(265deg);transform:rotate(265deg)}}@-webkit-keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}@keyframes theoplayer-circular-progress-right-spin{0%{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}50%{-webkit-transform:rotate(-130deg);transform:rotate(-130deg)}to{-webkit-transform:rotate(-265deg);transform:rotate(-265deg)}}</style><div part="icon"><slot name="icon"><div aria-hidden="true" class="theoplayer-loading-progress"><div class="theoplayer-loading-spinner"><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-left"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div><div class="theoplayer-loading-gap-patch"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="3.2"/></svg></div><div class="theoplayer-loading-circle-clipper theoplayer-loading-circle-right"><svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="18" fill="none" stroke-dasharray="113.097" stroke-dashoffset="56.549" stroke-width="4"/></svg></div></div></div></slot></div>'),rv=["readystatechange","play","pause","playing","seeking","seeked"],rf=function(e){function t(){var t;return(t=e.call(this)||this)._updateFromPlayer=function(){var e=void 0!==t._player&&!t._player.paused&&(t._player.seeking||t._player.readyState<3);O(em(t),p.LOADING,e)},t.attachShadow({mode:"open"}).appendChild(ry().content.cloneNode(!0)),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._updateFromPlayer()},a.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&h(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(rv,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(rv,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[p.LOADING]}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-loading-indicator",rf);var rb=d("theoplayer-gesture-receiver","<style>:host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}</style>"),rg=function(e){function t(){var t;return(t=e.call(this)||this)._pointerType="",t._onPointerDown=function(e){t._pointerType=e.pointerType},t._onClick=function(e){var r,a=null!=(r=e.pointerType)?r:t._pointerType;"touch"===a?t.handleTap(e):"mouse"===a&&t.handleMouseClick(e)},t.attachShadow({mode:"open"}).appendChild(rb().content.cloneNode(!0)),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this.setAttribute("tabindex","-1"),this.setAttribute("aria-hidden","true")},a.handleTap=function(e){},a.handleMouseClick=function(e){if(void 0!==this._player){var t;void 0===this._player.source||null!=(t=this._player.ads)&&t.playing||(this._player.paused?this._player.play():this._player.pause())}},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._playerElement&&(this._playerElement.removeEventListener("pointerdown",this._onPointerDown),this._playerElement.removeEventListener("click",this._onClick)),this._player=e,this._playerElement=null==e?void 0:e.element,void 0!==this._playerElement&&(this._playerElement.addEventListener("pointerdown",this._onPointerDown),this._playerElement.addEventListener("click",this._onClick)))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-gesture-receiver",rg);var rm=d("theoplayer-live-button",F('<span part="icon"><slot name="icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><circle cx="12" cy="12" r="7"/></svg>\n</slot></span><slot name="spacer"> </slot><span part="text"><slot name="text">LIVE</slot></span>',"[part=icon] ::slotted(svg),[part=icon] svg{fill:#8c8c8c;fill:var(--theoplayer-live-button-color,#8c8c8c)}:host([live]:not([paused])) [part=icon] ::slotted(svg),:host([live]:not([paused])) [part=icon] svg{fill:red;fill:var(--theoplayer-live-button-active-color,red)}")),r_=["play","pause","playing","emptied"],rk=["seeking","seeked","timeupdate","durationchange","emptied"],rw=function(e){function t(){var t;return(t=e.call(this,{template:rm()})||this)._updatePaused=function(){t.paused=void 0===t._player||t._player.paused},t._updateLive=function(){var e=void 0!==t._player&&function(e,t){if(e.duration===1/0){var r=e.seekable;if(r.length>0)return r.end(r.length-1)-e.currentTime<=t}return!1}(t._player,t.liveThreshold);t.live!==e&&(t.live=e)},t._upgradeProperty("paused"),t._upgradeProperty("streamType"),t._upgradeProperty("liveThreshold"),t._upgradeProperty("live"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"seek to live")},a.handleClick=function(){void 0!==this._player&&(this._player.hesp&&void 0!==this._player.hesp.manifest?this._player.hesp.goLive():(this._player.currentTime=1/0,this._player.play()))},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),o!==a&&(r===p.LIVE_THRESHOLD&&this._updateLive(),t.observedAttributes.indexOf(r)>=0&&h(this))},k(t,[{key:"paused",get:function(){return this.hasAttribute(p.PAUSED)},set:function(e){O(this,p.PAUSED,e)}},{key:"streamType",get:function(){return this.getAttribute(p.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(p.STREAM_TYPE,e)}},{key:"liveThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(p.LIVE_THRESHOLD))?e:10)},set:function(e){e=Number(e),this.setAttribute(p.LIVE_THRESHOLD,String(isNaN(e)?0:e))}},{key:"live",get:function(){return this.hasAttribute(p.LIVE)},set:function(e){O(this,p.LIVE,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(r_,this._updatePaused),this._player.removeEventListener(rk,this._updateLive)),this._player=e,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(r_,this._updatePaused),this._player.addEventListener(rk,this._updateLive)))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes,[p.STREAM_TYPE,p.LIVE,p.PAUSED,p.LIVE_THRESHOLD])}}]),t}(Z(H,["player","streamType"]));customElements.define("theoplayer-live-button",rw);var rE=d("theoplayer-ad-display","<style>"+el+"\n:host{padding:5px 10px;padding:calc(var(--theoplayer-control-padding, 10px) - var(--theoplayer-ad-display-padding, 5px)) var(--theoplayer-control-padding,10px);pointer-events:none}span{background:#ffc50f;background:var(--theoplayer-ad-display-background,#ffc50f);border-radius:2px;border-radius:var(--theoplayer-ad-display-border-radius,2px);color:#000;color:var(--theoplayer-ad-display-text-color,#000);display:inline-block;padding:5px;padding:var(--theoplayer-ad-display-padding,5px)}</style><span></span>"),rx=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],rA=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,o=null==(e=t._player)?void 0:e.ads,n=(null!=(a=null==o?void 0:null==(r=o.currentAdBreak)?void 0:r.ads)?a:[]).filter(tX);if(void 0===o||!o.playing||0===n.length){I(t._spanEl,""),t.style.display="none";return}if(n.length>1){var i=S(t._player.ads.currentAds||[],tX);if(i){var l=n.indexOf(i);if(l>=0){I(t._spanEl,"Ad "+(l+1)+" of "+n.length),t.style.display="";return}}}I(t._spanEl,"Ad"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rE().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._updateFromPlayer()},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(null==(t=this._ads)||t.removeEventListener(rx,this._updateFromPlayer),this._player=e,this._ads=null==e?void 0:e.ads,this._updateFromPlayer(),null==(r=this._ads)||r.addEventListener(rx,this._updateFromPlayer))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-ad-display",rA);var rT=d("theoplayer-ad-countdown","<style>"+el+"\n:host{pointer-events:none}</style><span></span>"),rC=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"],rL=function(e){function t(){(t=e.call(this)||this)._onAdChange=function(){var e,r,a;(null==(r=t._player)?void 0:null==(e=r.ads)?void 0:e.playing)?(t._player.removeEventListener("timeupdate",t._update),t._player.addEventListener("timeupdate",t._update)):null==(a=t._player)||a.removeEventListener("timeupdate",t._update),t._update()},t._update=function(){var e,r,a=null==(e=t._player)?void 0:e.ads,o=null==a?void 0:null==(r=a.currentAdBreak)?void 0:r.maxRemainingDuration;if(void 0===a||!a.playing||void 0===o||o<0){I(t._spanEl,""),t.style.display="none";return}o=Math.ceil(o),I(t._spanEl,"Content will resume in "+o+"s"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rT().content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._update()},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rC,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rC,this._onAdChange))}}]),t}(Z(HTMLElement,["player"]));customElements.define("theoplayer-ad-countdown",rL);var rS=d("theoplayer-ad-clickthrough-button",G("<slot>Visit Advertiser</slot>")),rP=["adbegin","adend","adloaded","updatead","adskip"],rR=function(e){function t(){var t;return(t=e.call(this,{template:rS()})||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.clickThrough=null;return}var o=S(null!=(r=a.currentAds)?r:[],tX);if(void 0===o||"google-ima"===o.integration){t.clickThrough=null;return}var n=o.clickThrough;if(!n){t.clickThrough=null;return}t.clickThrough=n},t.disabled=!0,t.style.display="none",t._upgradeProperty("clickThrough"),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer()},a.attributeChangedCallback=function(r,a,o){if(e.prototype.attributeChangedCallback.call(this,r,a,o),r===p.CLICKTHROUGH&&o!==a){var n=null!=o,i=o?String(o).trim():"#";this.setLink(i,"_blank"),this.disabled=!n,n?this.style.display="":this.style.display="none"}t.observedAttributes.indexOf(r)>=0&&h(this)},a.handleClick=function(){var e;null==(e=this._player)||e.pause()},k(t,[{key:"clickThrough",get:function(){return this.getAttribute(p.CLICKTHROUGH)},set:function(e){null==e?this.removeAttribute(p.CLICKTHROUGH):this.setAttribute(p.CLICKTHROUGH,e)}},{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(null==(t=this._ads)||t.removeEventListener(rP,this._updateFromPlayer),this._player=e,this._ads=null==e?void 0:e.ads,this._updateFromPlayer(),null==(r=this._ads)||r.addEventListener(rP,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[].concat(Y.observedAttributes,[p.CLICKTHROUGH])}}]),t}(Z(Y,["player"]));customElements.define("theoplayer-ad-clickthrough-button",rR);var rM=d("theoplayer-ad-skip-button",F('<span part="countdown">Skip in 0 seconds</span><span part="skip"><span part="skip-text"><slot name="skip-text">Skip Ad</slot></span> <span part="skip-icon"><slot name="skip-icon"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="24" width="24"><path d="M17.5 18q-.425 0-.712-.288-.288-.287-.288-.712V7q0-.425.288-.713Q17.075 6 17.5 6t.712.287q.288.288.288.713v10q0 .425-.288.712-.287.288-.712.288ZM7.05 16.975q-.5.35-1.025.05-.525-.3-.525-.9v-8.25q0-.6.525-.888.525-.287 1.025.038l6.2 4.15q.45.3.45.825 0 .525-.45.825Z"/></svg>\n</slot></span></span>',":host{-ms-grid-columns:1fr;-ms-grid-rows:1fr;background:rgba(0,0,0,.7);background:var(--theoplayer-ad-skip-background,rgba(0,0,0,.7));border:1px solid hsla(0,0%,100%,.5);border:var(--theoplayer-ad-skip-border,1px solid hsla(0,0%,100%,.5));color:#fff;color:var(--theoplayer-ad-skip-color,#fff);display:-ms-grid;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}:host(:hover){background:rgba(0,0,0,.9);background:var(--theoplayer-ad-skip-hover-background,rgba(0,0,0,.9));border:1px solid #fff;border:var(--theoplayer-ad-skip-hover-border,1px solid #fff);color:#fff;color:var(--theoplayer-ad-skip-hover-color,var(--theoplayer-ad-skip-color,#fff))}:host([disabled]){background:transparent;background:var(--theoplayer-ad-skip-countdown-background,transparent);border:1px solid transparent;border:var(--theoplayer-ad-skip-countdown-border,1px solid transparent);color:#fff;color:var(--theoplayer-ad-skip-countdown-color,var(--theoplayer-ad-skip-color,#fff))}[part=countdown],[part=skip]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-grid-column:1;grid-column:1;-ms-grid-row:1;grid-row:1}[part=skip]{font-size:14px;font-size:var(--theoplayer-ad-skip-font-size,var(--theoplayer-text-font-size,14px));line-height:24px;line-height:var(--theoplayer-ad-skip-line-height,var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px)))}[part=skip-icon]{padding-left:10px;padding-left:var(--theoplayer-control-padding,10px)}[part=skip-icon] ::slotted(svg),[part=skip-icon] svg{height:24px;height:var(--theoplayer-ad-skip-icon-height,var(--theoplayer-control-height,24px));width:24px;width:var(--theoplayer-ad-skip-icon-width,var(--theoplayer-control-height,24px))}")),rI=["adbegin","adend","adloaded","updatead","adskip"],rO=function(e){function t(){var t;return(t=e.call(this,{template:rM()})||this)._onAdChange=function(){var e,r,a;(null==(r=t._player)?void 0:null==(e=r.ads)?void 0:e.playing)?(t._player.removeEventListener("timeupdate",t._update),t._player.addEventListener("timeupdate",t._update)):null==(a=t._player)||a.removeEventListener("timeupdate",t._update),t._update()},t._update=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.style.display="none";return}var o=S(null!=(r=a.currentAds)?r:[],tX);if(void 0===o||"google-ima"===o.integration){t.style.display="none";return}var n=o.skipOffset;if(void 0===n||n<0||void 0!==o.duration&&n>=o.duration){t.style.display="none";return}var i=t._player.currentTime;i<n?(I(t._countdownEl,"Skip in "+Math.ceil(n-i)+"s"),t._countdownEl.style.visibility="visible",t._skipEl.style.visibility="hidden",t._skipEl.style.pointerEvents="none",t.style.display="",t.setAttribute(p.DISABLED,""),t.setAttribute(p.ARIA_LIVE,"off")):(t._countdownEl.style.visibility="hidden",t._skipEl.style.visibility="visible",t._skipEl.style.pointerEvents="",t.style.display="",t.removeAttribute(p.DISABLED),t.setAttribute(p.ARIA_LIVE,"polite"))},t._countdownEl=t.shadowRoot.querySelector('[part="countdown"]'),t._skipEl=t.shadowRoot.querySelector('[part="skip"]'),t._upgradeProperty("player"),t}r(t,e);var a=t.prototype;return a.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._update()},a.handleClick=function(){var e,t;null==(t=this._player)||null==(e=t.ads)||e.skip()},a.attributeChangedCallback=function(r,a,o){e.prototype.attributeChangedCallback.call(this,r,a,o),t.observedAttributes.indexOf(r)>=0&&h(this)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a;this._player!==e&&(null==(t=this._player)||t.removeEventListener("timeupdate",this._update),null==(r=this._ads)||r.removeEventListener(rI,this._onAdChange),this._player=e,this._ads=null==e?void 0:e.ads,this._onAdChange(),null==(a=this._ads)||a.addEventListener(rI,this._onAdChange))}}],[{key:"observedAttributes",get:function(){return[].concat(H.observedAttributes)}}]),t}(Z(H,["player"]));customElements.define("theoplayer-ad-skip-button",rO),(b=y||(y={})).TopControlBar="top-control-bar",b.BottomControlBar="bottom-control-bar",b.Menu="menu";var rN=[];function rD(e){rN.push(e)}var rq=function(){if("undefined"!=typeof document)for(var e,t=l([["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]]);!(e=t()).done;){var r=e.value;if(r[1]in document)return{requestFullscreen_:r[0],exitFullscreen_:r[1],fullscreenElement_:r[2],fullscreenEnabled_:r[3],fullscreenchange_:r[4],fullscreenerror_:r[5]}}}();function rB(){if("object"!=typeof navigator)return!1;if(navigator.userAgentData)return navigator.userAgentData.mobile;var e=navigator.userAgent;return!!e&&/Android|iPhone|iPad|iPod|Mobile Safari|Windows Phone/i.test(e)}function rF(){if("object"!=typeof navigator)return!1;var e=navigator.userAgent;return!!e&&/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv)\b/i.test(e)}var rU="theoplayerstreamtypechange",rH="theoplayerready",rV=d("theoplayer-ui",'<style>:host{background:#000;background:var(--theoplayer-background,#000);-webkit-box-sizing:border-box;box-sizing:border-box;container-name:theoplayer-ui-container;container-type:size;display:inline-block;height:0;min-width:300px;padding-bottom:56.25%;position:relative}:host([hidden]){display:none!important}:host([fullscreen]){height:100%!important;padding:0!important;width:100%!important}:host(:-webkit-full-screen){height:100%!important;padding:0!important;width:100%!important}:host(:-ms-fullscreen){height:100%!important;padding:0!important;width:100%!important}:host(:fullscreen){height:100%!important;padding:0!important;width:100%!important}:host([fluid]){padding-bottom:56.25%;padding-bottom:calc(100%*var(--theoplayer-video-height, 9)/var(--theoplayer-video-width, 16))}[part~=chrome]{position:relative}[part~=layer]{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}[part~=chrome],[part~=layer]:not([part~=media-layer]){display:-webkit-box;display:-ms-flexbox;display:flex}[part~=chrome],[part~=gesture-layer],[part~=vertical-layer]{pointer-events:none}[part~=chrome] ::slotted(*){pointer-events:auto}[part~=media-layer] video{border-radius:0;border-radius:var(--theoplayer-video-border-radius,0);-o-object-fit:contain;object-fit:contain;-o-object-fit:var(--theoplayer-video-object-fit,contain);object-fit:var(--theoplayer-video-object-fit,contain)}[part~=media-layer] .theoplayer-ad-linear{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10}[part~=media-layer] .theo-ad-remaining-container,[part~=media-layer] .theoplayer-ad-skip,[part~=media-layer] .theoplayer-ad-touch-clickthrough{display:none!important}[part~=chrome],[part~=vertical-layer]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-ms-flex-flow:column nowrap;flex-flow:column nowrap}[part~=centered]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;justify-content:center}[part~=middle]{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}[part~=vertical-layer]:before{background:transparent;background:var(--theoplayer-control-backdrop-background,transparent);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}:host(:not([mobile]):not([tv])) [part~=menu-layer]{bottom:0;bottom:var(--theoplayer-menu-offset-bottom,0);padding:10px;padding:var(--theoplayer-menu-layer-padding,10px);top:0;top:var(--theoplayer-menu-offset-top,0)}[part=menu]{-ms-grid-column-align:stretch;background:rgba(0,0,0,.5);background:var(--theoplayer-menu-backdrop-background,rgba(0,0,0,.5));display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:stretch}[part=menu] ::slotted(*){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-ms-grid-column-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;justify-self:stretch}:host(:not([mobile])) [part=menu]{margin:auto 0 0 auto;margin:var(--theoplayer-menu-margin-top,auto) var(--theoplayer-menu-margin-right,0) var(--theoplayer-menu-margin-bottom,0) var(--theoplayer-menu-margin-left,auto);max-height:100%;min-width:200px;min-width:var(--theoplayer-menu-min-width,200px)}:host([mobile]) [part=menu]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([tv]) [part~=menu-layer]{left:auto}:host([tv]) [part=menu]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [part~=vertical-layer],:host([menu-opened][tv]) [part~=vertical-layer]{display:none!important}@container theoplayer-ui-container (max-width: 500px){:host(:not([mobile])) [part~=menu-layer]{bottom:0;left:0;padding:0;right:0;top:0}:host(:not([mobile])) [part=menu]{-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;-webkit-box-flex:1;-ms-flex-positive:1;align-self:stretch;flex-grow:1;margin:0;min-width:auto;pointer-events:none}:host([menu-opened]) [part~=vertical-layer]{display:none!important}}[part~=error-layer]{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:rgba(0,0,0,.5);background:var(--theoplayer-error-background,rgba(0,0,0,.5));justify-content:center}:host(:not([has-error])) [part~=error-layer],:host([has-error]) [part~=layer]:not([part~=media-layer]):not([part~=error-layer]){display:none!important}[part~=chrome] ::slotted(theoplayer-control-bar){-ms-flex-item-align:stretch;-ms-grid-row-align:stretch;align-self:stretch}theoplayer-gesture-receiver{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}:host(:not([mobile])) [part~=chrome] ::slotted([mobile-only]),:host([mobile]) [part~=chrome] ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [part~=chrome] ::slotted([tv-only]),:host([tv]) [part~=chrome] ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [part~=chrome] ::slotted([live-hidden]),:host([stream-type=vod]) [part~=chrome] ::slotted([live-only]){display:none!important}:host(:not([playing-ad])) [part~=chrome] ::slotted([ad-only]),:host([playing-ad]) [part~=chrome] ::slotted([ad-hidden]){display:none!important}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])){cursor:none}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=chrome] ::slotted(:not([no-auto-hide])){opacity:0;-webkit-transition:opacity 1s;transition:opacity 1s}:host([user-idle]:not([paused]):not([casting]):not([menu-opened])) [part~=vertical-layer]:before{opacity:0;-webkit-transition:opacity 1s;transition:opacity 1s}</style><div part="layer media-layer"></div><div part="layer gesture-layer"><theoplayer-gesture-receiver></theoplayer-gesture-receiver></div><div part="layer vertical-layer"><div part="top chrome"><slot name="top-chrome"></slot></div><div part="middle chrome"><slot name="middle-chrome"></slot></div><div part="layer centered-layer centered loading"><slot name="centered-loading"></slot></div><div part="layer centered-layer centered chrome"><slot name="centered-chrome"></slot></div><div part="bottom chrome"><slot></slot></div></div><div part="layer menu-layer"><theoplayer-menu-group part="menu"><slot name="menu"></slot></theoplayer-menu-group></div><div part="layer error-layer"><slot name="error"></slot></div>'),rz=function(t){function a(e){void 0===e&&(e={}),(r=t.call(this)||this)._configuration={},r._pointerType="",r._lastPointerUpTime=0,r._stateReceivers=[],r._player=void 0,r._source=void 0,r._userIdleTimer=0,r._previewTime=NaN,r._activeVideoTrack=void 0,r._onMutation=function(e){for(var t,a=l(e);!(t=a()).done;){var o=t.value;if("childList"===o.type){for(var n=o.addedNodes,i=o.removedNodes,s=0;s<n.length;s++){var u=n[s];A(u)&&X(u,r._playerEl,r.registerStateReceiver_)}for(var h=0;h<i.length;h++){var d=i[h];A(d)&&X(d,r._playerEl,r.unregisterStateReceiver_)}}}},r._onSlotChange=function(){X(em(r),r._playerEl,r.registerStateReceiver_),r._updateTextTrackMargins()},r.registerStateReceiver_=function(e){r._stateReceivers.indexOf(e)>=0||(r._stateReceivers.push(e),r.propagateStateToReceiver_(e))},r.unregisterStateReceiver_=function(e){var t,a;!((a=(t=r._stateReceivers).indexOf(e))<0)&&(function(e,t){e.splice(t,1)}(t,a),1)&&r.removeStateFromReceiver_(e)},r._onToggleMenu=function(e){e.stopPropagation();var t=e.detail.menu;if(!r._menuGroup.getMenuById(t)){console.error('<theoplayer-ui>: cannot find menu with ID "'+t+'"');return}var a=T(e.target)?e.target:void 0;r._menuGroup.isMenuOpen(t)?r.closeMenu_():(r.closeMenu_(),r.openMenu_(t,a))},r._onCloseMenu=function(e){e.stopPropagation(),r.closeMenu_()},r._onMenuChange=function(){r._menuEl.removeEventListener("pointerdown",r._onMenuPointerDown),r._menuEl.removeEventListener("click",r._onMenuClick),r._menuGroup.hasCurrentMenu()?(r._menuEl.addEventListener("pointerdown",r._onMenuPointerDown),r._menuEl.addEventListener("click",r._onMenuClick),r.setAttribute(p.MENU_OPENED,"")):r.removeAttribute(p.MENU_OPENED)},r._onMenuPointerDown=function(e){r._pointerType=e.pointerType},r._onMenuClick=function(e){var t,a=null!=(t=e.pointerType)?t:r._pointerType;e.target===r._menuEl&&"mouse"===a&&r._menuGroup.closeCurrentMenu()&&e.preventDefault()},r._onEnterFullscreen=function(e){if(e.stopPropagation(),rq&&document[rq.fullscreenEnabled_]&&r[rq.requestFullscreen_]){var t=r[rq.requestFullscreen_]();t&&t.then&&t.then(x,x)}else r._player&&r._player.presentation.supportsMode("fullscreen")&&r._player.presentation.requestMode("fullscreen")},r._onExitFullscreen=function(e){if(e.stopPropagation(),rq){var t=document[rq.exitFullscreen_]();t&&t.then&&t.then(x,x)}r._player&&"fullscreen"===r._player.presentation.currentMode&&r._player.presentation.requestMode("inline")},r._onFullscreenChange=function(){var e=!1;if(void 0!==rq){var t=document[rq.fullscreenElement_];t&&(e=function e(t,r){if(!t||!r)return!1;if(t.contains(r))return!0;var a=r.getRootNode();return!!a.host&&e(t,a.host)}(t,em(r)))}e||void 0===r._player||"fullscreen"!==r._player.presentation.currentMode||(e=!0),O(em(r),p.FULLSCREEN,e)},r._updateAspectRatio=function(){if(void 0!==r._player){var e=r._player,t=e.videoWidth,a=e.videoHeight;t>0&&a>0?h(em(r),{"--theoplayer-video-width":""+t,"--theoplayer-video-height":""+a}):h(em(r),{"--theoplayer-video-width":"","--theoplayer-video-height":""})}},r._updateError=function(){var e=null==(t=r._player)?void 0:t.errorObject;O(em(r),p.HAS_ERROR,void 0!==e);for(var t,a,o=l(r._stateReceivers);!(a=o()).done;){var n=a.value;n[W].indexOf("error")>=0&&(n.error=e)}},r._onPlay=function(){r.setAttribute(p.HAS_FIRST_PLAY,""),r.removeAttribute(p.PAUSED),r._updateEnded()},r._onPause=function(){r.setAttribute(p.PAUSED,""),r._updateEnded()},r._updatePausedAndEnded=function(){var e=!r._player||r._player.paused;O(em(r),p.PAUSED,e),r._updateEnded()},r._updateEnded=function(){var e=!!r._player&&r._player.ended;O(em(r),p.ENDED,e)},r._updateStreamType=function(){if(void 0!==r._player){var e,t=r._player.duration;if(!isNaN(t)){if(t===1/0){e="live";var a=r.dvrThreshold,o=r._player.seekable;(a<=0||o.length>0&&o.end(o.length-1)-o.start(0)>=a)&&(e="dvr")}else e="vod";r.streamType=e}}},r._updatePlaybackRate=function(){if(void 0!==r._player)for(var e,t=r._player.playbackRate,a=l(r._stateReceivers);!(e=a()).done;){var o=e.value;o[W].indexOf("playbackRate")>=0&&(o.playbackRate=t)}},r._updateMuted=function(){void 0!==r._player&&(r.muted=r._player.muted)},r._updateActiveVideoTrack=function(){if(void 0!==r._player){var e,t,a,o,n=S(r._player.videoTracks,function(e){return e.enabled});r._activeVideoTrack!==n&&(null==(e=r._activeVideoTrack)||e.removeEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(t=r._activeVideoTrack)||t.removeEventListener("targetqualitychanged",r._updateTargetVideoQualities),r._activeVideoTrack=n,r._updateActiveVideoQuality(),r._updateTargetVideoQualities(),null==(a=r._activeVideoTrack)||a.addEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(o=r._activeVideoTrack)||o.addEventListener("targetqualitychanged",r._updateTargetVideoQualities))}},r._updateActiveVideoQuality=function(){for(var e,t,a=null==(e=r._activeVideoTrack)?void 0:e.activeQuality,o=l(r._stateReceivers);!(t=o()).done;){var n=t.value;n[W].indexOf("activeVideoQuality")>=0&&(n.activeVideoQuality=a)}},r._updateTargetVideoQualities=function(){for(var e,t=e$(r._activeVideoTrack),a=l(r._stateReceivers);!(e=a()).done;){var o=e.value;o[W].indexOf("targetVideoQualities")>=0&&(o.targetVideoQualities=t)}},r._updateCasting=function(){var e,t,a,o=null!=(a=null==(t=r._player)?void 0:null==(e=t.cast)?void 0:e.casting)&&a;O(em(r),p.CASTING,o)},r._updatePlayingAd=function(){var e,t,a,o=null!=(a=null==(t=r._player)?void 0:null==(e=t.ads)?void 0:e.playing)&&a;O(em(r),p.PLAYING_AD,o)},r._onSourceChange=function(){r.closeMenu_();var e=void 0!==r._player&&!r._player.paused;O(em(r),p.HAS_FIRST_PLAY,e)},r.setUserIdle_=function(){if(clearTimeout(r._userIdleTimer),r._userIdleTimer=0,!(r.userIdleTimeout<0)&&(r.setAttribute(p.USER_IDLE,""),"tv"==r.deviceType&&r.isUserIdle_())){var e=eT();null!==e&&e.blur()}},r.scheduleUserIdle_=function(){if(r.setUserActive_(),clearTimeout(r._userIdleTimer),r.userIdleTimeout<0){r._userIdleTimer=0;return}r._userIdleTimer=setTimeout(r.setUserIdle_,1e3*r.userIdleTimeout)},r._onTvKeyDown=function(e){if(z(e.keyCode)){r.setUserIdle_();return}var t=function e(t){if(T(t)&&"none"!==getComputedStyle(t).display){if(null!==t.getAttribute(p.TV_FOCUS))return q(t);for(var r=N(t),a=0;a<r.length;a++){var o=e(r[a]);if(o)return o}}}(em(r)),a=q(em(r)),o=eT();if(!o){var n=null!=t?t:a;n.length>0&&(n[0].focus(),o=n[0])}!r.isUserIdle_()&&(e.keyCode===c.ENTER?void 0!==r._player&&null!==o&&o.click():V(e.keyCode)&&eC(em(r),a,e.keyCode)&&(e.preventDefault(),e.stopPropagation()))},r._onKeyUp=function(e){z(e.keyCode)||r.scheduleUserIdle_()},r._onPointerUp=function(e){"touch"===e.pointerType&&(r.isPlayerOrMedia_(e.target)&&!r.hasAttribute(p.USER_IDLE)?r.setUserIdle_():(r.isUserIdle_()&&(r._lastPointerUpTime=performance.now(),r.addEventListener("click",r._onClickAfterPointerUp,!0)),r.scheduleUserIdle_()))},r._onClickAfterPointerUp=function(e){r.removeEventListener("click",r._onClickAfterPointerUp,!0),performance.now()-r._lastPointerUpTime<10&&(e.preventDefault(),e.stopPropagation())},r._onPointerMove=function(e){"mouse"===e.pointerType&&(r.setUserActive_(),r.isPlayerOrMedia_(e.target)&&r.scheduleUserIdle_())},r._onMouseLeave=function(){r.setUserIdle_()},r._onChromeSlotTransition=function(e){"opacity"===e.propertyName&&r._updateTextTrackMargins()},r._updateTextTrackMargins=function(){var e=r._player;if(void 0!==e){var t=rG(r._topChromeSlot),a=rG(r._bottomChromeSlot);e.textTrackStyle.marginTop=null==t?void 0:t.height,e.textTrackStyle.marginBottom=null==a?void 0:a.height}},r._onPreviewTimeChange=function(e){r._previewTime=e.detail.previewTime;for(var t,a=l(r._stateReceivers);!(t=a()).done;){var o=t.value;o[W].indexOf("previewTime")>=0&&(o.previewTime=r._previewTime)}},r._onDestroy=function(){r._player&&(r.removePlayerListeners_(r._player),r._player=void 0,r.propagatePlayerToAllReceivers_())};var r,a=r.attachShadow({mode:"open",delegatesFocus:!0});return a.appendChild(rV().content.cloneNode(!0)),r._configuration=e,r._playerEl=a.querySelector('[part~="media-layer"]'),r._menuEl=a.querySelector('[part~="menu-layer"]'),r._menuGroup=a.querySelector("theoplayer-menu-group"),r._topChromeEl=a.querySelector('[part~="top"]'),r._topChromeSlot=a.querySelector('slot[name="top-chrome"]'),r._bottomChromeEl=a.querySelector('[part~="bottom"]'),r._bottomChromeSlot=a.querySelector("slot:not([name])"),r._mutationObserver=new MutationObserver(r._onMutation),"undefined"!=typeof ResizeObserver&&(r._resizeObserver=new ResizeObserver(r._updateTextTrackMargins)),a.addEventListener(eD,r._onToggleMenu),a.addEventListener(tz,r._onEnterFullscreen),a.addEventListener(tG,r._onExitFullscreen),a.addEventListener(tZ,r._onPreviewTimeChange),r._topChromeSlot.addEventListener("transitionstart",r._onChromeSlotTransition),r._topChromeSlot.addEventListener("transitionend",r._onChromeSlotTransition),r._bottomChromeSlot.addEventListener("transitionstart",r._onChromeSlotTransition),r._bottomChromeSlot.addEventListener("transitionend",r._onChromeSlotTransition),r._upgradeProperty("configuration"),r._upgradeProperty("source"),r._upgradeProperty("fluid"),r._upgradeProperty("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("streamType"),r.tryInitializePlayer_(),r}r(a,t);var o=a.prototype;return o._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},o._setConfiguration=function(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()},o._setSource=function(e){this._player?this._player.source=e:this._source=e},o.connectedCallback=function(){if(u(this),this._menuGroup instanceof eF||customElements.upgrade(this._menuGroup),!this.hasAttribute(p.DEVICE_TYPE)){var e=rB()?"mobile":rF()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}this.hasAttribute(p.PAUSED)||this.setAttribute(p.PAUSED,""),this.tryInitializePlayer_();for(var t,r,a=l(this._stateReceivers);!(r=a()).done;){var o=r.value;this.propagateStateToReceiver_(o)}X(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(t=this._resizeObserver)||t.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(eR,this._onCloseMenu),this._menuGroup.addEventListener(eM,this._onMenuChange),void 0!==rq&&(document.addEventListener(rq.fullscreenchange_,this._onFullscreenChange),document.addEventListener(rq.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),"tv"===this.deviceType&&window.addEventListener("keydown",this._onTvKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)},o.tryInitializePlayer_=function(){void 0===this._player&&(void 0!==this._configuration.license||void 0!==this._configuration.licenseUrl)&&(this._player=new e(this._playerEl,this._configuration),this._source&&(this._player.source=this._source,this._source=void 0),this._player.muted=this.muted,this._player.autoplay=this.autoplay,this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this.addPlayerListeners_(this._player),this.propagatePlayerToAllReceivers_(),this.dispatchEvent(ew(rH)))},o.disconnectedCallback=function(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange),this._menuGroup.removeEventListener(eR,this._onCloseMenu),this._menuGroup.removeEventListener(eM,this._onMenuChange),void 0!==rq&&(document.removeEventListener(rq.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(rq.fullscreenerror_,this._onFullscreenChange)),window.removeEventListener("keydown",this._onTvKeyDown),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("pointerup",this._onPointerUp),this.removeEventListener("click",this._onClickAfterPointerUp,!0),this.removeEventListener("pointermove",this._onPointerMove),this.removeEventListener("mouseleave",this._onMouseLeave),this._player&&(this.removePlayerListeners_(this._player),this._player.destroy(),this._player=void 0,this.propagatePlayerToAllReceivers_()),this._stateReceivers.length=0},o.attributeChangedCallback=function(e,t,r){if(r!==t){var o=null!=r;if(e===p.CONFIGURATION)this._setConfiguration(r?JSON.parse(r):{});else if(e===p.SOURCE)this._setSource(r?JSON.parse(r):void 0);else if(e===p.MUTED)this._player&&(this._player.muted=o);else if(e===p.AUTOPLAY)this._player&&(this._player.autoplay=o);else if(e===p.FULLSCREEN)for(var n,i=l(this._stateReceivers);!(n=i()).done;){var s=n.value;s[W].indexOf("fullscreen")>=0&&(s.fullscreen=o)}else if(e===p.DEVICE_TYPE){O(this,p.MOBILE,"mobile"===r),O(this,p.TV,"tv"===r),window.removeEventListener("keydown",this._onTvKeyDown),"tv"===r&&window.addEventListener("keydown",this._onTvKeyDown);for(var u,d=l(this._stateReceivers);!(u=d()).done;){var c=u.value;c[W].indexOf("deviceType")>=0&&(c.deviceType=r)}}else if(e===p.STREAM_TYPE){for(var y,v=l(this._stateReceivers);!(y=v()).done;){var f=y.value;f[W].indexOf("streamType")>=0&&(f.streamType=r)}var b=ew(rU,{bubbles:!0,composed:!0,detail:{streamType:r}});this.dispatchEvent(b)}else e===p.FLUID?this._updateAspectRatio():e===p.USER_IDLE||e===p.PAUSED||e===p.CASTING?this._updateTextTrackMargins():e===p.DVR_THRESHOLD&&this._updateStreamType();a.observedAttributes.indexOf(e)>=0&&h(this)}},o.propagateStateToReceiver_=function(e){var t,r=e[W];r.indexOf("player")>=0&&(e.player=this._player),r.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),r.indexOf("deviceType")>=0&&(e.deviceType=this.deviceType),r.indexOf("streamType")>=0&&(e.streamType=this.streamType),void 0!==this._player&&(r.indexOf("playbackRate")>=0&&(e.playbackRate=this._player.playbackRate),r.indexOf("error")>=0&&(e.error=this._player.errorObject),r.indexOf("activeVideoQuality")>=0&&(e.activeVideoQuality=null==(t=this._activeVideoTrack)?void 0:t.activeQuality),r.indexOf("targetVideoQualities")>=0&&(e.targetVideoQualities=e$(this._activeVideoTrack))),r.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)},o.propagatePlayerToAllReceivers_=function(){for(var e,t=l(this._stateReceivers);!(e=t()).done;){var r=e.value;r[W].indexOf("player")>=0&&(r.player=this._player)}},o.removeStateFromReceiver_=function(e){e[W].indexOf("player")>=0&&(e.player=void 0)},o.openMenu_=function(e,t){var r=eA.fromRect(this._topChromeEl.getBoundingClientRect()),a=eA.fromRect(this._bottomChromeEl.getBoundingClientRect()),o=!0,n=!0;if(void 0!==t){var i=eA.fromRect(this.getBoundingClientRect()),l=eA.fromRect(t.getBoundingClientRect());i.width>0&&i.height>0&&(o=l.top>=i.top+i.height/2,n=l.left>=i.left+i.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,h(this,{"--theoplayer-menu-offset-top":""+Math.round(r.height)+"px","--theoplayer-menu-offset-bottom":""+Math.round(a.height)+"px","--theoplayer-menu-margin-top":o?"auto":"0","--theoplayer-menu-margin-bottom":o?"0":"auto","--theoplayer-menu-margin-left":n?"auto":"0","--theoplayer-menu-margin-right":n?"0":"auto"})},o.closeMenu_=function(){var e,t,r;null==(e=(t=this._menuGroup).closeMenu)||e.call(t),null==(r=this._menuOpener)||r.focus(),this._menuOpener=void 0},o.isUserIdle_=function(){return this.hasAttribute(p.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()},o.setUserActive_=function(){clearTimeout(this._userIdleTimer),this.removeAttribute(p.USER_IDLE)},o.isPlayerOrMedia_=function(e){return e===this||this._playerEl.contains(e)},o.addPlayerListeners_=function(e){var t,r,a;e.addEventListener("destroy",this._onDestroy),e.addEventListener("resize",this._updateAspectRatio),e.addEventListener(["error","sourcechange","emptied"],this._updateError),e.addEventListener("volumechange",this._updateMuted),e.addEventListener("play",this._onPlay),e.addEventListener("pause",this._onPause),e.addEventListener(["ended","emptied"],this._updatePausedAndEnded),e.addEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.addEventListener("ratechange",this._updatePlaybackRate),e.addEventListener("sourcechange",this._onSourceChange),e.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(t=e.theoLive)||t.addEventListener("publicationloadstart",this._onSourceChange),e.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.addEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)},o.removePlayerListeners_=function(e){e.removeEventListener("destroy",this._onDestroy),e.removeEventListener("resize",this._updateAspectRatio),e.removeEventListener(["error","sourcechange","emptied"],this._updateError),e.removeEventListener("volumechange",this._updateMuted),e.removeEventListener("play",this._onPlay),e.removeEventListener("pause",this._onPause),e.removeEventListener(["ended","emptied"],this._updatePausedAndEnded),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updateStreamType),e.removeEventListener("ratechange",this._updatePlaybackRate),e.removeEventListener("sourcechange",this._onSourceChange),e.removeEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd);try{var t,r,a;null==(t=e.theoLive)||t.removeEventListener("publicationloadstart",this._onSourceChange),e.videoTracks.removeEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(r=e.cast)||r.removeEventListener("castingchange",this._updateCasting),null==(a=e.ads)||a.removeEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}catch(e){}},k(a,[{key:"player",get:function(){return this._player}},{key:"configuration",get:function(){return this._configuration},set:function(e){this.removeAttribute(p.CONFIGURATION),this._setConfiguration(e)}},{key:"source",get:function(){return this._player?this._player.source:this._source},set:function(e){this.removeAttribute(p.SOURCE),this._setSource(e)}},{key:"fluid",get:function(){return this.hasAttribute(p.FLUID)},set:function(e){O(this,p.FLUID,e)}},{key:"muted",get:function(){return this.hasAttribute(p.MUTED)},set:function(e){O(this,p.MUTED,e)}},{key:"autoplay",get:function(){return this.hasAttribute(p.AUTOPLAY)},set:function(e){O(this,p.AUTOPLAY,e)}},{key:"fullscreen",get:function(){return this.hasAttribute(p.FULLSCREEN)}},{key:"paused",get:function(){return this.hasAttribute(p.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(p.ENDED)}},{key:"casting",get:function(){return this.hasAttribute(p.CASTING)}},{key:"userIdleTimeout",get:function(){var e,t="tv"===this.deviceType?5:2;return Number(null!=(e=this.getAttribute(p.USER_IDLE_TIMEOUT))?e:t)},set:function(e){e=Number(e),this.setAttribute(p.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}},{key:"deviceType",get:function(){return this.getAttribute(p.DEVICE_TYPE)||"desktop"}},{key:"streamType",get:function(){return this.getAttribute(p.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(p.STREAM_TYPE,e)}},{key:"dvrThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(p.DVR_THRESHOLD))?e:60)},set:function(e){e=Number(e),this.setAttribute(p.DVR_THRESHOLD,String(isNaN(e)?0:e))}}],[{key:"observedAttributes",get:function(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FULLSCREEN,p.FLUID,p.DEVICE_TYPE,p.PAUSED,p.ENDED,p.CASTING,p.PLAYING_AD,p.HAS_ERROR,p.HAS_FIRST_PLAY,p.STREAM_TYPE,p.DVR_THRESHOLD,p.USER_IDLE,p.USER_IDLE_TIMEOUT]}}]),a}(n(HTMLElement));function rG(e){for(var t,r,a=D(e).filter(T),o=l(a);!(r=o()).done;){var n=r.value;if("0"!==getComputedStyle(n).opacity){var i=eA.fromRect(n.getBoundingClientRect());i.width>0&&i.height>0&&(t=t?t.union(i):i)}}return t}rz.READY_EVENT=rH,customElements.define("theoplayer-ui",rz);var rQ=d("theoplayer-default-ui",'<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative}:host([hidden]){display:none!important}theoplayer-ui{display:block;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:-ms-fullscreen),:host(:-ms-fullscreen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}[part=title]{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:14px;font-size:var(--theoplayer-text-font-size,14px);line-height:24px;line-height:var(--theoplayer-text-content-height,var(--theoplayer-control-height,24px));padding:10px;padding:var(--theoplayer-control-padding,10px);text-shadow:0 0 4px rgba(0,0,0,.75);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(:not([has-title])) [part=title]{display:none}[part=centered-chrome] *{--theoplayer-control-height:var(--theoplayer-centered-chrome-control-height,48px)}[part=middle-chrome]{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;justify-content:flex-end}[part=bottom-chrome],[part=middle-chrome]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap;pointer-events:none;position:relative}[part=bottom-chrome]{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:var(--theoplayer-mobile-control-backdrop-background,rgba(0,0,0,.5))}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:-webkit-gradient(linear,left bottom,left top,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:-webkit-gradient(linear,left top,left bottom,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}theoplayer-time-range{--theoplayer-control-height:var(--theoplayer-time-range-control-height,12px);--theoplayer-range-track-pointer-background:var(--theoplayer-time-range-track-pointer-background,hsla(0,0%,100%,.5))}[part=ad-chrome]{--theoplayer-control-height:var(--theoplayer-ad-chrome-control-height,12px);-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;pointer-events:none}theoplayer-ad-display,theoplayer-ad-skip-button{-ms-flex-negative:0;flex-shrink:0}theoplayer-ad-countdown,theoplayer-ad-skip-button[disabled]{text-shadow:0 0 4px rgba(0,0,0,.75)}theoplayer-ad-countdown{min-width:0}theoplayer-ad-skip-button{-webkit-box-align:end;-ms-flex-align:end;--theoplayer-ad-skip-font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);--theoplayer-ad-skip-line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25);--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;align-items:end;border-right:0!important;justify-items:end}:host(:not([mobile])) [mobile-only],:host(:not([mobile])) theoplayer-control-bar ::slotted([mobile-only]),:host([mobile]) [mobile-hidden],:host([mobile]) theoplayer-control-bar ::slotted([mobile-hidden]){display:none!important}:host(:not([tv])) [tv-only],:host(:not([tv])) theoplayer-control-bar ::slotted([tv-only]),:host([tv]) [tv-hidden],:host([tv]) theoplayer-control-bar ::slotted([tv-hidden]){display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui:not([playing-ad]) theoplayer-control-bar ::slotted([ad-only]),theoplayer-ui[playing-ad] [ad-hidden],theoplayer-ui[playing-ad] theoplayer-control-bar ::slotted([ad-hidden]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-ui:not([mobile]):not([casting]) theoplayer-ad-clickthrough-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:var(--theoplayer-volume-range-track-width,70px);overflow:hidden;-webkit-transition:width .2s ease-in;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display:not([stream-type=vod]){padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}theoplayer-ui[playing-ad] .theoplayer-ad-control{--theoplayer-control-height:var(--theoplayer-ad-control-height,16px)}</style><theoplayer-ui><theoplayer-control-bar slot="top-chrome" part="top-chrome"><div part="title" ad-hidden><slot name="title"></slot></div><span class="theoplayer-spacer"></span><theoplayer-language-menu-button menu="language-menu" mobile-only ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button mobile-only ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-only ad-hidden></theoplayer-chromecast-button><slot name="top-control-bar"></slot><theoplayer-ad-clickthrough-button ad-only></theoplayer-ad-clickthrough-button></theoplayer-control-bar><theoplayer-loading-indicator slot="centered-loading" no-auto-hide></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-seek-button seek-offset="-10" mobile-only ad-hidden></theoplayer-seek-button><theoplayer-play-button></theoplayer-play-button><theoplayer-seek-button seek-offset="10" mobile-only ad-hidden></theoplayer-seek-button></div><div slot="middle-chrome" part="middle-chrome"><theoplayer-chromecast-display></theoplayer-chromecast-display></div><div part="bottom-chrome"><theoplayer-control-bar part="ad-chrome" ad-only><theoplayer-ad-display></theoplayer-ad-display><theoplayer-ad-countdown></theoplayer-ad-countdown><span class="theoplayer-spacer"></span><theoplayer-ad-skip-button></theoplayer-ad-skip-button></theoplayer-control-bar><theoplayer-control-bar><theoplayer-play-button mobile-hidden ad-only class="theoplayer-ad-control"></theoplayer-play-button><theoplayer-mute-button ad-only class="theoplayer-ad-control"></theoplayer-mute-button><theoplayer-time-range show-ad-markers tv-focus class="theoplayer-ad-control"></theoplayer-time-range><theoplayer-chromecast-button tv-hidden ad-only class="theoplayer-ad-control"></theoplayer-chromecast-button><theoplayer-fullscreen-button ad-only class="theoplayer-ad-control"></theoplayer-fullscreen-button></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button tv-hidden></theoplayer-mute-button><theoplayer-volume-range mobile-hidden tv-hidden></theoplayer-volume-range><theoplayer-live-button live-only ad-hidden></theoplayer-live-button><theoplayer-time-display show-duration remaining-when-live></theoplayer-time-display><span class="theoplayer-spacer" style="pointer-events: auto"></span><theoplayer-language-menu-button menu="language-menu" mobile-hidden ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button tv-hidden mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button tv-hidden mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-fullscreen-button tv-hidden></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-language-menu id="language-menu" slot="menu" hidden></theoplayer-language-menu><theoplayer-error-display slot="error"></theoplayer-error-display><slot name="menu" slot="menu"></slot></theoplayer-ui>'),rY=function(e){function t(t){var r,a,o,n;return void 0===t&&(t={}),(r=e.call(this)||this)._appliedExtensions=!1,r._updateStreamType=function(){r.setAttribute(p.STREAM_TYPE,r.streamType),r._timeRange&&O(r._timeRange,p.HIDDEN,"live"===r.streamType)},r._dispatchReadyEvent=function(){r.dispatchEvent(ew(rH))},r._onTitleSlotChange=function(){r._titleSlot&&O(em(r),p.HAS_TITLE,r._titleSlot.assignedNodes().length>0)},r._shadowRoot=r.initShadowRoot(),r._ui=r._shadowRoot.querySelector("theoplayer-ui"),r._ui.addEventListener(rH,r._dispatchReadyEvent),r._ui.addEventListener(rU,r._updateStreamType),r.setConfiguration_(t),r._titleSlot=null!=(o=r._shadowRoot.querySelector('slot[name="title"]'))?o:void 0,null==(a=r._titleSlot)||a.addEventListener("slotchange",r._onTitleSlotChange),r._timeRange=null!=(n=r._shadowRoot.querySelector("theoplayer-time-range"))?n:void 0,r._upgradeProperty("configuration"),r._upgradeProperty("source"),r._upgradeProperty("fluid"),r._upgradeProperty("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("streamType"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("dvrThreshold"),r}r(t,e);var a=t.prototype;return a.initShadowRoot=function(){var e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(rQ().content.cloneNode(!0)),e},a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.setConfiguration_=function(e){var t;this._ui.configuration=e_({},e,{ads:e_({},null!=(t=e.ads)?t:{},{showCountdown:!1})})},a.connectedCallback=function(){if(u(this),!this.hasAttribute(p.DEVICE_TYPE)){var e=rB()?"mobile":rF()?"tv":"desktop";this.setAttribute(p.DEVICE_TYPE,e)}this._appliedExtensions||(this._appliedExtensions=!0,function(e){for(var t,r=l(rN);!(t=r()).done;)(0,t.value)(e)}(this),h(this)),this._onTitleSlotChange()},a.disconnectedCallback=function(){},a.attributeChangedCallback=function(e,r,a){if(a!==r){var o=null!=a;e===p.SOURCE?this._ui.source=a?JSON.parse(a):void 0:e===p.CONFIGURATION?this.setConfiguration_(a?JSON.parse(a):{}):e===p.MUTED?this.muted=o:e===p.AUTOPLAY?this.autoplay=o:e===p.FLUID?this.fluid=o:e===p.DEVICE_TYPE?(O(this,p.MOBILE,"mobile"===a),O(this,p.TV,"tv"===a),this._ui.setAttribute(p.DEVICE_TYPE,a)):e===p.STREAM_TYPE?this.streamType=a:e===p.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(a):e===p.DVR_THRESHOLD&&(this.dvrThreshold=Number(a)),t.observedAttributes.indexOf(e)>=0&&h(this)}},k(t,[{key:"player",get:function(){return this._ui.player}},{key:"configuration",get:function(){return this._ui.configuration},set:function(e){this.removeAttribute(p.CONFIGURATION),this.setConfiguration_(e)}},{key:"source",get:function(){return this._ui.source},set:function(e){this.removeAttribute(p.SOURCE),this._ui.source=e}},{key:"fluid",get:function(){return this._ui.fluid},set:function(e){this._ui.fluid=e}},{key:"muted",get:function(){return this._ui.muted},set:function(e){this._ui.muted=e}},{key:"autoplay",get:function(){return this._ui.autoplay},set:function(e){this._ui.autoplay=e}},{key:"streamType",get:function(){return this._ui.streamType},set:function(e){this._ui.streamType=e}},{key:"userIdleTimeout",get:function(){return this._ui.userIdleTimeout},set:function(e){this._ui.userIdleTimeout=e}},{key:"dvrThreshold",get:function(){return this._ui.dvrThreshold},set:function(e){this._ui.dvrThreshold=e}}],[{key:"observedAttributes",get:function(){return[p.CONFIGURATION,p.SOURCE,p.MUTED,p.AUTOPLAY,p.FLUID,p.DEVICE_TYPE,p.STREAM_TYPE,p.USER_IDLE_TIMEOUT,p.DVR_THRESHOLD,p.HAS_TITLE]}}]),t}(n(HTMLElement));rY.READY_EVENT=rH,customElements.define("theoplayer-default-ui",rY);var rK=d("theolive-bad-network-button",F('<span part="icon">'+tU+'<span part="warning-icon"><svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48">\n <path d="m40 936 440-760 440 760H40Zm444.175-117q12.825 0 21.325-8.675 8.5-8.676 8.5-21.5 0-12.825-8.675-21.325-8.676-8.5-21.5-8.5-12.825 0-21.325 8.675-8.5 8.676-8.5 21.5 0 12.825 8.675 21.325 8.676 8.5 21.5 8.5ZM454 708h60V484h-60v224Z"/>\n</svg></span></span>',"[part=icon]{display:inline-block;position:relative}[part=warning-icon]{display:none;height:60%;min-width:60%;position:absolute;right:-10%;top:0;width:60%}[part=warning-icon] svg{fill:red;fill:var(--theolive-bad-network-mode,red)}")),rW=function(e){function t(){var t;return(t=e.call(this,{template:rK()})||this).handleEnterBadNetworkMode_=function(){t._warningIcon&&(t._warningIcon.style.display="block")},t.handleExitBadNetworkMode_=function(){t._warningIcon&&(t._warningIcon.style.display="none")},t}return r(t,e),t.prototype.connectedCallback=function(){var t;e.prototype.connectedCallback.call(this),this.hasAttribute(p.ARIA_LABEL)||this.setAttribute(p.ARIA_LABEL,"open settings menu"),this._warningIcon=null!=(t=this.shadowRoot.querySelector('[part="warning-icon"]'))?t:void 0},k(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(this._theoLive&&(this._theoLive.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._theoLive=null==e?void 0:e.theoLive,this._theoLive&&(this._theoLive.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)))}}]),t}(Z(eV,["player"]));customElements.define("theolive-bad-network-button",rW);var rj=function(e){function t(t){var r;return(r=e.call(this,t)||this)._badNetworkMode=!1,r.handleEnterBadNetworkMode_=function(){r._badNetworkMode=!0,r.handleEnterBadNetworkMode()},r.handleExitBadNetworkMode_=function(){r._badNetworkMode=!1,r.handleExitBadNetworkMode()},r._slotEl=r.shadowRoot.querySelector("slot"),r}r(t,e);var a=t.prototype;return a.handleEnterBadNetworkMode=function(){},a.handleExitBadNetworkMode=function(){},a.attributeChangedCallback=function(e,t,r){r!==t&&e===p.ARIA_CHECKED&&t!==r&&this.handleChecked(this.checked)},k(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(this._theoLive&&(this._theoLive.removeEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.removeEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this._player=e,this._theoLive=null==e?void 0:e.theoLive,this._badNetworkMode=null!=(r=null==(t=this._theoLive)?void 0:t.badNetworkMode)&&r,this._theoLive&&(this._theoLive.addEventListener("enterbadnetworkmode",this.handleEnterBadNetworkMode_),this._theoLive.addEventListener("exitbadnetworkmode",this.handleExitBadNetworkMode_)),this.handlePlayer())}}]),t}(Z(ex,["player"])),rZ=d("theolive-automatic-quality-selector",F("<slot></slot>")),rX=function(e){function t(){var t;return I((t=e.call(this,{template:rZ()})||this)._slotEl,"High Quality"),t}r(t,e);var a=t.prototype;return a.handleEnterBadNetworkMode=function(){this.update_()},a.handleExitBadNetworkMode=function(){this.update_()},a.handlePlayer=function(){this.update_()},a.update_=function(){var e,t,r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)!==!0;this.checked!==r&&(this.checked=r)},a.handleChecked=function(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!1)},t}(rj);customElements.define("theolive-automatic-quality-selector",rX);var rJ=d("theolive-bad-network-quality-selector",F("<slot></slot>")),r$=function(e){function t(){var t;return I((t=e.call(this,{template:rJ()})||this)._slotEl,"Low Quality"),t}r(t,e);var a=t.prototype;return a.handleEnterBadNetworkMode=function(){this.update_()},a.handleExitBadNetworkMode=function(){this.update_()},a.handlePlayer=function(){this.update_()},a.update_=function(){var e,t,r=(null==(t=this.player)?void 0:null==(e=t.theoLive)?void 0:e.badNetworkMode)===!0;this.checked!==r&&(this.checked=r)},a.handleChecked=function(e){e&&this.player&&this.player.theoLive&&(this.player.theoLive.badNetworkMode=!0)},t}(rj);customElements.define("theolive-bad-network-quality-selector",r$);var r0=d("theolive-bad-network-menu","<style>"+eW+"</style>\n<theoplayer-radio-group>\n <theolive-automatic-quality-selector></theolive-automatic-quality-selector>\n <theolive-bad-network-quality-selector></theolive-bad-network-quality-selector>\n</theoplayer-radio-group>\n"),r1=function(e){function t(){(t=e.call(this)||this)._onChange=function(){t.dispatchEvent(new Event("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(r0().content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t}r(t,e);var a=t.prototype;return a._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},a.connectedCallback=function(){u(this),this._radioGroup instanceof eS||customElements.upgrade(this._radioGroup),this.shadowRoot.addEventListener("change",this._onChange)},a.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},t}(n(HTMLElement));customElements.define("theolive-bad-network-menu",r1);var r5=d("theolive-default-ui",'<style>:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;font-family:Helvetica,Arial,sans-serif;position:relative;width:100%}:host([hidden]){display:none!important}theoplayer-ui{--theoplayer-loading-delay:0.1s;display:block;font-family:Helvetica,Arial,sans-serif;width:100%}:host(:-webkit-full-screen),:host(:-webkit-full-screen) theoplayer-ui{height:100%!important;width:100%!important}:host(:-ms-fullscreen),:host(:-ms-fullscreen) theoplayer-ui{height:100%!important;width:100%!important}:host(:fullscreen),:host(:fullscreen) theoplayer-ui{height:100%!important;width:100%!important}theoplayer-menu::part(heading){display:none!important}[part=centered-chrome] *{--theoplayer-control-height:48px}[part=middle-chrome]{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;justify-content:flex-end;pointer-events:none}[part=bottom-chrome],[part=middle-chrome]{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:column nowrap;flex-flow:column nowrap;position:relative}[part=bottom-chrome]{-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}:host([mobile]) theoplayer-ui{--theoplayer-control-backdrop-background:rgba(0,0,0,.5)}:host{--theoplayer-control-background-gradient-stops:transparent 0%,rgba(0,0,0,.01) 8.1%,rgba(0,0,0,.037) 15.5%,rgba(0,0,0,.078) 22.5%,rgba(0,0,0,.131) 29%,rgba(0,0,0,.195) 35.3%,rgba(0,0,0,.264) 41.2%,rgba(0,0,0,.337) 47.1%,rgba(0,0,0,.413) 52.9%,rgba(0,0,0,.486) 58.8%,rgba(0,0,0,.555) 64.7%,rgba(0,0,0,.619) 71%,rgba(0,0,0,.672) 77.5%,rgba(0,0,0,.713) 84.5%,rgba(0,0,0,.74) 91.9%,rgba(0,0,0,.75) 100%}:host(:not([mobile])) [part=bottom-chrome]:before,:host(:not([mobile])) [part=top-chrome]:before{bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}:host(:not([mobile])) [part=top-chrome]:before{background:-webkit-gradient(linear,left bottom,left top,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to top,var(--theoplayer-control-background-gradient-stops))}:host(:not([mobile])) [part=bottom-chrome]:before{background:-webkit-gradient(linear,left top,left bottom,from(var(--theoplayer-control-background-gradient-stops)));background:linear-gradient(to bottom,var(--theoplayer-control-background-gradient-stops))}.theoplayer-spacer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}theoplayer-time-range{--theoplayer-control-height:12px;--theoplayer-range-track-pointer-background:hsla(0,0%,100%,.5)}:host(:not([mobile])) [mobile-only],:host([mobile]) [mobile-hidden]{display:none!important}:host(:not([stream-type=vod])) [live-hidden],:host(:not([stream-type=vod])) theoplayer-control-bar ::slotted([live-hidden]),:host([stream-type=vod]) [live-only],:host([stream-type=vod]) theoplayer-control-bar ::slotted([live-only]){display:none!important}theoplayer-ui:not([has-first-play]) [part=centered-chrome] :not(theoplayer-play-button),theoplayer-ui:not([has-first-play]) theoplayer-control-bar,theoplayer-ui:not([playing-ad]) [ad-only],theoplayer-ui[playing-ad] [ad-hidden]{display:none!important}:host(:not([mobile])) theoplayer-ui[has-first-play] [part=centered-chrome] theoplayer-play-button{display:none!important}theoplayer-volume-range{--theoplayer-range-padding-left:0}theoplayer-mute-button+theoplayer-volume-range{--theoplayer-range-padding-right:0;--theoplayer-range-track-width:70px;overflow:hidden;-webkit-transition:width .2s ease-in;transition:width .2s ease-in;width:0}theoplayer-mute-button+theoplayer-volume-range:focus,theoplayer-mute-button+theoplayer-volume-range:hover,theoplayer-mute-button:focus+theoplayer-volume-range,theoplayer-mute-button:hover+theoplayer-volume-range{width:70px}theoplayer-mute-button+theoplayer-volume-range:focus-within,theoplayer-mute-button:focus-within+theoplayer-volume-range{width:70px}theoplayer-live-button+theoplayer-time-display{padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}p{color:#fff;color:var(--theoplayer-text-color,#fff);font-size:20px;font-size:var(--theoplayer-text-font-size,20px)}#announcement,#loading-announcement,#offline-announcement{display:none}theolive-bad-network-button{display:none;display:var(--theolive-bad-network-button-display,none)}theoplayer-settings-menu-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;display:var(--theolive-quality-button-display,inline-flex)}</style><theoplayer-ui><p id="loading-announcement" no-auto-hide slot="centered-chrome"><slot name="loading-announcement">Loading...</slot></p><p id="offline-announcement" no-auto-hide slot="centered-chrome"><slot name="offline-announcement">The live stream hasn\'t started yet</slot></p><p id="announcement" no-auto-hide slot="centered-chrome"></p><theoplayer-loading-indicator slot="centered-loading" no-auto-hide part="loading-indicator"></theoplayer-loading-indicator><div slot="centered-chrome" part="centered-chrome"><theoplayer-play-button part="center-play-button"></theoplayer-play-button></div><div part="bottom-chrome"><theoplayer-control-bar><theoplayer-play-button mobile-hidden part="play-button"></theoplayer-play-button><theoplayer-mute-button part="mute-button"></theoplayer-mute-button><theoplayer-volume-range mobile-hidden part="volume-range"></theoplayer-volume-range><theoplayer-live-button ad-hidden live-only part="live-button"></theoplayer-live-button><span class="theoplayer-spacer"></span><theoplayer-settings-menu-button ad-hidden menu="all-quality-menu" part="quality-button"></theoplayer-settings-menu-button><theolive-bad-network-button ad-hidden menu="quality-menu" part="theolive-bad-network-button"></theolive-bad-network-button><theoplayer-fullscreen-button part="fullscreen-button"></theoplayer-fullscreen-button></theoplayer-control-bar></div><theoplayer-menu id="quality-menu" slot="menu" menu-close-on-input hidden><theolive-bad-network-menu></theolive-bad-network-menu></theoplayer-menu><theoplayer-menu id="all-quality-menu" slot="menu" menu-close-on-input hidden><theoplayer-quality-radio-group></theoplayer-quality-radio-group></theoplayer-menu><theoplayer-error-display slot="error" part="error-display"></theoplayer-error-display></theoplayer-ui>'),r2=function(e){function t(t){var r;return void 0===t&&(t={}),(r=e.call(this,t)||this).onReady=function(){r._ui.removeEventListener(rH,r.onReady);var e,t,a,o=r.player;o&&(null==(e=o.theoLive)||e.addEventListener("publicationloadstart",r.onLoadChannelStart),null==(t=o.theoLive)||t.addEventListener("publicationoffline",r.onChannelOffline),null==(a=o.theoLive)||a.addEventListener("publicationloaded",r.onChannelLoaded),o.addEventListener("error",r.onError))},r.onLoadChannelStart=function(){r.showMessage_("loading",void 0)},r.onChannelOffline=function(){r.showMessage_("offline",void 0)},r.onChannelLoaded=function(){r.hidePlayerError(),r.hideMessage_()},r.onError=function(e){var t=e.errorObject.code;if(t<13e3||t>=14e3){r.showMessage_("offline",void 0);return}r.stopHidingPlayerError(),r.hideMessage_()},r._loading=r._shadowRoot.querySelector("#loading-announcement"),r._offline=r._shadowRoot.querySelector("#offline-announcement"),r._announcement=r._shadowRoot.querySelector("#announcement"),r._errorDisplay=r._shadowRoot.querySelector("theoplayer-error-display"),r._playButton=r._shadowRoot.querySelector("theoplayer-play-button"),r._root=r._shadowRoot.querySelector("theoplayer-ui"),r._ui.addEventListener(rH,r.onReady),r}r(t,e);var a=t.prototype;return a.initShadowRoot=function(){var e=this.attachShadow({mode:"open",delegatesFocus:!0});return e.appendChild(r5().content.cloneNode(!0)),e},a.hidePlayerError=function(){this._root.removeAttribute("has-error"),this._errorDisplay.style.display="none"},a.stopHidingPlayerError=function(){this._root.setAttribute("has-error",""),this._errorDisplay.style.display="flex"},a.hidePlayerPlayButton_=function(){this._playButton.style.display="none"},a.stopHidingPlayerPlayButton=function(){this._playButton.style.display="inline-flex"},a.showMessage_=function(e,t){this.hidePlayerError(),this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none","loading"===e?this._loading.style.display="block":"offline"===e?this._offline.style.display="block":(this._announcement.textContent=null!=t?t:"",this._announcement.style.display="block"),this.hidePlayerPlayButton_()},a.hideMessage_=function(){this._loading.style.display="none",this._offline.style.display="none",this._announcement.style.display="none",this.stopHidingPlayerPlayButton()},t}(rY);customElements.define("theolive-default-ui",r2);var r3="1.8.2";export{tL as ActiveQualityDisplay,rR as AdClickThroughButton,rL as AdCountdown,rA as AdDisplay,rO as AdSkipButton,rc as AirPlayButton,p as Attribute,H as Button,ro as CastButton,rs as ChromecastButton,rd as ChromecastDisplay,eG as CloseMenuButton,tK as ColorStops,m as ControlBar,rY as DefaultUI,eg as DurationDisplay,ra as ErrorDisplay,y as ExtensionSlot,tY as FullscreenButton,rg as GestureReceiver,tb as LanguageMenu,t_ as LanguageMenuButton,Y as LinkButton,rw as LiveButton,rf as LoadingIndicator,eK as MediaTrackRadioButton,eN as Menu,eV as MenuButton,eF as MenuGroup,eo as MuteButton,et as PlayButton,tC as PlaybackRateDisplay,tT as PlaybackRateMenu,tx as PlaybackRateMenuButton,tw as PlaybackRateRadioGroup,t0 as PreviewThumbnail,t3 as PreviewTimeDisplay,tM as QualityRadioButton,tN as QualityRadioGroup,ex as RadioButton,eS as RadioGroup,tj as Range,ei as SeekButton,tF as SettingsMenu,tV as SettingsMenuButton,E as SlotContainer,Z as StateReceiverMixin,r2 as THEOliveDefaultUI,e2 as TextTrackOffRadioButton,eX as TextTrackRadioButton,tl as TextTrackStyleDisplay,ty as TextTrackStyleMenu,th as TextTrackStyleRadioGroup,tq as TextTrackStyleResetButton,ev as TimeDisplay,t9 as TimeRange,e8 as TrackRadioGroup,rz as UIContainer,rt as VolumeRange,F as buttonTemplate,G as linkButtonTemplate,eq as menuGroupTemplate,eI as menuTemplate,tW as rangeTemplate,rD as registerExtension,r3 as version};
|