b008919.js 207 KB

12
  1. /*! For license information please see LICENSES */
  2. (window.webpackJsonp=window.webpackJsonp||[]).push([[76],{553:function(t,e,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,r(46))},717:function(t,e,r){},718:function(t,e,r){var n;t.exports=(n=r(719),function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=3)}([function(t,e){t.exports=n},function(t,e,r){"use strict";function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t&&t.__esModule?t:{default:t}}(r(0)),s=window.videojs||n.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},writable:!0,configurable:!0});var a=["loadeddata","canplay","canplaythrough","play","pause","waiting","playing","ended","error"];e.default={name:"video-player",props:{start:{type:Number,default:0},crossOrigin:{type:String,default:""},playsinline:{type:Boolean,default:!1},customEventName:{type:String,default:"statechanged"},options:{type:Object,required:!0},events:{type:Array,default:function(){return[]}},globalOptions:{type:Object,default:function(){return{controls:!0,controlBar:{remainingTimeDisplay:!1,playToggle:{},progressControl:{},fullscreenToggle:{},volumeMenuButton:{inline:!1,vertical:!0}},techOrder:["html5"],plugins:{}}}},globalEvents:{type:Array,default:function(){return[]}}},data:function(){return{player:null,reseted:!0}},mounted:function(){this.player||this.initialize()},beforeDestroy:function(){this.player&&this.dispose()},methods:{initialize:function(){var t=this,e=Object.assign({},this.globalOptions,this.options);this.playsinline&&(this.$refs.video.setAttribute("playsinline",this.playsinline),this.$refs.video.setAttribute("webkit-playsinline",this.playsinline),this.$refs.video.setAttribute("x5-playsinline",this.playsinline),this.$refs.video.setAttribute("x5-video-player-type","h5"),this.$refs.video.setAttribute("x5-video-player-fullscreen",!1)),""!==this.crossOrigin&&(this.$refs.video.crossOrigin=this.crossOrigin,this.$refs.video.setAttribute("crossOrigin",this.crossOrigin));var r=function(e,r){e&&t.$emit(e,t.player),r&&t.$emit(t.customEventName,i({},e,r))};e.plugins&&delete e.plugins.__ob__;var n=this;this.player=s(this.$refs.video,e,(function(){for(var t=this,e=a.concat(n.events).concat(n.globalEvents),i={},o=0;o<e.length;o++)"string"==typeof e[o]&&void 0===i[e[o]]&&function(e){i[e]=null,t.on(e,(function(){r(e,!0)}))}(e[o]);this.on("timeupdate",(function(){r("timeupdate",this.currentTime())})),n.$emit("ready",this)}))},dispose:function(t){var e=this;this.player&&this.player.dispose&&("Flash"!==this.player.techName_&&this.player.pause&&this.player.pause(),this.player.dispose(),this.player=null,this.$nextTick((function(){e.reseted=!1,e.$nextTick((function(){e.reseted=!0,e.$nextTick((function(){t&&t()}))}))})))}},watch:{options:{deep:!0,handler:function(t,e){var r=this;this.dispose((function(){t&&t.sources&&t.sources.length&&r.initialize()}))}}}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(1),n=r.n(i);for(var o in i)["default","default"].indexOf(o)<0&&function(t){r.d(e,t,(function(){return i[t]}))}(o);var s=r(5),l=r(4)(n.a,s.a,!1,null,null,null);e.default=l.exports},function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.install=e.videoPlayer=e.videojs=void 0;var n=i(r(0)),a=i(r(2)),o=window.videojs||n.default,u=function(t,e){e&&(e.options&&(a.default.props.globalOptions.default=function(){return e.options}),e.events&&(a.default.props.globalEvents.default=function(){return e.events})),t.component(a.default.name,a.default)},l={videojs:o,videoPlayer:a.default,install:u};e.default=l,e.videojs=o,e.videoPlayer=a.default,e.install=u},function(t,e){t.exports=function(t,e,r,i,n,o){var s,a=t=t||{},l=typeof t.default;"object"!==l&&"function"!==l||(s=t,a=t.default);var c,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),r&&(u.functional=!0),n&&(u._scopeId=n),o?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},u._ssrRegister=c):i&&(c=i),c){var h=u.functional,d=h?u.render:u.beforeCreate;h?(u._injectStyles=c,u.render=function(t,e){return c.call(e),d(t,e)}):u.beforeCreate=d?[].concat(d,c):[c]}return{esModule:s,exports:a,options:u}}},function(t,e,r){"use strict";var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.reseted?r("div",{staticClass:"video-player"},[r("video",{ref:"video",staticClass:"video-js"})]):t._e()},n={render:i,staticRenderFns:[]};e.a=n}]))},719:function(t,e,r){function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o,l=n(r(553)),c=n(r(720)),h=n(r(722)),d=n(r(723)),f=n(r(724)),v=n(r(728)),y="6.13.0",m=l.navigator&&l.navigator.userAgent||"",_=/AppleWebKit\/([\d.]+)/i.exec(m),T=_?parseFloat(_.pop()):null,C=/iPad/i.test(m),k=/iPhone/i.test(m)&&!C,E=/iPod/i.test(m),w=k||C||E,S=(o=m.match(/OS (\d+)_/i))&&o[1]?o[1]:null,x=/Android/i.test(m),j=function(){var t=m.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),r=t[2]&&parseFloat(t[2]);return e&&r?parseFloat(t[1]+"."+t[2]):e||null}(),A=x&&/webkit/i.test(m)&&j<2.3,P=x&&j<5&&T<537,O=/Firefox/i.test(m),M=/Edge/i.test(m),N=!M&&(/Chrome/i.test(m)||/CriOS/i.test(m)),I=function(){var t=m.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),L=/MSIE\s8\.0/.test(m),D=function(){var t=/MSIE\s(\d+)\.\d/.exec(m),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(m)&&/rv:11.0/.test(m)&&(e=11),e}(),R=/Safari/i.test(m)&&!N&&!x&&!M,B=(R||w)&&!N,F=lt()&&("ontouchstart"in l||l.navigator.maxTouchPoints||l.DocumentTouch&&l.document instanceof l.DocumentTouch),H=lt()&&"backgroundSize"in l.document.createElement("video").style,V=(Object.freeze||Object)({IS_IPAD:C,IS_IPHONE:k,IS_IPOD:E,IS_IOS:w,IOS_VERSION:S,IS_ANDROID:x,ANDROID_VERSION:j,IS_OLD_ANDROID:A,IS_NATIVE_ANDROID:P,IS_FIREFOX:O,IS_EDGE:M,IS_CHROME:N,CHROME_VERSION:I,IS_IE8:L,IE_VERSION:D,IS_SAFARI:R,IS_ANY_SAFARI:B,TOUCH_ENABLED:F,BACKGROUND_SIZE_SUPPORTED:H}),z="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},W=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},U=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},X=function(t,e){return t.raw=e,t},K=Object.prototype.toString,Y=function(object){return Q(object)?Object.keys(object):[]};function G(object,t){Y(object).forEach((function(e){return t(object[e],e)}))}function J(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[t].concat(r)):(r.forEach((function(source){source&&G(source,(function(e,r){t[r]=e}))})),t)}function Q(t){return!!t&&"object"===(void 0===t?"undefined":z(t))}function Z(t){return Q(t)&&"[object Object]"===K.call(t)&&t.constructor===Object}var tt=[];var et=function t(e){var r="info",n=void 0,o=function t(){for(var e=t.stringify||D&&D<11,o=arguments.length,l=Array(o),c=0;c<o;c++)l[c]=arguments[c];n("log",r,l,e)};return n=function(t,e){return function(r,n,o,c){var h=e.levels[n],d=new RegExp("^("+h+")$");if("log"!==r&&o.unshift(r.toUpperCase()+":"),o.unshift(t+":"),tt&&tt.push([].concat(o)),l.console){var f=l.console[r];f||"debug"!==r||(f=l.console.info||l.console.log),f&&h&&d.test(r)&&(c&&(o=o.map((function(a){if(Q(a)||Array.isArray(a))try{return JSON.stringify(a)}catch(t){return String(a)}return String(a)})).join(" ")),f.apply?f[Array.isArray(o)?"apply":"call"](l.console,o):f(o))}}}(e,o),o.createLogger=function(r){return t(e+": "+r)},o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},o.level=function(t){if("string"==typeof t){if(!o.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');r=t}return r},(o.history=function(){return tt?[].concat(tt):[]}).filter=function(t){return(tt||[]).filter((function(e){return new RegExp(".*"+t+".*").test(e[0])}))},o.history.clear=function(){tt&&(tt.length=0)},o.history.disable=function(){null!==tt&&(tt.length=0,tt=null)},o.history.enable=function(){null===tt&&(tt=[])},o.error=function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return n("error",r,e)},o.warn=function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return n("warn",r,e)},o.debug=function(){for(var t=arguments.length,e=Array(t),o=0;o<t;o++)e[o]=arguments[o];return n("debug",r,e)},o}("VIDEOJS"),nt=et.createLogger;function it(t,e){if(!t||!e)return"";if("function"==typeof l.getComputedStyle){var r=l.getComputedStyle(t);return r?r[e]:""}return t.currentStyle[e]||""}var ot=X(["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 st(t){return"string"==typeof t&&/\S/.test(t)}function at(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function lt(){return c===l.document&&void 0!==c.createElement}function ct(t){return Q(t)&&1===t.nodeType}function ut(){try{return l.parent!==l.self}catch(t){return!0}}function ht(t){return function(e,r){if(!st(e))return c[t](null);st(r)&&(r=c.querySelector(r));var n=ct(r)?r:c;return n[t]&&n[t](e)}}function pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},content=arguments[3],n=c.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(et.warn(h(ot,t,r)),n.setAttribute(t,r)):"textContent"===t?ft(n,r):n[t]=r})),Object.getOwnPropertyNames(r).forEach((function(t){n.setAttribute(t,r[t])})),content&&Nt(n,content),n}function ft(t,text){return void 0===t.textContent?t.innerText=text:t.textContent=text,t}function vt(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function yt(element,t){return at(t),element.classList?element.classList.contains(t):(e=t,new RegExp("(^|\\s)"+e+"($|\\s)")).test(element.className);var e}function gt(element,t){return element.classList?element.classList.add(t):yt(element,t)||(element.className=(element.className+" "+t).trim()),element}function mt(element,t){return element.classList?element.classList.remove(t):(at(t),element.className=element.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),element}function _t(element,t,e){var r=yt(element,t);if("function"==typeof e&&(e=e(element,t)),"boolean"!=typeof e&&(e=!r),e!==r)return e?gt(element,t):mt(element,t),element}function bt(t,e){Object.getOwnPropertyNames(e).forEach((function(r){var n=e[r];null==n||!1===n?t.removeAttribute(r):t.setAttribute(r,!0===n?"":n)}))}function Tt(t){var e={},r=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,i=n.length-1;i>=0;i--){var o=n[i].name,l=n[i].value;"boolean"!=typeof t[o]&&-1===r.indexOf(","+o+",")||(l=null!==l),e[o]=l}return e}function Ct(t,e){return t.getAttribute(e)}function kt(t,e,r){t.setAttribute(e,r)}function Et(t,e){t.removeAttribute(e)}function wt(){c.body.focus(),c.onselectstart=function(){return!1}}function St(){c.onselectstart=function(){return!0}}function xt(t){if(t&&t.getBoundingClientRect&&t.parentNode){var rect=t.getBoundingClientRect(),e={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==rect[t]&&(e[t]=rect[t])})),e.height||(e.height=parseFloat(it(t,"height"))),e.width||(e.width=parseFloat(it(t,"width"))),e}}function jt(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var r=c.documentElement,body=c.body,n=r.clientLeft||body.clientLeft||0,o=l.pageXOffset||body.scrollLeft,h=e.left+o-n,d=r.clientTop||body.clientTop||0,f=l.pageYOffset||body.scrollTop,v=e.top+f-d;return{left:Math.round(h),top:Math.round(v)}}function At(t,e){var r={},n=jt(t),o=t.offsetWidth,l=t.offsetHeight,c=n.top,h=n.left,d=e.pageY,f=e.pageX;return e.changedTouches&&(f=e.changedTouches[0].pageX,d=e.changedTouches[0].pageY),r.y=Math.max(0,Math.min(1,(c-d+l)/l)),r.x=Math.max(0,Math.min(1,(f-h)/o)),r}function Pt(t){return Q(t)&&3===t.nodeType}function Ot(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Mt(content){return"function"==typeof content&&(content=content()),(Array.isArray(content)?content:[content]).map((function(t){return"function"==typeof t&&(t=t()),ct(t)||Pt(t)?t:"string"==typeof t&&/\S/.test(t)?c.createTextNode(t):void 0})).filter((function(t){return t}))}function Nt(t,content){return Mt(content).forEach((function(e){return t.appendChild(e)})),t}function It(t,content){return Nt(Ot(t),content)}function Lt(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||(9===D||0===t.button&&1===t.buttons))}var Dt=ht("querySelector"),Rt=ht("querySelectorAll"),Bt=(Object.freeze||Object)({isReal:lt,isEl:ct,isInFrame:ut,createEl:pt,textContent:ft,prependTo:vt,hasClass:yt,addClass:gt,removeClass:mt,toggleClass:_t,setAttributes:bt,getAttributes:Tt,getAttribute:Ct,setAttribute:kt,removeAttribute:Et,blockTextSelection:wt,unblockTextSelection:St,getBoundingClientRect:xt,findPosition:jt,getPointerPosition:At,isTextNode:Pt,emptyEl:Ot,normalizeContent:Mt,appendContent:Nt,insertContent:It,isSingleLeftClick:Lt,$:Dt,$$:Rt}),Ft=1;function Ht(){return Ft++}var Vt={},zt="vdata"+(new Date).getTime();function Wt(t){var e=t[zt];return e||(e=t[zt]=Ht()),Vt[e]||(Vt[e]={}),Vt[e]}function Ut(t){var e=t[zt];return!!e&&!!Object.getOwnPropertyNames(Vt[e]).length}function $t(t){var e=t[zt];if(e){delete Vt[e];try{delete t[zt]}catch(e){t.removeAttribute?t.removeAttribute(zt):t[zt]=null}}}function Xt(t,e){var data=Wt(t);0===data.handlers[e].length&&(delete data.handlers[e],t.removeEventListener?t.removeEventListener(e,data.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,data.dispatcher)),Object.getOwnPropertyNames(data.handlers).length<=0&&(delete data.handlers,delete data.dispatcher,delete data.disabled),0===Object.getOwnPropertyNames(data).length&&$t(t)}function qt(t,e,r,n){r.forEach((function(r){t(e,r,n)}))}function Kt(t){function e(){return!0}function r(){return!1}if(!t||!t.isPropagationStopped){var n=t||l.event;for(var o in t={},n)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&n.preventDefault||(t[o]=n[o]));if(t.target||(t.target=t.srcElement||c),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=r,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=r,null!==t.clientX&&void 0!==t.clientX){var h=c.documentElement,body=c.body;t.pageX=t.clientX+(h&&h.scrollLeft||body&&body.scrollLeft||0)-(h&&h.clientLeft||body&&body.clientLeft||0),t.pageY=t.clientY+(h&&h.scrollTop||body&&body.scrollTop||0)-(h&&h.clientTop||body&&body.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 Yt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){Yt=!0}});l.addEventListener("test",null,t),l.removeEventListener("test",null,t)}catch(t){}}();var Gt=["touchstart","touchmove"];function Jt(t,e,r){if(Array.isArray(e))return qt(Jt,t,e,r);var data=Wt(t);if(data.handlers||(data.handlers={}),data.handlers[e]||(data.handlers[e]=[]),r.guid||(r.guid=Ht()),data.handlers[e].push(r),data.dispatcher||(data.disabled=!1,data.dispatcher=function(e,r){if(!data.disabled){e=Kt(e);var n=data.handlers[e.type];if(n)for(var o=n.slice(0),l=0,c=o.length;l<c&&!e.isImmediatePropagationStopped();l++)try{o[l].call(t,e,r)}catch(t){et.error(t)}}}),1===data.handlers[e].length)if(t.addEventListener){var n=!1;Yt&&Gt.indexOf(e)>-1&&(n={passive:!0}),t.addEventListener(e,data.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+e,data.dispatcher)}function Qt(t,e,r){if(Ut(t)){var data=Wt(t);if(data.handlers){if(Array.isArray(e))return qt(Qt,t,e,r);var n=function(t,e){data.handlers[e]=[],Xt(t,e)};if(void 0!==e){var o=data.handlers[e];if(o)if(r){if(r.guid)for(var l=0;l<o.length;l++)o[l].guid===r.guid&&o.splice(l--,1);Xt(t,e)}else n(t,e)}else for(var c in data.handlers)Object.prototype.hasOwnProperty.call(data.handlers||{},c)&&n(t,c)}}}function Zt(t,e,r){var n=Ut(t)?Wt(t):{},o=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=Kt(e),n.dispatcher&&n.dispatcher.call(t,e,r),o&&!e.isPropagationStopped()&&!0===e.bubbles)Zt.call(null,o,e,r);else if(!o&&!e.defaultPrevented){var l=Wt(e.target);e.target[e.type]&&(l.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),l.disabled=!1)}return!e.defaultPrevented}function te(t,e,r){if(Array.isArray(e))return qt(te,t,e,r);var n=function n(){Qt(t,e,n),r.apply(this,arguments)};n.guid=r.guid=r.guid||Ht(),Jt(t,e,n)}var ee=(Object.freeze||Object)({fixEvent:Kt,on:Jt,off:Qt,trigger:Zt,one:te}),re=!1,ne=void 0,ie=function(){if(lt()&&!1!==ne.options.autoSetup){var t=c.getElementsByTagName("video"),e=c.getElementsByTagName("audio"),r=c.getElementsByTagName("video-js"),n=[];if(t&&t.length>0)for(var i=0,o=t.length;i<o;i++)n.push(t[i]);if(e&&e.length>0)for(var l=0,h=e.length;l<h;l++)n.push(e[l]);if(r&&r.length>0)for(var d=0,f=r.length;d<f;d++)n.push(r[d]);if(n&&n.length>0)for(var v=0,y=n.length;v<y;v++){var m=n[v];if(!m||!m.getAttribute){oe(1);break}void 0===m.player&&null!==m.getAttribute("data-setup")&&ne(m)}else re||oe(1)}};function oe(t,e){e&&(ne=e),l.setTimeout(ie,t)}lt()&&"complete"===c.readyState?re=!0:te(l,"load",(function(){re=!0}));var se=function(t){var style=c.createElement("style");return style.className=t,style},ae=function(t,content){t.styleSheet?t.styleSheet.cssText=content:t.textContent=content},le=function(t,e,r){e.guid||(e.guid=Ht());var n=function(){return e.apply(t,arguments)};return n.guid=r?r+"_"+e.guid:e.guid,n},ce=function(t,e){var r=Date.now();return function(){var n=Date.now();n-r>=e&&(t.apply(void 0,arguments),r=n)}},ue=function(){};ue.prototype.allowedEvents_={},ue.prototype.on=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},Jt(this,t,e),this.addEventListener=r},ue.prototype.addEventListener=ue.prototype.on,ue.prototype.off=function(t,e){Qt(this,t,e)},ue.prototype.removeEventListener=ue.prototype.off,ue.prototype.one=function(t,e){var r=this.addEventListener;this.addEventListener=function(){},te(this,t,e),this.addEventListener=r},ue.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=Kt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Zt(this,t)},ue.prototype.dispatchEvent=ue.prototype.trigger;var he=function(object){return object instanceof ue||!!object.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof object[t]}))},pe=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},de=function(t){if(!t.nodeName&&!he(t))throw new Error("Invalid target; must be a DOM node or evented object.")},fe=function(t){if(!pe(t))throw new Error("Invalid event type; must be a non-empty string or array.")},ve=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},ye=function(t,e){var r=e.length<3||e[0]===t||e[0]===t.eventBusEl_,n=void 0,o=void 0,l=void 0;return r?(n=t.eventBusEl_,e.length>=3&&e.shift(),o=e[0],l=e[1]):(n=e[0],o=e[1],l=e[2]),de(n),fe(o),ve(l),{isTargetingSelf:r,target:n,type:o,listener:l=le(t,l)}},ge=function(t,e,r,n){de(t),t.nodeName?ee[e](t,r,n):t[e](r,n)},me={on:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=ye(this,r),l=o.isTargetingSelf,c=o.target,h=o.type,d=o.listener;if(ge(c,"on",h,d),!l){var f=function(){return t.off(c,h,d)};f.guid=d.guid;var v=function(){return t.off("dispose",f)};v.guid=d.guid,ge(this,"on","dispose",f),ge(c,"on","dispose",v)}},one:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];var o=ye(this,r),l=o.isTargetingSelf,c=o.target,h=o.type,d=o.listener;if(l)ge(c,"one",h,d);else{var f=function e(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];t.off(c,h,e),d.apply(null,n)};f.guid=d.guid,ge(c,"one",h,f)}},off:function(t,e,r){if(!t||pe(t))Qt(this.eventBusEl_,t,e);else{var n=t,o=e;de(n),fe(o),ve(r),r=le(this,r),this.off("dispose",r),n.nodeName?(Qt(n,o,r),Qt(n,"dispose",r)):he(n)&&(n.off(o,r),n.off("dispose",r))}},trigger:function(t,e){return Zt(this.eventBusEl_,t,e)}};function _e(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.eventBusKey;if(r){if(!t[r].nodeName)throw new Error('The eventBusKey "'+r+'" does not refer to an element.');t.eventBusEl_=t[r]}else t.eventBusEl_=pt("span",{className:"vjs-event-bus"});return J(t,me),t.on("dispose",(function(){t.off(),l.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var be={state:{},setState:function(t){var e=this;"function"==typeof t&&(t=t());var r=void 0;return G(t,(function(t,n){e.state[n]!==t&&((r=r||{})[n]={from:e.state[n],to:t}),e.state[n]=t})),r&&he(this)&&this.trigger({changes:r,type:"statechanged"}),r}};function Te(t,e){return J(t,be),t.state=J({},t.state,e),"function"==typeof t.handleStateChanged&&he(t)&&t.on("statechanged",t.handleStateChanged),t}function Ce(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ke(){for(var t={},e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(source){source&&G(source,(function(e,r){Z(e)?(Z(t[r])||(t[r]={}),t[r]=ke(t[r],e)):t[r]=e}))})),t}var Ee=function(){function t(e,r,n){if(W(this,t),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=ke({},this.options_),r=this.options_=ke(this.options_,r),this.id_=r.id||r.el&&r.el.id,!this.id_){var o=e&&e.id&&e.id()||"no_player";this.id_=o+"_component_"+Ht()}this.name_=r.name||null,r.el?this.el_=r.el:!1!==r.createEl&&(this.el_=this.createEl()),!1!==r.evented&&_e(this,{eventBusKey:this.el_?"el_":null}),Te(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==r.initChildren&&this.initChildren(),this.ready(n),!1!==r.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),$t(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return et.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=ke(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,r){return pt(t,e,r)},t.prototype.localize=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,code=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),o=n&&n[code],l=code&&code.split("-")[0],c=n&&n[l],h=r;return o&&o[t]?h=o[t]:c&&c[t]&&(h=c[t]),e&&(h=h.replace(/\{(\d+)\}/g,(function(t,r){var n=e[r-1],o=n;return void 0===n&&(o=t),o}))),h},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=Ce(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,component=void 0,o=void 0;if("string"==typeof e){o=Ce(e);var l=r.componentClass||o;r.name=o;var c=t.getComponent(l);if(!c)throw new Error("Component "+l+" does not exist");if("function"!=typeof c)return null;component=new c(this.player_||this,r)}else component=e;if(this.children_.splice(n,0,component),"function"==typeof component.id&&(this.childIndex_[component.id()]=component),(o=o||component.name&&Ce(component.name()))&&(this.childNameIndex_[o]=component),"function"==typeof component.el&&component.el()){var h=this.contentEl().children,d=h[n]||null;this.contentEl().insertBefore(component.el(),d)}return component},t.prototype.removeChild=function(component){if("string"==typeof component&&(component=this.getChild(component)),component&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===component){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[component.id()]=null,this.childNameIndex_[component.name()]=null;var e=component.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(component.el())}}},t.prototype.initChildren=function(){var e=this,r=this.options_.children;if(r){var n=this.options_,o=void 0,l=t.getComponent("Tech");(o=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter((function(t){return!o.some((function(e){return"string"==typeof e?t===e:t===e.name}))}))).map((function(t){var n=void 0,o=void 0;return"string"==typeof t?o=r[n=t]||e.options_[n]||{}:(n=t.name,o=t),{name:n,opts:o}})).filter((function(e){var r=t.getComponent(e.opts.componentClass||Ce(e.name));return r&&!l.isTech(r)})).forEach((function(t){var r=t.name,o=t.opts;if(void 0!==n[r]&&(o=n[r]),!1!==o){!0===o&&(o={}),o.playerOptions=e.options_.playerOptions;var l=e.addChild(r,o);l&&(e[r]=l)}}))}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&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))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},t.prototype.$=function(t,e){return Dt(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Rt(t,e||this.contentEl())},t.prototype.hasClass=function(t){return yt(this.el_,t)},t.prototype.addClass=function(t){gt(this.el_,t)},t.prototype.removeClass=function(t){mt(this.el_,t)},t.prototype.toggleClass=function(t,e){_t(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return Ct(this.el_,t)},t.prototype.setAttribute=function(t,e){kt(this.el_,t,e)},t.prototype.removeAttribute=function(t){Et(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,r){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(r||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],o=n.indexOf("px");return-1!==o?parseInt(n.slice(0,o),10):parseInt(this.el_["offset"+Ce(t)],10)},t.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 l.getComputedStyle){var r=l.getComputedStyle(this.el_);e=r.getPropertyValue(t)||r[t]}if(0===(e=parseFloat(e))){var n="offset"+Ce(t);e=this.el_[n]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,r=void 0;this.on("touchstart",(function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),r=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)r=!1;else if(e){var n=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY;Math.sqrt(n*n+o*o)>10&&(r=!1)}}));var n=function(){r=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){(e=null,!0===r)&&((new Date).getTime()-t<200&&(n.preventDefault(),this.trigger("tap")))}))},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=le(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var r=function(r){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",r),this.on("touchcancel",r)}},t.prototype.setTimeout=function(t,e){var r,n,o=this;return t=le(this,t),r=l.setTimeout((function(){o.off("dispose",n),t()}),e),(n=function(){return o.clearTimeout(r)}).guid="vjs-timeout-"+r,this.on("dispose",n),r},t.prototype.clearTimeout=function(t){l.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var r=this;t=le(this,t);var n=l.setInterval(t,e),o=function(){return r.clearInterval(n)};return o.guid="vjs-interval-"+n,this.on("dispose",o),n},t.prototype.clearInterval=function(t){l.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e,r,n=this;return this.supportsRaf_?(t=le(this,t),e=l.requestAnimationFrame((function(){n.off("dispose",r),t()})),(r=function(){return n.cancelAnimationFrame(e)}).guid="vjs-raf-"+e,this.on("dispose",r),e):this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){l.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,r){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n=t.getComponent("Tech"),o=n&&n.isTech(r),l=t===r||t.prototype.isPrototypeOf(r.prototype);if(o||!l){var c=void 0;throw c=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+c+".")}e=Ce(e),t.components_||(t.components_={});var h=t.getComponent("Player");if("Player"===e&&h&&h.players){var d=h.players,f=Object.keys(d);if(d&&f.length>0&&f.map((function(t){return d[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=r,r},t.getComponent=function(e){if(e)return e=Ce(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();function we(t,e,r,n){return function(t,e,r){if("number"!=typeof e||e<0||e>r)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+r+").")}(t,n,r.length-1),r[n][e]}function Se(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:we.bind(null,"start",0,t),end:we.bind(null,"end",1,t)}}function xe(t,e){return Array.isArray(t)?Se(t):void 0===t||void 0===e?Se():Se([[t,e]])}function je(t,e){var r=0,n=void 0,o=void 0;if(!e)return 0;t&&t.length||(t=xe(0,0));for(var i=0;i<t.length;i++)n=t.start(i),(o=t.end(i))>e&&(o=e),r+=o-n;return r/e}Ee.prototype.supportsRaf_="function"==typeof l.requestAnimationFrame&&"function"==typeof l.cancelAnimationFrame,Ee.registerComponent("Component",Ee);for(var Ae={},Pe=[["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"]],Oe=Pe[0],Me=void 0,i=0;i<Pe.length;i++)if(Pe[i][1]in c){Me=Pe[i];break}if(Me)for(var Ne=0;Ne<Me.length;Ne++)Ae[Oe[Ne]]=Me[Ne];function Ie(t){if(t instanceof Ie)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:Q(t)&&("number"==typeof t.code&&(this.code=t.code),J(this,t)),this.message||(this.message=Ie.defaultMessages[this.code]||"")}Ie.prototype.code=0,Ie.prototype.message="",Ie.prototype.status=null,Ie.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Ie.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 Le=0;Le<Ie.errorTypes.length;Le++)Ie[Ie.errorTypes[Le]]=Le,Ie.prototype[Ie.errorTypes[Le]]=Le;function De(t){return null!=t&&"function"==typeof t.then}function Re(t){De(t)&&t.then(null,(function(t){}))}var Be=function(track){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,e,i){return track[e]&&(t[e]=track[e]),t}),{cues:track.cues&&Array.prototype.map.call(track.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Fe=function(t){var e=t.$$("track"),r=Array.prototype.map.call(e,(function(t){return t.track}));return Array.prototype.map.call(e,(function(t){var e=Be(t.track);return t.src&&(e.src=t.src),e})).concat(Array.prototype.filter.call(t.textTracks(),(function(track){return-1===r.indexOf(track)})).map(Be))},He=function(t,e){return t.forEach((function(track){var t=e.addRemoteTextTrack(track).track;!track.src&&track.cues&&track.cues.forEach((function(e){return t.addCue(e)}))})),e.textTracks()},Ve="vjs-modal-dialog",ze=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.opened_=o.hasBeenOpened_=o.hasBeenFilled_=!1,o.closeable(!o.options_.uncloseable),o.content(o.options_.content),o.contentEl_=pt("div",{className:Ve+"-content"},{role:"document"}),o.descEl_=pt("p",{className:Ve+"-description vjs-control-text",id:o.el().getAttribute("aria-describedby")}),ft(o.descEl_,o.description()),o.el_.appendChild(o.descEl_),o.el_.appendChild(o.contentEl_),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return Ve+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var desc=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(desc+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),desc},e.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",le(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}},e.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.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",le(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()}},e.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,r=this.getChild("closeButton");if(e&&!r){var n=this.contentEl_;this.contentEl_=this.el_,r=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(r,"close",this.close)}!e&&r&&(this.off(r,"close",this.close),this.removeChild(r),r.dispose())}return this.closeable_},e.prototype.fill=function(){this.fillWith(this.content())},e.prototype.fillWith=function(content){var t=this.contentEl(),e=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,e.removeChild(t),this.empty(),It(t,content),this.trigger("modalfill"),r?e.insertBefore(t,r):e.appendChild(t);var n=this.getChild("closeButton");n&&e.appendChild(n.el_)},e.prototype.empty=function(){this.trigger("beforemodalempty"),Ot(this.contentEl()),this.trigger("modalempty")},e.prototype.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.prototype.conditionalFocus_=function(){var t=c.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(c,"keydown",this.handleKeyDown))},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(c,"keydown",this.handleKeyDown)},e.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),r=this.el_.querySelector(":focus"),n=void 0,i=0;i<e.length;i++)if(r===e[i]){n=i;break}c.activeElement===this.el_&&(n=0),t.shiftKey&&0===n?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||n!==e.length-1||(e[0].focus(),t.preventDefault())}},e.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,(function(t){return(t instanceof l.HTMLAnchorElement||t instanceof l.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof l.HTMLInputElement||t instanceof l.HTMLSelectElement||t instanceof l.HTMLTextAreaElement||t instanceof l.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof l.HTMLIFrameElement||t instanceof l.HTMLObjectElement||t instanceof l.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")}))},e}(Ee);ze.prototype.options_={pauseOnOpen:!0,temporary:!0},Ee.registerComponent("ModalDialog",ze);var We=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;W(this,e);var o=$(this,t.call(this));if(!n&&(n=o,L))for(var l in n=c.createElement("custom"),e.prototype)"constructor"!==l&&(n[l]=e.prototype[l]);n.tracks_=[],Object.defineProperty(n,"length",{get:function(){return this.tracks_.length}});for(var i=0;i<r.length;i++)n.addTrack(r[i]);return $(o,n)}return U(e,t),e.prototype.addTrack=function(track){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(track)&&(this.tracks_.push(track),this.trigger({track:track,type:"addtrack"}))},e.prototype.removeTrack=function(t){for(var track=void 0,i=0,e=this.length;i<e;i++)if(this[i]===t){(track=this[i]).off&&track.off(),this.tracks_.splice(i,1);break}track&&this.trigger({track:track,type:"removetrack"})},e.prototype.getTrackById=function(t){for(var e=null,i=0,r=this.length;i<r;i++){var track=this[i];if(track.id===t){e=track;break}}return e},e}(ue);for(var Ue in We.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},We.prototype.allowedEvents_)We.prototype["on"+Ue]=null;var $e=function(t,track){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&track.id!==t[i].id&&(t[i].enabled=!1)},Xe=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];W(this,e);for(var o=void 0,i=n.length-1;i>=0;i--)if(n[i].enabled){$e(n,n[i]);break}if(L){for(var l in o=c.createElement("custom"),We.prototype)"constructor"!==l&&(o[l]=We.prototype[l]);for(var h in e.prototype)"constructor"!==h&&(o[h]=e.prototype[h])}return(o=r=$(this,t.call(this,n,o))).changing_=!1,$(r,o)}return U(e,t),e.prototype.addTrack=function(track){var e=this;track.enabled&&$e(this,track),t.prototype.addTrack.call(this,track),track.addEventListener&&track.addEventListener("enabledchange",(function(){e.changing_||(e.changing_=!0,$e(e,track),e.changing_=!1,e.trigger("change"))}))},e}(We),qe=function(t,track){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&track.id!==t[i].id&&(t[i].selected=!1)},Ke=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];W(this,e);for(var o=void 0,i=n.length-1;i>=0;i--)if(n[i].selected){qe(n,n[i]);break}if(L){for(var l in o=c.createElement("custom"),We.prototype)"constructor"!==l&&(o[l]=We.prototype[l]);for(var h in e.prototype)"constructor"!==h&&(o[h]=e.prototype[h])}return(o=r=$(this,t.call(this,n,o))).changing_=!1,Object.defineProperty(o,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),$(r,o)}return U(e,t),e.prototype.addTrack=function(track){var e=this;track.selected&&qe(this,track),t.prototype.addTrack.call(this,track),track.addEventListener&&track.addEventListener("selectedchange",(function(){e.changing_||(e.changing_=!0,qe(e,track),e.changing_=!1,e.trigger("change"))}))},e}(We),Ye=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];W(this,e);var o=void 0;if(L){for(var l in o=c.createElement("custom"),We.prototype)"constructor"!==l&&(o[l]=We.prototype[l]);for(var h in e.prototype)"constructor"!==h&&(o[h]=e.prototype[h])}return r=$(this,t.call(this,n,o)),$(r,o=r)}return U(e,t),e.prototype.addTrack=function(track){t.prototype.addTrack.call(this,track),track.addEventListener("modechange",le(this,(function(){this.trigger("change")})));-1===["metadata","chapters"].indexOf(track.kind)&&track.addEventListener("modechange",le(this,(function(){this.trigger("selectedlanguagechange")})))},e}(We),Ge=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];W(this,t);var r=this;if(L)for(var n in r=c.createElement("custom"),t.prototype)"constructor"!==n&&(r[n]=t.prototype[n]);r.trackElements_=[],Object.defineProperty(r,"length",{get:function(){return this.trackElements_.length}});for(var i=0,o=e.length;i<o;i++)r.addTrackElement_(e[i]);if(L)return r}return t.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)},t.prototype.getTrackElementByTrack_=function(track){for(var t=void 0,i=0,e=this.trackElements_.length;i<e;i++)if(track===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.prototype.removeTrackElement_=function(t){for(var i=0,e=this.trackElements_.length;i<e;i++)if(t===this.trackElements_[i]){this.trackElements_.splice(i,1);break}},t}(),Je=function(){function t(e){W(this,t);var r=this;if(L)for(var n in r=c.createElement("custom"),t.prototype)"constructor"!==n&&(r[n]=t.prototype[n]);if(t.prototype.setCues_.call(r,e),Object.defineProperty(r,"length",{get:function(){return this.length_}}),L)return r}return t.prototype.setCues_=function(t){var e=this.length||0,i=0,r=t.length;this.cues_=t,this.length_=t.length;var n=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(i=e;i<r;i++)n.call(this,i)},t.prototype.getCueById=function(t){for(var e=null,i=0,r=this.length;i<r;i++){var n=this[i];if(n.id===t){e=n;break}}return e},t}(),Qe={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ze={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},er={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},rr={disabled:"disabled",hidden:"hidden",showing:"showing"},nr=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var n=$(this,t.call(this)),track=n;if(L)for(var o in track=c.createElement("custom"),e.prototype)"constructor"!==o&&(track[o]=e.prototype[o]);var l={id:r.id||"vjs_track_"+Ht(),kind:r.kind||"",label:r.label||"",language:r.language||""},h=function(t){Object.defineProperty(track,t,{get:function(){return l[t]},set:function(){}})};for(var d in l)h(d);return $(n,track)}return U(e,t),e}(ue),ir=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],a=c.createElement("a");a.href=t;var r=""===a.host&&"file:"!==a.protocol,div=void 0;r&&((div=c.createElement("div")).innerHTML='<a href="'+t+'"></a>',a=div.firstChild,div.setAttribute("style","display:none; position:absolute;"),c.body.appendChild(div));for(var details={},i=0;i<e.length;i++)details[e[i]]=a[e[i]];return"http:"===details.protocol&&(details.host=details.host.replace(/:80$/,"")),"https:"===details.protocol&&(details.host=details.host.replace(/:443$/,"")),details.protocol||(details.protocol=l.location.protocol),r&&c.body.removeChild(div),details},or=function(t){if(!t.match(/^https?:\/\//)){var div=c.createElement("div");div.innerHTML='<a href="'+t+'">x</a>',t=div.firstChild.href}return t},sr=function(path){if("string"==typeof path){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(path);if(t)return t.pop().toLowerCase()}return""},ar=function(t){var e=l.location,r=ir(t);return(":"===r.protocol?e.protocol:r.protocol)+r.host!==e.protocol+e.host},lr=(Object.freeze||Object)({parseUrl:ir,getAbsoluteURL:or,getFileExtension:sr,isCrossOrigin:ar}),cr=function(t,track){var e=new l.WebVTT.Parser(l,l.vttjs,l.WebVTT.StringDecoder()),r=[];e.oncue=function(t){track.addCue(t)},e.onparsingerror=function(t){r.push(t)},e.onflush=function(){track.trigger({type:"loadeddata",target:track})},e.parse(t),r.length>0&&(l.console&&l.console.groupCollapsed&&l.console.groupCollapsed("Text Track parsing errors for "+track.src),r.forEach((function(t){return et.error(t)})),l.console&&l.console.groupEnd&&l.console.groupEnd()),e.flush()},ur=function(t,track){var e={uri:t},r=ar(t);r&&(e.cors=r),f(e,le(this,(function(t,e,r){if(t)return et.error(t,e);if(track.loaded_=!0,"function"!=typeof l.WebVTT){if(track.tech_){var n=function(){return cr(r,track)};track.tech_.on("vttjsloaded",n),track.tech_.on("vttjserror",(function(){et.error("vttjs failed to load, stopping trying to process "+track.src),track.tech_.off("vttjsloaded",n)}))}}else cr(r,track)})))},pr=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(W(this,e),!n.tech)throw new Error("A tech was not provided.");var o=ke(n,{kind:er[n.kind]||"subtitles",language:n.language||n.srclang||""}),l=rr[o.mode]||"disabled",c=o.default;"metadata"!==o.kind&&"chapters"!==o.kind||(l="hidden");var h=r=$(this,t.call(this,o));if(h.tech_=o.tech,L)for(var d in e.prototype)"constructor"!==d&&(h[d]=e.prototype[d]);h.cues_=[],h.activeCues_=[];var f=new Je(h.cues_),v=new Je(h.activeCues_),y=!1,m=le(h,(function(){this.activeCues=this.activeCues,y&&(this.trigger("cuechange"),y=!1)}));return"disabled"!==l&&h.tech_.ready((function(){h.tech_.on("timeupdate",m)}),!0),Object.defineProperty(h,"default",{get:function(){return c},set:function(){}}),Object.defineProperty(h,"mode",{get:function(){return l},set:function(t){var e=this;rr[t]&&("disabled"!==(l=t)?this.tech_.ready((function(){e.tech_.on("timeupdate",m)}),!0):this.tech_.off("timeupdate",m),this.trigger("modechange"))}}),Object.defineProperty(h,"cues",{get:function(){return this.loaded_?f:null},set:function(){}}),Object.defineProperty(h,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return v;for(var t=this.tech_.currentTime(),e=[],i=0,r=this.cues.length;i<r;i++){var n=this.cues[i];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&e.push(n)}if(y=!1,e.length!==this.activeCues_.length)y=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(y=!0);return this.activeCues_=e,v.setCues_(this.activeCues_),v},set:function(){}}),o.src?(h.src=o.src,ur(o.src,h)):h.loaded_=!0,$(r,h)}return U(e,t),e.prototype.addCue=function(t){var e=t;if(l.vttjs&&!(t instanceof l.vttjs.VTTCue)){for(var r in e=new l.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)r in e||(e[r]=t[r]);e.id=t.id,e.originalCue_=t}for(var n=this.tech_.textTracks(),i=0;i<n.length;i++)n[i]!==this&&n[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var i=this.cues_.length;i--;){var e=this.cues_[i];if(e===t||e.originalCue_&&e.originalCue_===t){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}},e}(nr);pr.prototype.allowedEvents_={cuechange:"cuechange"};var dr=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var o=ke(n,{kind:Ze[n.kind]||""}),track=r=$(this,t.call(this,o)),l=!1;if(L)for(var c in e.prototype)"constructor"!==c&&(track[c]=e.prototype[c]);return Object.defineProperty(track,"enabled",{get:function(){return l},set:function(t){"boolean"==typeof t&&t!==l&&(l=t,this.trigger("enabledchange"))}}),o.enabled&&(track.enabled=o.enabled),track.loaded_=!0,$(r,track)}return U(e,t),e}(nr),fr=function(t){function e(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var o=ke(n,{kind:Qe[n.kind]||""}),track=r=$(this,t.call(this,o)),l=!1;if(L)for(var c in e.prototype)"constructor"!==c&&(track[c]=e.prototype[c]);return Object.defineProperty(track,"selected",{get:function(){return l},set:function(t){"boolean"==typeof t&&t!==l&&(l=t,this.trigger("selectedchange"))}}),o.selected&&(track.selected=o.selected),$(r,track)}return U(e,t),e}(nr),vr=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};W(this,e);var n=$(this,t.call(this)),o=void 0,l=n;if(L)for(var h in l=c.createElement("custom"),e.prototype)"constructor"!==h&&(l[h]=e.prototype[h]);var track=new pr(r);return l.kind=track.kind,l.src=track.src,l.srclang=track.language,l.label=track.label,l.default=track.default,Object.defineProperty(l,"readyState",{get:function(){return o}}),Object.defineProperty(l,"track",{get:function(){return track}}),o=0,track.addEventListener("loadeddata",(function(){o=2,l.trigger({type:"load",target:l})})),L?$(n,l):n}return U(e,t),e}(ue);vr.prototype.allowedEvents_={load:"load"},vr.NONE=0,vr.LOADING=1,vr.LOADED=2,vr.ERROR=3;var yr={audio:{ListClass:Xe,TrackClass:dr,capitalName:"Audio"},video:{ListClass:Ke,TrackClass:fr,capitalName:"Video"},text:{ListClass:Ye,TrackClass:pr,capitalName:"Text"}};Object.keys(yr).forEach((function(t){yr[t].getterName=t+"Tracks",yr[t].privateName=t+"Tracks_"}));var gr={remoteText:{ListClass:Ye,TrackClass:pr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ge,TrackClass:vr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},mr=ke(yr,gr);gr.names=Object.keys(gr),yr.names=Object.keys(yr),mr.names=[].concat(gr.names).concat(yr.names);var _r=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};W(this,e),r.reportTouchActivity=!1;var o=$(this,t.call(this,null,r,n));return o.hasStarted_=!1,o.on("playing",(function(){this.hasStarted_=!0})),o.on("loadstart",(function(){this.hasStarted_=!1})),mr.names.forEach((function(t){var e=mr[t];r&&r[e.getterName]&&(o[e.privateName]=r[e.getterName])})),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(track){!1===r["native"+track+"Tracks"]&&(o["featuresNative"+track+"Tracks"]=!1)})),!1===r.nativeCaptions||!1===r.nativeTextTracks?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new mr.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return U(e,t),e.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"})},e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(le(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return xe(0,0)},e.prototype.bufferedPercent=function(){return je(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(yr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;(t=[].concat(t)).forEach((function(t){for(var r=e[t+"Tracks"]()||[],i=r.length;i--;){var track=r[i];"text"===t&&e.removeRemoteTextTrack(track),r.removeTrack(track)}}))},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],i=t.length;i--;){var track=t[i];this.removeRemoteTextTrack(track)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new Ie(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?xe(0,0):xe()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;yr.names.forEach((function(e){var r=yr[e],n=function(){t.trigger(e+"trackchange")},o=t[r.getterName]();o.addEventListener("removetrack",n),o.addEventListener("addtrack",n),t.on("dispose",(function(){o.removeEventListener("removetrack",n),o.removeEventListener("addtrack",n)}))}))},e.prototype.addWebVttScript_=function(){var t=this;if(!l.WebVTT)if(c.body.contains(this.el())){if(!this.options_["vtt.js"]&&Z(v)&&Object.keys(v).length>0)return void this.trigger("vttjsloaded");var script=c.createElement("script");script.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",script.onload=function(){t.trigger("vttjsloaded")},script.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){script.onload=null,script.onerror=null})),l.WebVTT=!0,this.el().parentNode.appendChild(script)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),r=this.remoteTextTracks(),n=function(t){return e.addTrack(t.track)},o=function(t){return e.removeTrack(t.track)};r.on("addtrack",n),r.on("removetrack",o),this.addWebVttScript_();var l=function(){return t.trigger("texttrackchange")},c=function(){l();for(var i=0;i<e.length;i++){var track=e[i];track.removeEventListener("cuechange",l),"showing"===track.mode&&track.addEventListener("cuechange",l)}};c(),e.addEventListener("change",c),e.addEventListener("addtrack",c),e.addEventListener("removetrack",c),this.on("dispose",(function(){r.off("addtrack",n),r.off("removetrack",o),e.removeEventListener("change",c),e.removeEventListener("addtrack",c),e.removeEventListener("removetrack",c);for(var i=0;i<e.length;i++){e[i].removeEventListener("cuechange",l)}}))},e.prototype.addTextTrack=function(t,label,e){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,label,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();n.kind=e,label&&(n.label=label),r&&(n.language=r),n.tech=t;var track=new mr.text.TrackClass(n);return o.addTrack(track),track}(this,t,label,e)},e.prototype.createRemoteTextTrack=function(t){var track=ke(t,{tech:this});return new gr.remoteTextEl.TrackClass(track)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1],n=this.createRemoteTextTrack(e);return!0!==r&&!1!==r&&(et.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),r=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==r&&this.ready((function(){return t.autoRemoteTextTracks_.addTrack(n.track)})),n},e.prototype.removeRemoteTextTrack=function(track){var t=this.remoteTextTrackEls().getTrackElementByTrack_(track);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(track),this.autoRemoteTextTracks_.removeTrack(track)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,r){return e.canPlayType(t.type)},e.isTech=function(component){return component.prototype instanceof e||component instanceof e||component===e},e.registerTech=function(t,r){if(e.techs_||(e.techs_={}),!e.isTech(r))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=Ce(t),e.techs_[t]=r,"Tech"!==t&&e.defaultTechOrder_.push(t),r},e.getTech=function(t){if(t)return t=Ce(t),e.techs_&&e.techs_[t]?e.techs_[t]:l&&l.videojs&&l.videojs[t]?(et.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),l.videojs[t]):void 0},e}(Ee);mr.names.forEach((function(t){var e=mr[t];_r.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),_r.prototype.featuresVolumeControl=!0,_r.prototype.featuresMuteControl=!0,_r.prototype.featuresFullscreenResize=!1,_r.prototype.featuresPlaybackRate=!1,_r.prototype.featuresProgressEvents=!1,_r.prototype.featuresSourceset=!1,_r.prototype.featuresTimeupdateEvents=!1,_r.prototype.featuresNativeTextTracks=!1,_r.withSourceHandlers=function(t){t.registerSourceHandler=function(e,r){var n=t.sourceHandlers;n||(n=t.sourceHandlers=[]),void 0===r&&(r=n.length),n.splice(r,0,e)},t.canPlayType=function(e){for(var r=t.sourceHandlers||[],n=void 0,i=0;i<r.length;i++)if(n=r[i].canPlayType(e))return n;return""},t.selectSourceHandler=function(source,e){for(var r=t.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(source,e))return r[i];return null},t.canPlaySource=function(e,r){var n=t.selectSourceHandler(e,r);return n?n.canHandleSource(e,r):""};["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)})}),t.prototype),t.prototype.setSource=function(source){var e=t.selectSourceHandler(source,this.options_);e||(t.nativeSourceHandler?e=t.nativeSourceHandler:et.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),e!==t.nativeSourceHandler&&(this.currentSource_=source),this.sourceHandler_=e.handleSource(source,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.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)}},Ee.registerComponent("Tech",_r),_r.registerTech("Tech",_r),_r.defaultTechOrder_=[];var Tr={},Cr={},kr={};function Er(t,e,r){t.setTimeout((function(){return Mr(e,Tr[e.type],r,t)}),1)}function wr(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o="call"+Ce(r),l=t.reduce(Ar(o),n),c=l===kr,h=c?null:e[r](l);return Pr(t,r,h,c),h}var Sr={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},xr={setCurrentTime:1},jr={play:1,pause:1};function Ar(t){return function(e,r){return e===kr?kr:r[t]?r[t](e):e}}function Pr(t,e,r,n){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](n,r)}}function Or(t,e){var r=Cr[t.id()],n=null;if(null==r)return n=e(t),Cr[t.id()]=[[e,n]],n;for(var i=0;i<r.length;i++){var o=r[i],l=o[0],c=o[1];l===e&&(n=c)}return null===n&&(n=e(t),r.push([e,n])),n}function Mr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],c=e[0],h=e.slice(1);if("string"==typeof c)Mr(t,Tr[c],r,n,o,l);else if(c){var d=Or(n,c);if(!d.setSource)return o.push(d),Mr(t,h,r,n,o,l);d.setSource(J({},t),(function(e,c){if(e)return Mr(t,h,r,n,o,l);o.push(d),Mr(c,t.type===c.type?h:Tr[c.type],r,n,o,l)}))}else h.length?Mr(t,h,r,n,o,l):l?r(t,o):Mr(t,Tr["*"],r,n,o,!0)}var Nr={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"},Ir=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=sr(t),r=Nr[e.toLowerCase()];return r||""},Lr=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var r=t.cache_.sources.filter((function(s){return s.src===e}));if(r.length)return r[0].type;for(var n=t.$$("source"),i=0;i<n.length;i++){var s=n[i];if(s.type&&s.src&&s.src===e)return s.type}return Ir(e)},Dr=function t(e){if(Array.isArray(e)){var r=[];e.forEach((function(e){e=t(e),Array.isArray(e)?r=r.concat(e):Q(e)&&r.push(e)})),e=r}else e="string"==typeof e&&e.trim()?[Rr({src:e})]:Q(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[Rr(e)]:[];return e};function Rr(t){var e=Ir(t.src);return!t.type&&e&&(t.type=e),t}var Br=function(t){function e(r,n,o){W(this,e);var l=ke({createEl:!1},n),c=$(this,t.call(this,r,l,o));if(n.playerOptions.sources&&0!==n.playerOptions.sources.length)r.src(n.playerOptions.sources);else for(var i=0,h=n.playerOptions.techOrder;i<h.length;i++){var d=Ce(h[i]),f=_r.getTech(d);if(d||(f=Ee.getComponent(d)),f&&f.isSupported()){r.loadTech_(d);break}}return c}return U(e,t),e}(Ee);Ee.registerComponent("MediaLoader",Br);var Fr=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.emitTapEvents(),o.enable(),o}return U(e,t),e.prototype.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=J({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},r),"button"===e&&et.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=J({role:"button"},n),this.tabIndex_=r.tabIndex;var o=t.prototype.createEl.call(this,e,r,n);return this.createControlTextEl(o),o},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=pt("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(text){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===text)return this.controlText_||"Need Text";var e=this.localize(text);this.controlText_=text,ft(this.controlTextEl_,e),this.nonIconControl||t.setAttribute("title",e)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){Jt(c,"keydown",le(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){Qt(c,"keydown",le(this,this.handleKeyPress))},e}(Ee);Ee.registerComponent("ClickableComponent",Fr);var Hr=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.update(),r.on("posterchange",le(o,o.update)),o}return U(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=pt("div",{className:"vjs-poster",tabIndex:-1});return H||(this.fallbackImg_=pt("img"),t.appendChild(this.fallbackImg_)),t},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){if(this.fallbackImg_)this.fallbackImg_.src=t;else{var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e}},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?Re(this.player_.play()):this.player_.pause())},e}(Fr);Ee.registerComponent("PosterImage",Hr);var Vr="#222",zr={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 Wr(t,e){var r=void 0;if(4===t.length)r=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.");r=t.slice(1)}return"rgba("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+","+e+")"}function Ur(t,style,e){try{t.style[style]=e}catch(t){return}}var $r=function(t){function e(r,n,o){W(this,e);var c=$(this,t.call(this,r,n,o)),h=le(c,c.updateDisplay);return r.on("loadstart",le(c,c.toggleDisplay)),r.on("texttrackchange",h),r.on("loadstart",le(c,c.preselectTrack)),r.ready(le(c,(function(){if(r.tech_&&r.tech_.featuresNativeTextTracks)this.hide();else{r.on("fullscreenchange",h),r.on("playerresize",h),l.addEventListener&&l.addEventListener("orientationchange",h),r.on("dispose",(function(){return l.removeEventListener("orientationchange",h)}));for(var t=this.options_.playerOptions.tracks||[],i=0;i<t.length;i++)this.player_.addRemoteTextTrack(t[i],!0);this.preselectTrack()}}))),c}return U(e,t),e.prototype.preselectTrack=function(){for(var t={captions:1,subtitles:1},e=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage,n=void 0,o=void 0,l=void 0,i=0;i<e.length;i++){var track=e[i];r&&r.enabled&&r.language===track.language?track.kind===r.kind?l=track:l||(l=track):r&&!r.enabled?(l=null,n=null,o=null):track.default&&("descriptions"!==track.kind||n?track.kind in t&&!o&&(o=track):n=track)}l?l.mode="showing":o?o.mode="showing":n&&(n.mode="showing")},e.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.prototype.clearDisplay=function(){"function"==typeof l.WebVTT&&l.WebVTT.processCues(l,[],this.el_)},e.prototype.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,r=null,i=t.length;i--;){var track=t[i];"showing"===track.mode&&("descriptions"===track.kind?e=track:r=track)}r?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(r)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},e.prototype.updateForTrack=function(track){if("function"==typeof l.WebVTT&&track.activeCues){for(var t=[],e=0;e<track.activeCues.length;e++)t.push(track.activeCues[e]);if(l.WebVTT.processCues(l,t,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),i=t.length;i--;){var n=t[i];if(n){var o=n.displayState;if(r.color&&(o.firstChild.style.color=r.color),r.textOpacity&&Ur(o.firstChild,"color",Wr(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(o.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&Ur(o.firstChild,"backgroundColor",Wr(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?Ur(o,"backgroundColor",Wr(r.windowColor,r.windowOpacity)):o.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?o.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Vr:"raised"===r.edgeStyle?o.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Vr:"depressed"===r.edgeStyle?o.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Vr:"uniform"===r.edgeStyle&&(o.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Vr)),r.fontPercent&&1!==r.fontPercent){var c=l.parseFloat(o.style.fontSize);o.style.fontSize=c*r.fontPercent+"px",o.style.height="auto",o.style.top="auto",o.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=zr[r.fontFamily])}}}},e}(Ee);Ee.registerComponent("TextTrackDisplay",$r);var Xr=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(){var e=this.player_.isAudio(),r=this.localize(e?"Audio Player":"Video Player"),n=pt("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[r])}),o=t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(n),o},e}(Ee);Ee.registerComponent("LoadingSpinner",Xr);var qr=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=J({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),r=J({type:"button"},r);var n=Ee.prototype.createEl.call(this,t,e,r);return this.createControlTextEl(n),n},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.constructor.name;return et.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead."),Ee.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Fr);Ee.registerComponent("Button",qr);var Kr=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.mouseused_=!1,o.on("mousedown",o.handleMouseDown),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Re(e);else{var r=this.player_.getChild("controlBar"),n=r&&r.getChild("playToggle");if(n){var o=function(){return n.focus()};De(e)?e.then(o,(function(){})):this.setTimeout(o,1)}else this.player_.focus()}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(qr);Kr.prototype.controlText_="Play Video",Ee.registerComponent("BigPlayButton",Kr);var Yr=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.controlText(n&&n.controlText||o.localize("Close")),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(qr);Ee.registerComponent("CloseButton",Yr);var Gr=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.on(r,"play",o.handlePlay),o.on(r,"pause",o.handlePause),o.on(r,"ended",o.handleEnded),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(qr);Gr.prototype.controlText_="Play",Ee.registerComponent("PlayToggle",Gr);var Jr=function(t,e){t=t<0?0:t;var s=Math.floor(t%60),r=Math.floor(t/60%60),n=Math.floor(t/3600),o=Math.floor(e/60%60),l=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(n=r=s="-"),(n=n>0||l>0?n+":":"")+(r=((n||o>=10)&&r<10?"0"+r:r)+":")+(s=s<10?"0"+s:s)},Qr=Jr;var Zr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return Qr(t,e)},tn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.throttledUpdateContent=ce(le(o,o.updateContent),25),o.on(r,"timeupdate",o.throttledUpdateContent),o}return U(e,t),e.prototype.createEl=function(e){var r=this.buildCSSClass(),n=t.prototype.createEl.call(this,"div",{className:r+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=pt("span",{className:r+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=c.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(time){return Zr(time)},e.prototype.updateFormattedTime_=function(time){var t=this.formatTime_(time);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(Ee);tn.prototype.labelText_="Time",tn.prototype.controlText_="Time",Ee.registerComponent("TimeDisplay",tn);var en=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.on(r,"ended",o.handleEnded),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var time=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(time)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(tn);en.prototype.labelText_="Current Time",en.prototype.controlText_="Current Time",Ee.registerComponent("CurrentTimeDisplay",en);var rn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.on(r,"durationchange",o.updateContent),o.on(r,"loadedmetadata",o.throttledUpdateContent),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(tn);rn.prototype.labelText_="Duration",rn.prototype.controlText_="Duration",Ee.registerComponent("DurationDisplay",rn);var nn=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(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}(Ee);Ee.registerComponent("TimeDivider",nn);var on=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.on(r,"durationchange",o.throttledUpdateContent),o.on(r,"ended",o.handleEnded),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(time){return"-"+t.prototype.formatTime_.call(this,time)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(tn);on.prototype.labelText_="Remaining Time",on.prototype.controlText_="Remaining Time",Ee.registerComponent("RemainingTimeDisplay",on);var sn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.updateShowing(),o.on(o.player(),"durationchange",o.updateShowing),o}return U(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=pt("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(Ee);Ee.registerComponent("LiveDisplay",sn);var an=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.bar=o.getChild(o.options_.barName),o.vertical(!!o.options_.vertical),o.enable(),o}return U(e,t),e.prototype.enabled=function(){return this.enabled_},e.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)},e.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}},e.prototype.createEl=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.className=r.className+" vjs-slider",r=J({tabIndex:0},r),n=J({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),t.prototype.createEl.call(this,e,r,n)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||N||t.preventDefault(),wt(),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)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;St(),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()},e.prototype.update=function(){if(this.el_){var progress=this.getPercent(),t=this.bar;if(t){("number"!=typeof progress||progress!=progress||progress<0||progress===1/0)&&(progress=0);var e=(100*progress).toFixed(2)+"%",style=t.el().style;return this.vertical()?style.height=e:style.width=e,progress}}},e.prototype.calculateDistance=function(t){var e=At(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.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")},e}(Ee);Ee.registerComponent("Slider",an);var ln=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.partEls_=[],o.on(r,"progress",o.update),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),r=this.player_.duration(),n=this.player_.bufferedEnd(),o=this.partEls_,l=function(time,t){var e=time/t||0;return 100*(e>=1?1:e)+"%"};this.el_.style.width=l(n,r);for(var i=0;i<e.length;i++){var c=e.start(i),h=e.end(i),d=o[i];d||(d=this.el_.appendChild(pt()),o[i]=d),d.style.left=l(c,n),d.style.width=l(h-c,n)}for(var f=o.length;f>e.length;f--)this.el_.removeChild(o[f-1]);o.length=e.length},e}(Ee);Ee.registerComponent("LoadProgressBar",ln);var cn=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,content){var r=xt(this.el_),n=xt(this.player_.el()),o=t.width*e;if(n&&r){var l=t.left-n.left+o,c=t.width-o+(n.right-t.right),h=r.width/2;l<h?h+=h-l:c<h&&(h=c),h<0?h=0:h>r.width&&(h=r.width),this.el_.style.right="-"+h+"px",ft(this.el_,content)}},e}(Ee);Ee.registerComponent("TimeTooltip",cn);var un=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(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(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var time=r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),content=Zr(time,r.player_.duration()),n=r.getChild("timeTooltip");n&&n.update(t,e,content)}))},e}(Ee);un.prototype.options_={children:[]},D&&!(D>8)||w||x||un.prototype.options_.children.push("timeTooltip"),Ee.registerComponent("PlayProgressBar",un);var hn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.update=ce(le(o,o.update),25),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=r.player_.duration(),content=Zr(e*n,n);r.el_.style.left=t.width*e+"px",r.getChild("timeTooltip").update(t,e,content)}))},e}(Ee);hn.prototype.options_={children:["timeTooltip"]},Ee.registerComponent("MouseTimeDisplay",hn);var pn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.setEventHandlers_(),o}return U(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=ce(le(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)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var r=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}",[Zr(t,r),Zr(r,r)],"{1} of {2}")),this.bar.update(xt(this.el_),e)},e.prototype.update=function(e){var r=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),r),r},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){Lt(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(Lt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Re(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(an);pn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},D&&!(D>8)||w||x||pn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),pn.prototype.playerEvent="timeupdate",Ee.registerComponent("SeekBar",pn);var dn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.handleMouseMove=ce(le(o,o.handleMouseMove),25),o.throttledHandleMouseSeek=ce(le(o,o.handleMouseSeek),25),o.enable(),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var r=e.getChild("mouseTimeDisplay"),n=e.el(),o=xt(n),l=At(n,t).x;l>1?l=1:l<0&&(l=0),r&&r.update(o,l)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.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)},e.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)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.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)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.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)},e}(Ee);dn.prototype.options_={children:["seekBar"]},Ee.registerComponent("ProgressControl",dn);var fn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.on(r,"fullscreenchange",o.handleFullscreenChange),!1===c[Ae.fullscreenEnabled]&&o.disable(),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(qr);fn.prototype.controlText_="Fullscreen",Ee.registerComponent("FullscreenToggle",fn);var vn=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")}))},yn=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(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}(Ee);Ee.registerComponent("VolumeLevel",yn);var gn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.on("slideractive",o.updateLastVolume_),o.on(r,"volumechange",o.updateARIAAttributes),r.ready((function(){return o.updateARIAAttributes()})),o}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseDown=function(e){Lt(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){Lt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(an);gn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},gn.prototype.playerEvent="volumechange",Ee.registerComponent("VolumeBar",gn);var mn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e),n.vertical=n.vertical||!1,(void 0===n.volumeBar||Z(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var o=$(this,t.call(this,r,n));return vn(o,r),o.throttledHandleMouseMove=ce(le(o,o.handleMouseMove),25),o.on("mousedown",o.handleMouseDown),o.on("touchstart",o.handleMouseDown),o.on(o.volumeBar,["focus","slideractive"],(function(){o.volumeBar.addClass("vjs-slider-active"),o.addClass("vjs-slider-active"),o.trigger("slideractive")})),o.on(o.volumeBar,["blur","sliderinactive"],(function(){o.volumeBar.removeClass("vjs-slider-active"),o.removeClass("vjs-slider-active"),o.trigger("sliderinactive")})),o}return U(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.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)},e.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)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(Ee);mn.prototype.options_={children:["volumeBar"]},Ee.registerComponent("VolumeControl",mn);var _n=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return 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")}))}(o,r),o.on(r,["loadstart","volumechange"],o.update),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),r=this.player_.lastVolume_();if(0===e){var n=r<.1?.1:r;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;w&&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 i=0;i<4;i++)mt(this.el_,"vjs-vol-"+i);gt(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var text=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==text&&this.controlText(text)},e}(qr);_n.prototype.controlText_="Mute",Ee.registerComponent("MuteToggle",_n);var bn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||Z(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var o=$(this,t.call(this,r,n));return o.on(r,["loadstart"],o.volumePanelState_),o.on(o.volumeControl,["slideractive"],o.sliderActive_),o.on(o.volumeControl,["sliderinactive"],o.sliderInactive_),o}return U(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.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")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(Ee);bn.prototype.options_={children:["muteToggle","volumeControl"]},Ee.registerComponent("VolumePanel",bn);var Tn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return n&&(o.menuButton_=n.menuButton),o.focusedChild_=-1,o.on("keydown",o.handleKeyPress),o}return U(e,t),e.prototype.addItem=function(component){this.addChild(component),component.on("click",le(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==component.name()&&this.menuButton_.focus())})))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=pt(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var r=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return r.appendChild(this.contentEl_),Jt(r,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),r},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice(),r=e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className);r&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(Ee);Ee.registerComponent("Menu",Tn);var Cn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e);var o=$(this,t.call(this,r,n));o.menuButton_=new qr(r,n),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var l=qr.prototype.buildCSSClass();return o.menuButton_.el_.className=o.buildCSSClass()+" "+l,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0,o.on(o.menuButton_,"tap",o.handleClick),o.on(o.menuButton_,"click",o.handleClick),o.on(o.menuButton_,"focus",o.handleFocus),o.on(o.menuButton_,"blur",o.handleBlur),o.on("keydown",o.handleSubmenuKeyPress),o}return U(e,t),e.prototype.update=function(){var menu=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=menu,this.addChild(menu),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.prototype.createMenu=function(){var menu=new Tn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var title=pt("li",{className:"vjs-menu-title",innerHTML:Ce(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,menu.children_.unshift(title),vt(title,menu.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)menu.addItem(this.items[i]);return menu},e.prototype.createItems=function(){},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},e.prototype.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+qr.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},e.prototype.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},e.prototype.controlText=function(text){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(text,t)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",le(this,(function(t){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){Jt(c,"keydown",le(this,this.handleKeyPress))},e.prototype.handleBlur=function(){Qt(c,"keydown",le(this,this.handleKeyPress))},e.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())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),w&&ut())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(Ee);Ee.registerComponent("MenuButton",Cn);var kn=function(t){function e(r,n){W(this,e);var o=n.tracks,l=$(this,t.call(this,r,n));if(l.items.length<=1&&l.hide(),!o)return $(l);var c=le(l,l.update);return o.addEventListener("removetrack",c),o.addEventListener("addtrack",c),l.player_.on("ready",c),l.player_.on("dispose",(function(){o.removeEventListener("removetrack",c),o.removeEventListener("addtrack",c)})),l}return U(e,t),e}(Cn);Ee.registerComponent("TrackButton",kn);var En=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.selectable=n.selectable,o.isSelected_=n.selected||!1,o.multiSelectable=n.multiSelectable,o.selected(o.isSelected_),o.selectable?o.multiSelectable?o.el_.setAttribute("role","menuitemcheckbox"):o.el_.setAttribute("role","menuitemradio"):o.el_.setAttribute("role","menuitem"),o}return U(e,t),e.prototype.createEl=function(e,r,n){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",J({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},r),n)},e.prototype.handleClick=function(t){this.selected(!0)},e.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))},e}(Fr);Ee.registerComponent("MenuItem",En);var wn=function(t){function e(r,n){W(this,e);var track=n.track,o=r.textTracks();n.label=track.label||track.language||"Unknown",n.selected="showing"===track.mode;var h=$(this,t.call(this,r,n));h.track=track;var d=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];h.handleTracksChange.apply(h,e)},f=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];h.handleSelectedLanguageChange.apply(h,e)};if(r.on(["loadstart","texttrackchange"],d),o.addEventListener("change",d),o.addEventListener("selectedlanguagechange",f),h.on("dispose",(function(){r.off(["loadstart","texttrackchange"],d),o.removeEventListener("change",d),o.removeEventListener("selectedlanguagechange",f)})),void 0===o.onchange){var v=void 0;h.on(["tap","click"],(function(){if("object"!==z(l.Event))try{v=new l.Event("change")}catch(t){}v||(v=c.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(v)}))}return h.handleTracksChange(),h}return U(e,t),e.prototype.handleClick=function(e){var r=this.track.kind,n=this.track.kinds,o=this.player_.textTracks();if(n||(n=[r]),t.prototype.handleClick.call(this,e),o)for(var i=0;i<o.length;i++){var track=o[i];track===this.track&&n.indexOf(track.kind)>-1?"showing"!==track.mode&&(track.mode="showing"):"disabled"!==track.mode&&(track.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.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}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(En);Ee.registerComponent("TextTrackMenuItem",wn);var Sn=function(t){function e(r,n){return W(this,e),n.track={player:r,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,$(this,t.call(this,r,n))}return U(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),r=!0,i=0,n=e.length;i<n;i++){var track=e[i];if(this.options_.kinds.indexOf(track.kind)>-1&&"showing"===track.mode){r=!1;break}}r!==this.isSelected_&&this.selected(r)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),r=!0,i=0,n=e.length;i<n;i++){var track=e[i];if(["captions","descriptions","subtitles"].indexOf(track.kind)>-1&&"showing"===track.mode){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(wn);Ee.registerComponent("OffTextTrackMenuItem",Sn);var xn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return W(this,e),n.tracks=r.textTracks(),$(this,t.call(this,r,n))}return U(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:wn,label=void 0;this.label_&&(label=this.label_+" off"),t.push(new Sn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:label})),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 track=r[i];if(this.kinds_.indexOf(track.kind)>-1){var n=new e(this.player_,{track:track,selectable:!0,multiSelectable:!1});n.addClass("vjs-"+track.kind+"-menu-item"),t.push(n)}}return t},e}(kn);Ee.registerComponent("TextTrackButton",xn);var jn=function(t){function e(r,n){W(this,e);var track=n.track,o=n.cue,l=r.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=l&&l<o.endTime;var c=$(this,t.call(this,r,n));return c.track=track,c.cue=o,track.addEventListener("cuechange",le(c,c.update)),c}return U(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.prototype.update=function(t){var e=this.cue,r=this.player_.currentTime();this.selected(e.startTime<=r&&r<e.endTime)},e}(En);Ee.registerComponent("ChaptersTrackMenuItem",jn);var An=function(t){function e(r,n,o){return W(this,e),$(this,t.call(this,r,n,o))}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},e.prototype.setTrack=function(track){if(this.track_!==track){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=track,this.track_){this.track_.mode="hidden";var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_)}}},e.prototype.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],i=t.length-1;i>=0;i--){var track=t[i];if(track.kind===this.kind_)return track}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ce(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var i=0,r=e.length;i<r;i++){var n=e[i],o=new jn(this.player_,{track:this.track_,cue:n});t.push(o)}return t},e}(xn);An.prototype.kind_="chapters",An.prototype.controlText_="Chapters",Ee.registerComponent("ChaptersButton",An);var Pn=function(t){function e(r,n,o){W(this,e);var l=$(this,t.call(this,r,n,o)),c=r.textTracks(),h=le(l,l.handleTracksChange);return c.addEventListener("change",h),l.on("dispose",(function(){c.removeEventListener("change",h)})),l}return U(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),r=!1,i=0,n=e.length;i<n;i++){var track=e[i];if(track.kind!==this.kind_&&"showing"===track.mode){r=!0;break}}r?this.disable():this.enable()},e.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(xn);Pn.prototype.kind_="descriptions",Pn.prototype.controlText_="Descriptions",Ee.registerComponent("DescriptionsButton",Pn);var On=function(t){function e(r,n,o){return W(this,e),$(this,t.call(this,r,n,o))}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(xn);On.prototype.kind_="subtitles",On.prototype.controlText_="Subtitles",Ee.registerComponent("SubtitlesButton",On);var Mn=function(t){function e(r,n){W(this,e),n.track={player:r,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem";var o=$(this,t.call(this,r,n));return o.addClass("vjs-texttrack-settings"),o.controlText(", opens "+n.kind+" settings dialog"),o}return U(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(wn);Ee.registerComponent("CaptionSettingsMenuItem",Mn);var Nn=function(t){function e(r,n,o){return W(this,e),$(this,t.call(this,r,n,o))}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Mn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(xn);Nn.prototype.kind_="captions",Nn.prototype.controlText_="Captions",Ee.registerComponent("CaptionsButton",Nn);var In=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(e,r,n){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(o+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),o+="</span>",t.prototype.createEl.call(this,e,J({innerHTML:o},r),n)},e}(wn);Ee.registerComponent("SubsCapsMenuItem",In);var Ln=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};W(this,e);var o=$(this,t.call(this,r,n));return o.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(o.player_.language_)>-1&&(o.label_="captions"),o.menuButton_.controlText(Ce(o.label_)),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Mn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,In)},e}(xn);Ln.prototype.kinds_=["captions","subtitles"],Ln.prototype.controlText_="Subtitles",Ee.registerComponent("SubsCapsButton",Ln);var Dn=function(t){function e(r,n){W(this,e);var track=n.track,o=r.audioTracks();n.label=track.label||track.language||"Unknown",n.selected=track.enabled;var l=$(this,t.call(this,r,n));l.track=track,l.addClass("vjs-"+track.kind+"-menu-item");var c=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];l.handleTracksChange.apply(l,e)};return o.addEventListener("change",c),l.on("dispose",(function(){o.removeEventListener("change",c)})),l}return U(e,t),e.prototype.createEl=function(e,r,n){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(o+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),o+="</span>",t.prototype.createEl.call(this,e,J({innerHTML:o},r),n)},e.prototype.handleClick=function(e){var r=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var i=0;i<r.length;i++){var track=r[i];track.enabled=track===this.track}},e.prototype.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(En);Ee.registerComponent("AudioTrackMenuItem",Dn);var Rn=function(t){function e(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return W(this,e),n.tracks=r.audioTracks(),$(this,t.call(this,r,n))}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),i=0;i<e.length;i++){var track=e[i];t.push(new Dn(this.player_,{track:track,selectable:!0,multiSelectable:!1}))}return t},e}(kn);Rn.prototype.controlText_="Audio Track",Ee.registerComponent("AudioTrackButton",Rn);var Bn=function(t){function e(r,n){W(this,e);var label=n.rate,o=parseFloat(label,10);n.label=label,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1;var l=$(this,t.call(this,r,n));return l.label=label,l.rate=o,l.on(r,"ratechange",l.update),l}return U(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.prototype.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(En);Bn.prototype.contentElType="button",Ee.registerComponent("PlaybackRateMenuItem",Bn);var Fn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.updateVisibility(),o.updateLabel(),o.on(r,"loadstart",o.updateVisibility),o.on(r,"ratechange",o.updateLabel),o}return U(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=pt("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},e.prototype.dispose=function(){this.labelEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createMenu=function(){var menu=new Tn(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;i>=0;i--)menu.addChild(new Bn(this.player(),{rate:t[i]+"x"}));return menu},e.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),r=this.playbackRates(),n=r[0],i=0;i<r.length;i++)if(r[i]>e){n=r[i];break}this.player().playbackRate(n)},e.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},e.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(Cn);Fn.prototype.controlText_="Playback Rate",Ee.registerComponent("PlaybackRateMenuButton",Fn);var Hn=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(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}(Ee);Ee.registerComponent("Spacer",Hn);var Vn=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(Hn);Ee.registerComponent("CustomControlSpacer",Vn);var zn=function(t){function e(){return W(this,e),$(this,t.apply(this,arguments))}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(Ee);zn.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},Ee.registerComponent("ControlBar",zn);var Wn=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n));return o.on(r,"error",o.open),o}return U(e,t),e.prototype.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},e.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(ze);Wn.prototype.options_=ke(ze.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ee.registerComponent("ErrorDisplay",Wn);var Un="vjs-text-track-settings",$n=["#000","Black"],Xn=["#00F","Blue"],qn=["#0FF","Cyan"],Kn=["#0F0","Green"],Yn=["#F0F","Magenta"],Gn=["#F00","Red"],Jn=["#FFF","White"],Qn=["#FF0","Yellow"],Zn=["1","Opaque"],ti=["0.5","Semi-Transparent"],ei=["0","Transparent"],ri={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[$n,Jn,Gn,Kn,Xn,Qn,Yn,qn]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Zn,ti,ei]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Jn,$n,Gn,Kn,Xn,Qn,Yn,qn]},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:[Zn,ti]},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:[ei,ti,Zn]}};function ni(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}ri.windowColor.options=ri.backgroundColor.options;var ii=function(t){function e(r,n){W(this,e),n.temporary=!1;var o=$(this,t.call(this,r,n));return o.updateDisplay=le(o,o.updateDisplay),o.fill(),o.hasBeenOpened_=o.hasBeenFilled_=!0,o.endDialog=pt("p",{className:"vjs-control-text",textContent:o.localize("End of dialog window.")}),o.el().appendChild(o.endDialog),o.setDefaults(),void 0===n.persistTextTrackSettings&&(o.options_.persistTextTrackSettings=o.options_.playerOptions.persistTextTrackSettings),o.on(o.$(".vjs-done-button"),"click",(function(){o.saveSettings(),o.close()})),o.on(o.$(".vjs-default-button"),"click",(function(){o.setDefaults(),o.updateDisplay()})),G(ri,(function(t){o.on(o.$(t.selector),"change",o.updateDisplay)})),o.options_.persistTextTrackSettings&&o.restoreSettings(),o}return U(e,t),e.prototype.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},e.prototype.createElSelect_=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",o=ri[t],l=o.id.replace("%s",this.id_),c=[r,l].join(" ").trim();return["<"+n+' id="'+l+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(o.label),"</"+n+">",'<select aria-labelledby="'+c+'">'].concat(o.options.map((function(t){var r=l+"-"+t[1].replace(/\W+/g,"");return['<option id="'+r+'" value="'+t[0]+'" ','aria-labelledby="'+c+" "+r+'">',e.localize(t[1]),"</option>"].join("")}))).concat("</select>").join("")},e.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("")},e.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("")},e.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("")},e.prototype.createElColors_=function(){return pt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.prototype.createElFont_=function(){return pt("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("")})},e.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return pt("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},e.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.prototype.label=function(){return this.localize("Caption Settings Dialog")},e.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.prototype.getValues=function(){var t=this;return function(object,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Y(object).reduce((function(e,r){return t(e,object[r],r)}),e)}(ri,(function(e,r,n){var o,l,c=(o=t.$(r.selector),l=r.parser,ni(o.options[o.options.selectedIndex].value,l));return void 0!==c&&(e[n]=c),e}),{})},e.prototype.setValues=function(t){var e=this;G(ri,(function(r,n){!function(t,e,r){if(e)for(var i=0;i<t.options.length;i++)if(ni(t.options[i].value,r)===e){t.selectedIndex=i;break}}(e.$(r.selector),t[n],r.parser)}))},e.prototype.setDefaults=function(){var t=this;G(ri,(function(e){var r=e.hasOwnProperty("default")?e.default:0;t.$(e.selector).selectedIndex=r}))},e.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(l.localStorage.getItem(Un))}catch(t){et.warn(t)}t&&this.setValues(t)},e.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?l.localStorage.setItem(Un,JSON.stringify(t)):l.localStorage.removeItem(Un)}catch(t){et.warn(t)}}},e.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(c,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,r=t&&t.captionsButton;e?e.focus():r&&r.focus()},e}(ze);Ee.registerComponent("TextTrackSettings",ii);var oi=function(t){function e(r,n){W(this,e);var o=n.ResizeObserver||l.ResizeObserver;null===n.ResizeObserver&&(o=!1);var c=ke({createEl:!o},n),h=$(this,t.call(this,r,c));return h.ResizeObserver=n.ResizeObserver||l.ResizeObserver,h.loadListener_=null,h.resizeObserver_=null,h.debouncedHandler_=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l,o=void 0,c=function(){n.clearTimeout(o),o=null},h=function(){var l=this,c=arguments,h=function(){o=null,h=null,r||t.apply(l,c)};!o&&r&&t.apply(l,c),n.clearTimeout(o),o=n.setTimeout(h,e)};return h.cancel=c,h}((function(){h.resizeHandler()}),100,!1,h),o?(h.resizeObserver_=new h.ResizeObserver(h.debouncedHandler_),h.resizeObserver_.observe(r.el())):(h.loadListener_=function(){h.el_&&h.el_.contentWindow&&Jt(h.el_.contentWindow,"resize",h.debouncedHandler_)},h.one("load",h.loadListener_)),h}return U(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},e.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&&Qt(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},e}(Ee);Ee.registerComponent("ResizeManager",oi);var si=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var r=t.$$("source"),n=[],o="";if(!r.length)return!1;for(var i=0;i<r.length;i++){var l=r[i].src;l&&-1===n.indexOf(l)&&n.push(l)}return!!n.length&&(1===n.length&&(o=n[0]),t.triggerSourceset(o),!0)},ai={};L||(ai=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=c.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var r=c.createDocumentFragment();e.childNodes.length;)r.appendChild(e.childNodes[0]);return this.innerText="",l.Element.prototype.appendChild.call(this,r),this.innerHTML}}));var ci=function(t,e){for(var r={},i=0;i<t.length&&!((r=Object.getOwnPropertyDescriptor(t[i],e))&&r.set&&r.get);i++);return r.enumerable=!0,r.configurable=!0,r},ui=function(t){var e=t.el();if(!e.resetSourceWatch_){var r={},n=function(t){return ci([t.el(),l.HTMLMediaElement.prototype,l.Element.prototype,ai],"innerHTML")}(t),o=function(r){return function(){for(var n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];var c=r.apply(e,o);return si(t),c}};["append","appendChild","insertAdjacentHTML"].forEach((function(t){e[t]&&(r[t]=e[t],e[t]=o(r[t]))})),Object.defineProperty(e,"innerHTML",ke(n,{set:o(n.set)})),e.resetSourceWatch_=function(){e.resetSourceWatch_=null,Object.keys(r).forEach((function(t){e[t]=r[t]})),Object.defineProperty(e,"innerHTML",n)},t.one("sourceset",e.resetSourceWatch_)}},hi={};L||(hi=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?or(l.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return l.Element.prototype.setAttribute.call(this,"src",t),t}}));var pi=function(t){if(t.featuresSourceset){var e=t.el();if(!e.resetSourceset_){var r=function(t){return ci([t.el(),l.HTMLMediaElement.prototype,hi],"src")}(t),n=e.setAttribute,o=e.load;Object.defineProperty(e,"src",ke(r,{set:function(n){var o=r.set.call(e,n);return t.triggerSourceset(e.src),o}})),e.setAttribute=function(r,o){var l=n.call(e,r,o);return/src/i.test(r)&&t.triggerSourceset(e.src),l},e.load=function(){var r=o.call(e);return si(t)||(t.triggerSourceset(""),ui(t)),r},e.currentSrc?t.triggerSourceset(e.currentSrc):si(t)||ui(t),e.resetSourceset_=function(){e.resetSourceset_=null,e.load=o,e.setAttribute=n,Object.defineProperty(e,"src",r),e.resetSourceWatch_&&e.resetSourceWatch_()}}}},di=X(["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."]),fi=function(t){function e(r,n){W(this,e);var o=$(this,t.call(this,r,n)),source=r.source,l=!1;if(source&&(o.el_.currentSrc!==source.src||r.tag&&3===r.tag.initNetworkState_)?o.setSource(source):o.handleLateInit_(o.el_),r.enableSourceset&&o.setupSourcesetHandling_(),o.el_.hasChildNodes()){for(var c=o.el_.childNodes,d=c.length,f=[];d--;){var v=c[d];"track"===v.nodeName.toLowerCase()&&(o.featuresNativeTextTracks?(o.remoteTextTrackEls().addTrackElement_(v),o.remoteTextTracks().addTrack(v.track),o.textTracks().addTrack(v.track),l||o.el_.hasAttribute("crossorigin")||!ar(v.src)||(l=!0)):f.push(v))}for(var i=0;i<f.length;i++)o.el_.removeChild(f[i])}return o.proxyNativeTracks_(),o.featuresNativeTextTracks&&l&&et.warn(h(di)),o.restoreMetadataTracksInIOSNativePlayer_(),(F||k||P)&&!0===r.nativeControlsForTouch&&o.setControls(!0),o.proxyWebkitFullscreen_(),o.triggerReady(),o}return U(e,t),e.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,t.prototype.dispose.call(this)},e.prototype.setupSourcesetHandling_=function(){pi(this)},e.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var t=this.textTracks(),e=void 0,r=function(){e=[];for(var i=0;i<t.length;i++){var track=t[i];"metadata"===track.kind&&e.push({track:track,storedMode:track.mode})}};r(),t.addEventListener("change",r),this.on("dispose",(function(){return t.removeEventListener("change",r)}));var n=function r(){for(var i=0;i<e.length;i++){var n=e[i];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}t.removeEventListener("change",r)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",r),t.removeEventListener("change",n),t.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",r),t.addEventListener("change",r),t.removeEventListener("change",n)}))},e.prototype.proxyNativeTracks_=function(){var t=this;yr.names.forEach((function(e){var r=yr[e],n=t.el()[r.getterName],o=t[r.getterName]();if(t["featuresNative"+r.capitalName+"Tracks"]&&n&&n.addEventListener){var l={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)}},c=function(){for(var t=[],i=0;i<o.length;i++){for(var e=!1,r=0;r<n.length;r++)if(n[r]===o[i]){e=!0;break}e||t.push(o[i])}for(;t.length;)o.removeTrack(t.shift())};Object.keys(l).forEach((function(e){var r=l[e];n.addEventListener(e,r),t.on("dispose",(function(t){return n.removeEventListener(e,r)}))})),t.on("loadstart",c),t.on("dispose",(function(e){return t.off("loadstart",c)}))}}))},e.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var r=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(r,t),e.disposeMediaElement(t),t=r}else{t=c.createElement("video");var n=ke({},this.options_.tag&&Tt(this.options_.tag));F&&!0===this.options_.nativeControlsForTouch||delete n.controls,bt(t,J(n,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&kt(t,"preload",this.options_.preload);for(var o=["loop","muted","playsinline","autoplay"],i=0;i<o.length;i++){var l=o[i],h=this.options_[l];void 0!==h&&(h?kt(t,l,l):Et(t,l),t[l]=h)}return t},e.prototype.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,r=function(){e=!0};this.on("loadstart",r);var n=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",r),this.off("loadedmetadata",n),e||this.trigger("loadstart")}))}var o=["loadstart"];o.push("loadedmetadata"),t.readyState>=2&&o.push("loadeddata"),t.readyState>=3&&o.push("canplay"),t.readyState>=4&&o.push("canplaythrough"),this.ready((function(){o.forEach((function(t){this.trigger(t)}),this)}))}},e.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(t){et(t,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;if(this.el_.duration===1/0&&x&&N&&0===this.el_.currentTime){return this.on("timeupdate",(function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))})),NaN}return this.el_.duration||NaN},e.prototype.width=function(){return this.el_.offsetWidth},e.prototype.height=function(){return this.el_.offsetHeight},e.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},r=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",r),this.on("dispose",(function(){t.off("webkitbeginfullscreen",r),t.off("webkitendfullscreen",e)}))}},e.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=l.navigator&&l.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},e.prototype.enterFullScreen=function(){var video=this.el_;video.paused&&video.networkState<=video.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){video.pause(),video.webkitEnterFullScreen()}),0)):video.webkitEnterFullScreen()},e.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},e.prototype.reset=function(){e.resetMediaElement(this.el_)},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.prototype.setControls=function(t){this.el_.controls=!!t},e.prototype.addTextTrack=function(e,label,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,label,r):t.prototype.addTextTrack.call(this,e,label,r)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var r=c.createElement("track");return e.kind&&(r.kind=e.kind),e.label&&(r.label=e.label),(e.language||e.srclang)&&(r.srclang=e.language||e.srclang),e.default&&(r.default=e.default),e.id&&(r.id=e.id),e.src&&(r.src=e.src),r},e.prototype.addRemoteTextTrack=function(e,r){var n=t.prototype.addRemoteTextTrack.call(this,e,r);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},e.prototype.removeRemoteTextTrack=function(track){if(t.prototype.removeRemoteTextTrack.call(this,track),this.featuresNativeTextTracks)for(var e=this.$$("track"),i=e.length;i--;)track!==e[i]&&track!==e[i].track||this.el().removeChild(e[i])},e.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),l.performance&&"function"==typeof l.performance.now?t.creationTime=l.performance.now():l.performance&&l.performance.timing&&"number"==typeof l.performance.timing.navigationStart&&(t.creationTime=l.Date.now()-l.performance.timing.navigationStart),t},e}(_r);if(lt()){fi.TEST_VID=c.createElement("video");var track=c.createElement("track");track.kind="captions",track.srclang="en",track.label="English",fi.TEST_VID.appendChild(track)}fi.isSupported=function(){try{fi.TEST_VID.volume=.5}catch(t){return!1}return!(!fi.TEST_VID||!fi.TEST_VID.canPlayType)},fi.canPlayType=function(t){return fi.TEST_VID.canPlayType(t)},fi.canPlaySource=function(t,e){return fi.canPlayType(t.type)},fi.canControlVolume=function(){try{var t=fi.TEST_VID.volume;return fi.TEST_VID.volume=t/2+.1,t!==fi.TEST_VID.volume}catch(t){return!1}},fi.canMuteVolume=function(){try{var t=fi.TEST_VID.muted;return fi.TEST_VID.muted=!t,fi.TEST_VID.muted?kt(fi.TEST_VID,"muted","muted"):Et(fi.TEST_VID,"muted"),t!==fi.TEST_VID.muted}catch(t){return!1}},fi.canControlPlaybackRate=function(){if(x&&N&&I<58)return!1;try{var t=fi.TEST_VID.playbackRate;return fi.TEST_VID.playbackRate=t/2+.1,t!==fi.TEST_VID.playbackRate}catch(t){return!1}},fi.canOverrideAttributes=function(){if(L)return!1;try{var t=function(){};Object.defineProperty(c.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(c.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(c.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(c.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},fi.supportsNativeTextTracks=function(){return B||w&&N},fi.supportsNativeVideoTracks=function(){return!(!fi.TEST_VID||!fi.TEST_VID.videoTracks)},fi.supportsNativeAudioTracks=function(){return!(!fi.TEST_VID||!fi.TEST_VID.audioTracks)},fi.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],fi.prototype.featuresVolumeControl=fi.canControlVolume(),fi.prototype.featuresMuteControl=fi.canMuteVolume(),fi.prototype.featuresPlaybackRate=fi.canControlPlaybackRate(),fi.prototype.featuresSourceset=fi.canOverrideAttributes(),fi.prototype.movingMediaElementInDOM=!w,fi.prototype.featuresFullscreenResize=!0,fi.prototype.featuresProgressEvents=!0,fi.prototype.featuresTimeupdateEvents=!0,fi.prototype.featuresNativeTextTracks=fi.supportsNativeTextTracks(),fi.prototype.featuresNativeVideoTracks=fi.supportsNativeVideoTracks(),fi.prototype.featuresNativeAudioTracks=fi.supportsNativeAudioTracks();var vi=fi.TEST_VID&&fi.TEST_VID.constructor.prototype.canPlayType,yi=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,gi=/^video\/mp4/i;fi.patchCanPlayType=function(){j>=4&&!O&&!N?fi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&yi.test(t)?"maybe":vi.call(this,t)}:A&&(fi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&gi.test(t)?"maybe":vi.call(this,t)})},fi.unpatchCanPlayType=function(){var t=fi.TEST_VID.constructor.prototype.canPlayType;return fi.TEST_VID.constructor.prototype.canPlayType=vi,t},fi.patchCanPlayType(),fi.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){}}()}},fi.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),i=e.length;i--;)t.removeChild(e[i]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){fi.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){fi.prototype["set"+Ce(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){fi.prototype[t]=function(){return this.el_[t]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(t){fi.prototype["set"+Ce(t)]=function(e){this.el_[t]=e}})),["pause","load","play"].forEach((function(t){fi.prototype[t]=function(){return this.el_[t]()}})),_r.withSourceHandlers(fi),fi.nativeSourceHandler={},fi.nativeSourceHandler.canPlayType=function(t){try{return fi.TEST_VID.canPlayType(t)}catch(t){return""}},fi.nativeSourceHandler.canHandleSource=function(source,t){if(source.type)return fi.nativeSourceHandler.canPlayType(source.type);if(source.src){var e=sr(source.src);return fi.nativeSourceHandler.canPlayType("video/"+e)}return""},fi.nativeSourceHandler.handleSource=function(source,t,e){t.setSrc(source.src)},fi.nativeSourceHandler.dispose=function(){},fi.registerSourceHandler(fi.nativeSourceHandler),_r.registerTech("Html5",fi);var mi=X(["\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 "]),_i=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],bi={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ti=["tiny","xsmall","small","medium","large","xlarge","huge"],Ci={};Ti.forEach((function(t){var e="x"===t.charAt(0)?"x-"+t.substring(1):t;Ci[t]="vjs-layout-"+e}));var ki={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ei=function(t){function e(r,n,o){if(W(this,e),r.id=r.id||n.id||"vjs_video_"+Ht(),(n=J(e.getTagSettings(r),n)).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof r.closest){var l=r.closest("[lang]");l&&l.getAttribute&&(n.language=l.getAttribute("lang"))}else for(var element=r;element&&1===element.nodeType;){if(Tt(element).hasOwnProperty("lang")){n.language=element.getAttribute("lang");break}element=element.parentNode}var c=$(this,t.call(this,null,n,o));if(c.log=nt(c.id_),c.isPosterFromTech_=!1,c.queuedCallbacks_=[],c.isReady_=!1,c.hasStarted_=!1,c.userActive_=!1,!c.options_||!c.options_.techOrder||!c.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(c.tag=r,c.tagAttributes=r&&Tt(r),c.language(c.options_.language),n.languages){var h={};Object.getOwnPropertyNames(n.languages).forEach((function(t){h[t.toLowerCase()]=n.languages[t]})),c.languages_=h}else c.languages_=e.prototype.options_.languages;c.cache_={},c.poster_=n.poster||"",c.controls_=!!n.controls,c.cache_.lastVolume=1,r.controls=!1,r.removeAttribute("controls"),r.hasAttribute("autoplay")?c.options_.autoplay=!0:c.autoplay(c.options_.autoplay),c.scrubbing_=!1,c.el_=c.createEl(),c.cache_.lastPlaybackRate=c.defaultPlaybackRate(),_e(c,{eventBusKey:"el_"});var d=ke(c.options_);if(n.plugins){var f=n.plugins;Object.keys(f).forEach((function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](f[t])}),c)}c.options_.playerOptions=d,c.middleware_=[],c.initChildren(),c.isAudio("audio"===r.nodeName.toLowerCase()),c.controls()?c.addClass("vjs-controls-enabled"):c.addClass("vjs-controls-disabled"),c.el_.setAttribute("role","region"),c.isAudio()?c.el_.setAttribute("aria-label",c.localize("Audio Player")):c.el_.setAttribute("aria-label",c.localize("Video Player")),c.isAudio()&&c.addClass("vjs-audio"),c.flexNotSupported_()&&c.addClass("vjs-no-flex"),w||c.addClass("vjs-workinghover"),e.players[c.id_]=c;var v=y.split(".")[0];return c.addClass("vjs-v"+v),c.userActive(!0),c.reportUserActivity(),c.one("play",c.listenForUserActivity_),c.on("fullscreenchange",c.handleFullscreenChange_),c.on("stageclick",c.handleStageClick_),c.breakpoints(c.options_.breakpoints),c.responsive(c.options_.responsive),c.changingSrc_=!1,c.playWaitingForReady_=!1,c.playOnLoadstart_=null,c}return U(e,t),e.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.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),Cr[this.id()]=null,t.prototype.dispose.call(this)},e.prototype.createEl=function(){var e=this.tag,r=void 0,n=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();n?r=this.el_=e.parentNode:o||(r=this.el_=t.prototype.createEl.call(this,"div"));var h=Tt(e);if(o){for(r=this.el_=e,e=this.tag=c.createElement("video");r.children.length;)e.appendChild(r.firstChild);yt(r,"video-js")||gt(r,"video-js"),r.appendChild(e),n=this.playerElIngest_=r,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(t){void 0!==r[t]&&(e[t]=r[t])}))}if(e.setAttribute("tabindex","-1"),h.tabindex="-1",D&&(e.setAttribute("role","application"),h.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in h&&delete h.width,"height"in h&&delete h.height,Object.getOwnPropertyNames(h).forEach((function(t){"class"===t?(r.className+=" "+h[t],o&&(e.className+=" "+h[t])):(r.setAttribute(t,h[t]),o&&e.setAttribute(t,h[t]))})),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=r.player=this,this.addClass("vjs-paused"),!0!==l.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=se("vjs-styles-dimensions");var d=Dt(".vjs-styles-defaults"),head=Dt("head");head.insertBefore(this.styleEl_,d?d.nextSibling:head.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var f=e.getElementsByTagName("a"),i=0;i<f.length;i++){var v=f.item(i);gt(v,"vjs-hidden"),v.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(r,e),vt(e,r),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_=r,r},e.prototype.width=function(t){return this.dimension("width",t)},e.prototype.height=function(t){return this.dimension("height",t)},e.prototype.dimension=function(t,e){var r=t+"_";if(void 0===e)return this[r]||0;if(""===e)return this[r]=void 0,void this.updateStyleEl_();var n=parseFloat(e);isNaN(n)?et.error('Improper value "'+e+'" supplied for for '+t):(this[r]=n,this.updateStyleEl_())},e.prototype.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?(this.addClass("vjs-fluid"),this.fill(!1)):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.prototype.fill=function(t){if(void 0===t)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},e.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_()},e.prototype.updateStyleEl_=function(){if(!0!==l.VIDEOJS_NO_DYNAMIC_STYLE){var t=void 0,e=void 0,r=void 0,n=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=n[1]/n[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*o,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),ae(this.styleEl_,"\n ."+r+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+r+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var c="number"==typeof this.width_?this.width_:this.options_.width,h="number"==typeof this.height_?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(c>=0&&(d.width=c),h>=0&&(d.height=h))}},e.prototype.loadTech_=function(t,source){var e=this;this.tech_&&this.unloadTech_();var r=Ce(t),n=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(_r.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o={source:source,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+n+"_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};mr.names.forEach((function(t){var r=mr[t];o[r.getterName]=e[r.privateName]})),J(o,this.options_[r]),J(o,this.options_[n]),J(o,this.options_[t.toLowerCase()]),this.tag&&(o.tag=this.tag),source&&source.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);var l=_r.getTech(t);if(!l)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new l(o),this.tech_.ready(le(this,this.handleTechReady_),!0),He(this.textTracksJson_||[],this.tech_),_i.forEach((function(t){e.on(e.tech_,t,e["handleTech"+Ce(t)+"_"])})),Object.keys(bi).forEach((function(t){e.on(e.tech_,t,(function(r){0===e.tech_.playbackRate()&&e.tech_.seeking()?e.queuedCallbacks_.push({callback:e["handleTech"+bi[t]+"_"].bind(e),event:r}):e["handleTech"+bi[t]+"_"](r)}))})),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||vt(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.prototype.unloadTech_=function(){var t=this;mr.names.forEach((function(e){var r=mr[e];t[r.privateName]=t[r.getterName]()})),this.textTracksJson_=Fe(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.prototype.tech=function(t){return void 0===t&&et.warn(h(mi)),this.tech_},e.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.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_)},e.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(t){et("deleting tag.poster throws in some browsers",t)}},e.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())},e.prototype.manualAutoplay_=function(t){var e=this;if(this.tech_&&"string"==typeof t){var r=function(){var t=e.muted();e.muted(!0);var r=e.play();if(r&&r.then&&r.catch)return r.catch((function(r){e.muted(t)}))},n=void 0;if("any"===t?(n=this.play())&&n.then&&n.catch&&n.catch((function(){return r()})):n="muted"===t?r():this.play(),n&&n.then&&n.catch)return n.then((function(){e.trigger({type:"autoplay-success",autoplay:t})})).catch((function(r){e.trigger({type:"autoplay-failure",autoplay:t})}))}},e.prototype.updateSourceCaches_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t,r="";"string"!=typeof e&&(e=t.src,r=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!r&&(r=Lr(this,e)),this.cache_.source=ke({},t,{src:e,type:r});for(var n=this.cache_.sources.filter((function(s){return s.src&&s.src===e})),o=[],l=this.$$("source"),c=[],i=0;i<l.length;i++){var h=Tt(l[i]);o.push(h),h.src&&h.src===e&&c.push(h.src)}c.length&&!n.length?this.cache_.sources=o:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e},e.prototype.handleTechSourceset_=function(t){var e=this;if(!this.changingSrc_){var r=function(t){return e.updateSourceCaches_(t)},n=this.currentSource().src,o=t.src;if(n&&!/^blob:/.test(n)&&/^blob:/.test(o)&&(!this.lastSource_||this.lastSource_.tech!==o&&this.lastSource_.player!==n)&&(r=function(){}),r(o),!t.src){this.tech_.one(["sourceset","loadstart"],(function t(r){if("sourceset"!==r.type){var n=e.techGet("currentSrc");e.lastSource_.tech=n,e.updateSourceCaches_(n)}e.tech_.off(["sourceset","loadstart"],t)}))}}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},e.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"))},e.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&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")},e.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},e.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(et.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.prototype.handleTechClick_=function(t){Lt(t)&&this.controls_&&(this.paused()?Re(this.play()):this.pause())},e.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},e.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},e.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.prototype.handleStageClick_=function(){this.reportUserActivity()},e.prototype.handleTechFullscreenChange_=function(t,data){data&&this.isFullscreen(data.isFullscreen),this.trigger("fullscreenchange")},e.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},e.prototype.handleTechTextData_=function(){var data=null;arguments.length>1&&(data=arguments[1]),this.trigger("textdata",data)},e.prototype.getCache=function(){return this.cache_},e.prototype.techCall_=function(t,e){this.ready((function(){if(t in xr)return function(t,e,r,n){return e[r](t.reduce(Ar(r),n))}(this.middleware_,this.tech_,t,e);if(t in jr)return wr(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw et(t),t}}),!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Sr)return function(t,e,r){return t.reduceRight(Ar(r),e[r]())}(this.middleware_,this.tech_,t);if(t in jr)return wr(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw et("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw et("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw et(e),e}}},e.prototype.play=function(){var t=this,e=this.options_.Promise||l.Promise;return e?new e((function(e){t.play_(e)})):this.play_()},e.prototype.play_=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Re;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())}))}},e.prototype.pause=function(){this.techCall_("pause")},e.prototype.paused=function(){return!1!==this.techGet_("paused")},e.prototype.played=function(){return this.techGet_("played")||xe(0,0)},e.prototype.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.prototype.currentTime=function(t){return void 0!==t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.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,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},e.prototype.remainingTime=function(){return this.duration()-this.currentTime()},e.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=xe(0,0)),t},e.prototype.bufferedPercent=function(){return je(this.buffered(),this.duration())},e.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),r=t.end(t.length-1);return r>e&&(r=e),r},e.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(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},e.prototype.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},e.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},e.prototype.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},e.prototype.requestFullscreen=function(){var t=Ae;this.isFullscreen(!0),t.requestFullscreen?(Jt(c,t.fullscreenchange,le(this,(function e(r){this.isFullscreen(c[t.fullscreenElement]),!1===this.isFullscreen()&&Qt(c,t.fullscreenchange,e),this.trigger("fullscreenchange")}))),this.el_[t.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.prototype.exitFullscreen=function(){var t=Ae;this.isFullscreen(!1),t.requestFullscreen?c[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=c.documentElement.style.overflow,Jt(c,"keydown",le(this,this.fullWindowOnEscKey)),c.documentElement.style.overflow="hidden",gt(c.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.prototype.exitFullWindow=function(){this.isFullWindow=!1,Qt(c,"keydown",this.fullWindowOnEscKey),c.documentElement.style.overflow=this.docOrigOverflow,mt(c.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.canPlayType=function(t){for(var e=void 0,i=0,r=this.options_.techOrder;i<r.length;i++){var n=r[i],o=_r.getTech(n);if(o||(o=Ee.getComponent(n)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else et.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.prototype.selectSource=function(t){var e,r=this,n=this.options_.techOrder.map((function(t){return[t,_r.getTech(t)]})).filter((function(t){var e=t[0],r=t[1];return r?r.isSupported():(et.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),o=function(t,e,r){var n=void 0;return t.some((function(t){return e.some((function(e){if(n=r(t,e))return!0}))})),n},l=function(t,source){var e=t[0];if(t[1].canPlaySource(source,r.options_[e.toLowerCase()]))return{source:source,tech:e}};return(this.options_.sourceOrder?o(t,n,(e=l,function(a,b){return e(b,a)})):o(n,t,l))||!1},e.prototype.src=function(source){var t=this;if(void 0===source)return this.cache_.src||"";var e=Dr(source);e.length?(this.changingSrc_=!0,this.cache_.sources=e,this.updateSourceCaches_(e[0]),Er(this,e[0],(function(r,n){var o,l;if(t.middleware_=n,t.cache_.sources=e,t.updateSourceCaches_(r),t.src_(r))return e.length>1?t.src(e.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());o=n,l=t.tech_,o.forEach((function(t){return t.setTech&&t.setTech(l)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},e.prototype.src_=function(source){var t,e,r=this,n=this.selectSource([source]);return!n||(t=n.tech,e=this.techName_,Ce(t)!==Ce(e)?(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",source):this.techCall_("src",source.src),this.changingSrc_=!1}),!0),!1))},e.prototype.load=function(){this.techCall_("load")},e.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},e.prototype.currentSources=function(){var source=this.currentSource(),t=[];return 0!==Object.keys(source).length&&t.push(source),this.cache_.sources||t},e.prototype.currentSource=function(){return this.cache_.source||{}},e.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},e.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)},e.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},e.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},e.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"))},e.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"))}},e.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_()))},e.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")))},e.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 Ie(t),this.addClass("vjs-error"),et.error("(CODE:"+this.error_.code+" "+Ie.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},e.prototype.reportUserActivity=function(t){this.userActivity_=!0},e.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")}},e.prototype.listenForUserActivity_=function(){var t=void 0,e=void 0,r=void 0,n=le(this,this.reportUserActivity);this.on("mousedown",(function(){n(),this.clearInterval(t),t=this.setInterval(n,250)})),this.on("mousemove",(function(t){t.screenX===e&&t.screenY===r||(e=t.screenX,r=t.screenY,n())})),this.on("mouseup",(function(e){n(),this.clearInterval(t)})),this.on("keydown",n),this.on("keyup",n);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)},e.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)},e.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.prototype.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},e.prototype.addTextTrack=function(t,label,e){if(this.tech_)return this.tech_.addTextTrack(t,label,e)},e.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},e.prototype.removeRemoteTextTrack=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.track,track=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(track)},e.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.prototype.language=function(code){if(void 0===code)return this.language_;this.language_=String(code).toLowerCase()},e.prototype.languages=function(){return ke(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=ke(this.options_),e=t.tracks;t.tracks=[];for(var i=0;i<e.length;i++){var track=e[i];(track=ke(track)).player=void 0,t.tracks[i]=track}return t},e.prototype.createModal=function(content,t){var e=this;(t=t||{}).content=content||"";var r=new ze(this,t);return this.addChild(r),r.on("dispose",(function(){e.removeChild(r)})),r.open(),r},e.prototype.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),e=this.currentWidth(),i=0;i<Ti.length;i++){var r=Ti[i];if(e<=this.breakpoints_[r]){if(t===r)return;t&&this.removeClass(Ci[t]),this.addClass(Ci[r]),this.breakpoint_=r;break}}},e.prototype.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},e.prototype.breakpoints=function(t){return void 0===t||(this.breakpoint_="",this.breakpoints_=J({},ki,t),this.updateCurrentBreakpoint_()),J(this.breakpoints_)},e.prototype.responsive=function(t){return void 0===t?this.responsive_:(t=Boolean(t))!==this.responsive_?(this.responsive_=t,t?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t):void 0},e.prototype.currentBreakpoint=function(){return this.breakpoint_},e.prototype.currentBreakpointClass=function(){return Ci[this.breakpoint_]||""},e.getTagSettings=function(t){var e={sources:[],tracks:[]},r=Tt(t),n=r["data-setup"];if(yt(t,"vjs-fill")&&(r.fill=!0),yt(t,"vjs-fluid")&&(r.fluid=!0),null!==n){var o=d(n||"{}"),l=o[0],data=o[1];l&&et.error(l),J(r,data)}if(J(e,r),t.hasChildNodes())for(var c=t.childNodes,i=0,h=c.length;i<h;i++){var f=c[i],v=f.nodeName.toLowerCase();"source"===v?e.sources.push(Tt(f)):"track"===v&&e.tracks.push(Tt(f))}return e},e.prototype.flexNotSupported_=function(){var t=c.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},e}(Ee);mr.names.forEach((function(t){var e=mr[t];Ei.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}})),Ei.players={};var wi=l.navigator;Ei.prototype.options_={techOrder:_r.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:wi&&(wi.languages&&wi.languages[0]||wi.userLanguage||wi.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},L||Ei.prototype.options_.children.push("resizeManager"),["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Ei.prototype[t]=function(){return this.techGet_(t)}})),_i.forEach((function(t){Ei.prototype["handleTech"+Ce(t)+"_"]=function(){return this.trigger(t)}})),Ee.registerComponent("Player",Ei);var Si="plugin",xi="activePlugins_",ji={},Ai=function(t){return ji.hasOwnProperty(t)},Pi=function(t){return Ai(t)?ji[t]:void 0},Oi=function(t,e){t[xi]=t[xi]||{},t[xi][e]=!0},Mi=function(t,e,r){var n=(r?"before":"")+"pluginsetup";t.trigger(n,e),t.trigger(n+":"+e.name,e)},Ni=function(t,e){return e.prototype.name=t,function(){Mi(this,{name:t,plugin:e,instance:null},!0);for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];var l=new(Function.prototype.bind.apply(e,[null].concat([this].concat(n))));return this[t]=function(){return l},Mi(this,l.getEventHash()),l}},Ii=function(){function t(e){if(W(this,t),this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,_e(this),delete this.trigger,Te(this,this.constructor.defaultState),Oi(e,this.name),this.dispose=le(this,this.dispose),e.on("dispose",this.dispose)}return t.prototype.version=function(){return this.constructor.VERSION},t.prototype.getEventHash=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.prototype.trigger=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Zt(this.eventBusEl_,t,this.getEventHash(e))},t.prototype.handleStateChanged=function(t){},t.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[xi][t]=!1,this.player=this.state=null,e[t]=Ni(t,ji[t])},t.isBasic=function(e){var p="string"==typeof e?Pi(e):e;return"function"==typeof p&&!t.prototype.isPrototypeOf(p.prototype)},t.registerPlugin=function(e,r){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+(void 0===e?"undefined":z(e))+".");if(Ai(e))et.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(Ei.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof r)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+(void 0===r?"undefined":z(r))+".");return ji[e]=r,e!==Si&&(t.isBasic(r)?Ei.prototype[e]=function(t,e){var r=function(){Mi(this,{name:t,plugin:e,instance:null},!0);var r=e.apply(this,arguments);return Oi(this,t),Mi(this,{name:t,plugin:e,instance:r}),r};return Object.keys(e).forEach((function(t){r[t]=e[t]})),r}(e,r):Ei.prototype[e]=Ni(e,r)),r},t.deregisterPlugin=function(t){if(t===Si)throw new Error("Cannot de-register base plugin.");Ai(t)&&(delete ji[t],delete Ei.prototype[t])},t.getPlugins=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(ji),e=void 0;return t.forEach((function(t){var r=Pi(t);r&&((e=e||{})[t]=r)})),e},t.getPluginVersion=function(t){var e=Pi(t);return e&&e.VERSION||""},t}();Ii.getPlugin=Pi,Ii.BASE_PLUGIN_NAME=Si,Ii.registerPlugin(Si,Ii),Ei.prototype.usingPlugin=function(t){return!!this[xi]&&!0===this[xi][t]},Ei.prototype.hasPlugin=function(t){return!!Ai(t)};var Li=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":z(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)};"undefined"==typeof HTMLVideoElement&&lt()&&(c.createElement("video"),c.createElement("audio"),c.createElement("track"),c.createElement("video-js"));var Di=function(t){return 0===t.indexOf("#")?t.slice(1):t};function Ri(t,e,r){var n=Ri.getPlayer(t);if(n)return e&&et.warn('Player "'+t+'" is already initialised. Options will not be applied.'),r&&n.ready(r),n;var o="string"==typeof t?Dt("#"+Di(t)):t;if(!ct(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");c.body.contains(o)||et.warn("The element supplied is not included in the DOM"),e=e||{},Ri.hooks("beforesetup").forEach((function(t){var r=t(o,ke(e));Q(r)&&!Array.isArray(r)?e=ke(e,r):et.error("please return an object in beforesetup hooks")}));var l=Ee.getComponent("Player");return n=new l(o,e,r),Ri.hooks("setup").forEach((function(t){return t(n)})),n}if(Ri.hooks_={},Ri.hooks=function(t,e){return Ri.hooks_[t]=Ri.hooks_[t]||[],e&&(Ri.hooks_[t]=Ri.hooks_[t].concat(e)),Ri.hooks_[t]},Ri.hook=function(t,e){Ri.hooks(t,e)},Ri.hookOnce=function(t,e){Ri.hooks(t,[].concat(e).map((function(e){return function r(){return Ri.removeHook(t,r),e.apply(void 0,arguments)}})))},Ri.removeHook=function(t,e){var r=Ri.hooks(t).indexOf(e);return!(r<=-1)&&(Ri.hooks_[t]=Ri.hooks_[t].slice(),Ri.hooks_[t].splice(r,1),!0)},!0!==l.VIDEOJS_NO_DYNAMIC_STYLE&&lt()){var style=Dt(".vjs-styles-defaults");if(!style){style=se("vjs-styles-defaults");var head=Dt("head");head&&head.insertBefore(style,head.firstChild),ae(style,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}oe(1,Ri),Ri.VERSION=y,Ri.options=Ei.prototype.options_,Ri.getPlayers=function(){return Ei.players},Ri.getPlayer=function(t){var e=Ei.players,r=void 0;if("string"==typeof t){var n=Di(t),o=e[n];if(o)return o;r=Dt("#"+n)}else r=t;if(ct(r)){var l=r,c=l.player,h=l.playerId;if(c||e[h])return c||e[h]}},Ri.getAllPlayers=function(){return Object.keys(Ei.players).map((function(t){return Ei.players[t]})).filter(Boolean)},Ri.players=Ei.players,Ri.getComponent=Ee.getComponent,Ri.registerComponent=function(t,e){_r.isTech(e)&&et.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Ee.registerComponent.call(Ee,t,e)},Ri.getTech=_r.getTech,Ri.registerTech=_r.registerTech,Ri.use=function(t,e){Tr[t]=Tr[t]||[],Tr[t].push(e)},!L&&Object.defineProperty?(Object.defineProperty(Ri,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Ri.middleware,"TERMINATOR",{value:kr,writeable:!1,enumerable:!0})):Ri.middleware={TERMINATOR:kr},Ri.browser=V,Ri.TOUCH_ENABLED=F,Ri.extend=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=function(){t.apply(this,arguments)},n={};for(var o in"object"===(void 0===e?"undefined":z(e))?(e.constructor!==Object.prototype.constructor&&(r=e.constructor),n=e):"function"==typeof e&&(r=e),Li(r,t),n)n.hasOwnProperty(o)&&(r.prototype[o]=n[o]);return r},Ri.mergeOptions=ke,Ri.bind=le,Ri.registerPlugin=Ii.registerPlugin,Ri.deregisterPlugin=Ii.deregisterPlugin,Ri.plugin=function(t,e){return et.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ii.registerPlugin(t,e)},Ri.getPlugins=Ii.getPlugins,Ri.getPlugin=Ii.getPlugin,Ri.getPluginVersion=Ii.getPluginVersion,Ri.addLanguage=function(code,data){var t;return code=(""+code).toLowerCase(),Ri.options.languages=ke(Ri.options.languages,((t={})[code]=data,t)),Ri.options.languages[code]},Ri.log=et,Ri.createLogger=nt,Ri.createTimeRange=Ri.createTimeRanges=xe,Ri.formatTime=Zr,Ri.setFormatTime=function(t){Qr=t},Ri.resetFormatTime=function(){Qr=Jr},Ri.parseUrl=ir,Ri.isCrossOrigin=ar,Ri.EventTarget=ue,Ri.on=Jt,Ri.one=te,Ri.off=Qt,Ri.trigger=Zt,Ri.xhr=f,Ri.TextTrack=pr,Ri.AudioTrack=dr,Ri.VideoTrack=fr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(t){Ri[t]=function(){return et.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),Bt[t].apply(null,arguments)}})),Ri.computedStyle=it,Ri.dom=Bt,Ri.url=lr,t.exports=Ri},720:function(t,e,r){(function(e){var n,o=void 0!==e?e:"undefined"!=typeof window?window:{},l=r(721);"undefined"!=typeof document?n=document:(n=o["__GLOBAL_DOCUMENT_CACHE@4"])||(n=o["__GLOBAL_DOCUMENT_CACHE@4"]=l),t.exports=n}).call(this,r(46))},722:function(t,e){function r(s){return s.replace(/\n\r?\s*/g,"")}t.exports=function(t){for(var s="",i=0;i<arguments.length;i++)s+=r(t[i])+(arguments[i+1]||"");return s}},723:function(t,e){t.exports=function(t,e){var r,n=null;try{r=JSON.parse(t,e)}catch(t){n=t}return[n,r]}},724:function(t,e,r){"use strict";var n=r(553),o=r(725),l=r(726),c=r(727);function h(t,e,r){var n=t;return o(e)?(r=e,"string"==typeof t&&(n={uri:t})):n=c(e,{uri:t}),n.callback=r,n}function d(t,e,r){return f(e=h(t,e,r))}function f(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,r=function(r,n,body){e||(e=!0,t.callback(r,n,body))};function n(){var body=void 0;if(body=v.response?v.response:v.responseText||function(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML;return null}(v),k)try{body=JSON.parse(body)}catch(t){}return body}function o(t){return clearTimeout(y),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,r(t,E)}function c(){if(!f){var e;clearTimeout(y),e=t.useXDR&&void 0===v.status?200:1223===v.status?204:v.status;var o=E,c=null;return 0!==e?(o={body:n(),statusCode:e,method:_,headers:{},url:m,rawRequest:v},v.getAllResponseHeaders&&(o.headers=l(v.getAllResponseHeaders()))):c=new Error("Internal XMLHttpRequest Error"),r(c,o,o.body)}}var h,f,v=t.xhr||null;v||(v=t.cors||t.useXDR?new d.XDomainRequest:new d.XMLHttpRequest);var y,m=v.url=t.uri||t.url,_=v.method=t.method||"GET",body=t.body||t.data,T=v.headers=t.headers||{},C=!!t.sync,k=!1,E={body:void 0,headers:{},statusCode:0,method:_,url:m,rawRequest:v};if("json"in t&&!1!==t.json&&(k=!0,T.accept||T.Accept||(T.Accept="application/json"),"GET"!==_&&"HEAD"!==_&&(T["content-type"]||T["Content-Type"]||(T["Content-Type"]="application/json"),body=JSON.stringify(!0===t.json?body:t.json))),v.onreadystatechange=function(){4===v.readyState&&setTimeout(c,0)},v.onload=c,v.onerror=o,v.onprogress=function(){},v.onabort=function(){f=!0},v.ontimeout=o,v.open(_,m,!C,t.username,t.password),C||(v.withCredentials=!!t.withCredentials),!C&&t.timeout>0&&(y=setTimeout((function(){if(!f){f=!0,v.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",o(t)}}),t.timeout)),v.setRequestHeader)for(h in T)T.hasOwnProperty(h)&&v.setRequestHeader(h,T[h]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(v.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(v),v.send(body||null),v}t.exports=d,d.XMLHttpRequest=n.XMLHttpRequest||function(){},d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var i=0;i<t.length;i++)e(t[i])}(["get","put","post","patch","head","delete"],(function(t){d["delete"===t?"del":t]=function(e,r,n){return(r=h(e,r,n)).method=t.toUpperCase(),f(r)}}))},725:function(t,e){t.exports=function(t){if(!t)return!1;var e=r.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)};var r=Object.prototype.toString},726:function(t,e){var r=function(t){return t.replace(/^\s+|\s+$/g,"")};t.exports=function(t){if(!t)return{};for(var e,n={},o=r(t).split("\n"),i=0;i<o.length;i++){var l=o[i],c=l.indexOf(":"),h=r(l.slice(0,c)).toLowerCase(),d=r(l.slice(c+1));void 0===n[h]?n[h]=d:(e=n[h],"[object Array]"===Object.prototype.toString.call(e)?n[h].push(d):n[h]=[n[h],d])}return n}},727:function(t,e){t.exports=function(){for(var t={},i=0;i<arguments.length;i++){var source=arguments[i];for(var e in source)r.call(source,e)&&(t[e]=source[e])}return t};var r=Object.prototype.hasOwnProperty},728:function(t,e,r){var n=r(553),o=t.exports={WebVTT:r(729),VTTCue:r(730),VTTRegion:r(731)};n.vttjs=o,n.WebVTT=o.WebVTT;var l=o.VTTCue,c=o.VTTRegion,h=n.VTTCue,d=n.VTTRegion;o.shim=function(){n.VTTCue=l,n.VTTRegion=c},o.restore=function(){n.VTTCue=h,n.VTTRegion=d},n.VTTCue||o.shim()},729:function(t,e){var r=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function n(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function o(input){function t(t,e,s,r){return 3600*(0|t)+60*(0|e)+(0|s)+(0|r)/1e3}var e=input.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return e?e[3]?t(e[1],e[2],e[3].replace(":",""),e[4]):e[1]>59?t(e[1],e[2],0,e[4]):t(0,e[1],e[2],e[4]):null}function l(){this.values=r(null)}function c(input,t,e,r){var n=r?input.split(r):[input];for(var i in n)if("string"==typeof n[i]){var o=n[i].split(e);if(2===o.length)t(o[0],o[1])}}function h(input,t,e){var r=input;function h(){var t=o(input);if(null===t)throw new n(n.Errors.BadTimeStamp,"Malformed timestamp: "+r);return input=input.replace(/^[^\sa-zA-Z-]+/,""),t}function d(){input=input.replace(/^\s+/,"")}if(d(),t.startTime=h(),d(),"--\x3e"!==input.substr(0,3))throw new n(n.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);input=input.substr(3),d(),t.endTime=h(),d(),function(input,t){var r=new l;c(input,(function(t,n){switch(t){case"region":for(var i=e.length-1;i>=0;i--)if(e[i].id===n){r.set(t,e[i].region);break}break;case"vertical":r.alt(t,n,["rl","lr"]);break;case"line":var o=n.split(","),l=o[0];r.integer(t,l),r.percent(t,l)&&r.set("snapToLines",!1),r.alt(t,l,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=n.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,n);break;case"align":r.alt(t,n,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(input,t)}n.prototype=r(Error.prototype),n.prototype.constructor=n,n.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},l.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,a){for(var r=0;r<a.length;++r)if(e===a[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var d={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},f={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},v={v:"title",lang:"lang"},y={rt:"ruby"};function m(t,input){function e(){if(!input)return null;var t,e=input.match(/^([^<]*)(<[^>]*>?)?/);return t=e[1]?e[1]:e[2],input=input.substr(t.length),t}function r(t){return d[t]}function n(s){for(;E=s.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)s=s.replace(E[0],r);return s}function l(t,element){return!y[element.localName]||y[element.localName]===t.localName}function c(e,r){var n=f[e];if(!n)return null;var element=t.document.createElement(n);element.localName=n;var o=v[e];return o&&r&&(element[o]=r.trim()),element}for(var h,m=t.document.createElement("div"),_=m,T=[];null!==(h=e());)if("<"!==h[0])_.appendChild(t.document.createTextNode(n(h)));else{if("/"===h[1]){T.length&&T[T.length-1]===h.substr(2).replace(">","")&&(T.pop(),_=_.parentNode);continue}var C,k=o(h.substr(1,h.length-2));if(k){C=t.document.createProcessingInstruction("timestamp",k),_.appendChild(C);continue}var E=h.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!E)continue;if(!(C=c(E[1],E[3])))continue;if(!l(_,C))continue;E[2]&&(C.className=E[2].substr(1).replace("."," ")),T.push(E[1]),_.appendChild(C),_=C}return m}var _=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function T(t){for(var i=0;i<_.length;i++){var e=_[i];if(t>=e[0]&&t<=e[1])return!0}return!1}function C(){}function k(t,e,r){var n=/MSIE\s8\.0/.test(navigator.userAgent),o="rgba(255, 255, 255, 1)",l="rgba(0, 0, 0, 0.8)";n&&(o="rgb(255, 255, 255)",l="rgb(0, 0, 0)"),C.call(this),this.cue=e,this.cueDiv=m(t,e.text);var c={color:o,backgroundColor:l,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};n||(c.writingMode=""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",c.unicodeBidi="plaintext"),this.applyStyles(c,this.cueDiv),this.div=t.document.createElement("div"),c={textAlign:"middle"===e.align?"center":e.align,font:r.font,whiteSpace:"pre-line",position:"absolute"},n||(c.direction=function(t){var e=[],text="";if(!t||!t.childNodes)return"ltr";function r(t,e){for(var i=e.childNodes.length-1;i>=0;i--)t.push(e.childNodes[i])}function n(t){if(!t||!t.length)return null;var e=t.pop(),text=e.textContent||e.innerText;if(text){var o=text.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):text}return"ruby"===e.tagName?n(t):e.childNodes?(r(t,e),n(t)):void 0}for(r(e,t);text=n(e);)for(var i=0;i<text.length;i++)if(T(text.charCodeAt(i)))return"rtl";return"ltr"}(this.cueDiv),c.writingMode=""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(c),this.div.appendChild(this.cueDiv);var h=0;switch(e.positionAlign){case"start":h=e.position;break;case"middle":h=e.position-e.size/2;break;case"end":h=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(h,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(h,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function E(t){var e,r,n,o,l=/MSIE\s8\.0/.test(navigator.userAgent);if(t.div){r=t.div.offsetHeight,n=t.div.offsetWidth,o=t.div.offsetTop;var c=(c=t.div.childNodes)&&(c=c[0])&&c.getClientRects&&c.getClientRects();t=t.div.getBoundingClientRect(),e=c?Math.max(c[0]&&c[0].height||0,t.height/c.length):0}this.left=t.left,this.right=t.right,this.top=t.top||o,this.height=t.height||r,this.bottom=t.bottom||o+(t.height||r),this.width=t.width||n,this.lineHeight=void 0!==e?e:t.lineHeight,l&&!this.lineHeight&&(this.lineHeight=13)}function w(t,e,r,n){var o=new E(e),l=e.cue,c=function(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var track=t.track,e=track.textTrackList,r=0,i=0;i<e.length&&e[i]!==track;i++)"showing"===e[i].mode&&r++;return-1*++r}(l),h=[];if(l.snapToLines){var d;switch(l.vertical){case"":h=["+y","-y"],d="height";break;case"rl":h=["+x","-x"],d="width";break;case"lr":h=["-x","+x"],d="width"}var f=o.lineHeight,v=f*Math.round(c),y=r[d]+f,m=h[0];Math.abs(v)>y&&(v=v<0?-1:1,v*=Math.ceil(y/f)*f),c<0&&(v+=""===l.vertical?r.height:r.width,h=h.reverse()),o.move(m,v)}else{var _=o.lineHeight/r.height*100;switch(l.lineAlign){case"middle":c-=_/2;break;case"end":c-=_}switch(l.vertical){case"":e.applyStyles({top:e.formatStyle(c,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(c,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(c,"%")})}h=["+y","-x","+x","-y"],o=new E(e)}var T=function(b,t){for(var e,o=new E(b),l=1,i=0;i<t.length;i++){for(;b.overlapsOppositeAxis(r,t[i])||b.within(r)&&b.overlapsAny(n);)b.move(t[i]);if(b.within(r))return b;var p=b.intersectPercentage(r);l>p&&(e=new E(b),l=p),b=new E(o)}return e||o}(o,h);e.move(T.toCSSCompatValues(r))}function S(){}C.prototype.applyStyles=function(t,div){for(var e in div=div||this.div,t)t.hasOwnProperty(e)&&(div.style[e]=t[e])},C.prototype.formatStyle=function(t,e){return 0===t?0:t+e},k.prototype=r(C.prototype),k.prototype.constructor=k,E.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},E.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},E.prototype.overlapsAny=function(t){for(var i=0;i<t.length;i++)if(this.overlaps(t[i]))return!0;return!1},E.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},E.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},E.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},E.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},E.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,r=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||r}},S.StringDecoder=function(){return{decode:function(data){if(!data)return"";if("string"!=typeof data)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(data))}}},S.convertCueToDOMTree=function(t,e){return t&&e?m(t,e):null};S.processCues=function(t,e,r){if(!t||!e||!r)return null;for(;r.firstChild;)r.removeChild(r.firstChild);var n=t.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",r.appendChild(n),function(t){for(var i=0;i<t.length;i++)if(t[i].hasBeenReset||!t[i].displayState)return!0;return!1}(e)){var o=[],l=E.getSimpleBoxPosition(n),c={font:Math.round(.05*l.height*100)/100+"px sans-serif"};!function(){for(var r,h,i=0;i<e.length;i++)h=e[i],r=new k(t,h,c),n.appendChild(r.div),w(0,r,l,o),h.displayState=r.div,o.push(E.getSimpleBoxPosition(r))}()}else for(var i=0;i<e.length;i++)n.appendChild(e[i].displayState)},S.Parser=function(t,e,r){r||(r=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=r||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(t){if(!(t instanceof n))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(data){var t=this;function e(){for(var e=t.buffer,r=0;r<e.length&&"\r"!==e[r]&&"\n"!==e[r];)++r;var line=e.substr(0,r);return"\r"===e[r]&&++r,"\n"===e[r]&&++r,t.buffer=e.substr(r),line}function r(input){input.match(/X-TIMESTAMP-MAP/)?c(input,(function(e,r){if("X-TIMESTAMP-MAP"===e)!function(input){var e=new l;c(input,(function(t,r){switch(t){case"MPEGT":e.integer(t+"S",r);break;case"LOCA":e.set(t+"L",o(r))}}),/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:e.get("MPEGTS"),LOCAL:e.get("LOCAL")})}(r)}),/=/):c(input,(function(e,r){if("Region"===e)!function(input){var e=new l;if(c(input,(function(t,r){switch(t){case"id":e.set(t,r);break;case"width":e.percent(t,r);break;case"lines":e.integer(t,r);break;case"regionanchor":case"viewportanchor":var n=r.split(",");if(2!==n.length)break;var o=new l;if(o.percent("x",n[0]),o.percent("y",n[1]),!o.has("x")||!o.has("y"))break;e.set(t+"X",o.get("x")),e.set(t+"Y",o.get("y"));break;case"scroll":e.alt(t,r,["up"])}}),/=/,/\s/),e.has("id")){var r=new(t.vttjs.VTTRegion||t.window.VTTRegion);r.width=e.get("width",100),r.lines=e.get("lines",3),r.regionAnchorX=e.get("regionanchorX",0),r.regionAnchorY=e.get("regionanchorY",100),r.viewportAnchorX=e.get("viewportanchorX",0),r.viewportAnchorY=e.get("viewportanchorY",100),r.scroll=e.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:e.get("id"),region:r})}}(r)}),/:/)}data&&(t.buffer+=t.decoder.decode(data,{stream:!0}));try{var line;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var d=(line=e()).match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new n(n.Errors.BadSignature);t.state="HEADER"}for(var f=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(f?f=!1:line=e(),t.state){case"HEADER":/:/.test(line)?r(line):line||(t.state="ID");continue;case"NOTE":line||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(line)){t.state="NOTE";break}if(!line)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===line.indexOf("--\x3e")){t.cue.id=line;continue}case"CUE":try{h(line,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var v=-1!==line.indexOf("--\x3e");if(!line||v&&(f=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=line;continue;case"BADCUE":line||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new n(n.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}},t.exports=S},730:function(t,e){var r={"":!0,lr:!0,rl:!0},n={start:!0,middle:!0,end:!0,left:!0,right:!0};function o(t){return"string"==typeof t&&(!!n[t.toLowerCase()]&&t.toLowerCase())}function l(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var p in e)t[p]=e[p]}return t}function c(t,e,text){var n=this,c=/MSIE\s8\.0/.test(navigator.userAgent),h={};c?n=document.createElement("custom"):h.enumerable=!0,n.hasBeenReset=!1;var d="",f=!1,v=t,y=e,m=text,_=null,T="",C=!0,k="auto",E="start",w=50,S="middle",x=50,j="middle";if(Object.defineProperty(n,"id",l({},h,{get:function(){return d},set:function(t){d=""+t}})),Object.defineProperty(n,"pauseOnExit",l({},h,{get:function(){return f},set:function(t){f=!!t}})),Object.defineProperty(n,"startTime",l({},h,{get:function(){return v},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",l({},h,{get:function(){return y},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",l({},h,{get:function(){return m},set:function(t){m=""+t,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",l({},h,{get:function(){return _},set:function(t){_=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",l({},h,{get:function(){return T},set:function(t){var e=function(t){return"string"==typeof t&&!!r[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",l({},h,{get:function(){return C},set:function(t){C=!!t,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",l({},h,{get:function(){return k},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");k=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",l({},h,{get:function(){return E},set:function(t){var e=o(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",l({},h,{get:function(){return w},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");w=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",l({},h,{get:function(){return S},set:function(t){var e=o(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",l({},h,{get:function(){return x},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");x=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",l({},h,{get:function(){return j},set:function(t){var e=o(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");j=e,this.hasBeenReset=!0}})),n.displayState=void 0,c)return n}c.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.exports=c},731:function(t,e){var r={"":!0,up:!0};function n(t){return"number"==typeof t&&t>=0&&t<=100}t.exports=function(){var t=100,e=3,o=0,l=100,c=0,h=100,d="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!n(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return l},set:function(t){if(!n(t))throw new Error("RegionAnchorX must be between 0 and 100.");l=t}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(t){if(!n(t))throw new Error("RegionAnchorY must be between 0 and 100.");o=t}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(t){if(!n(t))throw new Error("ViewportAnchorY must be between 0 and 100.");h=t}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(t){if(!n(t))throw new Error("ViewportAnchorX must be between 0 and 100.");c=t}},scroll:{enumerable:!0,get:function(){return d},set:function(t){var e=function(t){return"string"==typeof t&&!!r[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");d=e}}})}}}]);