Matthew Welch
308b1e1791
The project structure has been changed to make it more manageable and modular. A search feature has been added to the comics page.
12 lines
223 KiB
JavaScript
12 lines
223 KiB
JavaScript
/**
|
||
* @license
|
||
* Video.js 7.6.0 <http://videojs.com/>
|
||
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
|
||
* Available under Apache License Version 2.0
|
||
* <https://github.com/videojs/video.js/blob/master/LICENSE>
|
||
*
|
||
* Includes vtt.js <https://github.com/mozilla/vtt.js>
|
||
* Available under Apache License Version 2.0
|
||
* <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
|
||
*/
|
||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(h,d){h=h&&h.hasOwnProperty("default")?h.default:h,d=d&&d.hasOwnProperty("default")?d.default:d;var p="7.6.0";function f(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t,n){return(s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t){return t=t||e.slice(0),e.raw=t,e}var l=[],e=function(s,a){return function(e,t,n){var r=a.levels[t],i=new RegExp("^("+r+")$");if("log"!==e&&n.unshift(e.toUpperCase()+":"),n.unshift(s+":"),l&&l.push([].concat(n)),h.console){var o=h.console[e];o||"debug"!==e||(o=h.console.info||h.console.log),o&&r&&i.test(e)&&o[Array.isArray(n)?"apply":"call"](h.console,n)}}};var y=function t(n){function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i("log",o,t)}var i,o="info";return i=e(n,r),r.createLogger=function(e){return t(n+": "+e)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:o},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');o=e}return o},(r.history=function(){return l?[].concat(l):[]}).filter=function(t){return(l||[]).filter(function(e){return new RegExp(".*"+t+".*").test(e[0])})},r.history.clear=function(){l&&(l.length=0)},r.history.disable=function(){null!==l&&(l.length=0,l=null)},r.history.enable=function(){null===l&&(l=[])},r.error=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i("error",o,t)},r.warn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i("warn",o,t)},r.debug=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i("debug",o,t)},r}("VIDEOJS"),g=y.createLogger;var m=function(e){for(var t="",n=0;n<arguments.length;n++)t+=e[n].replace(/\n\r?\s*/g,"")+(arguments[n+1]||"");return t},n=Object.prototype.toString,a=function(e){return b(e)?Object.keys(e):[]};function i(t,n){a(t).forEach(function(e){return n(t[e],e)})}function _(n){for(var e=arguments.length,t=new Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[n].concat(t)):(t.forEach(function(e){e&&i(e,function(e,t){n[t]=e})}),n)}function b(e){return!!e&&"object"==typeof e}function c(e){return b(e)&&"[object Object]"===n.call(e)&&e.constructor===Object}function r(e,t){if(!e||!t)return"";if("function"!=typeof h.getComputedStyle)return"";var n=h.getComputedStyle(e);return n?n[t]:""}function u(){var e=t(["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 ","."]);return u=function(){return e},e}function T(e){return"string"==typeof e&&/\S/.test(e)}function k(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function C(){return d===h.document}function E(e){return b(e)&&1===e.nodeType}function w(){try{return h.parent!==h.self}catch(e){return!0}}function S(r){return function(e,t){if(!T(e))return d[r](null);T(t)&&(t=d.querySelector(t));var n=E(t)?t:d;return n[r]&&n[r](e)}}function x(e,n,t,r){void 0===e&&(e="div"),void 0===n&&(n={}),void 0===t&&(t={});var i=d.createElement(e);return Object.getOwnPropertyNames(n).forEach(function(e){var t=n[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(y.warn(m(u(),e,t)),i.setAttribute(e,t)):"textContent"===e?P(i,t):i[e]=t}),Object.getOwnPropertyNames(t).forEach(function(e){i.setAttribute(e,t[e])}),r&&q(i,r),i}function P(e,t){return"undefined"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function A(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function j(e,t){return k(t),e.classList?e.classList.contains(t):function(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}(t).test(e.className)}function I(e,t){return e.classList?e.classList.add(t):j(e,t)||(e.className=(e.className+" "+t).trim()),e}function O(e,t){return e.classList?e.classList.remove(t):(k(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function D(e,t,n){var r=j(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?I(e,t):O(e,t),e}function M(n,r){Object.getOwnPropertyNames(r).forEach(function(e){var t=r[e];null===t||"undefined"==typeof t||!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})}function N(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&0<e.attributes.length)for(var r=e.attributes,i=r.length-1;0<=i;i--){var o=r[i].name,s=r[i].value;"boolean"!=typeof e[o]&&-1===n.indexOf(","+o+",")||(s=null!==s),t[o]=s}return t}function L(e,t){return e.getAttribute(t)}function R(e,t,n){e.setAttribute(t,n)}function F(e,t){e.removeAttribute(t)}function B(){d.body.focus(),d.onselectstart=function(){return!1}}function V(){d.onselectstart=function(){return!0}}function $(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(n[e]=t[e])}),n.height||(n.height=parseFloat(r(e,"height"))),n.width||(n.width=parseFloat(r(e,"width"))),n}}function H(e){var t;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var n=d.documentElement,r=d.body,i=n.clientLeft||r.clientLeft||0,o=h.pageXOffset||r.scrollLeft,s=t.left+o-i,a=n.clientTop||r.clientTop||0,l=h.pageYOffset||r.scrollTop,c=t.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function U(e,t){var n={},r=H(e),i=e.offsetWidth,o=e.offsetHeight,s=r.top,a=r.left,l=t.pageY,c=t.pageX;return t.changedTouches&&(c=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-l+o)/o)),n.x=Math.max(0,Math.min(1,(c-a)/i)),n}function W(e){return b(e)&&3===e.nodeType}function z(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function K(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),E(e)||W(e)?e:"string"==typeof e&&/\S/.test(e)?d.createTextNode(e):void 0}).filter(function(e){return e})}function q(t,e){return K(e).forEach(function(e){return t.appendChild(e)}),t}function X(e,t){return q(z(e),t)}function G(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var Y=S("querySelector"),Q=S("querySelectorAll"),J=Object.freeze({isReal:C,isEl:E,isInFrame:w,createEl:x,textContent:P,prependTo:A,hasClass:j,addClass:I,removeClass:O,toggleClass:D,setAttributes:M,getAttributes:N,getAttribute:L,setAttribute:R,removeAttribute:F,blockTextSelection:B,unblockTextSelection:V,getBoundingClientRect:$,findPosition:H,getPointerPosition:U,isTextNode:W,emptyEl:z,normalizeContent:K,appendContent:q,insertContent:X,isSingleLeftClick:G,$:Y,$$:Q}),Z=1;function ee(){return Z++}var te={},ne="vdata"+Math.floor(h.performance&&h.performance.now()||Date.now());function re(e){var t=e[ne];return t=t||(e[ne]=ee()),te[t]||(te[t]={}),te[t]}function ie(e){var t=e[ne];return!!t&&!!Object.getOwnPropertyNames(te[t]).length}function oe(t){var e=t[ne];if(e){delete te[e];try{delete t[ne]}catch(e){t.removeAttribute?t.removeAttribute(ne):t[ne]=null}}}function se(e,t){var n=re(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&oe(e)}function ae(t,n,e,r){e.forEach(function(e){t(n,e,r)})}function le(e){function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||h.event;for(var i in e={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(e[i]=r[i]));if(e.target||(e.target=e.srcElement||d),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=d.documentElement,s=d.body;e.pageX=e.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var ce=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){ce=!0}});h.addEventListener("test",null,e),h.removeEventListener("test",null,e)}catch(e){}}();var ue=["touchstart","touchmove"];function he(s,e,t){if(Array.isArray(e))return ae(he,s,e,t);var a=re(s);if(a.handlers||(a.handlers={}),a.handlers[e]||(a.handlers[e]=[]),t.guid||(t.guid=ee()),a.handlers[e].push(t),a.dispatcher||(a.disabled=!1,a.dispatcher=function(e,t){if(!a.disabled){e=le(e);var n=a.handlers[e.type];if(n)for(var r=n.slice(0),i=0,o=r.length;i<o&&!e.isImmediatePropagationStopped();i++)try{r[i].call(s,e,t)}catch(e){y.error(e)}}}),1===a.handlers[e].length)if(s.addEventListener){var n=!1;ce&&-1<ue.indexOf(e)&&(n={passive:!0}),s.addEventListener(e,a.dispatcher,n)}else s.attachEvent&&s.attachEvent("on"+e,a.dispatcher)}function de(e,t,n){if(ie(e)){var r=re(e);if(r.handlers){if(Array.isArray(t))return ae(de,e,t,n);function i(e,t){r.handlers[t]=[],se(e,t)}if(void 0!==t){var o=r.handlers[t];if(o)if(n){if(n.guid)for(var s=0;s<o.length;s++)o[s].guid===n.guid&&o.splice(s--,1);se(e,t)}else i(e,t)}else for(var a in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},a)&&i(e,a)}}}function pe(e,t,n){var r=ie(e)?re(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=le(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)pe.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){var o=re(t.target);t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)}return!t.defaultPrevented}function fe(e,t,n){if(Array.isArray(t))return ae(fe,e,t,n);function r(){de(e,t,r),n.apply(this,arguments)}r.guid=n.guid=n.guid||ee(),he(e,t,r)}function ve(e,t,n){function r(){de(e,t,r),n.apply(this,arguments)}r.guid=n.guid=n.guid||ee(),he(e,t,r)}var ye,ge=Object.freeze({fixEvent:le,on:he,off:de,trigger:pe,one:fe,any:ve}),me=!1,_e=function(){if(C()&&!1!==ye.options.autoSetup){var e=Array.prototype.slice.call(d.getElementsByTagName("video")),t=Array.prototype.slice.call(d.getElementsByTagName("audio")),n=Array.prototype.slice.call(d.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&0<r.length)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(!s||!s.getAttribute){be(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&ye(s)}else me||be(1)}};function be(e,t){t&&(ye=t),h.setTimeout(_e,e)}C()&&"complete"===d.readyState?me=!0:fe(h,"load",function(){me=!0});function Te(e){var t=d.createElement("style");return t.className=e,t}function ke(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t}function Ce(e,t,n){function r(){return t.apply(e,arguments)}return t.guid||(t.guid=ee()),r.guid=n?n+"_"+t.guid:t.guid,r}function Ee(t,n){var r=h.performance.now();return function(){var e=h.performance.now();n<=e-r&&(t.apply(void 0,arguments),r=e)}}function we(){}var Se;we.prototype.allowedEvents_={},we.prototype.addEventListener=we.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},he(this,e,t),this.addEventListener=n},we.prototype.removeEventListener=we.prototype.off=function(e,t){de(this,e,t)},we.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},fe(this,e,t),this.addEventListener=n},we.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},ve(this,e,t),this.addEventListener=n},we.prototype.dispatchEvent=we.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=le(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),pe(this,e)},we.prototype.queueTrigger=function(e){var t=this;Se=Se||new Map;var n=e.type||e,r=Se.get(this);r||(r=new Map,Se.set(this,r));var i=r.get(n);r.delete(n),h.clearTimeout(i);var o=h.setTimeout(function(){0===r.size&&(r=null,Se.delete(t)),t.trigger(e)},0);r.set(n,o)};function xe(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length}function Pe(e){if(!e.nodeName&&!De(e))throw new Error("Invalid target; must be a DOM node or evented object.")}function Ae(e){if(!xe(e))throw new Error("Invalid event type; must be a non-empty string or array.")}function je(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")}function Ie(e,t){var n,r,i,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return i=o?(n=e.eventBusEl_,3<=t.length&&t.shift(),r=t[0],t[1]):(n=t[0],r=t[1],t[2]),Pe(n),Ae(r),je(i),{isTargetingSelf:o,target:n,type:r,listener:i=Ce(e,i)}}function Oe(e,t,n,r){Pe(e),e.nodeName?ge[t](e,n,r):e[t](n,r)}var De=function(t){return t instanceof we||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},Me={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=Ie(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(Oe(s,"on",a,l),!o){function c(){return e.off(s,a,l)}c.guid=l.guid;function u(){return e.off("dispose",c)}u.guid=l.guid,Oe(this,"on","dispose",c),Oe(s,"on","dispose",u)}},one:function(){for(var r=this,e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=Ie(this,t),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(o)Oe(s,"one",a,l);else{function c(){r.off(s,a,c);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.apply(null,t)}c.guid=l.guid,Oe(s,"one",a,c)}},any:function(){for(var r=this,e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=Ie(this,t),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(o)Oe(s,"any",a,l);else{function c(){r.off(s,a,c);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];l.apply(null,t)}c.guid=l.guid,Oe(s,"any",a,c)}},off:function(e,t,n){if(!e||xe(e))de(this.eventBusEl_,e,t);else{var r=e,i=t;Pe(r),Ae(i),je(n),n=Ce(this,n),this.off("dispose",n),r.nodeName?(de(r,i,n),de(r,"dispose",n)):De(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return pe(this.eventBusEl_,e,t)}};function Ne(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=x("span",{className:"vjs-event-bus"});return _(e,Me),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),h.setTimeout(function(){e.eventBusEl_=null},0)}),e}var Le={state:{},setState:function(e){var n,r=this;return"function"==typeof e&&(e=e()),i(e,function(e,t){r.state[t]!==e&&((n=n||{})[t]={from:r.state[t],to:e}),r.state[t]=e}),n&&De(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function Re(e,t){return _(e,Le),e.state=_({},e.state,t),"function"==typeof e.handleStateChanged&&De(e)&&e.on("statechanged",e.handleStateChanged),e}function Fe(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function Be(){for(var n={},e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.forEach(function(e){e&&i(e,function(e,t){c(e)?(c(n[t])||(n[t]={}),n[t]=Be(n[t],e)):n[t]=e})}),n}var Ve=function(){function c(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.parentComponent_=null,this.options_=Be({},this.options_),t=this.options_=Be(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+ee()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&Ne(this,{eventBusKey:this.el_?"el_":null}),Re(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},!(this.childNameIndex_={})!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var e=c.prototype;return e.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),oe(this.el_),this.el_=null),this.player_=null},e.player=function(){return this.player_},e.options=function(e){return e&&(this.options_=Be(this.options_,e)),this.options_},e.el=function(){return this.el_},e.createEl=function(e,t,n){return x(e,t,n)},e.localize=function(e,i,t){void 0===t&&(t=e);var n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),o=r&&r[n],s=n&&n.split("-")[0],a=r&&r[s],l=t;return o&&o[e]?l=o[e]:a&&a[e]&&(l=a[e]),i&&(l=l.replace(/\{(\d+)\}/g,function(e,t){var n=i[t-1],r=n;return"undefined"==typeof n&&(r=e),r})),l},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(e){return this.childIndex_[e]},e.getChild=function(e){if(e)return e=Fe(e),this.childNameIndex_[e]},e.addChild=function(e,t,n){var r,i;if(void 0===t&&(t={}),void 0===n&&(n=this.children_.length),"string"==typeof e){i=Fe(e);var o=t.componentClass||i;t.name=i;var s=c.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!=typeof s)return null;r=new s(this.player_||this,t)}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(n,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(i=i||r.name&&Fe(r.name()))&&(this.childNameIndex_[i]=r),"function"==typeof r.el&&r.el()){var a=this.contentEl().children[n]||null;this.contentEl().insertBefore(r.el(),a)}return r},e.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;0<=n;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.initChildren=function(){var i=this,r=this.options_.children;if(r){var e,o=this.options_,n=c.getComponent("Tech");(e=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter(function(t){return!e.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(e){var t,n;return n="string"==typeof e?r[t=e]||i.options_[t]||{}:(t=e.name,e),{name:t,opts:n}}).filter(function(e){var t=c.getComponent(e.opts.componentClass||Fe(e.name));return t&&!n.isTech(t)}).forEach(function(e){var t=e.name,n=e.opts;if(void 0!==o[t]&&(n=o[t]),!1!==n){!0===n&&(n={}),n.playerOptions=i.options_.playerOptions;var r=i.addChild(t,n);r&&(i[t]=r)}})}},e.buildCSSClass=function(){return""},e.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0<e.length&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},e.$=function(e,t){return Y(e,t||this.contentEl())},e.$$=function(e,t){return Q(e,t||this.contentEl())},e.hasClass=function(e){return j(this.el_,e)},e.addClass=function(e){I(this.el_,e)},e.removeClass=function(e){O(this.el_,e)},e.toggleClass=function(e,t){D(this.el_,e,t)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(e){return L(this.el_,e)},e.setAttribute=function(e,t){R(this.el_,e,t)},e.removeAttribute=function(e){F(this.el_,e)},e.width=function(e,t){return this.dimension("width",e,t)},e.height=function(e,t){return this.dimension("height",e,t)},e.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+Fe(e)],10)},e.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof h.getComputedStyle){var n=h.getComputedStyle(this.el_);t=n.getPropertyValue(e)||n[e]}if(0===(t=parseFloat(t))){var r="offset"+Fe(e);t=this.el_[r]}return t},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},e.handleKeyPress=function(e){this.handleKeyDown(e)},e.emitTapEvents=function(){var r,t=0,i=null;this.on("touchstart",function(e){1===e.touches.length&&(i={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},t=h.performance.now(),r=!0)}),this.on("touchmove",function(e){if(1<e.touches.length)r=!1;else if(i){var t=e.touches[0].pageX-i.pageX,n=e.touches[0].pageY-i.pageY;10<Math.sqrt(t*t+n*n)&&(r=!1)}});function e(){r=!1}this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",function(e){!(i=null)===r&&h.performance.now()-t<200&&(e.preventDefault(),this.trigger("tap"))})},e.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,n=Ce(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){n(),this.clearInterval(t),t=this.setInterval(n,250)});function e(e){n(),this.clearInterval(t)}this.on("touchmove",n),this.on("touchend",e),this.on("touchcancel",e)}},e.setTimeout=function(e,t){var n,r,i=this;return e=Ce(this,e),n=h.setTimeout(function(){i.off("dispose",r),e()},t),(r=function(){return i.clearTimeout(n)}).guid="vjs-timeout-"+n,this.on("dispose",r),n},e.clearTimeout=function(e){h.clearTimeout(e);function t(){}return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.setInterval=function(e,t){var n=this;e=Ce(this,e);function r(){return n.clearInterval(i)}var i=h.setInterval(e,t);return r.guid="vjs-interval-"+i,this.on("dispose",r),i},e.clearInterval=function(e){h.clearInterval(e);function t(){}return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.requestAnimationFrame=function(e){var t,n,r=this;return this.supportsRaf_?(e=Ce(this,e),t=h.requestAnimationFrame(function(){r.off("dispose",n),e()}),(n=function(){return r.cancelAnimationFrame(t)}).guid="vjs-raf-"+t,this.on("dispose",n),t):this.setTimeout(e,1e3/60)},e.cancelAnimationFrame=function(e){if(this.supportsRaf_){h.cancelAnimationFrame(e);function t(){}return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},c.registerComponent=function(e,t){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n,r=c.getComponent("Tech"),i=r&&r.isTech(t),o=c===t||c.prototype.isPrototypeOf(t.prototype);if(i||!o)throw n=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+n+".");e=Fe(e),c.components_||(c.components_={});var s=c.getComponent("Player");if("Player"===e&&s&&s.players){var a=s.players,l=Object.keys(a);if(a&&0<l.length&&l.map(function(e){return a[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return c.components_[e]=t},c.getComponent=function(e){if(e)return e=Fe(e),c.components_&&c.components_[e]?c.components_[e]:void 0},c}();Ve.prototype.supportsRaf_="function"==typeof h.requestAnimationFrame&&"function"==typeof h.cancelAnimationFrame,Ve.registerComponent("Component",Ve);var $e,He,Ue,We,ze=h.navigator&&h.navigator.userAgent||"",Ke=/AppleWebKit\/([\d.]+)/i.exec(ze),qe=Ke?parseFloat(Ke.pop()):null,Xe=/iPad/i.test(ze),Ge=/iPhone/i.test(ze)&&!Xe,Ye=/iPod/i.test(ze),Qe=Ge||Xe||Ye,Je=($e=ze.match(/OS (\d+)_/i))&&$e[1]?$e[1]:null,Ze=/Android/i.test(ze),et=function(){var e=ze.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),tt=Ze&&et<5&&qe<537,nt=/Firefox/i.test(ze),rt=/Edge/i.test(ze),it=!rt&&(/Chrome/i.test(ze)||/CriOS/i.test(ze)),ot=(He=ze.match(/(Chrome|CriOS)\/(\d+)/))&&He[2]?parseFloat(He[2]):null,st=(Ue=/MSIE\s(\d+)\.\d/.exec(ze),!(We=Ue&&parseFloat(Ue[1]))&&/Trident\/7.0/i.test(ze)&&/rv:11.0/.test(ze)&&(We=11),We),at=/Safari/i.test(ze)&&!it&&!Ze&&!rt,lt=(at||Qe)&&!it,ct=/Windows/i.test(ze),ut=C()&&("ontouchstart"in h||h.navigator.maxTouchPoints||h.DocumentTouch&&h.document instanceof h.DocumentTouch),ht=Object.freeze({IS_IPAD:Xe,IS_IPHONE:Ge,IS_IPOD:Ye,IS_IOS:Qe,IOS_VERSION:Je,IS_ANDROID:Ze,ANDROID_VERSION:et,IS_NATIVE_ANDROID:tt,IS_FIREFOX:nt,IS_EDGE:rt,IS_CHROME:it,CHROME_VERSION:ot,IE_VERSION:st,IS_SAFARI:at,IS_ANY_SAFARI:lt,IS_WINDOWS:ct,TOUCH_ENABLED:ut});function dt(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||n<t)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function pt(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:dt.bind(null,"start",0,e),end:dt.bind(null,"end",1,e)}}function ft(e,t){return Array.isArray(e)?pt(e):void 0===e||void 0===t?pt():pt([[e,t]])}function vt(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=ft(0,0));for(var o=0;o<e.length;o++)n=e.start(o),t<(r=e.end(o))&&(r=t),i+=r-n;return i/t}for(var yt,gt={prefixed:!0},mt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],_t=mt[0],bt=0;bt<mt.length;bt++)if(mt[bt][1]in d){yt=mt[bt];break}if(yt){for(var Tt=0;Tt<yt.length;Tt++)gt[_t[Tt]]=yt[Tt];gt.prefixed=yt[0]!==_t[0]}function kt(e){if(e instanceof kt)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:b(e)&&("number"==typeof e.code&&(this.code=e.code),_(this,e)),this.message||(this.message=kt.defaultMessages[this.code]||"")}kt.prototype.code=0,kt.prototype.message="",kt.prototype.status=null,kt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],kt.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."};for(var Ct=0;Ct<kt.errorTypes.length;Ct++)kt[kt.errorTypes[Ct]]=Ct,kt.prototype[kt.errorTypes[Ct]]=Ct;var Et=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]};function wt(e){return null!=e&&"function"==typeof e.then}function St(e){wt(e)&&e.then(null,function(e){})}function xt(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,t,n){return r[t]&&(e[t]=r[t]),e},{cues:r.cues&&Array.prototype.map.call(r.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})}var Pt=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=xt(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===n.indexOf(e)}).map(xt))},At=function(e,n){return e.forEach(function(e){var t=n.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return t.addCue(e)})}),n.textTracks()};function jt(e,t){return e(t={exports:{}},t.exports),t.exports}var It=jt(function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var n,r=String(e);return(n=i[r.toLowerCase()])?n:(n=o[r.toLowerCase()])||(1===r.length?r.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var r;if(r=i[t.toLowerCase()])return r===n;if(r=o[t.toLowerCase()])return r===n}else if("number"==typeof t)return t===n;return!1}};var i=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(r=97;r<123;r++)i[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)i[r-48]=r;for(r=1;r<13;r++)i["f"+r]=r+111;for(r=0;r<10;r++)i["numpad "+r]=r+96;var s=t.names=t.title={};for(r in i)s[i[r]]=r;for(var a in o)i[a]=o[a]}),Ot=(It.code,It.codes,It.aliases,It.names,It.title,"vjs-modal-dialog"),Dt=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=x("div",{className:Ot+"-content"},{role:"document"}),n.descEl_=x("p",{className:Ot+"-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),P(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,r.prototype.dispose.call(this)},t.buildCSSClass=function(){return Ot+" vjs-hidden "+r.prototype.buildCSSClass.call(this)},t.label=function(){return this.localize(this.options_.label||"Modal Window")},t.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},t.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},t.fill=function(){this.fillWith(this.content())},t.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),X(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},t.empty=function(){this.trigger("beforemodalempty"),z(this.contentEl()),this.trigger("modalempty")},t.content=function(e){return"undefined"!=typeof e&&(this.content_=e),this.content_},t.conditionalFocus_=function(){var e=d.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,!t.contains(e)&&t!==e||(this.previouslyActiveEl_=e,this.focus())},t.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},t.handleKeyDown=function(e){if(e.stopPropagation(),It.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(It.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}d.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},t.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof h.HTMLAnchorElement||e instanceof h.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof h.HTMLInputElement||e instanceof h.HTMLSelectElement||e instanceof h.HTMLTextAreaElement||e instanceof h.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof h.HTMLIFrameElement||e instanceof h.HTMLObjectElement||e instanceof h.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},e}(Ve);Dt.prototype.options_={pauseOnOpen:!0,temporary:!0},Ve.registerComponent("ModalDialog",Dt);var Mt=function(r){function e(e){var t;void 0===e&&(e=[]),(t=r.call(this)||this).tracks_=[],Object.defineProperty(v(t),"length",{get:function(){return this.tracks_.length}});for(var n=0;n<e.length;n++)t.addTrack(e[n]);return t}f(e,r);var t=e.prototype;return t.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this}))},t.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},t.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(we);for(var Nt in Mt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Mt.prototype.allowedEvents_)Mt.prototype["on"+Nt]=null;function Lt(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)}function Rt(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)}function Ft(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=d.createElement("a");n.href=e;var r,i=""===n.host&&"file:"!==n.protocol;i&&((r=d.createElement("div")).innerHTML='<a href="'+e+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(r));for(var o={},s=0;s<t.length;s++)o[t[s]]=n[t[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=h.location.protocol),i&&d.body.removeChild(r),o}function Bt(e){if(!e.match(/^https?:\/\//)){var t=d.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e}function Vt(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""}function $t(e){var t=h.location,n=Ft(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host}var Ht=function(r){function e(e){var t;void 0===e&&(e=[]);for(var n=e.length-1;0<=n;n--)if(e[n].enabled){Lt(e,e[n]);break}return(t=r.call(this,e)||this).changing_=!1,t}f(e,r);var t=e.prototype;return t.addTrack=function(e){var t=this;e.enabled&&Lt(this,e),r.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,Lt(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){r.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(Mt),Ut=function(r){function e(e){var t;void 0===e&&(e=[]);for(var n=e.length-1;0<=n;n--)if(e[n].selected){Rt(e,e[n]);break}return(t=r.call(this,e)||this).changing_=!1,Object.defineProperty(v(t),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),t}f(e,r);var t=e.prototype;return t.addTrack=function(e){var t=this;e.selected&&Rt(this,e),r.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){t.changing_||(t.changing_=!0,Rt(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},t.removeTrack=function(e){r.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},e}(Mt),Wt=function(n){function e(){return n.apply(this,arguments)||this}f(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;n.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return t.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return t.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},e}(Mt),zt=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),Kt=function(){function t(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var e=t.prototype;return e.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;function i(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})}if(t<r)for(n=t;n<r;n++)i.call(this,n)},e.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(),qt={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Xt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Gt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Yt={disabled:"disabled",hidden:"hidden",showing:"showing"},Qt=function(o){function e(e){var t;void 0===e&&(e={}),t=o.call(this)||this;function n(e){Object.defineProperty(v(t),e,{get:function(){return r[e]},set:function(){}})}var r={id:e.id||"vjs_track_"+ee(),kind:e.kind||"",label:e.label||"",language:e.language||""};for(var i in r)n(i);return t}return f(e,o),e}(we),Jt=Object.freeze({parseUrl:Ft,getAbsoluteURL:Bt,getFileExtension:Vt,isCrossOrigin:$t}),Zt=function(e){var t=en.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},en=Object.prototype.toString;function tn(e){var t=an.call(e),n="[object Arguments]"===t;return n=n||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===an.call(e.callee)}var nn,rn=Array.prototype.slice,on=Object.prototype.toString,sn=Function.prototype.bind||function(t){var n=this;if("function"!=typeof n||"[object Function]"!==on.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var r,i=rn.call(arguments,1),e=Math.max(0,n.length-i.length),o=[],s=0;s<e;s++)o.push("$"+s);if(r=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var e=n.apply(this,i.concat(rn.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(rn.call(arguments)))}),n.prototype){function a(){}a.prototype=n.prototype,r.prototype=new a,a.prototype=null}return r},an=Object.prototype.toString;if(!Object.keys){function ln(e){var t=e.constructor;return t&&t.prototype===e}var cn=Object.prototype.hasOwnProperty,un=Object.prototype.toString,hn=tn,dn=Object.prototype.propertyIsEnumerable,pn=!dn.call({toString:null},"toString"),fn=dn.call(function(){},"prototype"),vn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],yn={$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},gn=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!yn["$"+e]&&cn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{ln(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();nn=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===un.call(e),r=hn(e),i=t&&"[object String]"===un.call(e),o=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var s=fn&&n;if(i&&0<e.length&&!cn.call(e,0))for(var a=0;a<e.length;++a)o.push(String(a));if(r&&0<e.length)for(var l=0;l<e.length;++l)o.push(String(l));else for(var c in e)s&&"prototype"===c||!cn.call(e,c)||o.push(String(c));if(pn)for(var u=function(e){if("undefined"==typeof window||!gn)return ln(e);try{return ln(e)}catch(e){return!1}}(e),h=0;h<vn.length;++h)u&&"constructor"===vn[h]||!cn.call(e,vn[h])||o.push(vn[h]);return o}}var mn=nn,_n=Array.prototype.slice,bn=Object.keys,Tn=bn?function(e){return bn(e)}:mn,kn=Object.keys;Tn.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return tn(e)?kn(_n.call(e)):kn(e)}):Object.keys=Tn;return Object.keys||Tn};function Cn(e,t,n,r){t in e&&(!function(e){return"function"==typeof e&&"[object Function]"===xn.call(e)}(r)||!r())||(jn?An(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)}function En(e,t,n){var r=2<arguments.length?n:{},i=wn(t);Sn&&(i=Pn.call(i,Object.getOwnPropertySymbols(t)));for(var o=0;o<i.length;o+=1)Cn(e,i[o],t[i[o]],r[i[o]])}var wn=Tn,Sn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),xn=Object.prototype.toString,Pn=Array.prototype.concat,An=Object.defineProperty,jn=An&&function(){var e={};try{for(var t in An(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}();En.supportsDescriptors=!!jn;function In(e,t){if(1<arguments.length&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var n="$ "+e;if(!(n in zn))throw new SyntaxError("intrinsic "+e+" does not exist!");if("undefined"==typeof zn[n]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return zn[n]}function On(e,t,n,r){var i=Gn[t];if("function"!=typeof i)throw new Xn("unknown record type: "+t);if(!i(e,r))throw new qn(n+" must be a "+t)}function Dn(e){return 0<=e?1:-1}function Mn(e){try{var t=Zn.call(e);return er.test(t)}catch(e){return!1}}function Nn(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(nr)return function(e){try{return!Mn(e)&&(Zn.call(e),!0)}catch(e){return!1}}(e);if(Mn(e))return!1;var t=tr.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}function Ln(e){return null===e||"function"!=typeof e&&"object"!=typeof e}function Rn(){var e=lr.ToString(lr.CheckObjectCoercible(this));return cr(cr(e,ur,""),hr,"")}function Fn(){return String.prototype.trim&&""==="".trim()?String.prototype.trim:Rn}var Bn,Vn=En,$n=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,Un=Object.getPrototypeOf||function(e){return e.__proto__},Wn="undefined"==typeof Uint8Array?Bn:Un(Uint8Array),zn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Bn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Bn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Hn?Un([][Symbol.iterator]()):Bn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Bn,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":Bn,"$ %AsyncGenerator%":Bn,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":Bn,"$ %AsyncIteratorPrototype%":Bn,"$ %Atomics%":"undefined"==typeof Atomics?Bn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Bn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Bn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Bn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Bn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Bn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Bn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Bn,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":Bn,"$ %Int8Array%":"undefined"==typeof Int8Array?Bn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Bn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Bn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Bn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Bn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Bn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":Hn?Un(Un([][Symbol.iterator]())):Bn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Bn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Hn?Un((new Map)[Symbol.iterator]()):Bn,"$ %MapPrototype%":"undefined"==typeof Map?Bn:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?Bn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Bn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Bn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Bn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Bn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Bn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Bn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Bn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Bn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Hn?Un((new Set)[Symbol.iterator]()):Bn,"$ %SetPrototype%":"undefined"==typeof Set?Bn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Bn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Bn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Hn?Un(""[Symbol.iterator]()):Bn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Hn?Symbol:Bn,"$ %SymbolPrototype%":Hn?Symbol.prototype:Bn,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":$n,"$ %TypedArray%":Wn,"$ %TypedArrayPrototype%":Wn?Wn.prototype:Bn,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?Bn:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?Bn:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Bn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Bn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Bn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Bn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Bn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Bn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Bn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Bn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Bn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Bn:WeakSet.prototype},Kn=sn.call(Function.call,Object.prototype.hasOwnProperty),qn=In("%TypeError%"),Xn=In("%SyntaxError%"),Gn={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(Kn(t,r)&&!n[r])return!1;var i=Kn(t,"[[Value]]"),o=Kn(t,"[[Get]]")||Kn(t,"[[Set]]");if(i&&o)throw new qn("Property Descriptors may not be both accessor and data descriptors");return!0}},Yn=Number.isNaN||function(e){return e!=e},Qn=Number.isNaN||function(e){return e!=e},Jn=Number.isFinite||function(e){return"number"==typeof e&&!Qn(e)&&e!==1/0&&e!==-1/0},Zn=Function.prototype.toString,er=/^\s*class\b/,tr=Object.prototype.toString,nr="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,rr=Object.prototype.toString,ir=function(e,t){var n;if((n=1<arguments.length?t:"[object Date]"===rr.call(e)?String:Number)!==String&&n!==Number)throw new TypeError("invalid [[DefaultValue]] hint supplied");var r,i,o=n===String?["toString","valueOf"]:["valueOf","toString"];for(i=0;i<o.length;++i)if(Nn(e[o[i]])&&(r=e[o[i]](),Ln(r)))return r;throw new TypeError("No default value")},or=In("%Object%"),sr=In("%TypeError%"),ar=In("%String%"),lr={ToPrimitive:function(e,t){return Ln(e)?e:1<arguments.length?ir(e,t):ir(e)},ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return Yn(t)?0:0!==t&&Jn(t)?Dn(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);return Yn(t)||0===t||!Jn(t)?0:function(e,t){var n=e%t;return Math.floor(0<=n?n:n+t)}(Dn(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return ar(e)},ToObject:function(e){return this.CheckObjectCoercible(e),or(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new sr(t||"Cannot call method on "+e);return e},IsCallable:Nn,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:Yn(e)&&Yn(t)},Type:function(e){return null===e?"Null":"undefined"==typeof e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(Kn(e,n)&&!t[n])return!1;var r=Kn(e,"[[Value]]"),i=Kn(e,"[[Get]]")||Kn(e,"[[Set]]");if(r&&i)throw new sr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!(!Kn(e,"[[Get]]")&&!Kn(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!(!Kn(e,"[[Value]]")&&!Kn(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"==typeof e)return e;if(On(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new sr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new sr("ToPropertyDescriptor requires an object");var t={};if(Kn(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),Kn(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),Kn(e,"value")&&(t["[[Value]]"]=e.value),Kn(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),Kn(e,"get")){var n=e.get;if("undefined"!=typeof n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(Kn(e,"set")){var r=e.set;if("undefined"!=typeof r&&!this.IsCallable(r))throw new sr("setter must be a function");t["[[Set]]"]=r}if((Kn(t,"[[Get]]")||Kn(t,"[[Set]]"))&&(Kn(t,"[[Value]]")||Kn(t,"[[Writable]]")))throw new sr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},cr=sn.call(Function.call,String.prototype.replace),ur=/^[\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]+/,hr=/[\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]+$/,dr=sn.call(Function.call,Fn());Vn(dr,{getPolyfill:Fn,implementation:Rn,shim:function(){var e=Fn();return Vn(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var pr=dr,fr=Object.prototype.toString,vr=Object.prototype.hasOwnProperty,yr=function(e,t,n){if(!Nn(t))throw new TypeError("iterator must be a function");var r;3<=arguments.length&&(r=n),"[object Array]"===fr.call(e)?function(e,t,n){for(var r=0,i=e.length;r<i;r++)vr.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,r):"string"==typeof e?function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,r):function(e,t,n){for(var r in e)vr.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,r)},gr=function(e){if(!e)return{};var i={};return yr(pr(e).split("\n"),function(e){var t=e.indexOf(":"),n=pr(e.slice(0,t)).toLowerCase(),r=pr(e.slice(t+1));"undefined"==typeof i[n]?i[n]=r:!function(e){return"[object Array]"===Object.prototype.toString.call(e)}(i[n])?i[n]=[i[n],r]:i[n].push(r)}),i},mr=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)_r.call(n,r)&&(e[r]=n[r])}return e},_r=Object.prototype.hasOwnProperty;var br=kr;function Tr(e,t,n){var r=e;return Zt(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=mr(t,{uri:e}),r.callback=n,r}function kr(e,t,n){return Cr(t=Tr(e,t,n))}function Cr(r){if("undefined"==typeof r.callback)throw new Error("callback argument missing");var i=!1,o=function(e,t,n){i||(i=!0,r.callback(e,t,n))};function t(e){return clearTimeout(a),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,o(e,v)}function e(){if(!s){var e;clearTimeout(a),e=r.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var t=v,n=null;return 0!==e?(t={body:function(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}(l),f)try{e=JSON.parse(e)}catch(e){}return e}(),statusCode:e,method:u,headers:{},url:c,rawRequest:l},l.getAllResponseHeaders&&(t.headers=gr(l.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),o(n,t,t.body)}}var n,s,a,l=r.xhr||null,c=(l=l||(r.cors||r.useXDR?new kr.XDomainRequest:new kr.XMLHttpRequest)).url=r.uri||r.url,u=l.method=r.method||"GET",h=r.body||r.data,d=l.headers=r.headers||{},p=!!r.sync,f=!1,v={body:void 0,headers:{},statusCode:0,method:u,url:c,rawRequest:l};if("json"in r&&!1!==r.json&&(f=!0,d.accept||d.Accept||(d.Accept="application/json"),"GET"!==u&&"HEAD"!==u&&(d["content-type"]||d["Content-Type"]||(d["Content-Type"]="application/json"),h=JSON.stringify(!0===r.json?h:r.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(e,0)},l.onload=e,l.onerror=t,l.onprogress=function(){},l.onabort=function(){s=!0},l.ontimeout=t,l.open(u,c,!p,r.username,r.password),p||(l.withCredentials=!!r.withCredentials),!p&&0<r.timeout&&(a=setTimeout(function(){if(!s){s=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",t(e)}},r.timeout)),l.setRequestHeader)for(n in d)d.hasOwnProperty(n)&&l.setRequestHeader(n,d[n]);else if(r.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(r.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in r&&(l.responseType=r.responseType),"beforeSend"in r&&"function"==typeof r.beforeSend&&r.beforeSend(l),l.send(h||null),l}kr.XMLHttpRequest=h.XMLHttpRequest||function(){},kr.XDomainRequest="withCredentials"in new kr.XMLHttpRequest?kr.XMLHttpRequest:h.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(r){kr["delete"===r?"del":r]=function(e,t,n){return(t=Tr(e,t,n)).method=r.toUpperCase(),Cr(t)}});function Er(e,t){var n=new h.WebVTT.Parser(h,h.vttjs,h.WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),0<r.length&&(h.console&&h.console.groupCollapsed&&h.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach(function(e){return y.error(e)}),h.console&&h.console.groupEnd&&h.console.groupEnd()),n.flush()}var wr=function(c){function e(e){var t;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var n=Be(e,{kind:Gt[e.kind]||"subtitles",language:e.language||e.srclang||""}),r=Yt[n.mode]||"disabled",i=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden"),(t=c.call(this,n)||this).tech_=n.tech,t.cues_=[],t.activeCues_=[];var o=new Kt(t.cues_),s=new Kt(t.activeCues_),a=!1,l=Ce(v(t),function(){this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1)});return"disabled"!==r&&t.tech_.ready(function(){t.tech_.on("timeupdate",l)},!0),Object.defineProperties(v(t),{default:{get:function(){return i},set:function(){}},mode:{get:function(){return r},set:function(e){var t=this;Yt[e]&&("disabled"!==(r=e)?this.tech_.ready(function(){t.tech_.on("timeupdate",l)},!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?o:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=e&&i.endTime>=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(a=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),n.src?(t.src=n.src,function(e,o){var t={uri:e},n=$t(e);n&&(t.cors=n),br(t,Ce(this,function(e,t,n){if(e)return y.error(e,t);if(o.loaded_=!0,"function"!=typeof h.WebVTT){if(o.tech_){function r(){y.error("vttjs failed to load, stopping trying to process "+o.src),o.tech_.off("vttjsloaded",i)}var i;i=function(){return o.tech_.off("vttjserror",r),Er(n,o)},o.tech_.one("vttjsloaded",i),o.tech_.one("vttjserror",r)}}else Er(n,o)}))}(n.src,v(t))):t.loaded_=!0,t}f(e,c);var t=e.prototype;return t.addCue=function(e){var t=e;if(h.vttjs&&!(e instanceof h.vttjs.VTTCue)){for(var n in t=new h.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},e}(Qt);wr.prototype.allowedEvents_={cuechange:"cuechange"};var Sr=function(i){function e(e){var t;void 0===e&&(e={});var n=Be(e,{kind:Xt[e.kind]||""});t=i.call(this,n)||this;var r=!1;return Object.defineProperty(v(t),"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),n.enabled&&(t.enabled=n.enabled),t.loaded_=!0,t}return f(e,i),e}(Qt),xr=function(i){function e(e){var t;void 0===e&&(e={});var n=Be(e,{kind:qt[e.kind]||""});t=i.call(this,n)||this;var r=!1;return Object.defineProperty(v(t),"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),n.selected&&(t.selected=n.selected),t}return f(e,i),e}(Qt),Pr=function(i){function e(e){var t,n;void 0===e&&(e={}),t=i.call(this)||this;var r=new wr(e);return t.kind=r.kind,t.src=r.src,t.srclang=r.language,t.label=r.label,t.default=r.default,Object.defineProperties(v(t),{readyState:{get:function(){return n}},track:{get:function(){return r}}}),n=0,r.addEventListener("loadeddata",function(){n=2,t.trigger({type:"load",target:v(t)})}),t}return f(e,i),e}(we);Pr.prototype.allowedEvents_={load:"load"},Pr.NONE=0,Pr.LOADING=1,Pr.LOADED=2,Pr.ERROR=3;var Ar={audio:{ListClass:Ht,TrackClass:Sr,capitalName:"Audio"},video:{ListClass:Ut,TrackClass:xr,capitalName:"Video"},text:{ListClass:Wt,TrackClass:wr,capitalName:"Text"}};Object.keys(Ar).forEach(function(e){Ar[e].getterName=e+"Tracks",Ar[e].privateName=e+"Tracks_"});var jr={remoteText:{ListClass:Wt,TrackClass:wr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:zt,TrackClass:Pr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ir=Be(Ar,jr);jr.names=Object.keys(jr),Ar.names=Object.keys(Ar),Ir.names=[].concat(jr.names).concat(Ar.names);var Or=Object.create||function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return Dr.prototype=e,new Dr};function Dr(){}function Mr(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Nr(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):59<n[1]?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function Lr(){this.values=Or(null)}function Rr(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var s=i[o].split(n);if(2===s.length)t(s[0],s[1])}}function Fr(t,e,o){var n,r,s,i=t;function a(){var e=Nr(t);if(null===e)throw new Mr(Mr.Errors.BadTimeStamp,"Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function l(){t=t.replace(/^\s+/,"")}if(l(),e.startTime=a(),l(),"--\x3e"!==t.substr(0,3))throw new Mr(Mr.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),l(),e.endTime=a(),l(),n=t,r=e,s=new Lr,Rr(n,function(e,t){switch(e){case"region":for(var n=o.length-1;0<=n;n--)if(o[n].id===t){s.set(e,o[n].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":var r=t.split(","),i=r[0];s.integer(e,i),s.percent(e,i)&&s.set("snapToLines",!1),s.alt(e,i,["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start","middle","end"]);break;case"position":r=t.split(","),s.percent(e,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start","middle","end"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),r.region=s.get("region",null),r.vertical=s.get("vertical",""),r.line=s.get("line","auto"),r.lineAlign=s.get("lineAlign","start"),r.snapToLines=s.get("snapToLines",!0),r.size=s.get("size",100),r.align=s.get("align","middle"),r.position=s.get("position",{start:0,left:0,middle:50,end:100,right:100},r.align),r.positionAlign=s.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},r.align)}((Mr.prototype=Or(Error.prototype)).constructor=Mr).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Lr.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(t=parseFloat(t))&&t<=100)&&(this.set(e,t),!0)}};var Br={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},Vr={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},$r={v:"title",lang:"lang"},Hr={rt:"ruby"};function Ur(o,n){function e(){if(!n)return null;var e,t=n.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],n=n.substr(e.length),e}function t(e){return Br[e]}function r(e){for(;f=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(f[0],t);return e}function i(e,t){var n=Vr[e];if(!n)return null;var r=o.document.createElement(n);r.localName=n;var i=$r[e];return i&&t&&(r[i]=t.trim()),r}for(var s,a,l,c=o.document.createElement("div"),u=c,h=[];null!==(s=e());)if("<"!==s[0])u.appendChild(o.document.createTextNode(r(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),u=u.parentNode);continue}var d,p=Nr(s.substr(1,s.length-2));if(p){d=o.document.createProcessingInstruction("timestamp",p),u.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=i(f[1],f[3])))continue;if(a=u,Hr[(l=d).localName]&&Hr[l.localName]!==a.localName)continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),h.push(f[1]),u.appendChild(d),u=d}return c}var Wr=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function zr(e){for(var t=0;t<Wr.length;t++){var n=Wr[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function Kr(){}function qr(e,t,n){Kr.call(this),this.cue=t,this.cueDiv=Ur(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;0<=n;n--)e.push(t.childNodes[n])}function o(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?r[e.length=0]:n}return"ruby"===t.tagName?o(e):t.childNodes?(i(e,t),o(e)):void 0}for(i(t,e);n=o(t);)for(var r=0;r<n.length;r++)if(zr(n.charCodeAt(r)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"middle":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function Xr(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function Gr(e,t,a,l){var n=new Xr(t),r=t.cue,i=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(r),o=[];if(r.snapToLines){var s;switch(r.vertical){case"":o=["+y","-y"],s="height";break;case"rl":o=["+x","-x"],s="width";break;case"lr":o=["-x","+x"],s="width"}var c=n.lineHeight,u=c*Math.round(i),h=a[s]+c,d=o[0];Math.abs(u)>h&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),i<0&&(u+=""===r.vertical?a.height:a.width,o=o.reverse()),n.move(d,u)}else{var p=n.lineHeight/a.height*100;switch(r.lineAlign){case"middle":i-=p/2;break;case"end":i-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(i,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(i,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(i,"%")})}o=["+y","-x","+x","-y"],n=new Xr(t)}var f=function(e,t){for(var n,r=new Xr(e),i=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(a,t[o])||e.within(a)&&e.overlapsAny(l);)e.move(t[o]);if(e.within(a))return e;var s=e.intersectPercentage(a);s<i&&(n=new Xr(e),i=s),e=new Xr(r)}return n||r}(n,o);t.move(f.toCSSCompatValues(a))}function Yr(){}Kr.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},Kr.prototype.formatStyle=function(e,t){return 0===e?0:e+t},(qr.prototype=Or(Kr.prototype)).constructor=qr,Xr.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Xr.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Xr.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Xr.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Xr.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},Xr.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Xr.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Xr.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},Yr.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Yr.convertCueToDOMTree=function(e,t){return e&&t?Ur(e,t):null};Yr.processCues=function(r,i,e){if(!r||!i||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var o=r.document.createElement("div");if(o.style.position="absolute",o.style.left="0",o.style.right="0",o.style.top="0",o.style.bottom="0",o.style.margin="1.5%",e.appendChild(o),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(i)){var s=[],a=Xr.getSimpleBoxPosition(o),l={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var e,t,n=0;n<i.length;n++)t=i[n],e=new qr(r,t,l),o.appendChild(e.div),Gr(0,e,a,s),t.displayState=e.div,s.push(Xr.getSimpleBoxPosition(e))}()}else for(var t=0;t<i.length;t++)o.appendChild(i[t].displayState)},(Yr.Parser=function(e,t,n){n||(n=t,t={}),t=t||{},this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(e){if(!(e instanceof Mr))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var r=this;function t(){for(var e=r.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,r.buffer=e.substr(t),n}function n(e){e.match(/X-TIMESTAMP-MAP/)?Rr(e,function(e,t){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new Lr;Rr(e,function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",Nr(t))}},/[^\d]:/,/,/),r.ontimestampmap&&r.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(t)}},/=/):Rr(e,function(e,t){switch(e){case"Region":!function(e){var i=new Lr;if(Rr(e,function(e,t){switch(e){case"id":i.set(e,t);break;case"width":i.percent(e,t);break;case"lines":i.integer(e,t);break;case"regionanchor":case"viewportanchor":var n=t.split(",");if(2!==n.length)break;var r=new Lr;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(e+"X",r.get("x")),i.set(e+"Y",r.get("y"));break;case"scroll":i.alt(e,t,["up"])}},/=/,/\s/),i.has("id")){var t=new(r.vttjs.VTTRegion||r.window.VTTRegion);t.width=i.get("width",100),t.lines=i.get("lines",3),t.regionAnchorX=i.get("regionanchorX",0),t.regionAnchorY=i.get("regionanchorY",100),t.viewportAnchorX=i.get("viewportanchorX",0),t.viewportAnchorY=i.get("viewportanchorY",100),t.scroll=i.get("scroll",""),r.onregion&&r.onregion(t),r.regionList.push({id:i.get("id"),region:t})}}(t)}},/:/)}e&&(r.buffer+=r.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===r.state){if(!/\r\n|\n/.test(r.buffer))return this;var o=(i=t()).match(/^WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new Mr(Mr.Errors.BadSignature);r.state="HEADER"}for(var s=!1;r.buffer;){if(!/\r\n|\n/.test(r.buffer))return this;switch(s?s=!1:i=t(),r.state){case"HEADER":/:/.test(i)?n(i):i||(r.state="ID");continue;case"NOTE":i||(r.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){r.state="NOTE";break}if(!i)continue;if(r.cue=new(r.vttjs.VTTCue||r.window.VTTCue)(0,0,""),r.state="CUE",-1===i.indexOf("--\x3e")){r.cue.id=i;continue}case"CUE":try{Fr(i,r.cue,r.regionList)}catch(e){r.reportOrThrowError(e),r.cue=null,r.state="BADCUE";continue}r.state="CUETEXT";continue;case"CUETEXT":var a=-1!==i.indexOf("--\x3e");if(!i||a&&(s=!0)){r.oncue&&r.oncue(r.cue),r.cue=null,r.state="ID";continue}r.cue.text&&(r.cue.text+="\n"),r.cue.text+=i;continue;case"BADCUE":i||(r.state="ID");continue}}}catch(e){r.reportOrThrowError(e),"CUETEXT"===r.state&&r.cue&&r.oncue&&r.oncue(r.cue),r.cue=null,r.state="INITIAL"===r.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),!t.cue&&"HEADER"!==t.state||(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Mr(Mr.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var Qr=Yr,Jr={"":1,lr:1,rl:1},Zr={start:1,middle:1,end:1,left:1,right:1};function ei(e){return"string"==typeof e&&(!!Zr[e.toLowerCase()]&&e.toLowerCase())}function ti(e,t,n){this.hasBeenReset=!1;var r="",i=!1,o=e,s=t,a=n,l=null,c="",u=!0,h="auto",d="start",p=50,f="middle",v=50,y="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return i},set:function(e){i=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");s=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return a},set:function(e){a=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(e){var t=function(e){return"string"==typeof e&&(!!Jr[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");c=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return u},set:function(e){u=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(e){var t=ei(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");d=t,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||100<e)throw new Error("Position must be between 0 and 100.");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=ei(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");f=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||100<e)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=ei(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}ti.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var ni=ti,ri={"":!0,up:!0};function ii(e){return"number"==typeof e&&0<=e&&e<=100}function oi(){var t=100,n=3,r=0,i=100,o=0,s=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!ii(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");n=e}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(e){if(!ii(e))throw new Error("RegionAnchorX must be between 0 and 100.");i=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!ii(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!ii(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!ii(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return"string"==typeof e&&(!!ri[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");a=t}}})}var si=jt(function(e){var t=e.exports={WebVTT:Qr,VTTCue:ni,VTTRegion:oi};h.vttjs=t,h.WebVTT=t.WebVTT;var n=t.VTTCue,r=t.VTTRegion,i=h.VTTCue,o=h.VTTRegion;t.shim=function(){h.VTTCue=n,h.VTTRegion=r},t.restore=function(){h.VTTCue=i,h.VTTRegion=o},h.VTTCue||t.shim()});si.WebVTT,si.VTTCue,si.VTTRegion;var ai=function(t){function n(n,e){var r;return void 0===n&&(n={}),void 0===e&&(e=function(){}),n.reportTouchActivity=!1,(r=t.call(this,null,n,e)||this).hasStarted_=!1,r.on("playing",function(){this.hasStarted_=!0}),r.on("loadstart",function(){this.hasStarted_=!1}),Ir.names.forEach(function(e){var t=Ir[e];n&&n[t.getterName]&&(r[t.privateName]=n[t.getterName])}),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===n["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)}),!1===n.nativeCaptions||!1===n.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new Ir.text.ListClass,r.initTrackListeners(),n.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}f(n,t);var e=n.prototype;return e.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},e.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ce(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)},e.onDurationChange=function(e){this.duration_=this.duration()},e.buffered=function(){return ft(0,0)},e.bufferedPercent=function(){return vt(this.buffered(),this.duration_)},e.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.dispose=function(){this.clearTracks(Ar.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.clearTracks=function(e){var i=this;(e=[].concat(e)).forEach(function(e){for(var t=i[e+"Tracks"]()||[],n=t.length;n--;){var r=t[n];"text"===e&&i.removeRemoteTextTrack(r),t.removeTrack(r)}})},e.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},e.reset=function(){},e.error=function(e){return void 0!==e&&(this.error_=new kt(e),this.trigger("error")),this.error_},e.played=function(){return this.hasStarted_?ft(0,0):ft()},e.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.initTrackListeners=function(){var i=this;Ar.names.forEach(function(e){function t(){i.trigger(e+"trackchange")}var n=Ar[e],r=i[n.getterName]();r.addEventListener("removetrack",t),r.addEventListener("addtrack",t),i.on("dispose",function(){r.removeEventListener("removetrack",t),r.removeEventListener("addtrack",t)})})},e.addWebVttScript_=function(){var e=this;if(!h.WebVTT)if(d.body.contains(this.el())){if(!this.options_["vtt.js"]&&c(si)&&0<Object.keys(si).length)return void this.trigger("vttjsloaded");var t=d.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){t.onload=null,t.onerror=null}),h.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},e.emulateTextTracks=function(){function t(e){return r.addTrack(e.track)}function n(e){return r.removeTrack(e.track)}var e=this,r=this.textTracks(),i=this.remoteTextTracks();i.on("addtrack",t),i.on("removetrack",n),this.addWebVttScript_();function o(){return e.trigger("texttrackchange")}function s(){o();for(var e=0;e<r.length;e++){var t=r[e];t.removeEventListener("cuechange",o),"showing"===t.mode&&t.addEventListener("cuechange",o)}}s(),r.addEventListener("change",s),r.addEventListener("addtrack",s),r.addEventListener("removetrack",s),this.on("dispose",function(){i.off("addtrack",t),i.off("removetrack",n),r.removeEventListener("change",s),r.removeEventListener("addtrack",s),r.removeEventListener("removetrack",s);for(var e=0;e<r.length;e++){r[e].removeEventListener("cuechange",o)}})},e.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var o=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var s=new Ir.text.TrackClass(i);return o.addTrack(s),s}(this,e,t,n)},e.createRemoteTextTrack=function(e){var t=Be(e,{tech:this});return new jr.remoteTextEl.TrackClass(t)},e.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(y.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready(function(){return n.autoRemoteTextTracks_.addTrack(r.track)}),r},e.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},e.getVideoPlaybackQuality=function(){return{}},e.requestPictureInPicture=function(){var e=this.options_.Promise||h.Promise;if(e)return e.reject()},e.setPoster=function(){},e.playsinline=function(){},e.setPlaysinline=function(){},e.overrideNativeAudioTracks=function(){},e.overrideNativeVideoTracks=function(){},e.canPlayType=function(){return""},n.canPlayType=function(){return""},n.canPlaySource=function(e,t){return n.canPlayType(e.type)},n.isTech=function(e){return e.prototype instanceof n||e instanceof n||e===n},n.registerTech=function(e,t){if(n.techs_||(n.techs_={}),!n.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!n.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!n.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Fe(e),n.techs_[e]=t,"Tech"!==e&&n.defaultTechOrder_.push(e),t},n.getTech=function(e){if(e)return e=Fe(e),n.techs_&&n.techs_[e]?n.techs_[e]:h&&h.videojs&&h.videojs[e]?(y.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),h.videojs[e]):void 0},n}(Ve);Ir.names.forEach(function(e){var t=Ir[e];ai.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),ai.prototype.featuresVolumeControl=!0,ai.prototype.featuresMuteControl=!0,ai.prototype.featuresFullscreenResize=!1,ai.prototype.featuresPlaybackRate=!1,ai.prototype.featuresProgressEvents=!1,ai.prototype.featuresSourceset=!1,ai.prototype.featuresTimeupdateEvents=!1,ai.prototype.featuresNativeTextTracks=!1,ai.withSourceHandlers=function(i){i.registerSourceHandler=function(e,t){var n=i.sourceHandlers;n=n||(i.sourceHandlers=[]),void 0===t&&(t=n.length),n.splice(t,0,e)},i.canPlayType=function(e){for(var t,n=i.sourceHandlers||[],r=0;r<n.length;r++)if(t=n[r].canPlayType(e))return t;return""},i.selectSourceHandler=function(e,t){for(var n=i.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(e,t))return n[r];return null},i.canPlaySource=function(e,t){var n=i.selectSourceHandler(e,t);return n?n.canHandleSource(e,t):""};["seekable","seeking","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},i.prototype),i.prototype.setSource=function(e){var t=i.selectSourceHandler(e,this.options_);t||(i.nativeSourceHandler?t=i.nativeSourceHandler:y.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),t!==i.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=t.handleSource(e,this,this.options_),this.one("dispose",this.disposeSourceHandler)},i.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Ve.registerComponent("Tech",ai),ai.registerTech("Tech",ai),ai.defaultTechOrder_=[];var li={},ci={},ui={};function hi(e,t,n){e.setTimeout(function(){return function n(r,e,i,o,s,a){void 0===r&&(r={});void 0===e&&(e=[]);void 0===s&&(s=[]);void 0===a&&(a=!1);var t=e,l=t[0],c=t.slice(1);if("string"==typeof l)n(r,li[l],i,o,s,a);else if(l){var u=gi(o,l);if(!u.setSource)return s.push(u),n(r,c,i,o,s,a);u.setSource(_({},r),function(e,t){if(e)return n(r,c,i,o,s,a);s.push(u),n(t,r.type===t.type?c:li[t.type],i,o,s,a)})}else c.length?n(r,c,i,o,s,a):a?i(r,s):n(r,li["*"],i,o,s,!0)}(t,li[t.type],n,e)},1)}function di(e,t,n,r){void 0===r&&(r=null);var i="call"+Fe(n),o=e.reduce(yi(i),r),s=o===ui,a=s?null:t[n](o);return function(e,t,n,r){for(var i=e.length-1;0<=i;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,a,s),a}var pi={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1,volume:1},fi={setCurrentTime:1,setVolume:1},vi={play:1,pause:1};function yi(n){return function(e,t){return e===ui?ui:t[n]?t[n](e):e}}function gi(e,t){var n=ci[e.id()],r=null;if(null==n)return r=t(e),ci[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var o=n[i],s=o[0],a=o[1];s===t&&(r=a)}return null===r&&(r=t(e),n.push([t,r])),r}function mi(e){void 0===e&&(e="");var t=Vt(e);return _i[t.toLowerCase()]||""}var _i={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"};function bi(e){var t=mi(e.src);return!e.type&&t&&(e.type=t),e}var Ti=function(c){function e(e,t,n){var r,i=Be({createEl:!1},t);if(r=c.call(this,e,i,n)||this,t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(var o=0,s=t.playerOptions.techOrder;o<s.length;o++){var a=Fe(s[o]),l=ai.getTech(a);if(a||(l=Ve.getComponent(a)),l&&l.isSupported()){e.loadTech_(a);break}}return r}return f(e,c),e}(Ve);Ve.registerComponent("MediaLoader",Ti);var ki=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).emitTapEvents(),n.enable(),n}f(e,i);var t=e.prototype;return t.createEl=function(e,t,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={}),t=_({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&y.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=_({role:"button"},n),this.tabIndex_=t.tabIndex;var r=i.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.dispose=function(){this.controlTextEl_=null,i.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=x("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,P(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.buildCSSClass=function(){return"vjs-control vjs-button "+i.prototype.buildCSSClass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},t.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},t.handleClick=function(e){},t.handleKeyDown=function(e){It.isEventKey(e,"Space")||It.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):i.prototype.handleKeyDown.call(this,e)},e}(Ve);Ve.registerComponent("ClickableComponent",ki);var Ci=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).update(),e.on("posterchange",Ce(v(n),n.update)),n}f(e,r);var t=e.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),r.prototype.dispose.call(this)},t.createEl=function(){return x("div",{className:"vjs-poster",tabIndex:-1})},t.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},t.handleClick=function(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?St(this.player_.play()):this.player_.pause())},e}(ki);Ve.registerComponent("PosterImage",Ci);var Ei="#222",wi={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 Si(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function xi(e,t,n){try{e.style[t]=n}catch(e){return}}var Pi=function(o){function e(n,e,t){var r;r=o.call(this,n,e,t)||this;var i=Ce(v(r),r.updateDisplay);return n.on("loadstart",Ce(v(r),r.toggleDisplay)),n.on("texttrackchange",i),n.on("loadedmetadata",Ce(v(r),r.preselectTrack)),n.ready(Ce(v(r),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",i),n.on("playerresize",i),h.addEventListener("orientationchange",i),n.on("dispose",function(){return h.removeEventListener("orientationchange",i)});for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}})),r}f(e,o);var t=e.prototype;return t.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,s=0;s<i.length;s++){var a=i[s];o&&o.enabled&&o.language&&o.language===a.language&&a.kind in r?n=a.kind===o.kind?a:n||a:o&&!o.enabled?t=e=n=null:a.default&&("descriptions"!==a.kind||e?a.kind in r&&!t&&(t=a):e=a)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},t.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.createEl=function(){return o.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.clearDisplay=function(){"function"==typeof h.WebVTT&&h.WebVTT.processCues(h,[],this.el_)},t.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var o=null,s=null,a=e.length;a--;){var l=e[a];"showing"===l.mode&&("descriptions"===l.kind?o=l:s=l)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},t.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var i=n[r];if(i){var o=i.displayState;if(t.color&&(o.firstChild.style.color=t.color),t.textOpacity&&xi(o.firstChild,"color",Si(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(o.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&xi(o.firstChild,"backgroundColor",Si(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?xi(o,"backgroundColor",Si(t.windowColor,t.windowOpacity)):o.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Ei:"raised"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Ei:"depressed"===t.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Ei:"uniform"===t.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Ei)),t.fontPercent&&1!==t.fontPercent){var s=h.parseFloat(o.style.fontSize);o.style.fontSize=s*t.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=wi[t.fontFamily])}}},t.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof h.WebVTT&&!e.every(function(e){return!e.activeCues})){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],i=0;i<r.activeCues.length;++i)t.push(r.activeCues[i]);h.WebVTT.processCues(h,t,this.el_);for(var o=0;o<e.length;++o){for(var s=e[o],a=0;a<s.activeCues.length;++a){var l=s.activeCues[a].displayState;I(l,"vjs-text-track-cue"),I(l,"vjs-text-track-cue-"+(s.language?s.language:o))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},e}(Ve);Ve.registerComponent("TextTrackDisplay",Pi);var Ai=function(i){function e(){return i.apply(this,arguments)||this}return f(e,i),e.prototype.createEl=function(){var e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),n=x("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[t])}),r=i.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},e}(Ve);Ve.registerComponent("LoadingSpinner",Ai);var ji=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=_({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=_({type:"button"},n);var r=Ve.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return y.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Ve.prototype.addChild.call(this,e,t)},n.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(e){It.isEventKey(e,"Space")||It.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(ki);Ve.registerComponent("Button",ji);var Ii=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)return St(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){function i(){return r.focus()}wt(t)?t.then(i,function(){}):this.setTimeout(i,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,r.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},e}(ji);Ii.prototype.controlText_="Play Video",Ve.registerComponent("BigPlayButton",Ii);var Oi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).controlText(t&&t.controlText||n.localize("Close")),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+r.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){It.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):r.prototype.handleKeyDown.call(this,e)},e}(ji);Ve.registerComponent("CloseButton",Oi);var Di=function(r){function e(e,t){var n;return void 0===t&&(t={}),n=r.call(this,e,t)||this,t.replay=void 0===t.replay||t.replay,n.on(e,"play",n.handlePlay),n.on(e,"pause",n.handlePause),t.replay&&n.on(e,"ended",n.handleEnded),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+r.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause(),e.stopPropagation()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(ji);Di.prototype.controlText_="Play",Ve.registerComponent("PlayToggle",Di);function Mi(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),s=Math.floor(t/3600);return!isNaN(e)&&e!==1/0||(i=r=n="-"),(i=0<i||0<s?i+":":"")+(r=((i||10<=o)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}var Ni=Mi;function Li(e,t){return void 0===t&&(t=e),Ni(e,t)}var Ri=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).throttledUpdateContent=Ee(Ce(v(n),n.updateContent),25),n.on(e,"timeupdate",n.throttledUpdateContent),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e=this.buildCSSClass(),t=r.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=x("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),t.appendChild(this.contentEl_),t},t.dispose=function(){this.contentEl_=null,this.textNode_=null,r.prototype.dispose.call(this)},t.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=d.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.formatTime_=function(e){return Li(e)},t.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.updateContent=function(e){},e}(Ve);Ri.prototype.labelText_="Time",Ri.prototype.controlText_="Time",Ve.registerComponent("TimeDisplay",Ri);var Fi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"ended",n.handleEnded),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-current-time"},t.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(Ri);Fi.prototype.labelText_="Current Time",Fi.prototype.controlText_="Current Time",Ve.registerComponent("CurrentTimeDisplay",Fi);var Bi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"durationchange",n.updateContent),n.on(e,"loadstart",n.updateContent),n.on(e,"loadedmetadata",n.throttledUpdateContent),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var t=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},e}(Ri);Bi.prototype.labelText_="Duration",Bi.prototype.controlText_="Duration",Ve.registerComponent("DurationDisplay",Bi);var Vi=function(e){function t(){return e.apply(this,arguments)||this}return f(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(Ve);Ve.registerComponent("TimeDivider",Vi);var $i=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"durationchange",n.throttledUpdateContent),n.on(e,"ended",n.handleEnded),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=r.prototype.createEl.call(this);return e.insertBefore(x("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){"number"==typeof this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},e}(Ri);$i.prototype.labelText_="Remaining Time",$i.prototype.controlText_="Remaining Time",Ve.registerComponent("RemainingTimeDisplay",$i);var Hi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=x("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},e}(Ve);Ve.registerComponent("LiveDisplay",Hi);var Ui=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatus),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=x("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(e){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,r.prototype.dispose.call(this)},e}(ji);Ui.prototype.controlText_="Seek to live, currently playing live",Ve.registerComponent("SeekToLive",Ui);var Wi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}f(e,r);var t=e.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),t.className=t.className+" vjs-slider",t=_({tabIndex:0},t),n=_({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),r.prototype.createEl.call(this,e,t,n)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||it||e.preventDefault(),B(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;V(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.calculateDistance=function(e){var t=U(this.el_,e);return this.vertical()?t.y:t.x},t.handleKeyDown=function(e){It.isEventKey(e,"Left")||It.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):It.isEventKey(e,"Right")||It.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):r.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(Ve);Ve.registerComponent("Slider",Wi);var zi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).partEls_=[],n.on(e,"progress",n.update),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+'</span>: <span class="vjs-control-text-loaded-percentage">0%</span></span>'})},t.dispose=function(){this.partEls_=null,r.prototype.dispose.call(this)},t.update=function(e){function t(e,t,n){var r=e/t||0;return r=100*(1<=r?1:r),n&&(r=r.toFixed(2)),r+"%"}var n=this.player_.liveTracker,r=this.player_.buffered(),i=n&&n.isLive()?n.seekableEnd():this.player_.duration(),o=this.player_.bufferedEnd(),s=this.partEls_,a=this.$(".vjs-control-text-loaded-percentage");this.el_.style.width=t(o,i),P(a,t(o,i,!0));for(var l=0;l<r.length;l++){var c=r.start(l),u=r.end(l),h=s[l];h||(h=this.el_.appendChild(x()),s[l]=h),h.style.left=t(c,o),h.style.width=t(u-c,o)}for(var d=s.length;d>r.length;d--)this.el_.removeChild(s[d-1]);s.length=r.length},e}(Ve);Ve.registerComponent("LoadProgressBar",zi);var Ki=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=$(this.el_),i=$(this.player_.el()),o=e.width*t;if(i&&r){var s=e.left-i.left+o,a=e.width-o+(i.right-e.right),l=r.width/2;s<l?l+=l-s:a<l&&(l=a),l<0?l=0:l>r.width&&(l=r.width),this.el_.style.right="-"+l+"px",this.write(n)}},n.write=function(e){P(this.el_,e)},n.updateTime=function(i,o,s,a){var l=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var e,t=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var n=l.player_.liveTracker.liveWindow(),r=n-o*n;e=(r<1?"":"-")+Li(r,n)}else e=Li(s,t);l.update(i,o,e),a&&a()})},t}(Ve);Ve.registerComponent("TimeTooltip",Ki);var qi=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Ve);qi.prototype.options_={children:[]},Qe||Ze||qi.prototype.options_.children.push("timeTooltip"),Ve.registerComponent("PlayProgressBar",qi);var Xi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).update=Ee(Ce(v(n),n.update),25),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,function(){n.el_.style.left=e.width*t+"px"})},e}(Ve);Xi.prototype.options_={children:["timeTooltip"]},Ve.registerComponent("MouseTimeDisplay",Xi);var Gi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).setEventHandlers_(),n}f(e,r);var t=e.prototype;return t.setEventHandlers_=function(){this.update=Ee(Ce(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in d&&"visibilityState"in d&&this.on(d,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){d.hidden?this.disableInterval_(e):(this.enableInterval_(),this.requestAnimationFrame(this.update))},t.enableInterval_=function(){var e=this;this.clearInterval(this.updateInterval),this.updateInterval=this.setInterval(function(){e.requestAnimationFrame(e.update)},30)},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&"ended"!==e.type||this.clearInterval(this.updateInterval)},t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update_=function(e,t){var n=this.player_.liveTracker,r=this.player_.duration();n&&n.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Li(e,r),Li(r,r)],"{1} of {2}")),this.bar&&this.bar.update($(this.el_),t)},t.update=function(e){if(null!==this.el().offsetParent){var t=r.prototype.update.call(this);return this.update_(this.getCurrentTime_(),t),t}},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),1<=e?1:e||0},t.handleMouseDown=function(e){G(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),r.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(G(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){var i=r.seekableStart(),o=r.liveCurrentTime();if(o<=(t=i+n*r.liveWindow())&&(t=o),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},t.enable=function(){r.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){r.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){r.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&St(this.player_.play())},t.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){if(It.isEventKey(e,"Space")||It.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(It.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(It.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(It(e))){e.preventDefault(),e.stopPropagation();var t=10*(It.codes[It(e)]-It.codes[0])/100;this.player_.currentTime(this.player_.duration()*t)}else It.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):It.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):r.prototype.handleKeyDown.call(this,e)},e}(Wi);Gi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Qe||Ze||Gi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Ve.registerComponent("SeekBar",Gi);var Yi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).handleMouseMove=Ee(Ce(v(n),n.handleMouseMove),25),n.throttledHandleMouseSeek=Ee(Ce(v(n),n.handleMouseSeek),25),n.enable(),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),i=$(r),o=U(r,e).x;1<o?o=1:o<0&&(o=0),n&&n.update(i,o)}},t.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},e}(Ve);Yi.prototype.options_={children:["seekBar"]},Ve.registerComponent("ProgressControl",Yi);var Qi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,["enterpictureinpicture","leavepictureinpicture"],n.handlePictureInPictureChange),d.pictureInPictureEnabled||n.disable(),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+r.prototype.buildCSSClass.call(this)},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(ji);Qi.prototype.controlText_="Picture-in-Picture",Ve.registerComponent("PictureInPictureToggle",Qi);var Ji=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"fullscreenchange",n.handleFullscreenChange),!1===d[e.fsApi_.fullscreenEnabled]&&n.disable(),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+r.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(ji);Ji.prototype.controlText_="Fullscreen",Ve.registerComponent("FullscreenToggle",Ji);var Zi=function(e){function t(){return e.apply(this,arguments)||this}return f(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(Ve);Ve.registerComponent("VolumeLevel",Zi);var eo=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on("slideractive",n.updateLastVolume_),n.on(e,"volumechange",n.updateARIAAttributes),e.ready(function(){return n.updateARIAAttributes()}),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){G(e)&&r.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){G(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(Wi);eo.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},eo.prototype.playerEvent="volumechange",Ve.registerComponent("VolumeBar",eo);var to=function(r){function e(e,t){var n;return void 0===t&&(t={}),t.vertical=t.vertical||!1,"undefined"!=typeof t.volumeBar&&!c(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})}(v(n=r.call(this,e,t)||this),e),n.throttledHandleMouseMove=Ee(Ce(v(n),n.handleMouseMove),25),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),n.on(n.volumeBar,["focus","slideractive"],function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")}),n.on(n.volumeBar,["blur","sliderinactive"],function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")}),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}(Ve);to.prototype.options_={children:["volumeBar"]},Ve.registerComponent("VolumeControl",to);var no=function(r){function e(e,t){var n;return function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})}(v(n=r.call(this,e,t)||this),e),n.on(e,["loadstart","volumechange"],n.update),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+r.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;Qe&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)O(this.el_,"vjs-vol-"+n);I(this.el_,"vjs-vol-"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(ji);no.prototype.controlText_="Mute",Ve.registerComponent("MuteToggle",no);var ro=function(r){function e(e,t){var n;return void 0===t&&(t={}),"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,"undefined"!=typeof t.volumeControl&&!c(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(n=r.call(this,e,t)||this).on(e,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}f(e,r);var t=e.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(Ve);ro.prototype.options_={children:["muteToggle","volumeControl"]},Ve.registerComponent("VolumePanel",ro);var io=function(r){function e(e,t){var n;return n=r.call(this,e,t)||this,t&&(n.menuButton_=t.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyDown),n.boundHandleBlur_=Ce(v(n),n.handleBlur),n.boundHandleTapClick_=Ce(v(n),n.handleTapClick),n}f(e,r);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof Ve&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof Ve&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),r.prototype.removeChild.call(this,e)},t.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},t.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=x(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var t=r.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),he(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,r.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||d.activeElement;if(!this.children().some(function(e){return e.el()===t})){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},t.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var n=e.filter(function(e){return e.el()===t.target})[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){It.isEventKey(e,"Left")||It.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(It.isEventKey(e,"Right")||It.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),0<t.length&&(e<0?e=0:e>=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}(Ve);Ve.registerComponent("Menu",io);var oo=function(i){function e(e,t){var n;void 0===t&&(t={}),(n=i.call(this,e,t)||this).menuButton_=new ji(e,t),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=ji.prototype.buildCSSClass();return n.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"keydown",n.handleKeyDown),n.on(n.menuButton_,"mouseenter",function(){n.menu.show()}),n.on("keydown",n.handleSubmenuKeyDown),n}f(e,i);var t=e.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new io(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=x("li",{className:"vjs-menu-title",innerHTML:Fe(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new Ve(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},t.createItems=function(){},t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+ji.prototype.buildCSSClass()+" "+i.prototype.buildCSSClass.call(this)},t.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+i.prototype.buildCSSClass.call(this)},t.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},t.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},t.focus=function(){this.menuButton_.focus()},t.blur=function(){this.menuButton_.blur()},t.handleKeyDown=function(e){It.isEventKey(e,"Esc")||It.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),It.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(It.isEventKey(e,"Up")||It.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},t.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},t.handleSubmenuKeyDown=function(e){(It.isEventKey(e,"Esc")||It.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),It.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},t.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Qe&&w())return;this.menu.focus()}},t.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(Ve);Ve.registerComponent("MenuButton",oo);var so=function(o){function e(e,t){var n,r=t.tracks;if((n=o.call(this,e,t)||this).items.length<=1&&n.hide(),!r)return v(n);var i=Ce(v(n),n.update);return r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),n.player_.on("ready",i),n.player_.on("dispose",function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)}),n}return f(e,o),e}(oo);Ve.registerComponent("TrackButton",so);var ao=["Tab","Esc","Up","Down","Right","Left"],lo=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).selectable=t.selectable,n.isSelected_=t.selected||!1,n.multiSelectable=t.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}f(e,r);var t=e.prototype;return t.createEl=function(e,t,n){return this.nonIconControl=!0,r.prototype.createEl.call(this,"li",_({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},t),n)},t.handleKeyDown=function(t){ao.some(function(e){return It.isEventKey(t,e)})||r.prototype.handleKeyDown.call(this,t)},t.handleClick=function(e){this.selected(!0)},t.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(ki);Ve.registerComponent("MenuItem",lo);var co=function(l){function e(e,t){var r,n=t.track,i=e.textTracks();t.label=n.label||n.language||"Unknown",t.selected="showing"===n.mode,(r=l.call(this,e,t)||this).track=n,r.kinds=(t.kinds||[t.kind||r.track.kind]).filter(Boolean);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(v(r),t)}function s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(v(r),t)}var a;e.on(["loadstart","texttrackchange"],o),i.addEventListener("change",o),i.addEventListener("selectedlanguagechange",s),r.on("dispose",function(){e.off(["loadstart","texttrackchange"],o),i.removeEventListener("change",o),i.removeEventListener("selectedlanguagechange",s)}),void 0===i.onchange&&r.on(["tap","click"],function(){if("object"!=typeof h.Event)try{a=new h.Event("change")}catch(e){}a||(a=d.createEvent("Event")).initEvent("change",!0,!0),i.dispatchEvent(a)});return r.handleTracksChange(),r}f(e,l);var t=e.prototype;return t.handleClick=function(e){var t=this.track,n=this.player_.textTracks();if(l.prototype.handleClick.call(this,e),n)for(var r=0;r<n.length;r++){var i=n[r];-1!==this.kinds.indexOf(i.kind)&&(i===t?"showing"!==i.mode&&(i.mode="showing"):"disabled"!==i.mode&&(i.mode="disabled"))}},t.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.dispose=function(){this.track=null,l.prototype.dispose.call(this)},e}(lo);Ve.registerComponent("TextTrackMenuItem",co);var uo=function(n){function e(e,t){return t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,n.call(this,e,t)||this}f(e,n);var t=e.prototype;return t.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(-1<this.options_.kinds.indexOf(o.kind)&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},t.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(-1<["captions","descriptions","subtitles"].indexOf(o.kind)&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(co);Ve.registerComponent("OffTextTrackMenuItem",uo);var ho=function(n){function e(e,t){return void 0===t&&(t={}),t.tracks=e.textTracks(),n.call(this,e,t)||this}return f(e,n),e.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=co),this.label_&&(n=this.label_+" off"),e.push(new uo(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(-1<this.kinds_.indexOf(o.kind)){var s=new t(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+o.kind+"-menu-item"),e.push(s)}}return e},e}(so);Ve.registerComponent("TextTrackButton",ho);var po=function(s){function e(e,t){var n,r=t.track,i=t.cue,o=e.currentTime();return t.selectable=!0,t.multiSelectable=!1,t.label=i.text,t.selected=i.startTime<=o&&o<i.endTime,(n=s.call(this,e,t)||this).track=r,n.cue=i,r.addEventListener("cuechange",Ce(v(n),n.update)),n}f(e,s);var t=e.prototype;return t.handleClick=function(e){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},e}(lo);Ve.registerComponent("ChaptersTrackMenuItem",po);var fo=function(r){function e(e,t,n){return r.call(this,e,t,n)||this}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildWrapperCSSClass.call(this)},t.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),r.prototype.update.call(this)},t.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},t.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;0<=t;t--){var n=e[t];if(n.kind===this.kind_)return n}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Fe(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),r.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new po(this.player_,{track:this.track_,cue:i});e.push(o)}return e},e}(ho);fo.prototype.kind_="chapters",fo.prototype.controlText_="Chapters",Ve.registerComponent("ChaptersButton",fo);var vo=function(s){function e(e,t,n){var r;r=s.call(this,e,t,n)||this;var i=e.textTracks(),o=Ce(v(r),r.handleTracksChange);return i.addEventListener("change",o),r.on("dispose",function(){i.removeEventListener("change",o)}),r}f(e,s);var t=e.prototype;return t.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var o=t[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},t.buildCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildWrapperCSSClass.call(this)},e}(ho);vo.prototype.kind_="descriptions",vo.prototype.controlText_="Descriptions",Ve.registerComponent("DescriptionsButton",vo);var yo=function(r){function e(e,t,n){return r.call(this,e,t,n)||this}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildWrapperCSSClass.call(this)},e}(ho);yo.prototype.kind_="subtitles",yo.prototype.controlText_="Subtitles",Ve.registerComponent("SubtitlesButton",yo);var go=function(r){function e(e,t){var n;return t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",(n=r.call(this,e,t)||this).addClass("vjs-texttrack-settings"),n.controlText(", opens "+t.kind+" settings dialog"),n}return f(e,r),e.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},e}(co);Ve.registerComponent("CaptionSettingsMenuItem",go);var mo=function(r){function e(e,t,n){return r.call(this,e,t,n)||this}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-captions-button "+r.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-captions-button "+r.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new go(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),r.prototype.createItems.call(this,e)},e}(ho);mo.prototype.kind_="captions",mo.prototype.controlText_="Captions",Ve.registerComponent("CaptionsButton",mo);var _o=function(i){function e(){return i.apply(this,arguments)||this}return f(e,i),e.prototype.createEl=function(e,t,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),r+="</span>",i.prototype.createEl.call(this,e,_({innerHTML:r},t),n)},e}(co);Ve.registerComponent("SubsCapsMenuItem",_o);var bo=function(r){function e(e,t){var n;return void 0===t&&(t={}),(n=r.call(this,e,t)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)&&(n.label_="captions"),n.menuButton_.controlText(Fe(n.label_)),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new go(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=r.prototype.createItems.call(this,e,_o)},e}(ho);bo.prototype.kinds_=["captions","subtitles"],bo.prototype.controlText_="Subtitles",Ve.registerComponent("SubsCapsButton",bo);var To=function(s){function e(e,t){var r,n=t.track,i=e.audioTracks();t.label=n.label||n.language||"Unknown",t.selected=n.enabled,(r=s.call(this,e,t)||this).track=n,r.addClass("vjs-"+n.kind+"-menu-item");function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(v(r),t)}return i.addEventListener("change",o),r.on("dispose",function(){i.removeEventListener("change",o)}),r}f(e,s);var t=e.prototype;return t.createEl=function(e,t,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),r+="</span>",s.prototype.createEl.call(this,e,_({innerHTML:r},t),n)},t.handleClick=function(e){var t=this.player_.audioTracks();s.prototype.handleClick.call(this,e);for(var n=0;n<t.length;n++){var r=t[n];r.enabled=r===this.track}},t.handleTracksChange=function(e){this.selected(this.track.enabled)},e}(lo);Ve.registerComponent("AudioTrackMenuItem",To);var ko=function(n){function e(e,t){return void 0===t&&(t={}),t.tracks=e.audioTracks(),n.call(this,e,t)||this}f(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-audio-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-audio-button "+n.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new To(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},e}(so);ko.prototype.controlText_="Audio Track",Ve.registerComponent("AudioTrackButton",ko);var Co=function(o){function e(e,t){var n,r=t.rate,i=parseFloat(r,10);return t.label=r,t.selected=1===i,t.selectable=!0,t.multiSelectable=!1,(n=o.call(this,e,t)||this).label=r,n.rate=i,n.on(e,"ratechange",n.update),n}f(e,o);var t=e.prototype;return t.handleClick=function(e){o.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.update=function(e){this.selected(this.player().playbackRate()===this.rate)},e}(lo);Co.prototype.contentElType="button",Ve.registerComponent("PlaybackRateMenuItem",Co);var Eo=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).updateVisibility(),n.updateLabel(),n.on(e,"loadstart",n.updateVisibility),n.on(e,"ratechange",n.updateLabel),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this);return this.labelEl_=x("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},t.dispose=function(){this.labelEl_=null,r.prototype.dispose.call(this)},t.buildCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildWrapperCSSClass.call(this)},t.createMenu=function(){var e=new io(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;0<=n;n--)e.addChild(new Co(this.player(),{rate:t[n]+"x"}));return e},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},t.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},t.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(oo);Eo.prototype.controlText_="Playback Rate",Ve.registerComponent("PlaybackRateMenuButton",Eo);var wo=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(Ve);Ve.registerComponent("Spacer",wo);var So=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},n.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(wo);Ve.registerComponent("CustomControlSpacer",So);var xo=function(e){function t(){return e.apply(this,arguments)||this}return f(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Ve);xo.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},Ve.registerComponent("ControlBar",xo);var Po=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"error",n.open),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-error-display "+r.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):""},e}(Dt);Po.prototype.options_=Be(Dt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ve.registerComponent("ErrorDisplay",Po);var Ao="vjs-text-track-settings",jo=["#000","Black"],Io=["#00F","Blue"],Oo=["#0FF","Cyan"],Do=["#0F0","Green"],Mo=["#F0F","Magenta"],No=["#F00","Red"],Lo=["#FFF","White"],Ro=["#FF0","Yellow"],Fo=["1","Opaque"],Bo=["0.5","Semi-Transparent"],Vo=["0","Transparent"],$o={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[jo,Lo,No,Do,Io,Ro,Mo,Oo]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Fo,Bo,Vo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Lo,jo,No,Do,Io,Ro,Mo,Oo]},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(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Fo,Bo]},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:[Vo,Bo,Fo]}};function Ho(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}$o.windowColor.options=$o.backgroundColor.options;var Uo=function(r){function e(e,t){var n;return t.temporary=!1,(n=r.call(this,e,t)||this).updateDisplay=Ce(v(n),n.updateDisplay),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=x("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===t.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",function(){n.saveSettings(),n.close()}),n.on(n.$(".vjs-default-button"),"click",function(){n.setDefaults(),n.updateDisplay()}),i($o,function(e){n.on(n.$(e.selector),"change",n.updateDisplay)}),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}f(e,r);var t=e.prototype;return t.dispose=function(){this.endDialog=null,r.prototype.dispose.call(this)},t.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=$o[e],o=i.id.replace("%s",this.id_),s=[t,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(i.options.map(function(e){var t=o+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',r.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.createElColors_=function(){return x("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return x("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return x("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var i=this;return function(n,r,e){return void 0===e&&(e=0),a(n).reduce(function(e,t){return r(e,n[t],t)},e)}($o,function(e,t,n){var r=function(e,t){return Ho(e.options[e.options.selectedIndex].value,t)}(i.$(t.selector),t.parser);return void 0!==r&&(e[n]=r),e},{})},t.setValues=function(n){var r=this;i($o,function(e,t){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(Ho(e.options[r].value,n)===t){e.selectedIndex=r;break}}(r.$(e.selector),n[t],e.parser)})},t.setDefaults=function(){var n=this;i($o,function(e){var t=e.hasOwnProperty("default")?e.default:0;n.$(e.selector).selectedIndex=t})},t.restoreSettings=function(){var e;try{e=JSON.parse(h.localStorage.getItem(Ao))}catch(e){y.warn(e)}e&&this.setValues(e)},t.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?h.localStorage.setItem(Ao,JSON.stringify(e)):h.localStorage.removeItem(Ao)}catch(e){y.warn(e)}}},t.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},e}(Dt);Ve.registerComponent("TextTrackSettings",Uo);var Wo=function(o){function e(e,t){var n,r=t.ResizeObserver||h.ResizeObserver;null===t.ResizeObserver&&(r=!1);var i=Be({createEl:!r,reportTouchActivity:!1},t);return(n=o.call(this,e,i)||this).ResizeObserver=t.ResizeObserver||h.ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=function(r,i,o,s){var a;void 0===s&&(s=h);function e(){var e=this,t=arguments,n=function(){n=a=null,o||r.apply(e,t)};!a&&o&&r.apply(e,t),s.clearTimeout(a),a=s.setTimeout(n,i)}return e.cancel=function(){s.clearTimeout(a),a=null},e}(function(){n.resizeHandler()},100,!1,v(n)),r?(n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(e.el())):(n.loadListener_=function(){if(n.el_&&n.el_.contentWindow){var e=n.debouncedHandler_,t=n.unloadListener_=function(){de(this,"resize",e),de(this,"unload",t),t=null};he(n.el_.contentWindow,"unload",t),he(n.el_.contentWindow,"resize",e)}},n.one("load",n.loadListener_)),n}f(e,o);var t=e.prototype;return t.createEl=function(){return o.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},t.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},t.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,o.prototype.dispose.call(this)},e}(Ve);Ve.registerComponent("ResizeManager",Wo);var zo=function(i){function e(e,t){var n,r=Be({createEl:!1},t);return(n=i.call(this,e,r)||this).reset_(),n.on(n.player_,"durationchange",n.handleDurationchange),st&&"hidden"in d&&"visibilityState"in d&&n.on(d,"visibilitychange",n.handleVisibilityChange),n}f(e,i);var t=e.prototype;return t.handleVisibilityChange=function(){this.player_.duration()===1/0&&(d.hidden?this.stopTracking():this.startTracking())},t.isBehind_=function(){if(!this.timeupdateSeen_)return!1;var e=this.liveCurrentTime(),t=this.player_.currentTime(),n=this.seekableIncrement_;return e!==1/0&&t<=e-(2*n+.07)},t.trackLive_=function(){this.pastSeekEnd_=this.pastSeekEnd_;var e=this.player_.seekable();if(e&&e.length){var t=this.seekableEnd();t!==this.lastSeekEnd_&&(this.lastSeekEnd_&&(this.seekableIncrement_=Math.abs(t-this.lastSeekEnd_)),this.pastSeekEnd_=0,this.lastSeekEnd_=t,this.trigger("seekableendchange")),this.pastSeekEnd_=this.pastSeekEnd()+.03,this.isBehind_()!==this.behindLiveEdge()&&(this.behindLiveEdge_=this.isBehind_(),this.trigger("liveedgechange"))}},t.handleDurationchange=function(){this.player_.duration()===1/0?this.startTracking():this.stopTracking()},t.startTracking=function(){var e=this;this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,"play",this.trackLive_),this.on(this.player_,"pause",this.trackLive_),this.timeupdateSeen_||(this.one(this.player_,"play",this.handlePlay),this.handleTimeupdate=function(){e.timeupdateSeen_=!0,e.handleTimeupdate=null},this.one(this.player_,"timeupdate",this.handleTimeupdate)))},t.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},t.reset_=function(){this.pastSeekEnd_=0,this.lastSeekEnd_=null,this.behindLiveEdge_=null,this.timeupdateSeen_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.seekableIncrement_=12,this.off(this.player_,"play",this.trackLive_),this.off(this.player_,"pause",this.trackLive_),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.seekToLiveEdge),this.handleTimeupdate&&(this.off(this.player_,"timeupdate",this.handleTimeupdate),this.handleTimeupdate=null)},t.stopTracking=function(){this.isTracking()&&this.reset_()},t.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?1/0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){return this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return"number"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.atLiveEdge()||(this.player_.currentTime(this.liveCurrentTime()),this.player_.paused()&&this.player_.play())},t.dispose=function(){this.stopTracking(),i.prototype.dispose.call(this)},e}(Ve);Ve.registerComponent("LiveTracker",zo);function Ko(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var s=n[o].src;s&&-1===r.indexOf(s)&&r.push(s)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)}function qo(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n}function Xo(o){var s=o.el();if(!s.resetSourceWatch_){function t(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=i.apply(s,t);return Ko(o),r}}var n={},e=function(e){return qo([e.el(),h.HTMLMediaElement.prototype,h.Element.prototype,Yo],"innerHTML")}(o);["append","appendChild","insertAdjacentHTML"].forEach(function(e){s[e]&&(n[e]=s[e],s[e]=t(n[e]))}),Object.defineProperty(s,"innerHTML",Be(e,{set:t(e.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(n).forEach(function(e){s[e]=n[e]}),Object.defineProperty(s,"innerHTML",e)},o.one("sourceset",s.resetSourceWatch_)}}function Go(r){if(r.featuresSourceset){var i=r.el();if(!i.resetSourceset_){var n=function(e){return qo([e.el(),h.HTMLMediaElement.prototype,Qo],"src")}(r),o=i.setAttribute,t=i.load;Object.defineProperty(i,"src",Be(n,{set:function(e){var t=n.set.call(i,e);return r.triggerSourceset(i.src),t}})),i.setAttribute=function(e,t){var n=o.call(i,e,t);return/src/i.test(e)&&r.triggerSourceset(i.src),n},i.load=function(){var e=t.call(i);return Ko(r)||(r.triggerSourceset(""),Xo(r)),e},i.currentSrc?r.triggerSourceset(i.currentSrc):Ko(r)||Xo(r),i.resetSourceset_=function(){i.resetSourceset_=null,i.load=t,i.setAttribute=o,Object.defineProperty(i,"src",n),i.resetSourceWatch_&&i.resetSourceWatch_()}}}}var Yo=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=d.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=d.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",h.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Qo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Bt(h.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return h.Element.prototype.setAttribute.call(this,"src",e),e}});function Jo(){var e=t(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]);return Jo=function(){return e},e}var Zo=function(u){function a(e,t){var n;n=u.call(this,e,t)||this;var r=e.source,i=!1;if(r&&(n.el_.currentSrc!==r.src||e.tag&&3===e.tag.initNetworkState_)?n.setSource(r):n.handleLateInit_(n.el_),e.enableSourceset&&n.setupSourcesetHandling_(),n.el_.hasChildNodes()){for(var o=n.el_.childNodes,s=o.length,a=[];s--;){var l=o[s];"track"===l.nodeName.toLowerCase()&&(n.featuresNativeTextTracks?(n.remoteTextTrackEls().addTrackElement_(l),n.remoteTextTracks().addTrack(l.track),n.textTracks().addTrack(l.track),i||n.el_.hasAttribute("crossorigin")||!$t(l.src)||(i=!0)):a.push(l))}for(var c=0;c<a.length;c++)n.el_.removeChild(a[c])}return n.proxyNativeTracks_(),n.featuresNativeTextTracks&&i&&y.warn(m(Jo())),n.restoreMetadataTracksInIOSNativePlayer_(),(ut||Ge||tt)&&!0===e.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}f(a,u);var e=a.prototype;return e.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),a.disposeMediaElement(this.el_),this.options_=null,u.prototype.dispose.call(this)},e.setupSourcesetHandling_=function(){Go(this)},e.restoreMetadataTracksInIOSNativePlayer_=function(){function e(){n=[];for(var e=0;e<r.length;e++){var t=r[e];"metadata"===t.kind&&n.push({track:t,storedMode:t.mode})}}var n,r=this.textTracks();e(),r.addEventListener("change",e),this.on("dispose",function(){return r.removeEventListener("change",e)});function i(){for(var e=0;e<n.length;e++){var t=n[e];"disabled"===t.track.mode&&t.track.mode!==t.storedMode&&(t.track.mode=t.storedMode)}r.removeEventListener("change",i)}this.on("webkitbeginfullscreen",function(){r.removeEventListener("change",e),r.removeEventListener("change",i),r.addEventListener("change",i)}),this.on("webkitendfullscreen",function(){r.removeEventListener("change",e),r.addEventListener("change",e),r.removeEventListener("change",i)})},e.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach(function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},e.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},e.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},e.proxyNativeTracksForType_=function(e){var r=this,t=Ar[e],i=this.el()[t.getterName],o=this[t.getterName]();if(this["featuresNative"+t.capitalName+"Tracks"]&&i&&i.addEventListener){function n(){for(var e=[],t=0;t<o.length;t++){for(var n=!1,r=0;r<i.length;r++)if(i[r]===o[t]){n=!0;break}n||e.push(o[t])}for(;e.length;)o.removeTrack(e.shift())}var s={change:function(e){o.trigger({type:"change",target:o,currentTarget:o,srcElement:o})},addtrack:function(e){o.addTrack(e.track)},removetrack:function(e){o.removeTrack(e.track)}};this[t.getterName+"Listeners_"]=s,Object.keys(s).forEach(function(t){var n=s[t];i.addEventListener(t,n),r.on("dispose",function(e){return i.removeEventListener(t,n)})}),this.on("loadstart",n),this.on("dispose",function(e){return r.off("loadstart",n)})}},e.proxyNativeTracks_=function(){var t=this;Ar.names.forEach(function(e){t.proxyNativeTracksForType_(e)})},e.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),a.disposeMediaElement(e),e=t}else{e=d.createElement("video");var n=Be({},this.options_.tag&&N(this.options_.tag));ut&&!0===this.options_.nativeControlsForTouch||delete n.controls,M(e,_(n,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&R(e,"preload",this.options_.preload);for(var r=["loop","muted","playsinline","autoplay"],i=0;i<r.length;i++){var o=r[i],s=this.options_[o];"undefined"!=typeof s&&(s?R(e,o,o):F(e,o),e[o]=s)}return e},e.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){function t(){n=!0}var n=!1;this.on("loadstart",t);function r(){n||this.trigger("loadstart")}return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",t),this.off("loadedmetadata",r),n||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),2<=e.readyState&&i.push("loadeddata"),3<=e.readyState&&i.push("canplay"),4<=e.readyState&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(e){this.trigger(e)},this)})}},e.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){y(e,"Video is not ready. (Video.js)")}},e.duration=function(){var t=this;if(this.el_.duration===1/0&&Ze&&it&&0===this.el_.currentTime){return this.on("timeupdate",function e(){0<t.el_.currentTime&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))}),NaN}return this.el_.duration||NaN},e.width=function(){return this.el_.offsetWidth},e.height=function(){return this.el_.offsetHeight},e.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){function t(){this.trigger("fullscreenchange",{isFullscreen:!1})}function n(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))}this.on("webkitbeginfullscreen",n),this.on("dispose",function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)})}},e.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=h.navigator&&h.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},e.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},e.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},e.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},e.reset=function(){a.resetMediaElement(this.el_)},e.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.setControls=function(e){this.el_.controls=!!e},e.addTextTrack=function(e,t,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,n):u.prototype.addTextTrack.call(this,e,t,n)},e.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return u.prototype.createRemoteTextTrack.call(this,e);var t=d.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t},e.addRemoteTextTrack=function(e,t){var n=u.prototype.addRemoteTextTrack.call(this,e,t);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},e.removeRemoteTextTrack=function(e){if(u.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var t=this.$$("track"),n=t.length;n--;)e!==t[n]&&e!==t[n].track||this.el().removeChild(t[n])},e.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),h.performance&&"function"==typeof h.performance.now?e.creationTime=h.performance.now():h.performance&&h.performance.timing&&"number"==typeof h.performance.timing.navigationStart&&(e.creationTime=h.Date.now()-h.performance.timing.navigationStart),e},a}(ai);if(C()){Zo.TEST_VID=d.createElement("video");var es=d.createElement("track");es.kind="captions",es.srclang="en",es.label="English",Zo.TEST_VID.appendChild(es)}Zo.isSupported=function(){try{Zo.TEST_VID.volume=.5}catch(e){return!1}return!(!Zo.TEST_VID||!Zo.TEST_VID.canPlayType)},Zo.canPlayType=function(e){return Zo.TEST_VID.canPlayType(e)},Zo.canPlaySource=function(e,t){return Zo.canPlayType(e.type)},Zo.canControlVolume=function(){try{var e=Zo.TEST_VID.volume;return Zo.TEST_VID.volume=e/2+.1,e!==Zo.TEST_VID.volume}catch(e){return!1}},Zo.canMuteVolume=function(){try{var e=Zo.TEST_VID.muted;return Zo.TEST_VID.muted=!e,Zo.TEST_VID.muted?R(Zo.TEST_VID,"muted","muted"):F(Zo.TEST_VID,"muted"),e!==Zo.TEST_VID.muted}catch(e){return!1}},Zo.canControlPlaybackRate=function(){if(Ze&&it&&ot<58)return!1;try{var e=Zo.TEST_VID.playbackRate;return Zo.TEST_VID.playbackRate=e/2+.1,e!==Zo.TEST_VID.playbackRate}catch(e){return!1}},Zo.canOverrideAttributes=function(){try{function e(){}Object.defineProperty(d.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(d.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(d.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(d.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Zo.supportsNativeTextTracks=function(){return lt||Qe&&it},Zo.supportsNativeVideoTracks=function(){return!(!Zo.TEST_VID||!Zo.TEST_VID.videoTracks)},Zo.supportsNativeAudioTracks=function(){return!(!Zo.TEST_VID||!Zo.TEST_VID.audioTracks)},Zo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Zo.prototype.featuresVolumeControl=Zo.canControlVolume(),Zo.prototype.featuresMuteControl=Zo.canMuteVolume(),Zo.prototype.featuresPlaybackRate=Zo.canControlPlaybackRate(),Zo.prototype.featuresSourceset=Zo.canOverrideAttributes(),Zo.prototype.movingMediaElementInDOM=!Qe,Zo.prototype.featuresFullscreenResize=!0,Zo.prototype.featuresProgressEvents=!0,Zo.prototype.featuresTimeupdateEvents=!0,Zo.prototype.featuresNativeTextTracks=Zo.supportsNativeTextTracks(),Zo.prototype.featuresNativeVideoTracks=Zo.supportsNativeVideoTracks(),Zo.prototype.featuresNativeAudioTracks=Zo.supportsNativeAudioTracks();var ts=Zo.TEST_VID&&Zo.TEST_VID.constructor.prototype.canPlayType,ns=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;function rs(){var e=t(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]);return rs=function(){return e},e}Zo.patchCanPlayType=function(){4<=et&&!nt&&!it&&(Zo.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&ns.test(e)?"maybe":ts.call(this,e)})},Zo.unpatchCanPlayType=function(){var e=Zo.TEST_VID.constructor.prototype.canPlayType;return Zo.TEST_VID.constructor.prototype.canPlayType=ts,e},Zo.patchCanPlayType(),Zo.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Zo.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Zo.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Zo.prototype["set"+Fe(t)]=function(e){(this.el_[t]=e)?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){Zo.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(t){Zo.prototype["set"+Fe(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(e){Zo.prototype[e]=function(){return this.el_[e]()}}),ai.withSourceHandlers(Zo),Zo.nativeSourceHandler={},Zo.nativeSourceHandler.canPlayType=function(e){try{return Zo.TEST_VID.canPlayType(e)}catch(e){return""}},Zo.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Zo.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Vt(e.src);return Zo.nativeSourceHandler.canPlayType("video/"+n)}return""},Zo.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Zo.nativeSourceHandler.dispose=function(){},Zo.registerSourceHandler(Zo.nativeSourceHandler),ai.registerTech("Html5",Zo);var is=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],os={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ss=["tiny","xsmall","small","medium","large","xlarge","huge"],as={};ss.forEach(function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;as[e]="vjs-layout-"+t});var ls={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},cs=function(u){function c(e,t,n){var r;if(e.id=e.id||t.id||"vjs_video_"+ee(),(t=_(c.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if("function"==typeof e.closest){var i=e.closest("[lang]");i&&i.getAttribute&&(t.language=i.getAttribute("lang"))}else for(var o=e;o&&1===o.nodeType;){if(N(o).hasOwnProperty("lang")){t.language=o.getAttribute("lang");break}o=o.parentNode}if((r=u.call(this,null,t,n)||this).boundDocumentFullscreenChange_=Ce(v(r),r.documentFullscreenChange_),r.boundFullWindowOnEscKey_=Ce(v(r),r.fullWindowOnEscKey),r.log=g(r.id_),r.fsApi_=gt,r.isPosterFromTech_=!1,r.queuedCallbacks_=[],r.isReady_=!1,r.hasStarted_=!1,r.userActive_=!1,!r.options_||!r.options_.techOrder||!r.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=e,r.tagAttributes=e&&N(e),r.language(r.options_.language),t.languages){var s={};Object.getOwnPropertyNames(t.languages).forEach(function(e){s[e.toLowerCase()]=t.languages[e]}),r.languages_=s}else r.languages_=c.prototype.options_.languages;r.resetCache_(),r.poster_=t.poster||"",r.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),r.changingSrc_=!1,r.playCallbacks_=[],r.playTerminatedQueue_=[],e.hasAttribute("autoplay")?r.autoplay(!0):r.autoplay(r.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(function(e){if("function"!=typeof r[e])throw new Error('plugin "'+e+'" does not exist')}),r.scrubbing_=!1,r.el_=r.createEl(),Ne(v(r),{eventBusKey:"el_"}),r.fluid_&&r.on("playerreset",r.updateStyleEl_);var a=Be(r.options_);t.plugins&&Object.keys(t.plugins).forEach(function(e){r[e](t.plugins[e])}),r.options_.playerOptions=a,r.middleware_=[],r.initChildren(),r.isAudio("audio"===e.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.el_.setAttribute("role","region"),r.isAudio()?r.el_.setAttribute("aria-label",r.localize("Audio Player")):r.el_.setAttribute("aria-label",r.localize("Video Player")),r.isAudio()&&r.addClass("vjs-audio"),r.flexNotSupported_()&&r.addClass("vjs-no-flex"),ut&&r.addClass("vjs-touch-enabled"),Qe||r.addClass("vjs-workinghover"),c.players[r.id_]=v(r);var l=p.split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.one("play",r.listenForUserActivity_),r.on("stageclick",r.handleStageClick_),r.on("keydown",r.handleKeyDown),r.breakpoints(r.options_.breakpoints),r.responsive(r.options_.responsive),r}f(c,u);var e=c.prototype;return e.dispose=function(){var r=this;this.trigger("dispose"),this.off("dispose"),de(d,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),de(d,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),c.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function(e){ci[e.id()]=null}(this),Ir.names.forEach(function(e){var t=Ir[e],n=r[t.getterName]();n&&n.off&&n.off()}),u.prototype.dispose.call(this)},e.createEl=function(){var t,n=this.tag,e=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();e?t=this.el_=n.parentNode:r||(t=this.el_=u.prototype.createEl.call(this,"div"));var i=N(n);if(r){for(t=this.el_=n,n=this.tag=d.createElement("video");t.children.length;)n.appendChild(t.firstChild);j(t,"video-js")||I(t,"video-js"),t.appendChild(n),e=this.playerElIngest_=t,Object.keys(t).forEach(function(e){n[e]=t[e]})}if(n.setAttribute("tabindex","-1"),i.tabindex="-1",(st||it&&ct)&&(n.setAttribute("role","application"),i.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in i&&delete i.width,"height"in i&&delete i.height,Object.getOwnPropertyNames(i).forEach(function(e){r&&"class"===e||t.setAttribute(e,i[e]),r&&n.setAttribute(e,i[e])}),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==h.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Te("vjs-styles-dimensions");var o=Y(".vjs-styles-defaults"),s=Y("head");s.insertBefore(this.styleEl_,o?o.nextSibling:s.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var a=n.getElementsByTagName("a"),l=0;l<a.length;l++){var c=a.item(l);I(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!e&&n.parentNode.insertBefore(t,n),A(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=t},e.width=function(e){return this.dimension("width",e)},e.height=function(e){return this.dimension("height",e)},e.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?y.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},e.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,De(this)&&this.off("playerreset",this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),function(e,t){De(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))}(function(){this.on("playerreset",this.updateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},e.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},e.updateStyleEl_=function(){if(!0!==h.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),ke(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*i+"%;\n }\n ")}else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(0<=o&&(a.width=o),0<=s&&(a.height=s))}},e.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=Fe(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(ai.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Ir.names.forEach(function(e){var t=Ir[e];o[t.getterName]=n[t.privateName]}),_(o,this.options_[r]),_(o,this.options_[i]),_(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),t&&t.src===this.cache_.src&&0<this.cache_.currentTime&&(o.startTime=this.cache_.currentTime);var s=ai.getTech(e);if(!s)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new s(o),this.tech_.ready(Ce(this,this.handleTechReady_),!0),At(this.textTracksJson_||[],this.tech_),is.forEach(function(e){n.on(n.tech_,e,n["handleTech"+Fe(e)+"_"])}),Object.keys(os).forEach(function(t){n.on(n.tech_,t,function(e){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+os[t]+"_"].bind(n),event:e}):n["handleTech"+os[t]+"_"](e)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||A(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.unloadTech_=function(){var n=this;Ir.names.forEach(function(e){var t=Ir[e];n[t.privateName]=n[t.getterName]()}),this.textTracksJson_=Pt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.tech=function(e){return void 0===e&&y.warn(m(rs())),this.tech_},e.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},e.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},e.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},e.manualAutoplay_=function(t){var r=this;if(this.tech_&&"string"==typeof t){function e(){var e=r.muted();r.muted(!0);function t(){r.muted(e)}r.playTerminatedQueue_.push(t);var n=r.play();if(wt(n))return n.catch(t)}var n;if("any"===t&&!0!==this.muted()?wt(n=this.play())&&(n=n.catch(e)):n="muted"===t&&!0!==this.muted()?e():this.play(),wt(n))return n.then(function(){r.trigger({type:"autoplay-success",autoplay:t})}).catch(function(e){r.trigger({type:"autoplay-failure",autoplay:t})})}},e.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter(function(e){return e.src===t});if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===t)return o.type}return mi(t)}(this,t)),this.cache_.source=Be({},e,{src:t,type:n});for(var r=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),i=[],o=this.$$("source"),s=[],a=0;a<o.length;a++){var l=N(o[a]);i.push(l),l.src&&l.src===t&&s.push(l.src)}s.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},e.handleTechSourceset_=function(e){var r=this;if(!this.changingSrc_){var t=function(e){return r.updateSourceCaches_(e)},n=this.currentSource().src,i=e.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(i)&&(this.lastSource_&&(this.lastSource_.tech===i||this.lastSource_.player===n)||(t=function(){})),t(i),!e.src){this.tech_.one(["sourceset","loadstart"],function e(t){if("sourceset"!==t.type){var n=r.techGet("currentSrc");r.lastSource_.tech=n,r.updateSourceCaches_(n)}r.tech_.off(["sourceset","loadstart"],e)})}}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},e.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},e.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting");var n=this.currentTime();this.on("timeupdate",function e(){n!==t.currentTime()&&(t.removeClass("vjs-waiting"),t.off("timeupdate",e))})},e.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},e.handleTechFirstPlay_=function(){this.options_.starttime&&(y.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.handleTechClick_=function(e){G(e)&&this.controls_&&(this.paused()?St(this.play()):this.pause())},e.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},e.handleTechTap_=function(){this.userActive(!this.userActive())},e.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.handleTechTouchEnd_=function(e){e.preventDefault()},e.handleStageClick_=function(){this.reportUserActivity()},e.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.documentFullscreenChange_=function(e){var t=this.el(),n=d[this.fsApi_.fullscreenElement]===t;!n&&t.matches?n=t.matches(":"+this.fsApi_.fullscreen):!n&&t.msMatchesSelector&&(n=t.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(n),!1===this.isFullscreen()&&de(d,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.fsApi_.prefixed&&this.trigger("fullscreenchange")},e.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},e.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},e.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},e.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},e.handleTechError_=function(){var e=this.tech_.error();this.error(e)},e.handleTechTextData_=function(e,t){var n=null;1<arguments.length&&(n=t),this.trigger("textdata",n)},e.getCache=function(){return this.cache_},e.resetCache_=function(){this.cache_={currentTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},e.techCall_=function(e,t){this.ready(function(){if(e in fi)return function(e,t,n,r){return t[n](e.reduce(yi(n),r))}(this.middleware_,this.tech_,e,t);if(e in vi)return di(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw y(e),e}},!0)},e.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in pi)return function(e,t,n){return e.reduceRight(yi(n),t[n]())}(this.middleware_,this.tech_,t);if(t in vi)return di(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw y("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw y("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw y(e),e}}},e.play=function(){var t=this,e=this.options_.Promise||h.Promise;return e?new e(function(e){t.play_(e)}):this.play_()},e.play_=function(e){var t=this;void 0===e&&(e=St),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!lt&&!Qe||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},e.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})},e.runPlayCallbacks_=function(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach(function(e){e(t)})},e.pause=function(){this.techCall_("pause")},e.paused=function(){return!1!==this.techGet_("paused")},e.played=function(){return this.techGet_("played")||ft(0,0)},e.scrubbing=function(e){if("undefined"==typeof e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.currentTime=function(e){return"undefined"!=typeof e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&((this.cache_.duration=e)===1/0?(this.addClass("vjs-live"),this.options_.liveui&&this.player_.liveTracker&&this.addClass("vjs-liveui")):(this.removeClass("vjs-live"),this.removeClass("vjs-liveui")),isNaN(e)||this.trigger("durationchange"))},e.remainingTime=function(){return this.duration()-this.currentTime()},e.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=ft(0,0)),e},e.bufferedPercent=function(){return vt(this.buffered(),this.duration())},e.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return t<n&&(n=t),n},e.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(0<t&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},e.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},e.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},e.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},e.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.isFullscreen=function(e){return void 0!==e?(this.isFullscreen_=!!e,void this.toggleFullscreenClass_()):!!this.isFullscreen_},e.requestFullscreen=function(e){var t;this.isFullscreen(!0),this.fsApi_.requestFullscreen?(he(d,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),St(this.el_[this.fsApi_.requestFullscreen](t))):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.exitFullscreen=function(){this.isFullscreen(!1),this.fsApi_.requestFullscreen?St(d[this.fsApi_.exitFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=d.documentElement.style.overflow,he(d,"keydown",this.boundFullWindowOnEscKey_),d.documentElement.style.overflow="hidden",I(d.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.fullWindowOnEscKey=function(e){It.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.exitFullWindow=function(){this.isFullWindow=!1,de(d,"keydown",this.boundFullWindowOnEscKey_),d.documentElement.style.overflow=this.docOrigOverflow,O(d.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},e.requestPictureInPicture=function(){if("pictureInPictureEnabled"in d)return this.techGet_("requestPictureInPicture")},e.exitPictureInPicture=function(){if("pictureInPictureEnabled"in d)return d.exitPictureInPicture()},e.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){var n,r;if(n=this.el_.ownerDocument.activeElement,"input"===(r=n.tagName.toLowerCase())?-1!==["button","checkbox","hidden","radio","reset","submit"].indexOf(n.type):-1===["textarea"].indexOf(r))"function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e)}},e.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return It.isEventKey(e,"f")}:n,i=t.muteKey,o=void 0===i?function(e){return It.isEventKey(e,"m")}:i,s=t.playPauseKey,a=void 0===s?function(e){return It.isEventKey(e,"k")||It.isEventKey(e,"Space")}:s;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=Ve.getComponent("FullscreenToggle");!1!==d[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(o.call(this,e)){e.preventDefault(),e.stopPropagation(),Ve.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),Ve.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},e.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=ai.getTech(i);if(o=o||Ve.getComponent(i)){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else y.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.selectSource=function(e){function t(e,n,r){var i;return e.some(function(t){return n.some(function(e){if(i=r(t,e))return!0})}),i}function n(e,t){var n=e[0];if(e[1].canPlaySource(t,i.options_[n.toLowerCase()]))return{source:t,tech:n}}var r,i=this,o=this.options_.techOrder.map(function(e){return[e,ai.getTech(e)]}).filter(function(e){var t=e[0],n=e[1];return n?n.isSupported():(y.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)});return(this.options_.sourceOrder?t(e,o,(r=n,function(e,t){return r(t,e)})):t(o,e,n))||!1},e.src=function(e){var n=this;if("undefined"==typeof e)return this.cache_.src||"";var r=function t(e){if(Array.isArray(e)){var n=[];e.forEach(function(e){e=t(e),Array.isArray(e)?n=n.concat(e):b(e)&&n.push(e)}),e=n}else e="string"==typeof e&&e.trim()?[bi({src:e})]:b(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[bi(e)]:[];return e}(e);r.length?(this.changingSrc_=!0,this.cache_.sources=r,this.updateSourceCaches_(r[0]),hi(this,r[0],function(e,t){if(n.middleware_=t,n.cache_.sources=r,n.updateSourceCaches_(e),n.src_(e))return 1<r.length?n.src(r.slice(1)):(n.changingSrc_=!1,n.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void n.triggerReady());!function(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}(t,n.tech_)})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},e.src_=function(e){var t=this,n=this.selectSource([e]);return!n||(function(e,t){return Fe(e)===Fe(t)}(n.tech,this.techName_)?this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0):(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready(function(){t.changingSrc_=!1})),!1)},e.load=function(){this.techCall_("load")},e.reset=function(){var e=this,t=this.options_.Promise||h.Promise;this.paused()||!t?this.doReset_():St(this.play().then(function(){return e.doReset_()}))},e.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),De(this)&&this.trigger("playerreset")},e.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},e.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},e.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},e.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},e.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},e.currentSource=function(){return this.cache_.source||{}},e.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},e.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t="undefined"==typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},e.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},e.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},e.poster=function(e){if(void 0===e)return this.poster_;(e=e||"")!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},e.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&e.message&&e.message===this.localize(this.options_.notSupportedMessage)){function t(){this.error(e)}return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",function(){this.off(["click","touchstart"],t)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new kt(e),this.addClass("vjs-error"),y.error("(CODE:"+this.error_.code+" "+kt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},e.reportUserActivity=function(e){this.userActivity_=!0},e.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.listenForUserActivity_=function(){var t,n,r,i=Ce(this,this.reportUserActivity);this.on("mousedown",function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}),this.on("mousemove",function(e){e.screenX===n&&e.screenY===r||(n=e.screenX,r=e.screenY,i())}),this.on("mouseup",function(e){i(),this.clearInterval(t)});var o,e=this.getChild("controlBar");!e||Qe||Ze||(e.on("mouseenter",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0}),e.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",i),this.on("keyup",i),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var e=this.options_.inactivityTimeout;e<=0||(o=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},e.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},e.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},e.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},e.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},e.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t=t||e,this.tech_)return this.tech_.removeRemoteTextTrack(t)},e.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},e.languages=function(){return Be(c.prototype.options_.languages,this.languages_)},e.toJSON=function(){var e=Be(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=Be(r)).player=void 0,e.tracks[n]=r}return e},e.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new Dt(this,t);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},e.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<ss.length;n++){var r=ss[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(as[e]),this.addClass(as[r]),this.breakpoint_=r;break}}},e.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},e.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=_({},ls,e),this.updateCurrentBreakpoint_()),_(this.breakpoints_)},e.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?((this.responsive_=e)?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},e.currentBreakpoint=function(){return this.breakpoint_},e.currentBreakpointClass=function(){return as[this.breakpoint_]||""},e.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Be(e);var r=this.cache_.media,i=r.artwork,o=r.poster,s=r.src,a=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:mi(o)}]),s&&this.src(s),o&&this.poster(o),Array.isArray(a)&&a.forEach(function(e){return n.addRemoteTextTrack(e,!1)}),this.ready(t)}},e.getMedia=function(){if(this.cache_.media)return Be(this.cache_.media);var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}})};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:mi(t.poster)}]),t},c.getTagSettings=function(e){var t={sources:[],tracks:[]},n=N(e),r=n["data-setup"];if(j(e,"vjs-fill")&&(n.fill=!0),j(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=Et(r||"{}"),o=i[0],s=i[1];o&&y.error(o),_(n,s)}if(_(t,n),e.hasChildNodes())for(var a=e.childNodes,l=0,c=a.length;l<c;l++){var u=a[l],h=u.nodeName.toLowerCase();"source"===h?t.sources.push(N(u)):"track"===h&&t.tracks.push(N(u))}return t},e.flexNotSupported_=function(){var e=d.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},c}(Ve);Ir.names.forEach(function(e){var t=Ir[e];cs.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),cs.players={};var us=h.navigator;cs.prototype.options_={techOrder:ai.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:us&&(us.languages&&us.languages[0]||us.userLanguage||us.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){cs.prototype[e]=function(){return this.techGet_(e)}}),is.forEach(function(e){cs.prototype["handleTech"+Fe(e)+"_"]=function(){return this.trigger(e)}}),Ve.registerComponent("Player",cs);function hs(e){return ms.hasOwnProperty(e)}function ds(e){return hs(e)?ms[e]:void 0}function ps(e,t){e[gs]=e[gs]||{},e[gs][t]=!0}function fs(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)}function vs(i,o){return o.prototype.name=i,function(){fs(this,{name:i,plugin:o,instance:null},!0);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=s(o,[this].concat(t));return this[i]=function(){return r},fs(this,r.getEventHash()),r}}var ys="plugin",gs="activePlugins_",ms={},_s=function(){function n(e){if(this.constructor===n)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,Ne(this),delete this.trigger,Re(this,this.constructor.defaultState),ps(e,this.name),this.dispose=Ce(this,this.dispose),e.on("dispose",this.dispose)}var e=n.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.trigger=function(e,t){return void 0===t&&(t={}),pe(this.eventBusEl_,e,this.getEventHash(t))},e.handleStateChanged=function(e){},e.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[gs][e]=!1,this.player=this.state=null,t[e]=vs(e,ms[e])},n.isBasic=function(e){var t="string"==typeof e?ds(e):e;return"function"==typeof t&&!n.prototype.isPrototypeOf(t.prototype)},n.registerPlugin=function(e,t){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+typeof e+".");if(hs(e))y.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(cs.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof t)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+typeof t+".");return ms[e]=t,e!==ys&&(n.isBasic(t)?cs.prototype[e]=function(t,n){function r(){fs(this,{name:t,plugin:n,instance:null},!0);var e=n.apply(this,arguments);return ps(this,t),fs(this,{name:t,plugin:n,instance:e}),e}return Object.keys(n).forEach(function(e){r[e]=n[e]}),r}(e,t):cs.prototype[e]=vs(e,t)),t},n.deregisterPlugin=function(e){if(e===ys)throw new Error("Cannot de-register base plugin.");hs(e)&&(delete ms[e],delete cs.prototype[e])},n.getPlugins=function(e){var n;return void 0===e&&(e=Object.keys(ms)),e.forEach(function(e){var t=ds(e);t&&((n=n||{})[e]=t)}),n},n.getPluginVersion=function(e){var t=ds(e);return t&&t.VERSION||""},n}();_s.getPlugin=ds,_s.BASE_PLUGIN_NAME=ys,_s.registerPlugin(ys,_s),cs.prototype.usingPlugin=function(e){return!!this[gs]&&!0===this[gs][e]},cs.prototype.hasPlugin=function(e){return!!hs(e)};var bs=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Ts(e,n,t){var r=Ts.getPlayer(e);if(r)return n&&y.warn('Player "'+e+'" is already initialised. Options will not be applied.'),t&&r.ready(t),r;var i="string"==typeof e?Y("#"+bs(e)):e;if(!E(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||y.warn("The element supplied is not included in the DOM"),n=n||{},Ts.hooks("beforesetup").forEach(function(e){var t=e(i,Be(n));b(t)&&!Array.isArray(t)?n=Be(n,t):y.error("please return an object in beforesetup hooks")});var o=Ve.getComponent("Player");return r=new o(i,n,t),Ts.hooks("setup").forEach(function(e){return e(r)}),r}if(Ts.hooks_={},Ts.hooks=function(e,t){return Ts.hooks_[e]=Ts.hooks_[e]||[],t&&(Ts.hooks_[e]=Ts.hooks_[e].concat(t)),Ts.hooks_[e]},Ts.hook=function(e,t){Ts.hooks(e,t)},Ts.hookOnce=function(n,e){Ts.hooks(n,[].concat(e).map(function(t){return function e(){return Ts.removeHook(n,e),t.apply(void 0,arguments)}}))},Ts.removeHook=function(e,t){var n=Ts.hooks(e).indexOf(t);return!(n<=-1)&&(Ts.hooks_[e]=Ts.hooks_[e].slice(),Ts.hooks_[e].splice(n,1),!0)},!0!==h.VIDEOJS_NO_DYNAMIC_STYLE&&C()){var ks=Y(".vjs-styles-defaults");if(!ks){ks=Te("vjs-styles-defaults");var Cs=Y("head");Cs&&Cs.insertBefore(ks,Cs.firstChild),ke(ks,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}return be(1,Ts),Ts.VERSION=p,Ts.options=cs.prototype.options_,Ts.getPlayers=function(){return cs.players},Ts.getPlayer=function(e){var t,n=cs.players;if("string"==typeof e){var r=bs(e),i=n[r];if(i)return i;t=Y("#"+r)}else t=e;if(E(t)){var o=t,s=o.player,a=o.playerId;if(s||n[a])return s||n[a]}},Ts.getAllPlayers=function(){return Object.keys(cs.players).map(function(e){return cs.players[e]}).filter(Boolean)},Ts.players=cs.players,Ts.getComponent=Ve.getComponent,Ts.registerComponent=function(e,t){ai.isTech(t)&&y.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Ve.registerComponent.call(Ve,e,t)},Ts.getTech=ai.getTech,Ts.registerTech=ai.registerTech,Ts.use=function(e,t){li[e]=li[e]||[],li[e].push(t)},Object.defineProperty(Ts,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Ts.middleware,"TERMINATOR",{value:ui,writeable:!1,enumerable:!0}),Ts.browser=ht,Ts.TOUCH_ENABLED=ut,Ts.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)}(n,e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Ts.mergeOptions=Be,Ts.bind=Ce,Ts.registerPlugin=_s.registerPlugin,Ts.deregisterPlugin=_s.deregisterPlugin,Ts.plugin=function(e,t){return y.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),_s.registerPlugin(e,t)},Ts.getPlugins=_s.getPlugins,Ts.getPlugin=_s.getPlugin,Ts.getPluginVersion=_s.getPluginVersion,Ts.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Ts.options.languages=Be(Ts.options.languages,((n={})[e]=t,n)),Ts.options.languages[e]},Ts.log=y,Ts.createLogger=g,Ts.createTimeRange=Ts.createTimeRanges=ft,Ts.formatTime=Li,Ts.setFormatTime=function(e){Ni=e},Ts.resetFormatTime=function(){Ni=Mi},Ts.parseUrl=Ft,Ts.isCrossOrigin=$t,Ts.EventTarget=we,Ts.on=he,Ts.one=fe,Ts.off=de,Ts.trigger=pe,Ts.xhr=br,Ts.TextTrack=wr,Ts.AudioTrack=Sr,Ts.VideoTrack=xr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){Ts[e]=function(){return y.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),J[e].apply(null,arguments)}}),Ts.computedStyle=r,Ts.dom=J,Ts.url=Jt,Ts}); |