@blacklol/webplayer
Version:
rtmp, hls, flv and websocket player
1 lines • 1.26 MB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t){return t.replace(/\n\r?\s*/g,"")}function n(t,e){Ne(t).forEach(function(n){return e(t[n],n)})}function r(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Ne(t).reduce(function(n,r){return e(n,t[r],r)},n)}function i(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[t].concat(r)):(r.forEach(function(e){e&&n(e,function(e,n){t[n]=e})}),t)}function o(t){return!!t&&"object"===(void 0===t?"undefined":Ie(t))}function a(t){return o(t)&&"[object Object]"===Ue.call(t)&&t.constructor===Object}function s(t,e){if(!t||!e)return"";if("function"==typeof be.getComputedStyle){var n=be.getComputedStyle(t);return n?n[e]:""}return""}function u(t){return"string"==typeof t&&/\S/.test(t)}function l(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function c(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function d(){return ke===be.document}function h(t){return o(t)&&1===t.nodeType}function f(){try{return be.parent!==be.self}catch(t){return!0}}function p(t){return function(e,n){if(!u(e))return ke[t](null);u(n)&&(n=ke.querySelector(n));var r=h(n)?n:ke;return r[t]&&r[t](e)}}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=ke.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(xe.warn(Oe(Be,t,n)),i.setAttribute(t,n)):"textContent"===t?m(i,n):i[t]=n}),Object.getOwnPropertyNames(n).forEach(function(t){i.setAttribute(t,n[t])}),r&&j(i,r),i}function m(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function g(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function y(t,e){return l(e),t.classList?t.classList.contains(e):c(e).test(t.className)}function _(t,e){return t.classList?t.classList.add(e):y(t,e)||(t.className=(t.className+" "+e).trim()),t}function b(t,e){return t.classList?t.classList.remove(e):(l(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function T(t,e,n){var r=y(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?_(t,e):b(t,e),t}function S(t,e){Object.getOwnPropertyNames(e).forEach(function(n){var r=e[n];null===r||void 0===r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)})}function E(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof t[i]&&-1===",autoplay,stretch,fluent,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),e[i]=o}return e}function w(t,e){return t.getAttribute(e)}function k(t,e,n){t.setAttribute(e,n)}function A(t,e){t.removeAttribute(e)}function C(){ke.body.focus(),ke.onselectstart=function(){return!1}}function L(){ke.onselectstart=function(){return!0}}function R(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(n[t]=e[t])}),n.height||(n.height=parseFloat(s(t,"height"))),n.width||(n.width=parseFloat(s(t,"width"))),n}}function x(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=ke.documentElement,r=ke.body,i=n.clientLeft||r.clientLeft||0,o=be.pageXOffset||r.scrollLeft,a=e.left+o-i,s=n.clientTop||r.clientTop||0,u=be.pageYOffset||r.scrollTop,l=e.top+u-s;return{left:Math.round(a),top:Math.round(l)}}function O(t,e){var n={},r=x(t),i=t.offsetWidth,o=t.offsetHeight,a=r.top,s=r.left,u=e.pageY,l=e.pageX;return e.changedTouches&&(l=e.changedTouches[0].pageX,u=e.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(a-u+o)/o)),n.x=Math.max(0,Math.min(1,(l-s)/i)),n}function I(t){return o(t)&&3===t.nodeType}function D(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function P(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),h(t)||I(t)?t:"string"==typeof t&&/\S/.test(t)?ke.createTextNode(t):void 0}).filter(function(t){return t})}function j(t,e){return P(e).forEach(function(e){return t.appendChild(e)}),t}function M(t,e){return j(D(t),e)}function U(t){return void 0===t.button&&void 0===t.buttons||0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons}function N(){return He++}function B(t){var e=t[qe];return e||(e=t[qe]=N()),ze[e]||(ze[e]={}),ze[e]}function F(t){var e=t[qe];return!!e&&!!Object.getOwnPropertyNames(ze[e]).length}function G(t){var e=t[qe];if(e){delete ze[e];try{delete t[qe]}catch(e){t.removeAttribute?t.removeAttribute(qe):t[qe]=null}}}function V(t,e){var n=B(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&G(t)}function H(t,e,n,r){n.forEach(function(n){t(e,n,r)})}function z(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||be.event;t={};for(var i in r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(t[i]=r[i]));if(t.target||(t.target=t.srcElement||ke),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var o=ke.documentElement,a=ke.body;t.pageX=t.clientX+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}function q(t,e,n){if(Array.isArray(e))return H(q,t,e,n);var r=B(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=N()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=z(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!e.isImmediatePropagationStopped();a++)try{o[a].call(t,e,n)}catch(t){xe.error(t)}}}),1===r.handlers[e].length)if(t.addEventListener){var i=!1;We&&Ke.indexOf(e)>-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function W(t,e,n){if(F(t)){var r=B(t);if(r.handlers){if(Array.isArray(e))return H(W,t,e,n);var i=function(t,e){r.handlers[e]=[],V(t,e)};if(void 0!==e){var o=r.handlers[e];if(o){if(!n)return void i(t,e);if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);V(t,e)}}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(t,s)}}}function K(t,e,n){var r=F(t)?B(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=z(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)K.call(null,i,e,n);else if(!i&&!e.defaultPrevented){var o=B(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function Y(t,e,n){if(Array.isArray(e))return H(Y,t,e,n);var r=function r(){W(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||N(),q(t,e,r)}function X(t,e){e&&($e=e),be.setTimeout(Je,t)}function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=v("span",{className:"vjs-event-bus"});return i(t,fn),t.on("dispose",function(){t.off(),be.setTimeout(function(){t.eventBusEl_=null},0)}),t}function J(t,e){return i(t,pn),t.state=i({},t.state,e),"function"==typeof t.handleStateChanged&&an(t)&&t.on("statechanged",t.handleStateChanged),t}function Q(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Z(t,e){return Q(t)===Q(e)}function tt(){for(var t={},e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.forEach(function(e){e&&n(e,function(e,n){if(!a(e))return void(t[n]=e);a(t[n])||(t[n]={}),t[n]=tt(t[n],e)})}),t}function et(t,e,n){if("number"!=typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function nt(t,e,n,r){return et(t,r,n.length-1),n[r][e]}function rt(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:nt.bind(null,"start",0,t),end:nt.bind(null,"end",1,t)}}function it(t,e){return Array.isArray(t)?rt(t):void 0===t||void 0===e?rt():rt([[t,e]])}function ot(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=it(0,0));for(var o=0;o<t.length;o++)r=t.start(o),i=t.end(o),i>e&&(i=e),n+=i-r;return n/e}function at(t){if(t instanceof at)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:o(t)&&("number"==typeof t.code&&(this.code=t.code),i(this,t)),this.message||(this.message=at.defaultMessages[this.code]||"")}function st(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(t){r=t}return[r,n]}function ut(t){return void 0!==t&&null!==t&&"function"==typeof t.then}function lt(t){ut(t)&&t.then(null,function(t){})}function ct(t){var e=mr.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}function dt(t,e,n){if(!Sr(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===wr.call(t)?ht(t,e,n):"string"==typeof t?ft(t,e,n):pt(t,e,n)}function ht(t,e,n){for(var r=0,i=t.length;r<i;r++)kr.call(t,r)&&e.call(n,t[r],r,t)}function ft(t,e,n){for(var r=0,i=t.length;r<i;r++)e.call(n,t.charAt(r),r,t)}function pt(t,e,n){for(var r in t)kr.call(t,r)&&e.call(n,t[r],r,t)}function vt(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)Dr.call(n,r)&&(t[r]=n[r])}return t}function mt(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function gt(t,e,n){var r=t;return Sr(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=Mr(e,{uri:t}),r.callback=n,r}function yt(t,e,n){return e=gt(t,e,n),_t(e)}function _t(t){function e(){4===s.readyState&&setTimeout(i,0)}function n(){var t=void 0;if(t=s.response?s.response:s.responseText||bt(s),m)try{t=JSON.parse(t)}catch(t){}return t}function r(t){return clearTimeout(c),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,a(t,g)}function i(){if(!l){var e;clearTimeout(c),e=t.useXDR&&void 0===s.status?200:1223===s.status?204:s.status;var r=g,i=null;return 0!==e?(r={body:n(),statusCode:e,method:h,headers:{},url:d,rawRequest:s},s.getAllResponseHeaders&&(r.headers=jr(s.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,r,r.body)}}if(void 0===t.callback)throw new Error("callback argument missing");var o=!1,a=function(e,n,r){o||(o=!0,t.callback(e,n,r))},s=t.xhr||null;s||(s=t.cors||t.useXDR?new yt.XDomainRequest:new yt.XMLHttpRequest);var u,l,c,d=s.url=t.uri||t.url,h=s.method=t.method||"GET",f=t.body||t.data,p=s.headers=t.headers||{},v=!!t.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:s};if("json"in t&&!1!==t.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),f=JSON.stringify(!0===t.json?f:t.json))),s.onreadystatechange=e,s.onload=i,s.onerror=r,s.onprogress=function(){},s.onabort=function(){l=!0},s.ontimeout=r,s.open(h,d,!v,t.username,t.password),v||(s.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(c=setTimeout(function(){if(!l){l=!0,s.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}},t.timeout)),s.setRequestHeader)for(u in p)p.hasOwnProperty(u)&&s.setRequestHeader(u,p[u]);else if(t.headers&&!mt(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(s.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(s),s.send(f||null),s}function bt(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}function Tt(){}function St(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function Et(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function wt(){this.values=Xr(null)}function kt(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length){var s=a[0],u=a[1];e(s,u)}}}function At(t,e,n){function r(){var e=Et(t);if(null===e)throw new St(St.Errors.BadTimeStamp,"Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function i(){t=t.replace(/^\s+/,"")}var o=t;if(i(),e.startTime=r(),i(),"--\x3e"!==t.substr(0,3))throw new St(St.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);t=t.substr(3),i(),e.endTime=r(),i(),function(t,e){var r=new wt;kt(t,function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),a=o[0];r.integer(t,a),r.percent(t,a)&&r.set("snapToLines",!1),r.alt(t,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical",""),e.line=r.get("line","auto"),e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align","middle"),e.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}(t,e)}function Ct(t,e){function n(t){return $r[t]}for(var r,i=t.document.createElement("div"),o=i,a=[];null!==(r=function(){if(!e)return null;var t=e.match(/^([^<]*)(<[^>]*>?)?/);return function(t){return e=e.substr(t.length),t}(t[1]?t[1]:t[2])}());)if("<"!==r[0])o.appendChild(t.document.createTextNode(function(t){for(;l=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(l[0],n);return t}(r)));else{if("/"===r[1]){a.length&&a[a.length-1]===r.substr(2).replace(">","")&&(a.pop(),o=o.parentNode);continue}var s,u=Et(r.substr(1,r.length-2));if(u){s=t.document.createProcessingInstruction("timestamp",u),o.appendChild(s);continue}var l=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!l)continue;if(!(s=function(e,n){var r=Jr[e];if(!r)return null;var i=t.document.createElement(r);i.localName=r;var o=Qr[e];return o&&n&&(i[o]=n.trim()),i}(l[1],l[3])))continue;if(!function(t,e){return!Zr[e.localName]||Zr[e.localName]===t.localName}(o,s))continue;l[2]&&(s.className=l[2].substr(1).replace("."," ")),a.push(l[1]),o.appendChild(s),o=s}return i}function Lt(t){for(var e=0;e<ti.length;e++){var n=ti[e];if(t>=n[0]&&t<=n[1])return!0}return!1}function Rt(t){function e(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function n(t){if(!t||!t.length)return null;var r=t.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):i}return"ruby"===r.tagName?n(t):r.childNodes?(e(t,r),n(t)):void 0}var r,i=[],o="";if(!t||!t.childNodes)return"ltr";for(e(i,t);o=n(i);)for(var a=0;a<o.length;a++)if(r=o.charCodeAt(a),Lt(r))return"rtl";return"ltr"}function xt(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;i<n.length&&n[i]!==e;i++)"showing"===n[i].mode&&r++;return-1*++r}function Ot(){}function It(t,e,n){Ot.call(this),this.cue=e,this.cueDiv=Ct(t,e.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=t.document.createElement("div"),r={direction:Rt(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(e.positionAlign){case"start":i=e.position;break;case"middle":i=e.position-e.size/2;break;case"end":i=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function Dt(t){var e,n,r,i;if(t.div){n=t.div.offsetHeight,r=t.div.offsetWidth,i=t.div.offsetTop;var o=(o=t.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();t=t.div.getBoundingClientRect(),e=o?Math.max(o[0]&&o[0].height||0,t.height/o.length):0}this.left=t.left,this.right=t.right,this.top=t.top||i,this.height=t.height||n,this.bottom=t.bottom||i+(t.height||n),this.width=t.width||r,this.lineHeight=void 0!==e?e:t.lineHeight}function Pt(t,e,n,r){var i=new Dt(e),o=e.cue,a=xt(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(a),d=n[u]+l,h=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),a<0&&(c+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(h,c)}else{var f=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":a-=f/2;break;case"end":a-=f}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new Dt(e)}var p=function(t,e){for(var i,o=new Dt(t),a=1,s=0;s<e.length;s++){for(;t.overlapsOppositeAxis(n,e[s])||t.within(n)&&t.overlapsAny(r);)t.move(e[s]);if(t.within(n))return t;var u=t.intersectPercentage(n);a>u&&(i=new Dt(t),a=u),t=new Dt(o)}return i||o}(i,s);e.move(p.toCSSCompatValues(n))}function jt(){}function Mt(t){return"string"==typeof t&&!!ii[t.toLowerCase()]&&t.toLowerCase()}function Ut(t){return"string"==typeof t&&!!oi[t.toLowerCase()]&&t.toLowerCase()}function Nt(t,e,n){this.hasBeenReset=!1;var r="",i=!1,o=t,a=e,s=n,u=null,l="",c=!0,d="auto",h="start",f=50,p="middle",v=50,m="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(t){r=""+t}},pauseOnExit:{enumerable:!0,get:function(){return i},set:function(t){i=!!t}},startTime:{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");o=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");a=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return s},set:function(t){s=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(t){u=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(t){var e=Mt(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");l=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(t){c=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(t){if("number"!=typeof t&&t!==ri)throw new SyntaxError("An invalid number or illegal string was specified.");d=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(t){var e=Ut(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");h=e,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return f},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");f=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(t){var e=Ut(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return v},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");v=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return m},set:function(t){var e=Ut(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");m=e,this.hasBeenReset=!0}}}),this.displayState=void 0}function Bt(t){return"string"==typeof t&&!!ui[t.toLowerCase()]&&t.toLowerCase()}function Ft(t){return"number"==typeof t&&t>=0&&t<=100}function Gt(){var t=100,e=3,n=0,r=100,i=0,o=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!Ft(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(t){if(!Ft(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!Ft(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!Ft(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!Ft(t))throw new Error("ViewportAnchorX must be between 0 and 100.");i=t}},scroll:{enumerable:!0,get:function(){return a},set:function(t){var e=Bt(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");a=e}}})}function Vt(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var a=new Yr.text.TrackClass(i);return o.addTrack(a),a}function Ht(t,e){mi[t]=mi[t]||[],mi[t].push(e)}function zt(t,e,n){t.setTimeout(function(){return Zt(e,mi[e.type],n,t)},1)}function qt(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}function Wt(t,e,n){return t.reduceRight(Xt(n),e[n]())}function Kt(t,e,n,r){return e[n](t.reduce(Xt(n),r))}function Yt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="call"+Q(n),o=t.reduce(Xt(i),r),a=o===yi,s=a?null:e[n](o);return $t(t,n,s,a),s}function Xt(t){return function(e,n){return e===yi?yi:n[t]?n[t](e):e}}function $t(t,e,n,r){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](r,n)}}function Jt(t){gi[t.id()]=null}function Qt(t,e){var n=gi[t.id()],r=null;if(void 0===n||null===n)return r=e(t),gi[t.id()]=[[e,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===e&&(r=s)}return null===r&&(r=e(t),n.push([e,r])),r}function Zt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=e[0],u=e.slice(1);if("string"==typeof s)Zt(t,mi[s],n,r,o,a);else if(s){var l=Qt(r,s);if(!l.setSource)return o.push(l),Zt(t,u,n,r,o,a);l.setSource(i({},t),function(e,i){if(e)return Zt(t,u,n,r,o,a);o.push(l),Zt(i,t.type===i.type?u:mi[i.type],n,r,o,a)})}else u.length?Zt(t,u,n,r,o,a):a?n(t,o):Zt(t,mi["*"],n,r,o,!0)}function te(t){var e=Ei(t.src);return!t.type&&e&&(t.type=e),t}function ee(t,e){var n=void 0;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function ne(t,e,n){try{t.style[e]=n}catch(t){return}}function re(t){Ui=t}function ie(){Ui=Mi}function oe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return Ui(t,e)}function ae(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function se(t,e){return ae(t.options[t.options.selectedIndex].value,e)}function ue(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(ae(t.options[r].value,n)===e){t.selectedIndex=r;break}}function le(t,e,n){var r=le.getPlayer(t);if(r)return e&&xe.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof t?Fe("#"+ga(t)):t;if(!h(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");ke.body.contains(i)||xe.warn("The element supplied is not included in the DOM"),e=e||{},le.hooks("beforesetup").forEach(function(t){var n=t(i,tt(e));if(!o(n)||Array.isArray(n))return void xe.error("please return an object in beforesetup hooks");e=tt(e,n)});var a=vn.getComponent("Player");return r=new a(i,e,n),le.hooks("setup").forEach(function(t){return t(r)}),r}function ce(t){for(var e=be.atob(t),n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}function de(t){return t.subarray(0,t.byteLength-t[t.byteLength-1])}function he(t,e){return function(n){var r=this;if(!e)return new up(t);if(up&&!n){var i=e.toString().replace(/^function.+?{/,"").slice(0,-1),o=fe(i);return this[ip]=new up(o),pe(this[ip],o),this[ip]}var a={postMessage:function(t){r.onmessage&&setTimeout(function(){r.onmessage({data:t,target:a})})}};e.call(a),this.postMessage=function(t){setTimeout(function(){a.onmessage({data:t,target:r})})},this.isThisThread=!0}}function fe(t){try{return sp.createObjectURL(new Blob([t],{type:op}))}catch(n){var e=new ap;return e.append(t),sp.createObjectURL(e.getBlob(type))}}function pe(t,e){if(t&&e){var n=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&sp.revokeObjectURL(t.objURL),n.call(t)}}}function ve(){}var me,ge="7.2.4",ye="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};me="undefined"!=typeof window?window:void 0!==ye?ye:"undefined"!=typeof self?self:{};var _e,be=me,Te={},Se=Object.freeze({default:Te}),Ee=Se&&Te||Se,we=void 0!==ye?ye:"undefined"!=typeof window?window:{};"undefined"!=typeof document?_e=document:(_e=we["__GLOBAL_DOCUMENT_CACHE@4"])||(_e=we["__GLOBAL_DOCUMENT_CACHE@4"]=Ee);var ke=_e,Ae=void 0,Ce="info",Le=[],Re=function(t,e){var n=Ae.levels[Ce],r=new RegExp("^("+n+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),Le&&Le.push([].concat(e)),e.unshift("VIDEOJS:"),be.console){var i=be.console[t];i||"debug"!==t||(i=be.console.info||be.console.log),i&&n&&r.test(t)&&i[Array.isArray(e)?"apply":"call"](be.console,e)}};Ae=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];Re("log",e)},Ae.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:Ce},Ae.level=function(t){if("string"==typeof t){if(!Ae.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');Ce=t}return Ce},Ae.history=function(){return Le?[].concat(Le):[]},Ae.history.clear=function(){Le&&(Le.length=0)},Ae.history.disable=function(){null!==Le&&(Le.length=0,Le=null)},Ae.history.enable=function(){null===Le&&(Le=[])},Ae.error=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return Re("error",e)},Ae.warn=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return Re("warn",e)},Ae.debug=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return Re("debug",e)};var xe=Ae,Oe=function(t){for(var n="",r=0;r<arguments.length;r++)n+=e(t[r])+(arguments[r+1]||"");return n},Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Pe=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},je=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Me=function(t,e){return t.raw=e,t},Ue=Object.prototype.toString,Ne=function(t){return o(t)?Object.keys(t):[]},Be=Me(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),Fe=p("querySelector"),Ge=p("querySelectorAll"),Ve=Object.freeze({isReal:d,isEl:h,isInFrame:f,createEl:v,textContent:m,prependTo:g,hasClass:y,addClass:_,removeClass:b,toggleClass:T,setAttributes:S,getAttributes:E,getAttribute:w,setAttribute:k,removeAttribute:A,blockTextSelection:C,unblockTextSelection:L,getBoundingClientRect:R,findPosition:x,getPointerPosition:O,isTextNode:I,emptyEl:D,normalizeContent:P,appendContent:j,insertContent:M,isSingleLeftClick:U,$:Fe,$$:Ge}),He=1,ze={},qe="vdata"+(new Date).getTime(),We=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){We=!0}});be.addEventListener("test",null,t),be.removeEventListener("test",null,t)}catch(t){}}();var Ke=["touchstart","touchmove"],Ye=Object.freeze({fixEvent:z,on:q,off:W,trigger:K,one:Y}),Xe=!1,$e=void 0,Je=function(){if(d()&&!1!==$e.options.autoSetup){var t=Array.prototype.slice.call(ke.getElementsByTagName("video")),e=Array.prototype.slice.call(ke.getElementsByTagName("audio")),n=Array.prototype.slice.call(ke.getElementsByTagName("video-js")),r=t.concat(e,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var a=r[i];if(!a||!a.getAttribute){X(1);break}if(void 0===a.player){var s=a.getAttribute("data-setup");null!==s&&$e(a)}}else Xe||X(1)}};d()&&"complete"===ke.readyState?Xe=!0:Y(be,"load",function(){Xe=!0});var Qe=function(t){var e=ke.createElement("style");return e.className=t,e},Ze=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},tn=function(t,e,n){e.guid||(e.guid=N());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},en=function(t,e){var n=Date.now();return function(){var r=Date.now();r-n>=e&&(t.apply(void 0,arguments),n=r)}},nn=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:be,i=void 0,o=function(){r.clearTimeout(i),i=null},a=function(){var o=this,a=arguments,s=function(){i=null,s=null,n||t.apply(o,a)};!i&&n&&t.apply(o,a),r.clearTimeout(i),i=r.setTimeout(s,e)};return a.cancel=o,a},rn=function(){};rn.prototype.allowedEvents_={},rn.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},q(this,t,e),this.addEventListener=n},rn.prototype.addEventListener=rn.prototype.on,rn.prototype.off=function(t,e){W(this,t,e)},rn.prototype.removeEventListener=rn.prototype.off,rn.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Y(this,t,e),this.addEventListener=n},rn.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=z(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),K(this,t)},rn.prototype.dispatchEvent=rn.prototype.trigger;var on=void 0;rn.prototype.queueTrigger=function(t){var e=this;on||(on=new Map);var n=t.type||t,r=on.get(this);r||(r=new Map,on.set(this,r));var i=r.get(n);r.delete(n),be.clearTimeout(i);var o=be.setTimeout(function(){0===r.size&&(r=null,on.delete(e)),e.trigger(t)},0);r.set(n,o)};var an=function(t){return t instanceof rn||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},sn=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},un=function(t){if(!t.nodeName&&!an(t))throw new Error("Invalid target; must be a DOM node or evented object.")},ln=function(t){if(!sn(t))throw new Error("Invalid event type; must be a non-empty string or array.")},cn=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},dn=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),un(r),ln(i),cn(o),o=tn(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},hn=function(t,e,n,r){un(t),t.nodeName?Ye[e](t,n,r):t[e](n,r)},fn={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=dn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(hn(a,"on",s,u),!o){var l=function(){return t.off(a,s,u)};l.guid=u.guid;var c=function(){return t.off("dispose",l)};c.guid=u.guid,hn(this,"on","dispose",l),hn(a,"on","dispose",c)}},one:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=dn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)hn(a,"one",s,u);else{var l=function e(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t.off(a,s,e),u.apply(null,r)};l.guid=u.guid,hn(a,"one",s,l)}},off:function(t,e,n){if(!t||sn(t))W(this.eventBusEl_,t,e);else{var r=t,i=e;un(r),ln(i),cn(n),n=tn(this,n),this.off("dispose",n),r.nodeName?(W(r,i,n),W(r,"dispose",n)):an(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return K(this.eventBusEl_,t,e)}},pn={state:{},setState:function(t){var e=this;"function"==typeof t&&(t=t());var r=void 0;return n(t,function(t,n){e.state[n]!==t&&(r=r||{},r[n]={from:e.state[n],to:t}),e.state[n]=t}),r&&an(this)&&this.trigger({changes:r,type:"statechanged"}),r}},vn=function(){function t(e,n,r){if(De(this,t),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=tt({},this.options_),n=this.options_=tt(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+N()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),!1!==n.evented&&$(this,{eventBusKey:this.el_?"el_":null}),J(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),G(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return xe.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=tt(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return v(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[t]?u=o[t]:s&&s[t]&&(u=s[t]),e&&(u=u.replace(/\{(\d+)\}/g,function(t,n){var r=e[n-1],i=r;return void 0===r&&(i=t),i})),u},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=Q(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"==typeof e){o=Q(e);var a=n.componentClass||o;n.name=o;var s=t.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&Q(i.name()),o&&(this.childNameIndex_[o]=i),"function"==typeof i.el&&i.el()){var u=this.contentEl().children,l=u[r]||null;this.contentEl().insertBefore(i.el(),l)}return i},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,a=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter(function(t){return!o.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var r=void 0,i=void 0;return"string"==typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}}).filter(function(e){var n=t.getComponent(e.opts.componentClass||Q(e.name));return n&&!a.isTech(n)}).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},t.prototype.$=function(t,e){return Fe(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Ge(t,e||this.contentEl())},t.prototype.hasClass=function(t){return y(this.el_,t)},t.prototype.addClass=function(t){_(this.el_,t)},t.prototype.removeClass=function(t){b(this.el_,t)},t.prototype.toggleClass=function(t,e){T(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return w(this.el_,t)},t.prototype.setAttribute=function(t,e){k(this.el_,t,e)},t.prototype.removeAttribute=function(t){A(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+Q(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof be.getComputedStyle){var n=be.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var r="offset"+Q(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=void 0;this.on("touchstart",function(r){1===r.touches.length&&(e={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=(new Date).getTime(),n=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)n=!1;else if(e){var r=t.touches[0].pageX-e.pageX,i=t.touches[0].pageY-e.pageY,o=Math.sqrt(r*r+i*i);o>10&&(n=!1)}});var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){e=null,!0===n&&(new Date).getTime()-t<200&&(r.preventDefault(),this.trigger("tap"))})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=tn(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.prototype.setTimeout=function(t,e){var n,r,i=this;return t=tn(this,t),n=be.setTimeout(function(){i.off("dispose",r),t()},e),r=function(){return i.clearTimeout(n)},r.guid="vjs-timeout-"+n,this.on("dispose",r),n},t.prototype.clearTimeout=function(t){be.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var n=this;t=tn(this,t);var r=be.setInterval(t,e),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},t.prototype.clearInterval=function(t){be.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e,n,r=this;return this.supportsRaf_?(t=tn(this,t),e=be.requestAnimationFrame(function(){r.off("dispose",n),t()}),n=function(){return r.cancelAnimationFrame(e)},n.guid="vjs-raf-"+e,this.on("dispose",n),e):this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){be.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r=t.getComponent("Tech"),i=r&&r.isTech(n),o=t===n||t.prototype.isPrototypeOf(n.prototype);if(i||!o){var a=void 0;throw a=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+a+".")}e=Q(e),t.components_||(t.components_={});var s=t.getComponent("Player");if("Player"===e&&s&&s.players){var u=s.players,l=Object.keys(u);if(u&&l.length>0&&l.map(function(t){return u[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=Q(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();vn.prototype.supportsRaf_="function"==typeof be.requestAnimationFrame&&"function"==typeof be.cancelAnimationFrame,vn.registerComponent("Component",vn);for(var mn=be.navigator&&be.navigator.userAgent||"",gn=/AppleWebKit\/([\d.]+)/i.exec(mn),yn=gn?parseFloat(gn.pop()):null,_n=/iPad/i.test(mn),bn=/iPhone/i.test(mn)&&!_n,Tn=/iPod/i.test(mn),Sn=bn||_n||Tn,En=function(){var t=mn.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),wn=/Android/i.test(mn),kn=function(){var t=mn.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),An=wn&&kn<5&&yn<537,Cn=/Firefox/i.test(mn),Ln=/Edge/i.test(mn),Rn=!Ln&&(/Chrome/i.test(mn)||/CriOS/i.test(mn)),xn=function(){var t=mn.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),On=function(){var t=/MSIE\s(\d+)\.\d/.exec(mn),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(mn)&&/rv:11.0/.test(mn)&&(e=11),e}(),In=/Safari/i.test(mn)&&!Rn&&!wn&&!Ln,Dn=(In||Sn)&&!Rn,Pn=(d()&&("ontouchstart"in be||be.navigator.maxTouchPoints||be.DocumentTouch&&be.document instanceof be.DocumentTouch)),jn=Object.freeze({IS_IPAD:_n,IS_IPHONE:bn,IS_IPOD:Tn,IS_IOS:Sn,IOS_VERSION:En,IS_ANDROID:wn,ANDROID_VERSION:kn,IS_NATIVE_ANDROID:An,IS_FIREFOX:Cn,IS_EDGE:Ln,IS_CHROME:Rn,CHROME_VERSION:xn,IE_VERSION:On,IS_SAFARI:In,IS_ANY_SAFARI:Dn,TOUCH_ENABLED:Pn}),Mn={},Un=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Nn=Un[0],Bn=void 0,Fn=0;Fn<Un.length;Fn++)if(Un[Fn][1]in ke){Bn=Un[Fn];break}if(Bn)for(var Gn=0;Gn<Bn.length;Gn++)Mn[Nn[Gn]]=Bn[Gn];at.prototype.code=0,at.prototype.message="",at.prototype.status=null,at.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],at.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Vn=0;Vn<at.errorTypes.length;Vn++)at[at.errorTypes[Vn]]=Vn,at.prototype[at.errorTypes[Vn]]=Vn;var Hn=st,zn=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,n,r){return t[n]&&(e[n]=t[n]),e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},qn=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=zn(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===n.indexOf(t)}).map(zn))},Wn=function(t,e){return t.forEach(function(t){var n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return n.addCue(t)})}),e.textTracks()},Kn={textTracksToJson:qn,jsonToTextTracks:Wn,trackToJson_:zn},Yn="vjs-modal-dialog",Xn=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=v("div",{className:Yn+"-content"},{role:"document"}),i.descEl_=v("p",{className:Yn+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),m(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return Pe(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return Yn+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeabl