/**
* @license
* Video.js 7.6.0
* Copyright Brightcove, Inc.
* Available under Apache License Version 2.0
*
*
* Includes vtt.js
* Available under Apache License Version 2.0
*
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(h,d){h=h&&h.hasOwnProperty("default")?h.default:h,d=d&&d.hasOwnProperty("default")?d.default:d;var p="7.6.0";function f(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t,n){return(s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t){return t=t||e.slice(0),e.raw=t,e}var l=[],e=function(s,a){return function(e,t,n){var r=a.levels[t],i=new RegExp("^("+r+")$");if("log"!==e&&n.unshift(e.toUpperCase()+":"),n.unshift(s+":"),l&&l.push([].concat(n)),h.console){var o=h.console[e];o||"debug"!==e||(o=h.console.info||h.console.log),o&&r&&i.test(e)&&o[Array.isArray(n)?"apply":"call"](h.console,n)}}};var y=function t(n){function r(){for(var e=arguments.length,t=new Array(e),n=0;n',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(r));for(var o={},s=0;sx',e=t.firstChild.href}return e}function $t(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""}function Ht(e){var t=h.location,n=Rt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host}var Vt=function(r){function e(e){var t;void 0===e&&(e=[]);for(var n=e.length-1;0<=n;n--)if(e[n].enabled){Lt(e,e[n]);break}return(t=r.call(this,e)||this).changing_=!1,t}f(e,r);var t=e.prototype;return t.addTrack=function(e){var t=this;e.enabled&&Lt(this,e),r.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,Lt(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){r.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(Nt),Ut=function(r){function e(e){var t;void 0===e&&(e=[]);for(var n=e.length-1;0<=n;n--)if(e[n].selected){Ft(e,e[n]);break}return(t=r.call(this,e)||this).changing_=!1,Object.defineProperty(v(t),"selectedIndex",{get:function(){for(var e=0;e>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);return Yn(t)||0===t||!Jn(t)?0:function(e,t){var n=e%t;return Math.floor(0<=n?n:n+t)}(Dn(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return ar(e)},ToObject:function(e){return this.CheckObjectCoercible(e),or(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new sr(t||"Cannot call method on "+e);return e},IsCallable:Mn,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:Yn(e)&&Yn(t)},Type:function(e){return null===e?"Null":"undefined"==typeof e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(Kn(e,n)&&!t[n])return!1;var r=Kn(e,"[[Value]]"),i=Kn(e,"[[Get]]")||Kn(e,"[[Set]]");if(r&&i)throw new sr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!(!Kn(e,"[[Get]]")&&!Kn(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!(!Kn(e,"[[Value]]")&&!Kn(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!=typeof e&&(On(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"==typeof e)return e;if(On(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new sr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new sr("ToPropertyDescriptor requires an object");var t={};if(Kn(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),Kn(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),Kn(e,"value")&&(t["[[Value]]"]=e.value),Kn(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),Kn(e,"get")){var n=e.get;if("undefined"!=typeof n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(Kn(e,"set")){var r=e.set;if("undefined"!=typeof r&&!this.IsCallable(r))throw new sr("setter must be a function");t["[[Set]]"]=r}if((Kn(t,"[[Get]]")||Kn(t,"[[Set]]"))&&(Kn(t,"[[Value]]")||Kn(t,"[[Writable]]")))throw new sr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},cr=sn.call(Function.call,String.prototype.replace),ur=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,hr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,dr=sn.call(Function.call,Rn());$n(dr,{getPolyfill:Rn,implementation:Fn,shim:function(){var e=Rn();return $n(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var pr=dr,fr=Object.prototype.toString,vr=Object.prototype.hasOwnProperty,yr=function(e,t,n){if(!Mn(t))throw new TypeError("iterator must be a function");var r;3<=arguments.length&&(r=n),"[object Array]"===fr.call(e)?function(e,t,n){for(var r=0,i=e.length;r=e?t.push(i):i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e&&t.push(i)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(var o=0;o',className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&y.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=_({role:"button"},n),this.tabIndex_=t.tabIndex;var r=i.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(r),r},t.dispose=function(){this.controlTextEl_=null,i.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=P("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,x(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.buildCSSClass=function(){return"vjs-control vjs-button "+i.prototype.buildCSSClass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},t.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},t.handleClick=function(e){},t.handleKeyDown=function(e){It.isEventKey(e,"Space")||It.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):i.prototype.handleKeyDown.call(this,e)},e}($e);$e.registerComponent("ClickableComponent",Gr);var Xr=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).update(),e.on("posterchange",Ce(v(n),n.update)),n}f(e,r);var t=e.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),r.prototype.dispose.call(this)},t.createEl=function(){return P("div",{className:"vjs-poster",tabIndex:-1})},t.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},t.handleClick=function(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?wt(this.player_.play()):this.player_.pause())},e}(Gr);$e.registerComponent("PosterImage",Xr);var Yr="#222",Qr={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 Jr(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Zr(e,t,n){try{e.style[t]=n}catch(e){return}}var ei=function(o){function e(n,e,t){var r;r=o.call(this,n,e,t)||this;var i=Ce(v(r),r.updateDisplay);return n.on("loadstart",Ce(v(r),r.toggleDisplay)),n.on("texttrackchange",i),n.on("loadedmetadata",Ce(v(r),r.preselectTrack)),n.ready(Ce(v(r),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",i),n.on("playerresize",i),h.addEventListener("orientationchange",i),n.on("dispose",function(){return h.removeEventListener("orientationchange",i)});for(var e=this.options_.playerOptions.tracks||[],t=0;t',className:this.buildCSSClass()},t),n=_({type:"button"},n);var r=$e.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return y.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),$e.prototype.addChild.call(this,e,t)},n.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(e){It.isEventKey(e,"Space")||It.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(Gr);$e.registerComponent("Button",ni);var ri=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)return wt(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){function i(){return r.focus()}St(t)?t.then(i,function(){}):this.setTimeout(i,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,r.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},e}(ni);ri.prototype.controlText_="Play Video",$e.registerComponent("BigPlayButton",ri);var ii=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).controlText(t&&t.controlText||n.localize("Close")),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+r.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){It.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):r.prototype.handleKeyDown.call(this,e)},e}(ni);$e.registerComponent("CloseButton",ii);var oi=function(r){function e(e,t){var n;return void 0===t&&(t={}),n=r.call(this,e,t)||this,t.replay=void 0===t.replay||t.replay,n.on(e,"play",n.handlePlay),n.on(e,"pause",n.handlePause),t.replay&&n.on(e,"ended",n.handleEnded),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+r.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause(),e.stopPropagation()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(ni);oi.prototype.controlText_="Play",$e.registerComponent("PlayToggle",oi);function si(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),s=Math.floor(t/3600);return!isNaN(e)&&e!==1/0||(i=r=n="-"),(i=0'+this.localize(this.labelText_)+" "});return this.contentEl_=P("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),t.appendChild(this.contentEl_),t},t.dispose=function(){this.contentEl_=null,this.textNode_=null,r.prototype.dispose.call(this)},t.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=d.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.formatTime_=function(e){return li(e)},t.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.updateContent=function(e){},e}($e);ci.prototype.labelText_="Time",ci.prototype.controlText_="Time",$e.registerComponent("TimeDisplay",ci);var ui=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"ended",n.handleEnded),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-current-time"},t.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(ci);ui.prototype.labelText_="Current Time",ui.prototype.controlText_="Current Time",$e.registerComponent("CurrentTimeDisplay",ui);var hi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"durationchange",n.updateContent),n.on(e,"loadstart",n.updateContent),n.on(e,"loadedmetadata",n.throttledUpdateContent),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var t=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},e}(ci);hi.prototype.labelText_="Duration",hi.prototype.controlText_="Duration",$e.registerComponent("DurationDisplay",hi);var di=function(e){function t(){return e.apply(this,arguments)||this}return f(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"/
"},{"aria-hidden":!0})},t}($e);$e.registerComponent("TimeDivider",di);var pi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on(e,"durationchange",n.throttledUpdateContent),n.on(e,"ended",n.handleEnded),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=r.prototype.createEl.call(this);return e.insertBefore(P("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){"number"==typeof this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},e}(ci);pi.prototype.labelText_="Remaining Time",pi.prototype.controlText_="Remaining Time",$e.registerComponent("RemainingTimeDisplay",pi);var fi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=P("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},e}($e);$e.registerComponent("LiveDisplay",fi);var vi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatus),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=P("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(e){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,r.prototype.dispose.call(this)},e}(ni);vi.prototype.controlText_="Seek to live, currently playing live",$e.registerComponent("SeekToLive",vi);var yi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}f(e,r);var t=e.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),t.className=t.className+" vjs-slider",t=_({tabIndex:0},t),n=_({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),r.prototype.createEl.call(this,e,t,n)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||it||e.preventDefault(),B(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;$(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=n:r.width=n,e}}},t.calculateDistance=function(e){var t=U(this.el_,e);return this.vertical()?t.y:t.x},t.handleKeyDown=function(e){It.isEventKey(e,"Left")||It.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):It.isEventKey(e,"Right")||It.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):r.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}($e);$e.registerComponent("Slider",yi);var gi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).partEls_=[],n.on(e,"progress",n.update),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+': 0%'})},t.dispose=function(){this.partEls_=null,r.prototype.dispose.call(this)},t.update=function(e){function t(e,t,n){var r=e/t||0;return r=100*(1<=r?1:r),n&&(r=r.toFixed(2)),r+"%"}var n=this.player_.liveTracker,r=this.player_.buffered(),i=n&&n.isLive()?n.seekableEnd():this.player_.duration(),o=this.player_.bufferedEnd(),s=this.partEls_,a=this.$(".vjs-control-text-loaded-percentage");this.el_.style.width=t(o,i),x(a,t(o,i,!0));for(var l=0;lr.length;d--)this.el_.removeChild(s[d-1]);s.length=r.length},e}($e);$e.registerComponent("LoadProgressBar",gi);var mi=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=H(this.el_),i=H(this.player_.el()),o=e.width*t;if(i&&r){var s=e.left-i.left+o,a=e.width-o+(i.right-e.right),l=r.width/2;sr.width&&(l=r.width),this.el_.style.right="-"+l+"px",this.write(n)}},n.write=function(e){x(this.el_,e)},n.updateTime=function(i,o,s,a){var l=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var e,t=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var n=l.player_.liveTracker.liveWindow(),r=n-o*n;e=(r<1?"":"-")+li(r,n)}else e=li(s,t);l.update(i,o,e),a&&a()})},t}($e);$e.registerComponent("TimeTooltip",mi);var _i=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}($e);_i.prototype.options_={children:[]},Qe||Ze||_i.prototype.options_.children.push("timeTooltip"),$e.registerComponent("PlayProgressBar",_i);var bi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).update=Ee(Ce(v(n),n.update),25),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,function(){n.el_.style.left=e.width*t+"px"})},e}($e);bi.prototype.options_={children:["timeTooltip"]},$e.registerComponent("MouseTimeDisplay",bi);var Ti=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).setEventHandlers_(),n}f(e,r);var t=e.prototype;return t.setEventHandlers_=function(){this.update=Ee(Ce(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in d&&"visibilityState"in d&&this.on(d,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){d.hidden?this.disableInterval_(e):(this.enableInterval_(),this.requestAnimationFrame(this.update))},t.enableInterval_=function(){var e=this;this.clearInterval(this.updateInterval),this.updateInterval=this.setInterval(function(){e.requestAnimationFrame(e.update)},30)},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&"ended"!==e.type||this.clearInterval(this.updateInterval)},t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update_=function(e,t){var n=this.player_.liveTracker,r=this.player_.duration();n&&n.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[li(e,r),li(r,r)],"{1} of {2}")),this.bar&&this.bar.update(H(this.el_),t)},t.update=function(e){if(null!==this.el().offsetParent){var t=r.prototype.update.call(this);return this.update_(this.getCurrentTime_(),t),t}},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),1<=e?1:e||0},t.handleMouseDown=function(e){X(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),r.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(X(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){var i=r.seekableStart(),o=r.liveCurrentTime();if(o<=(t=i+n*r.liveWindow())&&(t=o),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},t.enable=function(){r.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){r.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){r.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&wt(this.player_.play())},t.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){if(It.isEventKey(e,"Space")||It.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(It.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(It.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(It(e))){e.preventDefault(),e.stopPropagation();var t=10*(It.codes[It(e)]-It.codes[0])/100;this.player_.currentTime(this.player_.duration()*t)}else It.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):It.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):r.prototype.handleKeyDown.call(this,e)},e}(yi);Ti.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Qe||Ze||Ti.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),$e.registerComponent("SeekBar",Ti);var ki=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).handleMouseMove=Ee(Ce(v(n),n.handleMouseMove),25),n.throttledHandleMouseSeek=Ee(Ce(v(n),n.handleMouseSeek),25),n.enable(),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),i=H(r),o=U(r,e).x;1'})},t}($e);$e.registerComponent("VolumeLevel",Si);var wi=function(r){function e(e,t){var n;return(n=r.call(this,e,t)||this).on("slideractive",n.updateLastVolume_),n.on(e,"volumechange",n.updateARIAAttributes),e.ready(function(){return n.updateARIAAttributes()}),n}f(e,r);var t=e.prototype;return t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){X(e)&&r.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){X(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(yi);wi.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},wi.prototype.playerEvent="volumechange",$e.registerComponent("VolumeBar",wi);var Pi=function(r){function e(e,t){var n;return void 0===t&&(t={}),t.vertical=t.vertical||!1,"undefined"!=typeof t.volumeBar&&!c(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})}(v(n=r.call(this,e,t)||this),e),n.throttledHandleMouseMove=Ee(Ce(v(n),n.handleMouseMove),25),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),n.on(n.volumeBar,["focus","slideractive"],function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")}),n.on(n.volumeBar,["blur","sliderinactive"],function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")}),n}f(e,r);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}($e);Pi.prototype.options_={children:["volumeBar"]},$e.registerComponent("VolumeControl",Pi);var xi=function(r){function e(e,t){var n;return function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})}(v(n=r.call(this,e,t)||this),e),n.on(e,["loadstart","volumechange"],n.update),n}f(e,r);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+r.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;Qe&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)O(this.el_,"vjs-vol-"+n);I(this.el_,"vjs-vol-"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(ni);xi.prototype.controlText_="Mute",$e.registerComponent("MuteToggle",xi);var ji=function(r){function e(e,t){var n;return void 0===t&&(t={}),"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,"undefined"!=typeof t.volumeControl&&!c(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(n=r.call(this,e,t)||this).on(e,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}f(e,r);var t=e.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}($e);ji.prototype.options_={children:["muteToggle","volumeControl"]},$e.registerComponent("VolumePanel",ji);var Ai=function(r){function e(e,t){var n;return n=r.call(this,e,t)||this,t&&(n.menuButton_=t.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyDown),n.boundHandleBlur_=Ce(v(n),n.handleBlur),n.boundHandleTapClick_=Ce(v(n),n.handleTapClick),n}f(e,r);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof $e&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof $e&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),r.prototype.removeChild.call(this,e)},t.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},t.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=P(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var t=r.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),he(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,r.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||d.activeElement;if(!this.children().some(function(e){return e.el()===t})){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},t.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var n=e.filter(function(e){return e.el()===t.target})[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){It.isEventKey(e,"Left")||It.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(It.isEventKey(e,"Right")||It.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),0=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}($e);$e.registerComponent("Menu",Ai);var Ii=function(i){function e(e,t){var n;void 0===t&&(t={}),(n=i.call(this,e,t)||this).menuButton_=new ni(e,t),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=ni.prototype.buildCSSClass();return n.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"keydown",n.handleKeyDown),n.on(n.menuButton_,"mouseenter",function(){n.menu.show()}),n.on("keydown",n.handleSubmenuKeyDown),n}f(e,i);var t=e.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new Ai(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=P("li",{className:"vjs-menu-title",innerHTML:Re(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new $e(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r