/**
* @license
* Video.js 5.0.0-16
* Copyright Brightcove, Inc.
* Available under Apache License Version 2.0
*
*
* Includes vtt.js
* Available under Apache License Version 2.0
*
*/
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.videojs=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g-1&&a%1==0&&r>=a}function f(a){return null==a?!1:o.call(a)==i?p.test(n.call(a)):d(a)&&l.test(a)}function g(a){return a=c(a),a&&k.test(a)?a.replace(j,"\\$&"):a}var h="[object Array]",i="[object Function]",j=/[.*+?^${}()|[\]\/\\]/g,k=RegExp(j.source),l=/^\[object .+?Constructor\]$/,m=Object.prototype,n=Function.prototype.toString,o=m.toString,p=RegExp("^"+g(o).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=f(q=Array.isArray)&&q,r=Math.pow(2,53)-1,s=q||function(a){return d(a)&&e(a.length)&&o.call(a)==h};b.exports=s},{}],12:[function(a,b){function c(a){return"string"==typeof a?a:null==a?"":a+""}function d(a){return!!a&&"object"==typeof a}function e(a){return null==a?!1:m.call(a)==g?n.test(l.call(a)):d(a)&&j.test(a)}function f(a){return a=c(a),a&&i.test(a)?a.replace(h,"\\$&"):a}var g="[object Function]",h=/[.*+?^${}()|[\]\/\\]/g,i=RegExp(h.source),j=/^\[object .+?Constructor\]$/,k=Object.prototype,l=Function.prototype.toString,m=k.toString,n=RegExp("^"+f(m).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");b.exports=e},{}],13:[function(a,b){function c(a){return function(b){return null==b?void 0:b[a]}}function d(a){return null!=a&&f(s(a))}function e(a,b){return a=+a,b=null==b?q:b,a>-1&&a%1==0&&b>a}function f(a){return"number"==typeof a&&a>-1&&a%1==0&&q>=a}function g(a){for(var b=i(a),c=b.length,d=c&&a.length,g=d&&f(d)&&(k(a)||r.nonEnumArgs&&j(a)),h=-1,l=[];++h0;++d-1&&a%1==0&&k>=a}function g(a){return c(a)&&e(a)&&j.call(a)==h}var h="[object Arguments]",i=Object.prototype,j=i.toString,k=Math.pow(2,53)-1,l=d("length");b.exports=g},{}],15:[function(a,b){function c(a,b,c){if("function"!=typeof a)return d;if(void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function d(a){return a}b.exports=c},{}],16:[function(a,b){function c(a){return!!a&&"object"==typeof a}function d(a,b){return f(a,b,h)}function e(a){var b;if(!c(a)||l.call(a)!=i||!k.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var e;return d(a,function(a,b){e=b}),void 0===e||k.call(a,e)}var f=a("lodash._basefor"),g=a("lodash.isnative"),h=a("lodash.keysin"),i="[object Object]",j=Object.prototype,k=j.hasOwnProperty,l=j.toString,m=g(m=Object.getPrototypeOf)&&m,n=m?function(a){if(!a||l.call(a)!=i)return!1;var b=a.valueOf,c=g(b)&&(c=m(b))&&m(c);return c?a==c||m(a)==c:e(a)}:e;b.exports=n},{"lodash._basefor":17,"lodash.isnative":18,"lodash.keysin":19}],17:[function(a,b,c){arguments[4][10][0].apply(c,arguments)},{dup:10}],18:[function(a,b,c){arguments[4][12][0].apply(c,arguments)},{dup:12}],19:[function(a,b){function c(a,b){return a=+a,b=null==b?l:b,a>-1&&a%1==0&&b>a}function d(a){return"number"==typeof a&&a>-1&&a%1==0&&l>=a}function e(a){var b=typeof a;return"function"==b||!!a&&"object"==b}function f(a){if(null==a)return[];e(a)||(a=Object(a));var b=a.length;b=b&&d(b)&&(h(a)||m.nonEnumArgs&&g(a))&&b||0;for(var f=a.constructor,i=-1,k="function"==typeof f&&f.prototype===a,l=Array(b),n=b>0;++i-1&&a%1==0&&y>=a}function i(a){return j(a)?a:Object(a)}function j(a){var b=typeof a;return"function"==b||!!a&&"object"==b}function k(a){return function(){return a}}var l=a("lodash._arraycopy"),m=a("lodash._arrayeach"),n=a("lodash._createassigner"),o=a("lodash.isarguments"),p=a("lodash.isarray"),q=a("lodash.isnative"),r=a("lodash.isplainobject"),s=a("lodash.istypedarray"),t=a("lodash.keys"),u=(a("lodash.keysin"),a("lodash.toplainobject")),v=Array.prototype,w=q(w=Object.getOwnPropertySymbols)&&w,x=v.push,y=Math.pow(2,53)-1,z=f("length"),A=w?function(a){return w(i(a))}:k([]),B=n(d);b.exports=B},{"lodash._arraycopy":23,"lodash._arrayeach":24,"lodash._createassigner":25,"lodash.isarguments":29,"lodash.isarray":30,"lodash.isnative":31,"lodash.isplainobject":16,"lodash.istypedarray":32,"lodash.keys":33,"lodash.keysin":34,"lodash.toplainobject":35}],23:[function(a,b,c){arguments[4][6][0].apply(c,arguments)},{dup:6}],24:[function(a,b,c){arguments[4][7][0].apply(c,arguments)},{dup:7}],25:[function(a,b){function c(a){return f(function(b,c){var f=-1,g=null==b?0:c.length,h=g>2&&c[g-2],i=g>2&&c[2],j=g>1&&c[g-1];for("function"==typeof h?(h=d(h,j,5),g-=2):(h="function"==typeof j?j:null,g-=h?1:0),i&&e(c[0],c[1],i)&&(h=3>g?null:h,g=1);++f-1&&a%1==0&&b>a}function f(a,b,c){if(!h(c))return!1;var f=typeof b;if("number"==f?d(c)&&e(b,c.length):"string"==f&&b in c){var g=c[b];return a===a?a===g:g!==g}return!1}function g(a){return"number"==typeof a&&a>-1&&a%1==0&&i>=a}function h(a){var b=typeof a;return"function"==b||!!a&&"object"==b}var i=Math.pow(2,53)-1,j=c("length");b.exports=f},{}],28:[function(a,b){function c(a,b){if("function"!=typeof a)throw new TypeError(d);return b=e(void 0===b?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,f=e(c.length-b,0),g=Array(f);++d-1&&a%1==0&&F>=a}function e(a){return c(a)&&d(a.length)&&!!C[E.call(a)]}var f="[object Arguments]",g="[object Array]",h="[object Boolean]",i="[object Date]",j="[object Error]",k="[object Function]",l="[object Map]",m="[object Number]",n="[object Object]",o="[object RegExp]",p="[object Set]",q="[object String]",r="[object WeakMap]",s="[object ArrayBuffer]",t="[object Float32Array]",u="[object Float64Array]",v="[object Int8Array]",w="[object Int16Array]",x="[object Int32Array]",y="[object Uint8Array]",z="[object Uint8ClampedArray]",A="[object Uint16Array]",B="[object Uint32Array]",C={};C[t]=C[u]=C[v]=C[w]=C[x]=C[y]=C[z]=C[A]=C[B]=!0,C[f]=C[g]=C[s]=C[h]=C[i]=C[j]=C[k]=C[l]=C[m]=C[n]=C[o]=C[p]=C[q]=C[r]=!1;var D=Object.prototype,E=D.toString,F=Math.pow(2,53)-1;b.exports=e},{}],33:[function(a,b,c){arguments[4][13][0].apply(c,arguments)},{dup:13,"lodash.isarguments":29,"lodash.isarray":30,"lodash.isnative":31}],34:[function(a,b,c){arguments[4][19][0].apply(c,arguments)},{dup:19,"lodash.isarguments":29,"lodash.isarray":30}],35:[function(a,b){function c(a){return d(a,e(a))}var d=a("lodash._basecopy"),e=a("lodash.keysin");b.exports=c},{"lodash._basecopy":36,"lodash.keysin":34}],36:[function(a,b,c){arguments[4][9][0].apply(c,arguments)},{dup:9}],37:[function(a,b){"use strict";var c=a("object-keys"),d=function(a){return"undefined"!=typeof a&&null!==a},e="function"==typeof Symbol&&"symbol"==typeof Symbol(),f=a("define-properties"),g=Object.prototype.propertyIsEnumerable,h=function(a){return function(b){return g.call(a,b)}},i=function(a){if(!d(a))throw new TypeError("target must be an object");var b,f,g,i,j=Object(a);for(b=1;b2?arguments[2]:{};d(c(b),function(c){i(a,c,b[c],e[c])})};j.supportsDescriptors=!!h,b.exports=j},{foreach:39,"object-keys":40}],39:[function(a,b){var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString;b.exports=function(a,b,e){if("[object Function]"!==d.call(b))throw new TypeError("iterator must be a function");var f=a.length;if(f===+f)for(var g=0;f>g;g++)b.call(e,a[g],g,a);else for(var h in a)c.call(a,h)&&b.call(e,a[h],h,a)}},{}],40:[function(a,b){"use strict";var c=Object.prototype.hasOwnProperty,d=Object.prototype.toString,e=a("./isArguments"),f=!{toString:null}.propertyIsEnumerable("toString"),g=function(){}.propertyIsEnumerable("prototype"),h=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=function(a){var b=null!==a&&"object"==typeof a,i="[object Function]"===d.call(a),j=e(a),k=b&&"[object String]"===d.call(a),l=[];if(!b&&!i&&!j)throw new TypeError("Object.keys called on a non-object");var m=g&&i;if(k&&a.length>0&&!c.call(a,0))for(var n=0;n0)for(var o=0;o=0&&"[object Function]"===c.call(a.callee)),d}},{}],42:[function(a,b){function c(a,b){var c,d=null;try{c=JSON.parse(a,b)}catch(e){d=e}return[d,c]}b.exports=c},{}],43:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c',"aria-label":"play video"})}},{key:"handleClick",value:function(){this.player_.play()}}]),b}(j["default"]);j["default"].registerComponent("BigPlayButton",k),c["default"]=k,b.exports=c["default"]},{"./button":44}],44:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c=0;a--)this.children_[a].dispose&&this.children_[a].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),j.removeData(this.el_),this.el_=null}},{key:"player",value:function(){return this.player_}},{key:"options",value:function(a){return a?(this.options_=x["default"](this.options_,a),this.options_):this.options_}},{key:"el",value:function(){return this.el_}},{key:"createEl",value:function(a,b){return j.createEl(a,b)}},{key:"localize",value:function(a){var b=this.player_.language(),c=this.player_.languages();return c&&c[b]&&c[b][a]?c[b][a]:a}},{key:"contentEl",value:function(){return this.contentEl_||this.el_}},{key:"id",value:function(){return this.id_}},{key:"name",value:function(){return this.name_}},{key:"children",value:function(){return this.children_}},{key:"getChildById",value:function(a){return this.childIndex_[a]}},{key:"getChild",value:function(a){return this.childNameIndex_[a]}},{key:"addChild",value:function(b){var c=void 0===arguments[1]?{}:arguments[1],d=void 0,e=void 0;if("string"==typeof b){e=b,c||(c={}),c===!0&&(r["default"].warn("Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`."),c={});var f=c.componentClass||t["default"](e);c.name=e;var g=a.getComponent(f);d=new g(this.player_||this,c)}else d=b;return this.children_.push(d),"function"==typeof d.id&&(this.childIndex_[d.id()]=d),e=e||d.name&&d.name(),e&&(this.childNameIndex_[e]=d),"function"==typeof d.el&&d.el()&&this.contentEl().appendChild(d.el()),d}},{key:"removeChild",value:function(a){if("string"==typeof a&&(a=this.getChild(a)),a&&this.children_){for(var b=!1,c=this.children_.length-1;c>=0;c--)if(this.children_[c]===a){b=!0,this.children_.splice(c,1);break}if(b){this.childIndex_[a.id()]=null,this.childNameIndex_[a.name()]=null;var d=a.el();d&&d.parentNode===this.contentEl()&&this.contentEl().removeChild(a.el())}}}},{key:"initChildren",value:function(){var a=this,b=this.options_.children;b&&!function(){var c=a.options(),d=function(b,d){void 0!==c[b]&&(d=c[b]),d!==!1&&(a[b]=a.addChild(b,d))};if(Array.isArray(b))for(var e=0;e0){for(var b=0;b1)e=!1;else if(b){var d=a.touches[0].pageX-b.pageX,f=a.touches[0].pageY-b.pageY,g=Math.sqrt(d*d+f*f);g>c&&(e=!1)}});var f=function(){e=!1};this.on("touchleave",f),this.on("touchcancel",f),this.on("touchend",function(c){if(b=null,e===!0){var f=(new Date).getTime()-a;d>f&&(c.preventDefault(),this.trigger("tap"))}})}},{key:"enableTouchActivity",value:function(){if(this.player()&&this.player().reportUserActivity){var a=l.bind(this.player(),this.player().reportUserActivity),b=void 0;this.on("touchstart",function(){a(),this.clearInterval(b),b=this.setInterval(a,250)});var c=function(){a(),this.clearInterval(b)};this.on("touchmove",a),this.on("touchend",c),this.on("touchcancel",c)}}},{key:"setTimeout",value:function(a,b){a=l.bind(this,a);var c=h["default"].setTimeout(a,b),d=function(){this.clearTimeout(c)};return d.guid="vjs-timeout-"+c,this.on("dispose",d),c}},{key:"clearTimeout",value:function(a){h["default"].clearTimeout(a);var b=function(){};return b.guid="vjs-timeout-"+a,this.off("dispose",b),a}},{key:"setInterval",value:function(a,b){a=l.bind(this,a);var c=h["default"].setInterval(a,b),d=function(){this.clearInterval(c)};return d.guid="vjs-interval-"+c,this.on("dispose",d),c}},{key:"clearInterval",value:function(a){h["default"].clearInterval(a);var b=function(){};return b.guid="vjs-interval-"+a,this.off("dispose",b),a}}],[{key:"registerComponent",value:function(b,c){return a.components_||(a.components_={}),a.components_[b]=c,c}},{key:"getComponent",value:function(b){return a.components_&&a.components_[b]?a.components_[b]:h["default"]&&h["default"].videojs&&h["default"].videojs[b]?(r["default"].warn("The "+b+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),h["default"].videojs[b]):void 0}},{key:"extend",value:function(b){b=b||{};var c=b.init||b.init||this.prototype.init||this.prototype.init||function(){},d=function(){c.apply(this,arguments)};d.prototype=Object.create(this.prototype),d.prototype.constructor=d,d.extend=a.extend;for(var e in b)b.hasOwnProperty(e)&&(d.prototype[e]=b[e]);return d}}]),a}();y.registerComponent("Component",y),c["default"]=y,b.exports=c["default"]},{"./utils/dom.js":105,"./utils/events.js":106,"./utils/fn.js":107,"./utils/guid.js":109,"./utils/log.js":110,"./utils/merge-options.js":111,"./utils/to-title-case.js":114,"global/window":2,"object.assign":37}],46:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");
},f=function(){function a(a,b){for(var c=0;c'+this.localize("Stream Type")+""+this.localize("LIVE"),"aria-live":"off"}),a.appendChild(this.contentEl_),a}}]),b}(j["default"]);j["default"].registerComponent("LiveDisplay",m),c["default"]=m,b.exports=c["default"]},{"../component":45,"../utils/dom.js":105}],49:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+this.localize("Mute")+""})}},{key:"buildCSSClass",value:function(){return"vjs-mute-control "+g(Object.getPrototypeOf(b.prototype),"buildCSSClass",this).call(this)}},{key:"handleClick",value:function(){this.player_.muted(this.player_.muted()?!1:!0)}},{key:"update",value:function(){var a=this.player_.volume(),b=3;0===a||this.player_.muted()?b=0:.33>a?b=1:.67>a&&(b=2);var c=this.player_.muted()?"Unmute":"Mute",d=this.localize(c);this.el_.children[0].children[0].innerHTML!==d&&(this.el_.children[0].children[0].innerHTML=d);for(var e=0;4>e;e++)n.removeClass(this.el_,"vjs-vol-"+e);n.addClass(this.el_,"vjs-vol-"+b)}}]),b}(j["default"]);l["default"].registerComponent("MuteToggle",o),c["default"]=o,b.exports=c["default"]},{"../button":44,"../component":45,"../utils/dom.js":105}],50:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c=0;c--)a.addChild(new n["default"](this.player(),{rate:b[c]+"x"}));return a}},{key:"updateARIAAttributes",value:function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())}},{key:"handleClick",value:function(){for(var a=this.player().playbackRate(),b=this.player().options().playbackRates,c=b[0],d=0;da){c=b[d];break}this.player().playbackRate(c)}},{key:"playbackRateSupported",value:function(){return this.player().tech&&this.player().tech.featuresPlaybackRate&&this.player().options().playbackRates&&this.player().options().playbackRates.length>0}},{key:"updateVisibility",value:function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}},{key:"updateLabel",value:function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")}}]),b}(j["default"]);q.prototype.buttonText="Playback Rate",q.prototype.className="vjs-playback-rate",j["default"].registerComponent("PlaybackRateMenuButton",q),c["default"]=q,b.exports=c["default"]},{"../../menu/menu-button.js":83,"../../menu/menu.js":85,"../../utils/dom.js":105,"./playback-rate-menu-item.js":52}],52:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+this.localize("Loaded")+": 0%"})}},{key:"update",value:function(){var a=this.player_.buffered(),b=this.player_.duration(),c=this.player_.bufferedEnd(),d=this.el_.children,e=function(a,b){var c=a/b||0;return 100*(c>=1?1:c)+"%"};this.el_.style.width=e(c,b);for(var f=0;fa.length;f--)this.el_.removeChild(d[f-1])}}]),b}(j["default"]);j["default"].registerComponent("LoadProgressBar",m),c["default"]=m,b.exports=c["default"]},{"../../component.js":45,"../../utils/dom.js":105}],54:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+this.localize("Progress")+": 0%"})}}]),b}(j["default"]);j["default"].registerComponent("PlayProgressBar",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":45}],55:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c=1?1:a}},{key:"handleMouseDown",value:function(a){g(Object.getPrototypeOf(b.prototype),"handleMouseDown",this).call(this,a),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause()}},{key:"handleMouseMove",value:function(a){var b=this.calculateDistance(a)*this.player_.duration();b===this.player_.duration()&&(b-=.1),this.player_.currentTime(b)}},{key:"handleMouseUp",value:function(a){g(Object.getPrototypeOf(b.prototype),"handleMouseUp",this).call(this,a),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()}},{key:"stepForward",value:function(){this.player_.currentTime(this.player_.currentTime()+5)}},{key:"stepBack",value:function(){this.player_.currentTime(this.player_.currentTime()-5)}}]),b}(j["default"]);t.prototype.options_={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"},t.prototype.playerEvent="timeupdate",j["default"].registerComponent("SeekBar",t),c["default"]=t,b.exports=c["default"]},{"../../slider/slider.js":92,"../../utils/fn.js":107,"../../utils/format-time.js":108,"../../utils/round-float.js":112,"./load-progress-bar.js":53,"./play-progress-bar.js":54,"./seek-handle.js":57}],57:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+l["default"](a,this.player_.duration())+""}}]),b}(j["default"]);m.prototype.defaultValue="00:00",j["default"].registerComponent("SeekHandle",m),c["default"]=m,b.exports=c["default"]},{"../../slider/slider-handle.js":91,"../../utils/format-time.js":108}],58:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;ca?this.show():this.hide()}},{key:"createItems",value:function(){var a=[];return this.player().tech&&this.player().tech.featuresNativeTextTracks||a.push(new l["default"](this.player_,{kind:this.kind_})),g(Object.getPrototypeOf(b.prototype),"createItems",this).call(this,a)}}]),b}(j["default"]);m.prototype.kind_="captions",m.prototype.buttonText="Captions",m.prototype.className="vjs-captions-button",j["default"].registerComponent("CaptionsButton",m),c["default"]=m,b.exports=c["default"]},{"./caption-settings-menu-item.js":60,"./text-track-button.js":66}],62:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;cd;d++){var f=a[d];if(f.kind===this.kind_){if(f.cues){b=f;break}f.mode="hidden",x["default"].setTimeout(t.bind(this,function(){this.createMenu()}),100)}}var g=this.menu;if(void 0===g&&(g=new p["default"](this.player_),g.contentEl().appendChild(r.createEl("li",{className:"vjs-menu-title",innerHTML:v["default"](this.kind_),tabindex:-1}))),b){for(var h=b.cues,i=void 0,d=0,e=h.length;e>d;d++){i=h[d];var j=new n["default"](this.player_,{track:b,cue:i});c.push(j),g.addChild(j)}this.addChild(g)}return this.items.length>0&&this.show(),g}}]),b}(j["default"]);y.prototype.kind_="chapters",y.prototype.buttonText="Chapters",y.prototype.className="vjs-chapters-button",j["default"].registerComponent("ChaptersButton",y),c["default"]=y,b.exports=c["default"]},{"../../menu/menu.js":85,"../../utils/dom.js":105,"../../utils/fn.js":107,"../../utils/to-title-case.js":114,"./chapters-track-menu-item.js":63,"./text-track-button.js":66,"./text-track-menu-item.js":67,"global/window":2}],63:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;cc;c++){var e=a[c];if(e.kind===this.track.kind&&"showing"===e.mode){b=!1;break}}this.selected(b)}}]),b}(j["default"]);j["default"].registerComponent("OffTextTrackMenuItem",k),c["default"]=k,b.exports=c["default"]},{"./text-track-menu-item.js":67}],65:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function k(a,b,c){var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:k(e,b,c)}if("value"in d)return d.value;var f=d.get;return void 0===f?void 0:f.call(c)},g=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.__proto__=b)};Object.defineProperty(c,"__esModule",{value:!0});var h=a("./text-track-button.js"),i=d(h),j=function(a){function b(a,c,d){e(this,b),f(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,a,c,d),this.el_.setAttribute("aria-label","Subtitles Menu")}return g(b,a),b}(i["default"]);j.prototype.kind_="subtitles",j.prototype.buttonText="Subtitles",j.prototype.className="vjs-subtitles-button",i["default"].registerComponent("SubtitlesButton",j),c["default"]=j,b.exports=c["default"]},{"./text-track-button.js":66}],66:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;cCurrent Time 0:00',"aria-live":"off"}),a.appendChild(this.contentEl_),a}},{key:"updateContent",value:function(){var a=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime(),b=this.localize("Current Time"),c=n["default"](a,this.player_.duration());this.contentEl_.innerHTML=''+b+" "+c}}]),b}(j["default"]);j["default"].registerComponent("CurrentTimeDisplay",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":45,"../../utils/dom.js":105,"../../utils/format-time.js":108}],69:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+this.localize("Duration Time")+" 0:00","aria-live":"off"}),a.appendChild(this.contentEl_),a}},{key:"updateContent",value:function(){var a=this.player_.duration();if(a){var b=this.localize("Duration Time"),c=n["default"](a);this.contentEl_.innerHTML=''+b+" "+c}}}]),b}(j["default"]);j["default"].registerComponent("DurationDisplay",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":45,"../../utils/dom.js":105,"../../utils/format-time.js":108}],70:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+this.localize("Remaining Time")+" -0:00","aria-live":"off"}),a.appendChild(this.contentEl_),a}},{key:"updateContent",value:function(){if(this.player_.duration()){var a=this.localize("Remaining Time"),b=n["default"](this.player_.remainingTime());this.contentEl_.innerHTML=''+a+" -"+b}}}]),b}(j["default"]);j["default"].registerComponent("RemainingTimeDisplay",o),c["default"]=o,b.exports=c["default"]},{"../../component.js":45,"../../utils/dom.js":105,"../../utils/format-time.js":108}],71:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c/"})}}]),b}(j["default"]);j["default"].registerComponent("TimeDivider",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":45}],72:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'})}}]),b}(j["default"]);j["default"].registerComponent("VolumeLevel",k),c["default"]=k,b.exports=c["default"]},{"../../component.js":45}],76:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+this.localize("Mute")+""})}}]),b}(n["default"]);s.prototype.volumeUpdate=p["default"].prototype.update,j["default"].registerComponent("VolumeMenuButton",s),c["default"]=s,b.exports=c["default"]},{"../button.js":44,"../menu/menu-button.js":83,"../menu/menu.js":85,"./mute-toggle.js":49,"./volume-control/volume-bar.js":72}],77:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c1&&this.show()}},{key:"createMenu",value:function(){var a=new l["default"](this.player_);if(this.options().title&&a.contentEl().appendChild(n.createEl("li",{className:"vjs-menu-title",innerHTML:r["default"](this.options().title),tabindex:-1})),this.items=this.createItems(),this.items)for(var b=0;b0&&this.items[0].el().focus()}},{key:"unpressButton",value:function(){this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-pressed",!1)}}]),b}(j["default"]);j["default"].registerComponent("MenuButton",s),c["default"]=s,b.exports=c["default"]},{"../button.js":44,"../utils/dom.js":105,"../utils/fn.js":107,"../utils/to-title-case.js":114,"./menu.js":85}],84:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c0&&(d.startTime=this.cache_.currentTime),this.cache_.src=b.src);var e=k["default"].getComponent(a);this.tech=new e(d),this.on(this.tech,"ready",this.handleTechReady),this.on(this.tech,"usenativecontrols",this.handleTechUseNativeControls),this.on(this.tech,"loadstart",this.handleTechLoadStart),this.on(this.tech,"waiting",this.handleTechWaiting),this.on(this.tech,"canplay",this.handleTechCanPlay),this.on(this.tech,"canplaythrough",this.handleTechCanPlayThrough),this.on(this.tech,"playing",this.handleTechPlaying),this.on(this.tech,"ended",this.handleTechEnded),this.on(this.tech,"seeking",this.handleTechSeeking),this.on(this.tech,"seeked",this.handleTechSeeked),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,"progress",this.handleTechProgress),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,"suspend",this.handleTechSuspend),this.on(this.tech,"abort",this.handleTechAbort),this.on(this.tech,"emptied",this.handleTechEmptied),this.on(this.tech,"stalled",this.handleTechStalled),this.on(this.tech,"loadedmetadata",this.handleTechLoadedMetaData),this.on(this.tech,"loadeddata",this.handleTechLoadedData),this.on(this.tech,"timeupdate",this.handleTechTimeUpdate),this.on(this.tech,"ratechange",this.handleTechRateChange),this.on(this.tech,"volumechange",this.handleTechVolumeChange),this.on(this.tech,"texttrackchange",this.onTextTrackChange),this.on(this.tech,"loadedmetadata",this.updateStyleEl_),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners(),this.tech.el().parentNode===this.el()||"Html5"===a&&this.tag||o.insertFirst(this.tech.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null),this.tech.ready(c)}},{key:"unloadTech",value:function(){this.textTracks_=this.textTracks(),this.isReady_=!1,this.tech.dispose(),this.tech=!1}},{key:"addTechControlsListeners",value:function(){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.tech.emitTapEvents(),this.on(this.tech,"tap",this.handleTechTap)}},{key:"removeTechControlsListeners",value: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)}},{key:"handleTechReady",value:function(){this.triggerReady(),this.tag&&this.options_.autoplay&&this.paused()&&(delete this.tag.poster,this.play())}},{key:"handleTechUseNativeControls",value:function(){this.usingNativeControls(!0)}},{key:"handleTechLoadStart",value:function(){this.removeClass("vjs-ended"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))}},{key:"hasStarted",value:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return void 0!==a?(this.hasStarted_!==a&&(this.hasStarted_=a,a?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_})},{key:"handleTechPlay",value:function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}},{key:"handleTechWaiting",value:function(){this.addClass("vjs-waiting"),this.trigger("waiting")}},{key:"handleTechCanPlay",value:function(){this.removeClass("vjs-waiting"),this.trigger("canplay")}},{key:"handleTechCanPlayThrough",value:function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}},{key:"handleTechPlaying",value:function(){this.removeClass("vjs-waiting"),this.trigger("playing")}},{key:"handleTechSeeking",value:function(){this.addClass("vjs-seeking"),this.trigger("seeking")}},{key:"handleTechSeeked",value:function(){this.removeClass("vjs-seeking"),this.trigger("seeked")}},{key:"handleTechFirstPlay",value:function(){this.options_.starttime&&this.currentTime(this.options_.starttime),this.addClass("vjs-has-started"),this.trigger("firstplay")}},{key:"handleTechPause",value:function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}},{key:"handleTechProgress",value:function(){this.trigger("progress"),1===this.bufferedPercent()&&this.trigger("loadedalldata")}},{key:"handleTechEnded",value:function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}},{key:"handleTechDurationChange",value:function(){this.updateDuration(),this.trigger("durationchange")}},{key:"handleTechClick",value:function(a){0===a.button&&this.controls()&&(this.paused()?this.play():this.pause())}},{key:"handleTechTap",value:function(){this.userActive(!this.userActive())}},{key:"handleTechTouchStart",value:function(){this.userWasActive=this.userActive()}},{key:"handleTechTouchMove",value:function(){this.userWasActive&&this.reportUserActivity()}},{key:"handleTechTouchEnd",value:function(a){a.preventDefault()}},{key:"updateDuration",value:function(){var a=this.techGet("duration");a&&(0>a&&(a=1/0),this.duration(a),a===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"))}},{key:"handleFullscreenChange",value:function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}},{key:"handleStageClick",value:function(){this.reportUserActivity()}},{key:"handleTechFullscreenChange",value:function(){this.trigger("fullscreenchange")}},{key:"handleTechError",value:function(){this.error(this.tech.error().code)}},{key:"handleTechSuspend",value:function(){this.trigger("suspend")}},{key:"handleTechAbort",value:function(){this.trigger("abort")}},{key:"handleTechEmptied",value:function(){this.trigger("emptied")}},{key:"handleTechStalled",value:function(){this.trigger("stalled")}},{key:"handleTechLoadedMetaData",value:function(){this.trigger("loadedmetadata")}},{key:"handleTechLoadedData",value:function(){this.trigger("loadeddata")}},{key:"handleTechTimeUpdate",value:function(){this.trigger("timeupdate")}},{key:"handleTechRateChange",value:function(){this.trigger("ratechange")}},{key:"handleTechVolumeChange",value:function(){this.trigger("volumechange")}},{key:"onTextTrackChange",value:function(){this.trigger("texttrackchange")}},{key:"getCache",value:function(){return this.cache_}},{key:"techCall",value:function(a,b){if(this.tech&&!this.tech.isReady_)this.tech.ready(function(){this[a](b)});else try{this.tech[a](b)}catch(c){throw v["default"](c),c}}},{key:"techGet",value:function(a){if(this.tech&&this.tech.isReady_)try{return this.tech[a]()}catch(b){throw void 0===this.tech[a]?v["default"]("Video.js: "+a+" method not defined for "+this.techName+" playback technology.",b):"TypeError"===b.name?(v["default"]("Video.js: "+a+" unavailable on "+this.techName+" playback technology element.",b),this.tech.isReady_=!1):v["default"](b),b}}},{key:"play",value:function(){return this.techCall("play"),this}},{key:"pause",value:function(){return this.techCall("pause"),this}},{key:"paused",value:function(){return this.techGet("paused")===!1?!1:!0}},{key:"scrubbing",value:function(a){return void 0!==a?(this.scrubbing_=!!a,a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_}},{key:"currentTime",value:function(a){return void 0!==a?(this.techCall("setCurrentTime",a),this):this.cache_.currentTime=this.techGet("currentTime")||0}},{key:"duration",value:function(a){return void 0!==a?(this.cache_.duration=parseFloat(a),this):(void 0===this.cache_.duration&&this.updateDuration(),this.cache_.duration||0)}},{key:"remainingTime",value:function(){return this.duration()-this.currentTime()}},{key:"buffered",value:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(){var a=this.techGet("buffered");return a&&a.length||(a=y.createTimeRange(0,0)),a})},{key:"bufferedPercent",value:function(){var a,b,c=this.duration(),d=this.buffered(),e=0;if(!c)return 0;for(var f=0;fc&&(b=c),e+=b-a;return e/c}},{key:"bufferedEnd",value:function(){var a=this.buffered(),b=this.duration(),c=a.end(a.length-1);return c>b&&(c=b),c}},{key:"volume",value:function(a){var b=void 0;return void 0!==a?(b=Math.max(0,Math.min(1,parseFloat(a))),this.cache_.volume=b,this.techCall("setVolume",b),this):(b=parseFloat(this.techGet("volume")),isNaN(b)?1:b)}},{key:"muted",value:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return void 0!==a?(this.techCall("setMuted",a),this):this.techGet("muted")||!1})},{key:"supportsFullScreen",value:function(){return this.techGet("supportsFullScreen")||!1}},{key:"isFullscreen",value:function(a){return void 0!==a?(this.isFullscreen_=!!a,this):!!this.isFullscreen_}},{key:"isFullScreen",value:function(a){return v["default"].warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")'),this.isFullscreen(a)}},{key:"requestFullscreen",value:function(){var a=A["default"];return this.isFullscreen(!0),a?(m.on(J["default"],a.fullscreenchange,q.bind(this,function b(){this.isFullscreen(J["default"][a.fullscreenElement]),this.isFullscreen()===!1&&m.off(J["default"],a.fullscreenchange,b),this.trigger("fullscreenchange")})),this.el_[a.requestFullscreen]()):this.tech.supportsFullScreen()?this.techCall("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this}},{key:"requestFullScreen",value:function(){return v["default"].warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")'),this.requestFullscreen()}},{key:"exitFullscreen",value:function(){var a=A["default"];return this.isFullscreen(!1),a?J["default"][a.exitFullscreen]():this.tech.supportsFullScreen()?this.techCall("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this}},{key:"cancelFullScreen",value:function(){return v["default"].warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()"),this.exitFullscreen()}},{key:"enterFullWindow",value:function(){this.isFullWindow=!0,this.docOrigOverflow=J["default"].documentElement.style.overflow,m.on(J["default"],"keydown",q.bind(this,this.fullWindowOnEscKey)),J["default"].documentElement.style.overflow="hidden",o.addClass(J["default"].body,"vjs-full-window"),this.trigger("enterFullWindow")}},{key:"fullWindowOnEscKey",value:function(a){27===a.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())}},{key:"exitFullWindow",value:function(){this.isFullWindow=!1,m.off(J["default"],"keydown",this.fullWindowOnEscKey),J["default"].documentElement.style.overflow=this.docOrigOverflow,o.removeClass(J["default"].body,"vjs-full-window"),this.trigger("exitFullWindow")}},{key:"selectSource",value:function(a){for(var b=0,c=this.options_.techOrder;b0&&(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},b))}},250)}},{key:"playbackRate",value:function(a){return void 0!==a?(this.techCall("setPlaybackRate",a),this):this.tech&&this.tech.featuresPlaybackRate?this.techGet("playbackRate"):1}},{key:"isAudio",value:function(a){return void 0!==a?(this.isAudio_=!!a,this):!!this.isAudio_}},{key:"networkState",value:function(){return this.techGet("networkState")}},{key:"readyState",value:function(){return this.techGet("readyState")}},{key:"textTracks",value:function(){return this.tech&&this.tech.textTracks()}},{key:"remoteTextTracks",value:function(){return this.tech&&this.tech.remoteTextTracks()}},{key:"addTextTrack",value:function(a,b,c){return this.tech&&this.tech.addTextTrack(a,b,c)}},{key:"addRemoteTextTrack",value:function(a){return this.tech&&this.tech.addRemoteTextTrack(a)}},{key:"removeRemoteTextTrack",value:function(a){this.tech&&this.tech.removeRemoteTextTrack(a)}},{key:"videoWidth",value:function(){return this.tech&&this.tech.videoWidth&&this.tech.videoWidth()||0}},{key:"videoHeight",value:function(){return this.tech&&this.tech.videoHeight&&this.tech.videoHeight()||0}},{key:"language",value:function(a){return void 0===a?this.language_:(this.language_=a,this)}},{key:"languages",value:function(){return this.languages_}},{key:"toJSON",value:function(){var a=N["default"](this.options()),b=a.tracks;a.tracks=[];for(var c=0;ck;k++){var m=j[k],n=m.nodeName.toLowerCase();"source"===n?b.sources.push(o.getElementAttributes(m)):"track"===n&&b.tracks.push(o.getElementAttributes(m))}return b}}]),b}(k["default"]));X.players={},X.prototype.options_=E["default"],X.prototype.handleLoadedMetaData,X.prototype.handleLoadedData,X.prototype.handleLoadedAllData,X.prototype.handleUserActive,X.prototype.handleUserInactive,X.prototype.handleTimeUpdate,X.prototype.handleVolumeChange,X.prototype.handleError,X.prototype.flexNotSupported_=function(){var a=J["default"].createElement("i");return!("flexBasis"in a.style||"webkitFlexBasis"in a.style||"mozFlexBasis"in a.style||"msFlexBasis"in a.style)},k["default"].registerComponent("Player",X),c["default"]=X,b.exports=c["default"]},{"./big-play-button.js":43,"./component.js":45,"./control-bar/control-bar.js":46,"./error-display.js":77,"./fullscreen-api.js":80,"./loading-spinner.js":81,"./media-error.js":82,"./options.js":86,"./poster-image.js":89,"./tech/html5.js":95,"./tech/loader.js":96,"./tracks/text-track-display.js":99,"./tracks/text-track-settings.js":102,"./utils/browser.js":104,"./utils/dom.js":105,"./utils/events.js":106,"./utils/fn.js":107,"./utils/guid.js":109,"./utils/log.js":110,"./utils/merge-options.js":111,"./utils/time-ranges.js":113,"./utils/to-title-case.js":114,"global/document":1,"global/window":2,"object.assign":37,"safe-json-parse/tuple":42}],88:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0});var e=a("./player"),f=d(e),g=function(a,b){f["default"].prototype[a]=b};c["default"]=g,b.exports=c["default"]},{"./player":87}],89:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c0)for(var d=0,e=a.length;e>d;d++)c.push(a[d]);if(b&&b.length>0)for(var d=0,e=b.length;e>d;d++)c.push(b[d]);if(c&&c.length>0)for(var d=0,e=c.length;e>d;d++){var f=c[d];if(!f||!f.getAttribute){n(1);break}if(void 0===f.player){var g=f.getAttribute("data-setup");if(null!==g){l(f)}}}else k||n(1)},n=function(a,b){l=b,setTimeout(m,a)};"complete"===h["default"].readyState?k=!0:f.one(j["default"],"load",function(){k=!0});var o=function(){return k};c.autoSetup=m,c.autoSetupTimeout=n,c.hasLoaded=o},{"./utils/events.js":106,"global/document":1,"global/window":2}],91:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c'+(this.defaultValue||0)+""},c),g(Object.getPrototypeOf(b.prototype),"createEl",this).call(this,"div",c)}}]),b}(j["default"]);j["default"].registerComponent("SliderHandle",m),c["default"]=m,b.exports=c["default"]},{"../component.js":45,"object.assign":37}],92:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;ca||a===1/0)&&(a=0);var c=this.updateHandlePosition(a),d=n["default"](100*c,2)+"%";this.vertical()?b.el().style.height=d:b.el().style.width=d}}}},{key:"updateHandlePosition",value:function(a){var b=this.handle;if(b){var c=this.vertical(),d=this.el_,e=void 0,f=void 0;c?(e=d.offsetHeight,f=b.el().offsetHeight):(e=d.offsetWidth,f=b.el().offsetWidth);var g=f?f/e:0,h=1-g,i=a*h,j=i+g/2,k=n["default"](100*i,2)+"%";return c?b.el().style.bottom=k:b.el().style.left=k,j}}},{key:"calculateDistance",value:function(a){var b=this.el_,c=l.findPosition(b),d=b.offsetWidth,e=b.offsetHeight,f=this.handle;if(this.options().vertical){var g=c.top,h=void 0;if(h=a.changedTouches?a.changedTouches[0].pageY:a.pageY,f){var i=f.el().offsetHeight;g+=i/2,e-=i}return Math.max(0,Math.min(1,(g-h+e)/e))}var j=c.left,k=void 0;if(k=a.changedTouches?a.changedTouches[0].pageX:a.pageX,f){var m=f.el().offsetWidth;j+=m/2,d-=m}return Math.max(0,Math.min(1,(k-j)/d))}},{key:"handleFocus",value:function(){this.on(p["default"],"keydown",this.handleKeyPress)}},{key:"handleKeyPress",value:function(a){37===a.which||40===a.which?(a.preventDefault(),this.stepBack()):(38===a.which||39===a.which)&&(a.preventDefault(),this.stepForward())}},{key:"handleBlur",value:function(){this.off(p["default"],"keydown",this.handleKeyPress)}},{key:"handleClick",value:function(a){a.stopImmediatePropagation(),a.preventDefault()}},{key:"vertical",value:function(a){return void 0===a?this.vertical_||!1:(this.vertical_=!!a,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal"),this)}}]),b}(j["default"]);j["default"].registerComponent("Slider",s),c["default"]=s,b.exports=c["default"]},{"../component.js":45,"../utils/dom.js":105,"../utils/round-float.js":112,"global/document":1,"object.assign":37}],93:[function(a,b,c){"use strict";function d(a){return a.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},a.streamFromParts=function(a,b){return a+"&"+b},a.streamToParts=function(a){var b={connection:"",stream:""};if(!a)return b;var c=a.indexOf("&"),d=void 0;return-1!==c?d=c+1:(c=d=a.lastIndexOf("/")+1,0===c&&(c=d=a.length)),b.connection=a.substring(0,c),b.stream=a.substring(d,a.length),b},a.isStreamingType=function(b){return b in a.streamingFormats},a.RTMP_RE=/^rtmp[set]?:\/\//i,a.isStreamingSrc=function(b){return a.RTMP_RE.test(b)},a.rtmpSourceHandler={},a.rtmpSourceHandler.canHandleSource=function(b){return a.isStreamingType(b.type)||a.isStreamingSrc(b.src)?"maybe":""},a.rtmpSourceHandler.handleSource=function(b,c){var d=a.streamToParts(b.src);c.setRtmpConnection(d.connection),c.setRtmpStream(d.stream)},a.registerSourceHandler(a.rtmpSourceHandler),a}Object.defineProperty(c,"__esModule",{value:!0}),c["default"]=d,b.exports=c["default"]},{}],94:[function(a,b,c){"use strict";function d(a){var b=a.charAt(0).toUpperCase()+a.slice(1);A["set"+b]=function(b){return this.el_.vjs_setProperty(a,b)}}function e(a){A[a]=function(){return this.el_.vjs_getProperty(a)}}var f=function(a){return a&&a.__esModule?a:{"default":a}},g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},h=function(){function a(a,b){for(var c=0;c=10},l["default"].withSourceHandlers(z),z.nativeSourceHandler={},z.nativeSourceHandler.canHandleSource=function(a){function b(a){var b=p.getFileExtension(a);return b?"video/"+b:""}var c;return c=a.type?a.type.replace(/;.*/,"").toLowerCase():b(a.src),c in z.formats?"maybe":""},z.nativeSourceHandler.handleSource=function(a,b){b.setSrc(a.src)},z.nativeSourceHandler.dispose=function(){},z.registerSourceHandler(z.nativeSourceHandler),z.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},z.onReady=function(a){var b=n.el(a),c=b&&b.tech;c&&c.el()&&z.checkReady(c)},z.checkReady=function(a){a.el()&&(a.el().vjs_getProperty?a.triggerReady():this.setTimeout(function(){z.checkReady(a)},50))},z.onEvent=function(a,b){var c=n.el(a).tech;c.trigger(b)},z.onError=function(a,b){var c=n.el(a).tech,d="FLASH: "+b;"srcnotfound"===b?c.trigger("error",{code:4,message:d}):c.trigger("error",d)},z.version=function(){var a="0,0,0";try{a=new v["default"].ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{y.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(y.plugins["Shockwave Flash 2.0"]||y.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(c){}}return a.split(",")},z.embed=function(a,b,c,d){var e=z.getEmbedCode(a,b,c,d),f=n.createEl("div",{innerHTML:e}).childNodes[0];return f},z.getEmbedCode=function(a,b,c,d){var e=''}),d=x["default"]({data:a,width:"100%",height:"100%"},d),Object.getOwnPropertyNames(d).forEach(function(a){h+=""+a+'="'+d[a]+'" '}),""+e+h+">"+g+""},s["default"](z),l["default"].registerComponent("Flash",z),c["default"]=z,b.exports=c["default"]},{"../component":45,"../utils/dom.js":105,"../utils/time-ranges.js":113,"../utils/url.js":115,"./flash-rtmp":93,"./tech":97,"global/window":2,"object.assign":37}],95:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},f=function(){function a(a,b){for(var c=0;c=0;f--){var j=i[f],k={};"undefined"!=typeof this.options_[j]&&(k[j]=this.options_[j]),n.setElementAttributes(a,k)}return a}},{key:"hideCaptions",value:function(){for(var a=this.el_.querySelectorAll("track"),b=a.length,c={captions:1,subtitles:1};b--;){var d=a[b].track;d&&d.kind in c&&!a[b]["default"]&&(d.mode="disabled")}}},{key:"play",value:function(){this.el_.play()}},{key:"pause",value:function(){this.el_.pause()}},{key:"paused",value:function(){return this.el_.paused}},{key:"currentTime",value:function(){return this.el_.currentTime}},{key:"setCurrentTime",value:function(a){try{this.el_.currentTime=a}catch(b){t["default"](b,"Video is not ready. (Video.js)")}}},{key:"duration",value:function(){return this.el_.duration||0}},{key:"buffered",value:function(){return this.el_.buffered}},{key:"volume",value:function(){return this.el_.volume}},{key:"setVolume",value:function(a){this.el_.volume=a}},{key:"muted",value:function(){return this.el_.muted}},{key:"setMuted",value:function(a){this.el_.muted=a}},{key:"width",value:function(){return this.el_.offsetWidth}},{key:"height",value:function(){return this.el_.offsetHeight}},{key:"supportsFullScreen",value:function(){if("function"==typeof this.el_.webkitEnterFullScreen){var a=z["default"].navigator.userAgent;if(/Android/.test(a)||!/Chrome|Mac OS X 10.5/.test(a))return!0}return!1}},{key:"enterFullScreen",value:function(){var a=this.el_;"webkitDisplayingFullscreen"in a&&this.one("webkitbeginfullscreen",function(){this.one("webkitendfullscreen",function(){this.trigger("fullscreenchange")}),this.trigger("fullscreenchange")}),a.paused&&a.networkState<=a.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){a.pause(),a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()}},{key:"exitFullScreen",value:function(){this.el_.webkitExitFullScreen()}},{key:"src",value:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){return void 0===a?this.el_.src:void this.setSrc(a)})},{key:"setSrc",value:function(a){this.el_.src=a}},{key:"load",value:function(){this.el_.load()}},{key:"currentSrc",value:function(){return this.el_.currentSrc}},{key:"poster",value:function(){return this.el_.poster}},{key:"setPoster",value:function(a){this.el_.poster=a}},{key:"preload",value:function(){return this.el_.preload}},{key:"setPreload",value:function(a){this.el_.preload=a}},{key:"autoplay",value:function(){return this.el_.autoplay}},{key:"setAutoplay",value:function(a){this.el_.autoplay=a}},{key:"controls",value:function(){return this.el_.controls}},{key:"setControls",value:function(a){this.el_.controls=!!a}},{key:"loop",value:function(){return this.el_.loop}},{key:"setLoop",value:function(a){this.el_.loop=a}},{key:"error",value:function(){return this.el_.error}},{key:"seeking",value:function(){return this.el_.seeking}},{key:"ended",value:function(){return this.el_.ended}},{key:"defaultMuted",value:function(){return this.el_.defaultMuted}},{key:"playbackRate",value:function(){return this.el_.playbackRate}},{key:"setPlaybackRate",value:function(a){this.el_.playbackRate=a}},{key:"networkState",value:function(){return this.el_.networkState}},{key:"readyState",value:function(){return this.el_.readyState}},{key:"videoWidth",value:function(){return this.el_.videoWidth}},{key:"videoHeight",value:function(){return this.el_.videoHeight}},{key:"textTracks",value:function(){return this.featuresNativeTextTracks?this.el_.textTracks:g(Object.getPrototypeOf(b.prototype),"textTracks",this).call(this)}},{key:"addTextTrack",value:function(a,c,d){return this.featuresNativeTextTracks?this.el_.addTextTrack(a,c,d):g(Object.getPrototypeOf(b.prototype),"addTextTrack",this).call(this,a,c,d)}},{key:"addRemoteTextTrack",value:function(){var a=void 0===arguments[0]?{}:arguments[0];if(!this.featuresNativeTextTracks)return g(Object.getPrototypeOf(b.prototype),"addRemoteTextTrack",this).call(this,a);var c=x["default"].createElement("track");return a.kind&&(c.kind=a.kind),a.label&&(c.label=a.label),(a.language||a.srclang)&&(c.srclang=a.language||a.srclang),a["default"]&&(c["default"]=a["default"]),a.id&&(c.id=a.id),a.src&&(c.src=a.src),this.el().appendChild(c),c.track.mode="metadata"===c.track.kind?"hidden":"disabled",c.onload=function(){var a=c.track;c.readyState>=2&&("metadata"===a.kind&&"hidden"!==a.mode?a.mode="hidden":"metadata"!==a.kind&&"disabled"!==a.mode&&(a.mode="disabled"),c.onload=null)},this.remoteTextTracks().addTrack_(c.track),c}},{key:"removeRemoteTextTrack",value:function(a){if(!this.featuresNativeTextTracks)return g(Object.getPrototypeOf(b.prototype),"removeRemoteTextTrack",this).call(this,a);var c,d;for(this.remoteTextTracks().removeTrack_(a),c=this.el().querySelectorAll("track"),d=0;d0&&(a="number"!=typeof E.TEST_VID.textTracks[0].mode),a&&v.IS_FIREFOX&&(a=!1),a},E.prototype.featuresVolumeControl=E.canControlVolume(),E.prototype.featuresPlaybackRate=E.canControlPlaybackRate(),E.prototype.movingMediaElementInDOM=!v.IS_IOS,E.prototype.featuresFullscreenResize=!0,E.prototype.featuresProgressEvents=!0,E.prototype.featuresNativeTextTracks=E.supportsNativeTextTracks();var G=void 0,H=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,I=/^video\/mp4/i;E.patchCanPlayType=function(){v.ANDROID_VERSION>=4&&(G||(G=E.TEST_VID.constructor.prototype.canPlayType),E.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&H.test(a)?"maybe":G.call(this,a)}),v.IS_OLD_ANDROID&&(G||(G=E.TEST_VID.constructor.prototype.canPlayType),E.TEST_VID.constructor.prototype.canPlayType=function(a){return a&&I.test(a)?"maybe":G.call(this,a)})},E.unpatchCanPlayType=function(){var a=E.TEST_VID.constructor.prototype.canPlayType;return E.TEST_VID.constructor.prototype.canPlayType=G,G=null,a},E.patchCanPlayType(),E.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),"function"==typeof a.load&&!function(){try{a.load()}catch(b){}}()}},l["default"].registerComponent("Html5",E),c["default"]=E,b.exports=c["default"]},{"../component":45,"../utils/browser.js":104,"../utils/dom.js":105,"../utils/fn.js":107,"../utils/log.js":110,"../utils/merge-options.js":111,"../utils/url.js":115,"./tech.js":97,"global/document":1,"global/window":2,"object.assign":37}],96:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}},e=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");
},f=function n(a,b,c){var d=Object.getOwnPropertyDescriptor(a,b);if(void 0===d){var e=Object.getPrototypeOf(a);return null===e?void 0:n(e,b,c)}if("value"in d)return d.value;var f=d.get;return void 0===f?void 0:f.call(c)},g=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.__proto__=b)};Object.defineProperty(c,"__esModule",{value:!0});var h=a("../component"),i=d(h),j=a("global/window"),k=(d(j),a("../utils/to-title-case.js")),l=d(k),m=function(a){function b(a,c,d){if(e(this,b),f(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,a,c,d),a.options_.sources&&0!==a.options_.sources.length)a.src(a.options_.sources);else for(var g=0,h=a.options_.techOrder;g0&&this.trigger("loadstart")})}},{key:"manualProgressOn",value:function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.trackProgress()}},{key:"manualProgressOff",value:function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)}},{key:"trackProgress",value:function(){this.progressInterval=this.setInterval(p.bind(this,function(){var a=this.bufferedPercent();this.bufferedPercent_!==a&&this.trigger("progress"),this.bufferedPercent_=a,1===a&&this.stopTrackingProgress()}),500)}},{key:"onDurationChange",value:function(){this.duration_=this.duration()}},{key:"bufferedPercent",value:function(){var a=0,b=void 0,c=void 0;if(!this.duration_)return 0;var d=this.buffered();d&&d.length||(d=s.createTimeRange(0,0));for(var e=0;ethis.duration_&&(c=this.duration_),a+=c-b;return a/this.duration_}},{key:"stopTrackingProgress",value:function(){this.clearInterval(this.progressInterval)}},{key:"manualTimeUpdatesOn",/*! Time Tracking -------------------------------------------------------------- */
value:function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime);var a=function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(b){b.manuallyTriggered||(this.off("timeupdate",a),this.featuresTimeupdateEvents=!0,this.manualTimeUpdatesOff())});this.on("timeupdate",a)}},{key:"manualTimeUpdatesOff",value:function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)}},{key:"trackCurrentTime",value:function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}},{key:"stopTrackingCurrentTime",value:function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}},{key:"dispose",value:function(){this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),g(Object.getPrototypeOf(b.prototype),"dispose",this).call(this)}},{key:"setCurrentTime",value:function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}},{key:"initTextTrackListeners",value:function(){var a=p.bind(this,function(){this.trigger("texttrackchange")}),b=this.textTracks();b&&(b.addEventListener("removetrack",a),b.addEventListener("addtrack",a),this.on("dispose",p.bind(this,function(){b.removeEventListener("removetrack",a),b.removeEventListener("addtrack",a)})))}},{key:"emulateTextTracks",value:function(){if(!u["default"].WebVTT&&null!=this.el().parentNode){var a=w["default"].createElement("script");a.src=this.options_["vtt.js"]||"../node_modules/vtt.js/dist/vtt.js",this.el().parentNode.appendChild(a),u["default"].WebVTT=!0}var b=this.textTracks();if(b){var c=function(){var a=p.bind(this,function(){this.trigger("texttrackchange")});this.trigger("texttrackchange");for(var b=0;bb)for(c=b;d>c;c++)e.call(this,c)},i.prototype.getCueById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},c["default"]=i,b.exports=c["default"]},{"../utils/browser.js":104,"global/document":1}],99:[function(a,b,c){"use strict";function d(a,b){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+b+")"}function e(a,b,c){try{a.style[b]=c}catch(d){}}var f=function(a){return a&&a.__esModule?a:{"default":a}},g=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},h=function(){function a(a,b){for(var c=0;cc;c++)if(b=this[c],b===a){this.tracks_.splice(c,1);break}this.trigger({type:"removetrack",track:b})},m.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;d>c;c++){var e=this[c];if(e.id===a){b=e;break}}return b},c["default"]=m,b.exports=c["default"]},{"../event-emitter":78,"../utils/browser.js":104,"../utils/fn.js":107,"global/document":1}],102:[function(a,b,c){"use strict";function d(a){var b=void 0;return a.selectedOptions?b=a.selectedOptions[0]:a.options&&(b=a.options[a.options.selectedIndex]),b.value}function e(a,b){if(b){var c=void 0;for(c=0;c select").selectedIndex=0,this.el().querySelector(".vjs-bg-color > select").selectedIndex=0,this.el().querySelector(".window-color > select").selectedIndex=0,this.el().querySelector(".vjs-text-opacity > select").selectedIndex=0,this.el().querySelector(".vjs-bg-opacity > select").selectedIndex=0,this.el().querySelector(".vjs-window-opacity > select").selectedIndex=0,this.el().querySelector(".vjs-edge-style select").selectedIndex=0,this.el().querySelector(".vjs-font-family select").selectedIndex=0,this.el().querySelector(".vjs-font-percent select").selectedIndex=2,this.updateDisplay()})),p.on(this.el().querySelector(".vjs-fg-color > select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".vjs-bg-color > select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".window-color > select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".vjs-text-opacity > select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".vjs-bg-opacity > select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".vjs-window-opacity > select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".vjs-font-percent select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".vjs-edge-style select"),"change",r.bind(this,this.updateDisplay)),p.on(this.el().querySelector(".vjs-font-family select"),"change",r.bind(this,this.updateDisplay)),a.options().persistTextTrackSettings&&this.restoreSettings()}return l(b,a),j(b,[{key:"createEl",value:function(){return k(Object.getPrototypeOf(b.prototype),"createEl",this).call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:f()})}},{key:"getValues",value:function(){var a=this.el(),b=d(a.querySelector(".vjs-edge-style select")),c=d(a.querySelector(".vjs-font-family select")),e=d(a.querySelector(".vjs-fg-color > select")),f=d(a.querySelector(".vjs-text-opacity > select")),g=d(a.querySelector(".vjs-bg-color > select")),h=d(a.querySelector(".vjs-bg-opacity > select")),i=d(a.querySelector(".window-color > select")),j=d(a.querySelector(".vjs-window-opacity > select")),k=x["default"].parseFloat(d(a.querySelector(".vjs-font-percent > select"))),l={backgroundOpacity:h,textOpacity:f,windowOpacity:j,edgeStyle:b,fontFamily:c,color:e,backgroundColor:g,windowColor:i,fontPercent:k};for(var m in l)(""===l[m]||"none"===l[m]||"fontPercent"===m&&1===l[m])&&delete l[m];return l}},{key:"setValues",value:function(a){var b=this.el();e(b.querySelector(".vjs-edge-style select"),a.edgeStyle),e(b.querySelector(".vjs-font-family select"),a.fontFamily),e(b.querySelector(".vjs-fg-color > select"),a.color),e(b.querySelector(".vjs-text-opacity > select"),a.textOpacity),e(b.querySelector(".vjs-bg-color > select"),a.backgroundColor),e(b.querySelector(".vjs-bg-opacity > select"),a.backgroundOpacity),e(b.querySelector(".window-color > select"),a.windowColor),e(b.querySelector(".vjs-window-opacity > select"),a.windowOpacity);var c=a.fontPercent;c&&(c=c.toFixed(2)),e(b.querySelector(".vjs-font-percent > select"),c)}},{key:"restoreSettings",value:function(){var a=v["default"](x["default"].localStorage.getItem("vjs-text-track-settings")),b=h(a,2),c=b[0],d=b[1];c&&t["default"].error(c),d&&this.setValues(d)}},{key:"saveSettings",value:function(){if(this.player_.options().persistTextTrackSettings){var a=this.getValues();try{Object.getOwnPropertyNames(a).length>0?x["default"].localStorage.setItem("vjs-text-track-settings",JSON.stringify(a)):x["default"].localStorage.removeItem("vjs-text-track-settings")}catch(b){}}}},{key:"updateDisplay",value:function(){var a=this.player_.getChild("textTrackDisplay");a&&a.updateDisplay()}}]),b}(n["default"]);n["default"].registerComponent("TextTrackSettings",y),c["default"]=y,b.exports=c["default"]},{"../component":45,"../utils/events.js":106,"../utils/fn.js":107,"../utils/log.js":110,"global/window":2,"safe-json-parse/tuple":42}],103:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0});var e=a("./text-track-cue-list"),f=d(e),g=a("../utils/fn.js"),h=d(g),i=a("../utils/guid.js"),j=d(i),k=a("../utils/browser.js"),l=d(k),m=a("./text-track-enums"),n=d(m),o=a("../utils/log.js"),p=d(o),q=a("../event-emitter"),r=d(q),s=a("global/document"),t=d(s),u=a("global/window"),v=d(u),w=a("../xhr.js"),x=d(w),y=function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(){var a=void 0===arguments[0]?{}:arguments[0];if(!a.tech)throw new Error("A tech was not provided.");var b=this;if(l.IS_IE8){b=t["default"].createElement("custom");for(var c in y.prototype)b[c]=y.prototype[c]}b.tech_=a.tech;var d=n.TextTrackMode[a.mode]||"disabled",e=n.TextTrackKind[a.kind]||"subtitles",g=a.label||"",i=a.language||a.srclang||"",k=a.id||"vjs_text_track_"+j.newGUID();("metadata"===e||"chapters"===e)&&(d="hidden"),b.cues_=[],b.activeCues_=[];var m=new f["default"](b.cues_),o=new f["default"](b.activeCues_),p=!1,q=h.bind(b,function(){this.activeCues,p&&(this.trigger("cuechange"),p=!1)});return"disabled"!==d&&b.tech_.on("timeupdate",q),Object.defineProperty(b,"kind",{get:function(){return e},set:Function.prototype}),Object.defineProperty(b,"label",{get:function(){return g},set:Function.prototype}),Object.defineProperty(b,"language",{get:function(){return i},set:Function.prototype}),Object.defineProperty(b,"id",{get:function(){return k},set:Function.prototype}),Object.defineProperty(b,"mode",{get:function(){return d},set:function(a){n.TextTrackMode[a]&&(d=a,"showing"===d&&this.tech_.on("timeupdate",q),this.trigger("modechange"))}}),Object.defineProperty(b,"cues",{get:function(){return this.loaded_?m:null},set:Function.prototype}),Object.defineProperty(b,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var a=this.tech_.currentTime(),b=[],c=0,d=this.cues.length;d>c;c++){var e=this.cues[c];e.startTime<=a&&e.endTime>=a?b.push(e):e.startTime===e.endTime&&e.startTime<=a&&e.startTime+.5>=a&&b.push(e)}if(p=!1,b.length!==this.activeCues_.length)p=!0;else for(var c=0;cc;c++){var e=this.cues_[c];e===a&&(this.cues_.splice(c,1),b=!0)}b&&this.cues.setCues_(this.cues_)};var z=function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a,b){if("function"!=typeof v["default"].WebVTT)return v["default"].setTimeout(function(){z(a,b)},25);var c=new v["default"].WebVTT.Parser(v["default"],v["default"].vttjs,v["default"].WebVTT.StringDecoder());c.oncue=function(a){b.addCue(a)},c.onparsingerror=function(a){p["default"].error(a)},c.parse(a),c.flush()}),A=function(a,b){x["default"](a,h.bind(this,function(a,c,d){return a?p["default"].error(a):(b.loaded_=!0,void z(d,b))}))},B=function(a,b){if(null==this)throw new TypeError('"this" is null or not defined');var c=Object(this),d=c.length>>>0;if(0===d)return-1;var e=+b||0;if(Math.abs(e)===1/0&&(e=0),e>=d)return-1;for(var f=Math.max(e>=0?e:d-Math.abs(e),0);d>f;){if(f in c&&c[f]===a)return f;f++}return-1};c["default"]=y,b.exports=c["default"]},{"../event-emitter":78,"../utils/browser.js":104,"../utils/fn.js":107,"../utils/guid.js":109,"../utils/log.js":110,"../xhr.js":117,"./text-track-cue-list":98,"./text-track-enums":100,"global/document":1,"global/window":2}],104:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0});var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=h["default"].navigator.userAgent,j=/iPhone/i.test(i);c.IS_IPHONE=j;var k=/iPad/i.test(i);c.IS_IPAD=k;var l=/iPod/i.test(i);c.IS_IPOD=l;var m=j||k||l;c.IS_IOS=m;var n=function(){var a=i.match(/OS (\d+)_/i);return a&&a[1]?a[1]:void 0}();c.IOS_VERSION=n;var o=/Android/i.test(i);c.IS_ANDROID=o;var p=function(){var a,b,c=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return c?(a=c[1]&&parseFloat(c[1]),b=c[2]&&parseFloat(c[2]),a&&b?parseFloat(c[1]+"."+c[2]):a?a:null):null}();c.ANDROID_VERSION=p;var q=o&&/webkit/i.test(i)&&2.3>p;c.IS_OLD_ANDROID=q;var r=/Firefox/i.test(i);c.IS_FIREFOX=r;var s=/Chrome/i.test(i);c.IS_CHROME=s;var t=/MSIE\s8\.0/.test(i);c.IS_IE8=t;var u=!!("ontouchstart"in h["default"]||h["default"].DocumentTouch&&f["default"]instanceof h["default"].DocumentTouch);c.TOUCH_ENABLED=u;var v="backgroundSize"in f["default"].createElement("video").style;c.BACKGROUND_SIZE_SUPPORTED=v},{"global/document":1,"global/window":2}],105:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0});var e=a("global/document"),f=d(e),g=a("global/window"),h=d(g),i=a("./guid.js"),j=d(i),k=a("./round-float.js"),l=d(k),m=function(a){return 0===a.indexOf("#")&&(a=a.slice(1)),f["default"].getElementById(a)};c.el=m;var n=function(){var a=void 0===arguments[0]?"div":arguments[0],b=void 0===arguments[1]?{}:arguments[1],c=f["default"].createElement(a);return Object.getOwnPropertyNames(b).forEach(function(a){var d=b[a];-1!==a.indexOf("aria-")||"role"===a?c.setAttribute(a,d):c[a]=d}),c};c.createEl=n;var o=function(a,b){b.firstChild?b.insertBefore(a,b.firstChild):b.appendChild(a)};c.insertFirst=o;var p={};c.cache=p;var q="vdata"+(new Date).getTime();c.expando=q;var r=function(a){var b=a[q];return b||(b=a[q]=j.newGUID()),p[b]||(p[b]={}),p[b]};c.getData=r;var s=function(a){var b=a[q];return b?!!Object.getOwnPropertyNames(p[b]).length:!1};c.hasData=s;var t=function(a){var b=a[q];if(b){delete p[b];try{delete a[q]}catch(c){a.removeAttribute?a.removeAttribute(q):a[q]=null}}};c.removeData=t;var u=function(a,b){return-1!==(" "+a.className+" ").indexOf(" "+b+" ")};c.hasClass=u;var v=function(a,b){u(a,b)||(a.className=""===a.className?b:a.className+" "+b)};c.addClass=v;var w=function(a,b){if(u(a,b)){for(var c=a.className.split(" "),d=c.length-1;d>=0;d--)c[d]===b&&c.splice(d,1);a.className=c.join(" ")}};c.removeClass=w;var x=function(a,b){Object.getOwnPropertyNames(b).forEach(function(c){var d=b[c];null===d||"undefined"==typeof d||d===!1?a.removeAttribute(c):a.setAttribute(c,d===!0?"":d)})};c.setElementAttributes=x;var y=function(a){var b,c,d,e,f;if(b={},c=",autoplay,controls,loop,muted,default,",a&&a.attributes&&a.attributes.length>0){d=a.attributes;for(var g=d.length-1;g>=0;g--)e=d[g].name,f=d[g].value,("boolean"==typeof a[e]||-1!==c.indexOf(","+e+","))&&(f=null!==f?!0:!1),b[e]=f}return b};c.getElementAttributes=y;var z=function(a,b){var c="";if(f["default"].defaultView&&f["default"].defaultView.getComputedStyle)c=f["default"].defaultView.getComputedStyle(a,"").getPropertyValue(b);else if(a.currentStyle){var d=b.substr(0,1).toUpperCase()+b.substr(1);c=a["client"+d]+"px"}return c};c.getComputedDimension=z;var A=function(){f["default"].body.focus(),f["default"].onselectstart=function(){return!1}};c.blockTextSelection=A;var B=function(){f["default"].onselectstart=function(){return!0}};c.unblockTextSelection=B;var C=function(a){var b=void 0;if(a.getBoundingClientRect&&a.parentNode&&(b=a.getBoundingClientRect()),!b)return{left:0,top:0};var c=f["default"].documentElement,d=f["default"].body,e=c.clientLeft||d.clientLeft||0,g=h["default"].pageXOffset||d.scrollLeft,i=b.left+g-e,j=c.clientTop||d.clientTop||0,k=h["default"].pageYOffset||d.scrollTop,m=b.top+k-j;return{left:l["default"](i),top:l["default"](m)}};c.findPosition=C},{"./guid.js":109,"./round-float.js":112,"global/document":1,"global/window":2}],106:[function(a,b,c){"use strict";function d(a,b,c){if(Array.isArray(b))return j(d,a,b,c);var e=m.getData(a);e.handlers||(e.handlers={}),e.handlers[b]||(e.handlers[b]=[]),c.guid||(c.guid=o.newGUID()),e.handlers[b].push(c),e.dispatcher||(e.disabled=!1,e.dispatcher=function(b){if(!e.disabled){b=h(b);var c=e.handlers[b.type];if(c)for(var d=c.slice(0),f=0,g=d.length;g>f&&!b.isImmediatePropagationStopped();f++)d[f].call(a,b);
}}),1===e.handlers[b].length&&(a.addEventListener?a.addEventListener(b,e.dispatcher,!1):a.attachEvent&&a.attachEvent("on"+b,e.dispatcher))}function e(a,b,c){if(m.hasData(a)){var d=m.getData(a);if(d.handlers){if(Array.isArray(b))return j(e,a,b,c);var f=function(b){d.handlers[b]=[],i(a,b)};if(b){var g=d.handlers[b];if(g){if(!c)return void f(b);if(c.guid)for(var h=0;h0||g>0?e+":":"",d=((e||f>=10)&&10>d?"0"+d:d)+":",c=10>c?"0"+c:c,e+d+c}()}Object.defineProperty(c,"__esModule",{value:!0}),c["default"]=d,b.exports=c["default"]},{}],109:[function(a,b,c){"use strict";function d(){return e++}Object.defineProperty(c,"__esModule",{value:!0}),c.newGUID=d;var e=1},{}],110:[function(a,b,c){"use strict";function d(a,b){var c=Array.prototype.slice.call(b),d=function(){},e=g["default"].console||{log:d,warn:d,error:d};a?c.unshift(a.toUpperCase()+":"):a="log",h.history.push(c),c.unshift("VIDEOJS:"),e[a].apply?e[a].apply(e,c):e[a](c.join(" "))}var e=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0});var f=a("global/window"),g=e(f),h=function(){d(null,arguments)};h.history=[],h.error=function(){d("error",arguments)},h.warn=function(){d("warn",arguments)},c["default"]=h,b.exports=c["default"]},{"global/window":2}],111:[function(a,b,c){"use strict";function d(a){return a=k["default"](a,function(a){return i["default"](a)?void 0:a}),Array.prototype.slice.call(arguments,1).forEach(function(b){g["default"](a,b,function(a,b){return i["default"](a)&&i["default"](b)?void 0:b})}),a}var e=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0}),c["default"]=d;var f=a("lodash.merge"),g=e(f),h=a("lodash.isplainobject"),i=e(h),j=a("lodash.clonedeep"),k=e(j);b.exports=c["default"]},{"lodash.clonedeep":4,"lodash.isplainobject":16,"lodash.merge":22}],112:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d=function(a){var b=void 0===arguments[1]?0:arguments[1];return Math.round(a*Math.pow(10,b))/Math.pow(10,b)};c["default"]=d,b.exports=c["default"]},{}],113:[function(a,b,c){"use strict";function d(a,b){return{length:1,start:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(){return a}),end:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(){return b})}}Object.defineProperty(c,"__esModule",{value:!0}),c.createTimeRange=d},{}],114:[function(a,b,c){"use strict";function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}Object.defineProperty(c,"__esModule",{value:!0}),c["default"]=d,b.exports=c["default"]},{}],115:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0});var e=a("global/document"),f=d(e),g=function(a){var b=["protocol","hostname","port","pathname","search","hash","host"],c=f["default"].createElement("a");c.href=a;var d=""===c.host&&"file:"!==c.protocol,e=void 0;d&&(e=f["default"].createElement("div"),e.innerHTML='',c=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),f["default"].body.appendChild(e));for(var g={},h=0;hx',a=b.firstChild.href}return a};c.getAbsoluteURL=h;var i=function(a){if("string"==typeof a){var b=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,c=b.exec(a);if(c)return c.pop().toLowerCase()}return""};c.getFileExtension=i},{"global/document":1}],116:[function(b,c,d){"use strict";var e=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(d,"__esModule",{value:!0});var f=b("global/document"),g=e(f),h=b("object.assign"),i=(e(h),b("./tech/loader.js")),j=(e(i),b("./tech/html5.js")),k=(e(j),b("./tech/flash.js")),l=(e(k),b("./poster-image.js")),m=(e(l),b("./tracks/text-track-display.js")),n=(e(m),b("./loading-spinner.js")),o=(e(n),b("./big-play-button.js")),p=(e(o),b("./control-bar/control-bar.js")),q=(e(p),b("./error-display.js")),r=(e(q),b("./setup")),s=e(r),t=b("./component"),u=e(t),v=b("./options"),w=e(v),x=b("./utils/dom.js"),y=e(x),z=b("./utils/log.js"),A=e(z),B=b("./utils/browser.js"),C=e(B),D=b("./player"),E=e(D),F=b("./extends.js"),G=e(F),H=b("./plugins.js"),I=e(H),J=b("./options.js"),K=e(J),L=b("../../src/js/utils/merge-options.js"),M=e(L);"undefined"==typeof HTMLVideoElement&&(g["default"].createElement("video"),g["default"].createElement("audio"),g["default"].createElement("track"));var N=function(a,b,c){var d;if("string"==typeof a){if(0===a.indexOf("#")&&(a=a.slice(1)),E["default"].players[a])return b&&A["default"].warn('Player "'+a+'" is already initialised. Options will not be applied.'),c&&E["default"].players[a].ready(c),E["default"].players[a];d=y.el(a)}else d=a;if(!d||!d.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return d.player||new E["default"](d,b,c)};N.CDN_VERSION="5.0",N.ACCESS_PROTOCOL="https:"===g["default"].location.protocol?"https://":"http://",N.VERSION="5.0.0-16","__VERSION_NO_PATCH__"!==N.CDN_VERSION&&(w["default"].flash.swf=""+N.ACCESS_PROTOCOL+"vjs.zencdn.net/"+N.CDN_VERSION+"/video-js.swf"),s.autoSetupTimeout(1,N),N.getComponent=u["default"].getComponent,N.registerComponent=u["default"].registerComponent,N.TOUCH_ENABLED=C.TOUCH_ENABLED,N.players=E["default"].players,N["extends"]=G["default"],N.mergeOptions=M["default"],N.getGlobalOptions=function(){return K["default"]},N.setGlobalOptions=function(a){M["default"](K["default"],a)},N.plugin=I["default"],N.addLanguage=function(a,b){return w["default"].languages[a]=void 0!==w["default"].languages[a]?M["default"](w["default"].languages[a],b):b,w["default"].languages},"function"==typeof a&&a.amd?a("videojs",[],function(){return N}):"object"==typeof d&&"object"==typeof c&&(c.exports=N),d["default"]=N,c.exports=d["default"]},{"../../src/js/utils/merge-options.js":111,"./big-play-button.js":43,"./component":45,"./control-bar/control-bar.js":46,"./error-display.js":77,"./extends.js":79,"./loading-spinner.js":81,"./options":86,"./options.js":86,"./player":87,"./plugins.js":88,"./poster-image.js":89,"./setup":90,"./tech/flash.js":94,"./tech/html5.js":95,"./tech/loader.js":96,"./tracks/text-track-display.js":99,"./utils/browser.js":104,"./utils/dom.js":105,"./utils/log.js":110,"global/document":1,"object.assign":37}],117:[function(a,b,c){"use strict";var d=function(a){return a&&a.__esModule?a:{"default":a}};Object.defineProperty(c,"__esModule",{value:!0});var e=a("./utils/url.js"),f=d(e),g=a("./utils/log.js"),h=(d(g),a("./utils/merge-options.js")),i=d(h),j=a("global/window"),k=d(j),l=function(a,b){var c=void 0;"string"==typeof a&&(a={uri:a}),i["default"]({method:"GET",timeout:45e3},a),b=b||function(){};var d=k["default"].XMLHttpRequest;"undefined"==typeof d&&(d=function(){try{return new k["default"].ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new k["default"].ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(b){}try{return new k["default"].ActiveXObject("Msxml2.XMLHTTP")}catch(c){}throw new Error("This browser does not support XMLHttpRequest.")});var e=new d;e.uri=a.uri;var g=f.parseUrl(a.uri),h=k["default"].location,j=function(){k["default"].clearTimeout(c),b(null,e,e.response||e.responseText)},l=function(a){k["default"].clearTimeout(c),a&&"string"!=typeof a||(a=new Error(a)),b(a,e)},m=g.protocol+g.host!==h.protocol+h.host;!m||!k["default"].XDomainRequest||"withCredentials"in e?!function(){var b="file:"===g.protocol||"file:"===h.protocol;e.onreadystatechange=function(){if(4===e.readyState){if(e.timedout)return l("timeout");200===e.status||b&&0===e.status?j():l()}},a.timeout&&(c=k["default"].setTimeout(function(){4!==e.readyState&&(e.timedout=!0,e.abort())},a.timeout))}():(e=new k["default"].XDomainRequest,e.onload=j,e.onerror=l,e.onprogress=function(){},e.ontimeout=function(){});try{e.open(a.method||"GET",a.uri,!0)}catch(n){return l(n)}a.withCredentials&&(e.withCredentials=!0),a.responseType&&(e.responseType=a.responseType);try{e.send()}catch(n){return l(n)}return e};c["default"]=l,b.exports=c["default"]},{"./utils/log.js":110,"./utils/merge-options.js":111,"./utils/url.js":115,"global/window":2}]},{},[116])(116)}),function(a){var b=a.vttjs={},c=b.VTTCue,d=b.VTTRegion,e=a.VTTCue,f=a.VTTRegion;b.shim=function(){b.VTTCue=c,b.VTTRegion=d},b.restore=function(){b.VTTCue=e,b.VTTRegion=f}}(this),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return b?a.toLowerCase():!1}function e(a){for(var b=1;ba||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},j,{get:function(){return w},set:function(a){if(0>a||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i?h:void 0}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{}),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){return"number"==typeof a&&a>=0&&100>=a}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{}),function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function d(){this.values=o(null)}function e(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"-->"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;ei&&(e=new l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl":j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=0>n?-1:1,n*=Math.ceil(o/m)*m),0>h&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d=0&&100>=b)?(this.set(a,b),!0):!1}};var p={"&":"&","<":"<",">":">","":"","":""," ":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];
j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},l.prototype.overlaps=function(a){return this.lefta.left&&this.topa.top},l.prototype.overlapsAny=function(a){for(var b=0;b=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.lefta.right;case"+y":return this.topa.bottom}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},l.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b")){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=-1!==j.indexOf("-->");if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{});
//# sourceMappingURL=video.min.js.map