diff --git a/package.json b/package.json index 8c52260..e76f523 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "amfe-flexible": "^2.2.1", "axios": "^1.1.3", "core-js": "^2.6.5", + "easy-player": "^2.2.7", "echarts": "^5.4.0", "echarts-gl": "^2.0.5", "element-ui": "^2.15.6", diff --git a/public/video/EasyPlayer-element.min.js b/public/video/EasyPlayer-element.min.js new file mode 100644 index 0000000..465281e --- /dev/null +++ b/public/video/EasyPlayer-element.min.js @@ -0,0 +1,40 @@ +!function(t,A){"object"==typeof exports&&"undefined"!=typeof module?module.exports=A():"function"==typeof define&&define.amd?define(A):t.videojs=A()}(this,function(){function t(t,A){return t(A={exports:{}},A.exports),A.exports}function A(t){return t.replace(/\n\r?\s*/g,"")}function e(t,A){eA(t).forEach(function(e){return A(t[e],e)})}function i(t){for(var A=arguments.length,i=Array(A>1?A-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:"div",A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],n=Gt.createElement(t);return Object.getOwnPropertyNames(A).forEach(function(t){var e=A[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Vt.warn(qt(iA,t,e)),n.setAttribute(t,e)):"textContent"===t?E(n,e):n[t]=e}),Object.getOwnPropertyNames(e).forEach(function(t){n.setAttribute(t,e[t])}),i&&Y(n,i),n}function E(t,A){return void 0===t.textContent?t.innerText=A:t.textContent=A,t}function h(t,A){A.firstChild?A.insertBefore(t,A.firstChild):A.appendChild(t)}function l(t,A){return s(A),t.classList?t.classList.contains(A):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(A).test(t.className)}function d(t,A){return t.classList?t.classList.add(A):l(t,A)||(t.className=(t.className+" "+A).trim()),t}function C(t,A){return t.classList?t.classList.remove(A):(s(A),t.className=t.className.split(/\s+/).filter(function(t){return t!==A}).join(" ")),t}function T(t,A,e){var i=l(t,A);if("function"==typeof e&&(e=e(t,A)),"boolean"!=typeof e&&(e=!i),e!==i)return e?d(t,A):C(t,A),t}function N(t,A){Object.getOwnPropertyNames(A).forEach(function(e){var i=A[e];null===i||void 0===i||!1===i?t.removeAttribute(e):t.setAttribute(e,!0===i?"":i)})}function D(t){var A={};if(t&&t.attributes&&t.attributes.length>0)for(var e=t.attributes,i=e.length-1;i>=0;i--){var n=e[i].name,r=e[i].value;"boolean"!=typeof t[n]&&-1===",autoplay,stretch,fluent,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),A[n]=r}return A}function y(t,A){return t.getAttribute(A)}function B(t,A,e){t.setAttribute(A,e)}function f(t,A){t.removeAttribute(A)}function Q(){Gt.body.focus(),Gt.onselectstart=function(){return!1}}function w(){Gt.onselectstart=function(){return!0}}function m(t){if(t&&t.getBoundingClientRect&&t.parentNode){var A=t.getBoundingClientRect(),e={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==A[t]&&(e[t]=A[t])}),e.height||(e.height=parseFloat(o(t,"height"))),e.width||(e.width=parseFloat(o(t,"width"))),e}}function p(t){var A=void 0;if(t.getBoundingClientRect&&t.parentNode&&(A=t.getBoundingClientRect()),!A)return{left:0,top:0};var e=Gt.documentElement,i=Gt.body,n=e.clientLeft||i.clientLeft||0,r=zt.pageXOffset||i.scrollLeft,o=A.left+r-n,a=e.clientTop||i.clientTop||0,s=zt.pageYOffset||i.scrollTop,g=A.top+s-a;return{left:Math.round(o),top:Math.round(g)}}function S(t,A){var e={},i=p(t),n=t.offsetWidth,r=t.offsetHeight,o=i.top,a=i.left,s=A.pageY,g=A.pageX;return A.changedTouches&&(g=A.changedTouches[0].pageX,s=A.changedTouches[0].pageY),e.y=Math.max(0,Math.min(1,(o-s+r)/r)),e.x=Math.max(0,Math.min(1,(g-a)/n)),e}function L(t){return n(t)&&3===t.nodeType}function j(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function x(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),M(t)||L(t)?t:"string"==typeof t&&/\S/.test(t)?Gt.createTextNode(t):void 0}).filter(function(t){return t})}function Y(t,A){return x(A).forEach(function(A){return t.appendChild(A)}),t}function U(t,A){return Y(j(t),A)}function O(t){return void 0===t.button&&void 0===t.buttons||0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons}function v(){return aA++}function k(t){var A=t[gA];return A||(A=t[gA]=v()),sA[A]||(sA[A]={}),sA[A]}function z(t){var A=t[gA];return!!A&&!!Object.getOwnPropertyNames(sA[A]).length}function F(t){var A=t[gA];if(A){delete sA[A];try{delete t[gA]}catch(A){t.removeAttribute?t.removeAttribute(gA):t[gA]=null}}}function b(t,A){var e=k(t);0===e.handlers[A].length&&(delete e.handlers[A],t.removeEventListener?t.removeEventListener(A,e.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+A,e.dispatcher)),Object.getOwnPropertyNames(e.handlers).length<=0&&(delete e.handlers,delete e.dispatcher,delete e.disabled),0===Object.getOwnPropertyNames(e).length&&F(t)}function R(t,A,e,i){e.forEach(function(e){t(A,e,i)})}function J(t){function A(){return!0}function e(){return!1}if(!t||!t.isPropagationStopped){var i=t||zt.event;for(var n in t={},i)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&("returnValue"===n&&i.preventDefault||(t[n]=i[n]));if(t.target||(t.target=t.srcElement||Gt),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){i.preventDefault&&i.preventDefault(),t.returnValue=!1,i.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){i.stopPropagation&&i.stopPropagation(),t.cancelBubble=!0,i.cancelBubble=!0,t.isPropagationStopped=A},t.isPropagationStopped=e,t.stopImmediatePropagation=function(){i.stopImmediatePropagation&&i.stopImmediatePropagation(),t.isImmediatePropagationStopped=A,t.stopPropagation()},t.isImmediatePropagationStopped=e,null!==t.clientX&&void 0!==t.clientX){var r=Gt.documentElement,o=Gt.body;t.pageX=t.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.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 G(t,A,e){if(Array.isArray(A))return R(G,t,A,e);var i=k(t);if(i.handlers||(i.handlers={}),i.handlers[A]||(i.handlers[A]=[]),e.guid||(e.guid=v()),i.handlers[A].push(e),i.dispatcher||(i.disabled=!1,i.dispatcher=function(A,e){if(!i.disabled){A=J(A);var n=i.handlers[A.type];if(n)for(var r=n.slice(0),o=0,a=r.length;o-1&&(n={passive:!0}),t.addEventListener(A,i.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+A,i.dispatcher)}function K(t,A,e){if(z(t)){var i=k(t);if(i.handlers){if(Array.isArray(A))return R(K,t,A,e);var n=function(t,A){i.handlers[A]=[],b(t,A)};if(void 0!==A){var r=i.handlers[A];if(r){if(!e)return void n(t,A);if(e.guid)for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{}).eventBusKey;if(A){if(!t[A].nodeName)throw new Error('The eventBusKey "'+A+'" does not refer to an element.');t.eventBusEl_=t[A]}else t.eventBusEl_=u("span",{className:"vjs-event-bus"});return i(t,LA),t.on("dispose",function(){t.off(),zt.setTimeout(function(){t.eventBusEl_=null},0)}),t}function q(t,A){return i(t,jA),t.state=i({},t.state,A),"function"==typeof t.handleStateChanged&&BA(t)&&t.on("statechanged",t.handleStateChanged),t}function X(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Z(){for(var t={},A=arguments.length,i=Array(A),n=0;ne)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+A+") is non-numeric or out of bounds (0-"+e+").")}(t,i,e.length-1),e[i][A]}function $(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:_.bind(null,"start",0,t),end:_.bind(null,"end",1,t)}}function tt(t,A){return Array.isArray(t)?$(t):void 0===t||void 0===A?$():$([[t,A]])}function At(t,A){var e=0,i=void 0,n=void 0;if(!A)return 0;t&&t.length||(t=tt(0,0));for(var r=0;rA&&(n=A),e+=n-i;return e/A}function et(t){if(t instanceof et)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:n(t)&&("number"==typeof t.code&&(this.code=t.code),i(this,t)),this.message||(this.message=et.defaultMessages[this.code]||"")}function it(t){return void 0!==t&&null!==t&&"function"==typeof t.then}function nt(t){it(t)&&t.then(null,function(t){})}function rt(t,A,e){var i=t;return ze(A)?(e=A,"string"==typeof t&&(i={uri:t})):i=Ze(A,{uri:t}),i.callback=e,i}function ot(t,A,e){return at(A=rt(t,A,e))}function at(t){function A(t){return clearTimeout(s),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,n(t,h)}function e(){if(!a){var A;clearTimeout(s),A=t.useXDR&&void 0===r.status?200:1223===r.status?204:r.status;var e=h,i=null;return 0!==A?(e={body:function(){var t=void 0;if(t=r.response?r.response:r.responseText||function(t){if("document"===t.responseType)return t.responseXML;var A=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||A?null:t.responseXML}(r),E)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:A,method:M,headers:{},url:g,rawRequest:r},r.getAllResponseHeaders&&(e.headers=Xe(r.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),n(i,e,e.body)}}if(void 0===t.callback)throw new Error("callback argument missing");var i=!1,n=function(A,e,n){i||(i=!0,t.callback(A,e,n))},r=t.xhr||null;r||(r=t.cors||t.useXDR?new ot.XDomainRequest:new ot.XMLHttpRequest);var o,a,s,g=r.url=t.uri||t.url,M=r.method=t.method||"GET",I=t.body||t.data,c=r.headers=t.headers||{},u=!!t.sync,E=!1,h={body:void 0,headers:{},statusCode:0,method:M,url:g,rawRequest:r};if("json"in t&&!1!==t.json&&(E=!0,c.accept||c.Accept||(c.Accept="application/json"),"GET"!==M&&"HEAD"!==M&&(c["content-type"]||c["Content-Type"]||(c["Content-Type"]="application/json"),I=JSON.stringify(!0===t.json?I:t.json))),r.onreadystatechange=function(){4===r.readyState&&setTimeout(e,0)},r.onload=e,r.onerror=A,r.onprogress=function(){},r.onabort=function(){a=!0},r.ontimeout=A,r.open(M,g,!u,t.username,t.password),u||(r.withCredentials=!!t.withCredentials),!u&&t.timeout>0&&(s=setTimeout(function(){if(!a){a=!0,r.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",A(t)}},t.timeout)),r.setRequestHeader)for(o in c)c.hasOwnProperty(o)&&r.setRequestHeader(o,c[o]);else t.headers&&function(t){for(var A in t)if(t.hasOwnProperty(A))return!1}(t.headers);return"responseType"in t&&(r.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(r),r.send(I||null),r}function st(t,A){this.name="ParsingError",this.code=t.code,this.message=A||t.message}function gt(t){function A(t,A,e,i){return 3600*(0|t)+60*(0|A)+(0|e)+(0|i)/1e3}var e=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return e?e[3]?A(e[1],e[2],e[3].replace(":",""),e[4]):e[1]>59?A(e[1],e[2],0,e[4]):A(0,e[1],e[2],e[4]):null}function Mt(){this.values=Mi(null)}function It(t,A,e,i){var n=i?t.split(i):[t];for(var r in n)if("string"==typeof n[r]){var o=n[r].split(e);if(2===o.length)A(o[0],o[1])}}function ct(t,A,e){function i(){var A=gt(t);if(null===A)throw new st(st.Errors.BadTimeStamp,"Malformed timestamp: "+r);return t=t.replace(/^[^\sa-zA-Z-]+/,""),A}function n(){t=t.replace(/^\s+/,"")}var r=t;if(n(),A.startTime=i(),n(),"--\x3e"!==t.substr(0,3))throw new st(st.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);t=t.substr(3),n(),A.endTime=i(),n(),function(t,A){var i=new Mt;It(t,function(t,A){switch(t){case"region":for(var n=e.length-1;n>=0;n--)if(e[n].id===A){i.set(t,e[n].region);break}break;case"vertical":i.alt(t,A,["rl","lr"]);break;case"line":var r=A.split(","),o=r[0];i.integer(t,o),i.percent(t,o)&&i.set("snapToLines",!1),i.alt(t,o,["auto"]),2===r.length&&i.alt("lineAlign",r[1],["start","middle","end"]);break;case"position":r=A.split(","),i.percent(t,r[0]),2===r.length&&i.alt("positionAlign",r[1],["start","middle","end"]);break;case"size":i.percent(t,A);break;case"align":i.alt(t,A,["start","middle","end","left","right"])}},/:/,/\s/),A.region=i.get("region",null),A.vertical=i.get("vertical",""),A.line=i.get("line","auto"),A.lineAlign=i.get("lineAlign","start"),A.snapToLines=i.get("snapToLines",!0),A.size=i.get("size",100),A.align=i.get("align","middle"),A.position=i.get("position",{start:0,left:0,middle:50,end:100,right:100},A.align),A.positionAlign=i.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},A.align)}(t,A)}function ut(t,A){function e(t){return Ii[t]}for(var i,n=t.document.createElement("div"),r=n,o=[];null!==(i=function(){if(!A)return null;var t=A.match(/^([^<]*)(<[^>]*>?)?/);return function(t){return A=A.substr(t.length),t}(t[1]?t[1]:t[2])}());)if("<"!==i[0])r.appendChild(t.document.createTextNode(function(t){for(;g=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(g[0],e);return t}(i)));else{if("/"===i[1]){o.length&&o[o.length-1]===i.substr(2).replace(">","")&&(o.pop(),r=r.parentNode);continue}var a,s=gt(i.substr(1,i.length-2));if(s){a=t.document.createProcessingInstruction("timestamp",s),r.appendChild(a);continue}var g=i.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!g)continue;if(!(a=function(A,e){var i=ci[A];if(!i)return null;var n=t.document.createElement(i);n.localName=i;var r=ui[A];return r&&e&&(n[r]=e.trim()),n}(g[1],g[3])))continue;if(!function(t,A){return!Ei[A.localName]||Ei[A.localName]===t.localName}(r,a))continue;g[2]&&(a.className=g[2].substr(1).replace("."," ")),o.push(g[1]),r.appendChild(a),r=a}return n}function Et(t){for(var A=0;A=e[0]&&t<=e[1])return!0}return!1}function ht(){}function lt(t,A,e){ht.call(this),this.cue=A,this.cueDiv=ut(t,A.text);var i={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:""===A.vertical?"horizontal-tb":"lr"===A.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(i,this.cueDiv),this.div=t.document.createElement("div"),i={direction:function(t){function A(t,A){for(var e=A.childNodes.length-1;e>=0;e--)t.push(A.childNodes[e])}function e(t){if(!t||!t.length)return null;var i=t.pop(),n=i.textContent||i.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?(t.length=0,r[0]):n}return"ruby"===i.tagName?e(t):i.childNodes?(A(t,i),e(t)):void 0}var i=[],n="";if(!t||!t.childNodes)return"ltr";for(A(i,t);n=e(i);)for(var r=0;r=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var A=t.track,e=A.textTrackList,i=0,n=0;nI&&(M=M<0?-1:1,M*=Math.ceil(I/g)*g),o<0&&(M+=""===r.vertical?e.height:e.width,a=a.reverse()),n.move(c,M)}else{var u=n.lineHeight/e.height*100;switch(r.lineAlign){case"middle":o-=u/2;break;case"end":o-=u}switch(r.vertical){case"":A.applyStyles({top:A.formatStyle(o,"%")});break;case"rl":A.applyStyles({left:A.formatStyle(o,"%")});break;case"lr":A.applyStyles({right:A.formatStyle(o,"%")})}a=["+y","-x","+x","-y"],n=new dt(A)}var E=function(t,A){for(var n,r=new dt(t),o=1,a=0;as&&(n=new dt(t),o=s),t=new dt(r)}return n||r}(n,a);A.move(E.toCSSCompatValues(e))}function Tt(){}function Nt(t){return"string"==typeof t&&!!Ni[t.toLowerCase()]&&t.toLowerCase()}function Dt(t,A,e){this.hasBeenReset=!1;var i="",n=!1,r=t,o=A,a=e,s=null,g="",M=!0,I="auto",c="start",u=50,E="middle",h=50,l="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return i},set:function(t){i=""+t}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(t){n=!!t}},startTime:{enumerable:!0,get:function(){return r},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");r=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");o=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return a},set:function(t){a=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return s},set:function(t){s=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return g},set:function(t){var A=function(t){return"string"==typeof t&&!!Ti[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===A)throw new SyntaxError("An invalid or illegal string was specified.");g=A,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return M},set:function(t){M=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return I},set:function(t){if("number"!=typeof t&&t!==Ci)throw new SyntaxError("An invalid number or illegal string was specified.");I=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return c},set:function(t){var A=Nt(t);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");c=A,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return u},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");u=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return E},set:function(t){var A=Nt(t);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");E=A,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return h},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");h=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return l},set:function(t){var A=Nt(t);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");l=A,this.hasBeenReset=!0}}}),this.displayState=void 0}function yt(t){return"number"==typeof t&&t>=0&&t<=100}function Bt(t,A,e){t.setTimeout(function(){return function t(){var A=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],g=e.slice(1);if("string"==typeof s)t(A,ji[s],n,r,o,a);else if(s){var M=function(t,A){var e=xi[t.id()],i=null;if(void 0===e||null===e)return i=A(t),xi[t.id()]=[[A,i]],i;for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:null,n="call"+X(e),r=t.reduce(Qt(n),i),o=r===Yi,a=o?null:A[e](r);return function(t,A,e,i){for(var n=t.length-1;n>=0;n--){var r=t[n];r[A]&&r[A](i,e)}}(t,e,a,o),a}function Qt(t){return function(A,e){return A===Yi?Yi:e[t]?e[t](A):A}}function wt(t){var A=zi(t.src);return!t.type&&A&&(t.type=A),t}function mt(t,A){var e=void 0;if(4===t.length)e=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.");e=t.slice(1)}return"rgba("+parseInt(e.slice(0,2),16)+","+parseInt(e.slice(2,4),16)+","+parseInt(e.slice(4,6),16)+","+A+")"}function pt(t,A,e){try{t.style[A]=e}catch(t){return}}function St(t){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return Xi(t,A)}function Lt(t,A){if(A&&(t=A(t)),t&&"none"!==t)return t}function jt(t,A,e){var i=jt.getPlayer(t);if(i)return A&&Vt.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&i.ready(e),i;var r="string"==typeof t?nA("#"+Qr(t)):t;if(!M(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");Gt.body.contains(r)||Vt.warn("The element supplied is not included in the DOM"),A=A||{},jt.hooks("beforesetup").forEach(function(t){var e=t(r,Z(A));n(e)&&!Array.isArray(e)?A=Z(A,e):Vt.error("please return an object in beforesetup hooks")});var o=xA.getComponent("Player");return i=new o(r,A,e),jt.hooks("setup").forEach(function(t){return t(i)}),i}function xt(t,A){return function(e){var i=this;if(!A)return new qI(t);if(qI&&!e){var n=Yt(A.toString().replace(/^function.+?{/,"").slice(0,-1));return this[HI]=new qI(n),function(t,A){if(t&&A){var e=t.terminate;t.objURL=A,t.terminate=function(){t.objURL&&VI.revokeObjectURL(t.objURL),e.call(t)}}}(this[HI],n),this[HI]}var r={postMessage:function(t){i.onmessage&&setTimeout(function(){i.onmessage({data:t,target:r})})}};A.call(r),this.postMessage=function(t){setTimeout(function(){r.onmessage({data:t,target:i})})},this.isThisThread=!0}}function Yt(t){try{return VI.createObjectURL(new Blob([t],{type:PI}))}catch(e){var A=new WI;return A.append(t),VI.createObjectURL(A.getBlob(type))}}function Ut(){}var Ot,vt="7.2.4",kt="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},zt="undefined"!=typeof window?window:void 0!==kt?kt:"undefined"!=typeof self?self:{},Ft={},bt=Object.freeze({default:Ft}),Rt=bt&&Ft||bt,Jt=void 0!==kt?kt:"undefined"!=typeof window?window:{};"undefined"!=typeof document?Ot=document:(Ot=Jt["__GLOBAL_DOCUMENT_CACHE@4"])||(Ot=Jt["__GLOBAL_DOCUMENT_CACHE@4"]=Rt);var Gt=Ot,Kt=void 0,Ht="info",Pt=[],Wt=function(t,A){var e=Kt.levels[Ht],i=new RegExp("^("+e+")$");if("log"!==t&&A.unshift(t.toUpperCase()+":"),Pt&&Pt.push([].concat(A)),A.unshift("VIDEOJS:"),zt.console){var n=zt.console[t];n||"debug"!==t||(n=zt.console.info||zt.console.log),!n||!e||i.test(t)}};(Kt=function(){for(var t=arguments.length,A=Array(t),e=0;e0)for(var n=0,r=i.length;n=A&&(t.apply(void 0,arguments),e=i)}},NA=function(t,A,e){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:zt,n=void 0,r=function(){var r=this,o=arguments,a=function(){n=null,a=null,e||t.apply(r,o)};!n&&e&&t.apply(r,o),i.clearTimeout(n),n=i.setTimeout(a,A)};return r.cancel=function(){i.clearTimeout(n),n=null},r},DA=function(){};DA.prototype.allowedEvents_={},DA.prototype.on=function(t,A){var e=this.addEventListener;this.addEventListener=function(){},G(this,t,A),this.addEventListener=e},DA.prototype.addEventListener=DA.prototype.on,DA.prototype.off=function(t,A){K(this,t,A)},DA.prototype.removeEventListener=DA.prototype.off,DA.prototype.one=function(t,A){var e=this.addEventListener;this.addEventListener=function(){},P(this,t,A),this.addEventListener=e},DA.prototype.trigger=function(t){var A=t.type||t;"string"==typeof t&&(t={type:A}),t=J(t),this.allowedEvents_[A]&&this["on"+A]&&this["on"+A](t),H(this,t)},DA.prototype.dispatchEvent=DA.prototype.trigger;var yA=void 0;DA.prototype.queueTrigger=function(t){var A=this;yA||(yA=new Map);var e=t.type||t,i=yA.get(this);i||(i=new Map,yA.set(this,i));var n=i.get(e);i.delete(e),zt.clearTimeout(n);var r=zt.setTimeout(function(){0===i.size&&(i=null,yA.delete(A)),A.trigger(t)},0);i.set(e,r)};var BA=function(t){return t instanceof DA||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(A){return"function"==typeof t[A]})},fA=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},QA=function(t){if(!t.nodeName&&!BA(t))throw new Error("Invalid target; must be a DOM node or evented object.")},wA=function(t){if(!fA(t))throw new Error("Invalid event type; must be a non-empty string or array.")},mA=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},pA=function(t,A){var e=A.length<3||A[0]===t||A[0]===t.eventBusEl_,i=void 0,n=void 0,r=void 0;return e?(i=t.eventBusEl_,A.length>=3&&A.shift(),n=A[0],r=A[1]):(i=A[0],n=A[1],r=A[2]),QA(i),wA(n),mA(r),{isTargetingSelf:e,target:i,type:n,listener:r=CA(t,r)}},SA=function(t,A,e,i){QA(t),t.nodeName?cA[A](t,e,i):t[A](e,i)},LA={on:function(){for(var t=this,A=arguments.length,e=Array(A),i=0;i=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_),F(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return Vt.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=Z(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,A,e){return u(t,A,e)},t.prototype.localize=function(t,A){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),r=n&&n[i],o=i&&i.split("-")[0],a=n&&n[o],s=e;return r&&r[t]?s=r[t]:a&&a[t]&&(s=a[t]),A&&(s=s.replace(/\{(\d+)\}/g,function(t,e){var i=A[e-1],n=i;return void 0===i&&(n=t),n})),s},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=X(t),this.childNameIndex_[t]},t.prototype.addChild=function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,n=void 0,r=void 0;if("string"==typeof A){r=X(A);var o=e.componentClass||r;e.name=r;var a=t.getComponent(o);if(!a)throw new Error("Component "+o+" does not exist");if("function"!=typeof a)return null;n=new a(this.player_||this,e)}else n=A;if(this.children_.splice(i,0,n),"function"==typeof n.id&&(this.childIndex_[n.id()]=n),(r=r||n.name&&X(n.name()))&&(this.childNameIndex_[r]=n),"function"==typeof n.el&&n.el()){var s=this.contentEl().children[i]||null;this.contentEl().insertBefore(n.el(),s)}return n},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var A=!1,e=this.children_.length-1;e>=0;e--)if(this.children_[e]===t){A=!0,this.children_.splice(e,1);break}if(A){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var i=t.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var A=this,e=this.options_.children;if(e){var i=this.options_,n=void 0,r=t.getComponent("Tech");(n=Array.isArray(e)?e:Object.keys(e)).concat(Object.keys(this.options_).filter(function(t){return!n.some(function(A){return"string"==typeof A?t===A:t===A.name})})).map(function(t){var i=void 0,n=void 0;return"string"==typeof t?n=e[i=t]||A.options_[i]||{}:(i=t.name,n=t),{name:i,opts:n}}).filter(function(A){var e=t.getComponent(A.opts.componentClass||X(A.name));return e&&!r.isTech(e)}).forEach(function(t){var e=t.name,n=t.opts;if(void 0!==i[e]&&(n=i[e]),!1!==n){!0===n&&(n={}),n.playerOptions=A.options_.playerOptions;var r=A.addChild(e,n);r&&(A[e]=r)}})}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var A=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(A?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,A){return nA(t,A||this.contentEl())},t.prototype.$$=function(t,A){return rA(t,A||this.contentEl())},t.prototype.hasClass=function(t){return l(this.el_,t)},t.prototype.addClass=function(t){d(this.el_,t)},t.prototype.removeClass=function(t){C(this.el_,t)},t.prototype.toggleClass=function(t,A){T(this.el_,t,A)},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 y(this.el_,t)},t.prototype.setAttribute=function(t,A){B(this.el_,t,A)},t.prototype.removeAttribute=function(t){f(this.el_,t)},t.prototype.width=function(t,A){return this.dimension("width",t,A)},t.prototype.height=function(t,A){return this.dimension("height",t,A)},t.prototype.dimensions=function(t,A){this.width(t,!0),this.height(A)},t.prototype.dimension=function(t,A,e){if(void 0!==A)return null!==A&&A==A||(A=0),-1!==(""+A).indexOf("%")||-1!==(""+A).indexOf("px")?this.el_.style[t]=A:this.el_.style[t]="auto"===A?"":A+"px",void(e||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[t],n=i.indexOf("px");return-1!==n?parseInt(i.slice(0,n),10):parseInt(this.el_["offset"+X(t)],10)},t.prototype.currentDimension=function(t){var A=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof zt.getComputedStyle){var e=zt.getComputedStyle(this.el_);A=e.getPropertyValue(t)||e[t]}if(0===(A=parseFloat(A))){var i="offset"+X(t);A=this.el_[i]}return A},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,A=null,e=void 0;this.on("touchstart",function(i){1===i.touches.length&&(A={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},t=(new Date).getTime(),e=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)e=!1;else if(A){var i=t.touches[0].pageX-A.pageX,n=t.touches[0].pageY-A.pageY;Math.sqrt(i*i+n*n)>10&&(e=!1)}});var i=function(){e=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",function(i){A=null,!0===e&&(new Date).getTime()-t<200&&(i.preventDefault(),this.trigger("tap"))})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=CA(this.player(),this.player().reportUserActivity),A=void 0;this.on("touchstart",function(){t(),this.clearInterval(A),A=this.setInterval(t,250)});var e=function(e){t(),this.clearInterval(A)};this.on("touchmove",t),this.on("touchend",e),this.on("touchcancel",e)}},t.prototype.setTimeout=function(t,A){var e,i,n=this;return t=CA(this,t),e=zt.setTimeout(function(){n.off("dispose",i),t()},A),(i=function(){return n.clearTimeout(e)}).guid="vjs-timeout-"+e,this.on("dispose",i),e},t.prototype.clearTimeout=function(t){zt.clearTimeout(t);var A=function(){};return A.guid="vjs-timeout-"+t,this.off("dispose",A),t},t.prototype.setInterval=function(t,A){var e=this;t=CA(this,t);var i=zt.setInterval(t,A),n=function(){return e.clearInterval(i)};return n.guid="vjs-interval-"+i,this.on("dispose",n),i},t.prototype.clearInterval=function(t){zt.clearInterval(t);var A=function(){};return A.guid="vjs-interval-"+t,this.off("dispose",A),t},t.prototype.requestAnimationFrame=function(t){var A,e,i=this;return this.supportsRaf_?(t=CA(this,t),A=zt.requestAnimationFrame(function(){i.off("dispose",e),t()}),(e=function(){return i.cancelAnimationFrame(A)}).guid="vjs-raf-"+A,this.on("dispose",e),A):this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){zt.cancelAnimationFrame(t);var A=function(){};return A.guid="vjs-raf-"+t,this.off("dispose",A),t}return this.clearTimeout(t)},t.registerComponent=function(A,e){if("string"!=typeof A||!A)throw new Error('Illegal component name, "'+A+'"; must be a non-empty string.');var i=t.getComponent("Tech"),n=i&&i.isTech(e),r=t===e||t.prototype.isPrototypeOf(e.prototype);if(n||!r){throw new Error('Illegal component, "'+A+'"; '+(n?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".")}A=X(A),t.components_||(t.components_={});var o=t.getComponent("Player");if("Player"===A&&o&&o.players){var a=o.players,s=Object.keys(a);if(a&&s.length>0&&s.map(function(t){return a[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[A]=e,e},t.getComponent=function(A){if(A)return A=X(A),t.components_&&t.components_[A]?t.components_[A]:void 0},t}();xA.prototype.supportsRaf_="function"==typeof zt.requestAnimationFrame&&"function"==typeof zt.cancelAnimationFrame,xA.registerComponent("Component",xA);for(var YA=zt.navigator&&zt.navigator.userAgent||"",UA=/AppleWebKit\/([\d.]+)/i.exec(YA),OA=UA?parseFloat(UA.pop()):null,vA=/iPad/i.test(YA),kA=/iPhone/i.test(YA)&&!vA,zA=/iPod/i.test(YA),FA=kA||vA||zA,bA=function(){var t=YA.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),RA=/Android/i.test(YA),JA=function(){var t=YA.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var A=t[1]&&parseFloat(t[1]),e=t[2]&&parseFloat(t[2]);return A&&e?parseFloat(t[1]+"."+t[2]):A||null}(),GA=RA&&JA<5&&OA<537,KA=/Firefox/i.test(YA),HA=/Edge/i.test(YA),PA=!HA&&(/Chrome/i.test(YA)||/CriOS/i.test(YA)),WA=function(){var t=YA.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),VA=function(){var t=/MSIE\s(\d+)\.\d/.exec(YA),A=t&&parseFloat(t[1]);return!A&&/Trident\/7.0/i.test(YA)&&/rv:11.0/.test(YA)&&(A=11),A}(),qA=/Safari/i.test(YA)&&!PA&&!RA&&!HA,XA=(qA||FA)&&!PA,ZA=(g()&&("ontouchstart"in zt||zt.navigator.maxTouchPoints||zt.DocumentTouch&&zt.document instanceof zt.DocumentTouch)),_A=Object.freeze({IS_IPAD:vA,IS_IPHONE:kA,IS_IPOD:zA,IS_IOS:FA,IOS_VERSION:bA,IS_ANDROID:RA,ANDROID_VERSION:JA,IS_NATIVE_ANDROID:GA,IS_FIREFOX:KA,IS_EDGE:HA,IS_CHROME:PA,CHROME_VERSION:WA,IE_VERSION:VA,IS_SAFARI:qA,IS_ANY_SAFARI:XA,TOUCH_ENABLED:ZA}),$A={},te=[["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"]],Ae=te[0],ee=void 0,ie=0;ie0&&void 0!==arguments[0]?arguments[0]:[];Zt(this,A);var i=$t(this,t.call(this));i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];Zt(this,A);for(var i=e.length-1;i>=0;i--)if(e[i].enabled){Ee(e,e[i]);break}var n=$t(this,t.call(this,e));return n.changing_=!1,n}return _t(A,t),A.prototype.addTrack=function(A){var e=this;A.enabled&&Ee(this,A),t.prototype.addTrack.call(this,A),A.addEventListener&&A.addEventListener("enabledchange",function(){e.changing_||(e.changing_=!0,Ee(e,A),e.changing_=!1,e.trigger("change"))})},A}(ce),le=function(t,A){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:[];Zt(this,A);for(var i=e.length-1;i>=0;i--)if(e[i].selected){le(e,e[i]);break}var n=$t(this,t.call(this,e));return n.changing_=!1,Object.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];Zt(this,t),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,i=A.length;e0&&void 0!==arguments[0]?arguments[0]:{};Zt(this,A);var i=$t(this,t.call(this)),n={id:e.id||"vjs_track_"+v(),kind:e.kind||"",label:e.label||"",language:e.language||""};for(var r in n)!function(t){Object.defineProperty(i,t,{get:function(){return n[t]},set:function(){}})}(r);return i}return _t(A,t),A}(DA),we=function(t){var A=["protocol","hostname","port","pathname","search","hash","host"],e=Gt.createElement("a");e.href=t;var i=""===e.host&&"file:"!==e.protocol,n=void 0;i&&((n=Gt.createElement("div")).innerHTML='',e=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),Gt.body.appendChild(n));for(var r={},o=0;ox',t=A.firstChild.href}return t},pe=function(t){if("string"==typeof t){var A=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(A)return A.pop().toLowerCase()}return""},Se=function(t){var A=zt.location,e=we(t);return(":"===e.protocol?A.protocol:e.protocol)+e.host!==A.protocol+A.host},Le=Object.freeze({parseUrl:we,getAbsoluteURL:me,getFileExtension:pe,isCrossOrigin:Se}),je=function(t){var A=xe.call(t);return"[object Function]"===A||"function"==typeof t&&"[object RegExp]"!==A||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},xe=Object.prototype.toString,Ye=Object.freeze({default:je,__moduleExports:je}),Ue=t(function(t,A){(A=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},A.right=function(t){return t.replace(/\s*$/,"")}}),Oe=Ue.left,ve=Ue.right,ke=Object.freeze({default:Ue,__moduleExports:Ue,left:Oe,right:ve}),ze=Ye&&je||Ye,Fe=function(t,A,e){if(!ze(A))throw new TypeError("iterator must be a function");arguments.length<3&&(e=this),"[object Array]"===be.call(t)?function(t,A,e){for(var i=0,n=t.length;i0&&(zt.console&&zt.console.groupCollapsed&&zt.console.groupCollapsed("Text Track parsing errors for "+A.src),i.forEach(function(t){return Vt.error(t)}),zt.console&&zt.console.groupEnd&&zt.console.groupEnd()),e.flush()},ti=function(t,A){var e={uri:t},i=Se(t);i&&(e.cors=i),_e(e,CA(this,function(t,e,i){if(t)return Vt.error(t,e);if(A.loaded_=!0,"function"!=typeof zt.WebVTT){if(A.tech_){var n=function(){return $e(i,A)};A.tech_.on("vttjsloaded",n),A.tech_.on("vttjserror",function(){Vt.error("vttjs failed to load, stopping trying to process "+A.src),A.tech_.off("vttjsloaded",n)})}}else $e(i,A)}))},Ai=function(t){function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Zt(this,A),!e.tech)throw new Error("A tech was not provided.");var i=Z(e,{kind:Be[e.kind]||"subtitles",language:e.language||e.srclang||""}),n=fe[i.mode]||"disabled",r=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(n="hidden");var o=$t(this,t.call(this,i));o.tech_=i.tech,o.cues_=[],o.activeCues_=[];var a=new Ne(o.cues_),s=new Ne(o.activeCues_),g=!1,M=CA(o,function(){this.activeCues=this.activeCues,g&&(this.trigger("cuechange"),g=!1)});return"disabled"!==n&&o.tech_.ready(function(){o.tech_.on("timeupdate",M)},!0),Object.defineProperties(o,{default:{get:function(){return r},set:function(){}},mode:{get:function(){return n},set:function(t){var A=this;fe[t]&&("disabled"!==(n=t)?this.tech_.ready(function(){A.tech_.on("timeupdate",M)},!0):this.tech_.off("timeupdate",M),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var t=this.tech_.currentTime(),A=[],e=0,i=this.cues.length;e=t?A.push(n):n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t&&A.push(n)}if(g=!1,A.length!==this.activeCues_.length)g=!0;else for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};Zt(this,A);var i=Z(e,{kind:ye[e.kind]||""}),n=$t(this,t.call(this,i)),r=!1;return Object.defineProperty(n,"enabled",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("enabledchange"))}}),i.enabled&&(n.enabled=i.enabled),n.loaded_=!0,n}return _t(A,t),A}(Qe),ii=function(t){function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Zt(this,A);var i=Z(e,{kind:De[e.kind]||""}),n=$t(this,t.call(this,i)),r=!1;return Object.defineProperty(n,"selected",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("selectedchange"))}}),i.selected&&(n.selected=i.selected),n}return _t(A,t),A}(Qe),ni=0,ri=2,oi=function(t){function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Zt(this,A);var i=$t(this,t.call(this)),n=void 0,r=new Ai(e);return i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i.default=r.default,Object.defineProperties(i,{readyState:{get:function(){return n}},track:{get:function(){return r}}}),n=ni,r.addEventListener("loadeddata",function(){n=ri,i.trigger({type:"load",target:i})}),i}return _t(A,t),A}(DA);oi.prototype.allowedEvents_={load:"load"},oi.NONE=ni,oi.LOADING=1,oi.LOADED=ri,oi.ERROR=3;var ai={audio:{ListClass:he,TrackClass:ei,capitalName:"Audio"},video:{ListClass:de,TrackClass:ii,capitalName:"Video"},text:{ListClass:Ce,TrackClass:Ai,capitalName:"Text"}};Object.keys(ai).forEach(function(t){ai[t].getterName=t+"Tracks",ai[t].privateName=t+"Tracks_"});var si={remoteText:{ListClass:Ce,TrackClass:Ai,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Te,TrackClass:oi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},gi=Z(ai,si);si.names=Object.keys(si),ai.names=Object.keys(ai),gi.names=[].concat(si.names).concat(ai.names);var Mi=Object.create||function(){function t(){}return function(A){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=A,new t}}();st.prototype=Mi(Error.prototype),st.prototype.constructor=st,st.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Mt.prototype={set:function(t,A){this.get(t)||""===A||(this.values[t]=A)},get:function(t,A,e){return e?this.has(t)?this.values[t]:A[e]:this.has(t)?this.values[t]:A},has:function(t){return t in this.values},alt:function(t,A,e){for(var i=0;i=0&&A<=100)&&(this.set(t,A),!0)}};var Ii={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},ci={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ui={v:"title",lang:"lang"},Ei={rt:"ruby"},hi=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];ht.prototype.applyStyles=function(t,A){for(var e in A=A||this.div,t)t.hasOwnProperty(e)&&(A.style[e]=t[e])},ht.prototype.formatStyle=function(t,A){return 0===t?0:t+A},lt.prototype=Mi(ht.prototype),lt.prototype.constructor=lt,dt.prototype.move=function(t,A){switch(A=void 0!==A?A:this.lineHeight,t){case"+x":this.left+=A,this.right+=A;break;case"-x":this.left-=A,this.right-=A;break;case"+y":this.top+=A,this.bottom+=A;break;case"-y":this.top-=A,this.bottom-=A}},dt.prototype.overlaps=function(t){return this.leftt.left&&this.topt.top},dt.prototype.overlapsAny=function(t){for(var A=0;A=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},dt.prototype.overlapsOppositeAxis=function(t,A){switch(A){case"+x":return this.leftt.right;case"+y":return this.topt.bottom}},dt.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},dt.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},dt.getSimpleBoxPosition=function(t){var A=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,e=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,i=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||i,height:t.height||A,bottom:t.bottom||i+(t.height||A),width:t.width||e}},Tt.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},Tt.convertCueToDOMTree=function(t,A){return t&&A?ut(t,A):null},Tt.processCues=function(t,A,e){if(!t||!A||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var i=t.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",e.appendChild(i),function(t){for(var A=0;A0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};Zt(this,A),e.reportTouchActivity=!1;var n=$t(this,t.call(this,null,e,i));return n.hasStarted_=!1,n.on("playing",function(){this.hasStarted_=!0}),n.on("loadstart",function(){this.hasStarted_=!1}),gi.names.forEach(function(t){var A=gi[t];e&&e[A.getterName]&&(n[A.privateName]=e[A.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===e["native"+t+"Tracks"]&&(n["featuresNative"+t+"Tracks"]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.autoRemoteTextTracks_=new gi.text.ListClass,n.initTrackListeners(),e.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}return _t(A,t),A.prototype.triggerSourceset=function(t){var A=this;this.isReady_||this.one("ready",function(){return A.setTimeout(function(){return A.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},A.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},A.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},A.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(CA(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()}),500)},A.prototype.onDurationChange=function(t){this.duration_=this.duration()},A.prototype.buffered=function(){return tt(0,0)},A.prototype.bufferedPercent=function(){return At(this.buffered(),this.duration_)},A.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},A.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},A.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},A.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},A.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},A.prototype.dispose=function(){this.clearTracks(ai.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},A.prototype.clearTracks=function(t){var A=this;(t=[].concat(t)).forEach(function(t){for(var e=A[t+"Tracks"]()||[],i=e.length;i--;){var n=e[i];"text"===t&&A.removeRemoteTextTrack(n),e.removeTrack(n)}})},A.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],A=t.length;A--;){var e=t[A];this.removeRemoteTextTrack(e)}},A.prototype.reset=function(){},A.prototype.error=function(t){return void 0!==t&&(this.error_=new et(t),this.trigger("error")),this.error_},A.prototype.played=function(){return this.hasStarted_?tt(0,0):tt()},A.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},A.prototype.initTrackListeners=function(){var t=this;ai.names.forEach(function(A){var e=ai[A],i=function(){t.trigger(A+"trackchange")},n=t[e.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),t.on("dispose",function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)})})},A.prototype.addWebVttScript_=function(){var t=this;if(!zt.WebVTT)if(Gt.body.contains(this.el())){if(!this.options_["vtt.js"]&&r(Si)&&Object.keys(Si).length>0)return void this.trigger("vttjsloaded");var A=Gt.createElement("script");A.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",A.onload=function(){t.trigger("vttjsloaded")},A.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){A.onload=null,A.onerror=null}),zt.WebVTT=!0,this.el().parentNode.appendChild(A)}else this.ready(this.addWebVttScript_)},A.prototype.emulateTextTracks=function(){var t=this,A=this.textTracks(),e=this.remoteTextTracks(),i=function(t){return A.addTrack(t.track)},n=function(t){return A.removeTrack(t.track)};e.on("addtrack",i),e.on("removetrack",n),this.addWebVttScript_();var r=function(){return t.trigger("texttrackchange")},o=function(){r();for(var t=0;t4&&void 0!==arguments[4]?arguments[4]:{},r=t.textTracks();n.kind=A,e&&(n.label=e),i&&(n.language=i),n.tech=t;var o=new gi.text.TrackClass(n);return r.addTrack(o),o}(this,t,A,e)},A.prototype.createRemoteTextTrack=function(t){var A=Z(t,{tech:this});return new si.remoteTextEl.TrackClass(A)},A.prototype.addRemoteTextTrack=function(){var t=this,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],i=this.createRemoteTextTrack(A);return!0!==e&&!1!==e&&(Vt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),e=!0),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!0!==e&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(i.track)}),i},A.prototype.removeRemoteTextTrack=function(t){var A=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(A),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},A.prototype.getVideoPlaybackQuality=function(){return{}},A.prototype.setPoster=function(){},A.prototype.playsinline=function(){},A.prototype.setPlaysinline=function(){},A.prototype.overrideNativeAudioTracks=function(){},A.prototype.overrideNativeVideoTracks=function(){},A.prototype.canPlayType=function(){return""},A.canPlayType=function(){return""},A.canPlaySource=function(t,e){return A.canPlayType(t.type)},A.isTech=function(t){return t.prototype instanceof A||t instanceof A||t===A},A.registerTech=function(t,e){if(A.techs_||(A.techs_={}),!A.isTech(e))throw new Error("Tech "+t+" must be a Tech");if(!A.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!A.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=X(t),A.techs_[t]=e,"Tech"!==t&&A.defaultTechOrder_.push(t),e},A.getTech=function(t){if(t)return t=X(t),A.techs_&&A.techs_[t]?A.techs_[t]:zt&&zt.videojs&&zt.videojs[t]?(Vt.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),zt.videojs[t]):void 0},A}(xA));gi.names.forEach(function(t){var A=gi[t];Li.prototype[A.getterName]=function(){return this[A.privateName]=this[A.privateName]||new A.ListClass,this[A.privateName]}}),Li.prototype.featuresVolumeControl=!0,Li.prototype.featuresMuteControl=!0,Li.prototype.featuresFullscreenResize=!1,Li.prototype.featuresPlaybackRate=!1,Li.prototype.featuresProgressEvents=!1,Li.prototype.featuresSourceset=!1,Li.prototype.featuresTimeupdateEvents=!1,Li.prototype.featuresNativeTextTracks=!1,Li.withSourceHandlers=function(t){t.registerSourceHandler=function(A,e){var i=t.sourceHandlers;i||(i=t.sourceHandlers=[]),void 0===e&&(e=i.length),i.splice(e,0,A)},t.canPlayType=function(A){for(var e=t.sourceHandlers||[],i=void 0,n=0;n0&&void 0!==arguments[0]?arguments[0]:"",A=pe(t);return ki[A.toLowerCase()]||""},Fi=function(t){function A(e,i,n){Zt(this,A);var r=Z({createEl:!1},i),o=$t(this,t.call(this,e,r,n));if(i.playerOptions.sources&&0!==i.playerOptions.sources.length)e.src(i.playerOptions.sources);else for(var a=0,s=i.playerOptions.techOrder;a0&&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]:{};e=i({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},e),"button"===A&&Vt.error("Creating a ClickableComponent with an HTML element of "+A+" is not supported; use a Button instead."),n=i({role:"button"},n),this.tabIndex_=e.tabIndex;var r=t.prototype.createEl.call(this,A,e,n);return this.createControlTextEl(r),r},A.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},A.prototype.createControlTextEl=function(t){return this.controlTextEl_=u("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},A.prototype.controlText=function(t){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var e=this.localize(t);this.controlText_=t,E(this.controlTextEl_,e),this.nonIconControl||A.setAttribute("title",e)},A.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},A.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},A.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},A.prototype.handleClick=function(t){},A.prototype.handleFocus=function(t){G(Gt,"keydown",CA(this,this.handleKeyPress))},A.prototype.handleKeyPress=function(A){32===A.which||13===A.which?(A.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,A)},A.prototype.handleBlur=function(t){K(Gt,"keydown",CA(this,this.handleKeyPress))},A}(xA);xA.registerComponent("ClickableComponent",bi);var Ri=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.update(),e.on("posterchange",CA(n,n.update)),n}return _t(A,t),A.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},A.prototype.createEl=function(){return u("div",{className:"vjs-poster",tabIndex:-1})},A.prototype.update=function(t){var A=this.player().poster();this.setSrc(A),A?this.show():this.hide()},A.prototype.setSrc=function(t){var A="";t&&(A='url("'+t+'")'),this.el_.style.backgroundImage=A},A.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?nt(this.player_.play()):this.player_.pause())},A}(bi);xA.registerComponent("PosterImage",Ri);var Ji={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},Gi=function(t){function A(e,i,n){Zt(this,A);var r=$t(this,t.call(this,e,i,n)),o=CA(r,r.updateDisplay);return e.on("loadstart",CA(r,r.toggleDisplay)),e.on("texttrackchange",o),e.on("loadstart",CA(r,r.preselectTrack)),e.ready(CA(r,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)this.hide();else{e.on("fullscreenchange",o),e.on("playerresize",o),zt.addEventListener("orientationchange",o),e.on("dispose",function(){return zt.removeEventListener("orientationchange",o)});for(var t=this.options_.playerOptions.tracks||[],A=0;A1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",A=i({innerHTML:'',className:this.buildCSSClass()},A),e=i({type:"button"},e);var n=xA.prototype.createEl.call(this,t,A,e);return this.createControlTextEl(n),n},A.prototype.addChild=function(t){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=this.constructor.name;return Vt.warn("Adding an actionable (user controllable) child to a Button ("+e+") is not supported; use a ClickableComponent instead."),xA.prototype.addChild.call(this,t,A)},A.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},A.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},A.prototype.handleKeyPress=function(A){32!==A.which&&13!==A.which&&t.prototype.handleKeyPress.call(this,A)},A}(bi);xA.registerComponent("Button",Hi);var Pi=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-big-play-button"},A.prototype.handleClick=function(t){var A=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)nt(A);else{var e=this.player_.getChild("controlBar"),i=e&&e.getChild("playToggle");if(i){var n=function(){return i.focus()};it(A)?A.then(n,function(){}):this.setTimeout(n,1)}else this.player_.focus()}},A.prototype.handleKeyPress=function(A){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,A)},A.prototype.handleMouseDown=function(t){this.mouseused_=!0},A}(Hi);Pi.prototype.controlText_="Play Video",xA.registerComponent("BigPlayButton",Pi);var Wi=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.controlText(i&&i.controlText||n.localize("Close")),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},A.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},A}(Hi);xA.registerComponent("CloseButton",Wi);var Vi=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.on(e,"play",n.handlePlay),n.on(e,"pause",n.handlePause),n.on(e,"ended",n.handleEnded),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},A.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},A.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},A.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},A.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},A.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},A}(Hi);Vi.prototype.controlText_="Play",xA.registerComponent("PlayToggle",Vi);var qi=function(t,A){t=t<0?0:t;var e=Math.floor(t%60),i=Math.floor(t/60%60),n=Math.floor(t/3600),r=Math.floor(A/60%60),o=Math.floor(A/3600);return(isNaN(t)||t===1/0)&&(n=i=e="-"),(n=n>0||o>0?n+":":"")+(i=((n||r>=10)&&i<10?"0"+i:i)+":")+(e=e<10?"0"+e:e)},Xi=qi,Zi=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.throttledUpdateContent=TA(CA(n,n.updateContent),25),n.on(e,"timeupdate",n.throttledUpdateContent),n}return _t(A,t),A.prototype.createEl=function(A){var e=this.buildCSSClass(),i=t.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=u("span",{className:e+"-display"},{"aria-live":"off"}),this.updateTextNode_(),i.appendChild(this.contentEl_),i},A.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},A.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=Gt.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},A.prototype.formatTime_=function(t){return St(t)},A.prototype.updateFormattedTime_=function(t){var A=this.formatTime_(t);A!==this.formattedTime_&&(this.formattedTime_=A,this.requestAnimationFrame(this.updateTextNode_))},A.prototype.updateContent=function(t){},A}(xA);Zi.prototype.labelText_="Time",Zi.prototype.controlText_="Time",xA.registerComponent("TimeDisplay",Zi);var _i=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.on(e,"ended",n.handleEnded),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-current-time"},A.prototype.updateContent=function(t){var A=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(A)},A.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},A}(Zi);_i.prototype.labelText_="Current Time",_i.prototype.controlText_="Current Time",xA.registerComponent("CurrentTimeDisplay",_i);var $i=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.on(e,"durationchange",n.updateContent),n.on(e,"loadedmetadata",n.throttledUpdateContent),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-duration"},A.prototype.updateContent=function(t){var A=this.player_.duration();A&&this.duration_!==A&&(this.duration_=A,this.updateFormattedTime_(A))},A}(Zi);$i.prototype.labelText_="Duration",$i.prototype.controlText_="Duration",xA.registerComponent("DurationDisplay",$i);var tn=function(t){function A(){return Zt(this,A),$t(this,t.apply(this,arguments))}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},A}(xA);xA.registerComponent("TimeDivider",tn);var An=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.on(e,"durationchange",n.throttledUpdateContent),n.on(e,"ended",n.handleEnded),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-remaining-time"},A.prototype.formatTime_=function(A){return"-"+t.prototype.formatTime_.call(this,A)},A.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},A.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},A}(Zi);An.prototype.labelText_="Remaining Time",An.prototype.controlText_="Remaining Time",xA.registerComponent("RemainingTimeDisplay",An);var en=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}return _t(A,t),A.prototype.createEl=function(){var A=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=u("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),A.appendChild(this.contentEl_),A},A.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},A.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},A}(xA);xA.registerComponent("LiveDisplay",en);var nn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}return _t(A,t),A.prototype.enabled=function(){return this.enabled_},A.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},A.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},A.prototype.createEl=function(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.className=e.className+" vjs-slider",e=i({tabIndex:0},e),n=i({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),t.prototype.createEl.call(this,A,e,n)},A.prototype.handleMouseDown=function(t){var A=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||PA||t.preventDefault(),Q(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(A,"mousemove",this.handleMouseMove),this.on(A,"mouseup",this.handleMouseUp),this.on(A,"touchmove",this.handleMouseMove),this.on(A,"touchend",this.handleMouseUp),this.handleMouseMove(t)},A.prototype.handleMouseMove=function(t){},A.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;w(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},A.prototype.update=function(){if(this.el_){var t=this.getPercent(),A=this.bar;if(A){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var e=(100*t).toFixed(2)+"%",i=A.el().style;return this.vertical()?i.height=e:i.width=e,t}}},A.prototype.calculateDistance=function(t){var A=S(this.el_,t);return this.vertical()?A.y:A.x},A.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},A.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},A.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},A.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},A.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},A}(xA);xA.registerComponent("Slider",nn);var rn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.partEls_=[],n.on(e,"progress",n.update),n}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},A.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},A.prototype.update=function(t){var A=this.player_.buffered(),e=this.player_.duration(),i=this.player_.bufferedEnd(),n=this.partEls_,r=function(t,A){var e=t/A||0;return 100*(e>=1?1:e)+"%"};this.el_.style.width=r(i,e);for(var o=0;oA.length;M--)this.el_.removeChild(n[M-1]);n.length=A.length},A}(xA);xA.registerComponent("LoadProgressBar",rn);var on=function(t){function A(){return Zt(this,A),$t(this,t.apply(this,arguments))}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},A.prototype.update=function(t,A,e){var i=m(this.el_),n=m(this.player_.el()),r=t.width*A;if(n&&i){var o=t.left-n.left+r,a=t.width-r+(n.right-t.right),s=i.width/2;oi.width&&(s=i.width),this.el_.style.right="-"+s+"px",E(this.el_,e)}},A}(xA);xA.registerComponent("TimeTooltip",on);var an=function(t){function A(){return Zt(this,A),$t(this,t.apply(this,arguments))}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},A.prototype.update=function(t,A){var e=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var i=St(e.player_.scrubbing()?e.player_.getCache().currentTime:e.player_.currentTime(),e.player_.duration()),n=e.getChild("timeTooltip");n&&n.update(t,A,i)})},A}(xA);an.prototype.options_={children:[]},FA||RA||an.prototype.options_.children.push("timeTooltip"),xA.registerComponent("PlayProgressBar",an);var sn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.update=TA(CA(n,n.update),25),n}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},A.prototype.update=function(t,A){var e=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var i=e.player_.duration(),n=St(A*i,i);e.el_.style.left=t.width*A+"px",e.getChild("timeTooltip").update(t,A,n)})},A}(xA);sn.prototype.options_={children:["timeTooltip"]},xA.registerComponent("MouseTimeDisplay",sn);var gn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.setEventHandlers_(),n}return _t(A,t),A.prototype.setEventHandlers_=function(){var t=this;this.update=TA(CA(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval(function(){t.requestAnimationFrame(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(){t.clearInterval(t.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},A.prototype.update_=function(t,A){var e=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*A).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[St(t,e),St(e,e)],"{1} of {2}")),this.bar.update(m(this.el_),A)},A.prototype.update=function(A){var e=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),e),e},A.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},A.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},A.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t||0},A.prototype.handleMouseDown=function(A){O(A)&&(A.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,A))},A.prototype.handleMouseMove=function(t){if(O(t)){var A=this.calculateDistance(t)*this.player_.duration();A===this.player_.duration()&&(A-=.1),this.player_.currentTime(A)}},A.prototype.enable=function(){t.prototype.enable.call(this);var A=this.getChild("mouseTimeDisplay");A&&A.show()},A.prototype.disable=function(){t.prototype.disable.call(this);var A=this.getChild("mouseTimeDisplay");A&&A.hide()},A.prototype.handleMouseUp=function(A){t.prototype.handleMouseUp.call(this,A),A&&A.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&nt(this.player_.play())},A.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},A.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},A.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},A.prototype.handleKeyPress=function(A){32===A.which||13===A.which?(A.preventDefault(),this.handleAction(A)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,A)},A}(nn);gn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},FA||RA||gn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),gn.prototype.playerEvent="timeupdate",xA.registerComponent("SeekBar",gn);var Mn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.handleMouseMove=TA(CA(n,n.handleMouseMove),25),n.throttledHandleMouseSeek=TA(CA(n,n.handleMouseSeek),25),n.enable(),n}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},A.prototype.handleMouseMove=function(t){var A=this.getChild("seekBar");if(A){var e=A.getChild("mouseTimeDisplay"),i=A.el(),n=m(i),r=S(i,t).x;r>1?r=1:r<0&&(r=0),e&&e.update(n,r)}},A.prototype.handleMouseSeek=function(t){var A=this.getChild("seekBar");A&&A.handleMouseMove(t)},A.prototype.enabled=function(){return this.enabled_},A.prototype.disable=function(){this.children().forEach(function(t){return t.disable&&t.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},A.prototype.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},A.prototype.handleMouseDown=function(t){var A=this.el_.ownerDocument,e=this.getChild("seekBar");e&&e.handleMouseDown(t),this.on(A,"mousemove",this.throttledHandleMouseSeek),this.on(A,"touchmove",this.throttledHandleMouseSeek),this.on(A,"mouseup",this.handleMouseUp),this.on(A,"touchend",this.handleMouseUp)},A.prototype.handleMouseUp=function(t){var A=this.el_.ownerDocument,e=this.getChild("seekBar");e&&e.handleMouseUp(t),this.off(A,"mousemove",this.throttledHandleMouseSeek),this.off(A,"touchmove",this.throttledHandleMouseSeek),this.off(A,"mouseup",this.handleMouseUp),this.off(A,"touchend",this.handleMouseUp)},A}(xA);Mn.prototype.options_={children:["seekBar"]},xA.registerComponent("ProgressControl",Mn);var In=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.on(e,"fullscreenchange",n.handleFullscreenChange),!1===Gt[$A.fullscreenEnabled]&&n.disable(),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},A.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},A.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},A}(Hi);In.prototype.controlText_="Fullscreen",xA.registerComponent("FullscreenToggle",In);var cn=function(t,A){A.tech_&&!A.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(A,"loadstart",function(){A.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},un=function(t){function A(){return Zt(this,A),$t(this,t.apply(this,arguments))}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},A}(xA);xA.registerComponent("VolumeLevel",un);var En=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.on("slideractive",n.updateLastVolume_),n.on(e,"volumechange",n.updateARIAAttributes),e.ready(function(){return n.updateARIAAttributes()}),n}return _t(A,t),A.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},A.prototype.handleMouseDown=function(A){O(A)&&t.prototype.handleMouseDown.call(this,A)},A.prototype.handleMouseMove=function(t){O(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},A.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},A.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},A.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},A.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},A.prototype.updateARIAAttributes=function(t){var A=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",A),this.el_.setAttribute("aria-valuetext",A+"%")},A.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},A.prototype.updateLastVolume_=function(){var t=this,A=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(A)})},A}(nn);En.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},En.prototype.playerEvent="volumechange",xA.registerComponent("VolumeBar",En);var hn=function(t){function A(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Zt(this,A),i.vertical=i.vertical||!1,(void 0===i.volumeBar||r(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical);var n=$t(this,t.call(this,e,i));return cn(n,e),n.throttledHandleMouseMove=TA(CA(n,n.handleMouseMove),25),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),n.on(n.volumeBar,["focus","slideractive"],function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")}),n.on(n.volumeBar,["blur","sliderinactive"],function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")}),n}return _t(A,t),A.prototype.createEl=function(){var A="vjs-volume-horizontal";return this.options_.vertical&&(A="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+A})},A.prototype.handleMouseDown=function(t){var A=this.el_.ownerDocument;this.on(A,"mousemove",this.throttledHandleMouseMove),this.on(A,"touchmove",this.throttledHandleMouseMove),this.on(A,"mouseup",this.handleMouseUp),this.on(A,"touchend",this.handleMouseUp)},A.prototype.handleMouseUp=function(t){var A=this.el_.ownerDocument;this.off(A,"mousemove",this.throttledHandleMouseMove),this.off(A,"touchmove",this.throttledHandleMouseMove),this.off(A,"mouseup",this.handleMouseUp),this.off(A,"touchend",this.handleMouseUp)},A.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},A}(xA);hn.prototype.options_={children:["volumeBar"]},xA.registerComponent("VolumeControl",hn);var ln=function(t,A){A.tech_&&!A.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(A,"loadstart",function(){A.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},dn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return ln(n,e),n.on(e,["loadstart","volumechange"],n.update),n}return _t(A,t),A.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},A.prototype.handleClick=function(t){var A=this.player_.volume(),e=this.player_.lastVolume_();if(0===A){var i=e<.1?.1:e;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},A.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},A.prototype.updateIcon_=function(){var t=this.player_.volume(),A=3;FA&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?A=0:t<.33?A=1:t<.67&&(A=2);for(var e=0;e<4;e++)C(this.el_,"vjs-vol-"+e);d(this.el_,"vjs-vol-"+A)},A.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},A}(Hi);dn.prototype.controlText_="Mute",xA.registerComponent("MuteToggle",dn);var Cn=function(t){function A(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Zt(this,A),void 0!==i.inline?i.inline=i.inline:i.inline=!0,(void 0===i.volumeControl||r(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline);var n=$t(this,t.call(this,e,i));return n.on(e,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}return _t(A,t),A.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},A.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},A.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},A.prototype.createEl=function(){var A="vjs-volume-panel-horizontal";return this.options_.inline||(A="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+A})},A}(xA);Cn.prototype.options_={children:["muteToggle","volumeControl"]},xA.registerComponent("VolumePanel",Cn);var Tn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return i&&(n.menuButton_=i.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyPress),n}return _t(A,t),A.prototype.addItem=function(t){this.addChild(t),t.on("click",CA(this,function(A){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())}))},A.prototype.createEl=function(){var A=this.options_.contentElType||"ul";this.contentEl_=u(A,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var e=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),G(e,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),e},A.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},A.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},A.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},A.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},A.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,A=this.children().slice();A.length&&A[0].className&&/vjs-menu-title/.test(A[0].className)&&A.shift(),A.length>0&&(t<0?t=0:t>=A.length&&(t=A.length-1),this.focusedChild_=t,A[t].el_.focus())},A}(xA);xA.registerComponent("Menu",Tn);var Nn=function(t){function A(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Zt(this,A);var n=$t(this,t.call(this,e,i));n.menuButton_=new Hi(e,i),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Hi.prototype.buildCSSClass();return n.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"focus",n.handleFocus),n.on(n.menuButton_,"blur",n.handleBlur),n.on("keydown",n.handleSubmenuKeyPress),n}return _t(A,t),A.prototype.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},A.prototype.createMenu=function(){var t=new Tn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var A=u("li",{className:"vjs-menu-title",innerHTML:X(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(A),h(A,t.contentEl())}if(this.items=this.createItems(),this.items)for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,A)},A.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",CA(this,function(t){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},A.prototype.focus=function(){this.menuButton_.focus()},A.prototype.blur=function(){this.menuButton_.blur()},A.prototype.handleFocus=function(){G(Gt,"keydown",CA(this,this.handleKeyPress))},A.prototype.handleBlur=function(){K(Gt,"keydown",CA(this,this.handleKeyPress))},A.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},A.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},A.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),FA&&I())return;this.menu.focus()}},A.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},A.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},A.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},A}(xA);xA.registerComponent("MenuButton",Nn);var Dn=function(t){function A(e,i){Zt(this,A);var n=i.tracks,r=$t(this,t.call(this,e,i));if(r.items.length<=1&&r.hide(),!n)return $t(r);var o=CA(r,r.update);return n.addEventListener("removetrack",o),n.addEventListener("addtrack",o),r.player_.on("ready",o),r.player_.on("dispose",function(){n.removeEventListener("removetrack",o),n.removeEventListener("addtrack",o)}),r}return _t(A,t),A}(Nn);xA.registerComponent("TrackButton",Dn);var yn=function(t){function A(e,i){Zt(this,A);var n=$t(this,t.call(this,e,i));return n.selectable=i.selectable,n.isSelected_=i.selected||!1,n.multiSelectable=i.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}return _t(A,t),A.prototype.createEl=function(A,e,n){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",i({className:"vjs-menu-item",innerHTML:''+this.localize(this.options_.label)+"",tabIndex:-1},e),n)},A.prototype.handleClick=function(t){this.selected(!0)},A.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},A}(bi);xA.registerComponent("MenuItem",yn);var Bn=function(t){function A(e,i){Zt(this,A);var n=i.track,r=e.textTracks();i.label=n.label||n.language||"Unknown",i.selected="showing"===n.mode;var o=$t(this,t.call(this,e,i));o.track=n;var a=function(){for(var t=arguments.length,A=Array(t),e=0;e-1?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled")}},A.prototype.handleTracksChange=function(t){var A="showing"===this.track.mode;A!==this.isSelected_&&this.selected(A)},A.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var A=this.player_.cache_.selectedLanguage;if(A&&A.enabled&&A.language===this.track.language&&A.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},A.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},A}(yn);xA.registerComponent("TextTrackMenuItem",Bn);var fn=function(t){function A(e,i){return Zt(this,A),i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,$t(this,t.call(this,e,i))}return _t(A,t),A.prototype.handleTracksChange=function(t){for(var A=this.player().textTracks(),e=!0,i=0,n=A.length;i-1&&"showing"===r.mode){e=!1;break}}e!==this.isSelected_&&this.selected(e)},A.prototype.handleSelectedLanguageChange=function(t){for(var A=this.player().textTracks(),e=!0,i=0,n=A.length;i-1&&"showing"===r.mode){e=!1;break}}e&&(this.player_.cache_.selectedLanguage={enabled:!1})},A}(Bn);xA.registerComponent("OffTextTrackMenuItem",fn);var Qn=function(t){function A(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Zt(this,A),i.tracks=e.textTracks(),$t(this,t.call(this,e,i))}return _t(A,t),A.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bn,e=void 0;this.label_&&(e=this.label_+" off"),t.push(new fn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1;var i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var n=0;n-1){var o=new A(this.player_,{track:r,selectable:!0,multiSelectable:!1});o.addClass("vjs-"+r.kind+"-menu-item"),t.push(o)}}return t},A}(Dn);xA.registerComponent("TextTrackButton",Qn);var wn=function(t){function A(e,i){Zt(this,A);var n=i.track,r=i.cue,o=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=r.text,i.selected=r.startTime<=o&&o=0;A--){var e=t[A];if(e.kind===this.kind_)return e}},A.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(X(this.kind_))},A.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},A.prototype.createItems=function(){var t=[];if(!this.track_)return t;var A=this.track_.cues;if(!A)return t;for(var e=0,i=A.length;e