@theoplayer/web-ui 1.1.0 → 1.2.0

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.
@@ -1 +1 @@
1
- import{ChromelessPlayer as e}from"theoplayer";function t(e,r){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,r)}function r(e,r){return t(e,r)}function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}function n(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function o(e,t,a){return(o=n()?Reflect.construct:function(e,t,a){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return a&&r(o,a.prototype),o}).apply(null,arguments)}function i(e,t,r){return o.apply(null,arguments)}function l(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){return s(e)}function p(e){var t="function"==typeof Map?new Map:void 0;return(p=function(e){var a=function(){return i(e,arguments,u(this).constructor)};if(null===e||!l(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r(a,e)})(e)}function h(e){return p(e)}function d(e){if(Array.isArray(e))return e}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(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 b(e,t){if(e){if("string"==typeof e)return m(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 m(e,t)}}function v(e,t){return d(e)||c(e)||b(e,t)||y()}function f(e,t){for(var r=e.style,a=0,n=Object.entries(t);a<n.length;a++){var o=v(n[a],2),i=o[0],l=o[1];r.setProperty(i,l)}}function g(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function _(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss}function k(e,t){g()&&window.ShadyCSS.prepareTemplate(e,t)}function w(e){g()&&window.ShadyCSS.styleElement(e)}function x(e,t){_()?window.ShadyCSS.styleSubtree(e,t):null!=t&&f(e,t)}var E,A,T,C=":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}",L=document.createElement("template");L.innerHTML="<style>"+C+"</style><slot></slot>",k(L,"theoplayer-control-bar");var S=function(e){function t(){var t;return(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0}).appendChild(L.content.cloneNode(!0)),t}return a(t,e),t.prototype.connectedCallback=function(){w(this)},t}(h(HTMLElement));function P(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 M(e,t,r){return t&&P(e.prototype,t),r&&P(e,r),e}customElements.define("theoplayer-control-bar",S);var R=":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) ::slotted(img),:host(:hover) 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) ::slotted(svg),:host(:hover) 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)))}";function I(e,t){return void 0===t&&(t=""),"<style>"+R+"\n"+t+"</style>"+e}!function(e){e[e.DOWN=40]="DOWN",e[e.LEFT=37]="LEFT",e[e.RIGHT=39]="RIGHT",e[e.SPACE=32]="SPACE",e[e.ENTER=13]="ENTER",e[e.UP=38]="UP",e[e.HOME=36]="HOME",e[e.END=35]="END",e[e.ESCAPE=27]="ESCAPE"}(E||(E={})),function(e){e.CONFIGURATION="configuration",e.SOURCE="source",e.AUTOPLAY="autoplay",e.MUTED="muted",e.FULLSCREEN="fullscreen",e.FLUID="fluid",e.MOBILE="mobile",e.MOBILE_ONLY="mobile-only",e.MOBILE_HIDDEN="mobile-hidden",e.USER_IDLE="user-idle",e.USER_IDLE_TIMEOUT="user-idle-timeout",e.NO_AUTO_HIDE="no-auto-hide",e.DISABLED="disabled",e.HIDDEN="hidden",e.PAUSED="paused",e.ENDED="ended",e.VOLUME_LEVEL="volume-level",e.CASTING="casting",e.LOADING="loading",e.STREAM_TYPE="stream-type",e.LIVE="live",e.LIVE_ONLY="live-only",e.LIVE_HIDDEN="live-hidden",e.LIVE_THRESHOLD="live-threshold",e.DVR_THRESHOLD="dvr-threshold",e.REMAINING="remaining",e.REMAINING_WHEN_LIVE="remaining-when-live",e.SHOW_DURATION="show-duration",e.SEEK_OFFSET="seek-offset",e.MENU="menu",e.MENU_OPENED="menu-opened",e.MENU_CLOSE_ON_INPUT="menu-close-on-input",e.ARIA_LABEL="aria-label",e.ARIA_LIVE="aria-live",e.ARIA_CHECKED="aria-checked",e.HAS_AUDIO="has-audio",e.HAS_SUBTITLES="has-subtitles",e.HAS_ERROR="has-error",e.HAS_FIRST_PLAY="has-first-play",e.HAS_TITLE="has-title",e.CAST_STATE="cast-state",e.TRACK_TYPE="track-type",e.SHOW_OFF="show-off",e.PLAYING_AD="playing-ad",e.CLICKTHROUGH="clickthrough",e.PROPERTY="property",e.VALUE="value"}(A||(A={}));var O=document.createElement("template");O.innerHTML=I("<slot></slot>"),k(O,"theoplayer-button");var D=function(e){function t(t){(r=e.call(this)||this)._onKeyDown=function(e){if(!e.altKey)switch(e.keyCode){case E.SPACE:case E.ENTER:e.preventDefault(),r._onClick();break;default:return}},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:O;return r.attachShadow({mode:"open"}).appendChild(n.content.cloneNode(!0)),r._upgradeProperty("disabled"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"polite"),this.addEventListener("keydown",this._onKeyDown),this.addEventListener("click",this._onClick)},r.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("click",this._onClick)},r.attributeChangedCallback=function(e,r,a){if(e===A.DISABLED&&a!==r){var n=null!=a;this.setAttribute("aria-disabled",n?"true":"false"),n?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}t.observedAttributes.indexOf(e)>=0&&x(this)},r.handleClick=function(){},M(t,[{key:"disabled",get:function(){return this.hasAttribute(A.DISABLED)},set:function(e){e?this.setAttribute(A.DISABLED,""):this.removeAttribute(A.DISABLED)}}],[{key:"observedAttributes",get:function(){return[A.DISABLED]}}]),t}(h(HTMLElement));customElements.define("theoplayer-button",D);var N=":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);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)}";function q(e,t){return void 0===t&&(t=""),I("<a>"+e+"</a>",N+"\n"+t)}var F=document.createElement("template");F.innerHTML=q("<slot></slot>"),k(F,"theoplayer-link-button");var B=function(e){function t(t){(r=e.call(this)||this)._onKeyDown=function(e){!e.altKey&&e.keyCode===E.SPACE&&(e.preventDefault(),r._linkEl.click())},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:F,o=r.attachShadow({mode:"open",delegatesFocus:!0});return o.appendChild(n.content.cloneNode(!0)),r._linkEl=o.querySelector("a"),r._upgradeProperty("disabled"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"polite"),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)},r.disconnectedCallback=function(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)},r.setLink=function(e,t){this._linkEl.href=e,this._linkEl.target=t},r.attributeChangedCallback=function(e,t,r){if(e===A.DISABLED&&r!==t){var a=null!=r;this.setAttribute("aria-disabled",a?"true":"false"),a?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}D.observedAttributes.indexOf(e)>=0&&x(this)},r.handleClick=function(){},M(t,[{key:"disabled",get:function(){return this.hasAttribute(A.DISABLED)},set:function(e){e?this.setAttribute(A.DISABLED,""):this.removeAttribute(A.DISABLED)}}],[{key:"observedAttributes",get:function(){return[A.DISABLED]}}]),t}(h(HTMLElement));function H(e){if(Array.isArray(e))return m(e)}function U(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e){return H(e)||c(e)||b(e)||U()}customElements.define("theoplayer-link-button",B);var V=":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}",G='<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',Q='<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',Y='<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';function K(e,t,r,a,n,o,i){try{var l=e[o](i),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,n)}function W(e){return function(){var t=this,r=arguments;return new Promise(function(a,n){var o=e.apply(t,r);function i(e){K(o,a,n,i,l,"next",e)}function l(e){K(o,a,n,i,l,"throw",e)}i(void 0)})}}function j(e,t){var r,a,n,o,i=function(e){return function(t){return l([e,t])}},l=function(i){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(s=0)),s;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,a=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(n=(n=s.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){s.label=i[1];break}if(6===i[0]&&s.label<n[1]){s.label=n[1],n=i;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(i);break}n[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}},s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o}function Z(){}function X(e){return e.nodeType===Node.ELEMENT_NODE}function J(e){return e instanceof HTMLElement}function $(e){return"slot"===e.localName.toLowerCase()}var ee="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},et="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){return Array.prototype.slice.call(e)},er="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]},ea="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};function en(e,t){var r=e.indexOf(t);return!(r<0)&&(eo(e,r),!0)}function eo(e,t){e.splice(t,1)}var ei="function"==typeof String.prototype.startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return e.substring(0,t.length)===t},el="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 es(e,t){void 0===e.textContent?e.innerText=t:e.textContent=t}function eu(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;var r=t.getRootNode();return!!r.host&&eu(e,r.host)}var ep="theoplayerUiObservedProperties";function eh(e){return ep in e&&ee(e[ep])}function ed(e,t){return function(e){function r(){return e.apply(this,arguments)}return a(r,e),M(r,[{key:ep,get:function(){return t}}]),r}(e)}function ec(e,t,r){return ey.apply(this,arguments)}function ey(){return(ey=W(function(e,t,r){var a;return j(this,function(n){switch(n.label){case 0:if(t.contains(e))return[2];if(!(e.nodeName.indexOf("-")>=0&&!eh(e)))return[3,3];return[4,Promise.resolve()];case 1:return n.sent(),[4,customElements.whenDefined(e.nodeName.toLowerCase())];case 2:n.sent(),customElements.upgrade(e),n.label=3;case 3:if(eh(e)&&r(e),!((a=z(J(e)?et(e.children):[]).concat(z(e.shadowRoot?et(e.shadowRoot.children):[]),z($(e)?e.assignedNodes().filter(X):[]))).length>0))return[3,5];return[4,Promise.all(a.map(function(e){return ec(e,t,r)}))];case 4:n.sent(),n.label=5;case 5:return[2]}})})).apply(this,arguments)}var em=document.createElement("template");em.innerHTML=I('<span part="play-icon"><slot name="play-icon">'+G+'</slot></span><span part="pause-icon"><slot name="pause-icon">'+Q+'</slot></span><span part="replay-icon"><slot name="replay-icon">'+Y+"</slot></span>",V),k(em,"theoplayer-play-button");var eb=["seeking","seeked","ended","emptied"],ev=function(e){function t(){var t;return(t=e.call(this,{template:em})||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._upgradeProperty("paused"),t._upgradeProperty("ended"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},r._updateEnded=function(){var e,t;this.ended=null!=(t=null==(e=this._player)?void 0:e.ended)&&t},r.handleClick=function(){void 0!==this._player&&(this._player.paused?this._player.play():this._player.pause())},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&(x(this),this._updateAriaLabel())},r._updateAriaLabel=function(){var e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(A.ARIA_LABEL,e)},M(t,[{key:"paused",get:function(){return this.hasAttribute(A.PAUSED)},set:function(e){e?this.setAttribute(A.PAUSED,""):this.removeAttribute(A.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(A.ENDED)},set:function(e){e?this.setAttribute(A.ENDED,""):this.removeAttribute(A.ENDED)}},{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(eb,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(eb,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.PAUSED,A.ENDED])}}]),t}(ed(D,["player"]));customElements.define("theoplayer-play-button",ev);var ef=":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}",eg='<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',e_='<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',ek='<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',ew=document.createElement("template");ew.innerHTML=I('<span part="off-icon"><slot name="off-icon">'+eg+'</slot></span><span part="low-icon"><slot name="low-icon">'+e_+'</slot></span><span part="high-icon"><slot name="high-icon">'+ek+"</slot></span>",ef),k(ew,"theoplayer-mute-button");var ex=["volumechange"],eE=function(e){function t(){var t;return(t=e.call(this,{template:ew})||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(A.VOLUME_LEVEL,e)},t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},r.handleClick=function(){void 0!==this._player&&(this._player.muted=!this._player.muted,this._updateFromPlayer())},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&(x(this),this._updateAriaLabel())},r._updateAriaLabel=function(){var e="off"===this.getAttribute(A.VOLUME_LEVEL)?"unmute":"mute";this.setAttribute(A.ARIA_LABEL,e)},M(t,[{key:"volumeLevel",get:function(){return this.getAttribute(A.VOLUME_LEVEL)||"off"}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(ex,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(ex,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.VOLUME_LEVEL])}}]),t}(ed(D,["player"]));customElements.define("theoplayer-mute-button",eE);var eA=':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%)}',eT='<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',eC=document.createElement("template");eC.innerHTML=I('<span part="icon"><slot name="icon">'+eT+'</slot></span><span part="offset"></span>',eA),k(eC,"theoplayer-seek-button");var eL=10,eS=function(e){function t(){var t;return(t=e.call(this,{template:eC})||this)._offsetEl=t.shadowRoot.querySelector('[part="offset"]'),t._upgradeProperty("player"),t._upgradeProperty("seekOffset"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.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)))}},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.SEEK_OFFSET&&es(this._offsetEl,String(Math.abs(this.seekOffset))),t.observedAttributes.indexOf(r)>=0&&(x(this),this._updateAriaLabel()))},r._updateAriaLabel=function(){var e=this.seekOffset;this.setAttribute(A.ARIA_LABEL,e>=0?"seek forward by "+e+" seconds":"seek backward by "+-e+" seconds")},M(t,[{key:"seekOffset",get:function(){var e;return Number(null!=(e=this.getAttribute(A.SEEK_OFFSET))?e:eL)},set:function(e){this.setAttribute(A.SEEK_OFFSET,String(e))}},{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.SEEK_OFFSET])}}]),t}(ed(D,["player"]));customElements.define("theoplayer-seek-button",eS);var eP=":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-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;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}:host,span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";function eM(e){return!isNaN(e)&&isFinite(e)}function eR(e,t,r){void 0===t&&(t=0);var a,n=e<0||r&&0===e,o=Math.floor(t/60%60),i=Math.floor(t/3600);if(eM(e=Math.abs(e))){var l=Math.floor(e%60),s=Math.floor(e/60%60),u=Math.floor(e/3600),p=u>0||i>0;a=[p?""+u:"",(p||o>=0)&&s<10?"0"+s:""+s,l<10?"0"+l:""+l]}else a=[i>0?"--":"","--","--"];return(n?"-":"")+a.filter(function(e){return""!==e}).join(":")}var eI=[["hour","hours"],["minute","minutes"],["second","seconds"]];function eO(e,t){var r=eI[t][1===e?0:1];return e+" "+r}function eD(e,t){if(!eM(e))return"";var r=e<0||t&&0===e,a=Math.floor((e=Math.abs(e))%60),n=Math.floor(e/60)%60,o=Math.floor(e/3600);return""+[0===o?"":eO(o,0),0===n?"":eO(n,1),0===a&&(o>0||n>0)?"":eO(a,2)].filter(function(e){return""!==e}).join(", ")+(r?" remaining":"")}var eN=document.createElement("template");eN.innerHTML="<style>"+eP+"</style><span></span>",k(eN,"theoplayer-time-display");var eq=["timeupdate","seeking","seeked","durationchange"],eF="video not loaded, unknown time",eB=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,n=t._player?t._player.currentTime:0,o=t._player?t._player.duration:NaN,i=null==(e=t._player)?void 0:e.seekable,l=isFinite(o)?o:i&&i.length>0?i.end(0):NaN,s=t.hasAttribute(A.REMAINING)||t.hasAttribute(A.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType,u=n;s&&(u=-((l||0)-n));var p=t.hasAttribute(A.SHOW_DURATION);r=p&&!s?eR(u,l,s)+" / "+eR(l):eR(u,l,s),a=isNaN(o)?eF:p?eD(u,s)+" of "+eD(l):eD(u,s),es(t._spanEl,r),t.setAttribute("aria-valuetext",a)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(eN.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"off"),this._updateFromPlayer()},r.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._updateFromPlayer(),x(this))},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(eq,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(eq,this._updateFromPlayer))}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[A.REMAINING,A.REMAINING_WHEN_LIVE,A.SHOW_DURATION,A.STREAM_TYPE]}}]),t}(ed(HTMLElement,["player","streamType"]));customElements.define("theoplayer-time-display",eB);var eH=document.createElement("template");eH.innerHTML="<style>"+eP+"</style><span></span>",k(eH,"theoplayer-duration-display");var eU=["durationchange"],ez=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e=eR(t._player?t._player.duration:NaN);es(t._spanEl,e)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(eH.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"off"),this._updateFromPlayer()},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(eU,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(eU,this._updateFromPlayer))}}]),t}(ed(HTMLElement,["player"]));function eV(){return(eV=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)}function eG(){return eV.apply(this,arguments)}function eQ(){try{var e=new Event("change");return"change"===e.type}catch(e){}return!1}function eY(){try{var e=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}function eK(e,t){return new Event(e,t)}function eW(e,t){return new CustomEvent(e,t)}function ej(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 eZ(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}customElements.define("theoplayer-duration-display",ez);var eX=eQ()?eK:ej,eJ=eY()?eW:eZ,e$=document.createElement("template");e$.innerHTML=I("<slot></slot>"),k(e$,"theoplayer-radio-button");var e0=function(e){function t(t){var r;return(r=e.call(this,eG({template:e$},t))||this)._value=void 0,r._upgradeProperty("checked"),r}a(t,e);var r=t.prototype;return r.connectedCallback=function(){this.hasAttribute("role")||this.setAttribute("role","radio"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),e.prototype.connectedCallback.call(this)},r.handleClick=function(){this.checked=!0,this.dispatchEvent(eX("input",{bubbles:!0,composed:!0}))},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.ARIA_CHECKED?this.dispatchEvent(eX("change",{bubbles:!0})):r===A.VALUE&&(this.value=n),t.observedAttributes.indexOf(r)>=0&&x(this))},M(t,[{key:"checked",get:function(){return"true"===this.getAttribute(A.ARIA_CHECKED)},set:function(e){this.setAttribute(A.ARIA_CHECKED,e?"true":"false")}},{key:"value",get:function(){return this._value},set:function(e){this._value=e}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.ARIA_CHECKED,A.VALUE])}}]),t}(D);customElements.define("theoplayer-radio-button",e0);var e1=document.createElement("template");e1.innerHTML="<slot></slot>",k(e1,"theoplayer-radio-group");var e5=function(e){function t(){(t=e.call(this)||this)._radioButtons=[],t._onSlotChange=function(){for(var e,r=t._slot.assignedNodes({flatten:!0}).filter(X),a=0;a<r.length;a++){var n=r[a];if(!e2(n)){var o=n.nodeName.toLowerCase();o.indexOf("-")>=0&&(customElements.get(o)?customElements.upgrade(n):customElements.whenDefined(o).then(t._onSlotChange,Z))}}t._radioButtons=r.filter(e2),t.focusedRadioButton||null==(e=t.firstRadioButton)||e.setAttribute("tabindex","0")},t._onKeyDown=function(e){switch(e.keyCode){case E.UP:case E.LEFT:e.preventDefault(),t._focusPrevButton();break;case E.DOWN:case E.RIGHT:e.preventDefault(),t._focusNextButton();break;case E.HOME:e.preventDefault(),t.setFocusedRadioButton(t.firstRadioButton);break;case E.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(e1.content.cloneNode(!0)),t._slot=r.querySelector("slot"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(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()},r.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.shadowRoot.removeEventListener("change",this._onButtonChange),this._slot.removeEventListener("slotchange",this._onSlotChange)},r.allRadioButtons=function(){return this._radioButtons},r._prevRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>0?this._radioButtons[t-1]:null},r._nextRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>=0&&t<this._radioButtons.length-1?this._radioButtons[t+1]:null},r._focusPrevButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;e&&(e===this.firstRadioButton?this.setFocusedRadioButton(this.lastRadioButton):this.setFocusedRadioButton(this._prevRadioButton(e)))},r._focusNextButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;e&&(e===this.lastRadioButton?this.setFocusedRadioButton(this.firstRadioButton):this.setFocusedRadioButton(this._nextRadioButton(e)))},r.setFocusedRadioButton=function(e){this._unfocusAll(),e&&(e.tabIndex=0,e.focus())},r._unfocusAll=function(){for(var e=0,t=this.allRadioButtons();e<t.length;e++)t[e].tabIndex=-1},r.setCheckedRadioButton=function(e){for(var t=0,r=this.allRadioButtons();t<r.length;t++){var a=r[t];a.checked=a===e}this.dispatchEvent(eX("change",{bubbles:!0}))},M(t,[{key:"focusedRadioButton",get:function(){var e;return null!=(e=er(this._radioButtons,function(e){return 0===e.tabIndex}))?e:null}},{key:"checkedRadioButton",get:function(){var e;return null!=(e=er(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}(h(HTMLElement));function e2(e){return e instanceof e0}customElements.define("theoplayer-radio-group",e5);var e3=":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}",e4="theoplayermenuclose",e8="theoplayermenuchange";function e7(e,t,r){return void 0===r&&(r=""),"<style>"+e3+r+'</style><div part="heading"><theoplayer-menu-close-button></theoplayer-menu-close-button>'+e+'</div><div part="content">'+t+"</div>"}var e6=document.createElement("template");e6.innerHTML=e7('<slot name="heading"></slot>',"<slot></slot>"),k(e6,"theoplayer-menu");var e9=function(e){function t(t){(r=e.call(this)||this)._onContentInput=function(){if(r.hasAttribute(A.MENU_CLOSE_ON_INPUT)){var e=eJ(e4,{bubbles:!0,composed:!0});r.dispatchEvent(e)}};var r,a,n=null!=(a=null==t?void 0:t.template)?a:e6,o=r.attachShadow({mode:"open",delegatesFocus:!0});return o.appendChild(n.content.cloneNode(!0)),r._contentEl=o.querySelector('[part="content"]'),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.MENU_OPENED)||this.setAttribute("hidden",""),this._contentEl.addEventListener("input",this._onContentInput)},r.disconnectedCallback=function(){this._contentEl.removeEventListener("input",this._onContentInput)},r.openMenu=function(){this.setAttribute(A.MENU_OPENED,"")},r.closeMenu=function(){this.removeAttribute(A.MENU_OPENED)},r.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===A.MENU_OPENED){null!=a?this.removeAttribute("hidden"):this.setAttribute("hidden","");var n=eJ(e8,{bubbles:!0});this.dispatchEvent(n)}t.observedAttributes.indexOf(e)>=0&&x(this)}},M(t,null,[{key:"observedAttributes",get:function(){return[A.MENU_OPENED,A.MENU_CLOSE_ON_INPUT]}}]),t}(h(HTMLElement));customElements.define("theoplayer-menu",e9);var te=":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}",tt="theoplayermenutoggle";function tr(e,t){return void 0===t&&(t=""),"<style>"+te+t+"</style>"+e}var ta=document.createElement("template");ta.innerHTML=tr("<slot></slot>"),k(ta,"theoplayer-menu-group");var tn=function(e){function t(r){(a=e.call(this)||this)._menus=[],a._openMenuStack=[],a._onMenuListChange=function(){for(var e=z(et(a.shadowRoot.children)).concat(z(a._menuSlot?a._menuSlot.assignedNodes({flatten:!0}).filter(X):[])),t=0;t<e.length;t++){var r=e[t];if(!to(r)){var n=r.nodeName.toLowerCase();n.indexOf("-")>=0&&(customElements.get(n)?customElements.upgrade(r):customElements.whenDefined(n).then(a._onMenuListChange,Z))}}for(var o=e.filter(to),i=0,l=a._menus;i<l.length;i++){var s=l[i];0>o.indexOf(s)&&a.closeMenu(s.id)}for(var u=0;u<o.length;u++){var p=o[u];0>a._menus.indexOf(p)&&p.closeMenu()}a._menus=o},a._onToggleMenu=function(e){var t=e.detail.menu;if(a.getMenuById(t)){e.stopPropagation();var r=J(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&&e.keyCode===E.ESCAPE&&a.closeCurrentMenu()&&(e.preventDefault(),e.stopPropagation())};var a,n,o=null!=(n=null==r?void 0:r.template)?n:ta,i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(o.content.cloneNode(!0)),a._menuSlot=i.querySelector("slot"),a}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){var e;w(this),this.hasAttribute(A.MENU_OPENED)||this.setAttribute("hidden",""),this._onMenuListChange(),this.shadowRoot.addEventListener(tt,this._onToggleMenu),this.shadowRoot.addEventListener(e4,this._onCloseMenu),this.shadowRoot.addEventListener(e8,this._onMenuChange),null==(e=this._menuSlot)||e.addEventListener("slotchange",this._onMenuListChange)},r.disconnectedCallback=function(){var e;this.shadowRoot.removeEventListener(tt,this._onToggleMenu),this.shadowRoot.removeEventListener(e4,this._onCloseMenu),this.shadowRoot.removeEventListener(e8,this._onMenuChange),null==(e=this._menuSlot)||e.removeEventListener("slotchange",this._onMenuListChange)},r.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===A.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 n=eJ(e8,{bubbles:!0});this.dispatchEvent(n)}t.observedAttributes.indexOf(e)>=0&&x(this)}},r.getMenuById=function(e){return e&&e!==this.id?er(this._menus,function(t){return t.id===e}):this},r.openMenu=function(e,t){var r=this.getMenuById(e);if(r===this&&(r=this._menus[0]),!r)return!1;var a=this.getCurrentMenu_(),n=ea(this._openMenuStack,function(e){return e.menu===r});return n>=0?this.closeMenusFromIndex_(n+1):this._openMenuStack.push({menu:r,opener:t}),a&&a.menu.closeMenu(),r.openMenu(),this.setAttribute(A.MENU_OPENED,""),r.focus(),!0},r.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 n=ea(this._openMenuStack,function(e){return e.menu===a});if(n<0)return!1;var o=this._openMenuStack[n];this.closeMenusFromIndex_(n);var i=this.getCurrentMenu_();return void 0!==i?(i.menu.openMenu(),this.setAttribute(A.MENU_OPENED,""),o.opener&&i.menu.contains(o.opener)?o.opener.focus():i.menu.focus(),!0):(this.removeAttribute(A.MENU_OPENED),null==(t=o.opener)||t.focus(),!0)},r.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)},r.hasCurrentMenu=function(){return this._openMenuStack.length>0},r.getCurrentMenu_=function(){return this._openMenuStack.length>0?this._openMenuStack[this._openMenuStack.length-1]:void 0},r.closeCurrentMenu=function(){var e=this.getCurrentMenu_();return void 0!==e&&(this.closeMenu(e.menu.id),!0)},r.isMenuOpen=function(e){var t=this.getMenuById(e);return!!t&&this._openMenuStack.some(function(e){return e.menu===t})},M(t,null,[{key:"observedAttributes",get:function(){return[A.MENU_OPENED]}}]),t}(h(HTMLElement));function to(e){return!!J(e)&&(e instanceof e9||e instanceof tn)}customElements.define("theoplayer-menu-group",tn);var ti=document.createElement("template");ti.innerHTML=I("<slot></slot>"),k(ti,"theoplayer-menu-button");var tl=function(e){function t(t){var r;return(r=e.call(this,eG({template:ti},t))||this)._upgradeProperty("menu"),r}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute("aria-haspopup")||this.setAttribute("aria-haspopup","true")},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t!==A.MENU||this.hasAttribute("aria-controls")&&this.getAttribute("aria-controls")!==r||this.setAttribute("aria-controls",a)},r.handleClick=function(){var e=this.menu;if(e){var t=eJ(tt,{bubbles:!0,composed:!0,detail:{menu:e}});this.dispatchEvent(t)}},M(t,[{key:"menu",get:function(){return this.getAttribute(A.MENU)},set:function(e){e?this.setAttribute(A.MENU,e):this.removeAttribute(A.MENU)}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.MENU])}}]),t}(D);customElements.define("theoplayer-menu-button",tl);var ts='<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',tu=document.createElement("template");tu.innerHTML=I('<span part="icon"><slot>'+ts+"</slot></span>"),k(tu,"theoplayer-menu-close-button");var tp=function(e){function t(){return e.call(this,{template:tu})}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"close menu")},r.handleClick=function(){var e=eJ(e4,{bubbles:!0,composed:!0});this.dispatchEvent(e)},M(t,null,[{key:"observedAttributes",get:function(){return z(D.observedAttributes)}}]),t}(D);customElements.define("theoplayer-menu-close-button",tp);var th=document.createElement("template");th.innerHTML=I("<slot></slot>"),k(th,"theoplayer-media-track-radio-button");var td=["change","update"],tc=function(e){function t(){var t;return(t=e.call(this,{template:th})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(t,e);var r=t.prototype;return r._updateFromTrack=function(){es(this._slotEl,this._track?ty(this._track):""),this.checked=!!this._track&&this._track.enabled},r._updateTrack=function(){this._track&&(this._track.enabled=this.checked)},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===A.ARIA_CHECKED&&r!==a&&this._updateTrack()},M(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(td,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(td,this._onTrackChange))}}]),t}(e0);function ty(e){var t=e.label;if(t)return t;var r=e.language;return r&&(el(r)||r)||""}customElements.define("theoplayer-media-track-radio-button",tc);var tm=":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}",tb=document.createElement("template");tb.innerHTML=I("<slot></slot>"),k(tb,"theoplayer-text-track-radio-button");var tv=["change","update"],tf=function(e){function t(){var t;return(t=e.call(this,{template:tb})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(t,e);var r=t.prototype;return r._updateFromTrack=function(){es(this._slotEl,this._track?tg(this._track):""),this.checked=!!this._track&&"showing"===this._track.mode},r._updateTrack=function(){this._track&&(this._track.mode=this.checked?"showing":"disabled")},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===A.ARIA_CHECKED&&r!==a&&this._updateTrack()},M(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(tv,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(tv,this._onTrackChange))}}]),t}(e0);function tg(e){var t=e.label;if(t)return t;var r=e.language;return r&&(el(r)||r)||""}function t_(e){return"subtitles"===e.kind||"captions"===e.kind}function tk(e){var t=null==e?void 0:e.targetQuality;return void 0===t||Array.isArray(t)||(t=[t]),t}function tw(e){return e?e.label&&""!==e.label?e.label:e.height?""+e.height+"p":e.bandwidth?tx(e):void 0:void 0}function tx(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"}customElements.define("theoplayer-text-track-radio-button",tf);var tE=document.createElement("template");tE.innerHTML=I("<slot>Off</slot>"),k(tE,"theoplayer-text-track-off-radio-button");var tA=["change"],tT=function(e){function t(){var t;return(t=e.call(this,{template:tE})||this)._trackList=void 0,t._onTrackChange=function(){t._updateFromTrackList()},t._upgradeProperty("trackList"),t}a(t,e);var r=t.prototype;return r._updateFromTrackList=function(){this.checked=!this._trackList||!tC(this._trackList)},r._updateTrackList=function(){this._trackList&&this.checked&&tL(this._trackList)},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===A.ARIA_CHECKED&&r!==a&&this._updateTrackList()},M(t,[{key:"trackList",get:function(){return this._trackList},set:function(e){this._trackList&&this._trackList.removeEventListener(tA,this._onTrackChange),this._trackList=e,this._updateFromTrackList(),e&&e.addEventListener(tA,this._onTrackChange)}}]),t}(e0);function tC(e){return e.filter(t_).some(function(e){return"showing"===e.mode})}function tL(e){for(var t=0;t<e.length;t++){var r=e[t];t_(r)&&"showing"===r.mode&&(r.mode="disabled")}}customElements.define("theoplayer-text-track-off-radio-button",tT);var tS=document.createElement("template");tS.innerHTML="<style>"+tm+"</style><theoplayer-radio-group></theoplayer-radio-group>",k(tS,"theoplayer-track-radio-group");var tP=["addtrack","removetrack"],tM=function(e){function t(){(t=e.call(this)||this)._updateTracks=function(){var e=et(t._radioGroup.children),r=t._getTracks();void 0!==t._offButton&&(e=e.slice(1));for(var a=0;a<e.length;a++){var n=e[a];(!n.track||0>r.indexOf(n.track))&&t._radioGroup.removeChild(n)}for(var o=0;o<r.length;o++){var i=r[o];if(!tR(e,i)){var l=t._createTrackButton(i);t._radioGroup.appendChild(l)}}},t._onChange=function(){t.dispatchEvent(eX("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tS.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("trackType"),t._upgradeProperty("showOffButton"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._updateOffButton(),this._updateTracks(),this.shadowRoot.addEventListener("change",this._onChange)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},r._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}},r._updateTracksList=function(){var e=this._tracksList,t=this._getTracksList();e!==t&&(null==e||e.removeEventListener(tP,this._updateTracks),null==t||t.addEventListener(tP,this._updateTracks),this._tracksList=t,this._updateOffButton())},r._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(t_):[]},r._createTrackButton=function(e){if("subtitles"===this.trackType){var t=new tf;return t.track=e,t}var r=new tc;return r.track=e,r},r._updateOffButton=function(){"subtitles"===this.trackType&&this.showOffButton?(void 0===this._offButton&&(this._offButton=new tT,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)},r.attributeChangedCallback=function(e,r,a){a!==r&&(e===A.TRACK_TYPE?(this._updateTracksList(),this._updateTracks()):e===A.SHOW_OFF&&(this._updateOffButton(),this._updateTracks()),t.observedAttributes.indexOf(e)>=0&&x(this))},M(t,[{key:"trackType",get:function(){return this.getAttribute(A.TRACK_TYPE)||"audio"},set:function(e){this.setAttribute(A.TRACK_TYPE,e||"audio")}},{key:"showOffButton",get:function(){return this.hasAttribute(A.SHOW_OFF)},set:function(e){e?this.setAttribute(A.SHOW_OFF,""):this.removeAttribute(A.SHOW_OFF)}},{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[A.TRACK_TYPE,A.SHOW_OFF]}}]),t}(ed(HTMLElement,["player"]));function tR(e,t){for(var r=0;r<e.length;r++)if(e[r].track===t)return!0;return!1}customElements.define("theoplayer-track-radio-group",tM);var tI='<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>',tO=".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}",tD='<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>',tN=".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}",tq=".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 tF(e){var t=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);return t?{r_:parseInt(t[1],16),g_:parseInt(t[2],16),b_:parseInt(t[3],16),a_:1}:null}function tB(e){var t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i);return t?{r_:parseInt(t[1],10),g_:parseInt(t[2],10),b_:parseInt(t[3],10),a_:t[4]?parseFloat(t[4]):1}:null}function tH(e){return e?ei(e,"rgb")?tB(e):ei(e,"#")?tF(e):null:null}function tU(e){return"rgba("+e.r_+","+e.g_+","+e.b_+","+e.a_+")"}function tz(e){return"rgb("+e.r_+","+e.g_+","+e.b_+")"}function tV(e,t){return{r_:e.r_,g_:e.g_,b_:e.b_,a_:t}}function tG(e,t){return e.r_===t.r_&&e.g_===t.g_&&e.b_===t.b_}var tQ=tH("#ffffff"),tY=tH("#000000"),tK=[["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)"]],tW=[["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']],tj=[["None","none"],["Drop shadow","dropshadow"],["Raised","raised"],["Depressed","depressed"],["Uniform","uniform"]],tZ=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){if(void 0!==t._player){var e=t.property;switch(e){case"fontFamily":es(t._spanEl,tX(t._player.textTrackStyle.fontFamily));break;case"fontColor":case"backgroundColor":case"windowColor":es(t._spanEl,tJ(t._player.textTrackStyle[e]));break;case"fontOpacity":es(t._spanEl,t$(t._player.textTrackStyle.fontColor));break;case"backgroundOpacity":es(t._spanEl,t$(t._player.textTrackStyle.backgroundColor));break;case"windowOpacity":es(t._spanEl,t$(t._player.textTrackStyle.windowColor));break;case"edgeStyle":es(t._spanEl,t0(t._player.textTrackStyle.edgeStyle));break;default:var r=t._player.textTrackStyle[e];es(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}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this),this.hasAttribute(A.PROPERTY)||(this.property="fontColor")},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.attributeChangedCallback=function(e,r,a){a!==r&&(e===A.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&x(this))},M(t,[{key:"property",get:function(){return this.getAttribute(A.PROPERTY)},set:function(e){this.setAttribute(A.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[A.PROPERTY]}}]),t}(ed(HTMLElement,["player"]));function tX(e){if(!e)return"Default";var t=er(tW,function(t){var r=v(t,2);return r[0],r[1]===e});return t?t[0]:"Custom"}function tJ(e){if(!e)return"Default";var t=tH(e);if(t){var r=tz(t),a=er(tK,function(e){var t=v(e,2);return t[0],t[1]===r});if(a)return a[0]}return"Custom"}function t$(e){if(!e)return"Default";var t=tH(e);return t?""+100*t.a_+"%":"Custom"}function t0(e){if(!e)return"Default";var t=er(tj,function(t){var r=v(t,2);return r[0],r[1]===e});return t?t[0]:"Custom"}customElements.define("theoplayer-text-track-style-display",tZ);var t1=document.createElement("template");t1.innerHTML="<style>"+tm+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",k(t1,"theoplayer-text-track-style-radio-group");var t5=function(e){function t(){(t=e.call(this)||this)._updateChecked=function(){for(var e=t._radioGroup.allRadioButtons(),r=0;r<e.length;r++){var a=e[r];a.checked=a.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?tz(null!=(r=tH(a))?r:tQ):"";break;case"backgroundColor":var n,o=t._player.textTrackStyle.backgroundColor;t.value=o?tz(null!=(n=tH(o))?n:tY):"";break;case"windowColor":var i,l=t._player.textTrackStyle.windowColor;t.value=l?tz(null!=(i=tH(l))?i:tY):"";break;case"fontOpacity":var s,u,p=t._player.textTrackStyle.fontColor;t.value=p?String((null!=(u=null==(s=tH(p))?void 0:s.a_)?u:1)*100):"";break;case"backgroundOpacity":var h,d,c=t._player.textTrackStyle.backgroundColor;t.value=c?String((null!=(d=null==(h=tH(c))?void 0:h.a_)?d:1)*100):"";break;case"windowOpacity":var y,m,b=t._player.textTrackStyle.windowColor;t.value=b?String((null!=(m=null==(y=tH(b))?void 0:y.a_)?m:1)*100):"";break;default:t.value=null!=(e=t._player.textTrackStyle[t.property])?e:""}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(t1.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._upgradeProperty("property"),this._upgradeProperty("value"),this._upgradeProperty("player"),this.hasAttribute(A.PROPERTY)||(this.property="fontColor"),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r._updateToPlayer=function(){if(void 0!==this._player)switch(this.property){case"fontColor":this._player.textTrackStyle.fontColor=t2(this.value,this._player.textTrackStyle.fontColor,tQ);break;case"backgroundColor":this._player.textTrackStyle.backgroundColor=t2(this.value,this._player.textTrackStyle.backgroundColor,tY);break;case"windowColor":this._player.textTrackStyle.windowColor=t2(this.value,this._player.textTrackStyle.windowColor,tY);break;case"fontOpacity":this._player.textTrackStyle.fontColor=t3(this.value,this._player.textTrackStyle.fontColor,tQ);break;case"backgroundOpacity":this._player.textTrackStyle.backgroundColor=t3(this.value,this._player.textTrackStyle.backgroundColor,tY);break;case"windowOpacity":this._player.textTrackStyle.windowColor=t3(this.value,this._player.textTrackStyle.windowColor,tY);break;default:this._player.textTrackStyle[this.property]=""==this.value?void 0:this.value}},r.attributeChangedCallback=function(e,r,a){a!==r&&(e===A.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&x(this))},M(t,[{key:"property",get:function(){return this.getAttribute(A.PROPERTY)},set:function(e){this.setAttribute(A.PROPERTY,e)}},{key:"value",get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this._updateToPlayer(),this._updateChecked(),this.dispatchEvent(eX("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[A.PROPERTY]}}]),t}(ed(HTMLElement,["player"]));function t2(e,t,r){var a,n,o,i=null!=(n=null==(a=tH(t))?void 0:a.a_)?n:1;if(""!==e||1!==i)return tU(tV(null!=(o=tH(e))?o:r,i))}function t3(e,t,r){var a,n=null!=(a=tH(t))?a:r;if(!(""===e&&tG(n,r)))return tU(tV(n,""==e?1:Number(e)/100))}customElements.define("theoplayer-text-track-style-radio-group",t5);var t4=document.createElement("template");t4.innerHTML=tr(tD,tq+"\n"+tN),k(t4,"theoplayer-text-track-style-menu");var t8=function(e){function t(){return e.call(this,{template:t4})}return a(t,e),t}(tn);customElements.define("theoplayer-text-track-style-menu",t8);var t7=document.createElement("template");t7.innerHTML=tr(tI,tO),k(t7,"theoplayer-language-menu");var t6=["addtrack","removetrack"],t9=function(e){function t(){var t;return(t=e.call(this,{template:t7})||this)._updateAudioTracks=function(){var e,r;(null!=(r=null==(e=t._player)?void 0:e.audioTracks)?r:[]).length<2?t.removeAttribute(A.HAS_AUDIO):t.setAttribute(A.HAS_AUDIO,"")},t._updateTextTracks=function(){var e,r;0===(null!=(r=null==(e=t._player)?void 0:e.textTracks.filter(t_))?r:[]).length?t.removeAttribute(A.HAS_SUBTITLES):t.setAttribute(A.HAS_SUBTITLES,"")},t._upgradeProperty("player"),t}return a(t,e),t.prototype.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&x(this)},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(t6,this._updateAudioTracks),this._player.textTracks.removeEventListener(t6,this._updateTextTracks)),this._player=e,this._updateAudioTracks(),this._updateTextTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(t6,this._updateAudioTracks),this._player.textTracks.addEventListener(t6,this._updateTextTracks)))}}],[{key:"observedAttributes",get:function(){return z(tn.observedAttributes).concat([A.HAS_AUDIO,A.HAS_SUBTITLES])}}]),t}(ed(tn,["player"]));customElements.define("theoplayer-language-menu",t9);var re='<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',rt=document.createElement("template");rt.innerHTML=I('<span part="icon"><slot>'+re+"</slot></span>"),k(rt,"theoplayer-language-menu-button");var rr=["addtrack","removetrack"],ra=function(e){function t(){var t;return(t=e.call(this,{template:rt})||this)._updateTracks=function(){void 0!==t._player&&(t._player.audioTracks.length>=2||t._player.textTracks.some(t_))?t.removeAttribute("hidden"):t.setAttribute("hidden","")},t._upgradeProperty("player"),t}return a(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"open language menu")},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(rr,this._updateTracks),this._player.textTracks.removeEventListener(rr,this._updateTracks)),this._player=e,this._updateTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(rr,this._updateTracks),this._player.textTracks.addEventListener(rr,this._updateTracks)))}}]),t}(ed(tl,["player"]));customElements.define("theoplayer-language-menu-button",ra);var rn=document.createElement("template");rn.innerHTML="<style>"+tm+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",k(rn,"theoplayer-playback-rate-radio-group");var ro=function(e){function t(){(t=e.call(this)||this)._value=1,t._updateChecked=function(){for(var e=t._radioGroup.allRadioButtons(),r=0;r<e.length;r++){var a=e[r];a.checked=Number(a.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(rn.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t._upgradeProperty("value"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},M(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(eX("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}(ed(HTMLElement,["player"]));customElements.define("theoplayer-playback-rate-radio-group",ro);var ri='<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',rl=document.createElement("template");rl.innerHTML=I('<span part="icon"><slot>'+ri+"</slot></span>"),k(rl,"theoplayer-playback-rate-button");var rs=function(e){function t(){return e.call(this,{template:rl})}return a(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"open playback speed menu")},t}(tl);customElements.define("theoplayer-playback-rate-menu-button",rs);var ru='<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>',rp=document.createElement("template");rp.innerHTML=e7('<span slot="heading"><slot name="heading">Playback speed</slot></span>',ru),k(rp,"theoplayer-playback-rate-menu");var rh=function(e){function t(){return e.call(this,{template:rp})}return a(t,e),t}(e9);customElements.define("theoplayer-playback-rate-menu",rh);var rd=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}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this)},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},M(t,[{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){this._playbackRate=e,es(this._spanEl,1===e?"Normal":""+e+"x")}}]),t}(ed(HTMLElement,["playbackRate"]));customElements.define("theoplayer-playback-rate-display",rd);var rc=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}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this)},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.update_=function(){var e=void 0!==this._targetVideoQualities&&1===this._targetVideoQualities.length,t=e?this._targetVideoQualities[0]:void 0,r=tw(null!=t?t:this._activeVideoQuality);es(this._spanEl,e?null!=r?r:"Unknown":"Automatic"+(r?" ("+r+")":""))},M(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}(ed(HTMLElement,["activeVideoQuality","targetVideoQualities"]));customElements.define("theoplayer-active-quality-display",rc);var ry=document.createElement("template");ry.innerHTML=I("<slot></slot>"),k(ry,"theoplayer-quality-radio-button");var rm=["activequalitychanged","targetqualitychanged"],rb=["update"],rv=function(e){function t(){var t;return(t=e.call(this,{template:ry})||this)._track=void 0,t._quality=void 0,t._updateFromTrack=function(){if(void 0!==t._track){var e=t._track.targetQuality;void 0===t._quality?t.checked=void 0===e:t.checked=Array.isArray(e)?e.indexOf(t._quality)>=0:e===t._quality}t._updateFromQuality()},t._updateFromQuality=function(){var e;es(t._slotEl,null!=(e=tw(t._quality))?e:"Automatic")},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t._upgradeProperty("quality"),t}a(t,e);var r=t.prototype;return r._updateTargetQuality=function(){this._track&&this.checked&&(this._track.targetQuality=this._quality)},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.ARIA_CHECKED&&this._updateTargetQuality(),t.observedAttributes.indexOf(r)>=0&&x(this))},M(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(rm,this._updateFromTrack),this._track=e,this._updateFromTrack(),e&&e.addEventListener(rm,this._updateFromTrack))}},{key:"quality",get:function(){return this._quality},set:function(e){this._quality!==e&&(this._quality&&this._quality.removeEventListener(rb,this._updateFromQuality),this._quality=e,this._updateFromTrack(),e&&e.addEventListener(rb,this._updateFromQuality))}}]),t}(e0);customElements.define("theoplayer-quality-radio-button",rv);var rf=document.createElement("template");rf.innerHTML="<style>"+tm+"</style><theoplayer-radio-group></theoplayer-radio-group>",k(rf,"theoplayer-quality-radio-group");var rg=["addtrack","removetrack","change"],r_=function(e){function t(){(t=e.call(this)||this)._onChange=function(){t.dispatchEvent(eX("change",{bubbles:!0}))},t._updateTrack=function(){var e=t._player?er(t._player.videoTracks,function(e){return e.enabled}):void 0;t._track!==e&&(t._track=e,t._update())},t._update=function(){for(var e=et(t._radioGroup.children),r=t._track?t._track.qualities:[],a=1===r.length?[void 0]:[void 0].concat(z(r)),n=0;n<e.length&&n<a.length;){var o=e[n];o.track=t._track,o.quality=a[n],n++}for(;n<e.length;)t._radioGroup.removeChild(e[n]),n++;for(;n<a.length;){var i=new rv;i.track=t._track,i.quality=a[n],t._radioGroup.appendChild(i),n++}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rf.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._updateTrack(),this.shadowRoot.addEventListener("change",this._onChange)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.videoTracks.removeEventListener(rg,this._updateTrack),this._player=e,this._updateTrack(),void 0!==this._player&&this._player.videoTracks.addEventListener(rg,this._updateTrack))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-quality-radio-group",r_);var rk=document.createElement("template");rk.innerHTML=I("<slot>Reset</slot>"),k(rk,"theoplayer-text-track-style-reset-button");var rw=function(e){function t(){return e.call(this,{template:rk})}return a(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}},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes)}}]),t}(ed(D,["player"]));customElements.define("theoplayer-text-track-style-reset-button",rw);var rx='<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>',rE=document.createElement("template");rE.innerHTML=tr(rx,tq),k(rE,"theoplayer-settings-menu");var rA=function(e){function t(){return e.call(this,{template:rE})}return a(t,e),t}(tn);customElements.define("theoplayer-settings-menu",rA);var rT='<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',rC=document.createElement("template");rC.innerHTML=I('<span part="icon"><slot>'+rT+"</slot></span>"),k(rC,"theoplayer-settings-menu-button");var rL=function(e){function t(){return e.call(this,{template:rC})}return a(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"open settings menu")},t}(tl);customElements.define("theoplayer-settings-menu-button",rL);var rS=":host(:not([fullscreen])) [part=exit-icon],:host([fullscreen]) [part=enter-icon]{display:none!important}",rP='<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',rM='<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',rR="theoplayerfullscreenenter",rI="theoplayerfullscreenexit",rO=document.createElement("template");rO.innerHTML=I('<span part="enter-icon"><slot name="enter-icon">'+rP+'</slot></span><span part="exit-icon"><slot name="exit-icon">'+rM+"</slot></span>",rS),k(rO,"theoplayer-fullscreen-button");var rD=function(e){function t(){var t;return(t=e.call(this,{template:rO})||this)._upgradeProperty("fullscreen"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.handleClick=function(){if(this.fullscreen){var e=eJ(rI,{bubbles:!0,composed:!0});this.dispatchEvent(e)}else{var t=eJ(rR,{bubbles:!0,composed:!0});this.dispatchEvent(t)}},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&(x(this),this._updateAriaLabel())},r._updateAriaLabel=function(){var e=this.fullscreen?"exit fullscreen":"enter fullscreen";this.setAttribute(A.ARIA_LABEL,e)},M(t,[{key:"fullscreen",get:function(){return this.hasAttribute(A.FULLSCREEN)},set:function(e){e?this.setAttribute(A.FULLSCREEN,""):this.removeAttribute(A.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.FULLSCREEN])}}]),t}(ed(D,["fullscreen"]));customElements.define("theoplayer-fullscreen-button",rD);var rN=":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:calc(24px + var(--theoplayer-range-padding)*2);height:calc(var(--theoplayer-control-height, 24px) + var(--theoplayer-range-padding)*2);padding-left:var(--theoplayer-range-padding-left,var(--theoplayer-range-padding));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}";function rq(e,t){return void 0===t&&(t=""),"<style>"+rN+"\n"+t+'</style><div part="container"><div part="background"></div><div part="pointer"></div>'+e+"</div>"}var rF=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)}};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._pointerEl=a.querySelector('[part="pointer"]'),r._upgradeProperty("disabled"),r._upgradeProperty("value"),r._upgradeProperty("min"),r._upgradeProperty("max"),r._upgradeProperty("step"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._rangeEl.setAttribute(A.ARIA_LABEL,this.getAriaLabel()),this.update(),this.addEventListener("pointermove",this._updatePointerBar)},r.disconnectedCallback=function(){this.removeEventListener("pointermove",this._updatePointerBar)},r.attributeChangedCallback=function(e,r,a){if(a!==r){var n=null!=a;e===A.DISABLED?(this.setAttribute("aria-disabled",n?"true":"false"),n?this._rangeEl.setAttribute(e,a):this._rangeEl.removeAttribute(e)):e!==A.HIDDEN||n||this.update(),t.observedAttributes.indexOf(e)>=0&&x(this)}},r.handleInput=function(){this.update()},r.update=function(){this.hasAttribute(A.HIDDEN)||(this._rangeEl.setAttribute("aria-valuetext",this.getAriaValueText()),this.updateBar_())},r.updateBar_=function(){for(var e=this.getBarColors(),t=[],r=0,a=0;a<e.length;a++){var n=v(e[a],2),o=n[0],i=n[1];i<r||(t.push(o+" "+r+"%"),t.push(o+" "+i+"%"),r=i)}x(this,{"--theoplayer-range-track-progress-internal":"linear-gradient(to right, "+t.join(", ")+")"})},r.getBarColors=function(){var e=(this.value-this.min)/(this.max-this.min)*100,t=this._rangeEl.offsetWidth;t>0&&(this._lastRangeWidth=t);var r=0;return 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(--theoplayer-range-bar-color, #fff)",e+r],["transparent",100]]},r.updatePointer_=function(e,t){this._pointerEl.style.width=""+e*t.width+"px"},M(t,[{key:"disabled",get:function(){return this.hasAttribute(A.DISABLED)},set:function(e){e?this.setAttribute(A.DISABLED,""):this.removeAttribute(A.DISABLED)}},{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:"observedAttributes",get:function(){return[A.DISABLED,A.HIDDEN]}}]),t}(h(HTMLElement)),rB='<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>',rH="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%)}",rU="theoplayerpreviewtimechange",rz=":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)}",rV=document.createElement("template");rV.innerHTML="<style>"+rz+"</style><canvas></canvas>",k(rV,"theoplayer-preview-thumbnail");var rG=["addtrack","removetrack"],rQ=function(e){function t(){(t=e.call(this)||this)._previewTime=NaN,t._updateThumbnailTextTrack=function(){var e=t._thumbnailTextTrack,r=t._player?er(t._player.textTracks,rY):void 0;e!==r&&(t._thumbnailTextTrack=r,t.updateThumbnail_())};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rV.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}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this)},r.updateThumbnail_=function(){var e=this._thumbnailTextTrack;if(void 0===e){this.hideThumbnail_();return}"disabled"===e.mode&&(e.mode="hidden");var t=rK(e.cues,this._previewTime);if(void 0===t){this.hideThumbnail_();return}var r=t.content.trim(),a=rW(r),n=a?a.url:r;if(n=new URL(n,e.src||location.href).href,this._lastLoadedThumbnailUrl!==n){this.loadThumbnailImage_(n);return}this.showThumbnail_(a)},r.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,Z)):(this._thumbnailImageSource.onload=r,this._thumbnailImageSource.src="",this._thumbnailImageSource.src=e)}},r.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"},r.hideThumbnail_=function(){this._canvasEl.style.display="none"},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.textTracks.removeEventListener(rG,this._updateThumbnailTextTrack),this._player=e,this._updateThumbnailTextTrack(),void 0!==this._player&&this._player.textTracks.addEventListener(rG,this._updateThumbnailTextTrack))}},{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this.updateThumbnail_()}}]),t}(ed(HTMLElement,["player","previewTime"]));function rY(e){return"metadata"===e.kind&&"thumbnails"===e.label}function rK(e,t){if(0!==e.length){for(var r=e[0],a=0;a<e.length;a++){var n=e[a];if(n.startTime<=t)r=n;else if(t>=n.endTime)break}return r}}function rW(e){var t=e.match(/^(.+)#xywh=(\d+),(\d+),(\d+),(\d+)$/);if(t){var r=v(t,6);return{url:r[1],x:+r[2],y:+r[3],w:+r[4],h:+r[5]}}}customElements.define("theoplayer-preview-thumbnail",rQ);var rj=document.createElement("template");rj.innerHTML="<style>"+eP+"</style><span></span>",k(rj,"theoplayer-preview-time-display");var rZ=["timeupdate","seeking","seeked","durationchange"],rX=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,n=null==(e=t._player)?void 0:e.seekable,o=isFinite(a)?a:n&&n.length>0?n.end(0):NaN,i=t.hasAttribute(A.REMAINING)||t.hasAttribute(A.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType;i&&(r=-((o||0)-r)),es(t._spanEl,eR(r,o,i))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rj.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("previewTime"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._update()},r.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._update(),x(this))},M(t,[{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this._update()}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(rZ,this._update),this._player=e,this._update(),void 0!==this._player&&this._player.addEventListener(rZ,this._update))}}],[{key:"observedAttributes",get:function(){return[A.REMAINING,A.REMAINING_WHEN_LIVE,A.STREAM_TYPE]}}]),t}(ed(HTMLElement,["player","previewTime","streamType"]));customElements.define("theoplayer-preview-time-display",rX);var rJ=document.createElement("template");rJ.innerHTML=rq(rB,rH),k(rJ,"theoplayer-time-range");var r$=["timeupdate","durationchange","ratechange","seeking","seeked"],r0=["play","pause","ended","readystatechange","error"],r1="video not loaded, unknown time",r5=function(e){function t(){var t;return(t=e.call(this,{template:rJ})||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._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._previewRailEl=t.shadowRoot.querySelector(".theoplayer-time-range-preview-rail"),t._previewBoxEl=t._previewRailEl.querySelector('[part~="preview-box"]'),t._rangeEl.setAttribute(A.ARIA_LIVE,"off"),t._rangeEl.addEventListener("mousedown",t._pauseOnScrubStart),t._rangeEl.addEventListener("touchstart",t._pauseOnScrubStart),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._toggleAutoAdvance()},r.disconnectedCallback=function(){e.prototype.disconnectedCallback.call(this),this._toggleAutoAdvance()},r.getAriaLabel=function(){return"seek"},r.getAriaValueText=function(){var e=eD(this.value),t=eD(this.max);return e&&t?e+" of "+t:r1},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),r===A.STREAM_TYPE&&this._updateDisabled(),t.observedAttributes.indexOf(r)>=0&&x(this)},r.handleInput=function(){void 0!==this._player&&this._player.currentTime!==this.value&&(this._player.currentTime=this.value),e.prototype.handleInput.call(this)},r.shouldAutoAdvance_=function(){return this.isConnected&&void 0!==this._player&&!this._player.paused&&!this._player.ended&&!this._player.errorObject&&this._player.readyState>=3},r.updatePointer_=function(t,r){e.prototype.updatePointer_.call(this,t,r);var a=r.left+t*r.width,n=this._previewBoxEl.getBoundingClientRect(),o=((a=Math.max(r.left+n.width/2,Math.min(r.right-n.width/2,a)))-r.left)/r.width;if(this._previewRailEl.style.transform="translateX("+(1e4*o).toFixed(6)+"%)",void 0!==this._player){var i=this.min,l=eJ(rU,{bubbles:!0,composed:!0,detail:{previewTime:i+t*(this.max-i)}});this.dispatchEvent(l)}},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(r$,this._updateFromPlayer),this._player.removeEventListener(r0,this._toggleAutoAdvance)),this._player=e,this._updateFromPlayer(),this._toggleAutoAdvance(),void 0!==this._player&&(this._player.addEventListener(r$,this._updateFromPlayer),this._player.addEventListener(r0,this._toggleAutoAdvance)))}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return z(rF.observedAttributes)}}]),t}(ed(rF,["player","streamType"]));customElements.define("theoplayer-time-range",r5);var r2=document.createElement("template");function r3(e,t){return""+Math.round(e/t*100)+"%"}r2.innerHTML=rq('<input type="range" min="0" max="1" step="any" value="0">'),k(r2,"theoplayer-volume-range");var r4=function(e){function t(){var t;return(t=e.call(this,{template:r2})||this)._updateFromPlayer=function(){void 0!==t._player&&(t.value=t._player.volume)},t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.getAriaLabel=function(){return"volume"},r.getAriaValueText=function(){return r3(this.value,this.max)},r.handleInput=function(){void 0!==this._player&&this._player.volume!==this.value&&(this._player.volume=this.value),e.prototype.handleInput.call(this)},M(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}(ed(rF,["player"]));customElements.define("theoplayer-volume-range",r4);var r8=":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}",r7='<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',r6=document.createElement("template");r6.innerHTML="<style>"+r8+'</style><div part="icon"><slot name="icon">'+r7+'</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>',k(r6,"theoplayer-error-display");var r9=function(e){function t(){var t,r=(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0});return r.appendChild(r6.content.cloneNode(!0)),t._messageSlot=r.querySelector('slot[name="message"]'),t._upgradeProperty("error"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this)},r.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&x(this)},M(t,[{key:"error",get:function(){return this._error},set:function(e){this._error=e,es(this._messageSlot,e?e.message:"")}},{key:"fullscreen",get:function(){return this.hasAttribute(A.FULLSCREEN)},set:function(e){e?this.setAttribute(A.FULLSCREEN,""):this.removeAttribute(A.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return[A.FULLSCREEN]}}]),t}(ed(HTMLElement,["error","fullscreen"]));customElements.define("theoplayer-error-display",r9);var ae=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(A.CAST_STATE,e)},r._upgradeProperty("castState"),r._upgradeProperty("castApi"),r}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.CAST_STATE)||this.setAttribute(A.CAST_STATE,"unavailable"),this._updateCastState()},r.handleClick=function(){if(this._castApi){this._updateCastState();var e=this.castState;"available"===e?this._castApi.start():("connecting"===e||"connected"===e)&&this._castApi.stop()}},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&x(this)},M(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(A.CAST_STATE)}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.CAST_STATE])}}]),t}(D),at='<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>',ar=":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}}",aa=document.createElement("template");aa.innerHTML=I(at,ar),k(aa,"theoplayer-chromecast-button");var an="theoplayer-chromecast-rings-mask",ao=0,ai=function(e){function t(){t=e.call(this,{template:aa})||this;var t,r=++ao,a=t.shadowRoot.querySelector("svg clipPath#"+an),n=t.shadowRoot.querySelector("svg .theoplayer-chromecast-rings"),o=an+"-"+r;return a.setAttribute("id",o),n.setAttribute("clip-path",o),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},r._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop casting to Chromecast":"start casting to Chromecast";this.setAttribute(A.ARIA_LABEL,e)},M(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}(ed(ae,["player"]));customElements.define("theoplayer-chromecast-button",ai);var al=":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}",as='<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',au=document.createElement("template");au.innerHTML="<style>"+al+'</style><div part="icon"><slot name="icon">'+as+'</slot></div><div part="text"><p part="heading"><slot name="heading">Playing on</slot></p><p part="receiver">Chromecast Receiver</p></div>',k(au,"theoplayer-chromecast-display");var ap=["statechange"],ah=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:null==(r=e.cast)?void 0:r.chromecast;if(void 0===a||"connected"!==a.state){t.setAttribute(A.HIDDEN,"");return}es(t._receiverNameEl,a.receiverName||""),t.removeAttribute(A.HIDDEN)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(au.content.cloneNode(!0)),t._receiverNameEl=r.querySelector('[part="receiver"]'),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.HIDDEN)||this.setAttribute(A.HIDDEN,""),this._updateFromPlayer()},M(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a,n,o,i;this._player!==e&&(null==(t=this._player)||null==(r=t.cast)||null==(a=r.chromecast)||a.removeEventListener(ap,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),null==(n=this._player)||null==(o=n.cast)||null==(i=o.chromecast)||i.addEventListener(ap,this._updateFromPlayer))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-chromecast-display",ah);var ad='<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>',ac=":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}",ay=document.createElement("template");ay.innerHTML=I(ad,ac),k(ay,"theoplayer-airplay-button");var am=function(e){function t(){var t;return(t=e.call(this,{template:ay})||this)._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},r._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop playing on AirPlay":"start playing on AirPlay";this.setAttribute(A.ARIA_LABEL,e)},M(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}(ed(ae,["player"]));customElements.define("theoplayer-airplay-button",am);var ab=":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)}}",av='<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>',af=document.createElement("template");af.innerHTML="<style>"+ab+"</style>"+av,k(af,"theoplayer-loading-indicator");var ag=["readystatechange","play","pause","playing","seeking","seeked"],a_=function(e){function t(){var t;return(t=e.call(this)||this)._updateFromPlayer=function(){void 0!==t._player&&!t._player.paused&&(t._player.seeking||t._player.readyState<3)?t.setAttribute(A.LOADING,""):t.removeAttribute(A.LOADING)},t.attachShadow({mode:"open"}).appendChild(af.content.cloneNode(!0)),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._updateFromPlayer()},r.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&x(this)},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(ag,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(ag,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[A.LOADING]}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-loading-indicator",a_);var ak=":host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}",aw=document.createElement("template");aw.innerHTML="<style>"+ak+"</style>",k(aw,"theoplayer-gesture-receiver");var ax=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(aw.content.cloneNode(!0)),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.setAttribute("tabindex","-1"),this.setAttribute("aria-hidden","true")},r.handleTap=function(e){},r.handleMouseClick=function(e){void 0!==this._player&&(this._player.paused?this._player.play():this._player.pause())},M(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}(ed(HTMLElement,["player"]));customElements.define("theoplayer-gesture-receiver",ax);var aE="[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)}",aA='<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',aT=document.createElement("template");aT.innerHTML=I('<span part="icon"><slot name="icon">'+aA+'</slot></span><slot name="spacer"> </slot><span part="text"><slot name="text">LIVE</slot></span>',aE),k(aT,"theoplayer-live-button");var aC=["play","pause","playing","emptied"],aL=["seeking","seeked","timeupdate","durationchange","emptied"],aS=10,aP=function(e){function t(){var t;return(t=e.call(this,{template:aT})||this)._updatePaused=function(){t.paused=void 0===t._player||t._player.paused},t._updateLive=function(){t.live=void 0!==t._player&&aM(t._player,t.liveThreshold)},t._upgradeProperty("paused"),t._upgradeProperty("streamType"),t._upgradeProperty("liveThreshold"),t._upgradeProperty("live"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"seek to live")},r.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()))},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.LIVE_THRESHOLD&&this._updateLive(),t.observedAttributes.indexOf(r)>=0&&x(this))},M(t,[{key:"paused",get:function(){return this.hasAttribute(A.PAUSED)},set:function(e){e?this.setAttribute(A.PAUSED,""):this.removeAttribute(A.PAUSED)}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}},{key:"liveThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(A.LIVE_THRESHOLD))?e:aS)},set:function(e){e=Number(e),this.setAttribute(A.LIVE_THRESHOLD,String(isNaN(e)?0:e))}},{key:"live",get:function(){return this.hasAttribute(A.LIVE)},set:function(e){e?this.setAttribute(A.LIVE,""):this.removeAttribute(A.LIVE)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(aC,this._updatePaused),this._player.removeEventListener(aL,this._updateLive)),this._player=e,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(aC,this._updatePaused),this._player.addEventListener(aL,this._updateLive)))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.STREAM_TYPE,A.LIVE,A.PAUSED,A.LIVE_THRESHOLD])}}]),t}(ed(D,["player","streamType"]));function aM(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}customElements.define("theoplayer-live-button",aP);var aR=":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)}";function aI(e){return"linear"===e.type}var aO=document.createElement("template");aO.innerHTML="<style>"+eP+"\n"+aR+"</style><span></span>",k(aO,"theoplayer-ad-display");var aD=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","addad","updatead"],aN=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,n=null==(e=t._player)?void 0:e.ads,o=(null!=(a=null==n?void 0:null==(r=n.currentAdBreak)?void 0:r.ads)?a:[]).filter(aI);if(void 0===n||!n.playing||0===o.length){es(t._spanEl,""),t.style.display="none";return}if(o.length>1){var i=er(t._player.ads.currentAds||[],aI);if(i){var l=o.indexOf(i);if(l>=0){es(t._spanEl,"Ad "+(l+1)+" of "+o.length),t.style.display="";return}}}es(t._spanEl,"Ad"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(aO.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._updateFromPlayer()},M(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(aD,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(aD,this._updateFromPlayer)))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-ad-display",aN);var aq=":host{pointer-events:none}",aF=document.createElement("template");aF.innerHTML="<style>"+eP+"\n"+aq+"</style><span></span>",k(aF,"theoplayer-ad-countdown");var aB=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"],aH=function(e){function t(){(t=e.call(this)||this)._onAdChange=function(){var e,r,a;(null==(e=t._player)?void 0:null==(r=e.ads)?void 0:r.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,n=null==a?void 0:null==(r=a.currentAdBreak)?void 0:r.maxRemainingDuration;if(void 0===a||!a.playing||void 0===n||n<0){es(t._spanEl,""),t.style.display="none";return}n=Math.ceil(n),es(t._spanEl,"Content will resume in "+n+"s"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(aF.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._update()},M(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(aB,this._onAdChange)),this._player=e,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(aB,this._onAdChange)))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-ad-countdown",aH);var aU=document.createElement("template");aU.innerHTML=q("<slot>Visit Advertiser</slot>"),k(aU,"theoplayer-ad-clickthrough-button");var az=["adbegin","adend","adloaded","updatead","adskip"],aV=function(e){function t(){var t;return(t=e.call(this,{template:aU})||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.clickThrough=null;return}var n=er(null!=(r=a.currentAds)?r:[],aI);if(void 0===n){t.clickThrough=null;return}var o=n.clickThrough;if(!o){t.clickThrough=null;return}t.clickThrough=o},t._upgradeProperty("clickThrough"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer()},r.attributeChangedCallback=function(r,a,n){if(e.prototype.attributeChangedCallback.call(this,r,a,n),r===A.CLICKTHROUGH&&n!==a){var o=null!=n,i=n?String(n).trim():"#";this.setLink(i,"_blank"),this.disabled=!o,o?this.style.display="":this.style.display="none"}t.observedAttributes.indexOf(r)>=0&&x(this)},r.handleClick=function(){var e;null==(e=this._player)||e.pause()},M(t,[{key:"clickThrough",get:function(){return this.getAttribute(A.CLICKTHROUGH)},set:function(e){null==e?this.removeAttribute(A.CLICKTHROUGH):this.setAttribute(A.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(az,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(az,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return z(B.observedAttributes).concat([A.CLICKTHROUGH])}}]),t}(ed(B,["player"]));customElements.define("theoplayer-ad-clickthrough-button",aV);var aG=":host{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)}: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=skip]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}[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))}",aQ='<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',aY=document.createElement("template");aY.innerHTML=I('<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">'+aQ+"</slot></span></span>",aG),k(aY,"theoplayer-ad-skip-button");var aK=["adbegin","adend","adloaded","updatead","adskip"],aW=function(e){function t(){var t;return(t=e.call(this,{template:aY})||this)._onAdChange=function(){var e,r,a;(null==(e=t._player)?void 0:null==(r=e.ads)?void 0:r.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 n=er(null!=(r=a.currentAds)?r:[],aI);if(void 0===n){t.style.display="none";return}var o=n.skipOffset;if(void 0===o||o<0||void 0!==n.duration&&o>=n.duration){t.style.display="none";return}var i=t._player.currentTime;i<o?(es(t._countdownEl,"Skip in "+Math.ceil(o-i)+"s"),t._countdownEl.style.display="",t._skipEl.style.display="none",t.style.display="",t.setAttribute(A.DISABLED,""),t.setAttribute(A.ARIA_LIVE,"off")):(t._countdownEl.style.display="none",t._skipEl.style.display="",t.style.display="",t.removeAttribute(A.DISABLED),t.setAttribute(A.ARIA_LIVE,"polite"))},t._countdownEl=t.shadowRoot.querySelector('[part="countdown"]'),t._skipEl=t.shadowRoot.querySelector('[part="skip"]'),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._update()},r.handleClick=function(){var e,t;null==(e=this._player)||null==(t=e.ads)||t.skip()},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&x(this)},M(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(aK,this._onAdChange)),this._player=e,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(aK,this._onAdChange)))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes)}}]),t}(ed(D,["player"]));customElements.define("theoplayer-ad-skip-button",aW),function(e){e.TopControlBar="top-control-bar",e.BottomControlBar="bottom-control-bar",e.Menu="menu"}(T||(T={}));var aj=[];function aZ(e){aj.push(e)}function aX(e){for(var t=0;t<aj.length;t++)(0,aj[t])(e)}function aJ(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var a$=':host{container-name:theoplayer-ui-container;container-type:size;background:#000;background:var(--theoplayer-background,#000);-webkit-box-sizing:border-box;box-sizing:border-box;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] .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])) [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(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [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([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}',a0='<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>',a1=function(){if(document)for(var e=[["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"]],t=0;t<e.length;t++){var r=e[t];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 a5(){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)}var a2=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),n=Math.max(this.right,t.right)-r,o=Math.max(this.bottom,t.bottom)-a;return new e(r,a,n,o)},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,n,o,i,l;return new e(null!=(a=null!=(r=t.left)?r:t.x)?a:0,null!=(o=null!=(n=t.top)?n:t.y)?o:0,null!=(i=t.width)?i:0,null!=(l=t.height)?l:0)},M(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}(),a3="theoplayerstreamtypechange",a4=document.createElement("template");a4.innerHTML="<style>"+a$+"</style>"+a0,k(a4,"theoplayer-ui");var a8=2,a7=60,a6=function(t){function r(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=0;t<e.length;t++){var a=e[t];if("childList"===a.type){for(var n=a.addedNodes,o=a.removedNodes,i=0;i<n.length;i++){var l=n[i];X(l)&&ec(l,r._playerEl,r.registerStateReceiver_)}for(var s=0;s<o.length;s++){var u=o[s];X(u)&&ec(u,r._playerEl,r.unregisterStateReceiver_)}}}},r._onSlotChange=function(){ec(aJ(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){en(r._stateReceivers,e)&&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=J(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(A.MENU_OPENED,"")):r.removeAttribute(A.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(),a1&&document[a1.fullscreenEnabled_]&&r[a1.requestFullscreen_]){var t=r[a1.requestFullscreen_]();t&&t.then&&t.then(Z,Z)}else r._player&&r._player.presentation.supportsMode("fullscreen")&&r._player.presentation.requestMode("fullscreen")},r._onExitFullscreen=function(e){if(e.stopPropagation(),a1){var t=document[a1.exitFullscreen_]();t&&t.then&&t.then(Z,Z)}r._player&&"fullscreen"===r._player.presentation.currentMode&&r._player.presentation.requestMode("inline")},r._onFullscreenChange=function(){var e=!1;if(void 0!==a1){var t=document[a1.fullscreenElement_];t&&(e=eu(t,aJ(r)))}e||void 0===r._player||"fullscreen"!==r._player.presentation.currentMode||(e=!0),e?r.setAttribute(A.FULLSCREEN,""):r.removeAttribute(A.FULLSCREEN)},r._updateAspectRatio=function(){if(void 0!==r._player){var e=r._player,t=e.videoWidth,a=e.videoHeight;t>0&&a>0?x(aJ(r),{"--theoplayer-video-width":""+t,"--theoplayer-video-height":""+a}):x(aJ(r),{"--theoplayer-video-width":"","--theoplayer-video-height":""})}},r._updateError=function(){var e,t=null==(e=r._player)?void 0:e.errorObject;t?r.setAttribute(A.HAS_ERROR,""):r.removeAttribute(A.HAS_ERROR);for(var a=0,n=r._stateReceivers;a<n.length;a++){var o=n[a];o[ep].indexOf("error")>=0&&(o.error=t)}},r._onPlay=function(){r.setAttribute(A.HAS_FIRST_PLAY,""),r.removeAttribute(A.PAUSED),r._updateEnded()},r._onPause=function(){r.setAttribute(A.PAUSED,""),r._updateEnded()},r._updatePausedAndEnded=function(){!r._player||r._player.paused?r.setAttribute(A.PAUSED,""):r.removeAttribute(A.PAUSED),r._updateEnded()},r._updateEnded=function(){r._player&&r._player.ended?r.setAttribute(A.ENDED,""):r.removeAttribute(A.ENDED)},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,n=r._player.seekable;(a<=0||n.length>0&&n.end(n.length-1)-n.start(0)>=a)&&(e="dvr")}else e="vod";r.streamType=e}}},r._updatePlaybackRate=function(){if(void 0!==r._player)for(var e=r._player.playbackRate,t=0,a=r._stateReceivers;t<a.length;t++){var n=a[t];n[ep].indexOf("playbackRate")>=0&&(n.playbackRate=e)}},r._updateMuted=function(){void 0!==r._player&&(r.muted=r._player.muted)},r._updateActiveVideoTrack=function(){if(void 0!==r._player){var e,t,a,n,o=er(r._player.videoTracks,function(e){return e.enabled});r._activeVideoTrack!==o&&(null==(e=r._activeVideoTrack)||e.removeEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(t=r._activeVideoTrack)||t.removeEventListener("targetqualitychanged",r._updateTargetVideoQualities),r._activeVideoTrack=o,r._updateActiveVideoQuality(),r._updateTargetVideoQualities(),null==(a=r._activeVideoTrack)||a.addEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(n=r._activeVideoTrack)||n.addEventListener("targetqualitychanged",r._updateTargetVideoQualities))}},r._updateActiveVideoQuality=function(){for(var e,t=null==(e=r._activeVideoTrack)?void 0:e.activeQuality,a=0,n=r._stateReceivers;a<n.length;a++){var o=n[a];o[ep].indexOf("activeVideoQuality")>=0&&(o.activeVideoQuality=t)}},r._updateTargetVideoQualities=function(){for(var e=tk(r._activeVideoTrack),t=0,a=r._stateReceivers;t<a.length;t++){var n=a[t];n[ep].indexOf("targetVideoQualities")>=0&&(n.targetVideoQualities=e)}},r._updateCasting=function(){var e,t,a;null!=(a=null==(e=r._player)?void 0:null==(t=e.cast)?void 0:t.casting)&&a?r.setAttribute(A.CASTING,""):r.removeAttribute(A.CASTING)},r._updatePlayingAd=function(){var e,t,a;null!=(a=null==(e=r._player)?void 0:null==(t=e.ads)?void 0:t.playing)&&a?r.setAttribute(A.PLAYING_AD,""):r.removeAttribute(A.PLAYING_AD)},r._onSourceChange=function(){void 0===r._player||r._player.paused?r.removeAttribute(A.HAS_FIRST_PLAY):r.setAttribute(A.HAS_FIRST_PLAY,"")},r.setUserIdle_=function(){clearTimeout(r._userIdleTimer),r._userIdleTimer=0,r.userIdleTimeout<0||r.setAttribute(A.USER_IDLE,"")},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._onKeyUp=function(){r.scheduleUserIdle_()},r._onPointerUp=function(e){"touch"===e.pointerType&&(r.isPlayerOrMedia_(e.target)&&!r.hasAttribute(A.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=a9(r._topChromeSlot),a=a9(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=0,a=r._stateReceivers;t<a.length;t++){var n=a[t];n[ep].indexOf("previewTime")>=0&&(n.previewTime=r._previewTime)}};var r,a=r.attachShadow({mode:"open",delegatesFocus:!0});return a.appendChild(a4.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(tt,r._onToggleMenu),a.addEventListener(rR,r._onEnterFullscreen),a.addEventListener(rI,r._onExitFullscreen),a.addEventListener(rU,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("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("streamType"),r.tryInitializePlayer_(),r}a(r,t);var n=r.prototype;return n._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},n._setConfiguration=function(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()},n._setSource=function(e){this._player?this._player.source=e:this._source=e},n.connectedCallback=function(){var e;w(this),!this.hasAttribute(A.MOBILE)&&a5()&&this.setAttribute(A.MOBILE,""),this.hasAttribute(A.PAUSED)||this.setAttribute(A.PAUSED,""),this.tryInitializePlayer_();for(var t=0,r=this._stateReceivers;t<r.length;t++){var a=r[t];this.propagateStateToReceiver_(a)}ec(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(e=this._resizeObserver)||e.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(e4,this._onCloseMenu),this._menuGroup.addEventListener(e8,this._onMenuChange),void 0!==a1&&(document.addEventListener(a1.fullscreenchange_,this._onFullscreenChange),document.addEventListener(a1.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)},n.tryInitializePlayer_=function(){var t,r;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 a=0,n=this._stateReceivers;a<n.length;a++){var o=n[a];o[ep].indexOf("player")>=0&&(o.player=this._player)}this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this._player.addEventListener("resize",this._updateAspectRatio),this._player.addEventListener(["error","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),this._player.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(t=this._player.cast)||t.addEventListener("castingchange",this._updateCasting),null==(r=this._player.ads)||r.addEventListener(["adbreakbegin","adbreakend","adbegin","adend"],this._updatePlayingAd)}},n.disconnectedCallback=function(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange);for(var t=0,r=this._stateReceivers;t<r.length;t++){var a=r[t];this.removeStateFromReceiver_(a)}this._stateReceivers.length=0,this._menuGroup.removeEventListener(e4,this._onCloseMenu),this._menuGroup.removeEventListener(e8,this._onMenuChange),void 0!==a1&&(document.removeEventListener(a1.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(a1.fullscreenerror_,this._onFullscreenChange)),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)},n.attributeChangedCallback=function(e,t,a){if(a!==t){var n=null!=a;if(e===A.CONFIGURATION)this._setConfiguration(a?JSON.parse(a):{});else if(e===A.SOURCE)this._setSource(a?JSON.parse(a):void 0);else if(e===A.MUTED)this._player&&(this._player.muted=n);else if(e===A.AUTOPLAY)this._player&&(this._player.autoplay=n);else if(e===A.FULLSCREEN)for(var o=0,i=this._stateReceivers;o<i.length;o++){var l=i[o];l[ep].indexOf("fullscreen")>=0&&(l.fullscreen=n)}else if(e===A.STREAM_TYPE){for(var s=0,u=this._stateReceivers;s<u.length;s++){var p=u[s];p[ep].indexOf("streamType")>=0&&(p.streamType=a)}var h=eJ(a3,{bubbles:!0,composed:!0,detail:{streamType:a}});this.dispatchEvent(h)}else e===A.FLUID?this._updateAspectRatio():e===A.USER_IDLE||e===A.PAUSED||e===A.CASTING?this._updateTextTrackMargins():e===A.DVR_THRESHOLD&&this._updateStreamType();r.observedAttributes.indexOf(e)>=0&&x(this)}},n.propagateStateToReceiver_=function(e){var t,r=e[ep];r.indexOf("player")>=0&&(e.player=this._player),r.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),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=tk(this._activeVideoTrack))),r.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)},n.removeStateFromReceiver_=function(e){e[ep].indexOf("player")>=0&&(e.player=void 0)},n.openMenu_=function(e,t){var r=a2.fromRect(this._topChromeEl.getBoundingClientRect()),a=a2.fromRect(this._bottomChromeEl.getBoundingClientRect()),n=!0,o=!0;if(void 0!==t){var i=a2.fromRect(this.getBoundingClientRect()),l=a2.fromRect(t.getBoundingClientRect());i.width>0&&i.height>0&&(n=l.top>=i.top+i.height/2,o=l.left>=i.left+i.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,x(this,{"--theoplayer-menu-offset-top":""+Math.round(r.height)+"px","--theoplayer-menu-offset-bottom":""+Math.round(a.height)+"px","--theoplayer-menu-margin-top":n?"auto":"0","--theoplayer-menu-margin-bottom":n?"0":"auto","--theoplayer-menu-margin-left":o?"auto":"0","--theoplayer-menu-margin-right":o?"0":"auto"})},n.closeMenu_=function(){var e;this._menuGroup.closeMenu(),null==(e=this._menuOpener)||e.focus(),this._menuOpener=void 0},n.isUserIdle_=function(){return this.hasAttribute(A.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()},n.setUserActive_=function(){clearTimeout(this._userIdleTimer),this.removeAttribute(A.USER_IDLE)},n.isPlayerOrMedia_=function(e){return e===this||this._playerEl.contains(e)},M(r,[{key:"player",get:function(){return this._player}},{key:"configuration",get:function(){return this._configuration},set:function(e){this.removeAttribute(A.CONFIGURATION),this._setConfiguration(e)}},{key:"source",get:function(){return this._player?this._player.source:this._source},set:function(e){this.removeAttribute(A.SOURCE),this._setSource(e)}},{key:"muted",get:function(){return this.hasAttribute(A.MUTED)},set:function(e){e?this.setAttribute(A.MUTED,""):this.removeAttribute(A.MUTED)}},{key:"autoplay",get:function(){return this.hasAttribute(A.AUTOPLAY)},set:function(e){e?this.setAttribute(A.AUTOPLAY,""):this.removeAttribute(A.AUTOPLAY)}},{key:"fullscreen",get:function(){return this.hasAttribute(A.FULLSCREEN)}},{key:"paused",get:function(){return this.hasAttribute(A.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(A.ENDED)}},{key:"casting",get:function(){return this.hasAttribute(A.CASTING)}},{key:"userIdleTimeout",get:function(){var e;return Number(null!=(e=this.getAttribute(A.USER_IDLE_TIMEOUT))?e:a8)},set:function(e){e=Number(e),this.setAttribute(A.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}},{key:"dvrThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(A.DVR_THRESHOLD))?e:a7)},set:function(e){e=Number(e),this.setAttribute(A.DVR_THRESHOLD,String(isNaN(e)?0:e))}}],[{key:"observedAttributes",get:function(){return[A.CONFIGURATION,A.SOURCE,A.MUTED,A.AUTOPLAY,A.FULLSCREEN,A.FLUID,A.MOBILE,A.PAUSED,A.ENDED,A.CASTING,A.PLAYING_AD,A.HAS_ERROR,A.HAS_FIRST_PLAY,A.STREAM_TYPE,A.DVR_THRESHOLD,A.USER_IDLE,A.USER_IDLE_TIMEOUT]}}]),r}(h(HTMLElement));function a9(e){for(var t,r=e.assignedNodes().filter(J),a=0;a<r.length;a++){var n=r[a];if("0"!==getComputedStyle(n).opacity){var o=a2.fromRect(n.getBoundingClientRect());o.width>0&&o.height>0&&(t=t?t.union(o):o)}}return t}customElements.define("theoplayer-ui",a6);var ne=':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: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)}[part=ad-chrome]{--theoplayer-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{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;min-width:0}theoplayer-ad-skip-button{border-right:0!important}theoplayer-ad-skip-button:not([disabled]){--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;font-size:17.5px;font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);line-height:30px;line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25)}: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([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-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:not([stream-type=vod]){padding-left:0}theoplayer-live-button[live]+theoplayer-time-display{display:none!important}',nt='<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 mobile-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></theoplayer-seek-button><theoplayer-play-button></theoplayer-play-button><theoplayer-seek-button seek-offset="10" mobile-only></theoplayer-seek-button></div><div slot="middle-chrome" part="middle-chrome"><theoplayer-chromecast-display></theoplayer-chromecast-display></div><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><div part="bottom-chrome"><theoplayer-control-bar><theoplayer-time-range></theoplayer-time-range></theoplayer-control-bar><theoplayer-control-bar><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button></theoplayer-mute-button><theoplayer-volume-range mobile-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"></span><theoplayer-language-menu-button menu="language-menu" mobile-hidden ad-hidden></theoplayer-language-menu-button><theoplayer-airplay-button mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-fullscreen-button></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>',nr=document.createElement("template");nr.innerHTML="<style>"+ne+"</style>"+nt,k(nr,"theoplayer-default-ui");var na=function(e){function t(t){void 0===t&&(t={}),(r=e.call(this)||this)._appliedExtensions=!1,r._updateStreamType=function(){r.setAttribute(A.STREAM_TYPE,r.streamType),"live"===r.streamType?r._timeRange.setAttribute(A.HIDDEN,""):r._timeRange.removeAttribute(A.HIDDEN)},r._onTitleSlotChange=function(){r._titleSlot.assignedNodes().length>0?r.setAttribute(A.HAS_TITLE,""):r.removeAttribute(A.HAS_TITLE)};var r,a=r.attachShadow({mode:"open",delegatesFocus:!0});return a.appendChild(nr.content.cloneNode(!0)),r._ui=a.querySelector("theoplayer-ui"),r._ui.configuration=t,r._ui.addEventListener(a3,r._updateStreamType),r._titleSlot=a.querySelector('slot[name="title"]'),r._titleSlot.addEventListener("slotchange",r._onTitleSlotChange),r._timeRange=a.querySelector("theoplayer-time-range"),r._upgradeProperty("configuration"),r._upgradeProperty("source"),r._upgradeProperty("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("streamType"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("dvrThreshold"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),!this.hasAttribute(A.MOBILE)&&a5()&&this.setAttribute(A.MOBILE,""),this._appliedExtensions||(this._appliedExtensions=!0,aX(this),x(this)),this._onTitleSlotChange()},r.disconnectedCallback=function(){},r.attributeChangedCallback=function(e,r,a){if(a!==r){var n=null!=a;e===A.SOURCE?this._ui.source=a?JSON.parse(a):void 0:e===A.CONFIGURATION?this._ui.configuration=a?JSON.parse(a):{}:e===A.MUTED?this.muted=n:e===A.AUTOPLAY?this.autoplay=n:e===A.FLUID?n?this._ui.setAttribute(A.FLUID,a):this._ui.removeAttribute(A.FLUID):e===A.MOBILE?n?this._ui.setAttribute(A.MOBILE,a):this._ui.removeAttribute(A.MOBILE):e===A.STREAM_TYPE?this.streamType=a:e===A.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(a):e===A.DVR_THRESHOLD&&(this.dvrThreshold=Number(a)),t.observedAttributes.indexOf(e)>=0&&x(this)}},M(t,[{key:"player",get:function(){return this._ui.player}},{key:"configuration",get:function(){return this._ui.configuration},set:function(e){this.removeAttribute(A.CONFIGURATION),this._ui.configuration=e}},{key:"source",get:function(){return this._ui.source},set:function(e){this.removeAttribute(A.SOURCE),this._ui.source=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[A.CONFIGURATION,A.SOURCE,A.MUTED,A.AUTOPLAY,A.FLUID,A.MOBILE,A.STREAM_TYPE,A.USER_IDLE_TIMEOUT,A.DVR_THRESHOLD,A.HAS_TITLE]}}]),t}(h(HTMLElement));customElements.define("theoplayer-default-ui",na);export{rc as ActiveQualityDisplay,aV as AdClickThroughButton,aH as AdCountdown,aN as AdDisplay,aW as AdSkipButton,am as AirPlayButton,A as Attribute,D as Button,ae as CastButton,ai as ChromecastButton,ah as ChromecastDisplay,tp as CloseMenuButton,S as ControlBar,na as DefaultUI,ez as DurationDisplay,r9 as ErrorDisplay,T as ExtensionSlot,rD as FullscreenButton,ax as GestureReceiver,t9 as LanguageMenu,ra as LanguageMenuButton,B as LinkButton,aP as LiveButton,a_ as LoadingIndicator,tc as MediaTrackRadioButton,e9 as Menu,tl as MenuButton,tn as MenuGroup,eE as MuteButton,ev as PlayButton,rd as PlaybackRateDisplay,rh as PlaybackRateMenu,rs as PlaybackRateMenuButton,ro as PlaybackRateRadioGroup,rQ as PreviewThumbnail,rX as PreviewTimeDisplay,rv as QualityRadioButton,r_ as QualityRadioGroup,e0 as RadioButton,e5 as RadioGroup,rF as Range,eS as SeekButton,rA as SettingsMenu,rL as SettingsMenuButton,ed as StateReceiverMixin,tT as TextTrackOffRadioButton,tf as TextTrackRadioButton,tZ as TextTrackStyleDisplay,t8 as TextTrackStyleMenu,t5 as TextTrackStyleRadioGroup,rw as TextTrackStyleResetButton,eB as TimeDisplay,r5 as TimeRange,tM as TrackRadioGroup,a6 as UIContainer,r4 as VolumeRange,I as buttonTemplate,q as linkButtonTemplate,tr as menuGroupTemplate,e7 as menuTemplate,rq as rangeTemplate,aZ as registerExtension};
1
+ import{ChromelessPlayer as e}from"theoplayer";function t(e,r){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,r)}function r(e,r){return t(e,r)}function a(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}function n(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function o(e,t,a){return(o=n()?Reflect.construct:function(e,t,a){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return a&&r(o,a.prototype),o}).apply(null,arguments)}function i(e,t,r){return o.apply(null,arguments)}function l(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){return s(e)}function p(e){var t="function"==typeof Map?new Map:void 0;return(p=function(e){var a=function(){return i(e,arguments,u(this).constructor)};if(null===e||!l(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),r(a,e)})(e)}function h(e){return p(e)}function d(e){if(Array.isArray(e))return e}function c(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(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 b(e,t){if(e){if("string"==typeof e)return m(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 m(e,t)}}function v(e,t){return d(e)||c(e)||b(e,t)||y()}function f(e,t){for(var r=e.style,a=0,n=Object.entries(t);a<n.length;a++){var o=v(n[a],2),i=o[0],l=o[1];r.setProperty(i,l)}}function g(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeShadow}function _(){return void 0!==window.ShadyCSS&&!1===window.ShadyCSS.nativeCss}function k(e,t){g()&&window.ShadyCSS.prepareTemplate(e,t)}function w(e){g()&&window.ShadyCSS.styleElement(e)}function E(e,t){_()?window.ShadyCSS.styleSubtree(e,t):null!=t&&f(e,t)}var x,A,T,C=":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}",L=document.createElement("template");L.innerHTML="<style>"+C+"</style><slot></slot>",k(L,"theoplayer-control-bar");var S=function(e){function t(){var t;return(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0}).appendChild(L.content.cloneNode(!0)),t}return a(t,e),t.prototype.connectedCallback=function(){w(this)},t}(h(HTMLElement));function P(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 M(e,t,r){return t&&P(e.prototype,t),r&&P(e,r),e}customElements.define("theoplayer-control-bar",S);var R=":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) ::slotted(img),:host(:hover) 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) ::slotted(svg),:host(:hover) 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)))}";function I(e,t){return void 0===t&&(t=""),"<style>"+R+"\n"+t+"</style>"+e}!function(e){e[e.DOWN=40]="DOWN",e[e.LEFT=37]="LEFT",e[e.RIGHT=39]="RIGHT",e[e.SPACE=32]="SPACE",e[e.ENTER=13]="ENTER",e[e.UP=38]="UP",e[e.HOME=36]="HOME",e[e.END=35]="END",e[e.ESCAPE=27]="ESCAPE"}(x||(x={})),function(e){e.CONFIGURATION="configuration",e.SOURCE="source",e.AUTOPLAY="autoplay",e.MUTED="muted",e.FULLSCREEN="fullscreen",e.FLUID="fluid",e.MOBILE="mobile",e.MOBILE_ONLY="mobile-only",e.MOBILE_HIDDEN="mobile-hidden",e.USER_IDLE="user-idle",e.USER_IDLE_TIMEOUT="user-idle-timeout",e.NO_AUTO_HIDE="no-auto-hide",e.DISABLED="disabled",e.HIDDEN="hidden",e.PAUSED="paused",e.ENDED="ended",e.VOLUME_LEVEL="volume-level",e.CASTING="casting",e.LOADING="loading",e.STREAM_TYPE="stream-type",e.LIVE="live",e.LIVE_ONLY="live-only",e.LIVE_HIDDEN="live-hidden",e.LIVE_THRESHOLD="live-threshold",e.DVR_THRESHOLD="dvr-threshold",e.REMAINING="remaining",e.REMAINING_WHEN_LIVE="remaining-when-live",e.SHOW_DURATION="show-duration",e.SEEK_OFFSET="seek-offset",e.MENU="menu",e.MENU_OPENED="menu-opened",e.MENU_CLOSE_ON_INPUT="menu-close-on-input",e.ARIA_LABEL="aria-label",e.ARIA_LIVE="aria-live",e.ARIA_CHECKED="aria-checked",e.HAS_AUDIO="has-audio",e.HAS_SUBTITLES="has-subtitles",e.HAS_ERROR="has-error",e.HAS_FIRST_PLAY="has-first-play",e.HAS_TITLE="has-title",e.CAST_STATE="cast-state",e.TRACK_TYPE="track-type",e.SHOW_OFF="show-off",e.PLAYING_AD="playing-ad",e.SHOW_AD_MARKERS="show-ad-markers",e.CLICKTHROUGH="clickthrough",e.PROPERTY="property",e.VALUE="value"}(A||(A={}));var O=document.createElement("template");O.innerHTML=I("<slot></slot>"),k(O,"theoplayer-button");var D=function(e){function t(t){(r=e.call(this)||this)._onKeyDown=function(e){if(!e.altKey)switch(e.keyCode){case x.SPACE:case x.ENTER:e.preventDefault(),r._onClick();break;default:return}},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:O;return r.attachShadow({mode:"open"}).appendChild(n.content.cloneNode(!0)),r._upgradeProperty("disabled"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"polite"),this.addEventListener("keydown",this._onKeyDown),this.addEventListener("click",this._onClick)},r.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.removeEventListener("click",this._onClick)},r.attributeChangedCallback=function(e,r,a){if(e===A.DISABLED&&a!==r){var n=null!=a;this.setAttribute("aria-disabled",n?"true":"false"),n?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}t.observedAttributes.indexOf(e)>=0&&E(this)},r.handleClick=function(){},M(t,[{key:"disabled",get:function(){return this.hasAttribute(A.DISABLED)},set:function(e){e?this.setAttribute(A.DISABLED,""):this.removeAttribute(A.DISABLED)}}],[{key:"observedAttributes",get:function(){return[A.DISABLED]}}]),t}(h(HTMLElement));customElements.define("theoplayer-button",D);var N=":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);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)}";function q(e,t){return void 0===t&&(t=""),I("<a>"+e+"</a>",N+"\n"+t)}var F=document.createElement("template");F.innerHTML=q("<slot></slot>"),k(F,"theoplayer-link-button");var B=function(e){function t(t){(r=e.call(this)||this)._onKeyDown=function(e){!e.altKey&&e.keyCode===x.SPACE&&(e.preventDefault(),r._linkEl.click())},r._onClick=function(){r.disabled||r.handleClick()};var r,a,n=null!=(a=null==t?void 0:t.template)?a:F,o=r.attachShadow({mode:"open",delegatesFocus:!0});return o.appendChild(n.content.cloneNode(!0)),r._linkEl=o.querySelector("a"),r._upgradeProperty("disabled"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"polite"),this._linkEl.addEventListener("keydown",this._onKeyDown),this._linkEl.addEventListener("click",this._onClick)},r.disconnectedCallback=function(){this._linkEl.removeEventListener("keydown",this._onKeyDown),this._linkEl.removeEventListener("click",this._onClick)},r.setLink=function(e,t){this._linkEl.href=e,this._linkEl.target=t},r.attributeChangedCallback=function(e,t,r){if(e===A.DISABLED&&r!==t){var a=null!=r;this.setAttribute("aria-disabled",a?"true":"false"),a?(this.removeAttribute("tabindex"),this.blur()):this.setAttribute("tabindex","0")}D.observedAttributes.indexOf(e)>=0&&E(this)},r.handleClick=function(){},M(t,[{key:"disabled",get:function(){return this.hasAttribute(A.DISABLED)},set:function(e){e?this.setAttribute(A.DISABLED,""):this.removeAttribute(A.DISABLED)}}],[{key:"observedAttributes",get:function(){return[A.DISABLED]}}]),t}(h(HTMLElement));function H(e){if(Array.isArray(e))return m(e)}function U(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e){return H(e)||c(e)||b(e)||U()}customElements.define("theoplayer-link-button",B);var V=":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}",G='<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',Q='<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',Y='<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';function K(e,t,r,a,n,o,i){try{var l=e[o](i),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(a,n)}function W(e){return function(){var t=this,r=arguments;return new Promise(function(a,n){var o=e.apply(t,r);function i(e){K(o,a,n,i,l,"next",e)}function l(e){K(o,a,n,i,l,"throw",e)}i(void 0)})}}function Z(e,t){var r,a,n,o,i=function(e){return function(t){return l([e,t])}},l=function(i){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(s=0)),s;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,a=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(n=(n=s.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){s.label=i[1];break}if(6===i[0]&&s.label<n[1]){s.label=n[1],n=i;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(i);break}n[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}},s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o}function j(){}function X(e){return e.nodeType===Node.ELEMENT_NODE}function J(e){return e instanceof HTMLElement}function $(e){return"slot"===e.localName.toLowerCase()}var ee="function"==typeof Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},et="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){return Array.prototype.slice.call(e)},er="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]},ea="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};function en(e,t){var r=e.indexOf(t);return!(r<0)&&(eo(e,r),!0)}function eo(e,t){e.splice(t,1)}var ei="function"==typeof String.prototype.startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return e.substring(0,t.length)===t},el="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 es(e,t){void 0===e.textContent?e.innerText=t:e.textContent=t}function eu(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;var r=t.getRootNode();return!!r.host&&eu(e,r.host)}var ep="theoplayerUiObservedProperties";function eh(e){return ep in e&&ee(e[ep])}function ed(e,t){return function(e){function r(){return e.apply(this,arguments)}return a(r,e),M(r,[{key:ep,get:function(){return t}}]),r}(e)}function ec(e,t,r){return ey.apply(this,arguments)}function ey(){return(ey=W(function(e,t,r){var a;return Z(this,function(n){switch(n.label){case 0:if(t.contains(e))return[2];if(!(e.nodeName.indexOf("-")>=0&&!eh(e)))return[3,3];return[4,Promise.resolve()];case 1:return n.sent(),[4,customElements.whenDefined(e.nodeName.toLowerCase())];case 2:n.sent(),customElements.upgrade(e),n.label=3;case 3:if(eh(e)&&r(e),!((a=z(J(e)?et(e.children):[]).concat(z(e.shadowRoot?et(e.shadowRoot.children):[]),z($(e)?e.assignedNodes().filter(X):[]))).length>0))return[3,5];return[4,Promise.all(a.map(function(e){return ec(e,t,r)}))];case 4:n.sent(),n.label=5;case 5:return[2]}})})).apply(this,arguments)}var em=document.createElement("template");em.innerHTML=I('<span part="play-icon"><slot name="play-icon">'+G+'</slot></span><span part="pause-icon"><slot name="pause-icon">'+Q+'</slot></span><span part="replay-icon"><slot name="replay-icon">'+Y+"</slot></span>",V),k(em,"theoplayer-play-button");var eb=["seeking","seeked","ended","emptied"],ev=function(e){function t(){var t;return(t=e.call(this,{template:em})||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._upgradeProperty("paused"),t._upgradeProperty("ended"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},r._updateEnded=function(){var e,t;this.ended=null!=(t=null==(e=this._player)?void 0:e.ended)&&t},r.handleClick=function(){void 0!==this._player&&(this._player.paused?this._player.play():this._player.pause())},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&(E(this),this._updateAriaLabel())},r._updateAriaLabel=function(){var e=this.ended?"replay":this.paused?"play":"pause";this.setAttribute(A.ARIA_LABEL,e)},M(t,[{key:"paused",get:function(){return this.hasAttribute(A.PAUSED)},set:function(e){e?this.setAttribute(A.PAUSED,""):this.removeAttribute(A.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(A.ENDED)},set:function(e){e?this.setAttribute(A.ENDED,""):this.removeAttribute(A.ENDED)}},{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(eb,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(eb,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.PAUSED,A.ENDED])}}]),t}(ed(D,["player"]));customElements.define("theoplayer-play-button",ev);var ef=":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}",eg='<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',e_='<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',ek='<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',ew=document.createElement("template");ew.innerHTML=I('<span part="off-icon"><slot name="off-icon">'+eg+'</slot></span><span part="low-icon"><slot name="low-icon">'+e_+'</slot></span><span part="high-icon"><slot name="high-icon">'+ek+"</slot></span>",ef),k(ew,"theoplayer-mute-button");var eE=["volumechange"],ex=function(e){function t(){var t;return(t=e.call(this,{template:ew})||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(A.VOLUME_LEVEL,e)},t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer(),this._updateAriaLabel()},r.handleClick=function(){void 0!==this._player&&(this._player.muted=!this._player.muted,this._updateFromPlayer())},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&(E(this),this._updateAriaLabel())},r._updateAriaLabel=function(){var e="off"===this.getAttribute(A.VOLUME_LEVEL)?"unmute":"mute";this.setAttribute(A.ARIA_LABEL,e)},M(t,[{key:"volumeLevel",get:function(){return this.getAttribute(A.VOLUME_LEVEL)||"off"}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(eE,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(eE,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.VOLUME_LEVEL])}}]),t}(ed(D,["player"]));customElements.define("theoplayer-mute-button",ex);var eA=':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%)}',eT='<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',eC=document.createElement("template");eC.innerHTML=I('<span part="icon"><slot name="icon">'+eT+'</slot></span><span part="offset"></span>',eA),k(eC,"theoplayer-seek-button");var eL=10,eS=function(e){function t(){var t;return(t=e.call(this,{template:eC})||this)._offsetEl=t.shadowRoot.querySelector('[part="offset"]'),t._upgradeProperty("player"),t._upgradeProperty("seekOffset"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.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)))}},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.SEEK_OFFSET&&es(this._offsetEl,String(Math.abs(this.seekOffset))),t.observedAttributes.indexOf(r)>=0&&(E(this),this._updateAriaLabel()))},r._updateAriaLabel=function(){var e=this.seekOffset;this.setAttribute(A.ARIA_LABEL,e>=0?"seek forward by "+e+" seconds":"seek backward by "+-e+" seconds")},M(t,[{key:"seekOffset",get:function(){var e;return Number(null!=(e=this.getAttribute(A.SEEK_OFFSET))?e:eL)},set:function(e){this.setAttribute(A.SEEK_OFFSET,String(e))}},{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.SEEK_OFFSET])}}]),t}(ed(D,["player"]));customElements.define("theoplayer-seek-button",eS);var eP=":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 eM(e){return!isNaN(e)&&isFinite(e)}function eR(e,t,r){void 0===t&&(t=0);var a,n=e<0||r&&0===e,o=Math.floor(t/60%60),i=Math.floor(t/3600);if(eM(e=Math.abs(e))){var l=Math.floor(e%60),s=Math.floor(e/60%60),u=Math.floor(e/3600),p=u>0||i>0;a=[p?""+u:"",(p||o>=0)&&s<10?"0"+s:""+s,l<10?"0"+l:""+l]}else a=[i>0?"--":"","--","--"];return(n?"-":"")+a.filter(function(e){return""!==e}).join(":")}var eI=[["hour","hours"],["minute","minutes"],["second","seconds"]];function eO(e,t){var r=eI[t][1===e?0:1];return e+" "+r}function eD(e,t){if(!eM(e))return"";var r=e<0||t&&0===e,a=Math.floor((e=Math.abs(e))%60),n=Math.floor(e/60)%60,o=Math.floor(e/3600);return""+[0===o?"":eO(o,0),0===n?"":eO(n,1),0===a&&(o>0||n>0)?"":eO(a,2)].filter(function(e){return""!==e}).join(", ")+(r?" remaining":"")}var eN=document.createElement("template");eN.innerHTML="<style>"+eP+"</style><span></span>",k(eN,"theoplayer-time-display");var eq=["timeupdate","seeking","seeked","durationchange"],eF="video not loaded, unknown time",eB=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,n=t._player?t._player.currentTime:0,o=t._player?t._player.duration:NaN,i=null==(e=t._player)?void 0:e.seekable,l=isFinite(o)?o:i&&i.length>0?i.end(0):NaN,s=t.hasAttribute(A.REMAINING)||t.hasAttribute(A.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType,u=n;s&&(u=-((l||0)-n));var p=t.hasAttribute(A.SHOW_DURATION);r=p&&!s?eR(u,l,s)+" / "+eR(l):eR(u,l,s),a=isNaN(o)?eF:p?eD(u,s)+" of "+eD(l):eD(u,s),es(t._spanEl,r),t.setAttribute("aria-valuetext",a)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(eN.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"off"),this._updateFromPlayer()},r.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._updateFromPlayer(),E(this))},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(eq,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(eq,this._updateFromPlayer))}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return[A.REMAINING,A.REMAINING_WHEN_LIVE,A.SHOW_DURATION,A.STREAM_TYPE]}}]),t}(ed(HTMLElement,["player","streamType"]));customElements.define("theoplayer-time-display",eB);var eH=document.createElement("template");eH.innerHTML="<style>"+eP+"</style><span></span>",k(eH,"theoplayer-duration-display");var eU=["durationchange"],ez=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e=eR(t._player?t._player.duration:NaN);es(t._spanEl,e)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(eH.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.ARIA_LIVE)||this.setAttribute(A.ARIA_LIVE,"off"),this._updateFromPlayer()},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(eU,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(eU,this._updateFromPlayer))}}]),t}(ed(HTMLElement,["player"]));function eV(){return(eV=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)}function eG(){return eV.apply(this,arguments)}function eQ(){try{var e=new Event("change");return"change"===e.type}catch(e){}return!1}function eY(){try{var e=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}function eK(e,t){return new Event(e,t)}function eW(e,t){return new CustomEvent(e,t)}function eZ(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 ej(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}customElements.define("theoplayer-duration-display",ez);var eX=eQ()?eK:eZ,eJ=eY()?eW:ej,e$=document.createElement("template");e$.innerHTML=I("<slot></slot>"),k(e$,"theoplayer-radio-button");var e0=function(e){function t(t){var r;return(r=e.call(this,eG({template:e$},t))||this)._value=void 0,r._upgradeProperty("checked"),r}a(t,e);var r=t.prototype;return r.connectedCallback=function(){this.hasAttribute("role")||this.setAttribute("role","radio"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),e.prototype.connectedCallback.call(this)},r.handleClick=function(){this.checked=!0,this.dispatchEvent(eX("input",{bubbles:!0,composed:!0}))},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.ARIA_CHECKED?this.dispatchEvent(eX("change",{bubbles:!0})):r===A.VALUE&&(this.value=n),t.observedAttributes.indexOf(r)>=0&&E(this))},M(t,[{key:"checked",get:function(){return"true"===this.getAttribute(A.ARIA_CHECKED)},set:function(e){this.setAttribute(A.ARIA_CHECKED,e?"true":"false")}},{key:"value",get:function(){return this._value},set:function(e){this._value=e}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.ARIA_CHECKED,A.VALUE])}}]),t}(D);customElements.define("theoplayer-radio-button",e0);var e1=document.createElement("template");e1.innerHTML="<slot></slot>",k(e1,"theoplayer-radio-group");var e5=function(e){function t(){(t=e.call(this)||this)._radioButtons=[],t._onSlotChange=function(){for(var e,r=t._slot.assignedNodes({flatten:!0}).filter(X),a=0;a<r.length;a++){var n=r[a];if(!e2(n)){var o=n.nodeName.toLowerCase();o.indexOf("-")>=0&&(customElements.get(o)?customElements.upgrade(n):customElements.whenDefined(o).then(t._onSlotChange,j))}}t._radioButtons=r.filter(e2),t.focusedRadioButton||null==(e=t.firstRadioButton)||e.setAttribute("tabindex","0")},t._onKeyDown=function(e){switch(e.keyCode){case x.UP:case x.LEFT:e.preventDefault(),t._focusPrevButton();break;case x.DOWN:case x.RIGHT:e.preventDefault(),t._focusNextButton();break;case x.HOME:e.preventDefault(),t.setFocusedRadioButton(t.firstRadioButton);break;case x.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(e1.content.cloneNode(!0)),t._slot=r.querySelector("slot"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(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()},r.disconnectedCallback=function(){this.removeEventListener("keydown",this._onKeyDown),this.shadowRoot.removeEventListener("change",this._onButtonChange),this._slot.removeEventListener("slotchange",this._onSlotChange)},r.allRadioButtons=function(){return this._radioButtons},r._prevRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>0?this._radioButtons[t-1]:null},r._nextRadioButton=function(e){var t=this._radioButtons.indexOf(e);return t>=0&&t<this._radioButtons.length-1?this._radioButtons[t+1]:null},r._focusPrevButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;e&&(e===this.firstRadioButton?this.setFocusedRadioButton(this.lastRadioButton):this.setFocusedRadioButton(this._prevRadioButton(e)))},r._focusNextButton=function(){var e=this.focusedRadioButton||this.firstRadioButton;e&&(e===this.lastRadioButton?this.setFocusedRadioButton(this.firstRadioButton):this.setFocusedRadioButton(this._nextRadioButton(e)))},r.setFocusedRadioButton=function(e){this._unfocusAll(),e&&(e.tabIndex=0,e.focus())},r._unfocusAll=function(){for(var e=0,t=this.allRadioButtons();e<t.length;e++)t[e].tabIndex=-1},r.setCheckedRadioButton=function(e){for(var t=0,r=this.allRadioButtons();t<r.length;t++){var a=r[t];a.checked=a===e}this.dispatchEvent(eX("change",{bubbles:!0}))},M(t,[{key:"focusedRadioButton",get:function(){var e;return null!=(e=er(this._radioButtons,function(e){return 0===e.tabIndex}))?e:null}},{key:"checkedRadioButton",get:function(){var e;return null!=(e=er(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}(h(HTMLElement));function e2(e){return e instanceof e0}customElements.define("theoplayer-radio-group",e5);var e3=":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}",e4="theoplayermenuclose",e8="theoplayermenuchange";function e7(e,t,r){return void 0===r&&(r=""),"<style>"+e3+r+'</style><div part="heading"><theoplayer-menu-close-button></theoplayer-menu-close-button>'+e+'</div><div part="content">'+t+"</div>"}var e6=document.createElement("template");e6.innerHTML=e7('<slot name="heading"></slot>',"<slot></slot>"),k(e6,"theoplayer-menu");var e9=function(e){function t(t){(r=e.call(this)||this)._onContentInput=function(){if(r.hasAttribute(A.MENU_CLOSE_ON_INPUT)){var e=eJ(e4,{bubbles:!0,composed:!0});r.dispatchEvent(e)}};var r,a,n=null!=(a=null==t?void 0:t.template)?a:e6,o=r.attachShadow({mode:"open",delegatesFocus:!0});return o.appendChild(n.content.cloneNode(!0)),r._contentEl=o.querySelector('[part="content"]'),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.MENU_OPENED)||this.setAttribute("hidden",""),this._contentEl.addEventListener("input",this._onContentInput)},r.disconnectedCallback=function(){this._contentEl.removeEventListener("input",this._onContentInput)},r.openMenu=function(){this.setAttribute(A.MENU_OPENED,"")},r.closeMenu=function(){this.removeAttribute(A.MENU_OPENED)},r.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===A.MENU_OPENED){null!=a?this.removeAttribute("hidden"):this.setAttribute("hidden","");var n=eJ(e8,{bubbles:!0});this.dispatchEvent(n)}t.observedAttributes.indexOf(e)>=0&&E(this)}},M(t,null,[{key:"observedAttributes",get:function(){return[A.MENU_OPENED,A.MENU_CLOSE_ON_INPUT]}}]),t}(h(HTMLElement));customElements.define("theoplayer-menu",e9);var te=":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}",tt="theoplayermenutoggle";function tr(e,t){return void 0===t&&(t=""),"<style>"+te+t+"</style>"+e}var ta=document.createElement("template");ta.innerHTML=tr("<slot></slot>"),k(ta,"theoplayer-menu-group");var tn=function(e){function t(r){(a=e.call(this)||this)._menus=[],a._openMenuStack=[],a._onMenuListChange=function(){for(var e=z(et(a.shadowRoot.children)).concat(z(a._menuSlot?a._menuSlot.assignedNodes({flatten:!0}).filter(X):[])),t=0;t<e.length;t++){var r=e[t];if(!to(r)){var n=r.nodeName.toLowerCase();n.indexOf("-")>=0&&(customElements.get(n)?customElements.upgrade(r):customElements.whenDefined(n).then(a._onMenuListChange,j))}}for(var o=e.filter(to),i=0,l=a._menus;i<l.length;i++){var s=l[i];0>o.indexOf(s)&&a.closeMenu(s.id)}for(var u=0;u<o.length;u++){var p=o[u];0>a._menus.indexOf(p)&&p.closeMenu()}a._menus=o},a._onToggleMenu=function(e){var t=e.detail.menu;if(a.getMenuById(t)){e.stopPropagation();var r=J(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&&e.keyCode===x.ESCAPE&&a.closeCurrentMenu()&&(e.preventDefault(),e.stopPropagation())};var a,n,o=null!=(n=null==r?void 0:r.template)?n:ta,i=a.attachShadow({mode:"open",delegatesFocus:!0});return i.appendChild(o.content.cloneNode(!0)),a._menuSlot=i.querySelector("slot"),a}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){var e;w(this),this.hasAttribute(A.MENU_OPENED)||this.setAttribute("hidden",""),this._onMenuListChange(),this.shadowRoot.addEventListener(tt,this._onToggleMenu),this.shadowRoot.addEventListener(e4,this._onCloseMenu),this.shadowRoot.addEventListener(e8,this._onMenuChange),null==(e=this._menuSlot)||e.addEventListener("slotchange",this._onMenuListChange)},r.disconnectedCallback=function(){var e;this.shadowRoot.removeEventListener(tt,this._onToggleMenu),this.shadowRoot.removeEventListener(e4,this._onCloseMenu),this.shadowRoot.removeEventListener(e8,this._onMenuChange),null==(e=this._menuSlot)||e.removeEventListener("slotchange",this._onMenuListChange)},r.attributeChangedCallback=function(e,r,a){if(a!==r){if(e===A.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 n=eJ(e8,{bubbles:!0});this.dispatchEvent(n)}t.observedAttributes.indexOf(e)>=0&&E(this)}},r.getMenuById=function(e){return e&&e!==this.id?er(this._menus,function(t){return t.id===e}):this},r.openMenu=function(e,t){var r=this.getMenuById(e);if(r===this&&(r=this._menus[0]),!r)return!1;var a=this.getCurrentMenu_(),n=ea(this._openMenuStack,function(e){return e.menu===r});return n>=0?this.closeMenusFromIndex_(n+1):this._openMenuStack.push({menu:r,opener:t}),a&&a.menu.closeMenu(),r.openMenu(),this.setAttribute(A.MENU_OPENED,""),r.focus(),!0},r.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 n=ea(this._openMenuStack,function(e){return e.menu===a});if(n<0)return!1;var o=this._openMenuStack[n];this.closeMenusFromIndex_(n);var i=this.getCurrentMenu_();return void 0!==i?(i.menu.openMenu(),this.setAttribute(A.MENU_OPENED,""),o.opener&&i.menu.contains(o.opener)?o.opener.focus():i.menu.focus(),!0):(this.removeAttribute(A.MENU_OPENED),null==(t=o.opener)||t.focus(),!0)},r.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)},r.hasCurrentMenu=function(){return this._openMenuStack.length>0},r.getCurrentMenu_=function(){return this._openMenuStack.length>0?this._openMenuStack[this._openMenuStack.length-1]:void 0},r.closeCurrentMenu=function(){var e=this.getCurrentMenu_();return void 0!==e&&(this.closeMenu(e.menu.id),!0)},r.isMenuOpen=function(e){var t=this.getMenuById(e);return!!t&&this._openMenuStack.some(function(e){return e.menu===t})},M(t,null,[{key:"observedAttributes",get:function(){return[A.MENU_OPENED]}}]),t}(h(HTMLElement));function to(e){return!!J(e)&&(e instanceof e9||e instanceof tn)}customElements.define("theoplayer-menu-group",tn);var ti=document.createElement("template");ti.innerHTML=I("<slot></slot>"),k(ti,"theoplayer-menu-button");var tl=function(e){function t(t){var r;return(r=e.call(this,eG({template:ti},t))||this)._upgradeProperty("menu"),r}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute("aria-haspopup")||this.setAttribute("aria-haspopup","true")},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t!==A.MENU||this.hasAttribute("aria-controls")&&this.getAttribute("aria-controls")!==r||this.setAttribute("aria-controls",a)},r.handleClick=function(){var e=this.menu;if(e){var t=eJ(tt,{bubbles:!0,composed:!0,detail:{menu:e}});this.dispatchEvent(t)}},M(t,[{key:"menu",get:function(){return this.getAttribute(A.MENU)},set:function(e){e?this.setAttribute(A.MENU,e):this.removeAttribute(A.MENU)}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.MENU])}}]),t}(D);customElements.define("theoplayer-menu-button",tl);var ts='<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',tu=document.createElement("template");tu.innerHTML=I('<span part="icon"><slot>'+ts+"</slot></span>"),k(tu,"theoplayer-menu-close-button");var tp=function(e){function t(){return e.call(this,{template:tu})}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"close menu")},r.handleClick=function(){var e=eJ(e4,{bubbles:!0,composed:!0});this.dispatchEvent(e)},M(t,null,[{key:"observedAttributes",get:function(){return z(D.observedAttributes)}}]),t}(D);customElements.define("theoplayer-menu-close-button",tp);var th=document.createElement("template");th.innerHTML=I("<slot></slot>"),k(th,"theoplayer-media-track-radio-button");var td=["change","update"],tc=function(e){function t(){var t;return(t=e.call(this,{template:th})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(t,e);var r=t.prototype;return r._updateFromTrack=function(){es(this._slotEl,this._track?ty(this._track):""),this.checked=!!this._track&&this._track.enabled},r._updateTrack=function(){this._track&&(this._track.enabled=this.checked)},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===A.ARIA_CHECKED&&r!==a&&this._updateTrack()},M(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(td,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(td,this._onTrackChange))}}]),t}(e0);function ty(e){var t=e.label;if(t)return t;var r=e.language;return r&&(el(r)||r)||""}customElements.define("theoplayer-media-track-radio-button",tc);var tm=":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}",tb=document.createElement("template");tb.innerHTML=I("<slot></slot>"),k(tb,"theoplayer-text-track-radio-button");var tv=["change","update"],tf=function(e){function t(){var t;return(t=e.call(this,{template:tb})||this)._track=void 0,t._onTrackChange=function(){t._updateFromTrack()},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t}a(t,e);var r=t.prototype;return r._updateFromTrack=function(){es(this._slotEl,this._track?tg(this._track):""),this.checked=!!this._track&&"showing"===this._track.mode},r._updateTrack=function(){this._track&&(this._track.mode=this.checked?"showing":"disabled")},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===A.ARIA_CHECKED&&r!==a&&this._updateTrack()},M(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(tv,this._onTrackChange),this._track=e,this._updateFromTrack(),e&&e.addEventListener(tv,this._onTrackChange))}}]),t}(e0);function tg(e){var t=e.label;if(t)return t;var r=e.language;return r&&(el(r)||r)||""}function t_(e){return"subtitles"===e.kind||"captions"===e.kind}function tk(e){var t=null==e?void 0:e.targetQuality;return void 0===t||Array.isArray(t)||(t=[t]),t}function tw(e){return e?e.label&&""!==e.label?e.label:e.height?""+e.height+"p":e.bandwidth?tE(e):void 0:void 0}function tE(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"}customElements.define("theoplayer-text-track-radio-button",tf);var tx=document.createElement("template");tx.innerHTML=I("<slot>Off</slot>"),k(tx,"theoplayer-text-track-off-radio-button");var tA=["change"],tT=function(e){function t(){var t;return(t=e.call(this,{template:tx})||this)._trackList=void 0,t._onTrackChange=function(){t._updateFromTrackList()},t._upgradeProperty("trackList"),t}a(t,e);var r=t.prototype;return r._updateFromTrackList=function(){this.checked=!this._trackList||!tC(this._trackList)},r._updateTrackList=function(){this._trackList&&this.checked&&tL(this._trackList)},r.attributeChangedCallback=function(t,r,a){e.prototype.attributeChangedCallback.call(this,t,r,a),t===A.ARIA_CHECKED&&r!==a&&this._updateTrackList()},M(t,[{key:"trackList",get:function(){return this._trackList},set:function(e){this._trackList&&this._trackList.removeEventListener(tA,this._onTrackChange),this._trackList=e,this._updateFromTrackList(),e&&e.addEventListener(tA,this._onTrackChange)}}]),t}(e0);function tC(e){return e.filter(t_).some(function(e){return"showing"===e.mode})}function tL(e){for(var t=0;t<e.length;t++){var r=e[t];t_(r)&&"showing"===r.mode&&(r.mode="disabled")}}customElements.define("theoplayer-text-track-off-radio-button",tT);var tS=document.createElement("template");tS.innerHTML="<style>"+tm+"</style><theoplayer-radio-group></theoplayer-radio-group>",k(tS,"theoplayer-track-radio-group");var tP=["addtrack","removetrack"],tM=function(e){function t(){(t=e.call(this)||this)._updateTracks=function(){var e=et(t._radioGroup.children),r=t._getTracks();void 0!==t._offButton&&(e=e.slice(1));for(var a=0;a<e.length;a++){var n=e[a];(!n.track||0>r.indexOf(n.track))&&t._radioGroup.removeChild(n)}for(var o=0;o<r.length;o++){var i=r[o];if(!tR(e,i)){var l=t._createTrackButton(i);t._radioGroup.appendChild(l)}}},t._onChange=function(){t.dispatchEvent(eX("change",{bubbles:!0}))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(tS.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("trackType"),t._upgradeProperty("showOffButton"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._updateOffButton(),this._updateTracks(),this.shadowRoot.addEventListener("change",this._onChange)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},r._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}},r._updateTracksList=function(){var e=this._tracksList,t=this._getTracksList();e!==t&&(null==e||e.removeEventListener(tP,this._updateTracks),null==t||t.addEventListener(tP,this._updateTracks),this._tracksList=t,this._updateOffButton())},r._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(t_):[]},r._createTrackButton=function(e){if("subtitles"===this.trackType){var t=new tf;return t.track=e,t}var r=new tc;return r.track=e,r},r._updateOffButton=function(){"subtitles"===this.trackType&&this.showOffButton?(void 0===this._offButton&&(this._offButton=new tT,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)},r.attributeChangedCallback=function(e,r,a){a!==r&&(e===A.TRACK_TYPE?(this._updateTracksList(),this._updateTracks()):e===A.SHOW_OFF&&(this._updateOffButton(),this._updateTracks()),t.observedAttributes.indexOf(e)>=0&&E(this))},M(t,[{key:"trackType",get:function(){return this.getAttribute(A.TRACK_TYPE)||"audio"},set:function(e){this.setAttribute(A.TRACK_TYPE,e||"audio")}},{key:"showOffButton",get:function(){return this.hasAttribute(A.SHOW_OFF)},set:function(e){e?this.setAttribute(A.SHOW_OFF,""):this.removeAttribute(A.SHOW_OFF)}},{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[A.TRACK_TYPE,A.SHOW_OFF]}}]),t}(ed(HTMLElement,["player"]));function tR(e,t){for(var r=0;r<e.length;r++)if(e[r].track===t)return!0;return!1}customElements.define("theoplayer-track-radio-group",tM);var tI='<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>',tO=".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}",tD='<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>',tN=".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}",tq=".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 tF(e){var t=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i);return t?{r_:parseInt(t[1],16),g_:parseInt(t[2],16),b_:parseInt(t[3],16),a_:1}:null}function tB(e){var t=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)$/i);return t?{r_:parseInt(t[1],10),g_:parseInt(t[2],10),b_:parseInt(t[3],10),a_:t[4]?parseFloat(t[4]):1}:null}function tH(e){return e?ei(e,"rgb")?tB(e):ei(e,"#")?tF(e):null:null}function tU(e){return"rgba("+e.r_+","+e.g_+","+e.b_+","+e.a_+")"}function tz(e){return"rgb("+e.r_+","+e.g_+","+e.b_+")"}function tV(e,t){return{r_:e.r_,g_:e.g_,b_:e.b_,a_:t}}function tG(e,t){return e.r_===t.r_&&e.g_===t.g_&&e.b_===t.b_}var tQ=tH("#ffffff"),tY=tH("#000000"),tK=[["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)"]],tW=[["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']],tZ=[["None","none"],["Drop shadow","dropshadow"],["Raised","raised"],["Depressed","depressed"],["Uniform","uniform"]],tj=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){if(void 0!==t._player){var e=t.property;switch(e){case"fontFamily":es(t._spanEl,tX(t._player.textTrackStyle.fontFamily));break;case"fontColor":case"backgroundColor":case"windowColor":es(t._spanEl,tJ(t._player.textTrackStyle[e]));break;case"fontOpacity":es(t._spanEl,t$(t._player.textTrackStyle.fontColor));break;case"backgroundOpacity":es(t._spanEl,t$(t._player.textTrackStyle.backgroundColor));break;case"windowOpacity":es(t._spanEl,t$(t._player.textTrackStyle.windowColor));break;case"edgeStyle":es(t._spanEl,t0(t._player.textTrackStyle.edgeStyle));break;default:var r=t._player.textTrackStyle[e];es(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}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this),this.hasAttribute(A.PROPERTY)||(this.property="fontColor")},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.attributeChangedCallback=function(e,r,a){a!==r&&(e===A.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&E(this))},M(t,[{key:"property",get:function(){return this.getAttribute(A.PROPERTY)},set:function(e){this.setAttribute(A.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[A.PROPERTY]}}]),t}(ed(HTMLElement,["player"]));function tX(e){if(!e)return"Default";var t=er(tW,function(t){var r=v(t,2);return r[0],r[1]===e});return t?t[0]:"Custom"}function tJ(e){if(!e)return"Default";var t=tH(e);if(t){var r=tz(t),a=er(tK,function(e){var t=v(e,2);return t[0],t[1]===r});if(a)return a[0]}return"Custom"}function t$(e){if(!e)return"Default";var t=tH(e);return t?""+100*t.a_+"%":"Custom"}function t0(e){if(!e)return"Default";var t=er(tZ,function(t){var r=v(t,2);return r[0],r[1]===e});return t?t[0]:"Custom"}customElements.define("theoplayer-text-track-style-display",tj);var t1=document.createElement("template");t1.innerHTML="<style>"+tm+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",k(t1,"theoplayer-text-track-style-radio-group");var t5=function(e){function t(){(t=e.call(this)||this)._updateChecked=function(){for(var e=t._radioGroup.allRadioButtons(),r=0;r<e.length;r++){var a=e[r];a.checked=a.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?tz(null!=(r=tH(a))?r:tQ):"";break;case"backgroundColor":var n,o=t._player.textTrackStyle.backgroundColor;t.value=o?tz(null!=(n=tH(o))?n:tY):"";break;case"windowColor":var i,l=t._player.textTrackStyle.windowColor;t.value=l?tz(null!=(i=tH(l))?i:tY):"";break;case"fontOpacity":var s,u,p=t._player.textTrackStyle.fontColor;t.value=p?String((null!=(u=null==(s=tH(p))?void 0:s.a_)?u:1)*100):"";break;case"backgroundOpacity":var h,d,c=t._player.textTrackStyle.backgroundColor;t.value=c?String((null!=(d=null==(h=tH(c))?void 0:h.a_)?d:1)*100):"";break;case"windowOpacity":var y,m,b=t._player.textTrackStyle.windowColor;t.value=b?String((null!=(m=null==(y=tH(b))?void 0:y.a_)?m:1)*100):"";break;default:t.value=null!=(e=t._player.textTrackStyle[t.property])?e:""}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(t1.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._upgradeProperty("property"),this._upgradeProperty("value"),this._upgradeProperty("player"),this.hasAttribute(A.PROPERTY)||(this.property="fontColor"),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r._updateToPlayer=function(){if(void 0!==this._player)switch(this.property){case"fontColor":this._player.textTrackStyle.fontColor=t2(this.value,this._player.textTrackStyle.fontColor,tQ);break;case"backgroundColor":this._player.textTrackStyle.backgroundColor=t2(this.value,this._player.textTrackStyle.backgroundColor,tY);break;case"windowColor":this._player.textTrackStyle.windowColor=t2(this.value,this._player.textTrackStyle.windowColor,tY);break;case"fontOpacity":this._player.textTrackStyle.fontColor=t3(this.value,this._player.textTrackStyle.fontColor,tQ);break;case"backgroundOpacity":this._player.textTrackStyle.backgroundColor=t3(this.value,this._player.textTrackStyle.backgroundColor,tY);break;case"windowOpacity":this._player.textTrackStyle.windowColor=t3(this.value,this._player.textTrackStyle.windowColor,tY);break;default:this._player.textTrackStyle[this.property]=""==this.value?void 0:this.value}},r.attributeChangedCallback=function(e,r,a){a!==r&&(e===A.PROPERTY&&this._updateFromPlayer(),t.observedAttributes.indexOf(e)>=0&&E(this))},M(t,[{key:"property",get:function(){return this.getAttribute(A.PROPERTY)},set:function(e){this.setAttribute(A.PROPERTY,e)}},{key:"value",get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this._updateToPlayer(),this._updateChecked(),this.dispatchEvent(eX("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[A.PROPERTY]}}]),t}(ed(HTMLElement,["player"]));function t2(e,t,r){var a,n,o,i=null!=(n=null==(a=tH(t))?void 0:a.a_)?n:1;if(""!==e||1!==i)return tU(tV(null!=(o=tH(e))?o:r,i))}function t3(e,t,r){var a,n=null!=(a=tH(t))?a:r;if(!(""===e&&tG(n,r)))return tU(tV(n,""==e?1:Number(e)/100))}customElements.define("theoplayer-text-track-style-radio-group",t5);var t4=document.createElement("template");t4.innerHTML=tr(tD,tq+"\n"+tN),k(t4,"theoplayer-text-track-style-menu");var t8=function(e){function t(){return e.call(this,{template:t4})}return a(t,e),t}(tn);customElements.define("theoplayer-text-track-style-menu",t8);var t7=document.createElement("template");t7.innerHTML=tr(tI,tO),k(t7,"theoplayer-language-menu");var t6=["addtrack","removetrack"],t9=function(e){function t(){var t;return(t=e.call(this,{template:t7})||this)._updateAudioTracks=function(){var e,r;(null!=(r=null==(e=t._player)?void 0:e.audioTracks)?r:[]).length<2?t.removeAttribute(A.HAS_AUDIO):t.setAttribute(A.HAS_AUDIO,"")},t._updateTextTracks=function(){var e,r;0===(null!=(r=null==(e=t._player)?void 0:e.textTracks.filter(t_))?r:[]).length?t.removeAttribute(A.HAS_SUBTITLES):t.setAttribute(A.HAS_SUBTITLES,"")},t._upgradeProperty("player"),t}return a(t,e),t.prototype.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&E(this)},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(t6,this._updateAudioTracks),this._player.textTracks.removeEventListener(t6,this._updateTextTracks)),this._player=e,this._updateAudioTracks(),this._updateTextTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(t6,this._updateAudioTracks),this._player.textTracks.addEventListener(t6,this._updateTextTracks)))}}],[{key:"observedAttributes",get:function(){return z(tn.observedAttributes).concat([A.HAS_AUDIO,A.HAS_SUBTITLES])}}]),t}(ed(tn,["player"]));customElements.define("theoplayer-language-menu",t9);var re='<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',rt=document.createElement("template");rt.innerHTML=I('<span part="icon"><slot>'+re+"</slot></span>"),k(rt,"theoplayer-language-menu-button");var rr=["addtrack","removetrack"],ra=function(e){function t(){var t;return(t=e.call(this,{template:rt})||this)._updateTracks=function(){void 0!==t._player&&(t._player.audioTracks.length>=2||t._player.textTracks.some(t_))?t.removeAttribute("hidden"):t.setAttribute("hidden","")},t._upgradeProperty("player"),t}return a(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"open language menu")},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.audioTracks.removeEventListener(rr,this._updateTracks),this._player.textTracks.removeEventListener(rr,this._updateTracks)),this._player=e,this._updateTracks(),void 0!==this._player&&(this._player.audioTracks.addEventListener(rr,this._updateTracks),this._player.textTracks.addEventListener(rr,this._updateTracks)))}}]),t}(ed(tl,["player"]));customElements.define("theoplayer-language-menu-button",ra);var rn=document.createElement("template");rn.innerHTML="<style>"+tm+"</style><theoplayer-radio-group><slot></slot></theoplayer-radio-group>",k(rn,"theoplayer-playback-rate-radio-group");var ro=function(e){function t(){(t=e.call(this)||this)._value=1,t._updateChecked=function(){for(var e=t._radioGroup.allRadioButtons(),r=0;r<e.length;r++){var a=e[r];a.checked=Number(a.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(rn.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._optionsSlot=r.querySelector("slot"),t._upgradeProperty("value"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._updateChecked(),this.shadowRoot.addEventListener("change",this._onChange),this._optionsSlot.addEventListener("slotchange",this._updateChecked)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange),this._optionsSlot.removeEventListener("slotchange",this._updateChecked)},M(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(eX("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}(ed(HTMLElement,["player"]));customElements.define("theoplayer-playback-rate-radio-group",ro);var ri='<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',rl=document.createElement("template");rl.innerHTML=I('<span part="icon"><slot>'+ri+"</slot></span>"),k(rl,"theoplayer-playback-rate-button");var rs=function(e){function t(){return e.call(this,{template:rl})}return a(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"open playback speed menu")},t}(tl);customElements.define("theoplayer-playback-rate-menu-button",rs);var ru='<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>',rp=document.createElement("template");rp.innerHTML=e7('<span slot="heading"><slot name="heading">Playback speed</slot></span>',ru),k(rp,"theoplayer-playback-rate-menu");var rh=function(e){function t(){return e.call(this,{template:rp})}return a(t,e),t}(e9);customElements.define("theoplayer-playback-rate-menu",rh);var rd=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}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this)},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},M(t,[{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){this._playbackRate=e,es(this._spanEl,1===e?"Normal":""+e+"x")}}]),t}(ed(HTMLElement,["playbackRate"]));customElements.define("theoplayer-playback-rate-display",rd);var rc=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}a(t,e);var r=t.prototype;return r.connectedCallback=function(){w(this)},r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.update_=function(){var e=void 0!==this._targetVideoQualities&&1===this._targetVideoQualities.length,t=e?this._targetVideoQualities[0]:void 0,r=tw(null!=t?t:this._activeVideoQuality);es(this._spanEl,e?null!=r?r:"Unknown":"Automatic"+(r?" ("+r+")":""))},M(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}(ed(HTMLElement,["activeVideoQuality","targetVideoQualities"]));customElements.define("theoplayer-active-quality-display",rc);var ry=document.createElement("template");ry.innerHTML=I("<slot></slot>"),k(ry,"theoplayer-quality-radio-button");var rm=["activequalitychanged","targetqualitychanged"],rb=["update"],rv=function(e){function t(){var t;return(t=e.call(this,{template:ry})||this)._track=void 0,t._quality=void 0,t._updateFromTrack=function(){if(void 0!==t._track){var e=t._track.targetQuality;void 0===t._quality?t.checked=void 0===e:t.checked=Array.isArray(e)?e.indexOf(t._quality)>=0:e===t._quality}t._updateFromQuality()},t._updateFromQuality=function(){var e;es(t._slotEl,null!=(e=tw(t._quality))?e:"Automatic")},t._slotEl=t.shadowRoot.querySelector("slot"),t._upgradeProperty("track"),t._upgradeProperty("quality"),t}a(t,e);var r=t.prototype;return r._updateTargetQuality=function(){this._track&&this.checked&&(this._track.targetQuality=this._quality)},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.ARIA_CHECKED&&this._updateTargetQuality(),t.observedAttributes.indexOf(r)>=0&&E(this))},M(t,[{key:"track",get:function(){return this._track},set:function(e){this._track!==e&&(this._track&&this._track.removeEventListener(rm,this._updateFromTrack),this._track=e,this._updateFromTrack(),e&&e.addEventListener(rm,this._updateFromTrack))}},{key:"quality",get:function(){return this._quality},set:function(e){this._quality!==e&&(this._quality&&this._quality.removeEventListener(rb,this._updateFromQuality),this._quality=e,this._updateFromTrack(),e&&e.addEventListener(rb,this._updateFromQuality))}}]),t}(e0);customElements.define("theoplayer-quality-radio-button",rv);var rf=document.createElement("template");rf.innerHTML="<style>"+tm+"</style><theoplayer-radio-group></theoplayer-radio-group>",k(rf,"theoplayer-quality-radio-group");var rg=["addtrack","removetrack","change"],r_=function(e){function t(){(t=e.call(this)||this)._onChange=function(){t.dispatchEvent(eX("change",{bubbles:!0}))},t._updateTrack=function(){var e=t._player?er(t._player.videoTracks,function(e){return e.enabled}):void 0;t._track!==e&&(t._track=e,t._update())},t._update=function(){for(var e=et(t._radioGroup.children),r=t._track?t._track.qualities:[],a=1===r.length?[void 0]:[void 0].concat(z(r)),n=0;n<e.length&&n<a.length;){var o=e[n];o.track=t._track,o.quality=a[n],n++}for(;n<e.length;)t._radioGroup.removeChild(e[n]),n++;for(;n<a.length;){var i=new rv;i.track=t._track,i.quality=a[n],t._radioGroup.appendChild(i),n++}};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rf.content.cloneNode(!0)),t._radioGroup=r.querySelector("theoplayer-radio-group"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._radioGroup instanceof e5||customElements.upgrade(this._radioGroup),this._updateTrack(),this.shadowRoot.addEventListener("change",this._onChange)},r.disconnectedCallback=function(){this.shadowRoot.removeEventListener("change",this._onChange)},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.videoTracks.removeEventListener(rg,this._updateTrack),this._player=e,this._updateTrack(),void 0!==this._player&&this._player.videoTracks.addEventListener(rg,this._updateTrack))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-quality-radio-group",r_);var rk=document.createElement("template");rk.innerHTML=I("<slot>Reset</slot>"),k(rk,"theoplayer-text-track-style-reset-button");var rw=function(e){function t(){return e.call(this,{template:rk})}return a(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}},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player=e}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes)}}]),t}(ed(D,["player"]));customElements.define("theoplayer-text-track-style-reset-button",rw);var rE='<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>',rx=document.createElement("template");rx.innerHTML=tr(rE,tq),k(rx,"theoplayer-settings-menu");var rA=function(e){function t(){return e.call(this,{template:rx})}return a(t,e),t}(tn);customElements.define("theoplayer-settings-menu",rA);var rT='<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',rC=document.createElement("template");rC.innerHTML=I('<span part="icon"><slot>'+rT+"</slot></span>"),k(rC,"theoplayer-settings-menu-button");var rL=function(e){function t(){return e.call(this,{template:rC})}return a(t,e),t.prototype.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"open settings menu")},t}(tl);customElements.define("theoplayer-settings-menu-button",rL);var rS=":host(:not([fullscreen])) [part=exit-icon],:host([fullscreen]) [part=enter-icon]{display:none!important}",rP='<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',rM='<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',rR="theoplayerfullscreenenter",rI="theoplayerfullscreenexit",rO=document.createElement("template");rO.innerHTML=I('<span part="enter-icon"><slot name="enter-icon">'+rP+'</slot></span><span part="exit-icon"><slot name="exit-icon">'+rM+"</slot></span>",rS),k(rO,"theoplayer-fullscreen-button");var rD=function(e){function t(){var t;return(t=e.call(this,{template:rO})||this)._upgradeProperty("fullscreen"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.handleClick=function(){if(this.fullscreen){var e=eJ(rI,{bubbles:!0,composed:!0});this.dispatchEvent(e)}else{var t=eJ(rR,{bubbles:!0,composed:!0});this.dispatchEvent(t)}},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&(E(this),this._updateAriaLabel())},r._updateAriaLabel=function(){var e=this.fullscreen?"exit fullscreen":"enter fullscreen";this.setAttribute(A.ARIA_LABEL,e)},M(t,[{key:"fullscreen",get:function(){return this.hasAttribute(A.FULLSCREEN)},set:function(e){e?this.setAttribute(A.FULLSCREEN,""):this.removeAttribute(A.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.FULLSCREEN])}}]),t}(ed(D,["fullscreen"]));customElements.define("theoplayer-fullscreen-button",rD);var rN=":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:calc(24px + var(--theoplayer-range-padding)*2);height:calc(var(--theoplayer-control-height, 24px) + var(--theoplayer-range-padding)*2);padding-left:var(--theoplayer-range-padding-left,var(--theoplayer-range-padding));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}",rq=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=ea(this._stops,function(e){return t<=v(e,2)[1]});if(!(a<0)){var n=v(this._stops[a],2),o=n[0],i=n[1],l=[];if(t>0&&l.push([o,t]),l.push([e,r]),r<i)l.push([o,i]),(s=this._stops).splice.apply(s,[a,1].concat(z(l)));else{for(var s,u,p=a+1;p<this._stops.length&&!(r<this._stops[p][1]);)p++;(u=this._stops).splice.apply(u,[a,p-a].concat(z(l)))}}}},t.toGradientStops=function(){for(var e=[],t=0,r=0,a=this._stops;r<a.length;r++){var n=v(a[r],2),o=n[0],i=n[1];i<t||(e.push(o+" "+t+"%"),e.push(o+" "+i+"%"),t=i)}return e.join(", ")},e}();function rF(e,t){return void 0===t&&(t=""),"<style>"+rN+"\n"+t+'</style><div part="container"><div part="background"></div><div part="pointer"></div>'+e+"</div>"}var rB=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)}};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._pointerEl=a.querySelector('[part="pointer"]'),r._upgradeProperty("disabled"),r._upgradeProperty("value"),r._upgradeProperty("min"),r._upgradeProperty("max"),r._upgradeProperty("step"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._rangeEl.setAttribute(A.ARIA_LABEL,this.getAriaLabel()),this.update(),this.addEventListener("pointermove",this._updatePointerBar)},r.disconnectedCallback=function(){this.removeEventListener("pointermove",this._updatePointerBar)},r.attributeChangedCallback=function(e,r,a){if(a!==r){var n=null!=a;e===A.DISABLED?(this.setAttribute("aria-disabled",n?"true":"false"),n?this._rangeEl.setAttribute(e,a):this._rangeEl.removeAttribute(e)):e!==A.HIDDEN||n||this.update(),t.observedAttributes.indexOf(e)>=0&&E(this)}},r.handleInput=function(){this.update()},r.update=function(){this.hasAttribute(A.HIDDEN)||(this._rangeEl.setAttribute("aria-valuetext",this.getAriaValueText()),this.updateBar_())},r.updateBar_=function(){E(this,{"--theoplayer-range-track-progress-internal":"linear-gradient(to right, "+this.getBarColors().toGradientStops()+")"})},r.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 rq;return a.add("var(--theoplayer-range-bar-color, #fff)",0,e+r),a},r.updatePointer_=function(e,t){this._pointerEl.style.width=""+e*t.width+"px"},M(t,[{key:"disabled",get:function(){return this.hasAttribute(A.DISABLED)},set:function(e){e?this.setAttribute(A.DISABLED,""):this.removeAttribute(A.DISABLED)}},{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:"observedAttributes",get:function(){return[A.DISABLED,A.HIDDEN]}}]),t}(h(HTMLElement)),rH='<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>',rU="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%)}",rz="theoplayerpreviewtimechange",rV=":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)}",rG=document.createElement("template");rG.innerHTML="<style>"+rV+"</style><canvas></canvas>",k(rG,"theoplayer-preview-thumbnail");var rQ=["addtrack","removetrack"],rY=function(e){function t(){(t=e.call(this)||this)._previewTime=NaN,t._updateThumbnailTextTrack=function(){var e=t._thumbnailTextTrack,r=t._player?er(t._player.textTracks,rK):void 0;e!==r&&(t._thumbnailTextTrack=r,t.updateThumbnail_())};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rG.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}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this)},r.updateThumbnail_=function(){var e=this._thumbnailTextTrack;if(void 0===e){this.hideThumbnail_();return}"disabled"===e.mode&&(e.mode="hidden");var t=rW(e.cues,this._previewTime);if(void 0===t){this.hideThumbnail_();return}var r=t.content.trim(),a=rZ(r),n=a?a.url:r;if(n=new URL(n,e.src||location.href).href,this._lastLoadedThumbnailUrl!==n){this.loadThumbnailImage_(n);return}this.showThumbnail_(a)},r.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,j)):(this._thumbnailImageSource.onload=r,this._thumbnailImageSource.src="",this._thumbnailImageSource.src=e)}},r.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"},r.hideThumbnail_=function(){this._canvasEl.style.display="none"},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.textTracks.removeEventListener(rQ,this._updateThumbnailTextTrack),this._player=e,this._updateThumbnailTextTrack(),void 0!==this._player&&this._player.textTracks.addEventListener(rQ,this._updateThumbnailTextTrack))}},{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this.updateThumbnail_()}}]),t}(ed(HTMLElement,["player","previewTime"]));function rK(e){return"metadata"===e.kind&&"thumbnails"===e.label}function rW(e,t){if(0!==e.length){for(var r=e[0],a=0;a<e.length;a++){var n=e[a];if(n.startTime<=t)r=n;else if(t>=n.endTime)break}return r}}function rZ(e){var t=e.match(/^(.+)#xywh=(\d+),(\d+),(\d+),(\d+)$/);if(t){var r=v(t,6);return{url:r[1],x:+r[2],y:+r[3],w:+r[4],h:+r[5]}}}customElements.define("theoplayer-preview-thumbnail",rY);var rj=document.createElement("template");rj.innerHTML="<style>"+eP+"</style><span></span>",k(rj,"theoplayer-preview-time-display");var rX=["timeupdate","seeking","seeked","durationchange"],rJ=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,n=null==(e=t._player)?void 0:e.seekable,o=isFinite(a)?a:n&&n.length>0?n.end(0):NaN,i=t.hasAttribute(A.REMAINING)||t.hasAttribute(A.REMAINING_WHEN_LIVE)&&"vod"!==t.streamType;i&&(r=-((o||0)-r)),es(t._spanEl,eR(r,o,i))};var t,r=t.attachShadow({mode:"open"});return r.appendChild(rj.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("previewTime"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._update()},r.attributeChangedCallback=function(e,r,a){a!==r&&t.observedAttributes.indexOf(e)>=0&&(this._update(),E(this))},M(t,[{key:"previewTime",get:function(){return this._previewTime},set:function(e){this._previewTime=e,this._update()}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(rX,this._update),this._player=e,this._update(),void 0!==this._player&&this._player.addEventListener(rX,this._update))}}],[{key:"observedAttributes",get:function(){return[A.REMAINING,A.REMAINING_WHEN_LIVE,A.STREAM_TYPE]}}]),t}(ed(HTMLElement,["player","previewTime","streamType"]));function r$(e){return"linear"===e.type}customElements.define("theoplayer-preview-time-display",rJ);var r0=document.createElement("template");r0.innerHTML=rF(rH,rU),k(r0,"theoplayer-time-range");var r1=["timeupdate","durationchange","ratechange","seeking","seeked"],r5=["play","pause","ended","readystatechange","error"],r2=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],r3="video not loaded, unknown time",r4=1,r8=function(e){function t(){var t;return(t=e.call(this,{template:r0})||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._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(A.ARIA_LIVE,"off"),t._rangeEl.addEventListener("mousedown",t._pauseOnScrubStart),t._rangeEl.addEventListener("touchstart",t._pauseOnScrubStart),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._toggleAutoAdvance()},r.disconnectedCallback=function(){e.prototype.disconnectedCallback.call(this),this._toggleAutoAdvance()},r.getAriaLabel=function(){return"seek"},r.getAriaValueText=function(){var e=eD(this.value),t=eD(this.max);return e&&t?e+" of "+t:r3},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.STREAM_TYPE?this._updateDisabled():r===A.SHOW_AD_MARKERS&&this.update(),t.observedAttributes.indexOf(r)>=0&&E(this))},r.handleInput=function(){void 0!==this._player&&this._player.currentTime!==this.value&&(this._player.currentTime=this.value),e.prototype.handleInput.call(this)},r.shouldAutoAdvance_=function(){return this.isConnected&&void 0!==this._player&&!this._player.paused&&!this._player.ended&&!this._player.errorObject&&this._player.readyState>=3},r.updatePointer_=function(t,r){e.prototype.updatePointer_.call(this,t,r);var a=r.left+t*r.width,n=this._previewBoxEl.getBoundingClientRect(),o=((a=Math.max(r.left+n.width/2,Math.min(r.right-n.width/2,a)))-r.left)/r.width;if(this._previewRailEl.style.transform="translateX("+(1e4*o).toFixed(6)+"%)",void 0!==this._player){var i=this.min,l=eJ(rz,{bubbles:!0,composed:!0,detail:{previewTime:i+t*(this.max-i)}});this.dispatchEvent(l)}},r.getBarColors=function(){var t=e.prototype.getBarColors.call(this);if(!this.hasAttribute(A.SHOW_AD_MARKERS)||!this._player||!this._player.ads||this._player.ads.playing)return t;for(var r=this.min,a=this.max,n=0,o=this._player.ads.scheduledAdBreaks;n<o.length;n++){var i=o[n];if(void 0===i.ads||!(i.ads.length>0)||i.ads.some(r$)){var l=i.timeOffset;if(l<0&&(l=this._player.duration),r<=l&&l<=a){var s=(l-r)/(a-r)*100,u=void 0,p=void 0;s+r4<100?(u=s,p=s+r4):(u=100-r4,p=100),t.add("var(--theoplayer-time-range-ad-marker-color, #ffc50f)",u,p)}}}return t},M(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r;this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(r1,this._updateFromPlayer),this._player.removeEventListener(r5,this._toggleAutoAdvance),null==(t=this._player.ads)||t.removeEventListener(r2,this._onAdChange)),this._player=e,this._updateFromPlayer(),this._toggleAutoAdvance(),void 0!==this._player&&(this._player.addEventListener(r1,this._updateFromPlayer),this._player.addEventListener(r5,this._toggleAutoAdvance),null==(r=this._player.ads)||r.addEventListener(r2,this._onAdChange)))}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}}],[{key:"observedAttributes",get:function(){return z(rB.observedAttributes).concat([A.SHOW_AD_MARKERS])}}]),t}(ed(rB,["player","streamType"]));customElements.define("theoplayer-time-range",r8);var r7=document.createElement("template");function r6(e,t){return""+Math.round(e/t*100)+"%"}r7.innerHTML=rF('<input type="range" min="0" max="1" step="any" value="0">'),k(r7,"theoplayer-volume-range");var r9=function(e){function t(){var t;return(t=e.call(this,{template:r7})||this)._updateFromPlayer=function(){void 0!==t._player&&(t.value=t._player.volume)},t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.getAriaLabel=function(){return"volume"},r.getAriaValueText=function(){return r6(this.value,this.max)},r.handleInput=function(){void 0!==this._player&&this._player.volume!==this.value&&(this._player.volume=this.value),e.prototype.handleInput.call(this)},M(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}(ed(rB,["player"]));customElements.define("theoplayer-volume-range",r9);var ae=":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}",at='<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',ar=document.createElement("template");ar.innerHTML="<style>"+ae+'</style><div part="icon"><slot name="icon">'+at+'</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>',k(ar,"theoplayer-error-display");var aa=function(e){function t(){var t,r=(t=e.call(this)||this).attachShadow({mode:"open",delegatesFocus:!0});return r.appendChild(ar.content.cloneNode(!0)),t._messageSlot=r.querySelector('slot[name="message"]'),t._upgradeProperty("error"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this)},r.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&E(this)},M(t,[{key:"error",get:function(){return this._error},set:function(e){this._error=e,es(this._messageSlot,e?e.message:"")}},{key:"fullscreen",get:function(){return this.hasAttribute(A.FULLSCREEN)},set:function(e){e?this.setAttribute(A.FULLSCREEN,""):this.removeAttribute(A.FULLSCREEN)}}],[{key:"observedAttributes",get:function(){return[A.FULLSCREEN]}}]),t}(ed(HTMLElement,["error","fullscreen"]));customElements.define("theoplayer-error-display",aa);var an=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(A.CAST_STATE,e)},r._upgradeProperty("castState"),r._upgradeProperty("castApi"),r}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.CAST_STATE)||this.setAttribute(A.CAST_STATE,"unavailable"),this._updateCastState()},r.handleClick=function(){if(this._castApi){this._updateCastState();var e=this.castState;"available"===e?this._castApi.start():("connecting"===e||"connected"===e)&&this._castApi.stop()}},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&E(this)},M(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(A.CAST_STATE)}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.CAST_STATE])}}]),t}(D),ao='<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>',ai=":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}}",al=document.createElement("template");al.innerHTML=I(ao,ai),k(al,"theoplayer-chromecast-button");var as="theoplayer-chromecast-rings-mask",au=0,ap=function(e){function t(){t=e.call(this,{template:al})||this;var t,r=++au,a=t.shadowRoot.querySelector("svg clipPath#"+as),n=t.shadowRoot.querySelector("svg .theoplayer-chromecast-rings"),o=as+"-"+r;return a.setAttribute("id",o),n.setAttribute("clip-path",o),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},r._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop casting to Chromecast":"start casting to Chromecast";this.setAttribute(A.ARIA_LABEL,e)},M(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}(ed(an,["player"]));customElements.define("theoplayer-chromecast-button",ap);var ah=":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}",ad='<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',ac=document.createElement("template");ac.innerHTML="<style>"+ah+'</style><div part="icon"><slot name="icon">'+ad+'</slot></div><div part="text"><p part="heading"><slot name="heading">Playing on</slot></p><p part="receiver">Chromecast Receiver</p></div>',k(ac,"theoplayer-chromecast-display");var ay=["statechange"],am=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:null==(r=e.cast)?void 0:r.chromecast;if(void 0===a||"connected"!==a.state){t.setAttribute(A.HIDDEN,"");return}es(t._receiverNameEl,a.receiverName||""),t.removeAttribute(A.HIDDEN)};var t,r=t.attachShadow({mode:"open"});return r.appendChild(ac.content.cloneNode(!0)),t._receiverNameEl=r.querySelector('[part="receiver"]'),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.hasAttribute(A.HIDDEN)||this.setAttribute(A.HIDDEN,""),this._updateFromPlayer()},M(t,[{key:"player",get:function(){return this._player},set:function(e){var t,r,a,n,o,i;this._player!==e&&(null==(t=this._player)||null==(r=t.cast)||null==(a=r.chromecast)||a.removeEventListener(ay,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),null==(n=this._player)||null==(o=n.cast)||null==(i=o.chromecast)||i.addEventListener(ay,this._updateFromPlayer))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-chromecast-display",am);var ab='<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>',av=":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}",af=document.createElement("template");af.innerHTML=I(ab,av),k(af,"theoplayer-airplay-button");var ag=function(e){function t(){var t;return(t=e.call(this,{template:af})||this)._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateAriaLabel()},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&this._updateAriaLabel()},r._updateAriaLabel=function(){var e="connecting"===this.castState||"connected"===this.castState?"stop playing on AirPlay":"start playing on AirPlay";this.setAttribute(A.ARIA_LABEL,e)},M(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}(ed(an,["player"]));customElements.define("theoplayer-airplay-button",ag);var a_=":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)}}",ak='<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>',aw=document.createElement("template");aw.innerHTML="<style>"+a_+"</style>"+ak,k(aw,"theoplayer-loading-indicator");var aE=["readystatechange","play","pause","playing","seeking","seeked"],ax=function(e){function t(){var t;return(t=e.call(this)||this)._updateFromPlayer=function(){void 0!==t._player&&!t._player.paused&&(t._player.seeking||t._player.readyState<3)?t.setAttribute(A.LOADING,""):t.removeAttribute(A.LOADING)},t.attachShadow({mode:"open"}).appendChild(aw.content.cloneNode(!0)),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._updateFromPlayer()},r.attributeChangedCallback=function(e,r,a){t.observedAttributes.indexOf(e)>=0&&E(this)},M(t,[{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&this._player.removeEventListener(aE,this._updateFromPlayer),this._player=e,this._updateFromPlayer(),void 0!==this._player&&this._player.addEventListener(aE,this._updateFromPlayer))}}],[{key:"observedAttributes",get:function(){return[A.LOADING]}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-loading-indicator",ax);var aA=":host{pointer-events:none!important}:host{-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block}",aT=document.createElement("template");aT.innerHTML="<style>"+aA+"</style>",k(aT,"theoplayer-gesture-receiver");var aC=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(aT.content.cloneNode(!0)),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this.setAttribute("tabindex","-1"),this.setAttribute("aria-hidden","true")},r.handleTap=function(e){},r.handleMouseClick=function(e){if(void 0!==this._player){var t,r;null!=(t=this._player)&&null!=(r=t.ads)&&r.playing||(this._player.paused?this._player.play():this._player.pause())}},M(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}(ed(HTMLElement,["player"]));customElements.define("theoplayer-gesture-receiver",aC);var aL="[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)}",aS='<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',aP=document.createElement("template");aP.innerHTML=I('<span part="icon"><slot name="icon">'+aS+'</slot></span><slot name="spacer"> </slot><span part="text"><slot name="text">LIVE</slot></span>',aL),k(aP,"theoplayer-live-button");var aM=["play","pause","playing","emptied"],aR=["seeking","seeked","timeupdate","durationchange","emptied"],aI=10,aO=function(e){function t(){var t;return(t=e.call(this,{template:aP})||this)._updatePaused=function(){t.paused=void 0===t._player||t._player.paused},t._updateLive=function(){t.live=void 0!==t._player&&aD(t._player,t.liveThreshold)},t._upgradeProperty("paused"),t._upgradeProperty("streamType"),t._upgradeProperty("liveThreshold"),t._upgradeProperty("live"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this.hasAttribute(A.ARIA_LABEL)||this.setAttribute(A.ARIA_LABEL,"seek to live")},r.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()))},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),n!==a&&(r===A.LIVE_THRESHOLD&&this._updateLive(),t.observedAttributes.indexOf(r)>=0&&E(this))},M(t,[{key:"paused",get:function(){return this.hasAttribute(A.PAUSED)},set:function(e){e?this.setAttribute(A.PAUSED,""):this.removeAttribute(A.PAUSED)}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}},{key:"liveThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(A.LIVE_THRESHOLD))?e:aI)},set:function(e){e=Number(e),this.setAttribute(A.LIVE_THRESHOLD,String(isNaN(e)?0:e))}},{key:"live",get:function(){return this.hasAttribute(A.LIVE)},set:function(e){e?this.setAttribute(A.LIVE,""):this.removeAttribute(A.LIVE)}},{key:"player",get:function(){return this._player},set:function(e){this._player!==e&&(void 0!==this._player&&(this._player.removeEventListener(aM,this._updatePaused),this._player.removeEventListener(aR,this._updateLive)),this._player=e,this._updatePaused(),this._updateLive(),void 0!==this._player&&(this._player.addEventListener(aM,this._updatePaused),this._player.addEventListener(aR,this._updateLive)))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes).concat([A.STREAM_TYPE,A.LIVE,A.PAUSED,A.LIVE_THRESHOLD])}}]),t}(ed(D,["player","streamType"]));function aD(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}customElements.define("theoplayer-live-button",aO);var aN=":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)}",aq=document.createElement("template");aq.innerHTML="<style>"+eP+"\n"+aN+"</style><span></span>",k(aq,"theoplayer-ad-display");var aF=["adbreakbegin","adbreakend","adbreakchange","updateadbreak","adbegin","adend","adskip","addad","updatead"],aB=function(e){function t(){(t=e.call(this)||this)._updateFromPlayer=function(){var e,r,a,n=null==(e=t._player)?void 0:e.ads,o=(null!=(a=null==n?void 0:null==(r=n.currentAdBreak)?void 0:r.ads)?a:[]).filter(r$);if(void 0===n||!n.playing||0===o.length){es(t._spanEl,""),t.style.display="none";return}if(o.length>1){var i=er(t._player.ads.currentAds||[],r$);if(i){var l=o.indexOf(i);if(l>=0){es(t._spanEl,"Ad "+(l+1)+" of "+o.length),t.style.display="";return}}}es(t._spanEl,"Ad"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(aq.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._updateFromPlayer()},M(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(aF,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(aF,this._updateFromPlayer)))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-ad-display",aB);var aH=":host{pointer-events:none}",aU=document.createElement("template");aU.innerHTML="<style>"+eP+"\n"+aH+"</style><span></span>",k(aU,"theoplayer-ad-countdown");var az=["adbreakbegin","adbreakend","adbreakchange","updateadbreak"],aV=function(e){function t(){(t=e.call(this)||this)._onAdChange=function(){var e,r,a;(null==(e=t._player)?void 0:null==(r=e.ads)?void 0:r.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,n=null==a?void 0:null==(r=a.currentAdBreak)?void 0:r.maxRemainingDuration;if(void 0===a||!a.playing||void 0===n||n<0){es(t._spanEl,""),t.style.display="none";return}n=Math.ceil(n),es(t._spanEl,"Content will resume in "+n+"s"),t.style.display=""};var t,r=t.attachShadow({mode:"open"});return r.appendChild(aU.content.cloneNode(!0)),t._spanEl=r.querySelector("span"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.connectedCallback=function(){w(this),this._update()},M(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(az,this._onAdChange)),this._player=e,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(az,this._onAdChange)))}}]),t}(ed(HTMLElement,["player"]));customElements.define("theoplayer-ad-countdown",aV);var aG=document.createElement("template");aG.innerHTML=q("<slot>Visit Advertiser</slot>"),k(aG,"theoplayer-ad-clickthrough-button");var aQ=["adbegin","adend","adloaded","updatead","adskip"],aY=function(e){function t(){var t;return(t=e.call(this,{template:aG})||this)._updateFromPlayer=function(){var e,r,a=null==(e=t._player)?void 0:e.ads;if(!a||!a.playing){t.clickThrough=null;return}var n=er(null!=(r=a.currentAds)?r:[],r$);if(void 0===n||"google-ima"===n.integration){t.clickThrough=null;return}var o=n.clickThrough;if(!o){t.clickThrough=null;return}t.clickThrough=o},t.disabled=!0,t.style.display="none",t._upgradeProperty("clickThrough"),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._updateFromPlayer()},r.attributeChangedCallback=function(r,a,n){if(e.prototype.attributeChangedCallback.call(this,r,a,n),r===A.CLICKTHROUGH&&n!==a){var o=null!=n,i=n?String(n).trim():"#";this.setLink(i,"_blank"),this.disabled=!o,o?this.style.display="":this.style.display="none"}t.observedAttributes.indexOf(r)>=0&&E(this)},r.handleClick=function(){var e;null==(e=this._player)||e.pause()},M(t,[{key:"clickThrough",get:function(){return this.getAttribute(A.CLICKTHROUGH)},set:function(e){null==e?this.removeAttribute(A.CLICKTHROUGH):this.setAttribute(A.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(aQ,this._updateFromPlayer)),this._player=e,this._updateFromPlayer(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(aQ,this._updateFromPlayer)))}}],[{key:"observedAttributes",get:function(){return z(B.observedAttributes).concat([A.CLICKTHROUGH])}}]),t}(ed(B,["player"]));customElements.define("theoplayer-ad-clickthrough-button",aY);var aK=":host{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)}: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=skip]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}[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))}",aW='<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',aZ=document.createElement("template");aZ.innerHTML=I('<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">'+aW+"</slot></span></span>",aK),k(aZ,"theoplayer-ad-skip-button");var aj=["adbegin","adend","adloaded","updatead","adskip"],aX=function(e){function t(){var t;return(t=e.call(this,{template:aZ})||this)._onAdChange=function(){var e,r,a;(null==(e=t._player)?void 0:null==(r=e.ads)?void 0:r.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 n=er(null!=(r=a.currentAds)?r:[],r$);if(void 0===n||"google-ima"===n.integration){t.style.display="none";return}var o=n.skipOffset;if(void 0===o||o<0||void 0!==n.duration&&o>=n.duration){t.style.display="none";return}var i=t._player.currentTime;i<o?(es(t._countdownEl,"Skip in "+Math.ceil(o-i)+"s"),t._countdownEl.style.display="",t._skipEl.style.display="none",t.style.display="",t.setAttribute(A.DISABLED,""),t.setAttribute(A.ARIA_LIVE,"off")):(t._countdownEl.style.display="none",t._skipEl.style.display="",t.style.display="",t.removeAttribute(A.DISABLED),t.setAttribute(A.ARIA_LIVE,"polite"))},t._countdownEl=t.shadowRoot.querySelector('[part="countdown"]'),t._skipEl=t.shadowRoot.querySelector('[part="skip"]'),t._upgradeProperty("player"),t}a(t,e);var r=t.prototype;return r.connectedCallback=function(){e.prototype.connectedCallback.call(this),this._update()},r.handleClick=function(){var e,t;null==(e=this._player)||null==(t=e.ads)||t.skip()},r.attributeChangedCallback=function(r,a,n){e.prototype.attributeChangedCallback.call(this,r,a,n),t.observedAttributes.indexOf(r)>=0&&E(this)},M(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(aj,this._onAdChange)),this._player=e,this._onAdChange(),void 0!==this._player&&(null==(r=this._player.ads)||r.addEventListener(aj,this._onAdChange)))}}],[{key:"observedAttributes",get:function(){return z(D.observedAttributes)}}]),t}(ed(D,["player"]));customElements.define("theoplayer-ad-skip-button",aX),function(e){e.TopControlBar="top-control-bar",e.BottomControlBar="bottom-control-bar",e.Menu="menu"}(T||(T={}));var aJ=[];function a$(e){aJ.push(e)}function a0(e){for(var t=0;t<aJ.length;t++)(0,aJ[t])(e)}function a1(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var a5=':host{container-name:theoplayer-ui-container;container-type:size;background:#000;background:var(--theoplayer-background,#000);-webkit-box-sizing:border-box;box-sizing:border-box;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] .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])) [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(:not([menu-opened])) [part~=menu-layer],:host([menu-opened][mobile]) [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([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}',a2='<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>',a3=function(){if(document)for(var e=[["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"]],t=0;t<e.length;t++){var r=e[t];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 a4(){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)}var a8=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),n=Math.max(this.right,t.right)-r,o=Math.max(this.bottom,t.bottom)-a;return new e(r,a,n,o)},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,n,o,i,l;return new e(null!=(a=null!=(r=t.left)?r:t.x)?a:0,null!=(o=null!=(n=t.top)?n:t.y)?o:0,null!=(i=t.width)?i:0,null!=(l=t.height)?l:0)},M(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}(),a7="theoplayerstreamtypechange",a6=document.createElement("template");a6.innerHTML="<style>"+a5+"</style>"+a2,k(a6,"theoplayer-ui");var a9=2,ne=60,nt=function(t){function r(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=0;t<e.length;t++){var a=e[t];if("childList"===a.type){for(var n=a.addedNodes,o=a.removedNodes,i=0;i<n.length;i++){var l=n[i];X(l)&&ec(l,r._playerEl,r.registerStateReceiver_)}for(var s=0;s<o.length;s++){var u=o[s];X(u)&&ec(u,r._playerEl,r.unregisterStateReceiver_)}}}},r._onSlotChange=function(){ec(a1(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){en(r._stateReceivers,e)&&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=J(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(A.MENU_OPENED,"")):r.removeAttribute(A.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(),a3&&document[a3.fullscreenEnabled_]&&r[a3.requestFullscreen_]){var t=r[a3.requestFullscreen_]();t&&t.then&&t.then(j,j)}else r._player&&r._player.presentation.supportsMode("fullscreen")&&r._player.presentation.requestMode("fullscreen")},r._onExitFullscreen=function(e){if(e.stopPropagation(),a3){var t=document[a3.exitFullscreen_]();t&&t.then&&t.then(j,j)}r._player&&"fullscreen"===r._player.presentation.currentMode&&r._player.presentation.requestMode("inline")},r._onFullscreenChange=function(){var e=!1;if(void 0!==a3){var t=document[a3.fullscreenElement_];t&&(e=eu(t,a1(r)))}e||void 0===r._player||"fullscreen"!==r._player.presentation.currentMode||(e=!0),e?r.setAttribute(A.FULLSCREEN,""):r.removeAttribute(A.FULLSCREEN)},r._updateAspectRatio=function(){if(void 0!==r._player){var e=r._player,t=e.videoWidth,a=e.videoHeight;t>0&&a>0?E(a1(r),{"--theoplayer-video-width":""+t,"--theoplayer-video-height":""+a}):E(a1(r),{"--theoplayer-video-width":"","--theoplayer-video-height":""})}},r._updateError=function(){var e,t=null==(e=r._player)?void 0:e.errorObject;t?r.setAttribute(A.HAS_ERROR,""):r.removeAttribute(A.HAS_ERROR);for(var a=0,n=r._stateReceivers;a<n.length;a++){var o=n[a];o[ep].indexOf("error")>=0&&(o.error=t)}},r._onPlay=function(){r.setAttribute(A.HAS_FIRST_PLAY,""),r.removeAttribute(A.PAUSED),r._updateEnded()},r._onPause=function(){r.setAttribute(A.PAUSED,""),r._updateEnded()},r._updatePausedAndEnded=function(){!r._player||r._player.paused?r.setAttribute(A.PAUSED,""):r.removeAttribute(A.PAUSED),r._updateEnded()},r._updateEnded=function(){r._player&&r._player.ended?r.setAttribute(A.ENDED,""):r.removeAttribute(A.ENDED)},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,n=r._player.seekable;(a<=0||n.length>0&&n.end(n.length-1)-n.start(0)>=a)&&(e="dvr")}else e="vod";r.streamType=e}}},r._updatePlaybackRate=function(){if(void 0!==r._player)for(var e=r._player.playbackRate,t=0,a=r._stateReceivers;t<a.length;t++){var n=a[t];n[ep].indexOf("playbackRate")>=0&&(n.playbackRate=e)}},r._updateMuted=function(){void 0!==r._player&&(r.muted=r._player.muted)},r._updateActiveVideoTrack=function(){if(void 0!==r._player){var e,t,a,n,o=er(r._player.videoTracks,function(e){return e.enabled});r._activeVideoTrack!==o&&(null==(e=r._activeVideoTrack)||e.removeEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(t=r._activeVideoTrack)||t.removeEventListener("targetqualitychanged",r._updateTargetVideoQualities),r._activeVideoTrack=o,r._updateActiveVideoQuality(),r._updateTargetVideoQualities(),null==(a=r._activeVideoTrack)||a.addEventListener("activequalitychanged",r._updateActiveVideoQuality),null==(n=r._activeVideoTrack)||n.addEventListener("targetqualitychanged",r._updateTargetVideoQualities))}},r._updateActiveVideoQuality=function(){for(var e,t=null==(e=r._activeVideoTrack)?void 0:e.activeQuality,a=0,n=r._stateReceivers;a<n.length;a++){var o=n[a];o[ep].indexOf("activeVideoQuality")>=0&&(o.activeVideoQuality=t)}},r._updateTargetVideoQualities=function(){for(var e=tk(r._activeVideoTrack),t=0,a=r._stateReceivers;t<a.length;t++){var n=a[t];n[ep].indexOf("targetVideoQualities")>=0&&(n.targetVideoQualities=e)}},r._updateCasting=function(){var e,t,a;null!=(a=null==(e=r._player)?void 0:null==(t=e.cast)?void 0:t.casting)&&a?r.setAttribute(A.CASTING,""):r.removeAttribute(A.CASTING)},r._updatePlayingAd=function(){var e,t,a;null!=(a=null==(e=r._player)?void 0:null==(t=e.ads)?void 0:t.playing)&&a?r.setAttribute(A.PLAYING_AD,""):r.removeAttribute(A.PLAYING_AD)},r._onSourceChange=function(){r.closeMenu_(),void 0===r._player||r._player.paused?r.removeAttribute(A.HAS_FIRST_PLAY):r.setAttribute(A.HAS_FIRST_PLAY,"")},r.setUserIdle_=function(){clearTimeout(r._userIdleTimer),r._userIdleTimer=0,r.userIdleTimeout<0||r.setAttribute(A.USER_IDLE,"")},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._onKeyUp=function(){r.scheduleUserIdle_()},r._onPointerUp=function(e){"touch"===e.pointerType&&(r.isPlayerOrMedia_(e.target)&&!r.hasAttribute(A.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=nr(r._topChromeSlot),a=nr(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=0,a=r._stateReceivers;t<a.length;t++){var n=a[t];n[ep].indexOf("previewTime")>=0&&(n.previewTime=r._previewTime)}};var r,a=r.attachShadow({mode:"open",delegatesFocus:!0});return a.appendChild(a6.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(tt,r._onToggleMenu),a.addEventListener(rR,r._onEnterFullscreen),a.addEventListener(rI,r._onExitFullscreen),a.addEventListener(rz,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("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("streamType"),r.tryInitializePlayer_(),r}a(r,t);var n=r.prototype;return n._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},n._setConfiguration=function(e){this._configuration=null!=e?e:{},this.tryInitializePlayer_()},n._setSource=function(e){this._player?this._player.source=e:this._source=e},n.connectedCallback=function(){var e;w(this),!this.hasAttribute(A.MOBILE)&&a4()&&this.setAttribute(A.MOBILE,""),this.hasAttribute(A.PAUSED)||this.setAttribute(A.PAUSED,""),this.tryInitializePlayer_();for(var t=0,r=this._stateReceivers;t<r.length;t++){var a=r[t];this.propagateStateToReceiver_(a)}ec(this,this._playerEl,this.registerStateReceiver_),this._mutationObserver.observe(this,{childList:!0,subtree:!0}),this.shadowRoot.addEventListener("slotchange",this._onSlotChange),null==(e=this._resizeObserver)||e.observe(this),this._updateTextTrackMargins(),this._menuGroup.addEventListener(e4,this._onCloseMenu),this._menuGroup.addEventListener(e8,this._onMenuChange),void 0!==a3&&(document.addEventListener(a3.fullscreenchange_,this._onFullscreenChange),document.addEventListener(a3.fullscreenerror_,this._onFullscreenChange),this._onFullscreenChange()),this.setUserIdle_(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("pointerup",this._onPointerUp),this.addEventListener("pointermove",this._onPointerMove),this.addEventListener("mouseleave",this._onMouseLeave)},n.tryInitializePlayer_=function(){var t,r;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 a=0,n=this._stateReceivers;a<n.length;a++){var o=n[a];o[ep].indexOf("player")>=0&&(o.player=this._player)}this._updateAspectRatio(),this._updateError(),this._updatePausedAndEnded(),this._updateCasting(),this._player.addEventListener("resize",this._updateAspectRatio),this._player.addEventListener(["error","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),this._player.videoTracks.addEventListener(["addtrack","removetrack","change"],this._updateActiveVideoTrack),null==(t=this._player.cast)||t.addEventListener("castingchange",this._updateCasting),this._player.addEventListener(["durationchange","sourcechange","emptied"],this._updatePlayingAd),null==(r=this._player.ads)||r.addEventListener(["adbreakbegin","adbreakend","adbegin","adend","adskip"],this._updatePlayingAd)}},n.disconnectedCallback=function(){var e;null==(e=this._resizeObserver)||e.disconnect(),this._mutationObserver.disconnect(),this.shadowRoot.removeEventListener("slotchange",this._onSlotChange);for(var t=0,r=this._stateReceivers;t<r.length;t++){var a=r[t];this.removeStateFromReceiver_(a)}this._stateReceivers.length=0,this._menuGroup.removeEventListener(e4,this._onCloseMenu),this._menuGroup.removeEventListener(e8,this._onMenuChange),void 0!==a3&&(document.removeEventListener(a3.fullscreenchange_,this._onFullscreenChange),document.removeEventListener(a3.fullscreenerror_,this._onFullscreenChange)),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)},n.attributeChangedCallback=function(e,t,a){if(a!==t){var n=null!=a;if(e===A.CONFIGURATION)this._setConfiguration(a?JSON.parse(a):{});else if(e===A.SOURCE)this._setSource(a?JSON.parse(a):void 0);else if(e===A.MUTED)this._player&&(this._player.muted=n);else if(e===A.AUTOPLAY)this._player&&(this._player.autoplay=n);else if(e===A.FULLSCREEN)for(var o=0,i=this._stateReceivers;o<i.length;o++){var l=i[o];l[ep].indexOf("fullscreen")>=0&&(l.fullscreen=n)}else if(e===A.STREAM_TYPE){for(var s=0,u=this._stateReceivers;s<u.length;s++){var p=u[s];p[ep].indexOf("streamType")>=0&&(p.streamType=a)}var h=eJ(a7,{bubbles:!0,composed:!0,detail:{streamType:a}});this.dispatchEvent(h)}else e===A.FLUID?this._updateAspectRatio():e===A.USER_IDLE||e===A.PAUSED||e===A.CASTING?this._updateTextTrackMargins():e===A.DVR_THRESHOLD&&this._updateStreamType();r.observedAttributes.indexOf(e)>=0&&E(this)}},n.propagateStateToReceiver_=function(e){var t,r=e[ep];r.indexOf("player")>=0&&(e.player=this._player),r.indexOf("fullscreen")>=0&&(e.fullscreen=this.fullscreen),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=tk(this._activeVideoTrack))),r.indexOf("previewTime")>=0&&(e.previewTime=this._previewTime)},n.removeStateFromReceiver_=function(e){e[ep].indexOf("player")>=0&&(e.player=void 0)},n.openMenu_=function(e,t){var r=a8.fromRect(this._topChromeEl.getBoundingClientRect()),a=a8.fromRect(this._bottomChromeEl.getBoundingClientRect()),n=!0,o=!0;if(void 0!==t){var i=a8.fromRect(this.getBoundingClientRect()),l=a8.fromRect(t.getBoundingClientRect());i.width>0&&i.height>0&&(n=l.top>=i.top+i.height/2,o=l.left>=i.left+i.width/2)}this._menuGroup.openMenu(e,t),this._menuOpener=t,E(this,{"--theoplayer-menu-offset-top":""+Math.round(r.height)+"px","--theoplayer-menu-offset-bottom":""+Math.round(a.height)+"px","--theoplayer-menu-margin-top":n?"auto":"0","--theoplayer-menu-margin-bottom":n?"0":"auto","--theoplayer-menu-margin-left":o?"auto":"0","--theoplayer-menu-margin-right":o?"0":"auto"})},n.closeMenu_=function(){var e;this._menuGroup.closeMenu(),null==(e=this._menuOpener)||e.focus(),this._menuOpener=void 0},n.isUserIdle_=function(){return this.hasAttribute(A.USER_IDLE)&&!this.paused&&!this.casting&&!this._menuGroup.hasCurrentMenu()},n.setUserActive_=function(){clearTimeout(this._userIdleTimer),this.removeAttribute(A.USER_IDLE)},n.isPlayerOrMedia_=function(e){return e===this||this._playerEl.contains(e)},M(r,[{key:"player",get:function(){return this._player}},{key:"configuration",get:function(){return this._configuration},set:function(e){this.removeAttribute(A.CONFIGURATION),this._setConfiguration(e)}},{key:"source",get:function(){return this._player?this._player.source:this._source},set:function(e){this.removeAttribute(A.SOURCE),this._setSource(e)}},{key:"muted",get:function(){return this.hasAttribute(A.MUTED)},set:function(e){e?this.setAttribute(A.MUTED,""):this.removeAttribute(A.MUTED)}},{key:"autoplay",get:function(){return this.hasAttribute(A.AUTOPLAY)},set:function(e){e?this.setAttribute(A.AUTOPLAY,""):this.removeAttribute(A.AUTOPLAY)}},{key:"fullscreen",get:function(){return this.hasAttribute(A.FULLSCREEN)}},{key:"paused",get:function(){return this.hasAttribute(A.PAUSED)}},{key:"ended",get:function(){return this.hasAttribute(A.ENDED)}},{key:"casting",get:function(){return this.hasAttribute(A.CASTING)}},{key:"userIdleTimeout",get:function(){var e;return Number(null!=(e=this.getAttribute(A.USER_IDLE_TIMEOUT))?e:a9)},set:function(e){e=Number(e),this.setAttribute(A.USER_IDLE_TIMEOUT,String(isNaN(e)?0:e))}},{key:"streamType",get:function(){return this.getAttribute(A.STREAM_TYPE)||"vod"},set:function(e){this.setAttribute(A.STREAM_TYPE,e)}},{key:"dvrThreshold",get:function(){var e;return Number(null!=(e=this.getAttribute(A.DVR_THRESHOLD))?e:ne)},set:function(e){e=Number(e),this.setAttribute(A.DVR_THRESHOLD,String(isNaN(e)?0:e))}}],[{key:"observedAttributes",get:function(){return[A.CONFIGURATION,A.SOURCE,A.MUTED,A.AUTOPLAY,A.FULLSCREEN,A.FLUID,A.MOBILE,A.PAUSED,A.ENDED,A.CASTING,A.PLAYING_AD,A.HAS_ERROR,A.HAS_FIRST_PLAY,A.STREAM_TYPE,A.DVR_THRESHOLD,A.USER_IDLE,A.USER_IDLE_TIMEOUT]}}]),r}(h(HTMLElement));function nr(e){for(var t,r=e.assignedNodes().filter(J),a=0;a<r.length;a++){var n=r[a];if("0"!==getComputedStyle(n).opacity){var o=a8.fromRect(n.getBoundingClientRect());o.width>0&&o.height>0&&(t=t?t.union(o):o)}}return t}customElements.define("theoplayer-ui",nt);var na=':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: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: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)}[part=ad-chrome]{--theoplayer-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{border-right:0!important}theoplayer-ad-skip-button:not([disabled]){--theoplayer-ad-skip-icon-width:24px;--theoplayer-ad-skip-icon-height:24px;font-size:17.5px;font-size:calc(var(--theoplayer-text-font-size, 14px)*1.25);line-height:30px;line-height:calc(var(--theoplayer-text-content-height, var(--theoplayer-control-height, 24px))*1.25)}: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([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-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: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:16px}',nn='<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 mobile-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 class="theoplayer-ad-control"></theoplayer-time-range></theoplayer-control-bar><theoplayer-control-bar ad-hidden><theoplayer-play-button mobile-hidden></theoplayer-play-button><theoplayer-mute-button></theoplayer-mute-button><theoplayer-volume-range mobile-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 mobile-hidden ad-hidden></theoplayer-airplay-button><theoplayer-chromecast-button mobile-hidden ad-hidden></theoplayer-chromecast-button><slot name="bottom-control-bar"></slot><theoplayer-fullscreen-button></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>',no=document.createElement("template");no.innerHTML="<style>"+na+"</style>"+nn,k(no,"theoplayer-default-ui");var ni=function(e){function t(t){void 0===t&&(t={}),(r=e.call(this)||this)._appliedExtensions=!1,r._updateStreamType=function(){r.setAttribute(A.STREAM_TYPE,r.streamType),"live"===r.streamType?r._timeRange.setAttribute(A.HIDDEN,""):r._timeRange.removeAttribute(A.HIDDEN)},r._onTitleSlotChange=function(){r._titleSlot.assignedNodes().length>0?r.setAttribute(A.HAS_TITLE,""):r.removeAttribute(A.HAS_TITLE)};var r,a=r.attachShadow({mode:"open",delegatesFocus:!0});return a.appendChild(no.content.cloneNode(!0)),r._ui=a.querySelector("theoplayer-ui"),r._ui.addEventListener(a7,r._updateStreamType),r.setConfiguration_(t),r._titleSlot=a.querySelector('slot[name="title"]'),r._titleSlot.addEventListener("slotchange",r._onTitleSlotChange),r._timeRange=a.querySelector("theoplayer-time-range"),r._upgradeProperty("configuration"),r._upgradeProperty("source"),r._upgradeProperty("muted"),r._upgradeProperty("autoplay"),r._upgradeProperty("streamType"),r._upgradeProperty("userIdleTimeout"),r._upgradeProperty("dvrThreshold"),r}a(t,e);var r=t.prototype;return r._upgradeProperty=function(e){if(this.hasOwnProperty(e)){var t=this[e];delete this[e],this[e]=t}},r.setConfiguration_=function(e){var t;this._ui.configuration=eG({},e,{ads:eG({},null!=(t=e.ads)?t:{},{showCountdown:!1})})},r.connectedCallback=function(){w(this),!this.hasAttribute(A.MOBILE)&&a4()&&this.setAttribute(A.MOBILE,""),this._appliedExtensions||(this._appliedExtensions=!0,a0(this),E(this)),this._onTitleSlotChange()},r.disconnectedCallback=function(){},r.attributeChangedCallback=function(e,r,a){if(a!==r){var n=null!=a;e===A.SOURCE?this._ui.source=a?JSON.parse(a):void 0:e===A.CONFIGURATION?this.setConfiguration_(a?JSON.parse(a):{}):e===A.MUTED?this.muted=n:e===A.AUTOPLAY?this.autoplay=n:e===A.FLUID?n?this._ui.setAttribute(A.FLUID,a):this._ui.removeAttribute(A.FLUID):e===A.MOBILE?n?this._ui.setAttribute(A.MOBILE,a):this._ui.removeAttribute(A.MOBILE):e===A.STREAM_TYPE?this.streamType=a:e===A.USER_IDLE_TIMEOUT?this.userIdleTimeout=Number(a):e===A.DVR_THRESHOLD&&(this.dvrThreshold=Number(a)),t.observedAttributes.indexOf(e)>=0&&E(this)}},M(t,[{key:"player",get:function(){return this._ui.player}},{key:"configuration",get:function(){return this._ui.configuration},set:function(e){this.removeAttribute(A.CONFIGURATION),this.setConfiguration_(e)}},{key:"source",get:function(){return this._ui.source},set:function(e){this.removeAttribute(A.SOURCE),this._ui.source=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[A.CONFIGURATION,A.SOURCE,A.MUTED,A.AUTOPLAY,A.FLUID,A.MOBILE,A.STREAM_TYPE,A.USER_IDLE_TIMEOUT,A.DVR_THRESHOLD,A.HAS_TITLE]}}]),t}(h(HTMLElement));customElements.define("theoplayer-default-ui",ni);export{rc as ActiveQualityDisplay,aY as AdClickThroughButton,aV as AdCountdown,aB as AdDisplay,aX as AdSkipButton,ag as AirPlayButton,A as Attribute,D as Button,an as CastButton,ap as ChromecastButton,am as ChromecastDisplay,tp as CloseMenuButton,rq as ColorStops,S as ControlBar,ni as DefaultUI,ez as DurationDisplay,aa as ErrorDisplay,T as ExtensionSlot,rD as FullscreenButton,aC as GestureReceiver,t9 as LanguageMenu,ra as LanguageMenuButton,B as LinkButton,aO as LiveButton,ax as LoadingIndicator,tc as MediaTrackRadioButton,e9 as Menu,tl as MenuButton,tn as MenuGroup,ex as MuteButton,ev as PlayButton,rd as PlaybackRateDisplay,rh as PlaybackRateMenu,rs as PlaybackRateMenuButton,ro as PlaybackRateRadioGroup,rY as PreviewThumbnail,rJ as PreviewTimeDisplay,rv as QualityRadioButton,r_ as QualityRadioGroup,e0 as RadioButton,e5 as RadioGroup,rB as Range,eS as SeekButton,rA as SettingsMenu,rL as SettingsMenuButton,ed as StateReceiverMixin,tT as TextTrackOffRadioButton,tf as TextTrackRadioButton,tj as TextTrackStyleDisplay,t8 as TextTrackStyleMenu,t5 as TextTrackStyleRadioGroup,rw as TextTrackStyleResetButton,eB as TimeDisplay,r8 as TimeRange,tM as TrackRadioGroup,nt as UIContainer,r9 as VolumeRange,I as buttonTemplate,q as linkButtonTemplate,tr as menuGroupTemplate,e7 as menuTemplate,rF as rangeTemplate,a$ as registerExtension};