diff options
author | Andreas Hubel | 2020-06-07 21:41:40 +0200 |
---|---|---|
committer | Andreas Hubel | 2020-06-07 21:41:40 +0200 |
commit | a66c79184091efdac09ee31a3778c6fc850dbbda (patch) | |
tree | d0c8f474548d8699411b7e33ee3fde62029c13da /assets/netcut/lib/videojs/alt/video.core.novtt.min.js | |
parent | d0a9d8b2b0d28dbef209c7cbcbfd56eaeac24d9b (diff) |
add netcut assets to repo
submodules are propably to complicated for deployment.... :-)
Diffstat (limited to 'assets/netcut/lib/videojs/alt/video.core.novtt.min.js')
m--------- | assets/netcut | 0 | ||||
-rw-r--r-- | assets/netcut/lib/videojs/alt/video.core.novtt.min.js | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/assets/netcut b/assets/netcut deleted file mode 160000 -Subproject 3dcf07d83e57191c79654d97310cbeb494ea52b diff --git a/assets/netcut/lib/videojs/alt/video.core.novtt.min.js b/assets/netcut/lib/videojs/alt/video.core.novtt.min.js new file mode 100644 index 0000000..079b522 --- /dev/null +++ b/assets/netcut/lib/videojs/alt/video.core.novtt.min.js @@ -0,0 +1,12 @@ +/** + * @license + * Video.js 7.2.4 <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(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){var p="7.2.4",t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var e,d="undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{},n={},r=Object.freeze({default:n}),i=r&&n||r,o="undefined"!=typeof t?t:"undefined"!=typeof window?window:{};"undefined"!=typeof document?e=document:(e=o["__GLOBAL_DOCUMENT_CACHE@4"])||(e=o["__GLOBAL_DOCUMENT_CACHE@4"]=i);var f=e,s=void 0,a="info",l=[],c=function(t,e){var n=s.levels[a],r=new RegExp("^("+n+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),l&&l.push([].concat(e)),e.unshift("VIDEOJS:"),d.console){var i=d.console[t];i||"debug"!==t||(i=d.console.info||d.console.log),i&&n&&r.test(t)&&i[Array.isArray(e)?"apply":"call"](d.console,e)}};(s=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];c("log",e)}).levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},s.level=function(t){if("string"==typeof t){if(!s.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');a=t}return a},s.history=function(){return l?[].concat(l):[]},s.history.clear=function(){l&&(l.length=0)},s.history.disable=function(){null!==l&&(l.length=0,l=null)},s.history.enable=function(){null===l&&(l=[])},s.error=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return c("error",e)},s.warn=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return c("warn",e)},s.debug=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return c("debug",e)};var y=s;var v=function(t){for(var e="",n=0;n<arguments.length;n++)e+=t[n].replace(/\n\r?\s*/g,"")+(arguments[n+1]||"");return e},u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},m=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},_=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},h=function(t,e){return t.raw=e,t},b=Object.prototype.toString,T=function(t){return E(t)?Object.keys(t):[]};function C(e,n){T(e).forEach(function(t){return n(e[t],t)})}function k(n){for(var t=arguments.length,e=Array(1<t?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[n].concat(e)):(e.forEach(function(t){t&&C(t,function(t,e){n[e]=t})}),n)}function E(t){return!!t&&"object"===("undefined"==typeof t?"undefined":u(t))}function S(t){return E(t)&&"[object Object]"===b.call(t)&&t.constructor===Object}function w(t,e){if(!t||!e)return"";if("function"==typeof d.getComputedStyle){var n=d.getComputedStyle(t);return n?n[e]:""}return""}var x=h(["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 ","."],["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 ","."]);function j(t){return"string"==typeof t&&/\S/.test(t)}function P(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function A(){return f===d.document}function O(t){return E(t)&&1===t.nodeType}function M(){try{return d.parent!==d.self}catch(t){return!0}}function N(r){return function(t,e){if(!j(t))return f[r](null);j(e)&&(e=f.querySelector(e));var n=O(e)?e:f;return n[r]&&n[r](t)}}function I(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=f.createElement(t);return Object.getOwnPropertyNames(n).forEach(function(t){var e=n[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(y.warn(v(x,t,e)),i.setAttribute(t,e)):"textContent"===t?D(i,e):i[t]=e}),Object.getOwnPropertyNames(e).forEach(function(t){i.setAttribute(t,e[t])}),r&&tt(i,r),i}function D(t,e){return"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e,t}function L(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function F(t,e){return P(e),t.classList?t.classList.contains(e):(n=e,new RegExp("(^|\\s)"+n+"($|\\s)")).test(t.className);var n}function R(t,e){return t.classList?t.classList.add(e):F(t,e)||(t.className=(t.className+" "+e).trim()),t}function B(t,e){return t.classList?t.classList.remove(e):(P(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function H(t,e,n){var r=F(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?R(t,e):B(t,e),t}function V(n,r){Object.getOwnPropertyNames(r).forEach(function(t){var e=r[t];null===e||"undefined"==typeof e||!1===e?n.removeAttribute(t):n.setAttribute(t,!0===e?"":e)})}function z(t){var e={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&0<t.attributes.length)for(var r=t.attributes,i=r.length-1;0<=i;i--){var o=r[i].name,s=r[i].value;"boolean"!=typeof t[o]&&-1===n.indexOf(","+o+",")||(s=null!==s),e[o]=s}return e}function W(t,e){return t.getAttribute(e)}function U(t,e,n){t.setAttribute(e,n)}function q(t,e){t.removeAttribute(e)}function K(){f.body.focus(),f.onselectstart=function(){return!1}}function X(){f.onselectstart=function(){return!0}}function $(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(n[t]=e[t])}),n.height||(n.height=parseFloat(w(t,"height"))),n.width||(n.width=parseFloat(w(t,"width"))),n}}function G(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=f.documentElement,r=f.body,i=n.clientLeft||r.clientLeft||0,o=d.pageXOffset||r.scrollLeft,s=e.left+o-i,a=n.clientTop||r.clientTop||0,l=d.pageYOffset||r.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function Y(t,e){var n={},r=G(t),i=t.offsetWidth,o=t.offsetHeight,s=r.top,a=r.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.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 J(t){return E(t)&&3===t.nodeType}function Q(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Z(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),O(t)||J(t)?t:"string"==typeof t&&/\S/.test(t)?f.createTextNode(t):void 0}).filter(function(t){return t})}function tt(e,t){return Z(t).forEach(function(t){return e.appendChild(t)}),e}function et(t,e){return tt(Q(t),e)}function nt(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons)}var rt=N("querySelector"),it=N("querySelectorAll"),ot=Object.freeze({isReal:A,isEl:O,isInFrame:M,createEl:I,textContent:D,prependTo:L,hasClass:F,addClass:R,removeClass:B,toggleClass:H,setAttributes:V,getAttributes:z,getAttribute:W,setAttribute:U,removeAttribute:q,blockTextSelection:K,unblockTextSelection:X,getBoundingClientRect:$,findPosition:G,getPointerPosition:Y,isTextNode:J,emptyEl:Q,normalizeContent:Z,appendContent:tt,insertContent:et,isSingleLeftClick:nt,$:rt,$$:it}),st=1;function at(){return st++}var lt={},ct="vdata"+(new Date).getTime();function ut(t){var e=t[ct];return e||(e=t[ct]=at()),lt[e]||(lt[e]={}),lt[e]}function ht(t){var e=t[ct];return!!e&&!!Object.getOwnPropertyNames(lt[e]).length}function pt(e){var t=e[ct];if(t){delete lt[t];try{delete e[ct]}catch(t){e.removeAttribute?e.removeAttribute(ct):e[ct]=null}}}function dt(t,e){var n=ut(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&pt(t)}function ft(e,n,t,r){t.forEach(function(t){e(n,t,r)})}function yt(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||d.event;for(var i in t={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(t[i]=r[i]));if(t.target||(t.target=t.srcElement||f),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var o=f.documentElement,s=f.body;t.pageX=t.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var vt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){vt=!0}});d.addEventListener("test",null,t),d.removeEventListener("test",null,t)}catch(t){}}();var gt=["touchstart","touchmove"];function mt(s,t,e){if(Array.isArray(t))return ft(mt,s,t,e);var a=ut(s);if(a.handlers||(a.handlers={}),a.handlers[t]||(a.handlers[t]=[]),e.guid||(e.guid=at()),a.handlers[t].push(e),a.dispatcher||(a.disabled=!1,a.dispatcher=function(t,e){if(!a.disabled){t=yt(t);var n=a.handlers[t.type];if(n)for(var r=n.slice(0),i=0,o=r.length;i<o&&!t.isImmediatePropagationStopped();i++)try{r[i].call(s,t,e)}catch(t){y.error(t)}}}),1===a.handlers[t].length)if(s.addEventListener){var n=!1;vt&&-1<gt.indexOf(t)&&(n={passive:!0}),s.addEventListener(t,a.dispatcher,n)}else s.attachEvent&&s.attachEvent("on"+t,a.dispatcher)}function _t(t,e,n){if(ht(t)){var r=ut(t);if(r.handlers){if(Array.isArray(e))return ft(_t,t,e,n);var i=function(t,e){r.handlers[e]=[],dt(t,e)};if(void 0!==e){var o=r.handlers[e];if(o)if(n){if(n.guid)for(var s=0;s<o.length;s++)o[s].guid===n.guid&&o.splice(s--,1);dt(t,e)}else i(t,e)}else for(var a in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},a)&&i(t,a)}}}function bt(t,e,n){var r=ht(t)?ut(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=yt(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)bt.call(null,i,e,n);else if(!i&&!e.defaultPrevented){var o=ut(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function Tt(e,n,r){if(Array.isArray(n))return ft(Tt,e,n,r);var t=function t(){_t(e,n,t),r.apply(this,arguments)};t.guid=r.guid=r.guid||at(),mt(e,n,t)}var Ct=Object.freeze({fixEvent:yt,on:mt,off:_t,trigger:bt,one:Tt}),kt=!1,Et=void 0,St=function(){if(A()&&!1!==Et.options.autoSetup){var t=Array.prototype.slice.call(f.getElementsByTagName("video")),e=Array.prototype.slice.call(f.getElementsByTagName("audio")),n=Array.prototype.slice.call(f.getElementsByTagName("video-js")),r=t.concat(e,n);if(r&&0<r.length)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(!s||!s.getAttribute){wt(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Et(s)}else kt||wt(1)}};function wt(t,e){e&&(Et=e),d.setTimeout(St,t)}A()&&"complete"===f.readyState?kt=!0:Tt(d,"load",function(){kt=!0});var xt=function(t){var e=f.createElement("style");return e.className=t,e},jt=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},Pt=function(t,e,n){e.guid||(e.guid=at());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},At=function(e,n){var r=Date.now();return function(){var t=Date.now();n<=t-r&&(e.apply(void 0,arguments),r=t)}},Ot=function(r,i,o){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:d,a=void 0,t=function(){var t=this,e=arguments,n=function(){n=a=null,o||r.apply(t,e)};!a&&o&&r.apply(t,e),s.clearTimeout(a),a=s.setTimeout(n,i)};return t.cancel=function(){s.clearTimeout(a),a=null},t},Mt=function(){};Mt.prototype.allowedEvents_={},Mt.prototype.addEventListener=Mt.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},mt(this,t,e),this.addEventListener=n},Mt.prototype.removeEventListener=Mt.prototype.off=function(t,e){_t(this,t,e)},Mt.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Tt(this,t,e),this.addEventListener=n},Mt.prototype.dispatchEvent=Mt.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=yt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),bt(this,t)};var Nt=void 0;Mt.prototype.queueTrigger=function(t){var e=this;Nt||(Nt=new Map);var n=t.type||t,r=Nt.get(this);r||(r=new Map,Nt.set(this,r));var i=r.get(n);r.delete(n),d.clearTimeout(i);var o=d.setTimeout(function(){0===r.size&&(r=null,Nt.delete(e)),e.trigger(t)},0);r.set(n,o)};var It=function(e){return e instanceof Mt||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},Dt=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Lt=function(t){if(!t.nodeName&&!It(t))throw new Error("Invalid target; must be a DOM node or evented object.")},Ft=function(t){if(!Dt(t))throw new Error("Invalid event type; must be a non-empty string or array.")},Rt=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},Bt=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,3<=e.length&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),Lt(r),Ft(i),Rt(o),{isTargetingSelf:n,target:r,type:i,listener:o=Pt(t,o)}},Ht=function(t,e,n,r){Lt(t),t.nodeName?Ct[e](t,n,r):t[e](n,r)},Vt={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=Bt(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(Ht(s,"on",a,l),!o){var c=function(){return t.off(s,a,l)};c.guid=l.guid;var u=function(){return t.off("dispose",c)};u.guid=l.guid,Ht(this,"on","dispose",c),Ht(s,"on","dispose",u)}},one:function(){for(var i=this,t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Bt(this,e),o=r.isTargetingSelf,s=r.target,a=r.type,l=r.listener;if(o)Ht(s,"one",a,l);else{var c=function t(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];i.off(s,a,t),l.apply(null,n)};c.guid=l.guid,Ht(s,"one",a,c)}},off:function(t,e,n){if(!t||Dt(t))_t(this.eventBusEl_,t,e);else{var r=t,i=e;Lt(r),Ft(i),Rt(n),n=Pt(this,n),this.off("dispose",n),r.nodeName?(_t(r,i,n),_t(r,"dispose",n)):It(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return bt(this.eventBusEl_,t,e)}};function zt(t){var e=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).eventBusKey;if(e){if(!t[e].nodeName)throw new Error('The eventBusKey "'+e+'" does not refer to an element.');t.eventBusEl_=t[e]}else t.eventBusEl_=I("span",{className:"vjs-event-bus"});return k(t,Vt),t.on("dispose",function(){t.off(),d.setTimeout(function(){t.eventBusEl_=null},0)}),t}var Wt={state:{},setState:function(t){var n=this;"function"==typeof t&&(t=t());var r=void 0;return C(t,function(t,e){n.state[e]!==t&&((r=r||{})[e]={from:n.state[e],to:t}),n.state[e]=t}),r&&It(this)&&this.trigger({changes:r,type:"statechanged"}),r}};function Ut(t,e){return k(t,Wt),t.state=k({},t.state,e),"function"==typeof t.handleStateChanged&&It(t)&&t.on("statechanged",t.handleStateChanged),t}function qt(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Kt(){for(var n={},t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.forEach(function(t){t&&C(t,function(t,e){S(t)?(S(n[e])||(n[e]={}),n[e]=Kt(n[e],t)):n[e]=t})}),n}var Xt=function(){function c(t,e,n){if(g(this,c),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=Kt({},this.options_),e=this.options_=Kt(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){var r=t&&t.id&&t.id()||"no_player";this.id_=r+"_component_"+at()}this.name_=e.name||null,e.el?this.el_=e.el:!1!==e.createEl&&(this.el_=this.createEl()),!1!==e.evented&&zt(this,{eventBusKey:this.el_?"el_":null}),Ut(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},!(this.childNameIndex_={})!==e.initChildren&&this.initChildren(),this.ready(n),!1!==e.reportTouchActivity&&this.enableTouchActivity()}return c.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;0<=t;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),pt(this.el_),this.el_=null),this.player_=null},c.prototype.player=function(){return this.player_},c.prototype.options=function(t){return y.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t&&(this.options_=Kt(this.options_,t)),this.options_},c.prototype.el=function(){return this.el_},c.prototype.createEl=function(t,e,n){return I(t,e,n)},c.prototype.localize=function(t,i){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t,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=e;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),i&&(l=l.replace(/\{(\d+)\}/g,function(t,e){var n=i[e-1],r=n;return"undefined"==typeof n&&(r=t),r})),l},c.prototype.contentEl=function(){return this.contentEl_||this.el_},c.prototype.id=function(){return this.id_},c.prototype.name=function(){return this.name_},c.prototype.children=function(){return this.children_},c.prototype.getChildById=function(t){return this.childIndex_[t]},c.prototype.getChild=function(t){if(t)return t=qt(t),this.childNameIndex_[t]},c.prototype.addChild=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.children_.length,r=void 0,i=void 0;if("string"==typeof t){i=qt(t);var o=e.componentClass||i;e.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,e)}else r=t;if(this.children_.splice(n,0,r),"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(i=i||r.name&&qt(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},c.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;0<=n;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},c.prototype.initChildren=function(){var i=this,r=this.options_.children;if(r){var o=this.options_,t=void 0,n=c.getComponent("Tech");(t=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter(function(e){return!t.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(t){var e=void 0,n=void 0;return"string"==typeof t?n=r[e=t]||i.options_[e]||{}:(e=t.name,n=t),{name:e,opts:n}}).filter(function(t){var e=c.getComponent(t.opts.componentClass||qt(t.name));return e&&!n.isTech(e)}).forEach(function(t){var e=t.name,n=t.opts;if(void 0!==o[e]&&(n=o[e]),!1!==n){!0===n&&(n={}),n.playerOptions=i.options_.playerOptions;var r=i.addChild(e,n);r&&(i[e]=r)}})}},c.prototype.buildCSSClass=function(){return""},c.prototype.ready=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},c.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&0<t.length&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},c.prototype.$=function(t,e){return rt(t,e||this.contentEl())},c.prototype.$$=function(t,e){return it(t,e||this.contentEl())},c.prototype.hasClass=function(t){return F(this.el_,t)},c.prototype.addClass=function(t){R(this.el_,t)},c.prototype.removeClass=function(t){B(this.el_,t)},c.prototype.toggleClass=function(t,e){H(this.el_,t,e)},c.prototype.show=function(){this.removeClass("vjs-hidden")},c.prototype.hide=function(){this.addClass("vjs-hidden")},c.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},c.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},c.prototype.getAttribute=function(t){return W(this.el_,t)},c.prototype.setAttribute=function(t,e){U(this.el_,t,e)},c.prototype.removeAttribute=function(t){q(this.el_,t)},c.prototype.width=function(t,e){return this.dimension("width",t,e)},c.prototype.height=function(t,e){return this.dimension("height",t,e)},c.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},c.prototype.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e==e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+qt(t)],10)},c.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof d.getComputedStyle){var n=d.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var r="offset"+qt(t);e=this.el_[r]}return e},c.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},c.prototype.currentWidth=function(){return this.currentDimension("width")},c.prototype.currentHeight=function(){return this.currentDimension("height")},c.prototype.focus=function(){this.el_.focus()},c.prototype.blur=function(){this.el_.blur()},c.prototype.emitTapEvents=function(){var e=0,r=null,i=void 0;this.on("touchstart",function(t){1===t.touches.length&&(r={pageX:t.touches[0].pageX,pageY:t.touches[0].pageY},e=(new Date).getTime(),i=!0)}),this.on("touchmove",function(t){if(1<t.touches.length)i=!1;else if(r){var e=t.touches[0].pageX-r.pageX,n=t.touches[0].pageY-r.pageY;10<Math.sqrt(e*e+n*n)&&(i=!1)}});var t=function(){i=!1};this.on("touchleave",t),this.on("touchcancel",t),this.on("touchend",function(t){!(r=null)===i&&((new Date).getTime()-e<200&&(t.preventDefault(),this.trigger("tap")))})},c.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=Pt(this.player(),this.player().reportUserActivity),n=void 0;this.on("touchstart",function(){e(),this.clearInterval(n),n=this.setInterval(e,250)});var t=function(t){e(),this.clearInterval(n)};this.on("touchmove",e),this.on("touchend",t),this.on("touchcancel",t)}},c.prototype.setTimeout=function(t,e){var n,r,i=this;return t=Pt(this,t),n=d.setTimeout(function(){i.off("dispose",r),t()},e),(r=function(){return i.clearTimeout(n)}).guid="vjs-timeout-"+n,this.on("dispose",r),n},c.prototype.clearTimeout=function(t){d.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},c.prototype.setInterval=function(t,e){var n=this;t=Pt(this,t);var r=d.setInterval(t,e),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},c.prototype.clearInterval=function(t){d.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},c.prototype.requestAnimationFrame=function(t){var e,n,r=this;return this.supportsRaf_?(t=Pt(this,t),e=d.requestAnimationFrame(function(){r.off("dispose",n),t()}),(n=function(){return r.cancelAnimationFrame(e)}).guid="vjs-raf-"+e,this.on("dispose",n),e):this.setTimeout(t,1e3/60)},c.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){d.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},c.registerComponent=function(t,e){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var n=c.getComponent("Tech"),r=n&&n.isTech(e),i=c===e||c.prototype.isPrototypeOf(e.prototype);if(r||!i){var o=void 0;throw o=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+o+".")}t=qt(t),c.components_||(c.components_={});var s=c.getComponent("Player");if("Player"===t&&s&&s.players){var a=s.players,l=Object.keys(a);if(a&&0<l.length&&l.map(function(t){return a[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return c.components_[t]=e},c.getComponent=function(t){if(t)return t=qt(t),c.components_&&c.components_[t]?c.components_[t]:void 0},c}();Xt.prototype.supportsRaf_="function"==typeof d.requestAnimationFrame&&"function"==typeof d.cancelAnimationFrame,Xt.registerComponent("Component",Xt);var $t,Gt,Yt,Jt,Qt=d.navigator&&d.navigator.userAgent||"",Zt=/AppleWebKit\/([\d.]+)/i.exec(Qt),te=Zt?parseFloat(Zt.pop()):null,ee=/iPad/i.test(Qt),ne=/iPhone/i.test(Qt)&&!ee,re=/iPod/i.test(Qt),ie=ne||ee||re,oe=($t=Qt.match(/OS (\d+)_/i))&&$t[1]?$t[1]:null,se=/Android/i.test(Qt),ae=function(){var t=Qt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),le=se&&ae<5&&te<537,ce=/Firefox/i.test(Qt),ue=/Edge/i.test(Qt),he=!ue&&(/Chrome/i.test(Qt)||/CriOS/i.test(Qt)),pe=(Gt=Qt.match(/(Chrome|CriOS)\/(\d+)/))&&Gt[2]?parseFloat(Gt[2]):null,de=(Yt=/MSIE\s(\d+)\.\d/.exec(Qt),!(Jt=Yt&&parseFloat(Yt[1]))&&/Trident\/7.0/i.test(Qt)&&/rv:11.0/.test(Qt)&&(Jt=11),Jt),fe=/Safari/i.test(Qt)&&!he&&!se&&!ue,ye=(fe||ie)&&!he,ve=A()&&("ontouchstart"in d||d.navigator.maxTouchPoints||d.DocumentTouch&&d.document instanceof d.DocumentTouch),ge=Object.freeze({IS_IPAD:ee,IS_IPHONE:ne,IS_IPOD:re,IS_IOS:ie,IOS_VERSION:oe,IS_ANDROID:se,ANDROID_VERSION:ae,IS_NATIVE_ANDROID:le,IS_FIREFOX:ce,IS_EDGE:ue,IS_CHROME:he,CHROME_VERSION:pe,IE_VERSION:de,IS_SAFARI:fe,IS_ANY_SAFARI:ye,TOUCH_ENABLED:ve});function me(t,e,n,r){return function(t,e,n){if("number"!=typeof e||e<0||n<e)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}(t,r,n.length-1),n[r][e]}function _e(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:me.bind(null,"start",0,t),end:me.bind(null,"end",1,t)}}function be(t,e){return Array.isArray(t)?_e(t):void 0===t||void 0===e?_e():_e([[t,e]])}function Te(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=be(0,0));for(var o=0;o<t.length;o++)r=t.start(o),e<(i=t.end(o))&&(i=e),n+=i-r;return n/e}for(var Ce={},ke=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Ee=ke[0],Se=void 0,we=0;we<ke.length;we++)if(ke[we][1]in f){Se=ke[we];break}if(Se)for(var xe=0;xe<Se.length;xe++)Ce[Ee[xe]]=Se[xe];function je(t){if(t instanceof je)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:E(t)&&("number"==typeof t.code&&(this.code=t.code),k(this,t)),this.message||(this.message=je.defaultMessages[this.code]||"")}je.prototype.code=0,je.prototype.message="",je.prototype.status=null,je.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],je.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 Pe=0;Pe<je.errorTypes.length;Pe++)je[je.errorTypes[Pe]]=Pe,je.prototype[je.errorTypes[Pe]]=Pe;var Ae=function(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(t){r=t}return[r,n]};function Oe(t){return null!=t&&"function"==typeof t.then}function Me(t){Oe(t)&&t.then(null,function(t){})}var Ne=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,e,n){return r[e]&&(t[e]=r[e]),t},{cues:r.cues&&Array.prototype.map.call(r.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},Ie=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=Ne(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===n.indexOf(t)}).map(Ne))},De=function(t,n){return t.forEach(function(t){var e=n.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return e.addCue(t)})}),n.textTracks()},Le="vjs-modal-dialog",Fe=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=I("div",{className:Le+"-content"},{role:"document"}),n.descEl_=I("p",{className:Le+"-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),D(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}return m(i,r),i.prototype.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"})},i.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,r.prototype.dispose.call(this)},i.prototype.buildCSSClass=function(){return Le+" vjs-hidden "+r.prototype.buildCSSClass.call(this)},i.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},i.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},i.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},i.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",Pt(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},i.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",Pt(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!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)}!e&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},i.prototype.fill=function(){this.fillWith(this.content())},i.prototype.fillWith=function(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),et(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},i.prototype.empty=function(){this.trigger("beforemodalempty"),Q(this.contentEl()),this.trigger("modalempty")},i.prototype.content=function(t){return"undefined"!=typeof t&&(this.content_=t),this.content_},i.prototype.conditionalFocus_=function(){var t=f.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(f,"keydown",this.handleKeyDown))},i.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(f,"keydown",this.handleKeyDown)},i.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<e.length;i++)if(n===e[i]){r=i;break}f.activeElement===this.el_&&(r=0),t.shiftKey&&0===r?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||r!==e.length-1||(e[0].focus(),t.preventDefault())}},i.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof d.HTMLAnchorElement||t instanceof d.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof d.HTMLInputElement||t instanceof d.HTMLSelectElement||t instanceof d.HTMLTextAreaElement||t instanceof d.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof d.HTMLIFrameElement||t instanceof d.HTMLObjectElement||t instanceof d.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},i}(Xt);Fe.prototype.options_={pauseOnOpen:!0,temporary:!0},Xt.registerComponent("ModalDialog",Fe);var Re=function(r){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,i);var e=_(this,r.call(this));e.tracks_=[],Object.defineProperty(e,"length",{get:function(){return this.tracks_.length}});for(var n=0;n<t.length;n++)e.addTrack(t[n]);return e}return m(i,r),i.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},i.prototype.removeTrack=function(t){for(var e=void 0,n=0,r=this.length;n<r;n++)if(this[n]===t){(e=this[n]).off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack"})},i.prototype.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},i}(Mt);for(var Be in Re.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Re.prototype.allowedEvents_)Re.prototype["on"+Be]=null;var He=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},Ve=function(r){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,i);for(var e=t.length-1;0<=e;e--)if(t[e].enabled){He(t,t[e]);break}var n=_(this,r.call(this,t));return n.changing_=!1,n}return m(i,r),i.prototype.addTrack=function(t){var e=this;t.enabled&&He(this,t),r.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",function(){e.changing_||(e.changing_=!0,He(e,t),e.changing_=!1,e.trigger("change"))})},i}(Re),ze=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},We=function(r){function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,i);for(var e=t.length-1;0<=e;e--)if(t[e].selected){ze(t,t[e]);break}var n=_(this,r.call(this,t));return n.changing_=!1,Object.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n}return m(i,r),i.prototype.addTrack=function(t){var e=this;t.selected&&ze(this,t),r.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",function(){e.changing_||(e.changing_=!0,ze(e,t),e.changing_=!1,e.trigger("change"))})},i}(Re),Ue=function(e){function t(){return g(this,t),_(this,e.apply(this,arguments))}return m(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",Pt(this,function(){this.queueTrigger("change")}));-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",Pt(this,function(){this.trigger("selectedlanguagechange")}))},t}(Re),qe=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];g(this,r),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,n=t.length;e<n;e++)this.addTrackElement_(t[e])}return r.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},r.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},r.prototype.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},r}(),Ke=function(){function e(t){g(this,e),e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}return e.prototype.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},e.prototype.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(),Xe={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},$e={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ge={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ye={disabled:"disabled",hidden:"hidden",showing:"showing"},Je=function(o){function s(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,s);var e=_(this,o.call(this)),n={id:t.id||"vjs_track_"+at(),kind:t.kind||"",label:t.label||"",language:t.language||""},r=function(t){Object.defineProperty(e,t,{get:function(){return n[t]},set:function(){}})};for(var i in n)r(i);return e}return m(s,o),s}(Mt),Qe=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=f.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&((i=f.createElement("div")).innerHTML='<a href="'+t+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),f.body.appendChild(i));for(var o={},s=0;s<e.length;s++)o[e[s]]=n[e[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=d.location.protocol),r&&f.body.removeChild(i),o},Ze=function(t){if(!t.match(/^https?:\/\//)){var e=f.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},tn=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(e)return e.pop().toLowerCase()}return""},en=function(t){var e=d.location,n=Qe(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},nn=Object.freeze({parseUrl:Qe,getAbsoluteURL:Ze,getFileExtension:tn,isCrossOrigin:en}),rn=function(t){var e=on.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},on=Object.prototype.toString;var sn,an=(function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}(sn={exports:{}},sn.exports),sn.exports),ln=(an.left,an.right,function(t,e,n){if(!rn(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this);"[object Array]"===cn.call(t)?function(t,e,n){for(var r=0,i=t.length;r<i;r++)un.call(t,r)&&e.call(n,t[r],r,t)}(t,e,n):"string"==typeof t?function(t,e,n){for(var r=0,i=t.length;r<i;r++)e.call(n,t.charAt(r),r,t)}(t,e,n):function(t,e,n){for(var r in t)un.call(t,r)&&e.call(n,t[r],r,t)}(t,e,n)}),cn=Object.prototype.toString,un=Object.prototype.hasOwnProperty;var hn=function(t){if(!t)return{};var o={};return ln(an(t).split("\n"),function(t){var e,n=t.indexOf(":"),r=an(t.slice(0,n)).toLowerCase(),i=an(t.slice(n+1));"undefined"==typeof o[r]?o[r]=i:(e=o[r],"[object Array]"===Object.prototype.toString.call(e)?o[r].push(i):o[r]=[o[r],i])}),o},pn=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)dn.call(n,r)&&(t[r]=n[r])}return t},dn=Object.prototype.hasOwnProperty;var fn=vn;function yn(t,e,n){var r=t;return rn(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=pn(e,{uri:t}),r.callback=n,r}function vn(t,e,n){return gn(e=yn(t,e,n))}function gn(r){if("undefined"==typeof r.callback)throw new Error("callback argument missing");var i=!1,o=function(t,e,n){i||(i=!0,r.callback(t,e,n))};function e(t){return clearTimeout(l),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,o(t,y)}function t(){if(!s){var t;clearTimeout(l),t=r.useXDR&&void 0===a.status?200:1223===a.status?204:a.status;var e=y,n=null;return 0!==t?(e={body:function(){var t=void 0;if(t=a.response?a.response:a.responseText||function(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}(a),f)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:t,method:u,headers:{},url:c,rawRequest:a},a.getAllResponseHeaders&&(e.headers=hn(a.getAllResponseHeaders()))):n=new Error("Internal XMLHttpRequest Error"),o(n,e,e.body)}}var n,s,a=r.xhr||null;a||(a=r.cors||r.useXDR?new vn.XDomainRequest:new vn.XMLHttpRequest);var l,c=a.url=r.uri||r.url,u=a.method=r.method||"GET",h=r.body||r.data,p=a.headers=r.headers||{},d=!!r.sync,f=!1,y={body:void 0,headers:{},statusCode:0,method:u,url:c,rawRequest:a};if("json"in r&&!1!==r.json&&(f=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==u&&"HEAD"!==u&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),h=JSON.stringify(!0===r.json?h:r.json))),a.onreadystatechange=function(){4===a.readyState&&setTimeout(t,0)},a.onload=t,a.onerror=e,a.onprogress=function(){},a.onabort=function(){s=!0},a.ontimeout=e,a.open(u,c,!d,r.username,r.password),d||(a.withCredentials=!!r.withCredentials),!d&&0<r.timeout&&(l=setTimeout(function(){if(!s){s=!0,a.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",e(t)}},r.timeout)),a.setRequestHeader)for(n in p)p.hasOwnProperty(n)&&a.setRequestHeader(n,p[n]);else if(r.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(r.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in r&&(a.responseType=r.responseType),"beforeSend"in r&&"function"==typeof r.beforeSend&&r.beforeSend(a),a.send(h||null),a}vn.XMLHttpRequest=d.XMLHttpRequest||function(){},vn.XDomainRequest="withCredentials"in new vn.XMLHttpRequest?vn.XMLHttpRequest:d.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(r){vn["delete"===r?"del":r]=function(t,e,n){return(e=yn(t,e,n)).method=r.toUpperCase(),gn(e)}});var mn=function(t,e){var n=new d.WebVTT.Parser(d,d.vttjs,d.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),0<r.length&&(d.console&&d.console.groupCollapsed&&d.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach(function(t){return y.error(t)}),d.console&&d.console.groupEnd&&d.console.groupEnd()),n.flush()},_n=function(t,i){var e={uri:t},n=en(t);n&&(e.cors=n),fn(e,Pt(this,function(t,e,n){if(t)return y.error(t,e);if(i.loaded_=!0,"function"!=typeof d.WebVTT){if(i.tech_){var r=function(){return mn(n,i)};i.tech_.on("vttjsloaded",r),i.tech_.on("vttjserror",function(){y.error("vttjs failed to load, stopping trying to process "+i.src),i.tech_.off("vttjsloaded",r)})}}else mn(n,i)}))},bn=function(c){function u(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(g(this,u),!t.tech)throw new Error("A tech was not provided.");var e=Kt(t,{kind:Ge[t.kind]||"subtitles",language:t.language||t.srclang||""}),n=Ye[e.mode]||"disabled",r=e.default;"metadata"!==e.kind&&"chapters"!==e.kind||(n="hidden");var i=_(this,c.call(this,e));i.tech_=e.tech,i.cues_=[],i.activeCues_=[];var o=new Ke(i.cues_),s=new Ke(i.activeCues_),a=!1,l=Pt(i,function(){this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1)});return"disabled"!==n&&i.tech_.ready(function(){i.tech_.on("timeupdate",l)},!0),Object.defineProperties(i,{default:{get:function(){return r},set:function(){}},mode:{get:function(){return n},set:function(t){var e=this;Ye[t]&&("disabled"!==(n=t)?this.tech_.ready(function(){e.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 t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=t&&i.endTime>=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(a=!1,e.length!==this.activeCues_.length)a=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(a=!0);return this.activeCues_=e,s.setCues_(this.activeCues_),s},set:function(){}}}),e.src?(i.src=e.src,_n(e.src,i)):i.loaded_=!0,i}return m(u,c),u.prototype.addCue=function(t){var e=t;if(d.vttjs&&!(t instanceof d.vttjs.VTTCue)){for(var n in e=new d.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},u.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},u}(Je);bn.prototype.allowedEvents_={cuechange:"cuechange"};var Tn=function(i){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,o);var e=Kt(t,{kind:$e[t.kind]||""}),n=_(this,i.call(this,e)),r=!1;return Object.defineProperty(n,"enabled",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("enabledchange"))}}),e.enabled&&(n.enabled=e.enabled),n.loaded_=!0,n}return m(o,i),o}(Je),Cn=function(i){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,o);var e=Kt(t,{kind:Xe[t.kind]||""}),n=_(this,i.call(this,e)),r=!1;return Object.defineProperty(n,"selected",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("selectedchange"))}}),e.selected&&(n.selected=e.selected),n}return m(o,i),o}(Je),kn=0,En=2,Sn=function(i){function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};g(this,o);var e=_(this,i.call(this)),n=void 0,r=new bn(t);return e.kind=r.kind,e.src=r.src,e.srclang=r.language,e.label=r.label,e.default=r.default,Object.defineProperties(e,{readyState:{get:function(){return n}},track:{get:function(){return r}}}),n=kn,r.addEventListener("loadeddata",function(){n=En,e.trigger({type:"load",target:e})}),e}return m(o,i),o}(Mt);Sn.prototype.allowedEvents_={load:"load"},Sn.NONE=kn,Sn.LOADING=1,Sn.LOADED=En,Sn.ERROR=3;var wn={audio:{ListClass:Ve,TrackClass:Tn,capitalName:"Audio"},video:{ListClass:We,TrackClass:Cn,capitalName:"Video"},text:{ListClass:Ue,TrackClass:bn,capitalName:"Text"}};Object.keys(wn).forEach(function(t){wn[t].getterName=t+"Tracks",wn[t].privateName=t+"Tracks_"});var xn={remoteText:{ListClass:Ue,TrackClass:bn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:qe,TrackClass:Sn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},jn=Kt(wn,xn);xn.names=Object.keys(xn),wn.names=Object.keys(wn),jn.names=[].concat(xn.names).concat(wn.names);var Pn={};var An=function(e){function i(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){};g(this,i),n.reportTouchActivity=!1;var r=_(this,e.call(this,null,n,t));return r.hasStarted_=!1,r.on("playing",function(){this.hasStarted_=!0}),r.on("loadstart",function(){this.hasStarted_=!1}),jn.names.forEach(function(t){var e=jn[t];n&&n[e.getterName]&&(r[e.privateName]=n[e.getterName])}),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===n["native"+t+"Tracks"]&&(r["featuresNative"+t+"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 jn.text.ListClass,r.initTrackListeners(),n.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}return m(i,e),i.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",function(){return e.setTimeout(function(){return e.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},i.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},i.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},i.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Pt(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),1===(this.bufferedPercent_=t)&&this.stopTrackingProgress()}),500)},i.prototype.onDurationChange=function(t){this.duration_=this.duration()},i.prototype.buffered=function(){return be(0,0)},i.prototype.bufferedPercent=function(){return Te(this.buffered(),this.duration_)},i.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},i.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},i.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},i.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.prototype.dispose=function(){this.clearTracks(wn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},i.prototype.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach(function(t){for(var e=i[t+"Tracks"]()||[],n=e.length;n--;){var r=e[n];"text"===t&&i.removeRemoteTextTrack(r),e.removeTrack(r)}})},i.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},i.prototype.reset=function(){},i.prototype.error=function(t){return void 0!==t&&(this.error_=new je(t),this.trigger("error")),this.error_},i.prototype.played=function(){return this.hasStarted_?be(0,0):be()},i.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.prototype.initTrackListeners=function(){var i=this;wn.names.forEach(function(t){var e=wn[t],n=function(){i.trigger(t+"trackchange")},r=i[e.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),i.on("dispose",function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)})})},i.prototype.addWebVttScript_=function(){var t=this;if(!d.WebVTT)if(f.body.contains(this.el())){if(!this.options_["vtt.js"]&&S(Pn)&&0<Object.keys(Pn).length)return void this.trigger("vttjsloaded");var e=f.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),d.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},i.prototype.emulateTextTracks=function(){var t=this,n=this.textTracks(),e=this.remoteTextTracks(),r=function(t){return n.addTrack(t.track)},i=function(t){return n.removeTrack(t.track)};e.on("addtrack",r),e.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t<n.length;t++){var e=n[t];e.removeEventListener("cuechange",o),"showing"===e.mode&&e.addEventListener("cuechange",o)}};s(),n.addEventListener("change",s),n.addEventListener("addtrack",s),n.addEventListener("removetrack",s),this.on("dispose",function(){e.off("addtrack",r),e.off("removetrack",i),n.removeEventListener("change",s),n.removeEventListener("addtrack",s),n.removeEventListener("removetrack",s);for(var t=0;t<n.length;t++){n[t].removeEventListener("cuechange",o)}})},i.prototype.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new jn.text.TrackClass(i);return o.addTrack(s),s}(this,t,e,n)},i.prototype.createRemoteTextTrack=function(t){var e=Kt(t,{tech:this});return new xn.remoteTextEl.TrackClass(e)},i.prototype.addRemoteTextTrack=function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(y.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(r.track)}),r},i.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},i.prototype.getVideoPlaybackQuality=function(){return{}},i.prototype.setPoster=function(){},i.prototype.playsinline=function(){},i.prototype.setPlaysinline=function(){},i.prototype.overrideNativeAudioTracks=function(){},i.prototype.overrideNativeVideoTracks=function(){},i.prototype.canPlayType=function(){return""},i.canPlayType=function(){return""},i.canPlaySource=function(t,e){return i.canPlayType(t.type)},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,e){if(i.techs_||(i.techs_={}),!i.isTech(e))throw new Error("Tech "+t+" must be a Tech");if(!i.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!i.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=qt(t),i.techs_[t]=e,"Tech"!==t&&i.defaultTechOrder_.push(t),e},i.getTech=function(t){if(t)return t=qt(t),i.techs_&&i.techs_[t]?i.techs_[t]:d&&d.videojs&&d.videojs[t]?(y.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),d.videojs[t]):void 0},i}(Xt);jn.names.forEach(function(t){var e=jn[t];An.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),An.prototype.featuresVolumeControl=!0,An.prototype.featuresMuteControl=!0,An.prototype.featuresFullscreenResize=!1,An.prototype.featuresPlaybackRate=!1,An.prototype.featuresProgressEvents=!1,An.prototype.featuresSourceset=!1,An.prototype.featuresTimeupdateEvents=!1,An.prototype.featuresNativeTextTracks=!1,An.withSourceHandlers=function(i){i.registerSourceHandler=function(t,e){var n=i.sourceHandlers;n||(n=i.sourceHandlers=[]),void 0===e&&(e=n.length),n.splice(e,0,t)},i.canPlayType=function(t){for(var e=i.sourceHandlers||[],n=void 0,r=0;r<e.length;r++)if(n=e[r].canPlayType(t))return n;return""},i.selectSourceHandler=function(t,e){for(var n=i.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(t,e))return n[r];return null},i.canPlaySource=function(t,e){var n=i.selectSourceHandler(t,e);return n?n.canHandleSource(t,e):""};["seekable","seeking","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},i.prototype),i.prototype.setSource=function(t){var e=i.selectSourceHandler(t,this.options_);e||(i.nativeSourceHandler?e=i.nativeSourceHandler:y.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),e!==i.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=e.handleSource(t,this,this.options_),this.on("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)}},Xt.registerComponent("Tech",An),An.registerTech("Tech",An),An.defaultTechOrder_=[];var On={},Mn={},Nn={};function In(t,e,n){t.setTimeout(function(){return function n(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];var i=arguments[2];var o=arguments[3];var s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[];var a=5<arguments.length&&void 0!==arguments[5]&&arguments[5];var e=t[0],l=t.slice(1);if("string"==typeof e)n(r,On[e],i,o,s,a);else if(e){var c=function(t,e){var n=Mn[t.id()],r=null;if(null==n)return r=e(t),Mn[t.id()]=[[e,r]],r;for(var i=0;i<n.length;i++){var o=n[i],s=o[0],a=o[1];s===e&&(r=a)}null===r&&(r=e(t),n.push([e,r]));return r}(o,e);if(!c.setSource)return s.push(c),n(r,l,i,o,s,a);c.setSource(k({},r),function(t,e){if(t)return n(r,l,i,o,s,a);s.push(c),n(e,r.type===e.type?l:On[e.type],i,o,s,a)})}else l.length?n(r,l,i,o,s,a):a?i(r,s):n(r,On["*"],i,o,s,!0)}(e,On[e.type],n,t)},1)}function Dn(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,i="call"+qt(n),o=t.reduce(Bn(i),r),s=o===Nn,a=s?null:e[n](o);return function(t,e,n,r){for(var i=t.length-1;0<=i;i--){var o=t[i];o[e]&&o[e](r,n)}}(t,n,a,s),a}var Ln={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Fn={setCurrentTime:1},Rn={play:1,pause:1};function Bn(n){return function(t,e){return t===Nn?Nn:e[n]?e[n](t):t}}var Hn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Vn=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=tn(t);return Hn[e.toLowerCase()]||""};function zn(t){var e=Vn(t.src);return!t.type&&e&&(t.type=e),t}var Wn=function(c){function u(t,e,n){g(this,u);var r=Kt({createEl:!1},e),i=_(this,c.call(this,t,r,n));if(e.playerOptions.sources&&0!==e.playerOptions.sources.length)t.src(e.playerOptions.sources);else for(var o=0,s=e.playerOptions.techOrder;o<s.length;o++){var a=qt(s[o]),l=An.getTech(a);if(a||(l=Xt.getComponent(a)),l&&l.isSupported()){t.loadTech_(a);break}}return i}return m(u,c),u}(Xt);Xt.registerComponent("MediaLoader",Wn);var Un=function(i){function r(t,e){g(this,r);var n=_(this,i.call(this,t,e));return n.emitTapEvents(),n.enable(),n}return m(r,i),r.prototype.createEl=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};e=k({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},e),"button"===t&&y.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=k({role:"button"},n),this.tabIndex_=e.tabIndex;var r=i.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(r),r},r.prototype.dispose=function(){this.controlTextEl_=null,i.prototype.dispose.call(this)},r.prototype.createControlTextEl=function(t){return this.controlTextEl_=I("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},r.prototype.controlText=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,D(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},r.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+i.prototype.buildCSSClass.call(this)},r.prototype.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("focus",this.handleFocus),this.on("blur",this.handleBlur))},r.prototype.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("focus",this.handleFocus),this.off("blur",this.handleBlur)},r.prototype.handleClick=function(t){},r.prototype.handleFocus=function(t){mt(f,"keydown",Pt(this,this.handleKeyPress))},r.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):i.prototype.handleKeyPress&&i.prototype.handleKeyPress.call(this,t)},r.prototype.handleBlur=function(t){_t(f,"keydown",Pt(this,this.handleKeyPress))},r}(Xt);Xt.registerComponent("ClickableComponent",Un);var qn=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.update(),t.on("posterchange",Pt(n,n.update)),n}return m(i,r),i.prototype.dispose=function(){this.player().off("posterchange",this.update),r.prototype.dispose.call(this)},i.prototype.createEl=function(){return I("div",{className:"vjs-poster",tabIndex:-1})},i.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},i.prototype.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},i.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?Me(this.player_.play()):this.player_.pause())},i}(Un);Xt.registerComponent("PosterImage",qn);var Kn="#222",Xn={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 $n(t,e){var n=void 0;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Gn(t,e,n){try{t.style[e]=n}catch(t){return}}var Yn=function(o){function s(n,t,e){g(this,s);var r=_(this,o.call(this,n,t,e)),i=Pt(r,r.updateDisplay);return n.on("loadstart",Pt(r,r.toggleDisplay)),n.on("texttrackchange",i),n.on("loadstart",Pt(r,r.preselectTrack)),n.ready(Pt(r,function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",i),n.on("playerresize",i),d.addEventListener("orientationchange",i),n.on("dispose",function(){return d.removeEventListener("orientationchange",i)});for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()}})),r}return m(s,o),s.prototype.preselectTrack=function(){for(var t={captions:1,subtitles:1},e=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,o=void 0,s=0;s<e.length;s++){var a=e[s];n&&n.enabled&&n.language===a.language?a.kind===n.kind?o=a:o||(o=a):n&&!n.enabled?i=r=o=null:a.default&&("descriptions"!==a.kind||r?a.kind in t&&!i&&(i=a):r=a)}o?o.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},s.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},s.prototype.createEl=function(){return o.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.prototype.clearDisplay=function(){"function"==typeof d.WebVTT&&d.WebVTT.processCues(d,[],this.el_)},s.prototype.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,n=null,r=t.length;r--;){var i=t[r];"showing"===i.mode&&("descriptions"===i.kind?e=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},s.prototype.updateForTrack=function(t){if("function"==typeof d.WebVTT&&t.activeCues){for(var e=[],n=0;n<t.activeCues.length;n++)e.push(t.activeCues[n]);if(d.WebVTT.processCues(d,e,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),i=e.length;i--;){var o=e[i];if(o){var s=o.displayState;if(r.color&&(s.firstChild.style.color=r.color),r.textOpacity&&Gn(s.firstChild,"color",$n(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(s.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&Gn(s.firstChild,"backgroundColor",$n(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?Gn(s,"backgroundColor",$n(r.windowColor,r.windowOpacity)):s.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Kn:"raised"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Kn:"depressed"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Kn:"uniform"===r.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Kn)),r.fontPercent&&1!==r.fontPercent){var a=d.parseFloat(s.style.fontSize);s.style.fontSize=a*r.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Xn[r.fontFamily])}}}},s}(Xt);Xt.registerComponent("TextTrackDisplay",Yn);var Jn=function(i){function t(){return g(this,t),_(this,i.apply(this,arguments))}return m(t,i),t.prototype.createEl=function(){var t=this.player_.isAudio(),e=this.localize(t?"Audio Player":"Video Player"),n=I("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[e])}),r=i.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},t}(Xt);Xt.registerComponent("LoadingSpinner",Jn);var Qn=function(e){function t(){return g(this,t),_(this,e.apply(this,arguments))}return m(t,e),t.prototype.createEl=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};e=k({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),n=k({type:"button"},n);var r=Xt.prototype.createEl.call(this,"button",e,n);return this.createControlTextEl(r),r},t.prototype.addChild=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return y.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Xt.prototype.addChild.call(this,t,e)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(Un);Xt.registerComponent("Button",Qn);var Zn=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-big-play-button"},i.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Me(e);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};Oe(e)?e.then(i,function(){}):this.setTimeout(i,1)}else this.player_.focus()}},i.prototype.handleKeyPress=function(t){this.mouseused_=!1,r.prototype.handleKeyPress.call(this,t)},i.prototype.handleMouseDown=function(t){this.mouseused_=!0},i}(Qn);Zn.prototype.controlText_="Play Video",Xt.registerComponent("BigPlayButton",Zn);var tr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.controlText(e&&e.controlText||n.localize("Close")),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-close-button "+r.prototype.buildCSSClass.call(this)},i.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(Qn);Xt.registerComponent("CloseButton",tr);var er=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"play",n.handlePlay),n.on(t,"pause",n.handlePause),n.on(t,"ended",n.handleEnded),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-play-control "+r.prototype.buildCSSClass.call(this)},i.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},i.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},i.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},i}(Qn);er.prototype.controlText_="Play",Xt.registerComponent("PlayToggle",er);var nr=function(t,e){t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===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)},rr=nr;function ir(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t;return rr(t,e)}var or=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.throttledUpdateContent=At(Pt(n,n.updateContent),25),n.on(t,"timeupdate",n.throttledUpdateContent),n}return m(i,r),i.prototype.createEl=function(t){var e=this.buildCSSClass(),n=r.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+"Â </span>"});return this.contentEl_=I("span",{className:e+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},i.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,r.prototype.dispose.call(this)},i.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=f.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},i.prototype.formatTime_=function(t){return ir(t)},i.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},i.prototype.updateContent=function(t){},i}(Xt);or.prototype.labelText_="Time",or.prototype.controlText_="Time",Xt.registerComponent("TimeDisplay",or);var sr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"ended",n.handleEnded),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-current-time"},i.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},i.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},i}(or);sr.prototype.labelText_="Current Time",sr.prototype.controlText_="Current Time",Xt.registerComponent("CurrentTimeDisplay",sr);var ar=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"durationchange",n.updateContent),n.on(t,"loadedmetadata",n.throttledUpdateContent),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-duration"},i.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},i}(or);ar.prototype.labelText_="Duration",ar.prototype.controlText_="Duration",Xt.registerComponent("DurationDisplay",ar);var lr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}(Xt);Xt.registerComponent("TimeDivider",lr);var cr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"durationchange",n.throttledUpdateContent),n.on(t,"ended",n.handleEnded),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-remaining-time"},i.prototype.formatTime_=function(t){return"-"+r.prototype.formatTime_.call(this,t)},i.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},i.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},i}(or);cr.prototype.labelText_="Remaining Time",cr.prototype.controlText_="Remaining Time",Xt.registerComponent("RemainingTimeDisplay",cr);var ur=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}return m(i,r),i.prototype.createEl=function(){var t=r.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=I("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"Â </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},i.prototype.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},i.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},i}(Xt);Xt.registerComponent("LiveDisplay",ur);var hr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}return m(i,r),i.prototype.enabled=function(){return this.enabled_},i.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),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)},i.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},i.prototype.createEl=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return e.className=e.className+" vjs-slider",e=k({tabIndex:0},e),n=k({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),r.prototype.createEl.call(this,t,e,n)},i.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||he||t.preventDefault(),K(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},i.prototype.handleMouseMove=function(t){},i.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;X(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},i.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%",r=e.el().style;return this.vertical()?r.height=n:r.width=n,t}}},i.prototype.calculateDistance=function(t){var e=Y(this.el_,t);return this.vertical()?e.y:e.x},i.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},i.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},i.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},i.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},i.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},i}(Xt);Xt.registerComponent("Slider",hr);var pr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.partEls_=[],n.on(t,"progress",n.update),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},i.prototype.dispose=function(){this.partEls_=null,r.prototype.dispose.call(this)},i.prototype.update=function(t){var e=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(t,e){var n=t/e||0;return 100*(1<=n?1:n)+"%"};this.el_.style.width=o(r,n);for(var s=0;s<e.length;s++){var a=e.start(s),l=e.end(s),c=i[s];c||(c=this.el_.appendChild(I()),i[s]=c),c.style.left=o(a,r),c.style.width=o(l-a,r)}for(var u=i.length;u>e.length;u--)this.el_.removeChild(i[u-1]);i.length=e.length},i}(Xt);Xt.registerComponent("LoadProgressBar",pr);var dr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,n){var r=$(this.el_),i=$(this.player_.el()),o=t.width*e;if(i&&r){var s=t.left-i.left+o,a=t.width-o+(i.right-t.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",D(this.el_,n)}},e}(Xt);Xt.registerComponent("TimeTooltip",dr);var fr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},e.prototype.update=function(n,r){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var t=ir(i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),i.player_.duration()),e=i.getChild("timeTooltip");e&&e.update(n,r,t)})},e}(Xt);fr.prototype.options_={children:[]},ie||se||fr.prototype.options_.children.push("timeTooltip"),Xt.registerComponent("PlayProgressBar",fr);var yr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.update=At(Pt(n,n.update),25),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.prototype.update=function(n,r){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var t=i.player_.duration(),e=ir(r*t,t);i.el_.style.left=n.width*r+"px",i.getChild("timeTooltip").update(n,r,e)})},i}(Xt);yr.prototype.options_={children:["timeTooltip"]},Xt.registerComponent("MouseTimeDisplay",yr);var vr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.setEventHandlers_(),n}return m(i,r),i.prototype.setEventHandlers_=function(){var t=this;this.update=At(Pt(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval(function(){t.requestAnimationFrame(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(){t.clearInterval(t.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.prototype.update_=function(t,e){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[ir(t,n),ir(n,n)],"{1} of {2}")),this.bar.update($(this.el_),e)},i.prototype.update=function(t){var e=r.prototype.update.call(this);return this.update_(this.getCurrentTime_(),e),e},i.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},i.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return 1<=t?1:t||0},i.prototype.handleMouseDown=function(t){nt(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),r.prototype.handleMouseDown.call(this,t))},i.prototype.handleMouseMove=function(t){if(nt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},i.prototype.enable=function(){r.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},i.prototype.disable=function(){r.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},i.prototype.handleMouseUp=function(t){r.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Me(this.player_.play())},i.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},i.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},i.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},i.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):r.prototype.handleKeyPress&&r.prototype.handleKeyPress.call(this,t)},i}(hr);vr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},ie||se||vr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),vr.prototype.playerEvent="timeupdate",Xt.registerComponent("SeekBar",vr);var gr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.handleMouseMove=At(Pt(n,n.handleMouseMove),25),n.throttledHandleMouseSeek=At(Pt(n,n.handleMouseSeek),25),n.enable(),n}return m(i,r),i.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var n=e.getChild("mouseTimeDisplay"),r=e.el(),i=$(r),o=Y(r,t).x;1<o?o=1:o<0&&(o=0),n&&n.update(i,o)}},i.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},i.prototype.enabled=function(){return this.enabled_},i.prototype.disable=function(){this.children().forEach(function(t){return t.disable&&t.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},i.prototype.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},i.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},i.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},i}(Xt);gr.prototype.options_={children:["seekBar"]},Xt.registerComponent("ProgressControl",gr);var mr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"fullscreenchange",n.handleFullscreenChange),!1===f[Ce.fullscreenEnabled]&&n.disable(),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+r.prototype.buildCSSClass.call(this)},i.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},i}(Qn);mr.prototype.controlText_="Fullscreen",Xt.registerComponent("FullscreenToggle",mr);var _r=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},br=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(Xt);Xt.registerComponent("VolumeLevel",br);var Tr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on("slideractive",n.updateLastVolume_),n.on(t,"volumechange",n.updateARIAAttributes),t.ready(function(){return n.updateARIAAttributes()}),n}return m(i,r),i.prototype.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"})},i.prototype.handleMouseDown=function(t){nt(t)&&r.prototype.handleMouseDown.call(this,t)},i.prototype.handleMouseMove=function(t){nt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},i.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},i.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},i.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},i.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},i}(hr);Tr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Tr.prototype.playerEvent="volumechange",Xt.registerComponent("VolumeBar",Tr);var Cr=function(r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,i),e.vertical=e.vertical||!1,("undefined"==typeof e.volumeBar||S(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical);var n=_(this,r.call(this,t,e));return _r(n,t),n.throttledHandleMouseMove=At(Pt(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}return m(i,r),i.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},i.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},i.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},i.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},i}(Xt);Cr.prototype.options_={children:["volumeBar"]},Xt.registerComponent("VolumeControl",Cr);var kr=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},Er=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return kr(n,t),n.on(t,["loadstart","volumechange"],n.update),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-mute-control "+r.prototype.buildCSSClass.call(this)},i.prototype.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},i.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},i.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;ie&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var n=0;n<4;n++)B(this.el_,"vjs-vol-"+n);R(this.el_,"vjs-vol-"+e)},i.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},i}(Qn);Er.prototype.controlText_="Mute",Xt.registerComponent("MuteToggle",Er);var Sr=function(r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,i),"undefined"!=typeof e.inline?e.inline=e.inline:e.inline=!0,("undefined"==typeof e.volumeControl||S(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline);var n=_(this,r.call(this,t,e));return n.on(t,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}return m(i,r),i.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},i.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.prototype.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")},i.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},i}(Xt);Sr.prototype.options_={children:["muteToggle","volumeControl"]},Xt.registerComponent("VolumePanel",Sr);var wr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return e&&(n.menuButton_=e.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyPress),n}return m(i,r),i.prototype.addItem=function(e){this.addChild(e),e.on("click",Pt(this,function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())}))},i.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=I(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var e=r.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),mt(e,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),e},i.prototype.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},i.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},i.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},i.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},i.prototype.focus=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),0<e.length&&(t<0?t=0:t>=e.length&&(t=e.length-1),e[this.focusedChild_=t].el_.focus())},i}(Xt);Xt.registerComponent("Menu",wr);var xr=function(i){function o(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,o);var n=_(this,i.call(this,t,e));n.menuButton_=new Qn(t,e),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Qn.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_,"focus",n.handleFocus),n.on(n.menuButton_,"blur",n.handleBlur),n.on("keydown",n.handleSubmenuKeyPress),n}return m(o,i),o.prototype.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},o.prototype.createMenu=function(){var t=new wr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=I("li",{className:"vjs-menu-title",innerHTML:qt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),L(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)t.addItem(this.items[n]);return t},o.prototype.createItems=function(){},o.prototype.createEl=function(){return i.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},o.prototype.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Qn.prototype.buildCSSClass()+" "+i.prototype.buildCSSClass.call(this)},o.prototype.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+i.prototype.buildCSSClass.call(this)},o.prototype.controlText=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},o.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",Pt(this,function(t){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},o.prototype.focus=function(){this.menuButton_.focus()},o.prototype.blur=function(){this.menuButton_.blur()},o.prototype.handleFocus=function(){mt(f,"keydown",Pt(this,this.handleKeyPress))},o.prototype.handleBlur=function(){_t(f,"keydown",Pt(this,this.handleKeyPress))},o.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},o.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},o.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),ie&&M())return;this.menu.focus()}},o.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},o.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},o.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},o}(Xt);Xt.registerComponent("MenuButton",xr);var jr=function(o){function s(t,e){g(this,s);var n=e.tracks,r=_(this,o.call(this,t,e));if(r.items.length<=1&&r.hide(),!n)return _(r);var i=Pt(r,r.update);return n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),r.player_.on("ready",i),r.player_.on("dispose",function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)}),r}return m(s,o),s}(xr);Xt.registerComponent("TrackButton",jr);var Pr=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.selectable=e.selectable,n.isSelected_=e.selected||!1,n.multiSelectable=e.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}return m(i,r),i.prototype.createEl=function(t,e,n){return this.nonIconControl=!0,r.prototype.createEl.call(this,"li",k({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},e),n)},i.prototype.handleClick=function(t){this.selected(!0)},i.prototype.selected=function(t){this.selectable&&(t?(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))},i}(Un);Xt.registerComponent("MenuItem",Pr);var Ar=function(l){function c(t,e){g(this,c);var n=e.track,r=t.textTracks();e.label=n.label||n.language||"Unknown",e.selected="showing"===n.mode;var i=_(this,l.call(this,t,e));i.track=n;var o=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];i.handleTracksChange.apply(i,e)},s=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];i.handleSelectedLanguageChange.apply(i,e)};if(t.on(["loadstart","texttrackchange"],o),r.addEventListener("change",o),r.addEventListener("selectedlanguagechange",s),i.on("dispose",function(){t.off(["loadstart","texttrackchange"],o),r.removeEventListener("change",o),r.removeEventListener("selectedlanguagechange",s)}),void 0===r.onchange){var a=void 0;i.on(["tap","click"],function(){if("object"!==u(d.Event))try{a=new d.Event("change")}catch(t){}a||(a=f.createEvent("Event")).initEvent("change",!0,!0),r.dispatchEvent(a)})}return i.handleTracksChange(),i}return m(c,l),c.prototype.handleClick=function(t){var e=this.track.kind,n=this.track.kinds,r=this.player_.textTracks();if(n||(n=[e]),l.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var o=r[i];o===this.track&&-1<n.indexOf(o.kind)?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled")}},c.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},c.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},c.prototype.dispose=function(){this.track=null,l.prototype.dispose.call(this)},c}(Pr);Xt.registerComponent("TextTrackMenuItem",Ar);var Or=function(n){function r(t,e){return g(this,r),e.track={player:t,kind:e.kind,kinds:e.kinds,default:!1,mode:"disabled"},e.kinds||(e.kinds=[e.kind]),e.label?e.track.label=e.label:e.track.label=e.kinds.join(" and ")+" off",e.selectable=!0,e.multiSelectable=!1,_(this,n.call(this,t,e))}return m(r,n),r.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(-1<this.options_.kinds.indexOf(o.kind)&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},r.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(-1<["captions","descriptions","subtitles"].indexOf(o.kind)&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},r}(Ar);Xt.registerComponent("OffTextTrackMenuItem",Or);var Mr=function(n){function r(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return g(this,r),e.tracks=t.textTracks(),_(this,n.call(this,t,e))}return m(r,n),r.prototype.createItems=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ar,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new Or(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 e(this.player_,{track:o,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+o.kind+"-menu-item"),t.push(s)}}return t},r}(jr);Xt.registerComponent("TextTrackButton",Mr);var Nr=function(s){function a(t,e){g(this,a);var n=e.track,r=e.cue,i=t.currentTime();e.selectable=!0,e.multiSelectable=!1,e.label=r.text,e.selected=r.startTime<=i&&i<r.endTime;var o=_(this,s.call(this,t,e));return o.track=n,o.cue=r,n.addEventListener("cuechange",Pt(o,o.update)),o}return m(a,s),a.prototype.handleClick=function(t){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},a.prototype.update=function(t){var e=this.cue,n=this.player_.currentTime();this.selected(e.startTime<=n&&n<e.endTime)},a}(Pr);Xt.registerComponent("ChaptersTrackMenuItem",Nr);var Ir=function(r){function i(t,e,n){return g(this,i),_(this,r.call(this,t,e,n))}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),r.prototype.update.call(this)},i.prototype.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},i.prototype.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;0<=e;e--){var n=t[e];if(n.kind===this.kind_)return n}},i.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(qt(this.kind_))},i.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),r.prototype.createMenu.call(this)},i.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var i=e[n],o=new Nr(this.player_,{track:this.track_,cue:i});t.push(o)}return t},i}(Mr);Ir.prototype.kind_="chapters",Ir.prototype.controlText_="Chapters",Xt.registerComponent("ChaptersButton",Ir);var Dr=function(s){function a(t,e,n){g(this,a);var r=_(this,s.call(this,t,e,n)),i=t.textTracks(),o=Pt(r,r.handleTracksChange);return i.addEventListener("change",o),r.on("dispose",function(){i.removeEventListener("change",o)}),r}return m(a,s),a.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!1,r=0,i=e.length;r<i;r++){var o=e[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},a.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildCSSClass.call(this)},a.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildWrapperCSSClass.call(this)},a}(Mr);Dr.prototype.kind_="descriptions",Dr.prototype.controlText_="Descriptions",Xt.registerComponent("DescriptionsButton",Dr);var Lr=function(r){function i(t,e,n){return g(this,i),_(this,r.call(this,t,e,n))}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildWrapperCSSClass.call(this)},i}(Mr);Lr.prototype.kind_="subtitles",Lr.prototype.controlText_="Subtitles",Xt.registerComponent("SubtitlesButton",Lr);var Fr=function(r){function i(t,e){g(this,i),e.track={player:t,kind:e.kind,label:e.kind+" settings",selectable:!1,default:!1,mode:"disabled"},e.selectable=!1,e.name="CaptionSettingsMenuItem";var n=_(this,r.call(this,t,e));return n.addClass("vjs-texttrack-settings"),n.controlText(", opens "+e.kind+" settings dialog"),n}return m(i,r),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},i}(Ar);Xt.registerComponent("CaptionSettingsMenuItem",Fr);var Rr=function(r){function i(t,e,n){return g(this,i),_(this,r.call(this,t,e,n))}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-captions-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Fr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),r.prototype.createItems.call(this,t)},i}(Mr);Rr.prototype.kind_="captions",Rr.prototype.controlText_="Captions",Xt.registerComponent("CaptionsButton",Rr);var Br=function(i){function t(){return g(this,t),_(this,i.apply(this,arguments))}return m(t,i),t.prototype.createEl=function(t,e,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,t,k({innerHTML:r},e),n)},t}(Ar);Xt.registerComponent("SubsCapsMenuItem",Br);var Hr=function(r){function i(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};g(this,i);var n=_(this,r.call(this,t,e));return n.label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)&&(n.label_="captions"),n.menuButton_.controlText(qt(n.label_)),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Fr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=r.prototype.createItems.call(this,t,Br)},i}(Mr);Hr.prototype.kinds_=["captions","subtitles"],Hr.prototype.controlText_="Subtitles",Xt.registerComponent("SubsCapsButton",Hr);var Vr=function(s){function a(t,e){g(this,a);var n=e.track,r=t.audioTracks();e.label=n.label||n.language||"Unknown",e.selected=n.enabled;var i=_(this,s.call(this,t,e));i.track=n,i.addClass("vjs-"+n.kind+"-menu-item");var o=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];i.handleTracksChange.apply(i,e)};return r.addEventListener("change",o),i.on("dispose",function(){r.removeEventListener("change",o)}),i}return m(a,s),a.prototype.createEl=function(t,e,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,t,k({innerHTML:r},e),n)},a.prototype.handleClick=function(t){var e=this.player_.audioTracks();s.prototype.handleClick.call(this,t);for(var n=0;n<e.length;n++){var r=e[n];r.enabled=r===this.track}},a.prototype.handleTracksChange=function(t){this.selected(this.track.enabled)},a}(Pr);Xt.registerComponent("AudioTrackMenuItem",Vr);var zr=function(n){function r(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return g(this,r),e.tracks=t.audioTracks(),_(this,n.call(this,t,e))}return m(r,n),r.prototype.buildCSSClass=function(){return"vjs-audio-button "+n.prototype.buildCSSClass.call(this)},r.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+n.prototype.buildWrapperCSSClass.call(this)},r.prototype.createItems=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),n=0;n<e.length;n++){var r=e[n];t.push(new Vr(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return t},r}(jr);zr.prototype.controlText_="Audio Track",Xt.registerComponent("AudioTrackButton",zr);var Wr=function(o){function s(t,e){g(this,s);var n=e.rate,r=parseFloat(n,10);e.label=n,e.selected=1===r,e.selectable=!0,e.multiSelectable=!1;var i=_(this,o.call(this,t,e));return i.label=n,i.rate=r,i.on(t,"ratechange",i.update),i}return m(s,o),s.prototype.handleClick=function(t){o.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.prototype.update=function(t){this.selected(this.player().playbackRate()===this.rate)},s}(Pr);Wr.prototype.contentElType="button",Xt.registerComponent("PlaybackRateMenuItem",Wr);var Ur=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.updateVisibility(),n.updateLabel(),n.on(t,"loadstart",n.updateVisibility),n.on(t,"ratechange",n.updateLabel),n}return m(i,r),i.prototype.createEl=function(){var t=r.prototype.createEl.call(this);return this.labelEl_=I("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},i.prototype.dispose=function(){this.labelEl_=null,r.prototype.dispose.call(this)},i.prototype.buildCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildCSSClass.call(this)},i.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildWrapperCSSClass.call(this)},i.prototype.createMenu=function(){var t=new wr(this.player()),e=this.playbackRates();if(e)for(var n=e.length-1;0<=n;n--)t.addChild(new Wr(this.player(),{rate:e[n]+"x"}));return t},i.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>e){r=n[i];break}this.player().playbackRate(r)},i.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},i.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},i.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},i}(xr);Ur.prototype.controlText_="Playback Rate",Xt.registerComponent("PlaybackRateMenuButton",Ur);var qr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(Xt);Xt.registerComponent("Spacer",qr);var Kr=function(e){function t(){return g(this,t),_(this,e.apply(this,arguments))}return m(t,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML="Â ",t},t}(qr);Xt.registerComponent("CustomControlSpacer",Kr);var Xr=function(t){function e(){return g(this,e),_(this,t.apply(this,arguments))}return m(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(Xt);Xr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},Xt.registerComponent("ControlBar",Xr);var $r=function(r){function i(t,e){g(this,i);var n=_(this,r.call(this,t,e));return n.on(t,"error",n.open),n}return m(i,r),i.prototype.buildCSSClass=function(){return"vjs-error-display "+r.prototype.buildCSSClass.call(this)},i.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(Fe);$r.prototype.options_=Kt(Fe.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Xt.registerComponent("ErrorDisplay",$r);var Gr="vjs-text-track-settings",Yr=["#000","Black"],Jr=["#00F","Blue"],Qr=["#0FF","Cyan"],Zr=["#0F0","Green"],ti=["#F0F","Magenta"],ei=["#F00","Red"],ni=["#FFF","White"],ri=["#FF0","Yellow"],ii=["1","Opaque"],oi=["0.5","Semi-Transparent"],si=["0","Transparent"],ai={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Yr,ni,ei,Zr,Jr,ri,ti,Qr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ii,oi,si]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ni,Yr,ei,Zr,Jr,ri,ti,Qr]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ii,oi]},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:[si,oi,ii]}};function li(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}ai.windowColor.options=ai.backgroundColor.options;var ci=function(r){function i(t,e){g(this,i),e.temporary=!1;var n=_(this,r.call(this,t,e));return n.updateDisplay=Pt(n,n.updateDisplay),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=I("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===e.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()}),C(ai,function(t){n.on(n.$(t.selector),"change",n.updateDisplay)}),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}return m(i,r),i.prototype.dispose=function(){this.endDialog=null,r.prototype.dispose.call(this)},i.prototype.createElSelect_=function(t){var n=this,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"label",i=ai[t],o=i.id.replace("%s",this.id_),s=[e,o].join(" ").trim();return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+s+'">'].concat(i.options.map(function(t){var e=o+"-"+t[1].replace(/\W+/g,"");return['<option id="'+e+'" value="'+t[0]+'" ','aria-labelledby="'+s+" "+e+'">',n.localize(t[1]),"</option>"].join("")})).concat("</select>").join("")},i.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},i.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},i.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},i.prototype.createElColors_=function(){return I("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.prototype.createElFont_=function(){return I("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("")})},i.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return I("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.prototype.label=function(){return this.localize("Caption Settings Dialog")},i.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.prototype.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.prototype.getValues=function(){var s=this;return function(n,r){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return T(n).reduce(function(t,e){return r(t,n[e],e)},t)}(ai,function(t,e,n){var r,i,o=(r=s.$(e.selector),i=e.parser,li(r.options[r.options.selectedIndex].value,i));return void 0!==o&&(t[n]=o),t},{})},i.prototype.setValues=function(n){var r=this;C(ai,function(t,e){!function(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(li(t.options[r].value,n)===e){t.selectedIndex=r;break}}(r.$(t.selector),n[e],t.parser)})},i.prototype.setDefaults=function(){var n=this;C(ai,function(t){var e=t.hasOwnProperty("default")?t.default:0;n.$(t.selector).selectedIndex=e})},i.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(d.localStorage.getItem(Gr))}catch(t){y.warn(t)}t&&this.setValues(t)},i.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?d.localStorage.setItem(Gr,JSON.stringify(t)):d.localStorage.removeItem(Gr)}catch(t){y.warn(t)}}},i.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},i.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(f,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},i}(Fe);Xt.registerComponent("TextTrackSettings",ci);var ui=function(o){function s(t,e){g(this,s);var n=e.ResizeObserver||d.ResizeObserver;null===e.ResizeObserver&&(n=!1);var r=Kt({createEl:!n,reportTouchActivity:!1},e),i=_(this,o.call(this,t,r));return i.ResizeObserver=e.ResizeObserver||d.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=Ot(function(){i.resizeHandler()},100,!1,i),n?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(t.el())):(i.loadListener_=function(){i.el_&&i.el_.contentWindow&&mt(i.el_.contentWindow,"resize",i.debouncedHandler_)},i.one("load",i.loadListener_)),i}return m(s,o),s.prototype.createEl=function(){return o.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},s.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},s.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&_t(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},s}(Xt);Xt.registerComponent("ResizeManager",ui);var hi=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var n=t.$$("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]),t.triggerSourceset(i),!0)},pi=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=f.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var n=f.createDocumentFragment();e.childNodes.length;)n.appendChild(e.childNodes[0]);return this.innerText="",d.Element.prototype.appendChild.call(this,n),this.innerHTML}}),di=function(t,e){for(var n={},r=0;r<t.length&&!((n=Object.getOwnPropertyDescriptor(t[r],e))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},fi=function(o){var s=o.el();if(!s.resetSourceWatch_){var e={},t=di([o.el(),d.HTMLMediaElement.prototype,d.Element.prototype,pi],"innerHTML"),n=function(i){return function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=i.apply(s,e);return hi(o),r}};["append","appendChild","insertAdjacentHTML"].forEach(function(t){s[t]&&(e[t]=s[t],s[t]=n(e[t]))}),Object.defineProperty(s,"innerHTML",Kt(t,{set:n(t.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(e).forEach(function(t){s[t]=e[t]}),Object.defineProperty(s,"innerHTML",t)},o.one("sourceset",s.resetSourceWatch_)}},yi=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Ze(d.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return d.Element.prototype.setAttribute.call(this,"src",t),t}}),vi=function(r){if(r.featuresSourceset){var i=r.el();if(!i.resetSourceset_){var n=di([r.el(),d.HTMLMediaElement.prototype,yi],"src"),o=i.setAttribute,e=i.load;Object.defineProperty(i,"src",Kt(n,{set:function(t){var e=n.set.call(i,t);return r.triggerSourceset(i.src),e}})),i.setAttribute=function(t,e){var n=o.call(i,t,e);return/src/i.test(t)&&r.triggerSourceset(i.src),n},i.load=function(){var t=e.call(i);return hi(r)||(r.triggerSourceset(""),fi(r)),t},i.currentSrc?r.triggerSourceset(i.currentSrc):hi(r)||fi(r),i.resetSourceset_=function(){i.resetSourceset_=null,i.load=e,i.setAttribute=o,Object.defineProperty(i,"src",n),i.resetSourceWatch_&&i.resetSourceWatch_()}}}},gi=h(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),mi=function(u){function h(t,e){g(this,h);var n=_(this,u.call(this,t,e)),r=t.source,i=!1;if(r&&(n.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?n.setSource(r):n.handleLateInit_(n.el_),t.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")||!en(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(v(gi)),n.restoreMetadataTracksInIOSNativePlayer_(),(ve||ne||le)&&!0===t.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}return m(h,u),h.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),h.disposeMediaElement(this.el_),this.options_=null,u.prototype.dispose.call(this)},h.prototype.setupSourcesetHandling_=function(){vi(this)},h.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var r=this.textTracks(),i=void 0,t=function(){i=[];for(var t=0;t<r.length;t++){var e=r[t];"metadata"===e.kind&&i.push({track:e,storedMode:e.mode})}};t(),r.addEventListener("change",t),this.on("dispose",function(){return r.removeEventListener("change",t)});var e=function t(){for(var e=0;e<i.length;e++){var n=i[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}r.removeEventListener("change",t)};this.on("webkitbeginfullscreen",function(){r.removeEventListener("change",t),r.removeEventListener("change",e),r.addEventListener("change",e)}),this.on("webkitendfullscreen",function(){r.removeEventListener("change",t),r.addEventListener("change",t),r.removeEventListener("change",e)})},h.prototype.overrideNative_=function(t,e){var n=this;if(e===this["featuresNative"+t+"Tracks"]){var r=t.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach(function(t){n.el()[r+"Tracks"].removeEventListener(t,n[r+"TracksListeners_"][t])}),this["featuresNative"+t+"Tracks"]=!e,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},h.prototype.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},h.prototype.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},h.prototype.proxyNativeTracksForType_=function(t){var r=this,e=wn[t],i=this.el()[e.getterName],o=this[e.getterName]();if(this["featuresNative"+e.capitalName+"Tracks"]&&i&&i.addEventListener){var s={change:function(t){o.trigger({type:"change",target:o,currentTarget:o,srcElement:o})},addtrack:function(t){o.addTrack(t.track)},removetrack:function(t){o.removeTrack(t.track)}},n=function(){for(var t=[],e=0;e<o.length;e++){for(var n=!1,r=0;r<i.length;r++)if(i[r]===o[e]){n=!0;break}n||t.push(o[e])}for(;t.length;)o.removeTrack(t.shift())};this[e.getterName+"Listeners_"]=s,Object.keys(s).forEach(function(e){var n=s[e];i.addEventListener(e,n),r.on("dispose",function(t){return i.removeEventListener(e,n)})}),this.on("loadstart",n),this.on("dispose",function(t){return r.off("loadstart",n)})}},h.prototype.proxyNativeTracks_=function(){var e=this;wn.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},h.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var e=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(e,t),h.disposeMediaElement(t),t=e}else{t=f.createElement("video");var n=Kt({},this.options_.tag&&z(this.options_.tag));ve&&!0===this.options_.nativeControlsForTouch||delete n.controls,V(t,k(n,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&U(t,"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?U(t,o,o):q(t,o),t[o]=s)}return t},h.prototype.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,n=function(){e=!0};this.on("loadstart",n);var r=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),e||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),2<=t.readyState&&i.push("loadeddata"),3<=t.readyState&&i.push("canplay"),4<=t.readyState&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(t){this.trigger(t)},this)})}},h.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(t){y(t,"Video is not ready. (Video.js)")}},h.prototype.duration=function(){var e=this;if(this.el_.duration===1/0&&se&&he&&0===this.el_.currentTime){return this.on("timeupdate",function t(){0<e.el_.currentTime&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))}),NaN}return this.el_.duration||NaN},h.prototype.width=function(){return this.el_.offsetWidth},h.prototype.height=function(){return this.el_.offsetHeight},h.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)})}},h.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=d.navigator&&d.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},h.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},h.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},h.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},h.prototype.reset=function(){h.resetMediaElement(this.el_)},h.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},h.prototype.setControls=function(t){this.el_.controls=!!t},h.prototype.addTextTrack=function(t,e,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,e,n):u.prototype.addTextTrack.call(this,t,e,n)},h.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return u.prototype.createRemoteTextTrack.call(this,t);var e=f.createElement("track");return t.kind&&(e.kind=t.kind),t.label&&(e.label=t.label),(t.language||t.srclang)&&(e.srclang=t.language||t.srclang),t.default&&(e.default=t.default),t.id&&(e.id=t.id),t.src&&(e.src=t.src),e},h.prototype.addRemoteTextTrack=function(t,e){var n=u.prototype.addRemoteTextTrack.call(this,t,e);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},h.prototype.removeRemoteTextTrack=function(t){if(u.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var e=this.$$("track"),n=e.length;n--;)t!==e[n]&&t!==e[n].track||this.el().removeChild(e[n])},h.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),d.performance&&"function"==typeof d.performance.now?t.creationTime=d.performance.now():d.performance&&d.performance.timing&&"number"==typeof d.performance.timing.navigationStart&&(t.creationTime=d.Date.now()-d.performance.timing.navigationStart),t},h}(An);if(A()){mi.TEST_VID=f.createElement("video");var _i=f.createElement("track");_i.kind="captions",_i.srclang="en",_i.label="English",mi.TEST_VID.appendChild(_i)}mi.isSupported=function(){try{mi.TEST_VID.volume=.5}catch(t){return!1}return!(!mi.TEST_VID||!mi.TEST_VID.canPlayType)},mi.canPlayType=function(t){return mi.TEST_VID.canPlayType(t)},mi.canPlaySource=function(t,e){return mi.canPlayType(t.type)},mi.canControlVolume=function(){try{var t=mi.TEST_VID.volume;return mi.TEST_VID.volume=t/2+.1,t!==mi.TEST_VID.volume}catch(t){return!1}},mi.canMuteVolume=function(){try{var t=mi.TEST_VID.muted;return mi.TEST_VID.muted=!t,mi.TEST_VID.muted?U(mi.TEST_VID,"muted","muted"):q(mi.TEST_VID,"muted"),t!==mi.TEST_VID.muted}catch(t){return!1}},mi.canControlPlaybackRate=function(){if(se&&he&&pe<58)return!1;try{var t=mi.TEST_VID.playbackRate;return mi.TEST_VID.playbackRate=t/2+.1,t!==mi.TEST_VID.playbackRate}catch(t){return!1}},mi.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(f.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(f.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(f.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(f.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},mi.supportsNativeTextTracks=function(){return ye||ie&&he},mi.supportsNativeVideoTracks=function(){return!(!mi.TEST_VID||!mi.TEST_VID.videoTracks)},mi.supportsNativeAudioTracks=function(){return!(!mi.TEST_VID||!mi.TEST_VID.audioTracks)},mi.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],mi.prototype.featuresVolumeControl=mi.canControlVolume(),mi.prototype.featuresMuteControl=mi.canMuteVolume(),mi.prototype.featuresPlaybackRate=mi.canControlPlaybackRate(),mi.prototype.featuresSourceset=mi.canOverrideAttributes(),mi.prototype.movingMediaElementInDOM=!ie,mi.prototype.featuresFullscreenResize=!0,mi.prototype.featuresProgressEvents=!0,mi.prototype.featuresTimeupdateEvents=!0,mi.prototype.featuresNativeTextTracks=mi.supportsNativeTextTracks(),mi.prototype.featuresNativeVideoTracks=mi.supportsNativeVideoTracks(),mi.prototype.featuresNativeAudioTracks=mi.supportsNativeAudioTracks();var bi=mi.TEST_VID&&mi.TEST_VID.constructor.prototype.canPlayType,Ti=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;mi.patchCanPlayType=function(){4<=ae&&!ce&&!he&&(mi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Ti.test(t)?"maybe":bi.call(this,t)})},mi.unpatchCanPlayType=function(){var t=mi.TEST_VID.constructor.prototype.canPlayType;return mi.TEST_VID.constructor.prototype.canPlayType=bi,t},mi.patchCanPlayType(),mi.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},mi.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),n=e.length;n--;)t.removeChild(e[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){mi.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){mi.prototype["set"+qt(e)]=function(t){(this.el_[e]=t)?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){mi.prototype[t]=function(){return this.el_[t]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){mi.prototype["set"+qt(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(t){mi.prototype[t]=function(){return this.el_[t]()}}),An.withSourceHandlers(mi),mi.nativeSourceHandler={},mi.nativeSourceHandler.canPlayType=function(t){try{return mi.TEST_VID.canPlayType(t)}catch(t){return""}},mi.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return mi.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=tn(t.src);return mi.nativeSourceHandler.canPlayType("video/"+n)}return""},mi.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},mi.nativeSourceHandler.dispose=function(){},mi.registerSourceHandler(mi.nativeSourceHandler),An.registerTech("Html5",mi);var Ci=h(["\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 "],["\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 "]),ki=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ei={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Si=function(u){function h(t,e,n){if(g(this,h),t.id=t.id||e.id||"vjs_video_"+at(),(e=k(h.getTagSettings(t),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof t.closest){var r=t.closest("[lang]");r&&r.getAttribute&&(e.language=r.getAttribute("lang"))}else for(var i=t;i&&1===i.nodeType;){if(z(i).hasOwnProperty("lang")){e.language=i.getAttribute("lang");break}i=i.parentNode}var o=_(this,u.call(this,null,e,n));if(o.isPosterFromTech_=!1,o.queuedCallbacks_=[],o.isReady_=!1,o.hasStarted_=!1,o.userActive_=!1,!o.options_||!o.options_.techOrder||!o.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(o.tag=t,o.tagAttributes=t&&z(t),o.language(o.options_.language),e.languages){var s={};Object.getOwnPropertyNames(e.languages).forEach(function(t){s[t.toLowerCase()]=e.languages[t]}),o.languages_=s}else o.languages_=h.prototype.options_.languages;o.cache_={},o.poster_=e.poster||"",o.controls_=!!e.controls,o.cache_.lastVolume=1,t.controls=!1,t.removeAttribute("controls"),t.hasAttribute("autoplay")?o.options_.autoplay=!0:o.autoplay(o.options_.autoplay),o.scrubbing_=!1,o.el_=o.createEl(),o.cache_.lastPlaybackRate=o.defaultPlaybackRate(),zt(o,{eventBusKey:"el_"});var a=Kt(o.options_);if(e.plugins){var l=e.plugins;Object.keys(l).forEach(function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](l[t])},o)}o.options_.playerOptions=a,o.middleware_=[],o.initChildren(),o.isAudio("audio"===t.nodeName.toLowerCase()),o.controls()?o.addClass("vjs-controls-enabled"):o.addClass("vjs-controls-disabled"),o.el_.setAttribute("role","region"),o.isAudio()?o.el_.setAttribute("aria-label",o.localize("Audio Player")):o.el_.setAttribute("aria-label",o.localize("Video Player")),o.isAudio()&&o.addClass("vjs-audio"),o.flexNotSupported_()&&o.addClass("vjs-no-flex"),ie||o.addClass("vjs-workinghover"),h.players[o.id_]=o;var c=p.split(".")[0];return o.addClass("vjs-v"+c),o.userActive(!0),o.reportUserActivity(),o.one("play",o.listenForUserActivity_),o.on("fullscreenchange",o.handleFullscreenChange_),o.on("stageclick",o.handleStageClick_),o.changingSrc_=!1,o.playWaitingForReady_=!1,o.playOnLoadstart_=null,o}return m(h,u),h.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),h.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),Mn[this.id()]=null,u.prototype.dispose.call(this)},h.prototype.createEl=function(){var e=this.tag,n=void 0,t=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();t?n=this.el_=e.parentNode:r||(n=this.el_=u.prototype.createEl.call(this,"div"));var i=z(e);if(r){for(n=this.el_=e,e=this.tag=f.createElement("video");n.children.length;)e.appendChild(n.firstChild);F(n,"video-js")||R(n,"video-js"),n.appendChild(e),t=this.playerElIngest_=n,Object.keys(n).forEach(function(t){e[t]=n[t]})}if(e.setAttribute("tabindex","-1"),i.tabindex="-1",de&&(e.setAttribute("role","application"),i.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in i&&delete i.width,"height"in i&&delete i.height,Object.getOwnPropertyNames(i).forEach(function(t){r&&"class"===t||n.setAttribute(t,i[t]),r&&e.setAttribute(t,i[t])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused"),!0!==d.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=xt("vjs-styles-dimensions");var o=rt(".vjs-styles-defaults"),s=rt("head");s.insertBefore(this.styleEl_,o?o.nextSibling:s.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var a=e.getElementsByTagName("a"),l=0;l<a.length;l++){var c=a.item(l);R(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!t&&e.parentNode.insertBefore(n,e),L(e,n),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_=n},h.prototype.width=function(t){return this.dimension("width",t)},h.prototype.height=function(t){return this.dimension("height",t)},h.prototype.dimension=function(t,e){var n=t+"_";if(void 0===e)return this[n]||0;if(""===e)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(e);isNaN(r)?y.error('Improper value "'+e+'" supplied for for '+t):(this[n]=r,this.updateStyleEl_())},h.prototype.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},h.prototype.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},h.prototype.updateStyleEl_=function(){if(!0!==d.VIDEOJS_NO_DYNAMIC_STYLE){var t=void 0,e=void 0,n=void 0,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];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*i,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),jt(this.styleEl_,"\n ."+n+" {\n width: "+t+"px;\n height: "+e+"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))}},h.prototype.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var r=qt(t),i=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(An.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:e,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};jn.names.forEach(function(t){var e=jn[t];o[e.getterName]=n[e.privateName]}),k(o,this.options_[r]),k(o,this.options_[i]),k(o,this.options_[t.toLowerCase()]),this.tag&&(o.tag=this.tag),e&&e.src===this.cache_.src&&0<this.cache_.currentTime&&(o.startTime=this.cache_.currentTime);var s=An.getTech(t);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(Pt(this,this.handleTechReady_),!0),De(this.textTracksJson_||[],this.tech_),ki.forEach(function(t){n.on(n.tech_,t,n["handleTech"+qt(t)+"_"])}),Object.keys(Ei).forEach(function(e){n.on(n.tech_,e,function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Ei[e]+"_"].bind(n),event:t}):n["handleTech"+Ei[e]+"_"](t)})}),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_,"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||L(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},h.prototype.unloadTech_=function(){var n=this;jn.names.forEach(function(t){var e=jn[t];n[e.privateName]=n[e.getterName]()}),this.textTracksJson_=Ie(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},h.prototype.tech=function(t){return void 0===t&&y.warn(v(Ci)),this.tech_},h.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",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_)},h.prototype.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_,"mousedown",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},h.prototype.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},h.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},h.prototype.manualAutoplay_=function(e){var n=this;if(this.tech_&&"string"==typeof e){var t=function(){var e=n.muted();n.muted(!0);var t=n.play();if(t&&t.then&&t.catch)return t.catch(function(t){n.muted(e)})},r=void 0;if("any"===e?(r=this.play())&&r.then&&r.catch&&r.catch(function(){return t()}):r="muted"===e?t():this.play(),r&&r.then&&r.catch)return r.then(function(){n.trigger({type:"autoplay-success",autoplay:e})}).catch(function(t){n.trigger({type:"autoplay-failure",autoplay:e})})}},h.prototype.updateSourceCaches_=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",e=t,n="";if("string"!=typeof e&&(e=t.src,n=t.type),!/^blob:/.test(e)){this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!n&&(n=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter(function(t){return t.src===e});if(n.length)return n[0].type;for(var r=t.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===e)return o.type}return Vn(e)}(this,e)),this.cache_.source=Kt({},t,{src:e,type:n});for(var r=this.cache_.sources.filter(function(t){return t.src&&t.src===e}),i=[],o=this.$$("source"),s=[],a=0;a<o.length;a++){var l=z(o[a]);i.push(l),l.src&&l.src===e&&s.push(l.src)}s.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e}},h.prototype.handleTechSourceset_=function(t){var n=this;if(!this.changingSrc_&&(this.updateSourceCaches_(t.src),!t.src)){this.tech_.one(["sourceset","loadstart"],function t(e){"sourceset"!==e.type&&n.updateSourceCaches_(n.techGet_("currentSrc")),n.tech_.off(["sourceset","loadstart"],t)})}this.trigger({src:t.src,type:"sourceset"})},h.prototype.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},h.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},h.prototype.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(t){return t.callback(t.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},h.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},h.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},h.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},h.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},h.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},h.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},h.prototype.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")},h.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},h.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},h.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},h.prototype.handleTechClick_=function(t){nt(t)&&this.controls_&&(this.paused()?Me(this.play()):this.pause())},h.prototype.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(e.target)})||(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},h.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},h.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},h.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},h.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},h.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},h.prototype.handleStageClick_=function(){this.reportUserActivity()},h.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},h.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},h.prototype.handleTechTextData_=function(){var t=null;1<arguments.length&&(t=arguments[1]),this.trigger("textdata",t)},h.prototype.getCache=function(){return this.cache_},h.prototype.techCall_=function(i,o){this.ready(function(){if(i in Fn)return t=this.middleware_,e=this.tech_,r=o,e[n=i](t.reduce(Bn(n),r));if(i in Rn)return Dn(this.middleware_,this.tech_,i,o);var t,e,n,r;try{this.tech_&&this.tech_[i](o)}catch(t){throw y(t),t}},!0)},h.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Ln)return t=this.middleware_,n=this.tech_,r=e,t.reduceRight(Bn(r),n[r]());if(e in Rn)return Dn(this.middleware_,this.tech_,e);var t,n,r;try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw y("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw y("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw y(t),t}}},h.prototype.play=function(){var e=this,t=this.options_.Promise||d.Promise;return t?new t(function(t){e.play_(t)}):this.play_()},h.prototype.play_=function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Me;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void e(this.techGet_("play"));this.playOnLoadstart_=function(){t.playOnLoadstart_=null,e(t.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){t.playWaitingForReady_=!1,e(t.play())})}},h.prototype.pause=function(){this.techCall_("pause")},h.prototype.paused=function(){return!1!==this.techGet_("paused")},h.prototype.played=function(){return this.techGet_("played")||be(0,0)},h.prototype.scrubbing=function(t){if("undefined"==typeof t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},h.prototype.currentTime=function(t){return"undefined"!=typeof t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},h.prototype.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&((this.cache_.duration=t)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},h.prototype.remainingTime=function(){return this.duration()-this.currentTime()},h.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},h.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=be(0,0)),t},h.prototype.bufferedPercent=function(){return Te(this.buffered(),this.duration())},h.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),n=t.end(t.length-1);return e<n&&(n=e),n},h.prototype.volume=function(t){var e=void 0;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(0<e&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},h.prototype.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},h.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},h.prototype.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},h.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},h.prototype.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},h.prototype.requestFullscreen=function(){var n=Ce;this.isFullscreen(!0),n.requestFullscreen?(mt(f,n.fullscreenchange,Pt(this,function t(e){this.isFullscreen(f[n.fullscreenElement]),!1===this.isFullscreen()&&_t(f,n.fullscreenchange,t),this.trigger("fullscreenchange")})),this.el_[n.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},h.prototype.exitFullscreen=function(){var t=Ce;this.isFullscreen(!1),t.requestFullscreen?f[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},h.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=f.documentElement.style.overflow,mt(f,"keydown",Pt(this,this.fullWindowOnEscKey)),f.documentElement.style.overflow="hidden",R(f.body,"vjs-full-window"),this.trigger("enterFullWindow")},h.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},h.prototype.exitFullWindow=function(){this.isFullWindow=!1,_t(f,"keydown",this.fullWindowOnEscKey),f.documentElement.style.overflow=this.docOrigOverflow,B(f.body,"vjs-full-window"),this.trigger("exitFullWindow")},h.prototype.canPlayType=function(t){for(var e=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=An.getTech(i);if(o||(o=Xt.getComponent(i)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else y.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},h.prototype.selectSource=function(t){var n,r=this,e=this.options_.techOrder.map(function(t){return[t,An.getTech(t)]}).filter(function(t){var e=t[0],n=t[1];return n?n.isSupported():(y.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),i=function(t,n,r){var i=void 0;return t.some(function(e){return n.some(function(t){if(i=r(e,t))return!0})}),i},o=function(t,e){var n=t[0];if(t[1].canPlaySource(e,r.options_[n.toLowerCase()]))return{source:e,tech:n}};return(this.options_.sourceOrder?i(t,e,(n=o,function(t,e){return n(e,t)})):i(e,t,o))||!1},h.prototype.src=function(t){var i=this;if("undefined"==typeof t)return this.cache_.src||"";var o=function e(t){if(Array.isArray(t)){var n=[];t.forEach(function(t){t=e(t),Array.isArray(t)?n=n.concat(t):E(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[zn({src:t})]:E(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[zn(t)]:[];return t}(t);o.length?(this.changingSrc_=!0,this.cache_.sources=o,this.updateSourceCaches_(o[0]),In(this,o[0],function(t,e){var n,r;if(i.middleware_=e,i.cache_.sources=o,i.updateSourceCaches_(t),i.src_(t))return 1<o.length?i.src(o.slice(1)):(i.changingSrc_=!1,i.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void i.triggerReady());n=e,r=i.tech_,n.forEach(function(t){return t.setTech&&t.setTech(r)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},h.prototype.src_=function(t){var e,n,r=this,i=this.selectSource([t]);return!i||(e=i.tech,n=this.techName_,qt(e)!==qt(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(function(){r.changingSrc_=!1})):this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1)},h.prototype.load=function(){this.techCall_("load")},h.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},h.prototype.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},h.prototype.currentSource=function(){return this.cache_.source||{}},h.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},h.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},h.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},h.prototype.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e=void 0;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},h.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},h.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},h.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},h.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},h.prototype.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),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_()))},h.prototype.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},h.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new je(t),this.addClass("vjs-error"),y.error("(CODE:"+this.error_.code+" "+je.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},h.prototype.reportUserActivity=function(t){this.userActivity_=!0},h.prototype.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,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(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},h.prototype.listenForUserActivity_=function(){var e=void 0,n=void 0,r=void 0,i=Pt(this,this.reportUserActivity);this.on("mousedown",function(){i(),this.clearInterval(e),e=this.setInterval(i,250)}),this.on("mousemove",function(t){t.screenX===n&&t.screenY===r||(n=t.screenX,r=t.screenY,i())}),this.on("mouseup",function(t){i(),this.clearInterval(e)}),this.on("keydown",i),this.on("keyup",i);var o=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(o);var t=this.options_.inactivityTimeout;t<=0||(o=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},h.prototype.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},h.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},h.prototype.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},h.prototype.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},h.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},h.prototype.removeRemoteTextTrack=function(){var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).track,e=void 0===t?arguments[0]:t;if(this.tech_)return this.tech_.removeRemoteTextTrack(e)},h.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},h.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},h.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},h.prototype.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},h.prototype.languages=function(){return Kt(h.prototype.options_.languages,this.languages_)},h.prototype.toJSON=function(){var t=Kt(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n<e.length;n++){var r=e[n];(r=Kt(r)).player=void 0,t.tracks[n]=r}return t},h.prototype.createModal=function(t,e){var n=this;(e=e||{}).content=t||"";var r=new Fe(this,e);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},h.getTagSettings=function(t){var e={sources:[],tracks:[]},n=z(t),r=n["data-setup"];if(F(t,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=Ae(r||"{}"),o=i[0],s=i[1];o&&y.error(o),k(n,s)}if(k(e,n),t.hasChildNodes())for(var a=t.childNodes,l=0,c=a.length;l<c;l++){var u=a[l],h=u.nodeName.toLowerCase();"source"===h?e.sources.push(z(u)):"track"===h&&e.tracks.push(z(u))}return e},h.prototype.flexNotSupported_=function(){var t=f.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},h}(Xt);jn.names.forEach(function(t){var e=jn[t];Si.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),Si.players={};var wi=d.navigator;Si.prototype.options_={techOrder:An.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:wi&&(wi.languages&&wi.languages[0]||wi.userLanguage||wi.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(t){Si.prototype[t]=function(){return this.techGet_(t)}}),ki.forEach(function(t){Si.prototype["handleTech"+qt(t)+"_"]=function(){return this.trigger(t)}}),Xt.registerComponent("Player",Si);var xi="plugin",ji="activePlugins_",Pi={},Ai=function(t){return Pi.hasOwnProperty(t)},Oi=function(t){return Ai(t)?Pi[t]:void 0},Mi=function(t,e){t[ji]=t[ji]||{},t[ji][e]=!0},Ni=function(t,e,n){var r=(n?"before":"")+"pluginsetup";t.trigger(r,e),t.trigger(r+":"+e.name,e)},Ii=function(i,o){return o.prototype.name=i,function(){Ni(this,{name:i,plugin:o,instance:null},!0);for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=new(Function.prototype.bind.apply(o,[null].concat([this].concat(e))));return this[i]=function(){return r},Ni(this,r.getEventHash()),r}},Di=function(){function o(t){if(g(this,o),this.constructor===o)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,zt(this),delete this.trigger,Ut(this,this.constructor.defaultState),Mi(t,this.name),this.dispose=Pt(this,this.dispose),t.on("dispose",this.dispose)}return o.prototype.version=function(){return this.constructor.VERSION},o.prototype.getEventHash=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},o.prototype.trigger=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return bt(this.eventBusEl_,t,this.getEventHash(e))},o.prototype.handleStateChanged=function(t){},o.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[ji][t]=!1,this.player=this.state=null,e[t]=Ii(t,Pi[t])},o.isBasic=function(t){var e="string"==typeof t?Oi(t):t;return"function"==typeof e&&!o.prototype.isPrototypeOf(e.prototype)},o.registerPlugin=function(t,e){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+("undefined"==typeof t?"undefined":u(t))+".");if(Ai(t))y.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Si.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof e)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+("undefined"==typeof e?"undefined":u(e))+".");var n,r,i;return Pi[t]=e,t!==xi&&(o.isBasic(e)?Si.prototype[t]=(n=t,r=e,i=function(){Ni(this,{name:n,plugin:r,instance:null},!0);var t=r.apply(this,arguments);return Mi(this,n),Ni(this,{name:n,plugin:r,instance:t}),t},Object.keys(r).forEach(function(t){i[t]=r[t]}),i):Si.prototype[t]=Ii(t,e)),e},o.deregisterPlugin=function(t){if(t===xi)throw new Error("Cannot de-register base plugin.");Ai(t)&&(delete Pi[t],delete Si.prototype[t])},o.getPlugins=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Object.keys(Pi),n=void 0;return t.forEach(function(t){var e=Oi(t);e&&((n=n||{})[t]=e)}),n},o.getPluginVersion=function(t){var e=Oi(t);return e&&e.VERSION||""},o}();Di.getPlugin=Oi,Di.BASE_PLUGIN_NAME=xi,Di.registerPlugin(xi,Di),Si.prototype.usingPlugin=function(t){return!!this[ji]&&!0===this[ji][t]},Si.prototype.hasPlugin=function(t){return!!Ai(t)};var Li=function(t){return 0===t.indexOf("#")?t.slice(1):t};function Fi(t,n,e){var r=Fi.getPlayer(t);if(r)return n&&y.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&r.ready(e),r;var i="string"==typeof t?rt("#"+Li(t)):t;if(!O(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");f.body.contains(i)||y.warn("The element supplied is not included in the DOM"),n=n||{},Fi.hooks("beforesetup").forEach(function(t){var e=t(i,Kt(n));E(e)&&!Array.isArray(e)?n=Kt(n,e):y.error("please return an object in beforesetup hooks")});var o=Xt.getComponent("Player");return r=new o(i,n,e),Fi.hooks("setup").forEach(function(t){return t(r)}),r}if(Fi.hooks_={},Fi.hooks=function(t,e){return Fi.hooks_[t]=Fi.hooks_[t]||[],e&&(Fi.hooks_[t]=Fi.hooks_[t].concat(e)),Fi.hooks_[t]},Fi.hook=function(t,e){Fi.hooks(t,e)},Fi.hookOnce=function(n,t){Fi.hooks(n,[].concat(t).map(function(e){return function t(){return Fi.removeHook(n,t),e.apply(void 0,arguments)}}))},Fi.removeHook=function(t,e){var n=Fi.hooks(t).indexOf(e);return!(n<=-1)&&(Fi.hooks_[t]=Fi.hooks_[t].slice(),Fi.hooks_[t].splice(n,1),!0)},!0!==d.VIDEOJS_NO_DYNAMIC_STYLE&&A()){var Ri=rt(".vjs-styles-defaults");if(!Ri){Ri=xt("vjs-styles-defaults");var Bi=rt("head");Bi&&Bi.insertBefore(Ri,Bi.firstChild),jt(Ri,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}return wt(1,Fi),Fi.VERSION=p,Fi.options=Si.prototype.options_,Fi.getPlayers=function(){return Si.players},Fi.getPlayer=function(t){var e=Si.players,n=void 0;if("string"==typeof t){var r=Li(t),i=e[r];if(i)return i;n=rt("#"+r)}else n=t;if(O(n)){var o=n,s=o.player,a=o.playerId;if(s||e[a])return s||e[a]}},Fi.getAllPlayers=function(){return Object.keys(Si.players).map(function(t){return Si.players[t]}).filter(Boolean)},Fi.players=Si.players,Fi.getComponent=Xt.getComponent,Fi.registerComponent=function(t,e){An.isTech(e)&&y.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Xt.registerComponent.call(Xt,t,e)},Fi.getTech=An.getTech,Fi.registerTech=An.registerTech,Fi.use=function(t,e){On[t]=On[t]||[],On[t].push(e)},Object.defineProperty(Fi,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Fi.middleware,"TERMINATOR",{value:Nn,writeable:!1,enumerable:!0}),Fi.browser=ge,Fi.TOUCH_ENABLED=ve,Fi.extend=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=function(){t.apply(this,arguments)},r={};for(var i in"object"===("undefined"==typeof e?"undefined":u(e))?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"==typeof e&&(n=e),function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":u(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)}(n,t),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Fi.mergeOptions=Kt,Fi.bind=Pt,Fi.registerPlugin=Di.registerPlugin,Fi.deregisterPlugin=Di.deregisterPlugin,Fi.plugin=function(t,e){return y.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Di.registerPlugin(t,e)},Fi.getPlugins=Di.getPlugins,Fi.getPlugin=Di.getPlugin,Fi.getPluginVersion=Di.getPluginVersion,Fi.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),Fi.options.languages=Kt(Fi.options.languages,((n={})[t]=e,n)),Fi.options.languages[t]},Fi.log=y,Fi.createTimeRange=Fi.createTimeRanges=be,Fi.formatTime=ir,Fi.setFormatTime=function(t){rr=t},Fi.resetFormatTime=function(){rr=nr},Fi.parseUrl=Qe,Fi.isCrossOrigin=en,Fi.EventTarget=Mt,Fi.on=mt,Fi.one=Tt,Fi.off=_t,Fi.trigger=bt,Fi.xhr=fn,Fi.TextTrack=bn,Fi.AudioTrack=Tn,Fi.VideoTrack=Cn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){Fi[t]=function(){return y.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),ot[t].apply(null,arguments)}}),Fi.computedStyle=w,Fi.dom=ot,Fi.url=nn,Fi});
\ No newline at end of file |