@theoplayer/theoads 9.3.1 → 9.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/THEOplayer.esm.js CHANGED
@@ -34,7 +34,7 @@
34
34
  THEOplayer is based on patented technology developed by
35
35
  THEO Technologies (https://www.theoplayer.com).
36
36
 
37
- Version: 9.3.1
38
- Created: 2025-05-12T14:35:37.520Z
37
+ Version: 9.3.2
38
+ Created: 2025-05-13T14:57:06.480Z
39
39
  */
40
- var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),v=a.clearTimeout,p=a.setInterval,m=a.clearInterval,g=a.Error,b=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as E,Ba as N,C as I,Ca as B,D as F,Da as D,E as $,Ea as R,F as U,Fa as O,G as V,Ga as L,H,Ha as q,I as z,Ia as W,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as d,N as tt,Na as it,O as st,Oa as et,P as nt,Pa as rt,Q as ht,Qa as ot,R as at,Ra as ut,S as ct,Sa as lt,T as dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,ab as Pt,b as Et,ba as Nt,bb as It,c as f,ca as Bt,cb as Ft,d as Dt,da as $t,db as Rt,e as Ut,ea as Ot,eb as Vt,f as Lt,fa as Ht,fb as qt,g as zt,ga as Wt,h as Gt,ha as Xt,i as Jt,ia as Qt,j as Yt,ja as Kt,k as Zt,ka as ti,l as ii,la as si,m as ei,ma as ni,n as ri,na as hi,o as oi,oa as ai,p as ui,pa as ci,q as li,qa as di,r as fi,ra as vi,s as pi,sa as mi,t as gi,ta as yi,u as bi,ua as ki,v as wi,va as _i,w as xi,wa as Ci,x as Si,xa as ji,y as Ti,ya as Mi,z as Ai,za as Pi}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var Ei=[];function Ni(t){Ei.push(t)}var Ii=[];function Bi(t){Ii.push(t)}f(),f(),f(),f();var c=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Fi=void 0!==h?h:{createElement:function(){}};function Di(t,i){return i||(i=t.slice(0)),t.raw=i,t}var $i=1;function Ri(){return $i++}var Ui,Oi=w.prototype.toString,Vi=function(t){return qi(t)?w.keys(t):[]};function Li(t,i){Vi(t).forEach((function(s){return i(t[s],s)}))}function Hi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return w.assign?w.assign.apply(w,[t].concat(s)):(s.forEach((function(i){i&&Li(i,(function(i,s){t[s]=i}))})),t)}function qi(t){return!!t&&"object"==typeof t}function zi(t){return qi(t)&&"[object Object]"===Oi.call(t)&&t.constructor===w}var Wi=function(t,i,s){void 0===s&&(s=!!zs&&zs<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),Ui.history.push(i),i.unshift("VIDEOJS:");var e=c.console&&c.console[t];e&&(s&&(i=i.map((function(t){if(qi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](c.console,i):e(i))};(Ui=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Wi("log",i)}).history=[],Ui.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Wi("error",i)},Ui.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Wi("warn",i)};var Gi=Ui,Xi="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ji(t){return t.replace(/\n\r?\s*/g,"")}var Qi,Yi=function(t){for(var i="",s=0;s<arguments.length;s++)i+=Ji(t[s])+(arguments[s+1]||"");return i};function Ki(t){return"string"==typeof t&&/\S/.test(t)}function Zi(t){if(/\s/.test(t))throw new g("class has illegal whitespace characters")}function ts(){return Fi===c.document&&void 0!==Fi.createElement}function is(t){return qi(t)&&1===t.nodeType}function ss(t){return function(i,s){if(!Ki(i))return Fi[t](null);Ki(s)&&(s=Fi.querySelector(s));var e=is(s)?s:Fi;return e[t]&&e[t](i)}}function es(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Fi.createElement(t);return w.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Gi.warn(Yi(Qi||(Qi=Di(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),n.setAttribute(t,s)):"textContent"===t?ns(n,s):n[t]=s})),w.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&xs(n,e),n}function ns(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function rs(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var hs={},os="vdata"+(new Date).getTime();function as(t){var i=t[os];return i||(i=t[os]=Ri()),hs[i]||(hs[i]={}),hs[i]}function us(t){var i=t[os];return!!i&&!!w.getOwnPropertyNames(hs[i]).length}function cs(t){var i=t[os];if(i){delete hs[i];try{delete t[os]}catch(i){t.removeAttribute?t.removeAttribute(os):t[os]=null}}}function ls(t,i){return Zi(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function ds(t,i){return t.classList?t.classList.add(i):ls(t,i)||(t.className=(t.className+" "+i).trim()),t}function fs(t,i){return t.classList?t.classList.remove(i):(Zi(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function vs(t,i,s){var e=ls(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?ds(t,i):fs(t,i),t}function ps(t,i){w.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function ms(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function gs(t,i,s){t.setAttribute(i,s)}function ys(t,i){t.removeAttribute(i)}function bs(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Fi.documentElement,e=Fi.body,n=s.clientLeft||e.clientLeft||0,r=c.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=c.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:_.round(h),top:_.round(u)}}function ks(t,i){var s={},e=bs(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function ws(t){return qi(t)&&3===t.nodeType}function _s(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function xs(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),is(t)||ws(t)?t:"string"==typeof t&&/\S/.test(t)?Fi.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Cs(t,i){return xs(_s(t),i)}var Ss,js=ss("querySelector"),Ts=ss("querySelectorAll"),Ms=c.navigator&&c.navigator.userAgent||"",As=/AppleWebKit\/([\d.]+)/i.exec(Ms),Ps=As?C(As.pop()):null,Es=/iPad/i.test(Ms),Ns=/iPhone/i.test(Ms)&&!Es,Is=/iPod/i.test(Ms),Bs=Ns||Es||Is,Fs=(Ss=Ms.match(/OS (\d+)_/i))&&Ss[1]?Ss[1]:null,Ds=/Android/i.test(Ms),$s=function(){var t=Ms.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Rs=Ds&&/webkit/i.test(Ms)&&$s<2.3,Us=Ds&&$s<5&&Ps<537,Os=/Firefox/i.test(Ms),Vs=/Edge/i.test(Ms),Ls=!Vs&&/Chrome/i.test(Ms),Hs=function(){var t=Ms.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),qs=/MSIE\s8\.0/.test(Ms),zs=function(){var t=/MSIE\s(\d+)\.\d/.exec(Ms),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(Ms)&&/rv:11.0/.test(Ms)&&(i=11),i}(),Ws=/Safari/i.test(Ms)&&!Ls&&!Ds&&!Vs,Gs=Ws||Bs,Xs=ts()&&("ontouchstart"in c||c.DocumentTouch&&c.document instanceof c.DocumentTouch),Js=ts()&&"backgroundSize"in c.document.createElement("video").style,Qs=w.freeze({__proto__:null,IS_IPAD:Es,IS_IPHONE:Ns,IS_IPOD:Is,IS_IOS:Bs,IOS_VERSION:Fs,IS_ANDROID:Ds,ANDROID_VERSION:$s,IS_OLD_ANDROID:Rs,IS_NATIVE_ANDROID:Us,IS_FIREFOX:Os,IS_EDGE:Vs,IS_CHROME:Ls,CHROME_VERSION:Hs,IS_IE8:qs,IE_VERSION:zs,IS_SAFARI:Ws,IS_ANY_SAFARI:Gs,TOUCH_ENABLED:Xs,BACKGROUND_SIZE_SUPPORTED:Js});function Ys(t,i){var s=as(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&cs(t)}function Ks(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function Zs(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||c.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Fi),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Fi.documentElement,h=Fi.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var te=!1;!function(){try{var t=w.defineProperty({},"passive",{get:function(){te=!0}});c.addEventListener("test",null,t)}catch(t){}}();var ie=["touchstart","touchmove"];function se(t,i,s){if(Array.isArray(i))return Ks(se,t,i,s);var e=as(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ri()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=Zs(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h<o&&!i.isImmediatePropagationStopped();h++)try{r[h].call(t,i,s)}catch(t){Gi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;te&&ie.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ee(t,i,s){if(us(t)){var e=as(t);if(e.handlers){if(Array.isArray(i))return Ks(ee,t,i,s);var n=function(i){e.handlers[i]=[],Ys(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);Ys(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function ne(t,i,s){var e=us(t)?as(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=Zs(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)ne.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=as(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function re(t,i,s){if(Array.isArray(i))return Ks(re,t,i,s);var e=function e(){ee(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Ri(),se(t,i,e)}var he,oe=!1,ae=function(){if(ts()){var t=Fi.getElementsByTagName("video"),i=Fi.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){ue(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&he(u)}else oe||ue(1)}};function ue(t,i){i&&(he=i),c.setTimeout(ae,t)}ts()&&"complete"===Fi.readyState?oe=!0:re(c,"load",(function(){oe=!0}));var ce=function(t){var i=Fi.createElement("style");return i.className=t,i},le=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},n=function(t,i,s){i.guid||(i.guid=Ri());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function de(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function fe(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&Li(i,(function(i,s){zi(i)?(zi(t[s])||(t[s]={}),t[s]=fe(t[s],i)):t[s]=i}))})),t}var ve=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=fe({},this.h),i=this.h=fe(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+Ri()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),cs(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Gi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=fe(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return es(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=de(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=de(i),s||(s={}),!0===s&&(Gi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new g("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&de(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||de(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))se(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(se(r,h,o),se(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ee(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ee(e,r,h),ee(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))re(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return ne(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return js(t,i||this.contentEl())},i.$$=function(t,i){return Ts(t,i||this.contentEl())},i.hasClass=function(t){return ls(this.v,t)},i.addClass=function(t){return ds(this.v,t),this},i.removeClass=function(t){return fs(this.v,t),this},i.toggleClass=function(t,i){return vs(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return gs(this.v,t,i),this},i.removeAttribute=function(t){return ys(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+de(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new g("currentDimension only accepts width or height value");if("function"==typeof c.getComputedStyle){var s=c.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=C(i))){var e="offset"+de(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=c.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){c.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=c.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){c.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=de(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new g("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=de(i),t.M&&t.M[i]?t.M[i]:c&&c.videojs&&c.videojs[i]?(Gi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),c.videojs[i]):void 0},t.extend=function(i){i=i||{},Gi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();ve.registerComponent("Component",ve);var pe=function(){};function me(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ge(t,i){return(ge=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function ye(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,ge(t,i)}function be(t,i,s,e){return void 0===e&&(Gi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new g("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function ke(t){return void 0===t||0===t.length?{length:0,start:function(){throw new g("This TimeRanges object is empty")},end:function(){throw new g("This TimeRanges object is empty")}}:{length:t.length,start:be.bind(null,"start",0,t),end:be.bind(null,"end",1,t)}}function we(t,i){return Array.isArray(t)?ke(t):void 0===t||void 0===i?ke():ke([[t,i]])}function _e(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=we(0,0));for(var r=0;r<t.length;r++)s=t.start(r),(e=t.end(r))>i&&(e=i),n+=e-s;return n/i}pe.prototype.A={},pe.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},se(this,t,i),this.addEventListener=s},pe.prototype.addEventListener=pe.prototype.on,pe.prototype.off=function(t,i){ee(this,t,i)},pe.prototype.removeEventListener=pe.prototype.off,pe.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},re(this,t,i),this.addEventListener=s},pe.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=Zs(t),this.A[i]&&this["on"+i]&&this["on"+i](t),ne(this,t)},pe.prototype.dispatchEvent=pe.prototype.trigger;var xe,Ce,Se,je,Te={prefixed:!0},Me=[["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"]],Ae=Me[0];for(Ce=0;Ce<Me.length;Ce++)if(Me[Ce][1]in Fi){xe=Me[Ce];break}if(xe){for(Se=0;Se<xe.length;Se++)Te[Ae[Se]]=xe[Se];Te.prefixed=xe[0]!==Ae[0]}function Pe(t){if(t instanceof Pe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:qi(t)&&("number"==typeof t.code&&(this.code=t.code),Hi(this,t)),this.message||(this.message=Pe.defaultMessages[this.code]||"")}for(Pe.prototype.code=0,Pe.prototype.message="",Pe.prototype.status=null,Pe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Pe.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},je=0;je<Pe.errorTypes.length;je++)Pe[Pe.errorTypes[je]]=je,Pe.prototype[Pe.errorTypes[je]]=je;var Ee=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Ne=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Ie=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=Ne(t.track);return t.src&&(i.src=t.src),i})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===s.indexOf(t)})).map(Ne))},Be=function(t,i){return t.forEach((function(t){var s=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return s.addCue(t)}))})),i.textTracks()},Fe="vjs-modal-dialog",De=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.I=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=es("div",{className:Fe+"-content"},{role:"document"}),e.B=es("p",{className:Fe+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),ns(e.B,e.description()),e.v.appendChild(e.B),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"F","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return Fe+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.I)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.R=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.R},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.I=!0,s.removeChild(i),this.empty(),Cs(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),_s(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.U=t),this.U},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),ns(this.B,this.description()),this.opened()?this.fill():(this.N||this.I)&&(this.N=!1,this.I=!1,this.empty())},i}(ve);De.prototype.h={pauseOnOpen:!0,temporary:!0},ve.registerComponent("ModalDialog",De);var $e=function(){function t(i){var s=this;if(qs)for(var e in s=Fi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.O.call(s,i),w.defineProperty(s,"length",{get:function(){return this.V}}),qs)return s}var i=t.prototype;return i.O=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.V=t.length;var n=function(t){""+t in this||w.defineProperty(this,""+t,{get:function(){return this.L[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),Re={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ue={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Oe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ve={disabled:"disabled",hidden:"hidden",showing:"showing"},Le=function(t){function i(s){var e;void 0===s&&(s={});var n=me(e=t.call(this)||this);if(qs)for(var r in n=Fi.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Ri()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){w.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||me(e)}return ye(i,t),i}(pe),He=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Fi.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Fi.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Fi.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&Fi.body.removeChild(e),r},qe=function(t){var i=c.location,s=He(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},ze={exports:{}};void 0!==s?ze.exports=s:void 0!==Xi?ze.exports=Xi:"undefined"!=typeof self?ze.exports=self:ze.exports={};var We=function(t){var i=Ge.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==s&&(t===s.setTimeout||t===s.alert||t===s.confirm||t===s.prompt)},Ge=w.prototype.toString;var Xe,Je,Qe,Ye,Ke,Ze,tn,sn,en,nn,rn,hn,on=Array.prototype.slice,an=w.prototype.toString,un=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==an.call(i))throw new b("Function.prototype.bind called on incompatible "+i);for(var s,e=on.call(arguments,1),n=_.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(on.call(arguments)));return w(n)===n?n:this}return i.apply(t,e.concat(on.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},cn=Function.prototype.bind||un,ln=w.prototype.toString,dn=function(t){var i=ln.call(t),s="[object Arguments]"===i;return s||(s="[object Array]"!==i&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===ln.call(t.callee)),s};w.keys||(Je=w.prototype.hasOwnProperty,Qe=w.prototype.toString,Ye=dn,Ke=w.prototype.propertyIsEnumerable,Ze=!Ke.call({toString:null},"toString"),tn=Ke.call((function(){}),"prototype"),sn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],en=function(t){var i=t.constructor;return i&&i.prototype===t},nn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},rn=function(){if(void 0===s)return!1;for(var t in s)try{if(!nn["$"+t]&&Je.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{en(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),hn=function(t){if(void 0===s||!rn)return en(t);try{return en(t)}catch(t){return!1}},Xe=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===Qe.call(t),e=Ye(t),n=i&&"[object String]"===Qe.call(t),r=[];if(!i&&!s&&!e)throw new b("Object.keys called on a non-object");var h=tn&&s;if(n&&t.length>0&&!Je.call(t,0))for(var o=0;o<t.length;++o)r.push(String(o));if(e&&t.length>0)for(var a=0;a<t.length;++a)r.push(String(a));else for(var u in t)h&&"prototype"===u||!Je.call(t,u)||r.push(String(u));if(Ze)for(var c=hn(t),l=0;l<sn.length;++l)c&&"constructor"===sn[l]||!Je.call(t,sn[l])||r.push(sn[l]);return r});var fn=Xe,vn=Array.prototype.slice,pn=dn,mn=w.keys,gn=mn?function(t){return mn(t)}:fn,yn=w.keys;gn.shim=function(){if(w.keys){var t=function(){var t=w.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(w.keys=function(t){return pn(t)?yn(vn.call(t)):yn(t)})}else w.keys=gn;return w.keys||gn};var bn=gn,kn="function"==typeof Mt&&"symbol"==typeof Mt("foo"),wn=w.prototype.toString,_n=Array.prototype.concat,xn=w.defineProperty,Cn=xn&&function(){var t={};try{for(var i in xn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Sn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===wn.call(t)}(e)&&e())&&(Cn?xn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},jn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=bn(i);kn&&(e=_n.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Sn(t,e[n],i[e[n]],s[e[n]])};jn.supportsDescriptors=!!Cn;var Tn,Mn=jn,An=w.getOwnPropertyDescriptor?function(){return w.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new b},Pn="function"==typeof Mt&&"symbol"==typeof Et,En=w.getPrototypeOf||function(t){return t.__proto__},Nn=void 0===j?Tn:En(j),In={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Tn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Tn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Pn?En([][Et]()):Tn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Tn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Tn,"$ %AsyncGenerator%":Tn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Tn,"$ %AsyncIteratorPrototype%":Tn,"$ %Atomics%":"undefined"==typeof Atomics?Tn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Tn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Tn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":g,"$ %ErrorPrototype%":g.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Tn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Tn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Tn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Tn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Tn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Tn,"$ %Int8Array%":"undefined"==typeof Int8Array?Tn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Tn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Tn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Tn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Tn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Tn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":Pn?En(En([][Et]())):Tn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Tn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Pn?En((new Map)[Et]()):Tn,"$ %MapPrototype%":"undefined"==typeof Map?Tn:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":w,"$ %ObjectPrototype%":w.prototype,"$ %ObjProto_toString%":w.prototype.toString,"$ %ObjProto_valueOf%":w.prototype.valueOf,"$ %parseFloat%":C,"$ %parseInt%":x,"$ %Promise%":"undefined"==typeof Promise?Tn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Tn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Tn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Tn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Tn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Tn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Tn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Tn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Tn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Pn?En((new Set)[Et]()):Tn,"$ %SetPrototype%":"undefined"==typeof Set?Tn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Tn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Tn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Pn?En(""[Et]()):Tn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Pn?Mt:Tn,"$ %SymbolPrototype%":Pn?Mt.prototype:Tn,"$ %SyntaxError%":k,"$ %SyntaxErrorPrototype%":k.prototype,"$ %ThrowTypeError%":An,"$ %TypedArray%":Nn,"$ %TypedArrayPrototype%":Nn?Nn.prototype:Tn,"$ %TypeError%":b,"$ %TypeErrorPrototype%":b.prototype,"$ %Uint8Array%":void 0===j?Tn:j,"$ %Uint8ArrayPrototype%":void 0===j?Tn:j.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Tn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Tn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Tn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Tn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Tn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Tn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Tn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Tn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Tn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Tn:WeakSet.prototype},Bn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new b('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in In))throw new k("intrinsic "+t+" does not exist!");if(void 0===In[s]&&!i)throw new b("intrinsic "+t+" exists, but is not available. Please file an issue!");return In[s]},Fn=cn.call(Function.call,w.prototype.hasOwnProperty),Dn=Bn,$n=Dn("%TypeError%"),Rn=Dn("%SyntaxError%"),Un=Fn,On={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(Un(i,e)&&!s[e])return!1;var n=Un(i,"[[Value]]"),r=Un(i,"[[Get]]")||Un(i,"[[Set]]");if(n&&r)throw new $n("Property Descriptors may not be both accessor and data descriptors");return!0}},Vn=Number.isNaN||function(t){return t!=t},Ln=Number.isNaN||function(t){return t!=t},Hn=Number.isFinite||function(t){return"number"==typeof t&&!Ln(t)&&t!==1/0&&t!==-1/0},qn=Function.prototype.toString,zn=/^\s*class\b/,Wn=function(t){try{var i=qn.call(t);return zn.test(i)}catch(t){return!1}},Gn=w.prototype.toString,Xn="function"==typeof Mt&&"symbol"==typeof Mt.toStringTag,Jn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Xn)return function(t){try{return!Wn(t)&&(qn.call(t),!0)}catch(t){return!1}}(t);if(Wn(t))return!1;var i=Gn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},Qn=w.prototype.toString,Yn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},Kn=Jn,Zn=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===Qn.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e<n.length;++e)if(Kn(t[n[e]])&&(s=t[n[e]](),Yn(s)))return s;throw new b("No default value")}throw new b("invalid [[DefaultValue]] hint supplied")},tr=Bn,ir=tr("%Object%"),sr=tr("%TypeError%"),er=tr("%String%"),nr=function(t,i,s,e){var n=On[i];if("function"!=typeof n)throw new Rn("unknown record type: "+i);if(!n(t,e))throw new $n(s+" must be a "+i);console.log(n(t,e),e)},rr=Vn,hr=Hn,or=function(t){return t>=0?1:-1},ar=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},ur=Fn,cr={ToPrimitive:function(t){return Yn(t)?t:arguments.length>1?Zn(t,arguments[1]):Zn(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return rr(i)?0:0!==i&&hr(i)?or(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(rr(i)||0===i||!hr(i))return 0;var s=or(i)*_.floor(_.abs(i));return ar(s,65536)},ToString:function(t){return er(t)},ToObject:function(t){return this.CheckObjectCoercible(t),ir(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new sr(i||"Cannot call method on "+t);return t},IsCallable:Jn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:rr(t)&&rr(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(ur(t,s)&&!i[s])return!1;var e=ur(t,"[[Value]]"),n=ur(t,"[[Get]]")||ur(t,"[[Set]]");if(e&&n)throw new sr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(nr(this,"Property Descriptor","Desc",t),!(!ur(t,"[[Get]]")&&!ur(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(nr(this,"Property Descriptor","Desc",t),!(!ur(t,"[[Value]]")&&!ur(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(nr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(nr(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new sr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new sr("ToPropertyDescriptor requires an object");var i={};if(ur(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),ur(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),ur(t,"value")&&(i["[[Value]]"]=t.value),ur(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),ur(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new b("getter must be a function");i["[[Get]]"]=s}if(ur(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new sr("setter must be a function");i["[[Set]]"]=e}if((ur(i,"[[Get]]")||ur(i,"[[Set]]"))&&(ur(i,"[[Value]]")||ur(i,"[[Writable]]")))throw new sr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},lr=cn.call(Function.call,String.prototype.replace),dr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,fr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,vr=function(){var t=cr.ToString(cr.CheckObjectCoercible(this));return lr(lr(t,dr,""),fr,"")},pr=vr,mr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:pr},gr=Mn,yr=mr,br=Mn,kr=vr,wr=mr,_r=function(){var t=yr();return gr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},xr=cn.call(Function.call,wr());br(xr,{getPolyfill:wr,implementation:kr,shim:_r});var Cr=xr,Sr=Jn,jr=w.prototype.toString,Tr=w.prototype.hasOwnProperty,Mr=Cr,Ar=function(t,i,s){if(!Sr(i))throw new b("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===jr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Tr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e):"string"==typeof t?function(t,i,s){for(var e=0,n=t.length;e<n;e++)null==s?i(t.charAt(e),e,t):i.call(s,t.charAt(e),e,t)}(t,i,e):function(t,i,s){for(var e in t)Tr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Pr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Er.call(s,e)&&(t[e]=s[e])}return t},Er=w.prototype.hasOwnProperty;var Nr=ze.exports,Ir=We,Br=function(t){if(!t)return{};var i={};return Ar(Mr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Mr(t.slice(0,s)).toLowerCase(),n=Mr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===w.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Fr=Pr,Dr=Rr;function $r(t,i,s){var e=t;return Ir(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Fr(i,{uri:t}),e.callback=s,e}function Rr(t,i,s){return Ur(i=$r(t,i,s))}function Ur(t){if(void 0===t.callback)throw new g("callback argument missing");var i=!1,s=function(s,e,n){i||(i=!0,t.callback(s,e,n))};function e(){var t=void 0;if(t=c.response?c.response:c.responseText||function(t){if("document"===t.responseType)return t.responseXML;var i=204===t.status&&t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!i)return t.responseXML;return null}(c),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:c};function r(t){return v(l),t instanceof g||(t=new g(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;v(l),i=t.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:f,headers:{},url:d,rawRequest:c},c.getAllResponseHeaders&&(r.headers=Br(c.getAllResponseHeaders()))):h=new g("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,c=t.xhr||null;c||(c=t.cors||t.useXDR?new Rr.XDomainRequest:new Rr.XMLHttpRequest);var l,d=c.url=t.uri||t.url,f=c.method=t.method||"GET",p=t.body||t.data||null,m=c.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(t.json))),c.onreadystatechange=function(){4===c.readyState&&h()},c.onload=h,c.onerror=r,c.onprogress=function(){},c.ontimeout=r,c.open(f,d,!y,t.username,t.password),y||(c.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(l=u((function(){a=!0,c.abort("timeout");var t=new g("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),c.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&c.setRequestHeader(o,m[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new g("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(c),c.send(p),c}Rr.XMLHttpRequest=Nr.XMLHttpRequest||function(){},Rr.XDomainRequest="withCredentials"in new Rr.XMLHttpRequest?Rr.XMLHttpRequest:Nr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Rr["delete"===t?"del":t]=function(i,s,e){return(s=$r(i,s,e)).method=t.toUpperCase(),Ur(s)}}));var Or=function(t,i){var s=new c.WebVTT.Parser(c,c.vttjs,c.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(c.console&&c.console.groupCollapsed&&c.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return Gi.error(t)})),c.console&&c.console.groupEnd&&c.console.groupEnd()),s.flush()},Vr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new g("A tech was not provided.");var r=fe(s,{kind:Oe[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=Ve[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,qs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var l=new $e(a.L),d=new $e(a.q),f=!1,v=n(a,(function(){this.activeCues,f&&(this.trigger("cuechange"),f=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",v)}),!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;Ve[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",v)}),!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?l:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return d;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(f=!1,i.length!==this.q.length)f=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(f=!0);return this.q=i,d.O(this.q),d},set:function(){}}),r.src?(a.src=r.src,function(t,i){var s={uri:t},e=qe(t);e&&(s.cors=e),Dr(s,n(this,(function(t,s,e){if(t)return Gi.error(t,s);if(i.W=!0,"function"!=typeof c.WebVTT){if(i.H){var n=function(){return Or(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){Gi.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else Or(e,i)})))}(r.src,a)):a.W=!0,a||me(e)}ye(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(c.vttjs&&!(t instanceof c.vttjs.VTTCue)){for(var s in i=new c.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.O(this.L)},s.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.O(this.L);break}}},i}(Le);Vr.prototype.A={cuechange:"cuechange"};var Lr=function(t){function i(s){var e,n;void 0===s&&(s={});var r=me(e=t.call(this)||this);if(qs)for(var h in r=Fi.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new Vr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,w.defineProperty(r,"readyState",{get:function(){return n}}),w.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),qs?r||me(e):e}return ye(i,t),i}(pe);Lr.prototype.A={load:"load"},Lr.NONE=0,Lr.LOADING=1,Lr.LOADED=2,Lr.ERROR=3;var Hr,qr=function(){function t(i){void 0===i&&(i=[]);var s=this;if(qs)for(var e in s=Fi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],w.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(qs)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),zr=function(t){function i(s,e){var n;if(void 0===s&&(s=[]),void 0===e&&(e=null),n=t.call(this)||this,!e&&(e=me(n),qs))for(var r in e=Fi.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],w.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||me(n)}ye(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(pe);for(Hr in zr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},zr.prototype.A)zr.prototype["on"+Hr]=null;var Wr=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),qs){for(var r in n=Fi.createElement("custom"),zr.prototype)"constructor"!==r&&(n[r]=zr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||me(e)}return ye(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",n(this,(function(){this.trigger("change")})))},i}(zr),Gr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Xr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){Gr(s,s[r]);break}if(qs){for(var h in n=Fi.createElement("custom"),zr.prototype)"constructor"!==h&&(n[h]=zr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||me(e)}ye(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&Gr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,Gr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(zr),Jr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},Qr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].enabled){Jr(s,s[r]);break}if(qs){for(var h in n=Fi.createElement("custom"),zr.prototype)"constructor"!==h&&(n[h]=zr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||me(e)}ye(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Jr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Jr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(zr),Yr=void 0;var Kr=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new Wr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}ye(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return we(0,0)},s.bufferedPercent=function(){return _e(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Pe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?we(0,0):we()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!c.WebVTT)if(Fi.body.contains(this.el())){if(!this.h["vtt.js"]&&zi(Yr)&&w.keys(Yr).length>0)return void this.trigger("vttjsloaded");var i=Fi.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),c.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new Xr,this.rt},s.audioTracks=function(){return this.ht=this.ht||new Qr,this.ht},s.textTracks=function(){return this.nt=this.nt||new Wr,this.nt},s.remoteTextTracks=function(){return this.ft=this.ft||new Wr,this.ft},s.remoteTextTrackEls=function(){return this.vt=this.vt||new qr,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new g("TextTrack kind is required but was not provided");return function(t,i,s,e,n){void 0===n&&(n={});var r=t.textTracks();n.kind=i,s&&(n.label=s),e&&(n.language=e),n.tech=t;var h=new Vr(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=fe(t,{tech:this});return new Lr(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Gi.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new g("Tech "+t+" must be a Tech");return i.gt[t]=s,s},i.getTech=function(t){return i.gt&&i.gt[t]?i.gt[t]:c&&c.videojs&&c.videojs[t]?(Gi.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),c.videojs[t]):void 0},i}(ve);Kr.prototype.nt,Kr.prototype.ht,Kr.prototype.rt,Kr.prototype.featuresVolumeControl=!0,Kr.prototype.featuresFullscreenResize=!1,Kr.prototype.featuresPlaybackRate=!1,Kr.prototype.featuresProgressEvents=!1,Kr.prototype.featuresTimeupdateEvents=!1,Kr.prototype.featuresNativeTextTracks=!1,Kr.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:Gi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},ve.registerComponent("Tech",Kr),ve.registerComponent("MediaTechController",Kr),Kr.registerTech("Tech",Kr);var Zr=function(t){function i(i,s,e){var n;if(n=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var r=0,h=s.playerOptions.techOrder;r<h.length;r++){var o=de(h[r]),a=Kr.getTech(o);if(o||(a=ve.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return ye(i,t),i}(ve);ve.registerComponent("MediaLoader",Zr);var th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).emitTapEvents(),e.on(i,"languagechange",e.handleLanguagechange),e.enable(),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=Hi({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&Gi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=Hi({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=es("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.setAttribute("tabIndex",this.xt),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.St)},s.handleClick=function(t){},s.handleFocus=function(t){se(Fi,"keydown",n(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){ee(Fi,"keydown",n(this,this.handleKeyPress))},i}(ve);ve.registerComponent("ClickableComponent",th);var ih=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",n(me(e),e.update)),e}ye(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=es("div",{className:"vjs-poster",tabIndex:-1});return Js||(this.jt=es("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(th);ve.registerComponent("PosterImage",ih);var sh="#222",eh={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function nh(t,i){return"rgba("+x(t[1]+t[1],16)+","+x(t[2]+t[2],16)+","+x(t[3]+t[3],16)+","+i+")"}function rh(t,i,s){try{t.style[i]=s}catch(t){return}}var hh=function(t){function i(i,s,e){var r;return r=t.call(this,i,s,e)||this,i.on("loadstart",n(me(r),r.toggleDisplay)),i.on("texttrackchange",n(me(r),r.updateDisplay)),i.ready(n(me(r),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",n(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,r,h={captions:1,subtitles:1},o=this.t.textTracks();if(o){for(var a=0;a<o.length;a++){var u=o[a];u.default&&("descriptions"!==u.kind||e?u.kind in h&&!r&&(r=u):e=u)}r?r.mode="showing":e&&(e.mode="showing")}}}))),r}ye(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof c.WebVTT&&c.WebVTT.processCues(c,[],this.v)},s.updateDisplay=function(){var t=this.t.textTracks();if(this.clearDisplay(),t){for(var i=null,s=null,e=t.length;e--;){var n=t[e];"showing"===n.mode&&("descriptions"===n.kind?i=n:s=n)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}},s.updateForTrack=function(t){if("function"==typeof c.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);c.WebVTT.processCues(c,s,this.v);for(var n=s.length;n--;){var r=s[n];if(r){var h=r.displayState;if(i.color&&(h.firstChild.style.color=i.color),i.textOpacity&&rh(h.firstChild,"color",nh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&rh(h.firstChild,"backgroundColor",nh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?rh(h,"backgroundColor",nh(i.windowColor,i.windowOpacity)):h.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+sh:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+sh:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+sh:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+sh)),i.fontPercent&&1!==i.fontPercent){var o=c.parseFloat(h.style.fontSize);h.style.fontSize=o*i.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=eh[i.fontFamily])}}}},i}(ve);ve.registerComponent("TextTrackDisplay",hh);var oh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(ve);ve.registerComponent("LoadingSpinner",oh);var ah=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=Hi({className:this.buildCSSClass()},i),"button"!==t&&(Gi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=Hi({tabIndex:0},i),s=Hi({role:"button"},s)),s=Hi({type:"button","aria-live":"polite"},s);var e=ve.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return Gi.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),ve.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(th);ve.registerComponent("Button",ah);var uh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(ah);uh.prototype.St="Play Video",ve.registerComponent("BigPlayButton",uh);var ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(ah);ve.registerComponent("CloseButton",ch);var lh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"play",e.handlePlay),e.on(i,"pause",e.handlePause),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.paused()?this.t.play():this.t.pause()},s.handlePlay=function(t){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},s.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i}(ah);function dh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=_.floor(t%60),e=_.floor(t/60%60),n=_.floor(t/3600),r=_.floor(i/60%60),h=_.floor(i/3600);return(S(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}lh.prototype.St="Play",ve.registerComponent("PlayToggle",lh);var fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=es("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=dh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(ve);ve.registerComponent("CurrentTimeDisplay",fh);var vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=es("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=dh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(ve);ve.registerComponent("DurationDisplay",vh);var ph=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},i}(ve);ve.registerComponent("TimeDivider",ph);var mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=es("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=dh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(ve);ve.registerComponent("RemainingTimeDisplay",mh);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=es("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=es("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Fi.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(ve);ve.registerComponent("LiveDisplay",gh);var yh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=Hi({tabIndex:0},s),e=Hi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Fi.body.focus(),Fi.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Fi.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=ks(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(ve);function bh(t,i){if(!t||!i)return"";if("function"==typeof c.getComputedStyle){var s=c.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}ve.registerComponent("Slider",yh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Et=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Nt=es("span",{innerHTML:this.localize("Loaded")}),this.It=Fi.createTextNode(": 0%"),this.Ct=es("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Nt),this.Ct.appendChild(this.It),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.v.appendChild(es()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Loaded")},i}(ve);ve.registerComponent("LoadProgressBar",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(me(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Bt=es("span",{innerHTML:this.localize("Progress")}),this.Ft=Fi.createTextNode(": 0%"),this.Ct=es("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",dh(i,this.t.duration()))},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(ve);ve.registerComponent("PlayProgressBar",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(me(e),e.updateDataAttr)),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=es("div",{className:"vjs-time-tooltip"}),this.Bt=es("span",{innerHTML:this.localize("Progress")}),this.Ft=Fi.createTextNode(": 0%"),this.Ct=es("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=dh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(ve);ve.registerComponent("TooltipProgressBar",_h);var xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(me(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(bh(this.player().el(),"width")),s=C(bh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",dh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(yh);xh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},xh.prototype.playerEvent="timeupdate",ve.registerComponent("SeekBar",xh);var Ch=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=es("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(me(e),e.handleMouseMove),25))})),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-bs(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=dh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(bh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ks(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(bh(this.player().el(),"width")),s=C(bh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(ve);ve.registerComponent("MouseTimeDisplay",Ch);var Sh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(ve);Sh.prototype.h={children:["seekBar"]},ve.registerComponent("ProgressControl",Sh);var jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(ah);jh.prototype.St="Fullscreen",ve.registerComponent("FullscreenToggle",jh);var Th=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},i}(ve);ve.registerComponent("VolumeLevel",Th);var Mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(me(e),e.updateARIAAttributes)),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(yh);Mh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Mh.prototype.playerEvent="volumechange",ve.registerComponent("VolumeBar",Mh);var Ah=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(ve);Ah.prototype.h={children:["volumeBar"]},ve.registerComponent("VolumeControl",Ah);var Ph=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=es(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),se(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(ve);ve.registerComponent("Popup",Ph);var Eh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}ye(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(th);ve.registerComponent("PopupButton",Eh);var Nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)fs(this.v,"vjs-vol-"+n);ds(this.v,"vjs-vol-"+s)},i}(ah);Nh.prototype.St="Mute",ve.registerComponent("MuteToggle",Nh);var Ih=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(me(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],(function(){this.addClass("vjs-slider-active")})),e.on(e.volumeBar,["sliderinactive","blur"],(function(){this.removeClass("vjs-slider-active")})),e.on(e.volumeBar,["focus"],(function(){this.addClass("vjs-lock-showing")})),e.on(e.volumeBar,["blur"],(function(){this.removeClass("vjs-lock-showing")})),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new Ph(this.t,{contentElType:"div"}),i=new Mh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Nh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Eh);Ih.prototype.volumeUpdate=Nh.prototype.update,Ih.prototype.St="Mute",ve.registerComponent("VolumeMenuButton",Ih);var Bh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}ye(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=es(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),se(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(ve);ve.registerComponent("Menu",Bh);var Fh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Rt=!0,e.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}ye(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Bh(this.t);if(this.Ot=0,this.h.title){var i=es("li",{className:"vjs-menu-title",innerHTML:de(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),rs(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",n(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ut?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ut&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ut||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ut&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ut=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.Rt=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Rt=!0,t.prototype.enable.call(this)},i}(th);ve.registerComponent("MenuButton",Fh);var Dh=function(t){function i(i,s){var e,r=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!r)return me(e);var h=n(me(e),e.update);return r.addEventListener("removetrack",h),r.addEventListener("addtrack",h),e.t.on("dispose",(function(){r.removeEventListener("removetrack",h),r.removeEventListener("addtrack",h)})),e}return ye(i,t),i}(Fh);ve.registerComponent("TrackButton",Dh);var $h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).selectable=s.selectable,e.selected(s.selected),e.selectable?e.v.setAttribute("role","menuitemcheckbox"):e.v.setAttribute("role","menuitem"),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",Hi({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Vt=Fi.createTextNode(this.localize(this.h.label)),n.appendChild(this.Vt),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Vt.innerHTML=this.localize(this.h.label)},i}(th);ve.registerComponent("MenuItem",$h);var Rh=function(t){function i(i,s){var e,r,h=s.track,o=i.textTracks();if(s.label=h.label||h.language||"Unknown",s.selected=h.default||"showing"===h.mode,(e=t.call(this,i,s)||this).track=h,o){var a=n(me(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),e.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof c.Event)try{r=new c.Event("change")}catch(t){}r||(r=Fi.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.t.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}($h);ve.registerComponent("TextTrackMenuItem",Rh);var Uh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" off",default:!1,mode:"disabled"},s.selectable=!0,(e=t.call(this,i,s)||this).selected(!0),e}return ye(i,t),i.prototype.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!0,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind===this.track.kind&&"showing"===r.mode){s=!1;break}}this.selected(s)},i}(Rh);ve.registerComponent("OffTextTrackMenuItem",Uh);var Oh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return ye(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Uh(this.t,{kind:this.Lt})),this.Ot+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Lt&&t.push(new Rh(this.t,{track:e,selectable:!0}))}return t},i}(Dh);ve.registerComponent("TextTrackButton",Oh);var Vh=function(t){function i(i,s){var e,r=s.track,h=s.cue,o=i.currentTime();return s.selectable=!0,s.label=h.text,s.selected=h.startTime<=o&&o<h.endTime,(e=t.call(this,i,s)||this).track=r,e.cue=h,r.addEventListener("cuechange",n(me(e),e.update)),e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.t.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.t.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}($h);ve.registerComponent("ChaptersTrackMenuItem",Vh);var Lh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.qt||(this.qt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.qt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.qt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(de(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new Vh(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(Oh);Lh.prototype.Lt="chapters",Lh.prototype.St="Chapters",ve.registerComponent("ChaptersButton",Lh);var Hh=function(t){function i(i,s,e){var r;(r=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var h=i.textTracks();if(h){var o=n(me(r),r.handleTracksChange);h.addEventListener("change",o),r.on("dispose",(function(){h.removeEventListener("change",o)}))}return r}ye(i,t);var s=i.prototype;return s.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!1,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind!==this.Lt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(Oh);Hh.prototype.Lt="descriptions",Hh.prototype.St="Descriptions",ve.registerComponent("DescriptionsButton",Hh);var qh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return ye(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Oh);qh.prototype.Lt="subtitles",qh.prototype.St="Subtitles",ve.registerComponent("SubtitlesButton",qh);var zh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" settings",selectable:!1,default:!1,mode:"disabled"},s.selectable=!1,(e=t.call(this,i,s)||this).addClass("vjs-texttrack-settings"),e.controlText(", opens "+s.kind+" settings dialog"),e}return ye(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(Rh);ve.registerComponent("CaptionSettingsMenuItem",zh);var Wh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Captions Menu"),n}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(){var i=[];return this.player().H&&this.player().H.featuresNativeTextTracks||(i.push(new zh(this.t,{kind:this.Lt})),this.Ot+=1),t.prototype.createItems.call(this,i)},i}(Oh);Wh.prototype.Lt="captions",Wh.prototype.St="Captions",ve.registerComponent("CaptionsButton",Wh);var Gh=function(t){function i(i,s){var e,r=s.track,h=i.audioTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.enabled,(e=t.call(this,i,s)||this).track=r,h){var o=n(me(e),e.handleTracksChange);h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}return e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.t.audioTracks();if(t.prototype.handleClick.call(this,i),s)for(var e=0;e<s.length;e++){var n=s[e];n.enabled=n===this.track}},s.handleTracksChange=function(t){this.selected(this.track.enabled)},i}($h);ve.registerComponent("AudioTrackMenuItem",Gh);var Xh=function(t){function i(i,s){var e;return void 0===s&&(s={}),s.tracks=i.audioTracks&&i.audioTracks(),(e=t.call(this,i,s)||this).v.setAttribute("aria-label","Audio Menu"),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Ot=1;var i=this.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new Gh(this.t,{track:e,selectable:!0}))}return t},i}(Dh);Xh.prototype.St="Audio Track",ve.registerComponent("AudioTrackButton",Xh);var Jh=function(t){function i(i,s){var e,n=s.rate,r=C(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.update=function(t){this.selected(this.player().playbackRate()===this.rate)},i}($h);Jh.prototype.contentElType="button",ve.registerComponent("PlaybackRateMenuItem",Jh);var Qh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateVisibility(),e.updateLabel(),e.on(i,"loadstart",e.updateVisibility),e.on(i,"ratechange",e.updateLabel),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vt=es("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Vt),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Bh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Jh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Fh);Qh.prototype.St="Playback Rate",ve.registerComponent("PlaybackRateMenuButton",Qh);var Yh=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(ve);ve.registerComponent("Spacer",Yh);var Kh=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML="&nbsp;",i},i}(Yh);ve.registerComponent("CustomControlSpacer",Kh);var Zh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(ve);Zh.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},ve.registerComponent("ControlBar",Zh);var to=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(De);to.prototype.h=fe(De.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ve.registerComponent("ErrorDisplay",to);var io="vjs-text-track-settings",so=["#000","Black"],eo=["#00F","Blue"],no=["#0FF","Cyan"],ro=["#0F0","Green"],ho=["#F0F","Magenta"],oo=["#F00","Red"],ao=["#FFF","White"],uo=["#FF0","Yellow"],co=["1","Opaque"],lo=["0.5","Semi-Transparent"],fo=["0","Transparent"],vo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[so,ao,oo,ro,eo,uo,ho,no]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[co,lo,fo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ao,so,oo,ro,eo,uo,ho,no]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[co,lo]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[fo,lo,co]}};function po(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}vo.windowColor.options=vo.backgroundColor.options;var mo,go=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(me(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),Li(vo,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}ye(i,t);var s=i.prototype;return s.zt=function(t){var i=this,s=vo[t],e=s.id.replace("%s",this.o);return[es("label",{className:"vjs-label",textContent:s.label},{for:e}),es("select",{id:e},void 0,s.options.map((function(t){return es("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Wt=function(){var t=es("legend",{textContent:this.localize("Text")}),i=this.zt("color"),s=es("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return es("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=es("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),s=es("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return es("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=es("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),s=es("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return es("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return es("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=es("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=es("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),s=es("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return es("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=es("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=es("button",{className:"vjs-done-button",textContent:"Done"});return es("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=es("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=es("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=es("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=es("div",void 0,{role:"document"},[i,s,t]);return es("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Vi(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(vo,(function(i,s,e){var n=function(t,i){return po(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;Li(vo,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(po(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;Li(vo,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(c.localStorage.getItem(io))}catch(t){Gi.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{w.keys(t).length?c.localStorage.setItem(io,JSON.stringify(t)):c.localStorage.removeItem(io)}catch(t){Gi.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(ve);ve.registerComponent("TextTrackSettings",go);var yo,bo=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var r=i.source,h=!1;if(r&&(e.v.currentSrc!==r.src||i.tag&&3===i.tag.Kt)?e.setSource(r):e.Zt(e.v),e.v.hasChildNodes()){for(var o=e.v.childNodes,a=o.length,u=[];a--;){var c=o[a];"track"===c.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(c),e.remoteTextTracks().tt(c.track),h||e.v.hasAttribute("crossorigin")||!qe(c.src)||(h=!0)):u.push(c))}for(var l=0;l<u.length;l++)e.v.removeChild(u[l])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=de(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(h&&Gi.warn(Yi(mo||(mo=Di(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=n(me(e),e.handleTextTrackChange),e.hi=n(me(e),e.handleTextTrackAdd),e.oi=n(me(e),e.handleTextTrackRemove),e.ai()),e.ci(),(Xs||Ns||Us)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}ye(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=de(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.ci=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=Fi.createElement("video");var e=fe({},this.h.tag&&ms(this.h.tag));Xs&&!0===this.h.nativeControlsForTouch||delete e.controls,ps(t,Hi(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&gs(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?gs(t,h,h):ys(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.ni=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.it(a)}}},s.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){Gi(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&Ds&&Ls&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=c.navigator&&c.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Fi.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),c.performance&&"function"==typeof c.performance.now?t.creationTime=c.performance.now():c.performance&&c.performance.timing&&"number"==typeof c.performance.timing.navigationStart&&(t.creationTime=c.Date.now()-c.performance.timing.navigationStart),t},i}(Kr);ts()&&(bo.TEST_VID=Fi.createElement("video"),(yo=Fi.createElement("track")).kind="captions",yo.srclang="en",yo.label="English",bo.TEST_VID.appendChild(yo)),bo.isSupported=function(){try{bo.TEST_VID.volume=.5}catch(t){return!1}return!(!bo.TEST_VID||!bo.TEST_VID.canPlayType)},bo.canControlVolume=function(){try{var t=bo.TEST_VID.volume;return bo.TEST_VID.volume=t/2+.1,t!==bo.TEST_VID.volume}catch(t){return!1}},bo.canControlPlaybackRate=function(){if(Ds&&Ls&&Hs<58)return!1;try{var t=bo.TEST_VID.playbackRate;return bo.TEST_VID.playbackRate=t/2+.1,t!==bo.TEST_VID.playbackRate}catch(t){return!1}},bo.supportsNativeTextTracks=function(){return Gs},bo.supportsNativeVideoTracks=function(){return!(!bo.TEST_VID||!bo.TEST_VID.videoTracks)},bo.supportsNativeAudioTracks=function(){return!(!bo.TEST_VID||!bo.TEST_VID.audioTracks)},bo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],bo.prototype.featuresVolumeControl=bo.canControlVolume(),bo.prototype.featuresPlaybackRate=bo.canControlPlaybackRate(),bo.prototype.movingMediaElementInDOM=!Bs,bo.prototype.featuresFullscreenResize=!0,bo.prototype.featuresProgressEvents=!0,bo.prototype.featuresTimeupdateEvents=!0,bo.prototype.featuresNativeTextTracks=bo.supportsNativeTextTracks(),bo.prototype.featuresNativeVideoTracks=bo.supportsNativeVideoTracks(),bo.prototype.featuresNativeAudioTracks=bo.supportsNativeAudioTracks();var ko=bo.TEST_VID&&bo.TEST_VID.constructor.prototype.canPlayType,wo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,_o=/^video\/mp4/i;bo.patchCanPlayType=function(){$s>=4&&!Os?bo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&wo.test(t)?"maybe":ko.call(this,t)}:Rs&&(bo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&_o.test(t)?"maybe":ko.call(this,t)})},bo.unpatchCanPlayType=function(){var t=bo.TEST_VID.constructor.prototype.canPlayType;return bo.TEST_VID.constructor.prototype.canPlayType=ko,t},bo.patchCanPlayType(),bo.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},bo.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){bo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){bo.prototype["set"+de(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){bo.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){bo.prototype["set"+de(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){bo.prototype[t]=function(){return this.v[t]()}})),Kr.withSourceHandlers(bo),bo.nativeSourceHandler={},bo.nativeSourceHandler.canPlayType=function(t){try{return bo.TEST_VID.canPlayType(t)}catch(t){return""}},bo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return bo.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return bo.nativeSourceHandler.canPlayType("video/"+s)}return""},bo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},bo.nativeSourceHandler.dispose=function(){},bo.registerSourceHandler(bo.nativeSourceHandler),ve.registerComponent("Html5",bo),Kr.registerTech("Html5",bo);var xo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Co=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",Ri()].join("_"),(e=Hi(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(ms(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new g("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&ms(s),r.language(r.h.language),e.languages){var a={};w.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=i.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,s.controls=!1,r.yi=!1,r.v=r.createEl();var u=fe(r.h);if(e.plugins){var c=e.plugins;w.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):Gi.error("Unable to find plugin:",t)}),me(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.bi()&&r.addClass("vjs-no-flex"),Bs||r.addClass("vjs-workinghover"),i.players[r.o]=me(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}ye(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),i.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.Ci=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=ms(s);if(w.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==c.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=ce("vjs-styles-dimensions");var r=js(".vjs-styles-defaults"),h=js("head");h.insertBefore(this.xi,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);ds(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),rs(s,i),this.m.unshift(s),this.v=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=C(i);if(S(e))return Gi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},s.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},s.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new g("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},s.Mi=function(){if(!0!==c.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/n:this.videoWidth()||300,i=void 0!==this.Ti?this.Ti:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),le(this.xi,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.ji?this.ji:this.h.width,h="number"==typeof this.Ti?this.Ti:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(Kr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ni=t,this.j=!1;var e=Hi({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Bi=i.type,i.src===this.pi.src&&this.pi.currentTime>0&&(e.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=i,this.pi.src=i.src);var r=Kr.getTech(t);r||(r=ve.getComponent(t)),this.H=new r(e),this.H.ready(n(this,this.Fi),!0),Be(this.Di||[],this.H),xo.forEach((function(t){s.on(s.H,t,s["handleTech"+de(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Ui),this.on(this.H,"canplaythrough",this.Oi),this.on(this.H,"playing",this.Vi),this.on(this.H,"ended",this.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.qi),this.on(this.H,"play",this.zi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||rs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Ie(this.H),this.j=!1,this.H.dispose(),this.H=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw c.alert(i),new g(i)},s.ts=function(){this.ss(),this.on(this.H,"mousedown",this.es),this.on(this.H,"touchstart",this.ns),this.on(this.H,"touchmove",this.rs),this.on(this.H,"touchend",this.hs),this.on(this.H,"tap",this.os)},s.ss=function(){this.off(this.H,"tap",this.os),this.off(this.H,"touchstart",this.ns),this.off(this.H,"touchmove",this.rs),this.off(this.H,"touchend",this.hs),this.off(this.H,"mousedown",this.es)},s.Fi=function(){if(this.triggerReady(),this.pi.volume&&this.us("setVolume",this.pi.volume),this.Yi(),this.Xi(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){Gi("deleting tag.poster throws in some browsers",t)}this.play()}},s.$i=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},s.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},s.zi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.qi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Wi=function(){this.h.starttime&&(Gi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},s.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Xi=function(){this.duration(this.Zi("duration"))},s.es=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},s.os=function(){this.userActive(!this.userActive())},s.ns=function(){this.userWasActive=this.userActive()},s.rs=function(){this.userWasActive&&this.reportUserActivity()},s.hs=function(t){t.cancelable&&t.preventDefault()},s.wi=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s._i=function(){this.reportUserActivity()},s.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Qi=function(){var t=this.H.error();this.error(t)},s.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.pi},s.us=function(t,i){if(this.H&&!this.H.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw Gi(t),t}},s.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Gi("Video.js: "+t+" method not defined for "+this.Ni+" playback technology.",i):"TypeError"===i.name?(Gi("Video.js: "+t+" unavailable on "+this.Ni+" playback technology element.",i),this.H.j=!1):Gi(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.us("pause"),this},s.paused=function(){return!1!==this.Zi("paused")},s.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},s.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=C(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=we(0,0)),t},s.bufferedPercent=function(){return _e(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,C(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=C(this.Zi("volume")),S(i)?1:i)},s.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},s.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},s.requestFullscreen=function(t){var i,s=Te;return this.isFullscreen(!0),s.requestFullscreen?(se(Fi,s.fullscreenchange,n(this,(function t(i){this.isFullscreen(Fi[s.fullscreenElement]),!1===this.isFullscreen()&&ee(Fi,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Te;return this.isFullscreen(!1),t.requestFullscreen?Fi[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Fi.documentElement.style.overflow,se(Fi,"keydown",n(this,this.fullWindowOnEscKey)),Fi.documentElement.style.overflow="hidden",ds(Fi.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,ee(Fi,"keydown",this.fullWindowOnEscKey),Fi.documentElement.style.overflow=this.docOrigOverflow,fs(Fi.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=de(e[s]),r=Kr.getTech(n);if(r||(r=ve.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else Gi.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.h.techOrder.map(de).map((function(t){return[t,Kr.getTech(t)||ve.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(Gi.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},r=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.h[e.toLowerCase()]))return{source:i,tech:e}};return(this.h.sourceOrder?n(t,e,(i=r,function(t,s){return i(s,t)})):n(e,t,r))||!1},s.src=function(t){if(void 0===t)return this.Zi("src");var i=Kr.getTech(this.Ni);return i||(i=ve.getComponent(this.Ni)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof w&&(t.type&&!i.canPlaySource(t,this.h[this.Ni.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Bi=t.type||"",this.ready((function(){i.prototype.hasOwnProperty("setSource")?this.us("setSource",t):this.us("src",t.src),"auto"===this.h.preload&&this.load(),this.h.autoplay&&this.play()}),!0))),this},s.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ni?this.src(i.source):this._t(i.tech,i.source),this.pi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.h.notSupportedMessage)})}),0),this.triggerReady())},s.load=function(){return this.us("load"),this},s.reset=function(){return this._t(de(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==w.keys(t).length&&i.push(t),this.pi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},s.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},s.currentType=function(){return this.Bi||""},s.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},s.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},s.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},s.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},s.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},s.controls=function(t){return void 0!==t?(t=!!t,this.gi!==t&&(this.gi=t,this.usingNativeControls()&&this.us("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ts()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.ss())),this):!!this.gi},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},s.error=function(t){return void 0===t?this.lt||null:null===t?(this.lt=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.lt=new Pe(t),this.addClass("vjs-error"),Gi.error("(CODE:"+this.lt.code+" "+Pe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.fs=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},s.ki=function(){var t,i,s,e,r=n(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,r())})),this.on("mouseup",(function(i){r(),this.clearInterval(t)})),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Xr,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new Qr,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},s.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.language=function(t){return void 0===t?this.gs:(this.gs!==String(t).toLowerCase()&&(this.gs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},s.languages=function(){return fe(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=fe(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=fe(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new De(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=ms(t),e=s["data-setup"];if(ls(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ee(e||"{}"),r=n[0],h=n[1];r&&Gi.error(r),Hi(s,h)}if(Hi(i,s),t.hasChildNodes())for(var o=t.childNodes,a=0,u=o.length;a<u;a++){var c=o[a],l=c.nodeName.toLowerCase();"source"===l?i.sources.push(ms(c)):"track"===l&&i.tracks.push(ms(c))}return i},s.bi=function(){var t=Fi.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(ve);Co.players={};var So=c.navigator;Co.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:So&&(So.languages&&So.languages[0]||So.userLanguage||So.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Co.prototype[t]=function(){return this.Zi(t)}})),xo.forEach((function(t){Co.prototype["handleTech"+de(t)+"_"]=function(){return this.trigger(t)}})),ve.registerComponent("Player",Co);var jo,To,Mo=function(t){function i(s){var e;void 0===s&&(s={});var n=fe(s,{kind:Ue[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(qs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.W=!0,r||me(e)}return ye(i,t),i}(Le),Ao=function(t){function i(s){var e;void 0===s&&(s={});var n=fe(s,{kind:Re[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(qs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"selected",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("selectedchange"))}}),n.selected&&(r.selected=n.selected),r||me(e)}return ye(i,t),i}(Le);function Po(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Po.getPlayers()[t])return i&&Gi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Po.getPlayers()[t].ready(s),Po.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Fi.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new b("The element or ID supplied is not valid. (videojs)");if(e.player||Co.players[e.playerId])return e.player||Co.players[e.playerId];i=i||{},Po.hooks("beforesetup").forEach((function(t){var s=t(e,fe(i));qi(s)&&!Array.isArray(s)?i=fe(i,s):Gi.error("please return an object in beforesetup hooks")}));var n=new(ve.getComponent("Player"))(e,i,s);return Po.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&ts()&&(Fi.createElement("video"),Fi.createElement("audio"),Fi.createElement("track")),Po.ys={},Po.hooks=function(t,i){return Po.ys[t]=Po.ys[t]||[],i&&(Po.ys[t]=Po.ys[t].concat(i)),Po.ys[t]},Po.hook=function(t,i){Po.hooks(t,i)},Po.removeHook=function(t,i){var s=Po.hooks(t).indexOf(i);return!(s<=-1)&&(Po.ys[t]=Po.ys[t].slice(),Po.ys[t].splice(s,1),!0)},!0!==c.VIDEOJS_NO_DYNAMIC_STYLE&&ts()&&((jo=js(".vjs-styles-defaults"))||(jo=ce("vjs-styles-defaults"),(To=js("head"))&&To.insertBefore(jo,To.firstChild),le(jo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ue(1,Po),Po.VERSION="5.20.6-opentelly.14",Po.options=Co.prototype.h,Po.getPlayers=function(){return Co.players},Po.players=Co.players,Po.getComponent=ve.getComponent,Po.registerComponent=function(t,i){Kr.isTech(i)&&Gi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),ve.registerComponent.call(ve,t,i)},Po.getTech=Kr.getTech,Po.registerTech=Kr.registerTech,Po.browser=Qs,Po.TOUCH_ENABLED=Xs,Po.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in qi(i)?("function"==typeof i.init&&(Gi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==w.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new b("Super expression must either be null or a function, not "+typeof i);t.prototype=w.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},Po.mergeOptions=fe,Po.bind=n,Po.plugin=function(t,i){Co.prototype[t]=i},Po.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Po.options.languages=fe(Po.options.languages,((s={})[t]=i,s)),Po.options.languages[t]},Po.log=Gi,Po.createTimeRange=Po.createTimeRanges=we,Po.formatTime=dh,Po.parseUrl=He,Po.isCrossOrigin=qe,Po.EventTarget=pe,Po.on=se,Po.one=re,Po.off=ee,Po.trigger=ne,Po.xhr=Dr,Po.TextTrack=Vr,Po.AudioTrack=Mo,Po.VideoTrack=Ao,Po.isEl=is,Po.isTextNode=ws,Po.createEl=es,Po.hasClass=ls,Po.addClass=ds,Po.removeClass=fs,Po.toggleClass=vs,Po.setAttributes=ps,Po.getAttributes=ms,Po.emptyEl=_s,Po.appendContent=xs,Po.insertContent=Cs,Po.computedStyle=bh,f(),f();var Eo=10;function No(t){const i=t.duration;if(S(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Io(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Bo(t){const i=$o(t);return No(t)?i.end(i.length-1):i.start(0)}function Fo(t){return $o(t).start(0)}function Do(t){const i=$o(t);return i.end(i.length-1)-i.start(0)}function $o(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new Ht([0,s]).ks()}function Ro(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=_.abs(t);let e=_.floor(t%60),n=_.floor(t/60%60),r=_.floor(t/3600);const h=_.floor(i/60%60),o=_.floor(i/3600);return(S(t)||t===1/0)&&(r=n=e="-"),r=+r>0||o>0?r+":":"",n=((r||h>=10)&&+n<10?"0"+n:n)+":",e=+e<10?"0"+e:e,s+r+n+e}function Uo(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=Oo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function Oo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function Vo(t){const i=Oo(t),s=()=>{const s=Io(t);t.toggleClass("theo-at-live",function(t,i){if(No(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Eo}return!1}(i,s)),t.toggleClass("vjs-live",No(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===M(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();var Lo="theo-ad-playing",Ho="theo-dai-ad-playing";function qo(t,i,s){t.toggleClass(Lo,i),t.toggleClass(Ho,i&&s)}function zo(){this.userActive(!1)}f(),f(),f();var Wo=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},Go=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Xo=Po.getTech("Tech"),Jo=Po.getTech("Html5"),Qo=class extends Xo{xs(){var t;for(const t of Go)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener(ji.MODE_CHANGE,this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Es),this.ws.audioTracks.addEventListener("addtrack",this.Ns),this.ws.audioTracks.addEventListener("removetrack",this.Is),this.ws.audioTracks.addEventListener("change",this.Bs)}Fs(){var t;for(const t of Go)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener(ji.MODE_CHANGE,this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Es),this.ws.audioTracks.removeEventListener("addtrack",this.Ns),this.ws.audioTracks.removeEventListener("removetrack",this.Is),this.ws.audioTracks.removeEventListener("change",this.Bs)}Ds(t){this.trigger(new Wo(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new g(this.localize('Missing required tech option "player"'));let s=i.element;return Po.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!ai(this.ws.source.ads))return this.ws.source.ads[0].sources;if(qt(this.ws.source))return"This source is managed by the Uplynk integration extension.";if(Vt(this.ws.source))return"This source is managed by the DAI integration extension.";if(Wt(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=!!t}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(Kt.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(Kt.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(Kt.INLINE)}$s(){let t=this.ws.ads;if(t&&t.playing)return!0;let i=this.ws.vr;return!(!i||i.state===It.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1,i=()=>{t=!0};this.on("loadstart",i);let s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready((()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")}))}let i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return xi}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Us=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new Xt(this.ws.currentTime,this.ws.readyState)),this.Ds(new N),this.Ds(new Qt(this.ws.duration)))},this.Ts=()=>{this.Ds(new Nt(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Ns=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Is=t=>{this.audioTracks().it(t.track)},this.Es=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Bs=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ws.presentation.currentMode===Kt.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&&mt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.player,this.xs();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};Qo.prototype.featuresFullscreenResize=Jo.prototype.featuresFullscreenResize,Qo.prototype.featuresPlaybackRate=Jo.prototype.featuresPlaybackRate,Qo.prototype.featuresProgressEvents=!0,Qo.prototype.featuresTimeupdateEvents=!0,Qo.prototype.featuresNativeTextTracks=!0,Po.registerTech("THEOplayer",Qo),f(),f(),f(),f();var Yo=class{constructor(t){this.Os=t=>{ii(this.Vs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ei(this.Vs,"theo-mobile-button-hover")},this.Hs=t=>{this.Vs.blur()},this.Vs=t,t.addEventListener("touchstart",this.Os),t.addEventListener("touchend",this.Ls),t.addEventListener("focusin",this.Hs)}};f(),f(),f(),f();var Ko=Po.getComponent("Menu"),Zo=class extends(Uo(Ko)){get qs(){return this.player().el()}zs(){ii(this.qs,"theo-menu-opened")}Ws(){ei(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}};f();var ta=Po.getComponent("MenuItem"),ia=class extends(Uo(ta)){get parentMenu(){return this.Gs}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){fi.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Os),this.el().removeEventListener("touchend",this.Ls)),super.dispose()}constructor(t,i,s){super(t,Ti({selectable:!0},i)),this.Xs=!1,this.Os=t=>{ii(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ei(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,fi.Ys.Qs&&(this.el().addEventListener("touchstart",this.Os),this.el().addEventListener("touchend",this.Ls))}};f();var sa=Po.getComponent("ClickableComponent"),ea=class extends sa{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){let t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}},na=class extends Zo{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=Ti({playerOptions:this.h.playerOptions},t);let i=new ia(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=Ti({playerOptions:this.h.playerOptions},t);let i=this.ee(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}zs(){super.zs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){let t=this.he();if(!t)return;let i=t.getClientRects();fi.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),fi.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();ii(i,"theo-menu-content");let s=new ea(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},ra=class extends na{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){ei(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){ii(this.ye,"vjs-hidden")}zs(){this.ce&&this.ce.zs(),super.zs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),ii(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}};f();var ha=class{get we(){return this.Vs}get ke(){return this._e}fe(t){t.be(),this.Vs.appendChild(t.ye)}de(t){this.Vs.removeChild(t.ye)}pe(t,i){if(t==this._e)return;let s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),fi.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=mi("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}zs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){ci((()=>{ei(this.Vs,"theo-no-transition"),ei(this._e.ye,"theo-no-transition")}))}xe(){ii(this.Vs,"theo-no-transition"),ii(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Vs=h.createElement("div"),this.Vs.className="theo-tertiary-background theo-menu-animation-container",this.Vs.appendChild(this.Se.ye),this.ue=this._e.player().el()}};f(),f();var oa=class extends ra{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){let s=new aa(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},aa=class extends ia{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,Ti({selectable:!1},i),s),this.Ae=new oa(t,i,s)}},ua=class extends ra{get menuButton(){return this.Pe}createEl(){let t=Po.createEl("div",{className:this.buildCSSClass()});return this.Ee=super.createEl(),this.Ee.className=super.buildCSSClass(),ii(this.Ee,"theo-menu-content-animatable"),t.appendChild(this.Ee),this.ce=new ha(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){let s=new aa(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);let s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);X(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ee}ie(){this.Pe.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Pe=s}};f();var ca=class{set Ie(t){this.Be.innerHTML=this.Fe.localize(t),this.De()&&this.$e(),ui(this.Fe.el())}get Ie(){return this.Be.textContent||""}De(){return!Zt(this.Be,"vjs-hidden")}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.Ue),this.Fe.off("dispose",this.Oe),Jt(this.Be)}constructor(t,i){this.$e=()=>{ei(this.Be,"vjs-hidden");let t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.Be).fontSize);X(this.Be,this.Fe.el(),i,s)},this.Ue=()=>{ii(this.Be,"vjs-hidden")},this.Oe=()=>this.Re(),this.Fe=t,ui(t.el()),li(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.Fe.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Be),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.Ue),this.Fe.on("dispose",this.Oe)}},la=Po.getComponent("Button"),da=class extends(Uo(la)){get Ve(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Le}isMenuOpen(){return this.He}openMenu(){this.qe&&!this.He&&(this.Le.zs(),this.el().setAttribute("aria-expanded","true"),this.He=!0,this.Le.focus())}closeMenu(){this.qe&&this.He&&(this.Le.Ws(),this.el().setAttribute("aria-expanded","false"),this.He=!1)}set minimumMenuItems(t){this.ze=t,this.We()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.He?this.closeMenu():this.openMenu()}enable(){return this.qe=!0,super.enable()}disable(){return this.closeMenu(),this.qe=!1,super.disable()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().removeChild(this.Le),this.Le.dispose(),this.Be.Re(),this.ws.removeEventListener("seeking",this.Ge),super.dispose()}constructor(t,i){super(t,i),this.He=!1,this.ze=1,this.qe=!0,this.Xe=t=>{let i=this.el().contains(t.target),s=this.Le.el().contains(t.target),e=!1;var n;fi.Ys.Qs&&this.Ve&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.He||(e&&t.preventDefault(),this.closeMenu())},this.Je=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Ge=()=>{this.He&&this.closeMenu()},this.We=()=>{this.Le.menuItems.length>=this.ze?this.show():(this.closeMenu(),this.hide())},this.Le=new ua(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Le),this.Be=new ca(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),fi.Ys.Qe?(this.on(h,"touchend",this.Xe),new Yo(this.el())):(this.on(h,"click",this.Xe),this.on(h,"keydown",this.Je),_i&&this.on(h,_i.Ye,this.closeMenu)),this.ws.addEventListener("seeking",this.Ge),this.on(this.Le,"menuchange",this.We),this.on(t,"languagechange",this.te),this.We()}},fa=Po.getComponent("Component"),va=class extends(Po.getComponent("ControlBar")){addMenuButton(t){t=Ti({playerOptions:this.h.playerOptions},t);let i=new da(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Po.registerComponent("THEOControlBarShadow",class extends fa{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var pa=Po.getComponent("VolumeBar"),ma=class extends pa{handleFocus(t){super.handleFocus(t),this.Ke.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ke.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ke=i.Ze}};f();var ga=Po.getComponent("VolumeControl"),ya=class extends ga{constructor(t,i){super(t,i),this.tn=new ma(t,{Ze:this}),this.addChild(this.tn)}};ya.prototype.h=Ti({},ga.prototype.h,{children:[]}),Po.registerComponent("VolumeControl",ya);var ba=class extends(Uo(va)){sn(){this.nn(this.rn())}hn(){0===this.an&&(this.an=u(this.un,100))}cn(t){"opacity"===t.propertyName&&(0!==this.an&&(v(this.an),this.an=0),this.nn(!0))}ln(t){"opacity"===t.propertyName&&(this.rn()||this.nn(!1))}rn(){return"0"!==s.getComputedStyle(this.el()).opacity}nn(t){this.dn!==t&&(this.dn=t,t?this.fn():this.ws.textTrackStyle.marginBottom=void 0)}fn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){v(this.an),this.an=0,this.pn.vn(di.mn,this.gn),this.pn.yn(),super.dispose()}constructor(t,i){super(t,i),this.dn=!1,this.an=0,this.un=()=>{0!==this.an&&(this.an=0,this.nn(this.rn()))},this.gn=()=>{this.dn&&this.fn()},this.on(t,"ready",this.sn),this.on(t,"pause",this.sn),this.on(t,"useractive",this.sn),this.on(t,"firstplay",this.hn),this.on(t,"play",this.hn),this.on(t,"userinactive",this.hn),this.on("transitionstart",this.cn),this.on("transitionend",this.ln),this.pn=new yi(this.el()),this.pn.bn(di.mn,this.gn),this.pn.kn(!0)}};ba.prototype.h=Ti({},va.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Po.registerComponent("ControlBar",ba),f();var ka=class extends va{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};ka.prototype.h=Ti({},va.prototype.h,{children:[]}),Po.registerComponent("TopControlBar",ka),f();var wa=Po.getComponent("CurrentTimeDisplay"),_a=class extends(Uo(wa)){updateContent(){const t=Io(this.player()),i=this.ws,s=Fo(i),e=this.localize("Current Time"),n=Ro(_.max(0,t-s),Do(i));n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Po.registerComponent("CurrentTimeDisplay",_a),f();var xa=Po.getComponent("DurationDisplay"),Ca=class extends(Uo(xa)){updateContent(){const t=this.ws,i=S(t.duration)?NaN:Do(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Ro(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.wn),super.dispose()}constructor(t,i){var s;super(t,i),this.wn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.ws)||s.clip.addEventListener("change",this.wn)}};Po.registerComponent("DurationDisplay",Ca),f();var Sa=Po.getComponent("Button"),ja=class extends(Uo(Sa)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this._n=Po.createEl("span",{className:"theo-live-control-indicator"}),Yt(t,this._n),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Po.removeClass(i,"vjs-control-text"),Po.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Bo(i)),t.play()}}xn(){No(this.ws)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.xn(),this.on(t,"emptied",this.xn),this.on(t,"durationchange",this.xn),fi.Ys.Qe&&new Yo(this.el())}};Po.registerComponent("LiveDisplay",ja),f();var Ta=Po.getComponent("LoadingSpinner");Po.registerComponent("LoadingSpinner",class extends Ta{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Po.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Po.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Po.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Ma=Po.getComponent("LoadProgressBar"),Aa=class extends(Uo(Ma)){update(){let t=this.ws,i=Ht.Cn($o(t)),s=i.Sn(0),e=Ht.Cn(t.buffered).jn(i),n=i.Tn(0)-s,r=e.V&&e.Tn(e.V-1)||0;r=_.max(0,r-s);let o=this.el(),a=this.Mn;o.style.width=Pa(r,n);for(let t=0;t<e.V;t++){let i=e.Sn(t),n=e.Tn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Pa(i-s,r),u.style.width=Pa(n-i,r)}for(let t=a.length;t>e.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Mn=[],this.on(t,"emptied",this.update)}};function Pa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Po.registerComponent("LoadProgressBar",Aa),f();var Ea=Po.getComponent("MouseTimeDisplay"),Na=class extends(Uo(Ea)){handleMouseMove(t){let i=t,s=this.ws,e=Fo(s)+this.calculateDistance(i)*Do(s),n=i.pageX-W(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ws,e=Fo(s)+this.calculateDistance(i)*Do(s),n=i.touches[0].pageX-W(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.An=Po.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.Pn=t;let s=this.En(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.An,s),this.Nn())}Nn(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);X(this.tooltip,this.el(),s,e)}}En(t){const i=this.ws,s=t-Bo(i);return Ro(No(i)?_.min(s,0):s,Do(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.In),null==(t=this.ws.presentation)||t.removeEventListener(ji.MODE_CHANGE,this.In),super.dispose()}constructor(t,i){var s;(super(t,i),this.Pn=NaN,this.In=()=>{let t=Io(this.player());const i=this.ws;let s=(t-Fo(i))/Do(i)||0;s=bi(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Po.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.An)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Dt.Qs)&&(this.on(t,"firstplay",this.In),this.on(t,"play",this.In),this.on(t,"seeking",this.In),this.on(t,"seeked",this.In),this.on(t,"timeupdate",this.In),this.ws.addEventListener("dimensionchange",this.In),null==(s=this.ws.presentation)||s.addEventListener(ji.MODE_CHANGE,this.In),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",gi((t=>this.handleTouchMove(t)),25)),this.In()})))}};Po.registerComponent("MouseTimeDisplay",Na),f();var Ia=Po.getComponent("PlayProgressBar"),Ba=class extends(Uo(Ia)){updateDataAttr(){let t=Io(this.player());this.el().setAttribute("data-current-time",this.En(t))}En(t){let i=this.ws;return Ro(t-Bo(i),Do(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};Po.registerComponent("PlayProgressBar",Ba),f();var Fa=Po.getComponent("RemainingTimeDisplay"),Da=class extends(Uo(Fa)){updateContent(){const t=this.ws,i=Do(t);if(i){const s=$o(t).end(0),e=this.localize("Remaining Time"),n=Ro(_.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Po.registerComponent("RemainingTimeDisplay",Da),f(),f();var $a=class{get ws(){var t;return null!=(t=this._s)?t:this._s=Oo(this.Bn)}Fn(){const t=this.Dn;if(!t)return;const i=this.ws;if(0===i.seekable.length)return;const s=t.cues.slice();this.Rn.$n(s);for(let t=0;t<s.length;t++){let e=s[t],n=s[t+1],r=!n||e.endTime!==n.startTime,h=new Ra(e,i,r);this.Un.push(h),this.On.appendChild(h.we)}}Vn(){this.ws.addEventListener("loadedmetadata",this.Ln),this.ws.addEventListener("loadeddata",this.Ln),this.ws.addEventListener("sourcechange",this.Ln),this.ws.addEventListener("durationchange",this.Hn),this.ws.clip.addEventListener("change",this.Hn),this.ws.textTracks.addEventListener("addtrack",this.qn),this.ws.textTracks.addEventListener("removetrack",this.zn),this.ws.textTracks.addEventListener("change",this.Ln)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Ln),this.ws.removeEventListener("loadeddata",this.Ln),this.ws.removeEventListener("sourcechange",this.Ln),this.ws.removeEventListener("durationchange",this.Hn),this.ws.clip.removeEventListener("change",this.Hn),this.ws.textTracks.removeEventListener("addtrack",this.qn),this.ws.textTracks.removeEventListener("removetrack",this.zn),this.ws.textTracks.removeEventListener("change",this.Ln)}Gn(){if(!(this.ws.readyState<At.Xn))for(let t of this.ws.textTracks)if(t.kind===Ct.Jn&&t.mode===_t.Qn&&t.cues.length>0&&t.readyState!==yt.ERROR)return t}Yn(t){const i=this.Dn;t!==i&&(i&&(this.Kn(),i.removeEventListener("cuechange",this.Zn)),this.Dn=t,t&&(t.addEventListener("cuechange",this.Zn),this.Hn()))}tr(t){this.Rn.ir(t)}sr(){this.Rn.ge()}er(){this.Rn.be()}Kn(){for(let t of this.Un)t.Re();this.Rn.nr(),this.Un=[],this.rr=void 0}Re(){this.Wn(),this.hr.removeEventListener("mousemove",this.ar),this.hr.removeEventListener("mouseenter",this.ur),this.hr.removeEventListener("mouseleave",this.cr),this.Yn(void 0),this.Rn.Re(),this._s=void 0}constructor(t,i){this.Bn=i,this.Un=[],this._s=void 0,this.Ln=()=>{this.Yn(this.Gn())},this.qn=t=>{let i=t.track;i.kind===Ct.Jn&&(i.addEventListener("addcue",this.Ln),i.addEventListener("removecue",this.Ln),i.addEventListener("readystatechange",this.Ln)),this.Ln()},this.zn=t=>{let i=t.track;i.kind===Ct.Jn&&(i.removeEventListener("addcue",this.Ln),i.removeEventListener("removecue",this.Ln),i.removeEventListener("readystatechange",this.Ln)),this.Ln()},this.ar=t=>{let i=this.ws,s=function(t,i){let s,e,n=W(t),r=t.offsetWidth,h=t.offsetHeight,o=n.top,a=n.left;!function(t){return void 0!==t.changedTouches}(i)?(e=i.pageX,s=i.pageY):(e=i.changedTouches[0].pageX,s=i.changedTouches[0].pageY);let u=bi((o-s+h)/h,0,1),c=bi((e-a)/r,0,1);return{x:c,y:u}}(this.On,t),e=Fo(i)+s.x*Do(i);e===i.duration&&(e-=.1),this.tr(e)},this.cr=()=>{this.Rn.be()},this.ur=()=>{this.Rn.ge()},this.Hn=()=>{this.Dn&&(this.Kn(),this.Fn(),this.Zn())},this.Zn=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=$(this.Un,(t=>t.lr===e));n!==this.rr&&(null==(s=this.rr)||s.dr(),this.rr=n,null==n||n.pr())},this.hr=t,this.Rn=new Ua,this.Bn.contentEl().appendChild(this.Rn.we),this.On=h.createElement("div"),ii(this.On,"theoplayer-chapterbar"),this.hr.appendChild(this.On),this.hr.addEventListener("mousemove",this.ar),this.hr.addEventListener("mouseenter",this.ur),this.hr.addEventListener("mouseleave",this.cr),this.Vn()}},Ra=class{get we(){return this.Vs}pr(){ii(this.Vs,"theoplayer-chapter-indicator-active")}dr(){ei(this.Vs,"theoplayer-chapter-indicator-active")}mr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,r=this.lr.startTime,o=this.lr.endTime,a=o>=s&&r<=e,u=bi(r-s,0,n),c=bi(o-s,0,n),l=_.max(0,c-u),d=h.createElement("div");ii(d,"theoplayer-chapter-indicator");let f=h.createElement("div");ii(f,"theoplayer-chapter-indicator-highlight"),d.appendChild(f),i&&ii(d,"theoplayer-chapter-indicator-discontinuous");let v=u/n*100,p=l/n*100;return d.style.display=a?"":"none",d.style.width=p+"%",d.style.left=v+"%",d}Re(){Jt(this.Vs)}constructor(t,i,s){this.lr=t,this.Vs=this.mr(i,s)}},Ua=class{be(){this.gr--,0===this.gr&&ei(this.we,"theoplayer-chapter-hovering")}$n(t){this.yr=t||[],this.yr.length>0&&(this.we.style.display="")}br(t){d(this.kr,t.content)}nr(){this.yr=[],d(this.kr,""),this.we.style.display="none"}ge(){this.gr++,this.gr>0&&ii(this.we,"theoplayer-chapter-hovering")}ir(t){for(let i of this.yr)if(Oa(i,t)){this.br(i);break}}Re(){Jt(this.we)}constructor(){this.yr=[],this.gr=0,this.we=h.createElement("div"),ii(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.kr=h.createElement("p"),this.we.appendChild(this.kr)}};function Oa(t,i){return new Ht([t.startTime,t.endTime]).wr(i)}var Va=Po.getComponent("SeekBar"),La=class extends(Uo(Va)){updateAriaAttributes(t){const i=Io(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this._r(i)).toFixed(2)),t.setAttribute("aria-valuetext",Ro(i-Bo(s),Do(s)))}getPercent(){return this._r(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Fo(i)+this.calculateDistance(t)*Do(i);s>=i.duration&&(s=i.duration-.1),this.On.tr(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.On.sr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.On.er(),super.handleMouseUp(t)}_r(t){let i=this.ws,s=(t-Fo(i))/Do(i);return bi(s,0,1)}dispose(){this.On.Re(),H(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.On=new $a(this.el(),t)}};Po.registerComponent("SeekBar",La),f();var Ha=Po.getComponent("ProgressControl");fi.Ys.Qs&&Po.registerComponent("ProgressControl",class extends Ha{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var qa=Po.getComponent("TooltipProgressBar"),za=class extends(Uo(qa)){updateDataAttr(){let t=Io(this.player()),i=this.En(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}En(t){const i=this.ws;return Ro(t-Bo(i),Do(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};function Wa(t){for(const i of t)if(i.enabled)return i}function Ga(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Xa(t),description:Ja(t),hd:!!t.height&&t.height>=720}}function Xa(t){return t.height?t.height+"p":t.bandwidth?Ja(t):""}function Ja(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Po.registerComponent("TooltipProgressBar",za),f(),f(),f(),f(),f();var Qa=class{get Cr(){return this.Sr}set Cr(t){let i=this.Sr;for(let s=i.length-1;s>=0;s--){let e=i[s];V(t,e)||this.jr(e)}for(let i of t)this.Tr(i);this.Mr.re()}get Ar(){return this.Mr.menuItems}Pr(t){let i=this.Ar;if(i)for(let s of i)if(s.Er===t)return s}Nr(t){let i=this.Mr.addMenuItem();return i.Er=t,i.on("click",(()=>this.Ir(i))),i.el().setAttribute("role","menuitemradio"),i}Br(t){t.dispose()}Fr(t){return!0}Tr(t){if(this.Fr(t)){V(this.Sr,t)||this.Sr.push(t);let i=this.Pr(t)||this.Nr(t);return this.Dr(i),i}this.jr(t)}jr(t){let i=this.Pr(t);i&&(this.Mr.removeMenuItem(i),this.Br(i)),U(this.Sr,t)}Re(){const t=[];for(let i of this.Sr)t.push(i);for(let i of t)this.jr(i);H(t)}constructor(t){this.Sr=[],this.Mr=t}},Ya=class extends Qa{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Quality")),this.Rr}Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-quality-automatic",d(this.Vr,this.Ur.localize("Automatic")),this.Vr}Lr(){return this.Hr=h.createElement("span"),d(this.Hr,this.Ur.localize("Automatic")),this.Hr}qr(){return this.zr=h.createElement("span"),this.zr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.zr,this.Ur.localize("HD")),this.zr}Wr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Vr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Hr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.zr),this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"))}Xr(){let t=this.Jr,i=t&&nu(t.targetQuality),s=t&&t.activeQuality,e=Ga(this.Qr(i||s))||{name:this.Ur.localize("Automatic")};d(this.Hr,e.name),ri(this.Vr,"vjs-hidden",!!i),ri(this.zr,"vjs-hidden",!e.hd)}Dr(t){let i=Ga(t.Er)||{name:this.Ur.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Ur.localize("HD")+"</span>"),i.description&&(s+='<span class="theo-settings-control-submenu-item-alternate-value">'+i.description+"</span>"),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Ur.localize("Set video quality to ")+i.name),t.Er?t.selected(t.Er===this.Yr):t.selected(!this.Yr)}Ir(t){this.Jr&&(this.Jr.targetQuality=t.Er&&t.Er.videoQualities)}Qr(t,i){const s=i||this.Cr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.off("languagechange",this.te),this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),super.Re()}constructor(t,i,s){super(t.subMenu),this.Jr=void 0,this.Yr=void 0,this.Kr=()=>{let t=Wa(this._s.videoTracks);if(t===this.Jr)return;let i=[];if(this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),this.Jr=t,t){t.addEventListener("activequalitychanged",this.Zr),t.addEventListener("targetqualitychanged",this.th),t.addEventListener("update",this.ih);const s=Za(su(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.Cr=i,this.th(),this.Zr()},this.ih=t=>{const i=t.track;if(i!==this.Jr)return;const s=Za(su(i.qualities.filter((t=>t.available)))),e=i&&nu(i.targetQuality);let n;this.Yr=this.Qr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.Cr=n,this.Xr()},this.Zr=()=>{this.Tr(void 0),this.Xr()},this.th=()=>{let t=Wa(this._s.videoTracks),i=t&&nu(t.targetQuality),s=this.Qr(i),e=this.Yr;s!==e&&(this.Yr=s,s&&e||this.Tr(void 0),e&&V(this.Cr,e)&&this.Tr(e),i&&this.Tr(s),this.Xr())},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),d(this.Rr,this.Ur.localize("Quality")),d(this.Vr,this.Ur.localize("Automatic")),d(this.Hr,this.Ur.localize("Automatic")),d(this.zr,this.Ur.localize("HD")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"));for(const t of this.Ar)this.Dr(t);this.Xr()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.Vr=this.Or(),this.Hr=this.Lr(),this.zr=this.qr(),this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),this.Cr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.on("languagechange",this.te),this.Kr()}},Ka=class{get height(){return this.sh[0].height}get bandwidth(){return this.sh[0].bandwidth}get videoQualities(){return this.sh}get label(){return this.sh[0].label}add(t){this.sh.push(t)}constructor(t){this.sh=t}};function Za(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(eu(s,t)){s.add(t),e=!0;break}e||i.push(new Ka([t]))}return i}function tu(t,i){return t&&i?F(t,i):I.eh}function iu(t,i){return t===i?I.eh:tu(t.height,i.height)||tu(t.width,i.width)||tu(t.bandwidth,i.bandwidth)}function su(t){return E(t,iu).reverse()}function eu(t,i){return t.label&&i.label&&t.label===i.label||at(Ga(t),Ga(i))}function nu(t){return Lt(t)?1===t.length?t[0]:void 0:t}function ru(t){return 1===t?"Normal":""+_.round(100*t)/100}f();var hu=class extends Qa{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Speed")),this.Rr}Wr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu")),t}Nr(t){let i=super.Nr(t);return this.Dr(i),i}Dr(t){const i=t.Er,s=this.Ur.localize(ru(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set video speed to ")+s),t.selected(t.Er===this._s.playbackRate)}Ir(t){this._s.playbackRate=t.Er}Re(){this._s.removeEventListener("ratechange",this.nh),this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.rh=void 0,this.nh=()=>{this.rh&&this.Tr(this.rh);let t=this._s.playbackRate;this.rh=t,d(this.hh,this.Ur.localize(ru(t))),t&&this.Tr(t)},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),d(this.Rr,this.Ur.localize("Speed")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu"));for(const t of this.Ar)this.Dr(t);this.nh()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.hh=this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),this.Cr=e,this._s.addEventListener("ratechange",this.nh),this.Ur.on("languagechange",this.te),this.nh()}};Po.registerComponent("SettingsButton",class extends da{createEl(){let t=super.createEl();return this.oh=Po.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.oh,this.localize("HD")),t.appendChild(this.oh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),d(this.oh,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.ah),this.uh.Re(),this.lh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Jr=void 0,this.ah=()=>{let t=Wa(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Zr),this.Zr())},this.Zr=()=>{var t;const i=null==(t=this.Jr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},ii(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.Ie=this.controlText(),this.dh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.uh=new Ya(this.dh,this.ws,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.fh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.lh=new hu(this.fh,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.ah),this.ah()}}),f(),f(),f();var ou=class extends Qa{ph(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=xt(s);if(t)return t.mh}return s||""}gh(){this.Cr=this.yh}Re(){this.yh.removeEventListener("addtrack",this.bh),this.yh.removeEventListener("removetrack",this.kh),this.yh.removeEventListener("change",this.wh),super.Re()}constructor(t,i){super(t),this.bh=t=>{const i=t.track;this.Tr(i),i.addEventListener("update",this._h)},this.kh=t=>{const i=t.track;this.jr(i),i.removeEventListener("update",this._h)},this.wh=t=>this.gh(),this._h=()=>{for(const t of this.Cr)this.Tr(t)},this.yh=i,this.yh.addEventListener("addtrack",this.bh),this.yh.addEventListener("removetrack",this.kh),this.yh.addEventListener("change",this.wh),this.gh()}},au=class extends ou{Dr(t){let i=t.Er,s=this.Ur.localize(this.ph(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Ir(t){let i=t.Er;for(let t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Language"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),this.Ur.localize("Language")),this.Ur.on("languagechange",this.te)}};Po.registerComponent("audioTrackButton",class extends da{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.xh=new au(this.menu,this.ws,t),this.controlText("Language"),this.Be.Ie=this.controlText()}}),f(),f();var uu=class extends ou{Fr(t){return!!super.Fr(t)&&(!t.forced&&T(t.kind))}Nr(t){let i=super.Nr(t);ii(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.Ch=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Sh=e;let n=t=>this.jh(t,i);i.Th=n,e.addEventListener("click",n);let r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Dr(t){let i=t,s=i.Er,e=this.Ur.localize(this.ph(s));d(i.Ch,e),i.el().setAttribute("aria-label",this.Ur.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===_t.Qn)}Br(t){let i=t;i.Sh.removeEventListener("click",i.Th),super.Br(t)}Ir(t){let i=t.Er;for(let t of this.ws.textTracks)t!==i&&jt(t.kind,i.kind)&&(t.mode=_t.Mh);i.mode!==_t.Qn?i.mode=_t.Qn:i.mode=_t.Mh}jh(t,i){t.stopImmediatePropagation(),this.Ir(i)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitles"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),s.localize("Subtitles")),this.Ur.on("languagechange",this.te)}};Po.registerComponent("subtitlesButton",class extends da{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.xh=new uu(this.menu,this.ws,t),this.controlText("Subtitles"),this.Be.Ie=this.controlText()}}),f();var cu=Po.getComponent("playToggle"),lu=class extends(Uo(cu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Ie=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Ie=this.controlText())}te(){this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),this.ws.removeEventListener("ended",this.Ah),super.dispose()}constructor(t,i){super(t,i),this.Ah=()=>{this.controlText("Replay"),this.Be.Ie=this.controlText()},this.controlText("Play"),this.Be=new ca(this,this.controlText()),this.ws.addEventListener("ended",this.Ah),this.on(t,"languagechange",this.te),fi.Ys.Qe&&new Yo(this.el())}};Po.registerComponent("playToggle",lu),f();var du=Po.getComponent("fullscreenToggle"),fu=class extends(Uo(du)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new ca(this,this.controlText()),fi.Ys.Qe&&new Yo(this.el()),this.on(t,"languagechange",this.updateContent)}};Po.registerComponent("fullscreenToggle",fu),f();var vu=Po.getComponent("muteToggle"),pu=class extends(Uo(vu)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new ca(this,this.controlText()),fi.Ys.Qe&&new Yo(this.el()),this.on(t,"languagechange",this.te),wi&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Po.registerComponent("muteToggle",pu),f();var mu=Po.getComponent("BigPlayButton"),gu="theo-play-svg-circle",yu='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="'+gu+'" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',bu=class extends(Uo(mu)){createEl(){let t=super.createEl(),i=Po.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=yu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};Po.registerComponent("BigPlayButton",bu),f();var ku=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Po.registerComponent("MouseTimeDisplay",class extends Na{Ph(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Eh&&(this.Eh=i,this.Nh=i.src?fi.Ih(i.src).href:void 0,this.Eh.addEventListener(["addcue","removecue"],this.Bh),this.Fh())}Dh(t){t.track===this.Eh&&this.$h()}createEl(){const t=super.createEl();return this.Rh=Po.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Uh=Po.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Oh(t)}Oh(t){let i;if(this.Eh&&this.Eh.cues){let s=function(t,i){let s=t[0];for(let e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Eh.cues,t);i=s&&s.content}if(i===this.Vh)return;if(this.Vh=i,Po.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Lh();const s=i.match(ku);if(s){let[,t,i,e,n,r]=s;t=this.Hh(t);const h={qh:+i,zh:+e,ji:+n,Ti:+r};this.Wh(t,h)}else{const t=this.Hh(i);this.Wh(t)}}Fh(){S(this.Pn)||this.Oh(this.Pn)}Hh(t){return this.Eh&&this.Nh?fi.Ih(t,this.Nh).href:t}Wh(t,i){this.Rh&&(this.Rh.src!==t?(this.Rh.onload=()=>{this.Gh(i)},this.Rh.src="",this.Rh.src=t):this.Gh(i))}Gh(t){if(!this.Uh||!this.Rh)return;const i=this.Uh.getContext("2d");i&&(null!=t||(t={qh:0,zh:0,ji:this.Rh.naturalWidth,Ti:this.Rh.naturalHeight}),this.Uh.width=t.ji,this.Uh.height=t.Ti,i.drawImage(this.Rh,t.qh,t.zh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.Xh(this.Uh))}Xh(t){this.Jh||(Yt(this.tooltip,t),this.Jh=t),this.Nn()}Lh(){this.Jh&&(this.tooltip.removeChild(this.Jh),this.Jh=void 0,this.Nn())}$h(){void 0!==this.Eh&&(this.Eh.removeEventListener(["addcue","removecue"],this.Bh),this.Eh=void 0),this.Nh=void 0,this.Lh(),this.Vh=void 0}dispose(){this.$h(),super.dispose()}constructor(t,i){super(t,i),this.Jh=void 0,this.Eh=void 0,this.Nh=void 0,this.Qh=t=>this.Ph(t),this.Yh=t=>this.Dh(t),this.Bh=t=>this.Fh(),this.showThumbnails=()=>{this.Jh&&this.Jh.hidden&&(this.Jh.hidden=!1,this.Nn())},this.hideThumbnails=()=>{!this.Jh||this.Jh.hidden||this.player().scrubbing()||(this.Jh.hidden=!0,this.Nn())},this.on(this.player().textTracks(),"addtrack",this.Qh),this.on(this.player().textTracks(),"removetrack",this.Yh),Dt.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var wu=Po.getComponent("VolumeLevel");Po.registerComponent("VolumeLevel",class extends wu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var _u=Po.getComponent("Component"),xu=class extends _u{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};xu.prototype.h=Ti({},xu.prototype.h,{children:[]}),Po.registerComponent("controlBarMenuContainer",xu);var Cu=Po.getComponent("Player"),Su=class extends Cu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Jt(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};Su.prototype.h=Ti({},Cu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Po.registerComponent("Player",Su),f(),f();var ju=Po.getComponent("Player"),Tu=ju.prototype.es;ju.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return Tu.call(this,t)};var Mu=ju.prototype.createEl;function Au(t,i,e,n){let r=Ti({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=Ti({progressControl:{keepTooltipsInside:!0}},r.controlBar);let h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer"),(r.theoplayer||(r.theoplayer={})).player=t,e&&zt(e.language)&&(r.languages=Ti({},r.languages,{[wt]:e.language}),r.language=wt),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=Po(t.element,r,n);return a.ready((()=>{Vo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===St.Kh;qo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;qo(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{qo(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",zo)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),fi.Ys.Qs&&(ii(i,"theo-mobile"),function(t){let i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ei(t,"theo-mobile-landscape"),ii(t,"theo-mobile-portrait")):(ei(t,"theo-mobile-portrait"),ii(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{Zt(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}ju.prototype.createEl=function(){let t=Mu.call(this),i=Po.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Pu=Po.getComponent("Button");var Eu="THEOPiPCloseButton";Po.registerComponent(Eu,class extends Pu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.io.Zh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.io)}(i))throw new g("Invalid Picture-in-picture options.");this.io=i.io}});var Nu=class extends J{get so(){return this.eo}get no(){return this.t.cs()}ro(){this.t.bn(Z.ho,this.oo),this.ao||this.t.bn(Z.uo,this.co),this.t.lo.on("languagechange",this.te)}do(){var t;return"theo-pip-"+(null!=(t=this.fo)?t:"bottom-right")}vo(t){let i=this.po;i&&!this.no&&(this.mo||this.yo(),this.bo(),ii(i,"theo-pip"),ii(i,this.do()),this.eo=!0,this.ko=t,this.wo=!1,this._o(new Mi(Kt.PICTURE_IN_PICTURE)))}xo(t){let i=this.po;i&&(this.Co(),ei(i,"theo-pip"),ei(i,this.do()),this.eo=!1,this.wo=t,this.So=this.ko,this.ko=!1,this._o(new Mi(Kt.INLINE)))}yo(){if(!this.mo){let t=this.t.lo;t.addChild(Eu,{io:this});let i=h.createElement("div");i.className="theo-pip-overlay",this.jo=h.createElement("div"),this.jo.className="theo-pip-overlay-text",d(this.jo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.jo),Yt(t.el(),i),this.To=i,this.mo=!0}}Mo(){this.Ao&&!this.Po&&this.t.Eo&&(this.No=this.t.Eo.Io(it,this.Bo),this.Po=!0)}Fo(){this.No&&this.t.Eo&&(this.t.Eo.Do(this.No),this.Po=!1)}bo(){let t=this.t.lo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}Co(){let t=this.t.lo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}$o(){ei(this.po,"theo-pip"),this.so&&this.fo&&ei(this.po,"theo-pip-"+this.fo),this.To&&(Jt(this.To),this.To=void 0)}yn(){this.$o(),this.Fo(),this.Ro(),this.t.vn(Z.ho,this.oo),this.t.vn(Z.uo,this.co),this.t.lo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Uo=!1,this.eo=!1,this.wo=!1,this.ko=!1,this.mo=!1,this.Po=!1,this.So=!1,this.oo=()=>{this.Uo=!0,this.Ao&&!this.so&&this.No&&this.Oo&&this.No.Vo<=this.Oo&&this.vo(!1)},this.co=()=>{this.ao||(this.Uo=!1,this.Zh(),this.xo(!1))},this.te=()=>{if(this.jo){const t=this.t.lo;d(this.jo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Bo=t=>{!this.ko&&this.Ao&&(S(t)||(this.Oo&&t<=this.Oo||this.So?this.eo||this.wo||this.vo(!1):this.eo?this.xo(!1):this.wo=!1))},this.Oo=i.visibility,this.fo=i.position,this.ao=i.retainPresentationModeOnSourceChange,this.Ao=void 0!==this.Oo,this.t=t,this.po=t.Lo,this.Zh=s,this.ro()}},Iu=class extends P{Ho(){let t=super.Ho();return t===Kt.INLINE&&this.qo.so?Kt.PICTURE_IN_PICTURE:t}zo(t){return t===Kt.PICTURE_IN_PICTURE||super.zo(t)}Wo(t){this.Go=this.Xo,t===Kt.FULLSCREEN||t===Kt.NATIVE_PICTURE_IN_PICTURE?this.qo.Fo():this.qo.Mo(),super.Wo(t)}Jo(t){super.Jo(t),t===Kt.PICTURE_IN_PICTURE?G(this.Yo.Qo((t=>this.Ko(t)))):t===Kt.FULLSCREEN?this.qo.xo(!1):this.qo.xo(!0)}async Ko(t){z(t),await Promise.all([this.Zo(),this.ta.xo()]).catch(pi),z(t),this.qo.vo(!this.ia),this._o(new Mi(this.Xo)),this.ia=!1,this.sa=!1}wi(){this.sa||(this.qo.so&&this.ea.cs?this.Wo(Kt.FULLSCREEN):this.Go!==Kt.PICTURE_IN_PICTURE||this.ea.cs?super.wi():(this.ia=!0,this.Wo(Kt.PICTURE_IN_PICTURE)))}yn(){super.yn(),this.qo.yn(),this.na.vn(Z.ho,this.ra),this.na=void 0}constructor(t,i,s,e){super(i,s),this.Go=Kt.INLINE,this.ia=!1,this.Zh=()=>{this.Xo===Kt.PICTURE_IN_PICTURE&&this.Wo(Kt.INLINE)},this.ha=t=>{this.sa||(this.Xo!==Kt.PICTURE_IN_PICTURE||this.qo.so?this.Xo!==Kt.PICTURE_IN_PICTURE&&this.qo.so&&(this.ia=!0,this.Wo(Kt.PICTURE_IN_PICTURE)):this.Wo(Kt.INLINE))},this.ra=()=>{this.Ho()!==Kt.PICTURE_IN_PICTURE&&this.Ho()!==Kt.INLINE||this.qo.Mo(),this.na.vn(Z.ho,this.ra)},this.na=t,this.qo=new Nu(t,e.pip,this.Zh),this.qo.bn(ji.MODE_CHANGE,this.ha),this.na.bn(Z.ho,this.ra)}};f();var Bu,Fu=class extends J{get oa(){return Ci.aa(this.lo.el())||this.lo.supportsFullScreen()}get cs(){return this.lo.isFullscreen()||this.ua}vo(){this.lo.requestFullscreen()}xo(){this.lo.exitFullscreen(),this.ca.xo()}yn(){this.Ro(),this.lo.off("fullscreenchange",this.la),this.ca.vn(ni.da,this.la),this.ca.vn(ni.fa,this.Ds),this.lo.isFullWindow&&this.lo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.ua=!1,this.va=!1,this.la=()=>{if(this.va)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this._o(new ki))},this.pa=()=>{this.ua=this.ca.cs,this.la()},this.ma=()=>{this.va||(this.lo.isFullWindow&&this.lo.supportsFullScreen()||this.ua&&!this.lo.supportsFullScreen())&&(this.va=!0,this.lo.exitFullscreen(),this.lo.requestFullscreen(),this.va=!1,this.la())},this.lo=t,this.ca=i,this.lo.on("fullscreenchange",this.la),this.ca.bn(ni.da,this.pa),this.ca.bn(ni.ga,this.ma),this.ca.bn(ni.fa,this.Ds),this.la()}};function Du(t){return class extends t{get Eo(){return this.ya}cs(){return this.ba.Ho()===Kt.FULLSCREEN}ka(){return function(t,i){let s=w.create(t);const e=i.lo;return ht(s,{get controls(){return e.controls()},set controls(t){e.controls(dt(t))},get presentation(){return i.ba.wa},get presentationMode(){return i.ba.Ho()},set presentationMode(t){const s=si(t);s&&i.ba.Wo(s)},get ui(){return e},get visibility(){return i.Eo.wa}})}(this._a,this)}yn(){super.yn(),this.ba.yn(),this.xa.yn(),this.lo.dispose(),this.ya.yn()}Ca(t){this.lo.src(""),super.Ca(t)}constructor(t,i,s){super(i,s),this.Lo=t,this.ya=new et(t),this._a=super.ka(),w.defineProperty(this._a,"constructor",{value:ut}),this.lo=Au(this._a,this.Lo,s.ui),this.xa=new Fu(this.lo,this.Sa),this.ba=new Iu(this,this.xa,this.Ta.ja(),s),this.ba.bn(ji.MODE_CHANGE,this.Ds)}}}function $u(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Ut(t)&&!S(t))return bi(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=dt(t.retainPresentationModeOnSourceChange),t}function Ru(){return Bu||(Bu=function(t){let i=t;for(const t of Ei)i=t(i);return i}(Bu=Du(ot()))),Bu}function Uu(t,i){const s=function(t){const i=ti(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=$u(i.pip),i}(i),e=h.createElement("div");oi(e),t.appendChild(e);const n=new(Ru())(t,e,s);n.Ma=n;let r=n.wa;return n.Aa(),n.Pa(rt),w.defineProperty(r,"constructor",{value:Uu}),r=nt(r),Ot(n),function(t){for(const i of Ii)i(t)}(n),r}f(),f(),f(),f(),f();var Ou="theo-cast-",Vu=Po.getComponent("Button"),Lu=class extends(Uo(Vu)){get Ea(){throw new g("Na")}get Ia(){return this.h.Ia}get Ba(){return this.h.Ba}buildCSSClass(){return Ou+"button theo-"+this.Ba+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=Ou+"svg-container",r.innerHTML=this.Ia,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Fa===hi.AVAILABLE)null==(i=this.Ea)||i.start();else if(this.Fa===hi.CONNECTED||this.Fa===hi.CONNECTING){var s;null==(s=this.Ea)||s.stop()}}Da(t){ei(this.po,"theo-"+this.Ba+"-"+this.Fa),this.Fa=t,ii(this.po,"theo-"+this.Ba+"-"+this.Fa),this.te()}te(){this.$a(this.Fa),this.Be.Ie=this.controlText()}$a(t){t===hi.CONNECTED?this.controlText("Stop Casting"):t===hi.AVAILABLE?this.controlText("Start Casting"):t===hi.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.po=t.el(),this.Fa=hi.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new ca(this,this.controlText()),null==(s=this.Ea)||s.addEventListener("statechange",(t=>{const i=t;this.Da(i.state)})),fi.Ys.Qe&&(this.Ra=new Yo(this.el())),this.Da(this.Ea?this.Ea.state:hi.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Hu=0;function qu(){const t='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor">\n <defs>\n <clipPath id="theo-chromecast-rings-mask-'+Hu+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n <path class="theo-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/>\n <path class="theo-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/>\n <g class="theo-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theo-chromecast-rings-mask-'+Hu+')">\n <circle stroke="none" cx="0" cy="0" r="30" />\n <circle class="theo-chromecast-ring theo-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3" />\n <circle class="theo-chromecast-ring theo-chromecast-ring2" cx="0" cy="0" r="12" />\n <circle class="theo-chromecast-ring theo-chromecast-ring3" cx="0" cy="0" r="20"/>\n <path class="theo-chromecast-ring theo-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0" />\n </g>\n </svg>';return Hu++,t}Po.registerComponent("chromecastButton",class extends Lu{get Ea(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,Ti({},i,{Ba:"chromecast",Ia:qu()}))}}),f();var zu="theo-chromecast-",Wu=Po.getComponent("Component"),Gu=class t extends(Uo(Wu)){buildCSSClass(){return zu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();ii(i,zu+"overlay");const s=Po.createEl("div",{className:zu+"status-icon",innerHTML:t.ICON_SVG}),e=Po.createEl("div",{className:zu+"status-info"});d(e,"Playing on");const n=Po.createEl("div",{className:zu+"status-title"}),r=Po.createEl("div",{className:zu+"status"});return this.kr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Ua)||t.removeEventListener("statechange",this.update),this.Ua=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Ua?(this.kr&&d(this.kr,this.Ua.receiverName||""),this.Ua.state===hi.CONNECTED?this.show():this.hide()):this.hide()},this.Ua=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Ua)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};Gu.ICON_SVG='\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="currentColor">\n <path d="M7 24v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H11v1.63c3.96 1.28 7.09 4.41 8.37 8.37H25V13zM7 16v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H9c-1.1 0-2 .9-2 2v3h2v-3h18v14h-7v2h7c1.1 0 2-.9 2-2V11c0-1.1-.9-2-2-2z"/>\n</svg>',Po.registerComponent("chromecastOverlay",Gu),f(),f();Po.registerComponent("airplayButton",class extends Lu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Oa),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.Va),this.ws.removeEventListener("currentsourcechange",this.Va),super.dispose()}get Ea(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Ti({},i,{Ba:"airplay",Ia:'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">\n <path class="theo-cast-inner" d="M5 7h14v8H5z"/>\n <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"/>\n</svg>'})),this.Va=()=>{this.enable()},this.Oa=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Oa),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.Va),this.ws.addEventListener("currentsourcechange",this.Va)}}),f(),f(),f();var Xu=Po.getComponent("Button"),Ju=class extends(Uo(Xu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}xn(){const t=this.ws.vr;t&&t.state!==It.Rs?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.te()}te(){const t=this.ws.vr;t&&t.state!==It.Rs&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.La.Ie=this.controlText())}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener(["statechange","stereochange"],this.Ha),super.dispose()}constructor(t,i){var s;super(t,i),this.Ha=()=>this.xn(),this.controlText("Watch in VR"),this.La=new ca(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener(["statechange","stereochange"],this.Ha),this.xn(),fi.Ys.Qe&&(this.Ra=new Yo(this.el())),this.on(t,"languagechange",this.te)}};Po.registerComponent("vrButton",Ju),f();var Qu=Po.getComponent("Component"),Yu=class extends Qu{createEl(){const t=super.createEl("div",{className:this.buildCSSClass()}),i=Po.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.qa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}xn(){this.ws.vr.state===It.Rs?this.hide():this.show()}za(){const t=-this.ws.vr.direction.yaw+40;this.qa.style[mi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ha),this.ws.vr.removeEventListener("directionchange",this.Wa),super.dispose()}constructor(t,i,s){super(t,i),this.Ha=()=>this.xn(),this.Wa=()=>this.za(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ha),this.ws.vr.addEventListener("directionchange",this.Wa),this.xn(),this.za()}};f();var Ku=Po.getComponent("Component"),Zu=class extends Ku{Ga(){this.ws.vr.state===It.Xa?this.Ja():this.Qa()}Ja(){if(this.Ya)return;this.Ya=!0;const t=this.ws.element;this.Ka=t.style.zIndex||"",t.style.zIndex="2147483647",this.Za=this.player().isFullscreen(),this.player().requestFullscreen()}Qa(){if(!this.Ya)return;this.Ya=!1;this.ws.element.style.zIndex=this.Ka,this.Za?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Qa(),this.ws.vr.removeEventListener("statechange",this.tu),super.dispose()}constructor(t,i,s){super(t,i),this.Ya=!1,this.Za=!1,this.Ka="",this.tu=()=>this.Ga(),this.ws=s,this.ws.vr.addEventListener("statechange",this.tu),this.Ga()}};Bi((function(t){const i=t.wa;if(!i.vr)return;const s=t.lo,e=new Yu(s,{},i);if(t.bn(Z.uo,(()=>{var i;s.removeChild(e);const n=null==(i=t.iu())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),Dt.su){const t=new Zu(s,{},i);s.addChild(t)}})),f(),f(),f();var tc=class extends Y{constructor(){super("relatedchange")}},ic=["relatedchange"],sc=class extends J{get wa(){return this.eu||(this.eu=function(t){let i,s={get sources(){return t.nu},set sources(i){t.nu=i},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new Pi(ic,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.hu}set nu(t){this.hu=function(t){return t.filter((t=>t&&(Gt(t.link)||ct(t,["source"]))))}(t),t.length>this.hu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this._o(new tc)}yn(){this.Ro(),this.hu=[]}constructor(...t){super(...t),this.hu=[]}};$t((function(t){return class extends t{ka(){const t=this.ou;return ht(super.ka(),{get related(){return t.wa}})}yn(){this.ou.yn(),super.yn()}constructor(t,i){super(t,i),this.ou=new sc}}}),Bt.au),f(),f();var ec=Po.getComponent("Button"),nc=class extends ec{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.cu.uu?this.cu.be():this.cu.ge()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.cu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Be=new ca(this,this.controlText()),this.on(t,"languagechange",this.te)}};f(),f();var rc=Po.getComponent("Button"),hc=class extends rc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.lu.hide()}constructor(t,i){super(t),this.lu=i}},oc=(()=>{let t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function ac(t,i,s){let e=oc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");ct(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Gt(s.link)&&n.setAttribute("href",s.link);let r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+A(s.image)+'")',r.removeAttribute("id");let h=e.querySelector(".theo-related-grid-tile-title");s.title?(d(h,s.title),h.removeAttribute("id")):Jt(h);let o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(d(o,s.duration),o.removeAttribute("id")):Jt(o),e}var uc=[15,12,9,8,6,4,3,2,1];var cc=class{get du(){return"theo-"+this.fu+"-item-grid"}vu(){this.pu.focus()}mu(t){this.gu(),function(t){if(t.length)for(let i of uc)if(t.length>=i){t.length=i;break}}(t),this.yu(t.length);for(let i of t){let t=ac(this.bu.wa,this.ku,i);this.wu.appendChild(t)}}gu(){this.wu.innerHTML=""}_u(){let t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.xu.className="theo-related",this.pu.controlText("Close Related Content"),this.Cu.appendChild(this.xu),this.xu.appendChild(t),t.appendChild(this.pu.el()),t.appendChild(i),i}yu(t){ei(this.wu,this.du),this.fu=t,ii(this.wu,this.du)}yn(){Jt(this.xu),this.Su.yn(),this.ju.yn(),this.pu.dispose(),this.bu=void 0}constructor(t,i,s,e,n){this.bu=t,this.Tu=i,this.ku=s,this.Cu=e,this.fu=12,this.Mu=t=>{this.wu.style.width=t.width+"px"},this.xu=h.createElement("div"),this.pu=new hc(this.Tu,{hide:()=>{this.ku.be()}}),this.wu=this._u(),this.ju=new lc(n),this.ju.bn(di.mn,this.Mu),this.Su=new Tt(this.wu,this.ju),this.yu(12)}},lc=class extends J{get Au(){return this.Pu||0}get Eu(){return this.Nu.Eu}yn(){this.Ro(),this.Nu.vn(di.mn,this.Iu)}constructor(t){super(),this.Nu=t,this.Iu=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.Pu=i,this._o(new vi(this.Au,t.height))},this.Nu.bn(di.mn,this.Iu)}};f();var dc=class extends Y{constructor(){super("show")}};f();var fc=class extends Y{constructor(){super("hide")}},vc="theo-related-available",pc="theo-related-showing",mc=[...ic,"show","hide"],gc=class extends J{get wa(){return this.eu||(this.eu=function(t){let i;const s={get sources(){return t.nu},set sources(i){t.nu=i},get showing(){return t.uu},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new Pi(mc,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.Bu.nu}set nu(t){this.Bu.nu=t}get uu(){return this.Fu}ge(){let t=this.Fu;this.Fu=!0,this.Du(pc),this.$u.vu(),this.Tu.paused()?this.Ru=!0:this.Tu.pause(),t!==this.Fu&&this._o(new dc)}be(){let t=this.Fu;this.Fu=!1,this.Uu(pc),this.Ou.focus(),this.Ru||this.Tu.play(),this.Ru=!1,t!==this.Fu&&this._o(new fc)}Du(t){this.Tu.el().classList.add(t)}Uu(t){this.Tu.el().classList.remove(t)}yn(){this.Ro(),this.$u.yn()}constructor(t,i,s,e){super(),this.Fu=!1,this.Ru=!1,this.Vu=t=>{const i=this.nu;this.$u.mu(i),i.length?(this.Du(vc),this.Ou.show()):(this.Uu(vc),this.Ou.hide()),this._o(t)},this.Bu=i,this.Bu.bn("relatedchange",this.Vu),this.Tu=s,this.$u=new cc(t,this.Tu,this,s.contentEl(),e),this.Ou=new nc(s,this,{})}};Ni((function(t){return class extends t{ka(){const t=this.Lu;return ht(super.ka(),{get related(){return t.wa}})}yn(){this.Lu.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.Lu=new gc(this,this.ou,this.lo,this.Hu)}}})),f(),f(),f();var yc=Po.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.qu.showing?this.qu.hide():this.qu.show()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.qu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Be=new ca(this,this.controlText()),this.on(t,"languagechange",this.te)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){let s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="zu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){let i=h.createElement("div");if(i.className="theo-social-text",t.label){let s=h.createElement("h5");s.className="theo-primary-background theo-social-label",d(s,t.label),i.appendChild(s)}let s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,d(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){let s=h.createElement("div");if(s.className="theo-social-texturl",t.label){let i=h.createElement("h5");i.className="theo-primary-background theo-social-label",d(i,t.label),s.appendChild(i)}let e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";let n=h.createElement("a");return n.target="zu",n.href=i,d(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var wc="<URL>";var _c=class{get we(){return this.xu}Wu(t){this.gu();for(let i of t)this.Gu(i)}vu(){this.pu.focus()}Gu(t){let i=function(t,i){return t.src?Ai(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.ku.Xu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Ju.appendChild(e):this.Qu.appendChild(e))}gu(){this.Ju.innerHTML="",this.Qu.innerHTML=""}yn(){Jt(this.xu),this.Yu.yn()}constructor(t,i,s,e){this.na=t,this.ku=i,this.Cu=s,this.Ku=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.pu=new hc(this.na,this.ku.wa),this.pu.controlText("Close Share"),this.$u=h.createElement("div"),this.$u.className="theo-social-container",this.xu=h.createElement("div"),this.xu.className="theo-social",this.Ju=h.createElement("div"),this.Ju.className="theo-social-icon-container",this.Qu=h.createElement("div"),this.Qu.className="theo-social-text-container",this.Cu.appendChild(this.xu),this.xu.appendChild(n),this.$u.appendChild(this.Ju),this.$u.appendChild(this.Qu),n.appendChild(this.pu.el()),n.appendChild(this.$u),this.Yu=new Tt(this.xu,this.Ku)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get wa(){return this.eu}get uu(){return this.Fu}get Zu(){return this.tc}set Zu(t){this.tc=t,this.$u.Wu(t),t.length?(this.Du(xc),this.Ou.show()):(this.Uu(xc),this.Ou.hide())}get Xu(){return this.ic||Si()}set Xu(t){this.ic=t}ge(){this.Fu=!0,this.Du(Cc),this.$u.vu(),this.sc.paused()?this.Ru=!0:this.sc.pause()}be(){this.Fu=!1,this.Uu(Cc),this.Ou.focus(),this.Ru||this.sc.play(),this.Ru=!1}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}yn(){this.Ou.dispose(),this.$u.yn()}constructor(t,i){this.Fu=!1,this.tc=[],this.Ru=!1,this.eu=function(t){return{get showing(){return t.uu},get items(){return t.Zu},set items(i){t.Zu=i},get url(){return t.Xu},set url(i){t.Xu=i},show(){t.ge()},hide(){t.be()}}}(this),this.sc=t,this.$u=new _c(this.sc,this,t.contentEl(),i),this.Ou=new bc(t,this.eu,{})}};Ni((function(t){return class extends t{ka(){let t=this.qu;return ht(super.ka(),{get social(){return t.wa}})}constructor(t,i,s){super(t,i,s),this.qu=new Sc(this.lo,this.Hu)}}})),f(),f();var jc=Po.getComponent("Component"),Tc=class extends jc{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=Ti({},Tc.prototype.h,{children:[]}),Po.registerComponent("upNextContainer",Tc),f(),f();var Mc="theo-upnext-bar-",Ac=Po.getComponent("Component"),Pc=class extends Ac{get uu(){return this.Fu}set uu(t){this.Fu=t,this.ec&&(this.ec.tabIndex=t?0:-1)}get nc(){return this.rc}set nc(t){this.rc=t}Ca(t){this.gu(),this.hc(t)}hc(t){if(t&&t.link&&t.image){const i=h.createElement("div");ii(i,Mc+"content"),i.onclick=()=>{this.oc.next()},i.onkeypress=t=>{13===t.which&&this.oc.next()};let s=h.createElement("div");if(s.style.backgroundImage='url("'+A(t.image)+'")',ii(s,Mc+"image"),i.appendChild(s),t.duration){let i=h.createElement("span");ii(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}let e=h.createElement("div");ii(e,Mc+"text");let n=h.createElement("div");if(ii(n,Mc+"upnext"),d(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");ii(i,Mc+"title"),d(i,t.title),e.appendChild(i)}i.appendChild(e),this.ec=i,this.ac=n,this.el().appendChild(this.ec)}}gu(){this.el().innerHTML="",this.ec=void 0,this.ac=void 0}te(){this.ac&&d(this.ac,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.ec=void 0,this.ac=void 0,this.oc=i,this.Yu=new Tt(this.el(),e),this.Fu=!1,this.rc=10,this.on(t,"languagechange",this.te)}};f();var Ec="theo-upnext-panel-",Nc=gu,Ic=Po.getComponent("Component"),Bc=class extends Ic{get uu(){return this.Fu}set uu(t){this.Fu=t}get uc(){return this.cc}set uc(t){this.cc=t}get lc(){return this.dc}set lc(t){this.dc=t}Ca(t){this.gu(),this.fc(t)}fc(t){if(t&&t.link&&t.image){let i=h.createElement("div");i.className=Ec+"content";let s=h.createElement("div");s.style.backgroundImage='url("'+A(t.image)+'")',s.className=Ec+"image",i.appendChild(s);let e=h.createElement("div");e.className=Ec+"text";let n=h.createElement("div");if(n.className=Ec+"upnext",d(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");i.className=Ec+"title",d(i,t.title),e.appendChild(i)}i.appendChild(e),this.vc=h.createElement("div"),this.vc.className=Ec+"autoplay",this.vc.innerHTML=yu;let r=this.vc.querySelector("svg");r.onclick=()=>{this.oc.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.oc.next()},this.mc=n,this.gc=this.vc.querySelector("."+Nc),i.appendChild(this.vc),this.el().appendChild(i)}}get yc(){return this.bc}set yc(t){this.bc=t,this.gc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}gu(){this.el().innerHTML="",this.mc=void 0,this.gc=void 0}te(){this.mc&&d(this.mc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.bc=0,this.oc=i,this.Yu=new Tt(this.el(),e),this.Fu=!1,this.cc=10,this.dc=!0,this.on(t,"languagechange",this.te)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get wa(){return this.eu}get kc(){return this.wc}get _c(){return this.xc}get Cc(){return this.Sc}set Cc(t){this.Sc=t,this.$u.Ca(t),this.jc.Ca(t),this.sc.off("timeupdate",this.Tc),this.sc.off("ended",this.Mc),t&&(this.sc.on("timeupdate",this.Tc),this.sc.on("ended",this.Mc))}Ac(){this.$u.uc?this.Pc=vt(this.$u.uc):0===this.$u.uc?this.Pc=0:this.Pc=10,0!==this.Pc?(isFinite(this.Pc)&&(this.Ec=!0),this.$u.uu=!0,this.Du(Fc),this.Ec&&(this.$u.yc=$c-$c/this.Pc,this.Nc=p(this.Ic,1e3))):this.Bc()}Fc(){this.$u.uu=!1,this.Uu(Fc),this.Ec&&(m(this.Nc),this.Dc=1,this.$u.yc=$c)}$c(){this.jc.uu=!0,this.Du(Dc)}Rc(){this.jc.uu=!1,this.Uu(Dc)}Bc(){m(this.Nc),this.Cc&&(s.location.href=this.Cc.link)}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}Uc(t,i){const s=t>=i&&!(this.Oc&&this.Oc.Vc);this.jc.uu&&!s?this.Rc():!this.jc.uu&&s&&this.$c()}Lc(t,i){this.$u.uu&&t<i&&!this.sc.ended()&&this.Fc()}static Hc(t,i){let s=vt(t);if(!S(s))return i-s;let e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-x(e[1],10)/100)}}yn(){this.Nc&&m(this.Nc),this.sc.getChild("upNextContainer").removeChild(this.$u),this.sc.getChild("upNextContainer").removeChild(this.jc),this.$u.dispose(),this.jc.dispose()}constructor(i,s,e){this.Sc=void 0,this.Pc=10,this.Dc=1,this.Nc=void 0,this.Ec=!0,this.Ic=()=>{this.Dc!==this.Pc?(this.$u.yc-=$c/this.Pc,this.Dc+=1):this.Bc()},this.Mc=()=>{this.$u.uu||this.Ac()},this.Tc=()=>{let i=this.sc.currentTime(),s=this.sc.duration(),e=s?t.Hc(this.jc.nc,s):void 0;void 0!==e&&this.Uc(i,e),this.$u.lc&&this.Lc(i,s)},this.eu=function(t){return{get source(){return t.Cc},set source(i){t.Cc=i},get bar(){return t.kc},get panel(){return t._c},next(){t.Bc()}}}(this),this.jc=new Pc(i,this.eu,{},s),this.$u=new Bc(i,this.eu,{},s),this.wc=function(t,i){return{get showing(){return i.uu},get offset(){return i.nc},set offset(t){i.nc=t},show(){t.$c()},hide(){t.Rc()}}}(this,this.jc),this.xc=function(t,i){return{get showing(){return i.uu},get countdownDuration(){return i.uc},set countdownDuration(t){i.uc=t},get showUpNextPanel(){return i.lc},set showUpNextPanel(t){i.lc=t},show(){t.Ac()},hide(){t.Fc()}}}(this,this.$u),this.sc=i,this.Oc=e,i.getChild("upNextContainer").addChild(this.jc,{}),i.getChild("upNextContainer").addChild(this.$u,{})}};Ni((function(t){return class extends t{ka(){let t=this.qc;return ht(super.ka(),{get upnext(){return t.wa}})}yn(){this.qc.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.qc=new Rc(this.lo,this.Hu,this.zc)}}})),f(),f();var Uc=Po.getComponent("Component"),Oc=class extends Uc{createEl(){let t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);let n=h.createElement("div");return n.className="theo-context-version",d(n,"Powered by THEOplayer 9.3.1"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="zu",t.appendChild(i),t}Wc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";let s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);Q(this.el(),r,n,h);let o=i.clientY-s.getBoundingClientRect().top;K(this.el(),o,n,h),this.Gc()}Xc(){this.hide(),this.clearTimeout(this.Jc)}Gc(){this.Jc=this.setTimeout(this.Xc,4e3)}Qc(){this.clearTimeout(this.Jc)}dispose(){this.Xc(),this.off(this.player(),"contextmenu",this.Wc),this.el().removeEventListener("mousedown",Vc,!0),this.off(h,"mousedown",this.Xc),this.off("mouseout",this.Gc),this.off("mouseover",this.Qc),super.dispose()}constructor(t,i){super(t,i),this.Jc=0,this.on(this.player(),"contextmenu",this.Wc),this.el().addEventListener("mousedown",Vc,!0),this.on(h,"mousedown",this.Xc),this.on("mouseout",this.Gc),this.on("mouseover",this.Qc),this.Xc()}};function Vc(t){t.stopPropagation()}Bi((function(t){const i=new Oc(t.lo,{});t.lo.addChild(i),t.lo.on("dispose",(()=>{t.lo.removeChild(i),i.dispose()}))})),f(),f(),f(),f();var Lc={Default:"","Monospaced Serif":B.Yc,"Proportional Serif":B.Kc,"Monospaced Sans-Serif":B.Zc,"Proportional Sans-Serif":B.tl},Hc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},qc=[50,75,100,150,200];function zc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map((i=>({label:i,value:t[i]})))}qc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Gc=qc.map((function(t){return{label:t+"%",value:t+"%"}})),Xc=[25,50,75,100].map(zc),Jc=[0,25,50,75,100].map(zc),Qc=Wc(Hc),Yc=Wc(Lc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000";f();var el=class extends Qa{il(){let t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",ii(this.nl.el(),"theo-subtitle-options-menu-item"),this.nl.el().appendChild(this.Rr),this.nl.el().appendChild(i),i}rl(t){const i=this.Pr(t);i&&this.hl(i)}ol(){return this.Cr}Ir(t){this.al(t.Er)}hl(t){for(let t of this.Mr.menuItems)t.selected(!1);t?(t.selected(!0),this.cl(t.Er.label)):this.cl("Custom")}cl(t){this.ll=t,d(this.dl,this.Ur.localize(t)),this.nl.parentMenu.re()}Nr(t){let i=super.Nr(t);return ii(i.el(),"theo-subtitle-options-menu-item"),this.Dr(i),i}Dr(t){const i=this.Ur.localize(t.Er.label);d(t.el(),i);const s=this.Ur.localize("Set "+this.sl+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.nl=t,this.Ur=e,this.ll="",this.te=()=>{let t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),d(this.Rr,t),this.cl(this.ll);for(const t of this.Ar)this.Dr(t)},this.sl=i,this.al=s.fl,this.dl=this.il(),this.Cr=s.vl,this.Ur.on("languagechange",this.te)}};f();var nl=class t{static pl(t,i,s,e){if(void 0===t&&void 0===i)return;return q(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.ml=i,this.gl=t=>{this.ml.fontFamily=t.value},this.yl=t=>{this.ml.fontSize=t.value},this.bl=i=>{this.kl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this._l=i=>{this.wl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this.xl=i=>{this.Cl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.jl=i=>{this.Sl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.Tl=i=>{this.Ml=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.Pl=i=>{this.Al=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.El=t=>{this.ml.edgeStyle=t.value}}};f();var rl=class{Nl(t,i){const s=this.Il(t,i.ol());s&&i.rl(s)}Il(t,i){return $(i,(i=>i.value===t))}Bl(t,i,s){let e,n;if(void 0===t)e=this.Il(void 0,i.ol()),n=this.Il(void 0,s.ol());else if(t){let r=function(t){let i=L(t);i||(i=L(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=D(R(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=D(R(Hc[s]),1)}return i}(t);if(r){let t=O(r),h=100*r.Fl;e=this.Il(t,i.ol()),n=this.Il(h,s.ol())}}e&&i.rl(e),n&&s.rl(n)}constructor(t,i){this.ml=t,this.Dl=i,this.$l=()=>{let t=this.ml.fontFamily;this.Nl(t,this.Dl["Font family"]);let i=this.ml.fontColor;this.Bl(i,this.Dl["Font color"],this.Dl["Font opacity"]);let s=this.ml.fontSize;this.Nl(s,this.Dl["Font size"]);let e=this.ml.backgroundColor;this.Bl(e,this.Dl["Background color"],this.Dl["Background opacity"]);let n=this.ml.windowColor;this.Bl(n,this.Dl["Window color"],this.Dl["Window opacity"]);let r=this.ml.edgeStyle;this.Nl(r,this.Dl["Character edge style"])},this.ml.addEventListener("change",this.$l),this.$l()}};var hl=class extends Qa{Rl(){return{"Font family":{vl:ol(Yc),fl:this.Ul.gl},"Font color":{vl:ol(Qc),fl:this.Ul._l},"Font opacity":{vl:ol(Xc),fl:this.Ul.bl},"Font size":{vl:ol(Gc),fl:this.Ul.yl},"Background color":{vl:ol(Qc),fl:this.Ul.xl},"Background opacity":{vl:ol(Jc),fl:this.Ul.jl},"Window color":{vl:ol(Qc),fl:this.Ul.Tl},"Window opacity":{vl:ol(Jc),fl:this.Ul.Pl},"Character edge style":{vl:ol(Kc),fl:this.Ul.El}}}Ol(){this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",this.Vl=h.createElement("span"),this.Vl.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(this.Vl),this.te()}Nr(t){let i=this.Mr.addSubMenuItem();return i.Er=t,this.Dl[t]=new el(i,t,this.Ll[t],this.Ur),i}Dr(t){}Ir(t){}Re(){this.Ur.off("languagechange",this.te),this.Hl.removeEventListener(["addtrack","removetrack"],this.ql),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Gr=t,this.Hl=i,this.Ur=e,this.Dl={},this.ql=()=>{this.Hl.some((t=>T(t.kind)))?this.Gr.show():this.Gr.hide()},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitle Options")),d(this.Rr,this.Ur.localize("Subtitle")),d(this.Vl,this.Ur.localize("Options")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the subtitle options menu"))},this.Ul=new nl(s),this.Ll=this.Rl(),this.Cr=w.keys(this.Ll),this.Ol(),this.zl=new rl(s,this.Dl),this.Ur.on("languagechange",this.te),this.Hl.addEventListener(["addtrack","removetrack"],this.ql),this.ql()}};function ol(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}Bi((function(t){const i=t.lo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.wa,t.Wl.wa,t.lo);t.lo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))})),f(),f();var al=Po.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=Ti({},al.prototype.h,{children:[]}),Po.registerComponent("AdControlPanel",ul),f(),f();var cl=Po.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Gl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.na=t,this.eu=i,this.te=()=>{const t=this.eu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&d(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.na.localize(t))))},this.po=t.el(),this.Gl(i,i.ads),this.on(t,"languagechange",this.te)}};f();var fl=Po.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return Rt}createEl(t,i,s){return this.h.wa.element.querySelector("."+Rt)}emitTapEvents(){}te(){d(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),d(this.el(),t.localize("Learn more")),this.eu=i.wa,this.po=t.el(),this.on(t,"languagechange",this.te)}};Bi((function(t){if(t.wa.ads&&t.Xl){const i=t.lo,s=new dl(i,t.wa);i.adControlBar.addChild(s);if(t.wa.element.querySelector("."+Rt)){const s=new vl(i,{wa:t.wa});i.adControlBar.addChild(s)}}})),f(),f();var pl=Po.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Uo(pl)){createEl(){let t=super.createEl();return this.qualityLabel=Po.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),ui(this.qualityLabel),t}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=void 0),this.ws.videoTracks.removeEventListener(ml,this.ah),super.dispose()}constructor(t,i){super(t,i),this.Jr=void 0,this.ah=()=>{const t=Wa(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Jl),this.Jl())},this.Jl=()=>{const t=this.Jr&&this.Jr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(d(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(ml,this.ah),this.ah())}};Po.registerComponent("activeQualityLabel",gl),f(),f();var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Uo(fa)){createEl(){const t=Po.createEl("div",{className:yl});return this.notificationText=Po.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}Ql(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e];let r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Yl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.Kl();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.Kl();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.Kl():this.Zl(i)}Zl(t){this.td!==t&&(d(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.td=t,this.show())}Kl(){this.td=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.td=NaN,this.handleTimeUpdate=()=>{this.Yl()},this.handleAdEvent=()=>{this.Ql(),this.Yl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(bl,this.handleAdEvent))}};Po.registerComponent("upcomingAdNotificationText",kl),f(),f();var wl=Po.getComponent("Component");Po.registerComponent("UplynkAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get sd(){return this.h.adBreakProvider()}te(t,i){if(this.sd&&this.sd.endTime){const s=_.max(this.sd.endTime-t,0);d(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.ed)}}),f();var _l=Po.getComponent("ClickableComponent");Po.registerComponent("UplynkAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.nd=h.createElement("span"),t.appendChild(this.nd),this.te(t,this.nd),t}handleClick(){this.h.skipCallback()}te(t,i){this.rd<=kt.ad.od?(ei(t,"theoplayer-ad-skip-countdown"),ii(t,"theoplayer-ad-skip-button"),d(i,"Skip ads")):d(i,"Skip ads in "+_.ceil(this.rd)+"s")}get rd(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.el(),this.nd)},this.on(t,"timeupdate",this.ed)}}),f(),f();var xl=Po.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};Po.registerComponent("UplynkAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-adbreak"}}),f(),f();var Sl=Po.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};Po.registerComponent("UplynkAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-adbreak"}}),f();Po.registerComponent("UplynkAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-asset"}}),f();Po.registerComponent("UplynkAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-asset"}}),f();var Tl=Po.getComponent("Component");Po.registerComponent("UplynkContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-uplynk-content-notification-bar";return t+(Dt.su||Dt.ud?" "+t+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Ml=Po.getComponent("Component");function Al(t,i){const s=t.uplynk;return Boolean(t&&void 0===s)||Boolean(t&&s&&void 0===s.ui)||Boolean(t&&s&&s.ui&&void 0===s.ui[i])||Boolean(t&&s&&s.ui&&!0===s.ui[i])}Po.registerComponent("UplynkContentNotification",class extends Ml{get ld(){return this.h.asset}buildCSSClass(){return"theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}yo(){const t=h.createElement("img");t.src=this.ld.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.ld.description);d(i,s),this.el().appendChild(i),this.dd=h.createElement("div"),this.dd.className=this.buildCSSClass()+"-countdown",d(this.dd,this.fd),this.el().appendChild(this.dd)}get fd(){const t=_.min(10,this.vd);return"Starting in "+_.ceil(t)+" seconds"}get vd(){return _.max(0,this.ld.startTime-this.player().currentTime())}pd(){const t=this.vd;t>10||t<=0?this.hide():(d(this.dd,this.fd),this.show())}constructor(t,i){super(t,i),this.yo(),this.on(t,"timeupdate",this.pd),this.hide()}}),f(),Ni((function(t){return class extends t{get md(){return this.lo.controlBar.progressControl.seekBar}Ca(t){this.gd=!1,this.wa.removeEventListener("timeupdate",this.yd),this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton"),this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.removeChild("UplynkAssetMarkerBar"),this.lo.removeChild("UplynkContentNotificationBar"),super.Ca(t)}bd(){if(!function(t){return Al(t,"assetMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAssetMarkerBar"),this.md.addChild("UplynkAssetMarkerBar",{children:t})}wd(){if(!function(t){return Al(t,"contentNotification")}(this.kd))return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkContentNotification",asset:t})));this.lo.removeChild("UplynkContentNotificationBar"),this.lo.addChild("UplynkContentNotificationBar",{children:t})}yn(){this.wa.removeEventListener("timeupdate",this.yd);const t=this.wa.uplynk;null==t||t.ads.adBreaks.removeEventListener("addadbreak",this._d),null==t||t.ads.adBreaks.removeEventListener("removeadbreak",this.xd),null==t||t.assets.removeEventListener("addasset",this.Cd),null==t||t.assets.removeEventListener("removeasset",this.Cd),this.wa.removeEventListener("loadeddata",this.Sd),super.yn()}constructor(t,i,s){super(t,i,s),this.gd=!1,this.Sd=()=>{this.gd=!0,isFinite(this.jd())||this.wa.addEventListener("timeupdate",this.yd),this.yd(),this.bd(),this.wd()},this._d=t=>{t.adBreak.addEventListener("adbreakbegin",this.Td),t.adBreak.addEventListener("adbreakend",this.Md),this.yd()},this.xd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Td),t.adBreak.removeEventListener("adbreakend",this.Md),this.yd()},this.yd=()=>{if(!function(t){return Al(t,"adBreakMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk,i=null==t?void 0:t.ads.adBreaks.map((t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.addChild("UplynkAdBreakMarkerBar",{children:i})},this.Td=()=>{if(function(t){return Al(t,"adNotification")}(this.kd)){const t=this.wa.uplynk,i=t.ads.currentAdBreak;this.lo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Pd}),-1!==i.skipOffset&&this.lo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},this.Pd=()=>this.wa.uplynk.ads.currentAdBreak,this.Md=()=>{this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton")},this.Cd=()=>{this.bd(),this.wd()};const e=this.wa.uplynk;null==e||e.ads.adBreaks.addEventListener("addadbreak",this._d),null==e||e.ads.adBreaks.addEventListener("removeadbreak",this.xd),null==e||e.assets.addEventListener("addasset",this.Cd),null==e||e.assets.addEventListener("removeasset",this.Cd),this.wa.addEventListener("loadeddata",this.Sd)}}}));export{ut as ChromelessPlayer,st as ErrorCategory,tt as ErrorCode,Uu as Player,Ft as cache,Pt as cast,ft as features,gt as players,bt as registerContentProtectionIntegration,lt as utils,pt as version,Po as videojs};
40
+ var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),v=a.clearTimeout,p=a.setInterval,m=a.clearInterval,g=a.Error,b=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as E,Ba as N,C as I,Ca as B,D as F,Da as D,E as $,Ea as R,F as U,Fa as O,G as V,Ga as L,H,Ha as q,I as z,Ia as W,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as d,N as tt,Na as it,O as st,Oa as et,P as nt,Pa as rt,Q as ht,Qa as ot,R as at,Ra as ut,S as ct,Sa as lt,T as dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,ab as Pt,b as Et,ba as Nt,bb as It,c as f,ca as Bt,cb as Ft,d as Dt,da as $t,db as Rt,e as Ut,ea as Ot,eb as Vt,f as Lt,fa as Ht,fb as qt,g as zt,ga as Wt,h as Gt,ha as Xt,i as Jt,ia as Qt,j as Yt,ja as Kt,k as Zt,ka as ti,l as ii,la as si,m as ei,ma as ni,n as ri,na as hi,o as oi,oa as ai,p as ui,pa as ci,q as li,qa as di,r as fi,ra as vi,s as pi,sa as mi,t as gi,ta as yi,u as bi,ua as ki,v as wi,va as _i,w as xi,wa as Ci,x as Si,xa as ji,y as Ti,ya as Mi,z as Ai,za as Pi}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var Ei=[];function Ni(t){Ei.push(t)}var Ii=[];function Bi(t){Ii.push(t)}f(),f(),f(),f();var c=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Fi=void 0!==h?h:{createElement:function(){}};function Di(t,i){return i||(i=t.slice(0)),t.raw=i,t}var $i=1;function Ri(){return $i++}var Ui,Oi=w.prototype.toString,Vi=function(t){return qi(t)?w.keys(t):[]};function Li(t,i){Vi(t).forEach((function(s){return i(t[s],s)}))}function Hi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return w.assign?w.assign.apply(w,[t].concat(s)):(s.forEach((function(i){i&&Li(i,(function(i,s){t[s]=i}))})),t)}function qi(t){return!!t&&"object"==typeof t}function zi(t){return qi(t)&&"[object Object]"===Oi.call(t)&&t.constructor===w}var Wi=function(t,i,s){void 0===s&&(s=!!zs&&zs<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),Ui.history.push(i),i.unshift("VIDEOJS:");var e=c.console&&c.console[t];e&&(s&&(i=i.map((function(t){if(qi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](c.console,i):e(i))};(Ui=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Wi("log",i)}).history=[],Ui.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Wi("error",i)},Ui.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Wi("warn",i)};var Gi=Ui,Xi="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ji(t){return t.replace(/\n\r?\s*/g,"")}var Qi,Yi=function(t){for(var i="",s=0;s<arguments.length;s++)i+=Ji(t[s])+(arguments[s+1]||"");return i};function Ki(t){return"string"==typeof t&&/\S/.test(t)}function Zi(t){if(/\s/.test(t))throw new g("class has illegal whitespace characters")}function ts(){return Fi===c.document&&void 0!==Fi.createElement}function is(t){return qi(t)&&1===t.nodeType}function ss(t){return function(i,s){if(!Ki(i))return Fi[t](null);Ki(s)&&(s=Fi.querySelector(s));var e=is(s)?s:Fi;return e[t]&&e[t](i)}}function es(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Fi.createElement(t);return w.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Gi.warn(Yi(Qi||(Qi=Di(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),n.setAttribute(t,s)):"textContent"===t?ns(n,s):n[t]=s})),w.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&xs(n,e),n}function ns(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function rs(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var hs={},os="vdata"+(new Date).getTime();function as(t){var i=t[os];return i||(i=t[os]=Ri()),hs[i]||(hs[i]={}),hs[i]}function us(t){var i=t[os];return!!i&&!!w.getOwnPropertyNames(hs[i]).length}function cs(t){var i=t[os];if(i){delete hs[i];try{delete t[os]}catch(i){t.removeAttribute?t.removeAttribute(os):t[os]=null}}}function ls(t,i){return Zi(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function ds(t,i){return t.classList?t.classList.add(i):ls(t,i)||(t.className=(t.className+" "+i).trim()),t}function fs(t,i){return t.classList?t.classList.remove(i):(Zi(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function vs(t,i,s){var e=ls(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?ds(t,i):fs(t,i),t}function ps(t,i){w.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function ms(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function gs(t,i,s){t.setAttribute(i,s)}function ys(t,i){t.removeAttribute(i)}function bs(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Fi.documentElement,e=Fi.body,n=s.clientLeft||e.clientLeft||0,r=c.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=c.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:_.round(h),top:_.round(u)}}function ks(t,i){var s={},e=bs(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function ws(t){return qi(t)&&3===t.nodeType}function _s(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function xs(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),is(t)||ws(t)?t:"string"==typeof t&&/\S/.test(t)?Fi.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Cs(t,i){return xs(_s(t),i)}var Ss,js=ss("querySelector"),Ts=ss("querySelectorAll"),Ms=c.navigator&&c.navigator.userAgent||"",As=/AppleWebKit\/([\d.]+)/i.exec(Ms),Ps=As?C(As.pop()):null,Es=/iPad/i.test(Ms),Ns=/iPhone/i.test(Ms)&&!Es,Is=/iPod/i.test(Ms),Bs=Ns||Es||Is,Fs=(Ss=Ms.match(/OS (\d+)_/i))&&Ss[1]?Ss[1]:null,Ds=/Android/i.test(Ms),$s=function(){var t=Ms.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Rs=Ds&&/webkit/i.test(Ms)&&$s<2.3,Us=Ds&&$s<5&&Ps<537,Os=/Firefox/i.test(Ms),Vs=/Edge/i.test(Ms),Ls=!Vs&&/Chrome/i.test(Ms),Hs=function(){var t=Ms.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),qs=/MSIE\s8\.0/.test(Ms),zs=function(){var t=/MSIE\s(\d+)\.\d/.exec(Ms),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(Ms)&&/rv:11.0/.test(Ms)&&(i=11),i}(),Ws=/Safari/i.test(Ms)&&!Ls&&!Ds&&!Vs,Gs=Ws||Bs,Xs=ts()&&("ontouchstart"in c||c.DocumentTouch&&c.document instanceof c.DocumentTouch),Js=ts()&&"backgroundSize"in c.document.createElement("video").style,Qs=w.freeze({__proto__:null,IS_IPAD:Es,IS_IPHONE:Ns,IS_IPOD:Is,IS_IOS:Bs,IOS_VERSION:Fs,IS_ANDROID:Ds,ANDROID_VERSION:$s,IS_OLD_ANDROID:Rs,IS_NATIVE_ANDROID:Us,IS_FIREFOX:Os,IS_EDGE:Vs,IS_CHROME:Ls,CHROME_VERSION:Hs,IS_IE8:qs,IE_VERSION:zs,IS_SAFARI:Ws,IS_ANY_SAFARI:Gs,TOUCH_ENABLED:Xs,BACKGROUND_SIZE_SUPPORTED:Js});function Ys(t,i){var s=as(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&cs(t)}function Ks(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function Zs(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||c.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Fi),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Fi.documentElement,h=Fi.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var te=!1;!function(){try{var t=w.defineProperty({},"passive",{get:function(){te=!0}});c.addEventListener("test",null,t)}catch(t){}}();var ie=["touchstart","touchmove"];function se(t,i,s){if(Array.isArray(i))return Ks(se,t,i,s);var e=as(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ri()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=Zs(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h<o&&!i.isImmediatePropagationStopped();h++)try{r[h].call(t,i,s)}catch(t){Gi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;te&&ie.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ee(t,i,s){if(us(t)){var e=as(t);if(e.handlers){if(Array.isArray(i))return Ks(ee,t,i,s);var n=function(i){e.handlers[i]=[],Ys(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);Ys(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function ne(t,i,s){var e=us(t)?as(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=Zs(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)ne.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=as(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function re(t,i,s){if(Array.isArray(i))return Ks(re,t,i,s);var e=function e(){ee(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Ri(),se(t,i,e)}var he,oe=!1,ae=function(){if(ts()){var t=Fi.getElementsByTagName("video"),i=Fi.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){ue(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&he(u)}else oe||ue(1)}};function ue(t,i){i&&(he=i),c.setTimeout(ae,t)}ts()&&"complete"===Fi.readyState?oe=!0:re(c,"load",(function(){oe=!0}));var ce=function(t){var i=Fi.createElement("style");return i.className=t,i},le=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},n=function(t,i,s){i.guid||(i.guid=Ri());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function de(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function fe(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&Li(i,(function(i,s){zi(i)?(zi(t[s])||(t[s]={}),t[s]=fe(t[s],i)):t[s]=i}))})),t}var ve=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=fe({},this.h),i=this.h=fe(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+Ri()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),cs(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Gi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=fe(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return es(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=de(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=de(i),s||(s={}),!0===s&&(Gi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new g("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&de(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||de(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))se(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(se(r,h,o),se(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ee(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ee(e,r,h),ee(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))re(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return ne(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return js(t,i||this.contentEl())},i.$$=function(t,i){return Ts(t,i||this.contentEl())},i.hasClass=function(t){return ls(this.v,t)},i.addClass=function(t){return ds(this.v,t),this},i.removeClass=function(t){return fs(this.v,t),this},i.toggleClass=function(t,i){return vs(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return gs(this.v,t,i),this},i.removeAttribute=function(t){return ys(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+de(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new g("currentDimension only accepts width or height value");if("function"==typeof c.getComputedStyle){var s=c.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=C(i))){var e="offset"+de(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=c.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){c.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=c.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){c.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=de(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new g("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=de(i),t.M&&t.M[i]?t.M[i]:c&&c.videojs&&c.videojs[i]?(Gi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),c.videojs[i]):void 0},t.extend=function(i){i=i||{},Gi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();ve.registerComponent("Component",ve);var pe=function(){};function me(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ge(t,i){return(ge=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function ye(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,ge(t,i)}function be(t,i,s,e){return void 0===e&&(Gi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new g("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function ke(t){return void 0===t||0===t.length?{length:0,start:function(){throw new g("This TimeRanges object is empty")},end:function(){throw new g("This TimeRanges object is empty")}}:{length:t.length,start:be.bind(null,"start",0,t),end:be.bind(null,"end",1,t)}}function we(t,i){return Array.isArray(t)?ke(t):void 0===t||void 0===i?ke():ke([[t,i]])}function _e(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=we(0,0));for(var r=0;r<t.length;r++)s=t.start(r),(e=t.end(r))>i&&(e=i),n+=e-s;return n/i}pe.prototype.A={},pe.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},se(this,t,i),this.addEventListener=s},pe.prototype.addEventListener=pe.prototype.on,pe.prototype.off=function(t,i){ee(this,t,i)},pe.prototype.removeEventListener=pe.prototype.off,pe.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},re(this,t,i),this.addEventListener=s},pe.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=Zs(t),this.A[i]&&this["on"+i]&&this["on"+i](t),ne(this,t)},pe.prototype.dispatchEvent=pe.prototype.trigger;var xe,Ce,Se,je,Te={prefixed:!0},Me=[["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"]],Ae=Me[0];for(Ce=0;Ce<Me.length;Ce++)if(Me[Ce][1]in Fi){xe=Me[Ce];break}if(xe){for(Se=0;Se<xe.length;Se++)Te[Ae[Se]]=xe[Se];Te.prefixed=xe[0]!==Ae[0]}function Pe(t){if(t instanceof Pe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:qi(t)&&("number"==typeof t.code&&(this.code=t.code),Hi(this,t)),this.message||(this.message=Pe.defaultMessages[this.code]||"")}for(Pe.prototype.code=0,Pe.prototype.message="",Pe.prototype.status=null,Pe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Pe.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},je=0;je<Pe.errorTypes.length;je++)Pe[Pe.errorTypes[je]]=je,Pe.prototype[Pe.errorTypes[je]]=je;var Ee=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Ne=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Ie=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=Ne(t.track);return t.src&&(i.src=t.src),i})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===s.indexOf(t)})).map(Ne))},Be=function(t,i){return t.forEach((function(t){var s=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return s.addCue(t)}))})),i.textTracks()},Fe="vjs-modal-dialog",De=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.I=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=es("div",{className:Fe+"-content"},{role:"document"}),e.B=es("p",{className:Fe+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),ns(e.B,e.description()),e.v.appendChild(e.B),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"F","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return Fe+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.I)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.R=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.R},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.I=!0,s.removeChild(i),this.empty(),Cs(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),_s(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.U=t),this.U},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),ns(this.B,this.description()),this.opened()?this.fill():(this.N||this.I)&&(this.N=!1,this.I=!1,this.empty())},i}(ve);De.prototype.h={pauseOnOpen:!0,temporary:!0},ve.registerComponent("ModalDialog",De);var $e=function(){function t(i){var s=this;if(qs)for(var e in s=Fi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.O.call(s,i),w.defineProperty(s,"length",{get:function(){return this.V}}),qs)return s}var i=t.prototype;return i.O=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.V=t.length;var n=function(t){""+t in this||w.defineProperty(this,""+t,{get:function(){return this.L[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),Re={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ue={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Oe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ve={disabled:"disabled",hidden:"hidden",showing:"showing"},Le=function(t){function i(s){var e;void 0===s&&(s={});var n=me(e=t.call(this)||this);if(qs)for(var r in n=Fi.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Ri()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){w.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||me(e)}return ye(i,t),i}(pe),He=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Fi.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Fi.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Fi.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&Fi.body.removeChild(e),r},qe=function(t){var i=c.location,s=He(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},ze={exports:{}};void 0!==s?ze.exports=s:void 0!==Xi?ze.exports=Xi:"undefined"!=typeof self?ze.exports=self:ze.exports={};var We=function(t){var i=Ge.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==s&&(t===s.setTimeout||t===s.alert||t===s.confirm||t===s.prompt)},Ge=w.prototype.toString;var Xe,Je,Qe,Ye,Ke,Ze,tn,sn,en,nn,rn,hn,on=Array.prototype.slice,an=w.prototype.toString,un=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==an.call(i))throw new b("Function.prototype.bind called on incompatible "+i);for(var s,e=on.call(arguments,1),n=_.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(on.call(arguments)));return w(n)===n?n:this}return i.apply(t,e.concat(on.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},cn=Function.prototype.bind||un,ln=w.prototype.toString,dn=function(t){var i=ln.call(t),s="[object Arguments]"===i;return s||(s="[object Array]"!==i&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===ln.call(t.callee)),s};w.keys||(Je=w.prototype.hasOwnProperty,Qe=w.prototype.toString,Ye=dn,Ke=w.prototype.propertyIsEnumerable,Ze=!Ke.call({toString:null},"toString"),tn=Ke.call((function(){}),"prototype"),sn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],en=function(t){var i=t.constructor;return i&&i.prototype===t},nn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},rn=function(){if(void 0===s)return!1;for(var t in s)try{if(!nn["$"+t]&&Je.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{en(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),hn=function(t){if(void 0===s||!rn)return en(t);try{return en(t)}catch(t){return!1}},Xe=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===Qe.call(t),e=Ye(t),n=i&&"[object String]"===Qe.call(t),r=[];if(!i&&!s&&!e)throw new b("Object.keys called on a non-object");var h=tn&&s;if(n&&t.length>0&&!Je.call(t,0))for(var o=0;o<t.length;++o)r.push(String(o));if(e&&t.length>0)for(var a=0;a<t.length;++a)r.push(String(a));else for(var u in t)h&&"prototype"===u||!Je.call(t,u)||r.push(String(u));if(Ze)for(var c=hn(t),l=0;l<sn.length;++l)c&&"constructor"===sn[l]||!Je.call(t,sn[l])||r.push(sn[l]);return r});var fn=Xe,vn=Array.prototype.slice,pn=dn,mn=w.keys,gn=mn?function(t){return mn(t)}:fn,yn=w.keys;gn.shim=function(){if(w.keys){var t=function(){var t=w.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(w.keys=function(t){return pn(t)?yn(vn.call(t)):yn(t)})}else w.keys=gn;return w.keys||gn};var bn=gn,kn="function"==typeof Mt&&"symbol"==typeof Mt("foo"),wn=w.prototype.toString,_n=Array.prototype.concat,xn=w.defineProperty,Cn=xn&&function(){var t={};try{for(var i in xn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Sn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===wn.call(t)}(e)&&e())&&(Cn?xn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},jn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=bn(i);kn&&(e=_n.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Sn(t,e[n],i[e[n]],s[e[n]])};jn.supportsDescriptors=!!Cn;var Tn,Mn=jn,An=w.getOwnPropertyDescriptor?function(){return w.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new b},Pn="function"==typeof Mt&&"symbol"==typeof Et,En=w.getPrototypeOf||function(t){return t.__proto__},Nn=void 0===j?Tn:En(j),In={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Tn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Tn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Pn?En([][Et]()):Tn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Tn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Tn,"$ %AsyncGenerator%":Tn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Tn,"$ %AsyncIteratorPrototype%":Tn,"$ %Atomics%":"undefined"==typeof Atomics?Tn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Tn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Tn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":g,"$ %ErrorPrototype%":g.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Tn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Tn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Tn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Tn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Tn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Tn,"$ %Int8Array%":"undefined"==typeof Int8Array?Tn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Tn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Tn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Tn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Tn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Tn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":Pn?En(En([][Et]())):Tn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Tn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Pn?En((new Map)[Et]()):Tn,"$ %MapPrototype%":"undefined"==typeof Map?Tn:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":w,"$ %ObjectPrototype%":w.prototype,"$ %ObjProto_toString%":w.prototype.toString,"$ %ObjProto_valueOf%":w.prototype.valueOf,"$ %parseFloat%":C,"$ %parseInt%":x,"$ %Promise%":"undefined"==typeof Promise?Tn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Tn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Tn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Tn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Tn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Tn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Tn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Tn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Tn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Pn?En((new Set)[Et]()):Tn,"$ %SetPrototype%":"undefined"==typeof Set?Tn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Tn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Tn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Pn?En(""[Et]()):Tn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Pn?Mt:Tn,"$ %SymbolPrototype%":Pn?Mt.prototype:Tn,"$ %SyntaxError%":k,"$ %SyntaxErrorPrototype%":k.prototype,"$ %ThrowTypeError%":An,"$ %TypedArray%":Nn,"$ %TypedArrayPrototype%":Nn?Nn.prototype:Tn,"$ %TypeError%":b,"$ %TypeErrorPrototype%":b.prototype,"$ %Uint8Array%":void 0===j?Tn:j,"$ %Uint8ArrayPrototype%":void 0===j?Tn:j.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Tn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Tn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Tn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Tn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Tn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Tn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Tn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Tn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Tn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Tn:WeakSet.prototype},Bn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new b('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in In))throw new k("intrinsic "+t+" does not exist!");if(void 0===In[s]&&!i)throw new b("intrinsic "+t+" exists, but is not available. Please file an issue!");return In[s]},Fn=cn.call(Function.call,w.prototype.hasOwnProperty),Dn=Bn,$n=Dn("%TypeError%"),Rn=Dn("%SyntaxError%"),Un=Fn,On={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(Un(i,e)&&!s[e])return!1;var n=Un(i,"[[Value]]"),r=Un(i,"[[Get]]")||Un(i,"[[Set]]");if(n&&r)throw new $n("Property Descriptors may not be both accessor and data descriptors");return!0}},Vn=Number.isNaN||function(t){return t!=t},Ln=Number.isNaN||function(t){return t!=t},Hn=Number.isFinite||function(t){return"number"==typeof t&&!Ln(t)&&t!==1/0&&t!==-1/0},qn=Function.prototype.toString,zn=/^\s*class\b/,Wn=function(t){try{var i=qn.call(t);return zn.test(i)}catch(t){return!1}},Gn=w.prototype.toString,Xn="function"==typeof Mt&&"symbol"==typeof Mt.toStringTag,Jn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Xn)return function(t){try{return!Wn(t)&&(qn.call(t),!0)}catch(t){return!1}}(t);if(Wn(t))return!1;var i=Gn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},Qn=w.prototype.toString,Yn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},Kn=Jn,Zn=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===Qn.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e<n.length;++e)if(Kn(t[n[e]])&&(s=t[n[e]](),Yn(s)))return s;throw new b("No default value")}throw new b("invalid [[DefaultValue]] hint supplied")},tr=Bn,ir=tr("%Object%"),sr=tr("%TypeError%"),er=tr("%String%"),nr=function(t,i,s,e){var n=On[i];if("function"!=typeof n)throw new Rn("unknown record type: "+i);if(!n(t,e))throw new $n(s+" must be a "+i);console.log(n(t,e),e)},rr=Vn,hr=Hn,or=function(t){return t>=0?1:-1},ar=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},ur=Fn,cr={ToPrimitive:function(t){return Yn(t)?t:arguments.length>1?Zn(t,arguments[1]):Zn(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return rr(i)?0:0!==i&&hr(i)?or(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(rr(i)||0===i||!hr(i))return 0;var s=or(i)*_.floor(_.abs(i));return ar(s,65536)},ToString:function(t){return er(t)},ToObject:function(t){return this.CheckObjectCoercible(t),ir(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new sr(i||"Cannot call method on "+t);return t},IsCallable:Jn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:rr(t)&&rr(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(ur(t,s)&&!i[s])return!1;var e=ur(t,"[[Value]]"),n=ur(t,"[[Get]]")||ur(t,"[[Set]]");if(e&&n)throw new sr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(nr(this,"Property Descriptor","Desc",t),!(!ur(t,"[[Get]]")&&!ur(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(nr(this,"Property Descriptor","Desc",t),!(!ur(t,"[[Value]]")&&!ur(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(nr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(nr(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new sr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new sr("ToPropertyDescriptor requires an object");var i={};if(ur(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),ur(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),ur(t,"value")&&(i["[[Value]]"]=t.value),ur(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),ur(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new b("getter must be a function");i["[[Get]]"]=s}if(ur(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new sr("setter must be a function");i["[[Set]]"]=e}if((ur(i,"[[Get]]")||ur(i,"[[Set]]"))&&(ur(i,"[[Value]]")||ur(i,"[[Writable]]")))throw new sr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},lr=cn.call(Function.call,String.prototype.replace),dr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,fr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,vr=function(){var t=cr.ToString(cr.CheckObjectCoercible(this));return lr(lr(t,dr,""),fr,"")},pr=vr,mr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:pr},gr=Mn,yr=mr,br=Mn,kr=vr,wr=mr,_r=function(){var t=yr();return gr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},xr=cn.call(Function.call,wr());br(xr,{getPolyfill:wr,implementation:kr,shim:_r});var Cr=xr,Sr=Jn,jr=w.prototype.toString,Tr=w.prototype.hasOwnProperty,Mr=Cr,Ar=function(t,i,s){if(!Sr(i))throw new b("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===jr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Tr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e):"string"==typeof t?function(t,i,s){for(var e=0,n=t.length;e<n;e++)null==s?i(t.charAt(e),e,t):i.call(s,t.charAt(e),e,t)}(t,i,e):function(t,i,s){for(var e in t)Tr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Pr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Er.call(s,e)&&(t[e]=s[e])}return t},Er=w.prototype.hasOwnProperty;var Nr=ze.exports,Ir=We,Br=function(t){if(!t)return{};var i={};return Ar(Mr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Mr(t.slice(0,s)).toLowerCase(),n=Mr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===w.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Fr=Pr,Dr=Rr;function $r(t,i,s){var e=t;return Ir(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Fr(i,{uri:t}),e.callback=s,e}function Rr(t,i,s){return Ur(i=$r(t,i,s))}function Ur(t){if(void 0===t.callback)throw new g("callback argument missing");var i=!1,s=function(s,e,n){i||(i=!0,t.callback(s,e,n))};function e(){var t=void 0;if(t=c.response?c.response:c.responseText||function(t){if("document"===t.responseType)return t.responseXML;var i=204===t.status&&t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!i)return t.responseXML;return null}(c),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:c};function r(t){return v(l),t instanceof g||(t=new g(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;v(l),i=t.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:f,headers:{},url:d,rawRequest:c},c.getAllResponseHeaders&&(r.headers=Br(c.getAllResponseHeaders()))):h=new g("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,c=t.xhr||null;c||(c=t.cors||t.useXDR?new Rr.XDomainRequest:new Rr.XMLHttpRequest);var l,d=c.url=t.uri||t.url,f=c.method=t.method||"GET",p=t.body||t.data||null,m=c.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(t.json))),c.onreadystatechange=function(){4===c.readyState&&h()},c.onload=h,c.onerror=r,c.onprogress=function(){},c.ontimeout=r,c.open(f,d,!y,t.username,t.password),y||(c.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(l=u((function(){a=!0,c.abort("timeout");var t=new g("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),c.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&c.setRequestHeader(o,m[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new g("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(c),c.send(p),c}Rr.XMLHttpRequest=Nr.XMLHttpRequest||function(){},Rr.XDomainRequest="withCredentials"in new Rr.XMLHttpRequest?Rr.XMLHttpRequest:Nr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Rr["delete"===t?"del":t]=function(i,s,e){return(s=$r(i,s,e)).method=t.toUpperCase(),Ur(s)}}));var Or=function(t,i){var s=new c.WebVTT.Parser(c,c.vttjs,c.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(c.console&&c.console.groupCollapsed&&c.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return Gi.error(t)})),c.console&&c.console.groupEnd&&c.console.groupEnd()),s.flush()},Vr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new g("A tech was not provided.");var r=fe(s,{kind:Oe[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=Ve[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,qs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var l=new $e(a.L),d=new $e(a.q),f=!1,v=n(a,(function(){this.activeCues,f&&(this.trigger("cuechange"),f=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",v)}),!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;Ve[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",v)}),!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?l:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return d;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(f=!1,i.length!==this.q.length)f=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(f=!0);return this.q=i,d.O(this.q),d},set:function(){}}),r.src?(a.src=r.src,function(t,i){var s={uri:t},e=qe(t);e&&(s.cors=e),Dr(s,n(this,(function(t,s,e){if(t)return Gi.error(t,s);if(i.W=!0,"function"!=typeof c.WebVTT){if(i.H){var n=function(){return Or(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){Gi.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else Or(e,i)})))}(r.src,a)):a.W=!0,a||me(e)}ye(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(c.vttjs&&!(t instanceof c.vttjs.VTTCue)){for(var s in i=new c.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.O(this.L)},s.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.O(this.L);break}}},i}(Le);Vr.prototype.A={cuechange:"cuechange"};var Lr=function(t){function i(s){var e,n;void 0===s&&(s={});var r=me(e=t.call(this)||this);if(qs)for(var h in r=Fi.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new Vr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,w.defineProperty(r,"readyState",{get:function(){return n}}),w.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),qs?r||me(e):e}return ye(i,t),i}(pe);Lr.prototype.A={load:"load"},Lr.NONE=0,Lr.LOADING=1,Lr.LOADED=2,Lr.ERROR=3;var Hr,qr=function(){function t(i){void 0===i&&(i=[]);var s=this;if(qs)for(var e in s=Fi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],w.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(qs)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),zr=function(t){function i(s,e){var n;if(void 0===s&&(s=[]),void 0===e&&(e=null),n=t.call(this)||this,!e&&(e=me(n),qs))for(var r in e=Fi.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],w.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||me(n)}ye(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(pe);for(Hr in zr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},zr.prototype.A)zr.prototype["on"+Hr]=null;var Wr=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),qs){for(var r in n=Fi.createElement("custom"),zr.prototype)"constructor"!==r&&(n[r]=zr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||me(e)}return ye(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",n(this,(function(){this.trigger("change")})))},i}(zr),Gr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Xr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){Gr(s,s[r]);break}if(qs){for(var h in n=Fi.createElement("custom"),zr.prototype)"constructor"!==h&&(n[h]=zr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||me(e)}ye(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&Gr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,Gr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(zr),Jr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},Qr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].enabled){Jr(s,s[r]);break}if(qs){for(var h in n=Fi.createElement("custom"),zr.prototype)"constructor"!==h&&(n[h]=zr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||me(e)}ye(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Jr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Jr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(zr),Yr=void 0;var Kr=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new Wr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}ye(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return we(0,0)},s.bufferedPercent=function(){return _e(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Pe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?we(0,0):we()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!c.WebVTT)if(Fi.body.contains(this.el())){if(!this.h["vtt.js"]&&zi(Yr)&&w.keys(Yr).length>0)return void this.trigger("vttjsloaded");var i=Fi.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),c.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new Xr,this.rt},s.audioTracks=function(){return this.ht=this.ht||new Qr,this.ht},s.textTracks=function(){return this.nt=this.nt||new Wr,this.nt},s.remoteTextTracks=function(){return this.ft=this.ft||new Wr,this.ft},s.remoteTextTrackEls=function(){return this.vt=this.vt||new qr,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new g("TextTrack kind is required but was not provided");return function(t,i,s,e,n){void 0===n&&(n={});var r=t.textTracks();n.kind=i,s&&(n.label=s),e&&(n.language=e),n.tech=t;var h=new Vr(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=fe(t,{tech:this});return new Lr(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Gi.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new g("Tech "+t+" must be a Tech");return i.gt[t]=s,s},i.getTech=function(t){return i.gt&&i.gt[t]?i.gt[t]:c&&c.videojs&&c.videojs[t]?(Gi.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),c.videojs[t]):void 0},i}(ve);Kr.prototype.nt,Kr.prototype.ht,Kr.prototype.rt,Kr.prototype.featuresVolumeControl=!0,Kr.prototype.featuresFullscreenResize=!1,Kr.prototype.featuresPlaybackRate=!1,Kr.prototype.featuresProgressEvents=!1,Kr.prototype.featuresTimeupdateEvents=!1,Kr.prototype.featuresNativeTextTracks=!1,Kr.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:Gi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},ve.registerComponent("Tech",Kr),ve.registerComponent("MediaTechController",Kr),Kr.registerTech("Tech",Kr);var Zr=function(t){function i(i,s,e){var n;if(n=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var r=0,h=s.playerOptions.techOrder;r<h.length;r++){var o=de(h[r]),a=Kr.getTech(o);if(o||(a=ve.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return ye(i,t),i}(ve);ve.registerComponent("MediaLoader",Zr);var th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).emitTapEvents(),e.on(i,"languagechange",e.handleLanguagechange),e.enable(),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=Hi({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&Gi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=Hi({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=es("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.setAttribute("tabIndex",this.xt),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.St)},s.handleClick=function(t){},s.handleFocus=function(t){se(Fi,"keydown",n(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){ee(Fi,"keydown",n(this,this.handleKeyPress))},i}(ve);ve.registerComponent("ClickableComponent",th);var ih=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",n(me(e),e.update)),e}ye(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=es("div",{className:"vjs-poster",tabIndex:-1});return Js||(this.jt=es("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(th);ve.registerComponent("PosterImage",ih);var sh="#222",eh={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function nh(t,i){return"rgba("+x(t[1]+t[1],16)+","+x(t[2]+t[2],16)+","+x(t[3]+t[3],16)+","+i+")"}function rh(t,i,s){try{t.style[i]=s}catch(t){return}}var hh=function(t){function i(i,s,e){var r;return r=t.call(this,i,s,e)||this,i.on("loadstart",n(me(r),r.toggleDisplay)),i.on("texttrackchange",n(me(r),r.updateDisplay)),i.ready(n(me(r),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",n(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,r,h={captions:1,subtitles:1},o=this.t.textTracks();if(o){for(var a=0;a<o.length;a++){var u=o[a];u.default&&("descriptions"!==u.kind||e?u.kind in h&&!r&&(r=u):e=u)}r?r.mode="showing":e&&(e.mode="showing")}}}))),r}ye(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof c.WebVTT&&c.WebVTT.processCues(c,[],this.v)},s.updateDisplay=function(){var t=this.t.textTracks();if(this.clearDisplay(),t){for(var i=null,s=null,e=t.length;e--;){var n=t[e];"showing"===n.mode&&("descriptions"===n.kind?i=n:s=n)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}},s.updateForTrack=function(t){if("function"==typeof c.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);c.WebVTT.processCues(c,s,this.v);for(var n=s.length;n--;){var r=s[n];if(r){var h=r.displayState;if(i.color&&(h.firstChild.style.color=i.color),i.textOpacity&&rh(h.firstChild,"color",nh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&rh(h.firstChild,"backgroundColor",nh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?rh(h,"backgroundColor",nh(i.windowColor,i.windowOpacity)):h.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+sh:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+sh:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+sh:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+sh)),i.fontPercent&&1!==i.fontPercent){var o=c.parseFloat(h.style.fontSize);h.style.fontSize=o*i.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=eh[i.fontFamily])}}}},i}(ve);ve.registerComponent("TextTrackDisplay",hh);var oh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(ve);ve.registerComponent("LoadingSpinner",oh);var ah=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=Hi({className:this.buildCSSClass()},i),"button"!==t&&(Gi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=Hi({tabIndex:0},i),s=Hi({role:"button"},s)),s=Hi({type:"button","aria-live":"polite"},s);var e=ve.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return Gi.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),ve.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(th);ve.registerComponent("Button",ah);var uh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(ah);uh.prototype.St="Play Video",ve.registerComponent("BigPlayButton",uh);var ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(ah);ve.registerComponent("CloseButton",ch);var lh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"play",e.handlePlay),e.on(i,"pause",e.handlePause),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.paused()?this.t.play():this.t.pause()},s.handlePlay=function(t){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},s.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i}(ah);function dh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=_.floor(t%60),e=_.floor(t/60%60),n=_.floor(t/3600),r=_.floor(i/60%60),h=_.floor(i/3600);return(S(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}lh.prototype.St="Play",ve.registerComponent("PlayToggle",lh);var fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=es("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=dh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(ve);ve.registerComponent("CurrentTimeDisplay",fh);var vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=es("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=dh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(ve);ve.registerComponent("DurationDisplay",vh);var ph=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},i}(ve);ve.registerComponent("TimeDivider",ph);var mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=es("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=dh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(ve);ve.registerComponent("RemainingTimeDisplay",mh);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=es("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=es("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Fi.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(ve);ve.registerComponent("LiveDisplay",gh);var yh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=Hi({tabIndex:0},s),e=Hi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Fi.body.focus(),Fi.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Fi.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=ks(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(ve);function bh(t,i){if(!t||!i)return"";if("function"==typeof c.getComputedStyle){var s=c.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}ve.registerComponent("Slider",yh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Et=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Nt=es("span",{innerHTML:this.localize("Loaded")}),this.It=Fi.createTextNode(": 0%"),this.Ct=es("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Nt),this.Ct.appendChild(this.It),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.v.appendChild(es()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Loaded")},i}(ve);ve.registerComponent("LoadProgressBar",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(me(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Bt=es("span",{innerHTML:this.localize("Progress")}),this.Ft=Fi.createTextNode(": 0%"),this.Ct=es("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",dh(i,this.t.duration()))},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(ve);ve.registerComponent("PlayProgressBar",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(me(e),e.updateDataAttr)),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=es("div",{className:"vjs-time-tooltip"}),this.Bt=es("span",{innerHTML:this.localize("Progress")}),this.Ft=Fi.createTextNode(": 0%"),this.Ct=es("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=dh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(ve);ve.registerComponent("TooltipProgressBar",_h);var xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(me(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(bh(this.player().el(),"width")),s=C(bh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",dh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(yh);xh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},xh.prototype.playerEvent="timeupdate",ve.registerComponent("SeekBar",xh);var Ch=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=es("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(me(e),e.handleMouseMove),25))})),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-bs(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=dh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(bh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ks(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(bh(this.player().el(),"width")),s=C(bh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(ve);ve.registerComponent("MouseTimeDisplay",Ch);var Sh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(ve);Sh.prototype.h={children:["seekBar"]},ve.registerComponent("ProgressControl",Sh);var jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(ah);jh.prototype.St="Fullscreen",ve.registerComponent("FullscreenToggle",jh);var Th=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},i}(ve);ve.registerComponent("VolumeLevel",Th);var Mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(me(e),e.updateARIAAttributes)),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(yh);Mh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Mh.prototype.playerEvent="volumechange",ve.registerComponent("VolumeBar",Mh);var Ah=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(ve);Ah.prototype.h={children:["volumeBar"]},ve.registerComponent("VolumeControl",Ah);var Ph=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=es(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),se(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(ve);ve.registerComponent("Popup",Ph);var Eh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}ye(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(th);ve.registerComponent("PopupButton",Eh);var Nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)fs(this.v,"vjs-vol-"+n);ds(this.v,"vjs-vol-"+s)},i}(ah);Nh.prototype.St="Mute",ve.registerComponent("MuteToggle",Nh);var Ih=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(me(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],(function(){this.addClass("vjs-slider-active")})),e.on(e.volumeBar,["sliderinactive","blur"],(function(){this.removeClass("vjs-slider-active")})),e.on(e.volumeBar,["focus"],(function(){this.addClass("vjs-lock-showing")})),e.on(e.volumeBar,["blur"],(function(){this.removeClass("vjs-lock-showing")})),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new Ph(this.t,{contentElType:"div"}),i=new Mh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Nh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Eh);Ih.prototype.volumeUpdate=Nh.prototype.update,Ih.prototype.St="Mute",ve.registerComponent("VolumeMenuButton",Ih);var Bh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}ye(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=es(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),se(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(ve);ve.registerComponent("Menu",Bh);var Fh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Rt=!0,e.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}ye(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Bh(this.t);if(this.Ot=0,this.h.title){var i=es("li",{className:"vjs-menu-title",innerHTML:de(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),rs(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",n(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ut?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ut&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ut||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ut&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ut=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.Rt=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Rt=!0,t.prototype.enable.call(this)},i}(th);ve.registerComponent("MenuButton",Fh);var Dh=function(t){function i(i,s){var e,r=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!r)return me(e);var h=n(me(e),e.update);return r.addEventListener("removetrack",h),r.addEventListener("addtrack",h),e.t.on("dispose",(function(){r.removeEventListener("removetrack",h),r.removeEventListener("addtrack",h)})),e}return ye(i,t),i}(Fh);ve.registerComponent("TrackButton",Dh);var $h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).selectable=s.selectable,e.selected(s.selected),e.selectable?e.v.setAttribute("role","menuitemcheckbox"):e.v.setAttribute("role","menuitem"),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",Hi({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Vt=Fi.createTextNode(this.localize(this.h.label)),n.appendChild(this.Vt),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Vt.innerHTML=this.localize(this.h.label)},i}(th);ve.registerComponent("MenuItem",$h);var Rh=function(t){function i(i,s){var e,r,h=s.track,o=i.textTracks();if(s.label=h.label||h.language||"Unknown",s.selected=h.default||"showing"===h.mode,(e=t.call(this,i,s)||this).track=h,o){var a=n(me(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),e.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof c.Event)try{r=new c.Event("change")}catch(t){}r||(r=Fi.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.t.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}($h);ve.registerComponent("TextTrackMenuItem",Rh);var Uh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" off",default:!1,mode:"disabled"},s.selectable=!0,(e=t.call(this,i,s)||this).selected(!0),e}return ye(i,t),i.prototype.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!0,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind===this.track.kind&&"showing"===r.mode){s=!1;break}}this.selected(s)},i}(Rh);ve.registerComponent("OffTextTrackMenuItem",Uh);var Oh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return ye(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Uh(this.t,{kind:this.Lt})),this.Ot+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Lt&&t.push(new Rh(this.t,{track:e,selectable:!0}))}return t},i}(Dh);ve.registerComponent("TextTrackButton",Oh);var Vh=function(t){function i(i,s){var e,r=s.track,h=s.cue,o=i.currentTime();return s.selectable=!0,s.label=h.text,s.selected=h.startTime<=o&&o<h.endTime,(e=t.call(this,i,s)||this).track=r,e.cue=h,r.addEventListener("cuechange",n(me(e),e.update)),e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.t.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.t.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}($h);ve.registerComponent("ChaptersTrackMenuItem",Vh);var Lh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.qt||(this.qt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.qt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.qt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(de(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new Vh(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(Oh);Lh.prototype.Lt="chapters",Lh.prototype.St="Chapters",ve.registerComponent("ChaptersButton",Lh);var Hh=function(t){function i(i,s,e){var r;(r=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var h=i.textTracks();if(h){var o=n(me(r),r.handleTracksChange);h.addEventListener("change",o),r.on("dispose",(function(){h.removeEventListener("change",o)}))}return r}ye(i,t);var s=i.prototype;return s.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!1,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind!==this.Lt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(Oh);Hh.prototype.Lt="descriptions",Hh.prototype.St="Descriptions",ve.registerComponent("DescriptionsButton",Hh);var qh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return ye(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Oh);qh.prototype.Lt="subtitles",qh.prototype.St="Subtitles",ve.registerComponent("SubtitlesButton",qh);var zh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" settings",selectable:!1,default:!1,mode:"disabled"},s.selectable=!1,(e=t.call(this,i,s)||this).addClass("vjs-texttrack-settings"),e.controlText(", opens "+s.kind+" settings dialog"),e}return ye(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(Rh);ve.registerComponent("CaptionSettingsMenuItem",zh);var Wh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Captions Menu"),n}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(){var i=[];return this.player().H&&this.player().H.featuresNativeTextTracks||(i.push(new zh(this.t,{kind:this.Lt})),this.Ot+=1),t.prototype.createItems.call(this,i)},i}(Oh);Wh.prototype.Lt="captions",Wh.prototype.St="Captions",ve.registerComponent("CaptionsButton",Wh);var Gh=function(t){function i(i,s){var e,r=s.track,h=i.audioTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.enabled,(e=t.call(this,i,s)||this).track=r,h){var o=n(me(e),e.handleTracksChange);h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}return e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.t.audioTracks();if(t.prototype.handleClick.call(this,i),s)for(var e=0;e<s.length;e++){var n=s[e];n.enabled=n===this.track}},s.handleTracksChange=function(t){this.selected(this.track.enabled)},i}($h);ve.registerComponent("AudioTrackMenuItem",Gh);var Xh=function(t){function i(i,s){var e;return void 0===s&&(s={}),s.tracks=i.audioTracks&&i.audioTracks(),(e=t.call(this,i,s)||this).v.setAttribute("aria-label","Audio Menu"),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Ot=1;var i=this.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new Gh(this.t,{track:e,selectable:!0}))}return t},i}(Dh);Xh.prototype.St="Audio Track",ve.registerComponent("AudioTrackButton",Xh);var Jh=function(t){function i(i,s){var e,n=s.rate,r=C(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.update=function(t){this.selected(this.player().playbackRate()===this.rate)},i}($h);Jh.prototype.contentElType="button",ve.registerComponent("PlaybackRateMenuItem",Jh);var Qh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateVisibility(),e.updateLabel(),e.on(i,"loadstart",e.updateVisibility),e.on(i,"ratechange",e.updateLabel),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vt=es("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Vt),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Bh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Jh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Fh);Qh.prototype.St="Playback Rate",ve.registerComponent("PlaybackRateMenuButton",Qh);var Yh=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(ve);ve.registerComponent("Spacer",Yh);var Kh=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML="&nbsp;",i},i}(Yh);ve.registerComponent("CustomControlSpacer",Kh);var Zh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(ve);Zh.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},ve.registerComponent("ControlBar",Zh);var to=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(De);to.prototype.h=fe(De.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ve.registerComponent("ErrorDisplay",to);var io="vjs-text-track-settings",so=["#000","Black"],eo=["#00F","Blue"],no=["#0FF","Cyan"],ro=["#0F0","Green"],ho=["#F0F","Magenta"],oo=["#F00","Red"],ao=["#FFF","White"],uo=["#FF0","Yellow"],co=["1","Opaque"],lo=["0.5","Semi-Transparent"],fo=["0","Transparent"],vo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[so,ao,oo,ro,eo,uo,ho,no]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[co,lo,fo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ao,so,oo,ro,eo,uo,ho,no]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[co,lo]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[fo,lo,co]}};function po(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}vo.windowColor.options=vo.backgroundColor.options;var mo,go=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(me(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),Li(vo,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}ye(i,t);var s=i.prototype;return s.zt=function(t){var i=this,s=vo[t],e=s.id.replace("%s",this.o);return[es("label",{className:"vjs-label",textContent:s.label},{for:e}),es("select",{id:e},void 0,s.options.map((function(t){return es("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Wt=function(){var t=es("legend",{textContent:this.localize("Text")}),i=this.zt("color"),s=es("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return es("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=es("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),s=es("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return es("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=es("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),s=es("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return es("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return es("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=es("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=es("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),s=es("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return es("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=es("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=es("button",{className:"vjs-done-button",textContent:"Done"});return es("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=es("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=es("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=es("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=es("div",void 0,{role:"document"},[i,s,t]);return es("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Vi(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(vo,(function(i,s,e){var n=function(t,i){return po(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;Li(vo,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(po(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;Li(vo,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(c.localStorage.getItem(io))}catch(t){Gi.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{w.keys(t).length?c.localStorage.setItem(io,JSON.stringify(t)):c.localStorage.removeItem(io)}catch(t){Gi.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(ve);ve.registerComponent("TextTrackSettings",go);var yo,bo=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var r=i.source,h=!1;if(r&&(e.v.currentSrc!==r.src||i.tag&&3===i.tag.Kt)?e.setSource(r):e.Zt(e.v),e.v.hasChildNodes()){for(var o=e.v.childNodes,a=o.length,u=[];a--;){var c=o[a];"track"===c.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(c),e.remoteTextTracks().tt(c.track),h||e.v.hasAttribute("crossorigin")||!qe(c.src)||(h=!0)):u.push(c))}for(var l=0;l<u.length;l++)e.v.removeChild(u[l])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=de(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(h&&Gi.warn(Yi(mo||(mo=Di(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=n(me(e),e.handleTextTrackChange),e.hi=n(me(e),e.handleTextTrackAdd),e.oi=n(me(e),e.handleTextTrackRemove),e.ai()),e.ci(),(Xs||Ns||Us)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}ye(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=de(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.ci=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=Fi.createElement("video");var e=fe({},this.h.tag&&ms(this.h.tag));Xs&&!0===this.h.nativeControlsForTouch||delete e.controls,ps(t,Hi(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&gs(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?gs(t,h,h):ys(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.ni=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.it(a)}}},s.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){Gi(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&Ds&&Ls&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=c.navigator&&c.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Fi.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),c.performance&&"function"==typeof c.performance.now?t.creationTime=c.performance.now():c.performance&&c.performance.timing&&"number"==typeof c.performance.timing.navigationStart&&(t.creationTime=c.Date.now()-c.performance.timing.navigationStart),t},i}(Kr);ts()&&(bo.TEST_VID=Fi.createElement("video"),(yo=Fi.createElement("track")).kind="captions",yo.srclang="en",yo.label="English",bo.TEST_VID.appendChild(yo)),bo.isSupported=function(){try{bo.TEST_VID.volume=.5}catch(t){return!1}return!(!bo.TEST_VID||!bo.TEST_VID.canPlayType)},bo.canControlVolume=function(){try{var t=bo.TEST_VID.volume;return bo.TEST_VID.volume=t/2+.1,t!==bo.TEST_VID.volume}catch(t){return!1}},bo.canControlPlaybackRate=function(){if(Ds&&Ls&&Hs<58)return!1;try{var t=bo.TEST_VID.playbackRate;return bo.TEST_VID.playbackRate=t/2+.1,t!==bo.TEST_VID.playbackRate}catch(t){return!1}},bo.supportsNativeTextTracks=function(){return Gs},bo.supportsNativeVideoTracks=function(){return!(!bo.TEST_VID||!bo.TEST_VID.videoTracks)},bo.supportsNativeAudioTracks=function(){return!(!bo.TEST_VID||!bo.TEST_VID.audioTracks)},bo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],bo.prototype.featuresVolumeControl=bo.canControlVolume(),bo.prototype.featuresPlaybackRate=bo.canControlPlaybackRate(),bo.prototype.movingMediaElementInDOM=!Bs,bo.prototype.featuresFullscreenResize=!0,bo.prototype.featuresProgressEvents=!0,bo.prototype.featuresTimeupdateEvents=!0,bo.prototype.featuresNativeTextTracks=bo.supportsNativeTextTracks(),bo.prototype.featuresNativeVideoTracks=bo.supportsNativeVideoTracks(),bo.prototype.featuresNativeAudioTracks=bo.supportsNativeAudioTracks();var ko=bo.TEST_VID&&bo.TEST_VID.constructor.prototype.canPlayType,wo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,_o=/^video\/mp4/i;bo.patchCanPlayType=function(){$s>=4&&!Os?bo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&wo.test(t)?"maybe":ko.call(this,t)}:Rs&&(bo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&_o.test(t)?"maybe":ko.call(this,t)})},bo.unpatchCanPlayType=function(){var t=bo.TEST_VID.constructor.prototype.canPlayType;return bo.TEST_VID.constructor.prototype.canPlayType=ko,t},bo.patchCanPlayType(),bo.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},bo.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){bo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){bo.prototype["set"+de(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){bo.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){bo.prototype["set"+de(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){bo.prototype[t]=function(){return this.v[t]()}})),Kr.withSourceHandlers(bo),bo.nativeSourceHandler={},bo.nativeSourceHandler.canPlayType=function(t){try{return bo.TEST_VID.canPlayType(t)}catch(t){return""}},bo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return bo.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return bo.nativeSourceHandler.canPlayType("video/"+s)}return""},bo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},bo.nativeSourceHandler.dispose=function(){},bo.registerSourceHandler(bo.nativeSourceHandler),ve.registerComponent("Html5",bo),Kr.registerTech("Html5",bo);var xo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Co=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",Ri()].join("_"),(e=Hi(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(ms(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new g("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&ms(s),r.language(r.h.language),e.languages){var a={};w.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=i.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,s.controls=!1,r.yi=!1,r.v=r.createEl();var u=fe(r.h);if(e.plugins){var c=e.plugins;w.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):Gi.error("Unable to find plugin:",t)}),me(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.bi()&&r.addClass("vjs-no-flex"),Bs||r.addClass("vjs-workinghover"),i.players[r.o]=me(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}ye(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),i.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},s.createEl=function(){var i,s=this.tag,e=this.Ci=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=ms(s);if(w.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==c.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=ce("vjs-styles-dimensions");var r=js(".vjs-styles-defaults"),h=js("head");h.insertBefore(this.xi,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);ds(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),rs(s,i),this.m.unshift(s),this.v=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=C(i);if(S(e))return Gi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},s.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},s.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new g("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},s.Mi=function(){if(!0!==c.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/n:this.videoWidth()||300,i=void 0!==this.Ti?this.Ti:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),le(this.xi,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.ji?this.ji:this.h.width,h="number"==typeof this.Ti?this.Ti:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(Kr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ni=t,this.j=!1;var e=Hi({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Bi=i.type,i.src===this.pi.src&&this.pi.currentTime>0&&(e.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=i,this.pi.src=i.src);var r=Kr.getTech(t);r||(r=ve.getComponent(t)),this.H=new r(e),this.H.ready(n(this,this.Fi),!0),Be(this.Di||[],this.H),xo.forEach((function(t){s.on(s.H,t,s["handleTech"+de(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Ui),this.on(this.H,"canplaythrough",this.Oi),this.on(this.H,"playing",this.Vi),this.on(this.H,"ended",this.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.qi),this.on(this.H,"play",this.zi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||rs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Ie(this.H),this.j=!1,this.H.dispose(),this.H=!1},s.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw c.alert(i),new g(i)},s.ts=function(){this.ss(),this.on(this.H,"mousedown",this.es),this.on(this.H,"touchstart",this.ns),this.on(this.H,"touchmove",this.rs),this.on(this.H,"touchend",this.hs),this.on(this.H,"tap",this.os)},s.ss=function(){this.off(this.H,"tap",this.os),this.off(this.H,"touchstart",this.ns),this.off(this.H,"touchmove",this.rs),this.off(this.H,"touchend",this.hs),this.off(this.H,"mousedown",this.es)},s.Fi=function(){if(this.triggerReady(),this.pi.volume&&this.us("setVolume",this.pi.volume),this.Yi(),this.Xi(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){Gi("deleting tag.poster throws in some browsers",t)}this.play()}},s.$i=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},s.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},s.zi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.qi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Wi=function(){this.h.starttime&&(Gi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},s.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Xi=function(){this.duration(this.Zi("duration"))},s.es=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},s.os=function(){this.userActive(!this.userActive())},s.ns=function(){this.userWasActive=this.userActive()},s.rs=function(){this.userWasActive&&this.reportUserActivity()},s.hs=function(t){t.cancelable&&t.preventDefault()},s.wi=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s._i=function(){this.reportUserActivity()},s.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Qi=function(){var t=this.H.error();this.error(t)},s.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.pi},s.us=function(t,i){if(this.H&&!this.H.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw Gi(t),t}},s.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Gi("Video.js: "+t+" method not defined for "+this.Ni+" playback technology.",i):"TypeError"===i.name?(Gi("Video.js: "+t+" unavailable on "+this.Ni+" playback technology element.",i),this.H.j=!1):Gi(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.us("pause"),this},s.paused=function(){return!1!==this.Zi("paused")},s.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},s.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=C(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=we(0,0)),t},s.bufferedPercent=function(){return _e(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,C(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=C(this.Zi("volume")),S(i)?1:i)},s.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},s.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},s.requestFullscreen=function(t){var i,s=Te;return this.isFullscreen(!0),s.requestFullscreen?(se(Fi,s.fullscreenchange,n(this,(function t(i){this.isFullscreen(Fi[s.fullscreenElement]),!1===this.isFullscreen()&&ee(Fi,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Te;return this.isFullscreen(!1),t.requestFullscreen?Fi[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Fi.documentElement.style.overflow,se(Fi,"keydown",n(this,this.fullWindowOnEscKey)),Fi.documentElement.style.overflow="hidden",ds(Fi.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,ee(Fi,"keydown",this.fullWindowOnEscKey),Fi.documentElement.style.overflow=this.docOrigOverflow,fs(Fi.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=de(e[s]),r=Kr.getTech(n);if(r||(r=ve.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else Gi.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.h.techOrder.map(de).map((function(t){return[t,Kr.getTech(t)||ve.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(Gi.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},r=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.h[e.toLowerCase()]))return{source:i,tech:e}};return(this.h.sourceOrder?n(t,e,(i=r,function(t,s){return i(s,t)})):n(e,t,r))||!1},s.src=function(t){if(void 0===t)return this.Zi("src");var i=Kr.getTech(this.Ni);return i||(i=ve.getComponent(this.Ni)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof w&&(t.type&&!i.canPlaySource(t,this.h[this.Ni.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Bi=t.type||"",this.ready((function(){i.prototype.hasOwnProperty("setSource")?this.us("setSource",t):this.us("src",t.src),"auto"===this.h.preload&&this.load(),this.h.autoplay&&this.play()}),!0))),this},s.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ni?this.src(i.source):this._t(i.tech,i.source),this.pi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.h.notSupportedMessage)})}),0),this.triggerReady())},s.load=function(){return this.us("load"),this},s.reset=function(){return this._t(de(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==w.keys(t).length&&i.push(t),this.pi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},s.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},s.currentType=function(){return this.Bi||""},s.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},s.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},s.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},s.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},s.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},s.controls=function(t){return void 0!==t?(t=!!t,this.gi!==t&&(this.gi=t,this.usingNativeControls()&&this.us("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ts()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.ss())),this):!!this.gi},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},s.error=function(t){return void 0===t?this.lt||null:null===t?(this.lt=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.lt=new Pe(t),this.addClass("vjs-error"),Gi.error("(CODE:"+this.lt.code+" "+Pe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.fs=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},s.ki=function(){var t,i,s,e,r=n(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,r())})),this.on("mouseup",(function(i){r(),this.clearInterval(t)})),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Xr,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new Qr,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},s.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.language=function(t){return void 0===t?this.gs:(this.gs!==String(t).toLowerCase()&&(this.gs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},s.languages=function(){return fe(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=fe(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=fe(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new De(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=ms(t),e=s["data-setup"];if(ls(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ee(e||"{}"),r=n[0],h=n[1];r&&Gi.error(r),Hi(s,h)}if(Hi(i,s),t.hasChildNodes())for(var o=t.childNodes,a=0,u=o.length;a<u;a++){var c=o[a],l=c.nodeName.toLowerCase();"source"===l?i.sources.push(ms(c)):"track"===l&&i.tracks.push(ms(c))}return i},s.bi=function(){var t=Fi.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(ve);Co.players={};var So=c.navigator;Co.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:So&&(So.languages&&So.languages[0]||So.userLanguage||So.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Co.prototype[t]=function(){return this.Zi(t)}})),xo.forEach((function(t){Co.prototype["handleTech"+de(t)+"_"]=function(){return this.trigger(t)}})),ve.registerComponent("Player",Co);var jo,To,Mo=function(t){function i(s){var e;void 0===s&&(s={});var n=fe(s,{kind:Ue[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(qs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.W=!0,r||me(e)}return ye(i,t),i}(Le),Ao=function(t){function i(s){var e;void 0===s&&(s={});var n=fe(s,{kind:Re[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(qs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"selected",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("selectedchange"))}}),n.selected&&(r.selected=n.selected),r||me(e)}return ye(i,t),i}(Le);function Po(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Po.getPlayers()[t])return i&&Gi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Po.getPlayers()[t].ready(s),Po.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Fi.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new b("The element or ID supplied is not valid. (videojs)");if(e.player||Co.players[e.playerId])return e.player||Co.players[e.playerId];i=i||{},Po.hooks("beforesetup").forEach((function(t){var s=t(e,fe(i));qi(s)&&!Array.isArray(s)?i=fe(i,s):Gi.error("please return an object in beforesetup hooks")}));var n=new(ve.getComponent("Player"))(e,i,s);return Po.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&ts()&&(Fi.createElement("video"),Fi.createElement("audio"),Fi.createElement("track")),Po.ys={},Po.hooks=function(t,i){return Po.ys[t]=Po.ys[t]||[],i&&(Po.ys[t]=Po.ys[t].concat(i)),Po.ys[t]},Po.hook=function(t,i){Po.hooks(t,i)},Po.removeHook=function(t,i){var s=Po.hooks(t).indexOf(i);return!(s<=-1)&&(Po.ys[t]=Po.ys[t].slice(),Po.ys[t].splice(s,1),!0)},!0!==c.VIDEOJS_NO_DYNAMIC_STYLE&&ts()&&((jo=js(".vjs-styles-defaults"))||(jo=ce("vjs-styles-defaults"),(To=js("head"))&&To.insertBefore(jo,To.firstChild),le(jo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ue(1,Po),Po.VERSION="5.20.6-opentelly.14",Po.options=Co.prototype.h,Po.getPlayers=function(){return Co.players},Po.players=Co.players,Po.getComponent=ve.getComponent,Po.registerComponent=function(t,i){Kr.isTech(i)&&Gi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),ve.registerComponent.call(ve,t,i)},Po.getTech=Kr.getTech,Po.registerTech=Kr.registerTech,Po.browser=Qs,Po.TOUCH_ENABLED=Xs,Po.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in qi(i)?("function"==typeof i.init&&(Gi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==w.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new b("Super expression must either be null or a function, not "+typeof i);t.prototype=w.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},Po.mergeOptions=fe,Po.bind=n,Po.plugin=function(t,i){Co.prototype[t]=i},Po.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Po.options.languages=fe(Po.options.languages,((s={})[t]=i,s)),Po.options.languages[t]},Po.log=Gi,Po.createTimeRange=Po.createTimeRanges=we,Po.formatTime=dh,Po.parseUrl=He,Po.isCrossOrigin=qe,Po.EventTarget=pe,Po.on=se,Po.one=re,Po.off=ee,Po.trigger=ne,Po.xhr=Dr,Po.TextTrack=Vr,Po.AudioTrack=Mo,Po.VideoTrack=Ao,Po.isEl=is,Po.isTextNode=ws,Po.createEl=es,Po.hasClass=ls,Po.addClass=ds,Po.removeClass=fs,Po.toggleClass=vs,Po.setAttributes=ps,Po.getAttributes=ms,Po.emptyEl=_s,Po.appendContent=xs,Po.insertContent=Cs,Po.computedStyle=bh,f(),f();var Eo=10;function No(t){const i=t.duration;if(S(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Io(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Bo(t){const i=$o(t);return No(t)?i.end(i.length-1):i.start(0)}function Fo(t){return $o(t).start(0)}function Do(t){const i=$o(t);return i.end(i.length-1)-i.start(0)}function $o(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new Ht([0,s]).ks()}function Ro(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=_.abs(t);let e=_.floor(t%60),n=_.floor(t/60%60),r=_.floor(t/3600);const h=_.floor(i/60%60),o=_.floor(i/3600);return(S(t)||t===1/0)&&(r=n=e="-"),r=+r>0||o>0?r+":":"",n=((r||h>=10)&&+n<10?"0"+n:n)+":",e=+e<10?"0"+e:e,s+r+n+e}function Uo(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=Oo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function Oo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function Vo(t){const i=Oo(t),s=()=>{const s=Io(t);t.toggleClass("theo-at-live",function(t,i){if(No(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Eo}return!1}(i,s)),t.toggleClass("vjs-live",No(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===M(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();var Lo="theo-ad-playing",Ho="theo-dai-ad-playing";function qo(t,i,s){t.toggleClass(Lo,i),t.toggleClass(Ho,i&&s)}function zo(){this.userActive(!1)}f(),f(),f();var Wo=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},Go=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Xo=Po.getTech("Tech"),Jo=Po.getTech("Html5"),Qo=class extends Xo{xs(){var t;for(const t of Go)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener(ji.MODE_CHANGE,this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Es),this.ws.audioTracks.addEventListener("addtrack",this.Ns),this.ws.audioTracks.addEventListener("removetrack",this.Is),this.ws.audioTracks.addEventListener("change",this.Bs)}Fs(){var t;for(const t of Go)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener(ji.MODE_CHANGE,this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Es),this.ws.audioTracks.removeEventListener("addtrack",this.Ns),this.ws.audioTracks.removeEventListener("removetrack",this.Is),this.ws.audioTracks.removeEventListener("change",this.Bs)}Ds(t){this.trigger(new Wo(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new g(this.localize('Missing required tech option "player"'));let s=i.element;return Po.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!ai(this.ws.source.ads))return this.ws.source.ads[0].sources;if(qt(this.ws.source))return"This source is managed by the Uplynk integration extension.";if(Vt(this.ws.source))return"This source is managed by the DAI integration extension.";if(Wt(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=!!t}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(Kt.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(Kt.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(Kt.INLINE)}$s(){let t=this.ws.ads;if(t&&t.playing)return!0;let i=this.ws.vr;return!(!i||i.state===It.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1,i=()=>{t=!0};this.on("loadstart",i);let s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready((()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")}))}let i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return xi}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Us=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new Xt(this.ws.currentTime,this.ws.readyState)),this.Ds(new N),this.Ds(new Qt(this.ws.duration)))},this.Ts=()=>{this.Ds(new Nt(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Ns=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Is=t=>{this.audioTracks().it(t.track)},this.Es=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Bs=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ws.presentation.currentMode===Kt.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&&mt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.player,this.xs();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};Qo.prototype.featuresFullscreenResize=Jo.prototype.featuresFullscreenResize,Qo.prototype.featuresPlaybackRate=Jo.prototype.featuresPlaybackRate,Qo.prototype.featuresProgressEvents=!0,Qo.prototype.featuresTimeupdateEvents=!0,Qo.prototype.featuresNativeTextTracks=!0,Po.registerTech("THEOplayer",Qo),f(),f(),f(),f();var Yo=class{constructor(t){this.Os=t=>{ii(this.Vs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ei(this.Vs,"theo-mobile-button-hover")},this.Hs=t=>{this.Vs.blur()},this.Vs=t,t.addEventListener("touchstart",this.Os),t.addEventListener("touchend",this.Ls),t.addEventListener("focusin",this.Hs)}};f(),f(),f(),f();var Ko=Po.getComponent("Menu"),Zo=class extends(Uo(Ko)){get qs(){return this.player().el()}zs(){ii(this.qs,"theo-menu-opened")}Ws(){ei(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}};f();var ta=Po.getComponent("MenuItem"),ia=class extends(Uo(ta)){get parentMenu(){return this.Gs}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){fi.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Os),this.el().removeEventListener("touchend",this.Ls)),super.dispose()}constructor(t,i,s){super(t,Ti({selectable:!0},i)),this.Xs=!1,this.Os=t=>{ii(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ei(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,fi.Ys.Qs&&(this.el().addEventListener("touchstart",this.Os),this.el().addEventListener("touchend",this.Ls))}};f();var sa=Po.getComponent("ClickableComponent"),ea=class extends sa{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){let t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}},na=class extends Zo{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=Ti({playerOptions:this.h.playerOptions},t);let i=new ia(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=Ti({playerOptions:this.h.playerOptions},t);let i=this.ee(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}zs(){super.zs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){let t=this.he();if(!t)return;let i=t.getClientRects();fi.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),fi.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();ii(i,"theo-menu-content");let s=new ea(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},ra=class extends na{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){ei(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){ii(this.ye,"vjs-hidden")}zs(){this.ce&&this.ce.zs(),super.zs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),ii(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}};f();var ha=class{get we(){return this.Vs}get ke(){return this._e}fe(t){t.be(),this.Vs.appendChild(t.ye)}de(t){this.Vs.removeChild(t.ye)}pe(t,i){if(t==this._e)return;let s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),fi.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=mi("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}zs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){ci((()=>{ei(this.Vs,"theo-no-transition"),ei(this._e.ye,"theo-no-transition")}))}xe(){ii(this.Vs,"theo-no-transition"),ii(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Vs=h.createElement("div"),this.Vs.className="theo-tertiary-background theo-menu-animation-container",this.Vs.appendChild(this.Se.ye),this.ue=this._e.player().el()}};f(),f();var oa=class extends ra{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){let s=new aa(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},aa=class extends ia{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,Ti({selectable:!1},i),s),this.Ae=new oa(t,i,s)}},ua=class extends ra{get menuButton(){return this.Pe}createEl(){let t=Po.createEl("div",{className:this.buildCSSClass()});return this.Ee=super.createEl(),this.Ee.className=super.buildCSSClass(),ii(this.Ee,"theo-menu-content-animatable"),t.appendChild(this.Ee),this.ce=new ha(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){let s=new aa(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);let s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);X(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ee}ie(){this.Pe.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Pe=s}};f();var ca=class{set Ie(t){this.Be.innerHTML=this.Fe.localize(t),this.De()&&this.$e(),ui(this.Fe.el())}get Ie(){return this.Be.textContent||""}De(){return!Zt(this.Be,"vjs-hidden")}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.Ue),this.Fe.off("dispose",this.Oe),Jt(this.Be)}constructor(t,i){this.$e=()=>{ei(this.Be,"vjs-hidden");let t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.Be).fontSize);X(this.Be,this.Fe.el(),i,s)},this.Ue=()=>{ii(this.Be,"vjs-hidden")},this.Oe=()=>this.Re(),this.Fe=t,ui(t.el()),li(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.Fe.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Be),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.Ue),this.Fe.on("dispose",this.Oe)}},la=Po.getComponent("Button"),da=class extends(Uo(la)){get Ve(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Le}isMenuOpen(){return this.He}openMenu(){this.qe&&!this.He&&(this.Le.zs(),this.el().setAttribute("aria-expanded","true"),this.He=!0,this.Le.focus())}closeMenu(){this.qe&&this.He&&(this.Le.Ws(),this.el().setAttribute("aria-expanded","false"),this.He=!1)}set minimumMenuItems(t){this.ze=t,this.We()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.He?this.closeMenu():this.openMenu()}enable(){return this.qe=!0,super.enable()}disable(){return this.closeMenu(),this.qe=!1,super.disable()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().removeChild(this.Le),this.Le.dispose(),this.Be.Re(),this.ws.removeEventListener("seeking",this.Ge),super.dispose()}constructor(t,i){super(t,i),this.He=!1,this.ze=1,this.qe=!0,this.Xe=t=>{let i=this.el().contains(t.target),s=this.Le.el().contains(t.target),e=!1;var n;fi.Ys.Qs&&this.Ve&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.He||(e&&t.preventDefault(),this.closeMenu())},this.Je=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Ge=()=>{this.He&&this.closeMenu()},this.We=()=>{this.Le.menuItems.length>=this.ze?this.show():(this.closeMenu(),this.hide())},this.Le=new ua(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Le),this.Be=new ca(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),fi.Ys.Qe?(this.on(h,"touchend",this.Xe),new Yo(this.el())):(this.on(h,"click",this.Xe),this.on(h,"keydown",this.Je),_i&&this.on(h,_i.Ye,this.closeMenu)),this.ws.addEventListener("seeking",this.Ge),this.on(this.Le,"menuchange",this.We),this.on(t,"languagechange",this.te),this.We()}},fa=Po.getComponent("Component"),va=class extends(Po.getComponent("ControlBar")){addMenuButton(t){t=Ti({playerOptions:this.h.playerOptions},t);let i=new da(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Po.registerComponent("THEOControlBarShadow",class extends fa{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var pa=Po.getComponent("VolumeBar"),ma=class extends pa{handleFocus(t){super.handleFocus(t),this.Ke.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ke.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ke=i.Ze}};f();var ga=Po.getComponent("VolumeControl"),ya=class extends ga{constructor(t,i){super(t,i),this.tn=new ma(t,{Ze:this}),this.addChild(this.tn)}};ya.prototype.h=Ti({},ga.prototype.h,{children:[]}),Po.registerComponent("VolumeControl",ya);var ba=class extends(Uo(va)){sn(){this.nn(this.rn())}hn(){0===this.an&&(this.an=u(this.un,100))}cn(t){"opacity"===t.propertyName&&(0!==this.an&&(v(this.an),this.an=0),this.nn(!0))}ln(t){"opacity"===t.propertyName&&(this.rn()||this.nn(!1))}rn(){return"0"!==s.getComputedStyle(this.el()).opacity}nn(t){this.dn!==t&&(this.dn=t,t?this.fn():this.ws.textTrackStyle.marginBottom=void 0)}fn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){v(this.an),this.an=0,this.pn.vn(di.mn,this.gn),this.pn.yn(),super.dispose()}constructor(t,i){super(t,i),this.dn=!1,this.an=0,this.un=()=>{0!==this.an&&(this.an=0,this.nn(this.rn()))},this.gn=()=>{this.dn&&this.fn()},this.on(t,"ready",this.sn),this.on(t,"pause",this.sn),this.on(t,"useractive",this.sn),this.on(t,"firstplay",this.hn),this.on(t,"play",this.hn),this.on(t,"userinactive",this.hn),this.on("transitionstart",this.cn),this.on("transitionend",this.ln),this.pn=new yi(this.el()),this.pn.bn(di.mn,this.gn),this.pn.kn(!0)}};ba.prototype.h=Ti({},va.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Po.registerComponent("ControlBar",ba),f();var ka=class extends va{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};ka.prototype.h=Ti({},va.prototype.h,{children:[]}),Po.registerComponent("TopControlBar",ka),f();var wa=Po.getComponent("CurrentTimeDisplay"),_a=class extends(Uo(wa)){updateContent(){const t=Io(this.player()),i=this.ws,s=Fo(i),e=this.localize("Current Time"),n=Ro(_.max(0,t-s),Do(i));n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Po.registerComponent("CurrentTimeDisplay",_a),f();var xa=Po.getComponent("DurationDisplay"),Ca=class extends(Uo(xa)){updateContent(){const t=this.ws,i=S(t.duration)?NaN:Do(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Ro(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.wn),super.dispose()}constructor(t,i){var s;super(t,i),this.wn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.ws)||s.clip.addEventListener("change",this.wn)}};Po.registerComponent("DurationDisplay",Ca),f();var Sa=Po.getComponent("Button"),ja=class extends(Uo(Sa)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this._n=Po.createEl("span",{className:"theo-live-control-indicator"}),Yt(t,this._n),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Po.removeClass(i,"vjs-control-text"),Po.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Bo(i)),t.play()}}xn(){No(this.ws)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.xn(),this.on(t,"emptied",this.xn),this.on(t,"durationchange",this.xn),fi.Ys.Qe&&new Yo(this.el())}};Po.registerComponent("LiveDisplay",ja),f();var Ta=Po.getComponent("LoadingSpinner");Po.registerComponent("LoadingSpinner",class extends Ta{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Po.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Po.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Po.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Ma=Po.getComponent("LoadProgressBar"),Aa=class extends(Uo(Ma)){update(){let t=this.ws,i=Ht.Cn($o(t)),s=i.Sn(0),e=Ht.Cn(t.buffered).jn(i),n=i.Tn(0)-s,r=e.V&&e.Tn(e.V-1)||0;r=_.max(0,r-s);let o=this.el(),a=this.Mn;o.style.width=Pa(r,n);for(let t=0;t<e.V;t++){let i=e.Sn(t),n=e.Tn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Pa(i-s,r),u.style.width=Pa(n-i,r)}for(let t=a.length;t>e.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Mn=[],this.on(t,"emptied",this.update)}};function Pa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Po.registerComponent("LoadProgressBar",Aa),f();var Ea=Po.getComponent("MouseTimeDisplay"),Na=class extends(Uo(Ea)){handleMouseMove(t){let i=t,s=this.ws,e=Fo(s)+this.calculateDistance(i)*Do(s),n=i.pageX-W(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ws,e=Fo(s)+this.calculateDistance(i)*Do(s),n=i.touches[0].pageX-W(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.An=Po.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.Pn=t;let s=this.En(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.An,s),this.Nn())}Nn(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);X(this.tooltip,this.el(),s,e)}}En(t){const i=this.ws,s=t-Bo(i);return Ro(No(i)?_.min(s,0):s,Do(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.In),null==(t=this.ws.presentation)||t.removeEventListener(ji.MODE_CHANGE,this.In),super.dispose()}constructor(t,i){var s;(super(t,i),this.Pn=NaN,this.In=()=>{let t=Io(this.player());const i=this.ws;let s=(t-Fo(i))/Do(i)||0;s=bi(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Po.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.An)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Dt.Qs)&&(this.on(t,"firstplay",this.In),this.on(t,"play",this.In),this.on(t,"seeking",this.In),this.on(t,"seeked",this.In),this.on(t,"timeupdate",this.In),this.ws.addEventListener("dimensionchange",this.In),null==(s=this.ws.presentation)||s.addEventListener(ji.MODE_CHANGE,this.In),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",gi((t=>this.handleTouchMove(t)),25)),this.In()})))}};Po.registerComponent("MouseTimeDisplay",Na),f();var Ia=Po.getComponent("PlayProgressBar"),Ba=class extends(Uo(Ia)){updateDataAttr(){let t=Io(this.player());this.el().setAttribute("data-current-time",this.En(t))}En(t){let i=this.ws;return Ro(t-Bo(i),Do(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};Po.registerComponent("PlayProgressBar",Ba),f();var Fa=Po.getComponent("RemainingTimeDisplay"),Da=class extends(Uo(Fa)){updateContent(){const t=this.ws,i=Do(t);if(i){const s=$o(t).end(0),e=this.localize("Remaining Time"),n=Ro(_.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Po.registerComponent("RemainingTimeDisplay",Da),f(),f();var $a=class{get ws(){var t;return null!=(t=this._s)?t:this._s=Oo(this.Bn)}Fn(){const t=this.Dn;if(!t)return;const i=this.ws;if(0===i.seekable.length)return;const s=t.cues.slice();this.Rn.$n(s);for(let t=0;t<s.length;t++){let e=s[t],n=s[t+1],r=!n||e.endTime!==n.startTime,h=new Ra(e,i,r);this.Un.push(h),this.On.appendChild(h.we)}}Vn(){this.ws.addEventListener("loadedmetadata",this.Ln),this.ws.addEventListener("loadeddata",this.Ln),this.ws.addEventListener("sourcechange",this.Ln),this.ws.addEventListener("durationchange",this.Hn),this.ws.clip.addEventListener("change",this.Hn),this.ws.textTracks.addEventListener("addtrack",this.qn),this.ws.textTracks.addEventListener("removetrack",this.zn),this.ws.textTracks.addEventListener("change",this.Ln)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Ln),this.ws.removeEventListener("loadeddata",this.Ln),this.ws.removeEventListener("sourcechange",this.Ln),this.ws.removeEventListener("durationchange",this.Hn),this.ws.clip.removeEventListener("change",this.Hn),this.ws.textTracks.removeEventListener("addtrack",this.qn),this.ws.textTracks.removeEventListener("removetrack",this.zn),this.ws.textTracks.removeEventListener("change",this.Ln)}Gn(){if(!(this.ws.readyState<At.Xn))for(let t of this.ws.textTracks)if(t.kind===Ct.Jn&&t.mode===_t.Qn&&t.cues.length>0&&t.readyState!==yt.ERROR)return t}Yn(t){const i=this.Dn;t!==i&&(i&&(this.Kn(),i.removeEventListener("cuechange",this.Zn)),this.Dn=t,t&&(t.addEventListener("cuechange",this.Zn),this.Hn()))}tr(t){this.Rn.ir(t)}sr(){this.Rn.ge()}er(){this.Rn.be()}Kn(){for(let t of this.Un)t.Re();this.Rn.nr(),this.Un=[],this.rr=void 0}Re(){this.Wn(),this.hr.removeEventListener("mousemove",this.ar),this.hr.removeEventListener("mouseenter",this.ur),this.hr.removeEventListener("mouseleave",this.cr),this.Yn(void 0),this.Rn.Re(),this._s=void 0}constructor(t,i){this.Bn=i,this.Un=[],this._s=void 0,this.Ln=()=>{this.Yn(this.Gn())},this.qn=t=>{let i=t.track;i.kind===Ct.Jn&&(i.addEventListener("addcue",this.Ln),i.addEventListener("removecue",this.Ln),i.addEventListener("readystatechange",this.Ln)),this.Ln()},this.zn=t=>{let i=t.track;i.kind===Ct.Jn&&(i.removeEventListener("addcue",this.Ln),i.removeEventListener("removecue",this.Ln),i.removeEventListener("readystatechange",this.Ln)),this.Ln()},this.ar=t=>{let i=this.ws,s=function(t,i){let s,e,n=W(t),r=t.offsetWidth,h=t.offsetHeight,o=n.top,a=n.left;!function(t){return void 0!==t.changedTouches}(i)?(e=i.pageX,s=i.pageY):(e=i.changedTouches[0].pageX,s=i.changedTouches[0].pageY);let u=bi((o-s+h)/h,0,1),c=bi((e-a)/r,0,1);return{x:c,y:u}}(this.On,t),e=Fo(i)+s.x*Do(i);e===i.duration&&(e-=.1),this.tr(e)},this.cr=()=>{this.Rn.be()},this.ur=()=>{this.Rn.ge()},this.Hn=()=>{this.Dn&&(this.Kn(),this.Fn(),this.Zn())},this.Zn=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=$(this.Un,(t=>t.lr===e));n!==this.rr&&(null==(s=this.rr)||s.dr(),this.rr=n,null==n||n.pr())},this.hr=t,this.Rn=new Ua,this.Bn.contentEl().appendChild(this.Rn.we),this.On=h.createElement("div"),ii(this.On,"theoplayer-chapterbar"),this.hr.appendChild(this.On),this.hr.addEventListener("mousemove",this.ar),this.hr.addEventListener("mouseenter",this.ur),this.hr.addEventListener("mouseleave",this.cr),this.Vn()}},Ra=class{get we(){return this.Vs}pr(){ii(this.Vs,"theoplayer-chapter-indicator-active")}dr(){ei(this.Vs,"theoplayer-chapter-indicator-active")}mr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,r=this.lr.startTime,o=this.lr.endTime,a=o>=s&&r<=e,u=bi(r-s,0,n),c=bi(o-s,0,n),l=_.max(0,c-u),d=h.createElement("div");ii(d,"theoplayer-chapter-indicator");let f=h.createElement("div");ii(f,"theoplayer-chapter-indicator-highlight"),d.appendChild(f),i&&ii(d,"theoplayer-chapter-indicator-discontinuous");let v=u/n*100,p=l/n*100;return d.style.display=a?"":"none",d.style.width=p+"%",d.style.left=v+"%",d}Re(){Jt(this.Vs)}constructor(t,i,s){this.lr=t,this.Vs=this.mr(i,s)}},Ua=class{be(){this.gr--,0===this.gr&&ei(this.we,"theoplayer-chapter-hovering")}$n(t){this.yr=t||[],this.yr.length>0&&(this.we.style.display="")}br(t){d(this.kr,t.content)}nr(){this.yr=[],d(this.kr,""),this.we.style.display="none"}ge(){this.gr++,this.gr>0&&ii(this.we,"theoplayer-chapter-hovering")}ir(t){for(let i of this.yr)if(Oa(i,t)){this.br(i);break}}Re(){Jt(this.we)}constructor(){this.yr=[],this.gr=0,this.we=h.createElement("div"),ii(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.kr=h.createElement("p"),this.we.appendChild(this.kr)}};function Oa(t,i){return new Ht([t.startTime,t.endTime]).wr(i)}var Va=Po.getComponent("SeekBar"),La=class extends(Uo(Va)){updateAriaAttributes(t){const i=Io(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this._r(i)).toFixed(2)),t.setAttribute("aria-valuetext",Ro(i-Bo(s),Do(s)))}getPercent(){return this._r(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Fo(i)+this.calculateDistance(t)*Do(i);s>=i.duration&&(s=i.duration-.1),this.On.tr(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.On.sr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.On.er(),super.handleMouseUp(t)}_r(t){let i=this.ws,s=(t-Fo(i))/Do(i);return bi(s,0,1)}dispose(){this.On.Re(),H(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.On=new $a(this.el(),t)}};Po.registerComponent("SeekBar",La),f();var Ha=Po.getComponent("ProgressControl");fi.Ys.Qs&&Po.registerComponent("ProgressControl",class extends Ha{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var qa=Po.getComponent("TooltipProgressBar"),za=class extends(Uo(qa)){updateDataAttr(){let t=Io(this.player()),i=this.En(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}En(t){const i=this.ws;return Ro(t-Bo(i),Do(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};function Wa(t){for(const i of t)if(i.enabled)return i}function Ga(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Xa(t),description:Ja(t),hd:!!t.height&&t.height>=720}}function Xa(t){return t.height?t.height+"p":t.bandwidth?Ja(t):""}function Ja(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Po.registerComponent("TooltipProgressBar",za),f(),f(),f(),f(),f();var Qa=class{get Cr(){return this.Sr}set Cr(t){let i=this.Sr;for(let s=i.length-1;s>=0;s--){let e=i[s];V(t,e)||this.jr(e)}for(let i of t)this.Tr(i);this.Mr.re()}get Ar(){return this.Mr.menuItems}Pr(t){let i=this.Ar;if(i)for(let s of i)if(s.Er===t)return s}Nr(t){let i=this.Mr.addMenuItem();return i.Er=t,i.on("click",(()=>this.Ir(i))),i.el().setAttribute("role","menuitemradio"),i}Br(t){t.dispose()}Fr(t){return!0}Tr(t){if(this.Fr(t)){V(this.Sr,t)||this.Sr.push(t);let i=this.Pr(t)||this.Nr(t);return this.Dr(i),i}this.jr(t)}jr(t){let i=this.Pr(t);i&&(this.Mr.removeMenuItem(i),this.Br(i)),U(this.Sr,t)}Re(){const t=[];for(let i of this.Sr)t.push(i);for(let i of t)this.jr(i);H(t)}constructor(t){this.Sr=[],this.Mr=t}},Ya=class extends Qa{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Quality")),this.Rr}Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-quality-automatic",d(this.Vr,this.Ur.localize("Automatic")),this.Vr}Lr(){return this.Hr=h.createElement("span"),d(this.Hr,this.Ur.localize("Automatic")),this.Hr}qr(){return this.zr=h.createElement("span"),this.zr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.zr,this.Ur.localize("HD")),this.zr}Wr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Vr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Hr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.zr),this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"))}Xr(){let t=this.Jr,i=t&&nu(t.targetQuality),s=t&&t.activeQuality,e=Ga(this.Qr(i||s))||{name:this.Ur.localize("Automatic")};d(this.Hr,e.name),ri(this.Vr,"vjs-hidden",!!i),ri(this.zr,"vjs-hidden",!e.hd)}Dr(t){let i=Ga(t.Er)||{name:this.Ur.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Ur.localize("HD")+"</span>"),i.description&&(s+='<span class="theo-settings-control-submenu-item-alternate-value">'+i.description+"</span>"),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Ur.localize("Set video quality to ")+i.name),t.Er?t.selected(t.Er===this.Yr):t.selected(!this.Yr)}Ir(t){this.Jr&&(this.Jr.targetQuality=t.Er&&t.Er.videoQualities)}Qr(t,i){const s=i||this.Cr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.off("languagechange",this.te),this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),super.Re()}constructor(t,i,s){super(t.subMenu),this.Jr=void 0,this.Yr=void 0,this.Kr=()=>{let t=Wa(this._s.videoTracks);if(t===this.Jr)return;let i=[];if(this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),this.Jr=t,t){t.addEventListener("activequalitychanged",this.Zr),t.addEventListener("targetqualitychanged",this.th),t.addEventListener("update",this.ih);const s=Za(su(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.Cr=i,this.th(),this.Zr()},this.ih=t=>{const i=t.track;if(i!==this.Jr)return;const s=Za(su(i.qualities.filter((t=>t.available)))),e=i&&nu(i.targetQuality);let n;this.Yr=this.Qr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.Cr=n,this.Xr()},this.Zr=()=>{this.Tr(void 0),this.Xr()},this.th=()=>{let t=Wa(this._s.videoTracks),i=t&&nu(t.targetQuality),s=this.Qr(i),e=this.Yr;s!==e&&(this.Yr=s,s&&e||this.Tr(void 0),e&&V(this.Cr,e)&&this.Tr(e),i&&this.Tr(s),this.Xr())},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),d(this.Rr,this.Ur.localize("Quality")),d(this.Vr,this.Ur.localize("Automatic")),d(this.Hr,this.Ur.localize("Automatic")),d(this.zr,this.Ur.localize("HD")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"));for(const t of this.Ar)this.Dr(t);this.Xr()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.Vr=this.Or(),this.Hr=this.Lr(),this.zr=this.qr(),this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),this.Cr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.on("languagechange",this.te),this.Kr()}},Ka=class{get height(){return this.sh[0].height}get bandwidth(){return this.sh[0].bandwidth}get videoQualities(){return this.sh}get label(){return this.sh[0].label}add(t){this.sh.push(t)}constructor(t){this.sh=t}};function Za(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(eu(s,t)){s.add(t),e=!0;break}e||i.push(new Ka([t]))}return i}function tu(t,i){return t&&i?F(t,i):I.eh}function iu(t,i){return t===i?I.eh:tu(t.height,i.height)||tu(t.width,i.width)||tu(t.bandwidth,i.bandwidth)}function su(t){return E(t,iu).reverse()}function eu(t,i){return t.label&&i.label&&t.label===i.label||at(Ga(t),Ga(i))}function nu(t){return Lt(t)?1===t.length?t[0]:void 0:t}function ru(t){return 1===t?"Normal":""+_.round(100*t)/100}f();var hu=class extends Qa{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Speed")),this.Rr}Wr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu")),t}Nr(t){let i=super.Nr(t);return this.Dr(i),i}Dr(t){const i=t.Er,s=this.Ur.localize(ru(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set video speed to ")+s),t.selected(t.Er===this._s.playbackRate)}Ir(t){this._s.playbackRate=t.Er}Re(){this._s.removeEventListener("ratechange",this.nh),this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.rh=void 0,this.nh=()=>{this.rh&&this.Tr(this.rh);let t=this._s.playbackRate;this.rh=t,d(this.hh,this.Ur.localize(ru(t))),t&&this.Tr(t)},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),d(this.Rr,this.Ur.localize("Speed")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu"));for(const t of this.Ar)this.Dr(t);this.nh()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.hh=this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),this.Cr=e,this._s.addEventListener("ratechange",this.nh),this.Ur.on("languagechange",this.te),this.nh()}};Po.registerComponent("SettingsButton",class extends da{createEl(){let t=super.createEl();return this.oh=Po.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.oh,this.localize("HD")),t.appendChild(this.oh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),d(this.oh,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.ah),this.uh.Re(),this.lh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Jr=void 0,this.ah=()=>{let t=Wa(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Zr),this.Zr())},this.Zr=()=>{var t;const i=null==(t=this.Jr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},ii(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.Ie=this.controlText(),this.dh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.uh=new Ya(this.dh,this.ws,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.fh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.lh=new hu(this.fh,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.ah),this.ah()}}),f(),f(),f();var ou=class extends Qa{ph(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=xt(s);if(t)return t.mh}return s||""}gh(){this.Cr=this.yh}Re(){this.yh.removeEventListener("addtrack",this.bh),this.yh.removeEventListener("removetrack",this.kh),this.yh.removeEventListener("change",this.wh),super.Re()}constructor(t,i){super(t),this.bh=t=>{const i=t.track;this.Tr(i),i.addEventListener("update",this._h)},this.kh=t=>{const i=t.track;this.jr(i),i.removeEventListener("update",this._h)},this.wh=t=>this.gh(),this._h=()=>{for(const t of this.Cr)this.Tr(t)},this.yh=i,this.yh.addEventListener("addtrack",this.bh),this.yh.addEventListener("removetrack",this.kh),this.yh.addEventListener("change",this.wh),this.gh()}},au=class extends ou{Dr(t){let i=t.Er,s=this.Ur.localize(this.ph(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Ir(t){let i=t.Er;for(let t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Language"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),this.Ur.localize("Language")),this.Ur.on("languagechange",this.te)}};Po.registerComponent("audioTrackButton",class extends da{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.xh=new au(this.menu,this.ws,t),this.controlText("Language"),this.Be.Ie=this.controlText()}}),f(),f();var uu=class extends ou{Fr(t){return!!super.Fr(t)&&(!t.forced&&T(t.kind))}Nr(t){let i=super.Nr(t);ii(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.Ch=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Sh=e;let n=t=>this.jh(t,i);i.Th=n,e.addEventListener("click",n);let r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Dr(t){let i=t,s=i.Er,e=this.Ur.localize(this.ph(s));d(i.Ch,e),i.el().setAttribute("aria-label",this.Ur.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===_t.Qn)}Br(t){let i=t;i.Sh.removeEventListener("click",i.Th),super.Br(t)}Ir(t){let i=t.Er;for(let t of this.ws.textTracks)t!==i&&jt(t.kind,i.kind)&&(t.mode=_t.Mh);i.mode!==_t.Qn?i.mode=_t.Qn:i.mode=_t.Mh}jh(t,i){t.stopImmediatePropagation(),this.Ir(i)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitles"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),s.localize("Subtitles")),this.Ur.on("languagechange",this.te)}};Po.registerComponent("subtitlesButton",class extends da{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.xh=new uu(this.menu,this.ws,t),this.controlText("Subtitles"),this.Be.Ie=this.controlText()}}),f();var cu=Po.getComponent("playToggle"),lu=class extends(Uo(cu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Ie=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Ie=this.controlText())}te(){this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),this.ws.removeEventListener("ended",this.Ah),super.dispose()}constructor(t,i){super(t,i),this.Ah=()=>{this.controlText("Replay"),this.Be.Ie=this.controlText()},this.controlText("Play"),this.Be=new ca(this,this.controlText()),this.ws.addEventListener("ended",this.Ah),this.on(t,"languagechange",this.te),fi.Ys.Qe&&new Yo(this.el())}};Po.registerComponent("playToggle",lu),f();var du=Po.getComponent("fullscreenToggle"),fu=class extends(Uo(du)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new ca(this,this.controlText()),fi.Ys.Qe&&new Yo(this.el()),this.on(t,"languagechange",this.updateContent)}};Po.registerComponent("fullscreenToggle",fu),f();var vu=Po.getComponent("muteToggle"),pu=class extends(Uo(vu)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new ca(this,this.controlText()),fi.Ys.Qe&&new Yo(this.el()),this.on(t,"languagechange",this.te),wi&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Po.registerComponent("muteToggle",pu),f();var mu=Po.getComponent("BigPlayButton"),gu="theo-play-svg-circle",yu='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="'+gu+'" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',bu=class extends(Uo(mu)){createEl(){let t=super.createEl(),i=Po.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=yu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};Po.registerComponent("BigPlayButton",bu),f();var ku=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Po.registerComponent("MouseTimeDisplay",class extends Na{Ph(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Eh&&(this.Eh=i,this.Nh=i.src?fi.Ih(i.src).href:void 0,this.Eh.addEventListener(["addcue","removecue"],this.Bh),this.Fh())}Dh(t){t.track===this.Eh&&this.$h()}createEl(){const t=super.createEl();return this.Rh=Po.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Uh=Po.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Oh(t)}Oh(t){let i;if(this.Eh&&this.Eh.cues){let s=function(t,i){let s=t[0];for(let e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Eh.cues,t);i=s&&s.content}if(i===this.Vh)return;if(this.Vh=i,Po.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Lh();const s=i.match(ku);if(s){let[,t,i,e,n,r]=s;t=this.Hh(t);const h={qh:+i,zh:+e,ji:+n,Ti:+r};this.Wh(t,h)}else{const t=this.Hh(i);this.Wh(t)}}Fh(){S(this.Pn)||this.Oh(this.Pn)}Hh(t){return this.Eh&&this.Nh?fi.Ih(t,this.Nh).href:t}Wh(t,i){this.Rh&&(this.Rh.src!==t?(this.Rh.onload=()=>{this.Gh(i)},this.Rh.src="",this.Rh.src=t):this.Gh(i))}Gh(t){if(!this.Uh||!this.Rh)return;const i=this.Uh.getContext("2d");i&&(null!=t||(t={qh:0,zh:0,ji:this.Rh.naturalWidth,Ti:this.Rh.naturalHeight}),this.Uh.width=t.ji,this.Uh.height=t.Ti,i.drawImage(this.Rh,t.qh,t.zh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.Xh(this.Uh))}Xh(t){this.Jh||(Yt(this.tooltip,t),this.Jh=t),this.Nn()}Lh(){this.Jh&&(this.tooltip.removeChild(this.Jh),this.Jh=void 0,this.Nn())}$h(){void 0!==this.Eh&&(this.Eh.removeEventListener(["addcue","removecue"],this.Bh),this.Eh=void 0),this.Nh=void 0,this.Lh(),this.Vh=void 0}dispose(){this.$h(),super.dispose()}constructor(t,i){super(t,i),this.Jh=void 0,this.Eh=void 0,this.Nh=void 0,this.Qh=t=>this.Ph(t),this.Yh=t=>this.Dh(t),this.Bh=t=>this.Fh(),this.showThumbnails=()=>{this.Jh&&this.Jh.hidden&&(this.Jh.hidden=!1,this.Nn())},this.hideThumbnails=()=>{!this.Jh||this.Jh.hidden||this.player().scrubbing()||(this.Jh.hidden=!0,this.Nn())},this.on(this.player().textTracks(),"addtrack",this.Qh),this.on(this.player().textTracks(),"removetrack",this.Yh),Dt.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var wu=Po.getComponent("VolumeLevel");Po.registerComponent("VolumeLevel",class extends wu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var _u=Po.getComponent("Component"),xu=class extends _u{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};xu.prototype.h=Ti({},xu.prototype.h,{children:[]}),Po.registerComponent("controlBarMenuContainer",xu);var Cu=Po.getComponent("Player"),Su=class extends Cu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Jt(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};Su.prototype.h=Ti({},Cu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Po.registerComponent("Player",Su),f(),f();var ju=Po.getComponent("Player"),Tu=ju.prototype.es;ju.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return Tu.call(this,t)};var Mu=ju.prototype.createEl;function Au(t,i,e,n){let r=Ti({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=Ti({progressControl:{keepTooltipsInside:!0}},r.controlBar);let h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer"),(r.theoplayer||(r.theoplayer={})).player=t,e&&zt(e.language)&&(r.languages=Ti({},r.languages,{[wt]:e.language}),r.language=wt),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=Po(t.element,r,n);return a.ready((()=>{Vo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===St.Kh;qo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;qo(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{qo(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",zo)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),fi.Ys.Qs&&(ii(i,"theo-mobile"),function(t){let i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ei(t,"theo-mobile-landscape"),ii(t,"theo-mobile-portrait")):(ei(t,"theo-mobile-portrait"),ii(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{Zt(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}ju.prototype.createEl=function(){let t=Mu.call(this),i=Po.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Pu=Po.getComponent("Button");var Eu="THEOPiPCloseButton";Po.registerComponent(Eu,class extends Pu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.io.Zh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.io)}(i))throw new g("Invalid Picture-in-picture options.");this.io=i.io}});var Nu=class extends J{get so(){return this.eo}get no(){return this.t.cs()}ro(){this.t.bn(Z.ho,this.oo),this.ao||this.t.bn(Z.uo,this.co),this.t.lo.on("languagechange",this.te)}do(){var t;return"theo-pip-"+(null!=(t=this.fo)?t:"bottom-right")}vo(t){let i=this.po;i&&!this.no&&(this.mo||this.yo(),this.bo(),ii(i,"theo-pip"),ii(i,this.do()),this.eo=!0,this.ko=t,this.wo=!1,this._o(new Mi(Kt.PICTURE_IN_PICTURE)))}xo(t){let i=this.po;i&&(this.Co(),ei(i,"theo-pip"),ei(i,this.do()),this.eo=!1,this.wo=t,this.So=this.ko,this.ko=!1,this._o(new Mi(Kt.INLINE)))}yo(){if(!this.mo){let t=this.t.lo;t.addChild(Eu,{io:this});let i=h.createElement("div");i.className="theo-pip-overlay",this.jo=h.createElement("div"),this.jo.className="theo-pip-overlay-text",d(this.jo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.jo),Yt(t.el(),i),this.To=i,this.mo=!0}}Mo(){this.Ao&&!this.Po&&this.t.Eo&&(this.No=this.t.Eo.Io(it,this.Bo),this.Po=!0)}Fo(){this.No&&this.t.Eo&&(this.t.Eo.Do(this.No),this.Po=!1)}bo(){let t=this.t.lo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}Co(){let t=this.t.lo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}$o(){ei(this.po,"theo-pip"),this.so&&this.fo&&ei(this.po,"theo-pip-"+this.fo),this.To&&(Jt(this.To),this.To=void 0)}yn(){this.$o(),this.Fo(),this.Ro(),this.t.vn(Z.ho,this.oo),this.t.vn(Z.uo,this.co),this.t.lo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Uo=!1,this.eo=!1,this.wo=!1,this.ko=!1,this.mo=!1,this.Po=!1,this.So=!1,this.oo=()=>{this.Uo=!0,this.Ao&&!this.so&&this.No&&this.Oo&&this.No.Vo<=this.Oo&&this.vo(!1)},this.co=()=>{this.ao||(this.Uo=!1,this.Zh(),this.xo(!1))},this.te=()=>{if(this.jo){const t=this.t.lo;d(this.jo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Bo=t=>{!this.ko&&this.Ao&&(S(t)||(this.Oo&&t<=this.Oo||this.So?this.eo||this.wo||this.vo(!1):this.eo?this.xo(!1):this.wo=!1))},this.Oo=i.visibility,this.fo=i.position,this.ao=i.retainPresentationModeOnSourceChange,this.Ao=void 0!==this.Oo,this.t=t,this.po=t.Lo,this.Zh=s,this.ro()}},Iu=class extends P{Ho(){let t=super.Ho();return t===Kt.INLINE&&this.qo.so?Kt.PICTURE_IN_PICTURE:t}zo(t){return t===Kt.PICTURE_IN_PICTURE||super.zo(t)}Wo(t){this.Go=this.Xo,t===Kt.FULLSCREEN||t===Kt.NATIVE_PICTURE_IN_PICTURE?this.qo.Fo():this.qo.Mo(),super.Wo(t)}Jo(t){super.Jo(t),t===Kt.PICTURE_IN_PICTURE?G(this.Yo.Qo((t=>this.Ko(t)))):t===Kt.FULLSCREEN?this.qo.xo(!1):this.qo.xo(!0)}async Ko(t){z(t),await Promise.all([this.Zo(),this.ta.xo()]).catch(pi),z(t),this.qo.vo(!this.ia),this._o(new Mi(this.Xo)),this.ia=!1,this.sa=!1}wi(){this.sa||(this.qo.so&&this.ea.cs?this.Wo(Kt.FULLSCREEN):this.Go!==Kt.PICTURE_IN_PICTURE||this.ea.cs?super.wi():(this.ia=!0,this.Wo(Kt.PICTURE_IN_PICTURE)))}yn(){super.yn(),this.qo.yn(),this.na.vn(Z.ho,this.ra),this.na=void 0}constructor(t,i,s,e){super(i,s),this.Go=Kt.INLINE,this.ia=!1,this.Zh=()=>{this.Xo===Kt.PICTURE_IN_PICTURE&&this.Wo(Kt.INLINE)},this.ha=t=>{this.sa||(this.Xo!==Kt.PICTURE_IN_PICTURE||this.qo.so?this.Xo!==Kt.PICTURE_IN_PICTURE&&this.qo.so&&(this.ia=!0,this.Wo(Kt.PICTURE_IN_PICTURE)):this.Wo(Kt.INLINE))},this.ra=()=>{this.Ho()!==Kt.PICTURE_IN_PICTURE&&this.Ho()!==Kt.INLINE||this.qo.Mo(),this.na.vn(Z.ho,this.ra)},this.na=t,this.qo=new Nu(t,e.pip,this.Zh),this.qo.bn(ji.MODE_CHANGE,this.ha),this.na.bn(Z.ho,this.ra)}};f();var Bu,Fu=class extends J{get oa(){return Ci.aa(this.lo.el())||this.lo.supportsFullScreen()}get cs(){return this.lo.isFullscreen()||this.ua}vo(){this.lo.requestFullscreen()}xo(){this.lo.exitFullscreen(),this.ca.xo()}yn(){this.Ro(),this.lo.off("fullscreenchange",this.la),this.ca.vn(ni.da,this.la),this.ca.vn(ni.fa,this.Ds),this.lo.isFullWindow&&this.lo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.ua=!1,this.va=!1,this.la=()=>{if(this.va)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this._o(new ki))},this.pa=()=>{this.ua=this.ca.cs,this.la()},this.ma=()=>{this.va||(this.lo.isFullWindow&&this.lo.supportsFullScreen()||this.ua&&!this.lo.supportsFullScreen())&&(this.va=!0,this.lo.exitFullscreen(),this.lo.requestFullscreen(),this.va=!1,this.la())},this.lo=t,this.ca=i,this.lo.on("fullscreenchange",this.la),this.ca.bn(ni.da,this.pa),this.ca.bn(ni.ga,this.ma),this.ca.bn(ni.fa,this.Ds),this.la()}};function Du(t){return class extends t{get Eo(){return this.ya}cs(){return this.ba.Ho()===Kt.FULLSCREEN}ka(){return function(t,i){let s=w.create(t);const e=i.lo;return ht(s,{get controls(){return e.controls()},set controls(t){e.controls(dt(t))},get presentation(){return i.ba.wa},get presentationMode(){return i.ba.Ho()},set presentationMode(t){const s=si(t);s&&i.ba.Wo(s)},get ui(){return e},get visibility(){return i.Eo.wa}})}(this._a,this)}yn(){super.yn(),this.ba.yn(),this.xa.yn(),this.lo.dispose(),this.ya.yn()}Ca(t){this.lo.src(""),super.Ca(t)}constructor(t,i,s){super(i,s),this.Lo=t,this.ya=new et(t),this._a=super.ka(),w.defineProperty(this._a,"constructor",{value:ut}),this.lo=Au(this._a,this.Lo,s.ui),this.xa=new Fu(this.lo,this.Sa),this.ba=new Iu(this,this.xa,this.Ta.ja(),s),this.ba.bn(ji.MODE_CHANGE,this.Ds)}}}function $u(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Ut(t)&&!S(t))return bi(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=dt(t.retainPresentationModeOnSourceChange),t}function Ru(){return Bu||(Bu=function(t){let i=t;for(const t of Ei)i=t(i);return i}(Bu=Du(ot()))),Bu}function Uu(t,i){const s=function(t){const i=ti(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=$u(i.pip),i}(i),e=h.createElement("div");oi(e),t.appendChild(e);const n=new(Ru())(t,e,s);n.Ma=n;let r=n.wa;return n.Aa(),n.Pa(rt),w.defineProperty(r,"constructor",{value:Uu}),r=nt(r),Ot(n),function(t){for(const i of Ii)i(t)}(n),r}f(),f(),f(),f(),f();var Ou="theo-cast-",Vu=Po.getComponent("Button"),Lu=class extends(Uo(Vu)){get Ea(){throw new g("Na")}get Ia(){return this.h.Ia}get Ba(){return this.h.Ba}buildCSSClass(){return Ou+"button theo-"+this.Ba+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=Ou+"svg-container",r.innerHTML=this.Ia,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Fa===hi.AVAILABLE)null==(i=this.Ea)||i.start();else if(this.Fa===hi.CONNECTED||this.Fa===hi.CONNECTING){var s;null==(s=this.Ea)||s.stop()}}Da(t){ei(this.po,"theo-"+this.Ba+"-"+this.Fa),this.Fa=t,ii(this.po,"theo-"+this.Ba+"-"+this.Fa),this.te()}te(){this.$a(this.Fa),this.Be.Ie=this.controlText()}$a(t){t===hi.CONNECTED?this.controlText("Stop Casting"):t===hi.AVAILABLE?this.controlText("Start Casting"):t===hi.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.po=t.el(),this.Fa=hi.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new ca(this,this.controlText()),null==(s=this.Ea)||s.addEventListener("statechange",(t=>{const i=t;this.Da(i.state)})),fi.Ys.Qe&&(this.Ra=new Yo(this.el())),this.Da(this.Ea?this.Ea.state:hi.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Hu=0;function qu(){const t='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor">\n <defs>\n <clipPath id="theo-chromecast-rings-mask-'+Hu+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n <path class="theo-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/>\n <path class="theo-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/>\n <g class="theo-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theo-chromecast-rings-mask-'+Hu+')">\n <circle stroke="none" cx="0" cy="0" r="30" />\n <circle class="theo-chromecast-ring theo-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3" />\n <circle class="theo-chromecast-ring theo-chromecast-ring2" cx="0" cy="0" r="12" />\n <circle class="theo-chromecast-ring theo-chromecast-ring3" cx="0" cy="0" r="20"/>\n <path class="theo-chromecast-ring theo-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0" />\n </g>\n </svg>';return Hu++,t}Po.registerComponent("chromecastButton",class extends Lu{get Ea(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,Ti({},i,{Ba:"chromecast",Ia:qu()}))}}),f();var zu="theo-chromecast-",Wu=Po.getComponent("Component"),Gu=class t extends(Uo(Wu)){buildCSSClass(){return zu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();ii(i,zu+"overlay");const s=Po.createEl("div",{className:zu+"status-icon",innerHTML:t.ICON_SVG}),e=Po.createEl("div",{className:zu+"status-info"});d(e,"Playing on");const n=Po.createEl("div",{className:zu+"status-title"}),r=Po.createEl("div",{className:zu+"status"});return this.kr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Ua)||t.removeEventListener("statechange",this.update),this.Ua=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Ua?(this.kr&&d(this.kr,this.Ua.receiverName||""),this.Ua.state===hi.CONNECTED?this.show():this.hide()):this.hide()},this.Ua=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Ua)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};Gu.ICON_SVG='\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="currentColor">\n <path d="M7 24v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H11v1.63c3.96 1.28 7.09 4.41 8.37 8.37H25V13zM7 16v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H9c-1.1 0-2 .9-2 2v3h2v-3h18v14h-7v2h7c1.1 0 2-.9 2-2V11c0-1.1-.9-2-2-2z"/>\n</svg>',Po.registerComponent("chromecastOverlay",Gu),f(),f();Po.registerComponent("airplayButton",class extends Lu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Oa),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.Va),this.ws.removeEventListener("currentsourcechange",this.Va),super.dispose()}get Ea(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Ti({},i,{Ba:"airplay",Ia:'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">\n <path class="theo-cast-inner" d="M5 7h14v8H5z"/>\n <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"/>\n</svg>'})),this.Va=()=>{this.enable()},this.Oa=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Oa),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.Va),this.ws.addEventListener("currentsourcechange",this.Va)}}),f(),f(),f();var Xu=Po.getComponent("Button"),Ju=class extends(Uo(Xu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}xn(){const t=this.ws.vr;t&&t.state!==It.Rs?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.te()}te(){const t=this.ws.vr;t&&t.state!==It.Rs&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.La.Ie=this.controlText())}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener(["statechange","stereochange"],this.Ha),super.dispose()}constructor(t,i){var s;super(t,i),this.Ha=()=>this.xn(),this.controlText("Watch in VR"),this.La=new ca(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener(["statechange","stereochange"],this.Ha),this.xn(),fi.Ys.Qe&&(this.Ra=new Yo(this.el())),this.on(t,"languagechange",this.te)}};Po.registerComponent("vrButton",Ju),f();var Qu=Po.getComponent("Component"),Yu=class extends Qu{createEl(){const t=super.createEl("div",{className:this.buildCSSClass()}),i=Po.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.qa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}xn(){this.ws.vr.state===It.Rs?this.hide():this.show()}za(){const t=-this.ws.vr.direction.yaw+40;this.qa.style[mi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ha),this.ws.vr.removeEventListener("directionchange",this.Wa),super.dispose()}constructor(t,i,s){super(t,i),this.Ha=()=>this.xn(),this.Wa=()=>this.za(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ha),this.ws.vr.addEventListener("directionchange",this.Wa),this.xn(),this.za()}};f();var Ku=Po.getComponent("Component"),Zu=class extends Ku{Ga(){this.ws.vr.state===It.Xa?this.Ja():this.Qa()}Ja(){if(this.Ya)return;this.Ya=!0;const t=this.ws.element;this.Ka=t.style.zIndex||"",t.style.zIndex="2147483647",this.Za=this.player().isFullscreen(),this.player().requestFullscreen()}Qa(){if(!this.Ya)return;this.Ya=!1;this.ws.element.style.zIndex=this.Ka,this.Za?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Qa(),this.ws.vr.removeEventListener("statechange",this.tu),super.dispose()}constructor(t,i,s){super(t,i),this.Ya=!1,this.Za=!1,this.Ka="",this.tu=()=>this.Ga(),this.ws=s,this.ws.vr.addEventListener("statechange",this.tu),this.Ga()}};Bi((function(t){const i=t.wa;if(!i.vr)return;const s=t.lo,e=new Yu(s,{},i);if(t.bn(Z.uo,(()=>{var i;s.removeChild(e);const n=null==(i=t.iu())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),Dt.su){const t=new Zu(s,{},i);s.addChild(t)}})),f(),f(),f();var tc=class extends Y{constructor(){super("relatedchange")}},ic=["relatedchange"],sc=class extends J{get wa(){return this.eu||(this.eu=function(t){let i,s={get sources(){return t.nu},set sources(i){t.nu=i},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new Pi(ic,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.hu}set nu(t){this.hu=function(t){return t.filter((t=>t&&(Gt(t.link)||ct(t,["source"]))))}(t),t.length>this.hu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this._o(new tc)}yn(){this.Ro(),this.hu=[]}constructor(...t){super(...t),this.hu=[]}};$t((function(t){return class extends t{ka(){const t=this.ou;return ht(super.ka(),{get related(){return t.wa}})}yn(){this.ou.yn(),super.yn()}constructor(t,i){super(t,i),this.ou=new sc}}}),Bt.au),f(),f();var ec=Po.getComponent("Button"),nc=class extends ec{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.cu.uu?this.cu.be():this.cu.ge()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.cu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Be=new ca(this,this.controlText()),this.on(t,"languagechange",this.te)}};f(),f();var rc=Po.getComponent("Button"),hc=class extends rc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.lu.hide()}constructor(t,i){super(t),this.lu=i}},oc=(()=>{let t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function ac(t,i,s){let e=oc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");ct(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Gt(s.link)&&n.setAttribute("href",s.link);let r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+A(s.image)+'")',r.removeAttribute("id");let h=e.querySelector(".theo-related-grid-tile-title");s.title?(d(h,s.title),h.removeAttribute("id")):Jt(h);let o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(d(o,s.duration),o.removeAttribute("id")):Jt(o),e}var uc=[15,12,9,8,6,4,3,2,1];var cc=class{get du(){return"theo-"+this.fu+"-item-grid"}vu(){this.pu.focus()}mu(t){this.gu(),function(t){if(t.length)for(let i of uc)if(t.length>=i){t.length=i;break}}(t),this.yu(t.length);for(let i of t){let t=ac(this.bu.wa,this.ku,i);this.wu.appendChild(t)}}gu(){this.wu.innerHTML=""}_u(){let t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.xu.className="theo-related",this.pu.controlText("Close Related Content"),this.Cu.appendChild(this.xu),this.xu.appendChild(t),t.appendChild(this.pu.el()),t.appendChild(i),i}yu(t){ei(this.wu,this.du),this.fu=t,ii(this.wu,this.du)}yn(){Jt(this.xu),this.Su.yn(),this.ju.yn(),this.pu.dispose(),this.bu=void 0}constructor(t,i,s,e,n){this.bu=t,this.Tu=i,this.ku=s,this.Cu=e,this.fu=12,this.Mu=t=>{this.wu.style.width=t.width+"px"},this.xu=h.createElement("div"),this.pu=new hc(this.Tu,{hide:()=>{this.ku.be()}}),this.wu=this._u(),this.ju=new lc(n),this.ju.bn(di.mn,this.Mu),this.Su=new Tt(this.wu,this.ju),this.yu(12)}},lc=class extends J{get Au(){return this.Pu||0}get Eu(){return this.Nu.Eu}yn(){this.Ro(),this.Nu.vn(di.mn,this.Iu)}constructor(t){super(),this.Nu=t,this.Iu=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.Pu=i,this._o(new vi(this.Au,t.height))},this.Nu.bn(di.mn,this.Iu)}};f();var dc=class extends Y{constructor(){super("show")}};f();var fc=class extends Y{constructor(){super("hide")}},vc="theo-related-available",pc="theo-related-showing",mc=[...ic,"show","hide"],gc=class extends J{get wa(){return this.eu||(this.eu=function(t){let i;const s={get sources(){return t.nu},set sources(i){t.nu=i},get showing(){return t.uu},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new Pi(mc,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.Bu.nu}set nu(t){this.Bu.nu=t}get uu(){return this.Fu}ge(){let t=this.Fu;this.Fu=!0,this.Du(pc),this.$u.vu(),this.Tu.paused()?this.Ru=!0:this.Tu.pause(),t!==this.Fu&&this._o(new dc)}be(){let t=this.Fu;this.Fu=!1,this.Uu(pc),this.Ou.focus(),this.Ru||this.Tu.play(),this.Ru=!1,t!==this.Fu&&this._o(new fc)}Du(t){this.Tu.el().classList.add(t)}Uu(t){this.Tu.el().classList.remove(t)}yn(){this.Ro(),this.$u.yn()}constructor(t,i,s,e){super(),this.Fu=!1,this.Ru=!1,this.Vu=t=>{const i=this.nu;this.$u.mu(i),i.length?(this.Du(vc),this.Ou.show()):(this.Uu(vc),this.Ou.hide()),this._o(t)},this.Bu=i,this.Bu.bn("relatedchange",this.Vu),this.Tu=s,this.$u=new cc(t,this.Tu,this,s.contentEl(),e),this.Ou=new nc(s,this,{})}};Ni((function(t){return class extends t{ka(){const t=this.Lu;return ht(super.ka(),{get related(){return t.wa}})}yn(){this.Lu.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.Lu=new gc(this,this.ou,this.lo,this.Hu)}}})),f(),f(),f();var yc=Po.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.qu.showing?this.qu.hide():this.qu.show()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.qu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Be=new ca(this,this.controlText()),this.on(t,"languagechange",this.te)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){let s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="zu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){let i=h.createElement("div");if(i.className="theo-social-text",t.label){let s=h.createElement("h5");s.className="theo-primary-background theo-social-label",d(s,t.label),i.appendChild(s)}let s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,d(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){let s=h.createElement("div");if(s.className="theo-social-texturl",t.label){let i=h.createElement("h5");i.className="theo-primary-background theo-social-label",d(i,t.label),s.appendChild(i)}let e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";let n=h.createElement("a");return n.target="zu",n.href=i,d(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var wc="<URL>";var _c=class{get we(){return this.xu}Wu(t){this.gu();for(let i of t)this.Gu(i)}vu(){this.pu.focus()}Gu(t){let i=function(t,i){return t.src?Ai(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.ku.Xu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Ju.appendChild(e):this.Qu.appendChild(e))}gu(){this.Ju.innerHTML="",this.Qu.innerHTML=""}yn(){Jt(this.xu),this.Yu.yn()}constructor(t,i,s,e){this.na=t,this.ku=i,this.Cu=s,this.Ku=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.pu=new hc(this.na,this.ku.wa),this.pu.controlText("Close Share"),this.$u=h.createElement("div"),this.$u.className="theo-social-container",this.xu=h.createElement("div"),this.xu.className="theo-social",this.Ju=h.createElement("div"),this.Ju.className="theo-social-icon-container",this.Qu=h.createElement("div"),this.Qu.className="theo-social-text-container",this.Cu.appendChild(this.xu),this.xu.appendChild(n),this.$u.appendChild(this.Ju),this.$u.appendChild(this.Qu),n.appendChild(this.pu.el()),n.appendChild(this.$u),this.Yu=new Tt(this.xu,this.Ku)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get wa(){return this.eu}get uu(){return this.Fu}get Zu(){return this.tc}set Zu(t){this.tc=t,this.$u.Wu(t),t.length?(this.Du(xc),this.Ou.show()):(this.Uu(xc),this.Ou.hide())}get Xu(){return this.ic||Si()}set Xu(t){this.ic=t}ge(){this.Fu=!0,this.Du(Cc),this.$u.vu(),this.sc.paused()?this.Ru=!0:this.sc.pause()}be(){this.Fu=!1,this.Uu(Cc),this.Ou.focus(),this.Ru||this.sc.play(),this.Ru=!1}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}yn(){this.Ou.dispose(),this.$u.yn()}constructor(t,i){this.Fu=!1,this.tc=[],this.Ru=!1,this.eu=function(t){return{get showing(){return t.uu},get items(){return t.Zu},set items(i){t.Zu=i},get url(){return t.Xu},set url(i){t.Xu=i},show(){t.ge()},hide(){t.be()}}}(this),this.sc=t,this.$u=new _c(this.sc,this,t.contentEl(),i),this.Ou=new bc(t,this.eu,{})}};Ni((function(t){return class extends t{ka(){let t=this.qu;return ht(super.ka(),{get social(){return t.wa}})}constructor(t,i,s){super(t,i,s),this.qu=new Sc(this.lo,this.Hu)}}})),f(),f();var jc=Po.getComponent("Component"),Tc=class extends jc{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=Ti({},Tc.prototype.h,{children:[]}),Po.registerComponent("upNextContainer",Tc),f(),f();var Mc="theo-upnext-bar-",Ac=Po.getComponent("Component"),Pc=class extends Ac{get uu(){return this.Fu}set uu(t){this.Fu=t,this.ec&&(this.ec.tabIndex=t?0:-1)}get nc(){return this.rc}set nc(t){this.rc=t}Ca(t){this.gu(),this.hc(t)}hc(t){if(t&&t.link&&t.image){const i=h.createElement("div");ii(i,Mc+"content"),i.onclick=()=>{this.oc.next()},i.onkeypress=t=>{13===t.which&&this.oc.next()};let s=h.createElement("div");if(s.style.backgroundImage='url("'+A(t.image)+'")',ii(s,Mc+"image"),i.appendChild(s),t.duration){let i=h.createElement("span");ii(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}let e=h.createElement("div");ii(e,Mc+"text");let n=h.createElement("div");if(ii(n,Mc+"upnext"),d(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");ii(i,Mc+"title"),d(i,t.title),e.appendChild(i)}i.appendChild(e),this.ec=i,this.ac=n,this.el().appendChild(this.ec)}}gu(){this.el().innerHTML="",this.ec=void 0,this.ac=void 0}te(){this.ac&&d(this.ac,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.ec=void 0,this.ac=void 0,this.oc=i,this.Yu=new Tt(this.el(),e),this.Fu=!1,this.rc=10,this.on(t,"languagechange",this.te)}};f();var Ec="theo-upnext-panel-",Nc=gu,Ic=Po.getComponent("Component"),Bc=class extends Ic{get uu(){return this.Fu}set uu(t){this.Fu=t}get uc(){return this.cc}set uc(t){this.cc=t}get lc(){return this.dc}set lc(t){this.dc=t}Ca(t){this.gu(),this.fc(t)}fc(t){if(t&&t.link&&t.image){let i=h.createElement("div");i.className=Ec+"content";let s=h.createElement("div");s.style.backgroundImage='url("'+A(t.image)+'")',s.className=Ec+"image",i.appendChild(s);let e=h.createElement("div");e.className=Ec+"text";let n=h.createElement("div");if(n.className=Ec+"upnext",d(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");i.className=Ec+"title",d(i,t.title),e.appendChild(i)}i.appendChild(e),this.vc=h.createElement("div"),this.vc.className=Ec+"autoplay",this.vc.innerHTML=yu;let r=this.vc.querySelector("svg");r.onclick=()=>{this.oc.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.oc.next()},this.mc=n,this.gc=this.vc.querySelector("."+Nc),i.appendChild(this.vc),this.el().appendChild(i)}}get yc(){return this.bc}set yc(t){this.bc=t,this.gc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}gu(){this.el().innerHTML="",this.mc=void 0,this.gc=void 0}te(){this.mc&&d(this.mc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.bc=0,this.oc=i,this.Yu=new Tt(this.el(),e),this.Fu=!1,this.cc=10,this.dc=!0,this.on(t,"languagechange",this.te)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get wa(){return this.eu}get kc(){return this.wc}get _c(){return this.xc}get Cc(){return this.Sc}set Cc(t){this.Sc=t,this.$u.Ca(t),this.jc.Ca(t),this.sc.off("timeupdate",this.Tc),this.sc.off("ended",this.Mc),t&&(this.sc.on("timeupdate",this.Tc),this.sc.on("ended",this.Mc))}Ac(){this.$u.uc?this.Pc=vt(this.$u.uc):0===this.$u.uc?this.Pc=0:this.Pc=10,0!==this.Pc?(isFinite(this.Pc)&&(this.Ec=!0),this.$u.uu=!0,this.Du(Fc),this.Ec&&(this.$u.yc=$c-$c/this.Pc,this.Nc=p(this.Ic,1e3))):this.Bc()}Fc(){this.$u.uu=!1,this.Uu(Fc),this.Ec&&(m(this.Nc),this.Dc=1,this.$u.yc=$c)}$c(){this.jc.uu=!0,this.Du(Dc)}Rc(){this.jc.uu=!1,this.Uu(Dc)}Bc(){m(this.Nc),this.Cc&&(s.location.href=this.Cc.link)}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}Uc(t,i){const s=t>=i&&!(this.Oc&&this.Oc.Vc);this.jc.uu&&!s?this.Rc():!this.jc.uu&&s&&this.$c()}Lc(t,i){this.$u.uu&&t<i&&!this.sc.ended()&&this.Fc()}static Hc(t,i){let s=vt(t);if(!S(s))return i-s;let e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-x(e[1],10)/100)}}yn(){this.Nc&&m(this.Nc),this.sc.getChild("upNextContainer").removeChild(this.$u),this.sc.getChild("upNextContainer").removeChild(this.jc),this.$u.dispose(),this.jc.dispose()}constructor(i,s,e){this.Sc=void 0,this.Pc=10,this.Dc=1,this.Nc=void 0,this.Ec=!0,this.Ic=()=>{this.Dc!==this.Pc?(this.$u.yc-=$c/this.Pc,this.Dc+=1):this.Bc()},this.Mc=()=>{this.$u.uu||this.Ac()},this.Tc=()=>{let i=this.sc.currentTime(),s=this.sc.duration(),e=s?t.Hc(this.jc.nc,s):void 0;void 0!==e&&this.Uc(i,e),this.$u.lc&&this.Lc(i,s)},this.eu=function(t){return{get source(){return t.Cc},set source(i){t.Cc=i},get bar(){return t.kc},get panel(){return t._c},next(){t.Bc()}}}(this),this.jc=new Pc(i,this.eu,{},s),this.$u=new Bc(i,this.eu,{},s),this.wc=function(t,i){return{get showing(){return i.uu},get offset(){return i.nc},set offset(t){i.nc=t},show(){t.$c()},hide(){t.Rc()}}}(this,this.jc),this.xc=function(t,i){return{get showing(){return i.uu},get countdownDuration(){return i.uc},set countdownDuration(t){i.uc=t},get showUpNextPanel(){return i.lc},set showUpNextPanel(t){i.lc=t},show(){t.Ac()},hide(){t.Fc()}}}(this,this.$u),this.sc=i,this.Oc=e,i.getChild("upNextContainer").addChild(this.jc,{}),i.getChild("upNextContainer").addChild(this.$u,{})}};Ni((function(t){return class extends t{ka(){let t=this.qc;return ht(super.ka(),{get upnext(){return t.wa}})}yn(){this.qc.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.qc=new Rc(this.lo,this.Hu,this.zc)}}})),f(),f();var Uc=Po.getComponent("Component"),Oc=class extends Uc{createEl(){let t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);let n=h.createElement("div");return n.className="theo-context-version",d(n,"Powered by THEOplayer 9.3.2"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="zu",t.appendChild(i),t}Wc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";let s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);Q(this.el(),r,n,h);let o=i.clientY-s.getBoundingClientRect().top;K(this.el(),o,n,h),this.Gc()}Xc(){this.hide(),this.clearTimeout(this.Jc)}Gc(){this.Jc=this.setTimeout(this.Xc,4e3)}Qc(){this.clearTimeout(this.Jc)}dispose(){this.Xc(),this.off(this.player(),"contextmenu",this.Wc),this.el().removeEventListener("mousedown",Vc,!0),this.off(h,"mousedown",this.Xc),this.off("mouseout",this.Gc),this.off("mouseover",this.Qc),super.dispose()}constructor(t,i){super(t,i),this.Jc=0,this.on(this.player(),"contextmenu",this.Wc),this.el().addEventListener("mousedown",Vc,!0),this.on(h,"mousedown",this.Xc),this.on("mouseout",this.Gc),this.on("mouseover",this.Qc),this.Xc()}};function Vc(t){t.stopPropagation()}Bi((function(t){const i=new Oc(t.lo,{});t.lo.addChild(i),t.lo.on("dispose",(()=>{t.lo.removeChild(i),i.dispose()}))})),f(),f(),f(),f();var Lc={Default:"","Monospaced Serif":B.Yc,"Proportional Serif":B.Kc,"Monospaced Sans-Serif":B.Zc,"Proportional Sans-Serif":B.tl},Hc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},qc=[50,75,100,150,200];function zc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map((i=>({label:i,value:t[i]})))}qc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Gc=qc.map((function(t){return{label:t+"%",value:t+"%"}})),Xc=[25,50,75,100].map(zc),Jc=[0,25,50,75,100].map(zc),Qc=Wc(Hc),Yc=Wc(Lc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000";f();var el=class extends Qa{il(){let t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",ii(this.nl.el(),"theo-subtitle-options-menu-item"),this.nl.el().appendChild(this.Rr),this.nl.el().appendChild(i),i}rl(t){const i=this.Pr(t);i&&this.hl(i)}ol(){return this.Cr}Ir(t){this.al(t.Er)}hl(t){for(let t of this.Mr.menuItems)t.selected(!1);t?(t.selected(!0),this.cl(t.Er.label)):this.cl("Custom")}cl(t){this.ll=t,d(this.dl,this.Ur.localize(t)),this.nl.parentMenu.re()}Nr(t){let i=super.Nr(t);return ii(i.el(),"theo-subtitle-options-menu-item"),this.Dr(i),i}Dr(t){const i=this.Ur.localize(t.Er.label);d(t.el(),i);const s=this.Ur.localize("Set "+this.sl+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.nl=t,this.Ur=e,this.ll="",this.te=()=>{let t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),d(this.Rr,t),this.cl(this.ll);for(const t of this.Ar)this.Dr(t)},this.sl=i,this.al=s.fl,this.dl=this.il(),this.Cr=s.vl,this.Ur.on("languagechange",this.te)}};f();var nl=class t{static pl(t,i,s,e){if(void 0===t&&void 0===i)return;return q(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.ml=i,this.gl=t=>{this.ml.fontFamily=t.value},this.yl=t=>{this.ml.fontSize=t.value},this.bl=i=>{this.kl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this._l=i=>{this.wl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this.xl=i=>{this.Cl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.jl=i=>{this.Sl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.Tl=i=>{this.Ml=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.Pl=i=>{this.Al=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.El=t=>{this.ml.edgeStyle=t.value}}};f();var rl=class{Nl(t,i){const s=this.Il(t,i.ol());s&&i.rl(s)}Il(t,i){return $(i,(i=>i.value===t))}Bl(t,i,s){let e,n;if(void 0===t)e=this.Il(void 0,i.ol()),n=this.Il(void 0,s.ol());else if(t){let r=function(t){let i=L(t);i||(i=L(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=D(R(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=D(R(Hc[s]),1)}return i}(t);if(r){let t=O(r),h=100*r.Fl;e=this.Il(t,i.ol()),n=this.Il(h,s.ol())}}e&&i.rl(e),n&&s.rl(n)}constructor(t,i){this.ml=t,this.Dl=i,this.$l=()=>{let t=this.ml.fontFamily;this.Nl(t,this.Dl["Font family"]);let i=this.ml.fontColor;this.Bl(i,this.Dl["Font color"],this.Dl["Font opacity"]);let s=this.ml.fontSize;this.Nl(s,this.Dl["Font size"]);let e=this.ml.backgroundColor;this.Bl(e,this.Dl["Background color"],this.Dl["Background opacity"]);let n=this.ml.windowColor;this.Bl(n,this.Dl["Window color"],this.Dl["Window opacity"]);let r=this.ml.edgeStyle;this.Nl(r,this.Dl["Character edge style"])},this.ml.addEventListener("change",this.$l),this.$l()}};var hl=class extends Qa{Rl(){return{"Font family":{vl:ol(Yc),fl:this.Ul.gl},"Font color":{vl:ol(Qc),fl:this.Ul._l},"Font opacity":{vl:ol(Xc),fl:this.Ul.bl},"Font size":{vl:ol(Gc),fl:this.Ul.yl},"Background color":{vl:ol(Qc),fl:this.Ul.xl},"Background opacity":{vl:ol(Jc),fl:this.Ul.jl},"Window color":{vl:ol(Qc),fl:this.Ul.Tl},"Window opacity":{vl:ol(Jc),fl:this.Ul.Pl},"Character edge style":{vl:ol(Kc),fl:this.Ul.El}}}Ol(){this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",this.Vl=h.createElement("span"),this.Vl.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(this.Vl),this.te()}Nr(t){let i=this.Mr.addSubMenuItem();return i.Er=t,this.Dl[t]=new el(i,t,this.Ll[t],this.Ur),i}Dr(t){}Ir(t){}Re(){this.Ur.off("languagechange",this.te),this.Hl.removeEventListener(["addtrack","removetrack"],this.ql),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Gr=t,this.Hl=i,this.Ur=e,this.Dl={},this.ql=()=>{this.Hl.some((t=>T(t.kind)))?this.Gr.show():this.Gr.hide()},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitle Options")),d(this.Rr,this.Ur.localize("Subtitle")),d(this.Vl,this.Ur.localize("Options")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the subtitle options menu"))},this.Ul=new nl(s),this.Ll=this.Rl(),this.Cr=w.keys(this.Ll),this.Ol(),this.zl=new rl(s,this.Dl),this.Ur.on("languagechange",this.te),this.Hl.addEventListener(["addtrack","removetrack"],this.ql),this.ql()}};function ol(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}Bi((function(t){const i=t.lo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.wa,t.Wl.wa,t.lo);t.lo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))})),f(),f();var al=Po.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=Ti({},al.prototype.h,{children:[]}),Po.registerComponent("AdControlPanel",ul),f(),f();var cl=Po.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Gl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.na=t,this.eu=i,this.te=()=>{const t=this.eu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&d(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.na.localize(t))))},this.po=t.el(),this.Gl(i,i.ads),this.on(t,"languagechange",this.te)}};f();var fl=Po.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return Rt}createEl(t,i,s){return this.h.wa.element.querySelector("."+Rt)}emitTapEvents(){}te(){d(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),d(this.el(),t.localize("Learn more")),this.eu=i.wa,this.po=t.el(),this.on(t,"languagechange",this.te)}};Bi((function(t){if(t.wa.ads&&t.Xl){const i=t.lo,s=new dl(i,t.wa);i.adControlBar.addChild(s);if(t.wa.element.querySelector("."+Rt)){const s=new vl(i,{wa:t.wa});i.adControlBar.addChild(s)}}})),f(),f();var pl=Po.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Uo(pl)){createEl(){let t=super.createEl();return this.qualityLabel=Po.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),ui(this.qualityLabel),t}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=void 0),this.ws.videoTracks.removeEventListener(ml,this.ah),super.dispose()}constructor(t,i){super(t,i),this.Jr=void 0,this.ah=()=>{const t=Wa(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Jl),this.Jl())},this.Jl=()=>{const t=this.Jr&&this.Jr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(d(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(ml,this.ah),this.ah())}};Po.registerComponent("activeQualityLabel",gl),f(),f();var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Uo(fa)){createEl(){const t=Po.createEl("div",{className:yl});return this.notificationText=Po.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}Ql(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e];let r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Yl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.Kl();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.Kl();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.Kl():this.Zl(i)}Zl(t){this.td!==t&&(d(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.td=t,this.show())}Kl(){this.td=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.td=NaN,this.handleTimeUpdate=()=>{this.Yl()},this.handleAdEvent=()=>{this.Ql(),this.Yl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(bl,this.handleAdEvent))}};Po.registerComponent("upcomingAdNotificationText",kl),f(),f();var wl=Po.getComponent("Component");Po.registerComponent("UplynkAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get sd(){return this.h.adBreakProvider()}te(t,i){if(this.sd&&this.sd.endTime){const s=_.max(this.sd.endTime-t,0);d(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.ed)}}),f();var _l=Po.getComponent("ClickableComponent");Po.registerComponent("UplynkAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.nd=h.createElement("span"),t.appendChild(this.nd),this.te(t,this.nd),t}handleClick(){this.h.skipCallback()}te(t,i){this.rd<=kt.ad.od?(ei(t,"theoplayer-ad-skip-countdown"),ii(t,"theoplayer-ad-skip-button"),d(i,"Skip ads")):d(i,"Skip ads in "+_.ceil(this.rd)+"s")}get rd(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.el(),this.nd)},this.on(t,"timeupdate",this.ed)}}),f(),f();var xl=Po.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};Po.registerComponent("UplynkAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-adbreak"}}),f(),f();var Sl=Po.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};Po.registerComponent("UplynkAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-adbreak"}}),f();Po.registerComponent("UplynkAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-asset"}}),f();Po.registerComponent("UplynkAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-asset"}}),f();var Tl=Po.getComponent("Component");Po.registerComponent("UplynkContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-uplynk-content-notification-bar";return t+(Dt.su||Dt.ud?" "+t+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Ml=Po.getComponent("Component");function Al(t,i){const s=t.uplynk;return Boolean(t&&void 0===s)||Boolean(t&&s&&void 0===s.ui)||Boolean(t&&s&&s.ui&&void 0===s.ui[i])||Boolean(t&&s&&s.ui&&!0===s.ui[i])}Po.registerComponent("UplynkContentNotification",class extends Ml{get ld(){return this.h.asset}buildCSSClass(){return"theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}yo(){const t=h.createElement("img");t.src=this.ld.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.ld.description);d(i,s),this.el().appendChild(i),this.dd=h.createElement("div"),this.dd.className=this.buildCSSClass()+"-countdown",d(this.dd,this.fd),this.el().appendChild(this.dd)}get fd(){const t=_.min(10,this.vd);return"Starting in "+_.ceil(t)+" seconds"}get vd(){return _.max(0,this.ld.startTime-this.player().currentTime())}pd(){const t=this.vd;t>10||t<=0?this.hide():(d(this.dd,this.fd),this.show())}constructor(t,i){super(t,i),this.yo(),this.on(t,"timeupdate",this.pd),this.hide()}}),f(),Ni((function(t){return class extends t{get md(){return this.lo.controlBar.progressControl.seekBar}Ca(t){this.gd=!1,this.wa.removeEventListener("timeupdate",this.yd),this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton"),this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.removeChild("UplynkAssetMarkerBar"),this.lo.removeChild("UplynkContentNotificationBar"),super.Ca(t)}bd(){if(!function(t){return Al(t,"assetMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAssetMarkerBar"),this.md.addChild("UplynkAssetMarkerBar",{children:t})}wd(){if(!function(t){return Al(t,"contentNotification")}(this.kd))return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkContentNotification",asset:t})));this.lo.removeChild("UplynkContentNotificationBar"),this.lo.addChild("UplynkContentNotificationBar",{children:t})}yn(){this.wa.removeEventListener("timeupdate",this.yd);const t=this.wa.uplynk;null==t||t.ads.adBreaks.removeEventListener("addadbreak",this._d),null==t||t.ads.adBreaks.removeEventListener("removeadbreak",this.xd),null==t||t.assets.removeEventListener("addasset",this.Cd),null==t||t.assets.removeEventListener("removeasset",this.Cd),this.wa.removeEventListener("loadeddata",this.Sd),super.yn()}constructor(t,i,s){super(t,i,s),this.gd=!1,this.Sd=()=>{this.gd=!0,isFinite(this.jd())||this.wa.addEventListener("timeupdate",this.yd),this.yd(),this.bd(),this.wd()},this._d=t=>{t.adBreak.addEventListener("adbreakbegin",this.Td),t.adBreak.addEventListener("adbreakend",this.Md),this.yd()},this.xd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Td),t.adBreak.removeEventListener("adbreakend",this.Md),this.yd()},this.yd=()=>{if(!function(t){return Al(t,"adBreakMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk,i=null==t?void 0:t.ads.adBreaks.map((t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.addChild("UplynkAdBreakMarkerBar",{children:i})},this.Td=()=>{if(function(t){return Al(t,"adNotification")}(this.kd)){const t=this.wa.uplynk,i=t.ads.currentAdBreak;this.lo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Pd}),-1!==i.skipOffset&&this.lo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},this.Pd=()=>this.wa.uplynk.ads.currentAdBreak,this.Md=()=>{this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton")},this.Cd=()=>{this.bd(),this.wd()};const e=this.wa.uplynk;null==e||e.ads.adBreaks.addEventListener("addadbreak",this._d),null==e||e.ads.adBreaks.addEventListener("removeadbreak",this.xd),null==e||e.assets.addEventListener("addasset",this.Cd),null==e||e.assets.addEventListener("removeasset",this.Cd),this.wa.addEventListener("loadeddata",this.Sd)}}}));export{ut as ChromelessPlayer,st as ErrorCategory,tt as ErrorCode,Uu as Player,Ft as cache,Pt as cast,ft as features,gt as players,bt as registerContentProtectionIntegration,lt as utils,pt as version,Po as videojs};