(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-68e9147c"],{"06e8":function(e,t,i){},"0c66":function(e,t,i){},"12d4":function(e,t,i){"use strict";var n=i("f2bf");const r=e=>(Object(n["pushScopeId"])("data-v-18f4e00c"),e=e(),Object(n["popScopeId"])(),e),a=r(()=>Object(n["createElementVNode"])("div",{class:"score-title"}," You have some courses that have not been evaluated yet, please click to evaluate ",-1)),s={class:"studentlist",style:{margin:"5px 20px"}},o={border:"1",style:{"border-collapse":"collapse",width:"100%"}},l={class:"student-item"};function u(e,t,i,r,u,c){const d=Object(n["resolveComponent"])("el-button"),h=Object(n["resolveComponent"])("el-dialog");return Object(n["openBlock"])(),Object(n["createBlock"])(h,{customClass:"customWidth",top:"10vh","lock-scroll":!1,onClose:t[0]||(t[0]=e=>c.close("form")),onOpen:c.open},{default:Object(n["withCtx"])(()=>[a,Object(n["createElementVNode"])("div",s,[Object(n["createElementVNode"])("table",o,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(i.listData,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("tr",{key:t},[Object(n["createElementVNode"])("td",null,[Object(n["createElementVNode"])("div",l,[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.title),1),Object(n["createVNode"])(d,{type:"danger",plain:"",onClick:t=>c.viewEvaluation(e)},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("Evaluate")]),_:2},1032,["onClick"])])])]))),128))])])]),_:1},8,["onOpen"])}var c={name:"score-list",inject:["$global","$api","$message"],emits:{closeview:null},props:{dialogFormVisible:Boolean,listData:Object},data(){return{}},created(){},mounted(){},watch:{},methods:{open(){},close(e){this.$emit("closeview",!1)},viewEvaluation(e){const t={evaluate:e.evaluate,id:e.id,presenter:e.presenter,title:e.title,className:e.className};this.$emit("show-evaluation",t)}}},d=(i("d600"),i("6b0d")),h=i.n(d);const p=h()(c,[["render",u],["__scopeId","data-v-18f4e00c"]]);t["a"]=p},"1a1b":function(e,t,i){"use strict";var n=i("f2bf");const r=e=>(Object(n["pushScopeId"])("data-v-3514610e"),e=e(),Object(n["popScopeId"])(),e),a={class:"score-title"},s=r(()=>Object(n["createElementVNode"])("div",{class:"score-content"},[Object(n["createElementVNode"])("p",{class:"dear"},"Dear participants:"),Object(n["createElementVNode"])("p",null,"Hello ! In order to understand the teaching effect of this seminar, please score the teaching of each teacher about the consistency with training objectives, teaching contents, teaching methods, teaching attitude, combination of theory and practice, and benefit to personal work development."),Object(n["createElementVNode"])("p",{class:"con-margin"},[Object(n["createTextVNode"])("The scoring criteria are as below: "),Object(n["createElementVNode"])("span",{class:"score-content-score"},"excellent 100-90 points; good 89-80 points; medium 79-70 points; poor 70 points or less.")]),Object(n["createElementVNode"])("p",{class:"con-margin"},"This form does not need to be signed, please hand it to the class teacher before the seminar ends. Your support will help us to improve our teaching and training work continuously."),Object(n["createElementVNode"])("p",{class:"con-end con-margin"},[Object(n["createElementVNode"])("span",null,"International, Hong Kong and Macau Training Center,")]),Object(n["createElementVNode"])("p",{class:"con-end"},[Object(n["createElementVNode"])("span",null,"China National Academy of Governance(CNAG)")])],-1)),o={class:"score-table"},l=r(()=>Object(n["createElementVNode"])("div",{class:"table-title title-border-bo"},[Object(n["createElementVNode"])("div",{class:"title-text title-border-ri"},"Teacher"),Object(n["createElementVNode"])("div",{class:"title-text title-cen title-border-ri"},"Lecture"),Object(n["createElementVNode"])("div",{class:"title-text"},"Score")],-1)),u={class:"table-title title-border-bo"},c={class:"title-text title-border-ri"},d={class:"title-text title-border-ri",style:{width:"60%"}},h={class:"title-text"};function p(e,t,i,r,p,f){const m=Object(n["resolveComponent"])("el-input"),g=Object(n["resolveComponent"])("el-form-item"),y=Object(n["resolveComponent"])("el-form"),v=Object(n["resolveComponent"])("el-button"),_=Object(n["resolveComponent"])("el-dialog");return Object(n["openBlock"])(),Object(n["createBlock"])(_,{customClass:"customWidth",top:"10vh","lock-scroll":!1,onClose:t[2]||(t[2]=e=>f.close("form")),onOpen:f.open},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",a,Object(n["toDisplayString"])(i.className||"Teaching Effect Survey Form"),1),s,Object(n["createElementVNode"])("div",o,[Object(n["createVNode"])(y,{model:p.form,rules:p.rules,ref:"form"},{default:Object(n["withCtx"])(()=>[l,Object(n["createElementVNode"])("div",u,[Object(n["createElementVNode"])("div",c,Object(n["toDisplayString"])(i.presenter),1),Object(n["createElementVNode"])("div",d,Object(n["toDisplayString"])(i.title),1),Object(n["createElementVNode"])("div",h,[Object(n["createVNode"])(g,{prop:"score","status-icon":"true"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(m,{type:"text",oninput:"if(value>100)value=100;value=value.replace(/[^\\d]/g,'')",onkeyup:"value=value.replace(/[^\\d]/g,'')",onblur:"value=value.replace(/[^\\d]/g,'')",modelValue:p.form.score,"onUpdate:modelValue":t[0]||(t[0]=e=>p.form.score=e),placeholder:"score:"},null,8,["modelValue"])]),_:1})])])]),_:1},8,["model","rules"])]),Object(n["createVNode"])(v,{type:"primary",onClick:t[1]||(t[1]=e=>f.submitForm("form"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("submit")]),_:1})]),_:1},8,["onOpen"])}var f={name:"score",inject:["$global","$api","$message"],emits:["closeview"],props:{dialogFormVisible:Boolean,id:Number,evaluate:Number,presenter:String,title:String,className:String},data(){var e=(e,t,i)=>{if(!t)return i(new Error("Can not be empty"));setTimeout(()=>{t<1?i(new Error("Cannot be 0")):i()},1e3)};return{form:{score:"",comment:""},rules:{score:[{validator:e,trigger:"blur"}],comment:[{max:1e3,message:"Maximum 1000 characters",trigger:"blur"}]}}},created(){},mounted(){},watch:{},methods:{open(){"1"==this.evaluate&&this.getScheduleScore(this.id)},close(e){this.$refs[e].resetFields(),this.$emit("closeview",!1)},submitForm(e){this.$refs[e].validate(t=>{if(!t)return console.log("error submit!!"),!1;this.scheduleScore(e)})},scheduleScore(e){const t=this.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});let i={scheduleId:this.id,score:this.form.score,comment:this.form.comment};this.$api.courses.scheduleScore(i).then(i=>{let n=i.data;"0"==n.code?(this.$emit("closeview",!0),t.close(),this.close(e),this.$message.success(" Submitted successfully !")):(t.close(),this.$message.error("Evaluation on failure!"))}).catch(()=>{t.close(),console.log("api error")})},getScheduleScore(e){let t={token:this.$global.ss.getItem("userToken"),"Access-Control-Allow-Headers":"Origin"};this.$api.courses.getScheduleScore(t,e).then(e=>{let t=e.data;"0"==t.code?(this.form.comment=t.data.comment,this.form.score=t.data.score):console.log("api logout error")}).catch(e=>{console.log("api logout error")})}}},m=(i("5c60"),i("6b0d")),g=i.n(m);const y=g()(f,[["render",p],["__scopeId","data-v-3514610e"]]);t["a"]=y},"1b8d":function(e,t){function i(e){return e.replace(/\n\r?\s*/g,"")}e.exports=function(e){for(var t="",n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var n=i===t?0:4-i%4;return[i,n]}function c(e){var t=u(e),i=t[0],n=t[1];return 3*(i+n)/4-n}function d(e,t,i){return 3*(t+i)/4-i}function h(e){var t,i,n=u(e),s=n[0],o=n[1],l=new a(d(e,s,o)),c=0,h=o>0?s-4:s;for(i=0;i>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===o&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,l[c++]=255&t),1===o&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l}function p(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function f(e,t,i){for(var n,r=[],a=t;al?l:o+s));return 1===r?(t=e[i-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===r&&(t=(e[i-2]<<8)+e[i-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},2:function(e,t){},"25cc":function(e,t,i){e.exports=i.p+"assets/img/carousel_default.b0e9bfe4.jpg"},"2b8c":function(e,t,i){var n=i("be09"),r=e.exports={WebVTT:i("d02c4"),VTTCue:i("b03c"),VTTRegion:i("f97d")};n.vttjs=r,n.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=a,n.VTTRegion=s},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},"2cb7":function(e,t,i){"use strict";i("ee89")},"3d33":function(e,t,i){ /** * @license * Video.js 6.13.0 * Copyright Brightcove, Inc. * Available under Apache License Version 2.0 * * * Includes vtt.js * Available under Apache License Version 2.0 * */ function n(e){return e&&"object"===typeof e&&"default"in e?e["default"]:e}var r=n(i("672b")),a=n(i("cc57")),s=n(i("1b8d")),o=n(i("8c10")),l=n(i("eec7")),u=n(i("2b8c")),c="6.13.0",d=r.navigator&&r.navigator.userAgent||"",h=/AppleWebKit\/([\d.]+)/i.exec(d),p=h?parseFloat(h.pop()):null,f=/iPad/i.test(d),m=/iPhone/i.test(d)&&!f,g=/iPod/i.test(d),y=m||f||g,v=function(){var e=d.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),_=/Android/i.test(d),b=function(){var e=d.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),T=_&&/webkit/i.test(d)&&b<2.3,w=_&&b<5&&p<537,S=/Firefox/i.test(d),k=/Edge/i.test(d),E=!k&&(/Chrome/i.test(d)||/CriOS/i.test(d)),C=function(){var e=d.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),O=/MSIE\s8\.0/.test(d),A=function(){var e=/MSIE\s(\d+)\.\d/.exec(d),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(d)&&/rv:11.0/.test(d)&&(t=11),t}(),x=/Safari/i.test(d)&&!E&&!_&&!k,j=(x||y)&&!E,P=ie()&&("ontouchstart"in r||r.navigator.maxTouchPoints||r.DocumentTouch&&r.document instanceof r.DocumentTouch),L=ie()&&"backgroundSize"in r.document.createElement("video").style,I=(Object.freeze||Object)({IS_IPAD:f,IS_IPHONE:m,IS_IPOD:g,IS_IOS:y,IOS_VERSION:v,IS_ANDROID:_,ANDROID_VERSION:b,IS_OLD_ANDROID:T,IS_NATIVE_ANDROID:w,IS_FIREFOX:S,IS_EDGE:k,IS_CHROME:E,CHROME_VERSION:C,IS_IE8:O,IE_VERSION:A,IS_SAFARI:x,IS_ANY_SAFARI:j,TOUCH_ENABLED:P,BACKGROUND_SIZE_SUPPORTED:L}),M="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},D=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},B=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t},N=function(e,t){return e.raw=t,e},U=Object.prototype.toString,F=function(e){return W(e)?Object.keys(e):[]};function V(e,t){F(e).forEach((function(i){return t(e[i],i)}))}function H(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return F(e).reduce((function(i,n){return t(i,e[n],n)}),i)}function q(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],r=a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(X.warn(s(Q,e,i)),r.setAttribute(e,i)):"textContent"===e?oe(r,i):r[e]=i})),Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])})),n&&Ce(r,n),r}function oe(e,t){return"undefined"===typeof e.textContent?e.innerText=t:e.textContent=t,e}function le(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function ue(e,t){return ee(t),e.classList?e.classList.contains(t):te(t).test(e.className)}function ce(e,t){return e.classList?e.classList.add(t):ue(e,t)||(e.className=(e.className+" "+t).trim()),e}function de(e,t){return e.classList?e.classList.remove(t):(ee(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function he(e,t,i){var n=ue(e,t);if("function"===typeof i&&(i=i(e,t)),"boolean"!==typeof i&&(i=!n),i!==n)return i?ce(e,t):de(e,t),e}function pe(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var n=t[i];null===n||"undefined"===typeof n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function fe(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var a=n[r].name,s=n[r].value;"boolean"!==typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function me(e,t){return e.getAttribute(t)}function ge(e,t,i){e.setAttribute(t,i)}function ye(e,t){e.removeAttribute(t)}function ve(){a.body.focus(),a.onselectstart=function(){return!1}}function _e(){a.onselectstart=function(){return!0}}function be(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat(J(e,"height"))),i.width||(i.width=parseFloat(J(e,"width"))),i}}function Te(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=a.documentElement,n=a.body,s=i.clientLeft||n.clientLeft||0,o=r.pageXOffset||n.scrollLeft,l=t.left+o-s,u=i.clientTop||n.clientTop||0,c=r.pageYOffset||n.scrollTop,d=t.top+c-u;return{left:Math.round(l),top:Math.round(d)}}function we(e,t){var i={},n=Te(e),r=e.offsetWidth,a=e.offsetHeight,s=n.top,o=n.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-l+a)/a)),i.x=Math.max(0,Math.min(1,(u-o)/r)),i}function Se(e){return W(e)&&3===e.nodeType}function ke(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function Ee(e){return"function"===typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"===typeof e&&(e=e()),ne(e)||Se(e)?e:"string"===typeof e&&/\S/.test(e)?a.createTextNode(e):void 0})).filter((function(e){return e}))}function Ce(e,t){return Ee(t).forEach((function(t){return e.appendChild(t)})),e}function Oe(e,t){return Ce(ke(e),t)}function Ae(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||(9===A||0===e.button&&1===e.buttons))}var xe=ae("querySelector"),je=ae("querySelectorAll"),Pe=(Object.freeze||Object)({isReal:ie,isEl:ne,isInFrame:re,createEl:se,textContent:oe,prependTo:le,hasClass:ue,addClass:ce,removeClass:de,toggleClass:he,setAttributes:pe,getAttributes:fe,getAttribute:me,setAttribute:ge,removeAttribute:ye,blockTextSelection:ve,unblockTextSelection:_e,getBoundingClientRect:be,findPosition:Te,getPointerPosition:we,isTextNode:Se,emptyEl:ke,normalizeContent:Ee,appendContent:Ce,insertContent:Oe,isSingleLeftClick:Ae,$:xe,$$:je}),Le=1;function Ie(){return Le++}var Me={},Re="vdata"+(new Date).getTime();function De(e){var t=e[Re];return t||(t=e[Re]=Ie()),Me[t]||(Me[t]={}),Me[t]}function Be(e){var t=e[Re];return!!t&&!!Object.getOwnPropertyNames(Me[t]).length}function Ne(e){var t=e[Re];if(t){delete Me[t];try{delete e[Re]}catch(i){e.removeAttribute?e.removeAttribute(Re):e[Re]=null}}}function Ue(e,t){var i=De(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Ne(e)}function Fe(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function Ve(e){function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n=e||r.event;for(var s in e={},n)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&n.preventDefault||(e[s]=n[s]));if(e.target||(e.target=e.srcElement||a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var o=a.documentElement,l=a.body;e.pageX=e.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var He=!1;(function(){try{var e=Object.defineProperty({},"passive",{get:function(){He=!0}});r.addEventListener("test",null,e),r.removeEventListener("test",null,e)}catch(t){}})();var qe=["touchstart","touchmove"];function We(e,t,i){if(Array.isArray(t))return Fe(We,e,t,i);var n=De(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=Ie()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(!n.disabled){t=Ve(t);var r=n.handlers[t.type];if(r)for(var a=r.slice(0),s=0,o=a.length;s-1&&(r={passive:!0}),e.addEventListener(t,n.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function ze(e,t,i){if(Be(e)){var n=De(e);if(n.handlers){if(Array.isArray(t))return Fe(ze,e,t,i);var r=function(e,t){n.handlers[t]=[],Ue(e,t)};if(void 0!==t){var a=n.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s0)for(var r=0,s=e.length;r0)for(var o=0,l=t.length;o0)for(var u=0,c=i.length;u0)for(var d=0,h=n.length;d=t&&(e.apply(void 0,arguments),i=n)};return n},nt=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r,a=void 0,s=function(){n.clearTimeout(a),a=null},o=function(){var r=this,s=arguments,o=function(){a=null,o=null,i||e.apply(r,s)};!a&&i&&e.apply(r,s),n.clearTimeout(a),a=n.setTimeout(o,t)};return o.cancel=s,o},rt=function(){};rt.prototype.allowedEvents_={},rt.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},We(this,e,t),this.addEventListener=i},rt.prototype.addEventListener=rt.prototype.on,rt.prototype.off=function(e,t){ze(this,e,t)},rt.prototype.removeEventListener=rt.prototype.off,rt.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},Ye(this,e,t),this.addEventListener=i},rt.prototype.trigger=function(e){var t=e.type||e;"string"===typeof e&&(e={type:t}),e=Ve(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Ge(this,e)},rt.prototype.dispatchEvent=rt.prototype.trigger;var at=function(e){return e instanceof rt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"===typeof e[t]}))},st=function(e){return"string"===typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},ot=function(e){if(!e.nodeName&&!at(e))throw new Error("Invalid target; must be a DOM node or evented object.")},lt=function(e){if(!st(e))throw new Error("Invalid event type; must be a non-empty string or array.")},ut=function(e){if("function"!==typeof e)throw new Error("Invalid listener; must be a function.")},ct=function(e,t){var i=t.length<3||t[0]===e||t[0]===e.eventBusEl_,n=void 0,r=void 0,a=void 0;return i?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],a=t[1]):(n=t[0],r=t[1],a=t[2]),ot(n),lt(r),ut(a),a=tt(e,a),{isTargetingSelf:i,target:n,type:r,listener:a}},dt=function(e,t,i,n){ot(e),e.nodeName?$e[t](e,i,n):e[t](i,n)},ht={on:function(){for(var e=this,t=arguments.length,i=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=se("span",{className:"vjs-event-bus"});return q(e,ht),e.on("dispose",(function(){e.off(),r.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var ft={state:{},setState:function(e){var t=this;"function"===typeof e&&(e=e());var i=void 0;return V(e,(function(e,n){t.state[n]!==e&&(i=i||{},i[n]={from:t.state[n],to:e}),t.state[n]=e})),i&&at(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function mt(e,t){return q(e,ft),e.state=q({},e.state,t),"function"===typeof e.handleStateChanged&&at(e)&&e.on("statechanged",e.handleStateChanged),e}function gt(e){return"string"!==typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function yt(e,t){return gt(e)===gt(t)}function vt(){for(var e={},t=arguments.length,i=Array(t),n=0;n=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Ne(this.el_),this.el_=null),this.player_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return X.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=vt(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,i){return se(e,t,i)},e.prototype.localize=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[n],s=n&&n.split("-")[0],o=r&&r[s],l=i;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){var n=t[i-1],r=n;return"undefined"===typeof n&&(r=e),r}))),l},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=gt(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,r=void 0,a=void 0;if("string"===typeof t){a=gt(t);var s=i.componentClass||a;i.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!==typeof o)return null;r=new o(this.player_||this,i)}else r=t;if(this.children_.splice(n,0,r),"function"===typeof r.id&&(this.childIndex_[r.id()]=r),a=a||r.name&>(r.name()),a&&(this.childNameIndex_[a]=r),"function"===typeof r.el&&r.el()){var l=this.contentEl().children,u=l[n]||null;this.contentEl().insertBefore(r.el(),u)}return r},e.prototype.removeChild=function(e){if("string"===typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,i=this.options_.children;if(i){var n=this.options_,r=function(e){var i=e.name,r=e.opts;if(void 0!==n[i]&&(r=n[i]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(i,r);a&&(t[i]=a)}},a=void 0,s=e.getComponent("Tech");a=Array.isArray(i)?i:Object.keys(i),a.concat(Object.keys(this.options_).filter((function(e){return!a.some((function(t){return"string"===typeof t?e===t:e===t.name}))}))).map((function(e){var n=void 0,r=void 0;return"string"===typeof e?(n=e,r=i[n]||t.options_[n]||{}):(n=e.name,r=e),{name:n,opts:r}})).filter((function(t){var i=e.getComponent(t.opts.componentClass||gt(t.name));return i&&!s.isTech(i)})).forEach(r)}},e.prototype.buildCSSClass=function(){return""},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},e.prototype.$=function(e,t){return xe(e,t||this.contentEl())},e.prototype.$$=function(e,t){return je(e,t||this.contentEl())},e.prototype.hasClass=function(e){return ue(this.el_,e)},e.prototype.addClass=function(e){ce(this.el_,e)},e.prototype.removeClass=function(e){de(this.el_,e)},e.prototype.toggleClass=function(e,t){he(this.el_,e,t)},e.prototype.show=function(){this.removeClass("vjs-hidden")},e.prototype.hide=function(){this.addClass("vjs-hidden")},e.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},e.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.prototype.getAttribute=function(e){return me(this.el_,e)},e.prototype.setAttribute=function(e,t){ge(this.el_,e,t)},e.prototype.removeAttribute=function(e){ye(this.el_,e)},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.prototype.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t===t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+gt(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"===typeof r.getComputedStyle){var i=r.getComputedStyle(this.el_);t=i.getPropertyValue(e)||i[e]}if(t=parseFloat(t),0===t){var n="offset"+gt(e);t=this.el_[n]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,i=10,n=200,r=void 0;this.on("touchstart",(function(i){1===i.touches.length&&(t={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},e=(new Date).getTime(),r=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)r=!1;else if(t){var n=e.touches[0].pageX-t.pageX,a=e.touches[0].pageY-t.pageY,s=Math.sqrt(n*n+a*a);s>i&&(r=!1)}}));var a=function(){r=!1};this.on("touchleave",a),this.on("touchcancel",a),this.on("touchend",(function(i){if(t=null,!0===r){var a=(new Date).getTime()-e;a0&&u.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=i,i},e.getComponent=function(t){if(t)return t=gt(t),e.components_&&e.components_[t]?e.components_[t]:void 0},e}();function bt(e,t,i){if("number"!==typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}function Tt(e,t,i,n){return bt(e,n,i.length-1),i[n][t]}function wt(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Tt.bind(null,"start",0,e),end:Tt.bind(null,"end",1,e)}}function St(e,t){return Array.isArray(e)?wt(e):void 0===e||void 0===t?wt():wt([[e,t]])}function kt(e,t){var i=0,n=void 0,r=void 0;if(!t)return 0;e&&e.length||(e=St(0,0));for(var a=0;at&&(r=t),i+=r-n;return i/t}_t.prototype.supportsRaf_="function"===typeof r.requestAnimationFrame&&"function"===typeof r.cancelAnimationFrame,_t.registerComponent("Component",_t);for(var Et={},Ct=[["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"]],Ot=Ct[0],At=void 0,xt=0;xt0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;R(this,t);var s=B(this,e.call(this));if(!r&&(r=s,O))for(var o in r=a.createElement("custom"),t.prototype)"constructor"!==o&&(r[o]=t.prototype[o]);r.tracks_=[],Object.defineProperty(r,"length",{get:function(){return this.tracks_.length}});for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);for(var s=void 0,o=r.length-1;o>=0;o--)if(r[o].enabled){Wt(r,r[o]);break}if(O){for(var l in s=a.createElement("custom"),Ht.prototype)"constructor"!==l&&(s[l]=Ht.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=B(this,e.call(this,r,s)),s=i,s.changing_=!1,n=s,B(i,n)}return D(t,e),t.prototype.addTrack=function(t){var i=this;t.enabled&&Wt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",(function(){i.changing_||(i.changing_=!0,Wt(i,t),i.changing_=!1,i.trigger("change"))}))},t}(Ht),Gt=function(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);for(var s=void 0,o=r.length-1;o>=0;o--)if(r[o].selected){Gt(r,r[o]);break}if(O){for(var l in s=a.createElement("custom"),Ht.prototype)"constructor"!==l&&(s[l]=Ht.prototype[l]);for(var u in t.prototype)"constructor"!==u&&(s[u]=t.prototype[u])}return i=B(this,e.call(this,r,s)),s=i,s.changing_=!1,Object.defineProperty(s,"selectedIndex",{get:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:[];R(this,t);var s=void 0;if(O){for(var o in s=a.createElement("custom"),Ht.prototype)"constructor"!==o&&(s[o]=Ht.prototype[o]);for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l])}return i=B(this,e.call(this,r,s)),s=i,n=s,B(i,n)}return D(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",tt(this,(function(){this.trigger("change")})));var i=["metadata","chapters"];-1===i.indexOf(t.kind)&&t.addEventListener("modechange",tt(this,(function(){this.trigger("selectedlanguagechange")})))},t}(Ht),Xt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];R(this,e);var i=this;if(O)for(var n in i=a.createElement("custom"),e.prototype)"constructor"!==n&&(i[n]=e.prototype[n]);i.trackElements_=[],Object.defineProperty(i,"length",{get:function(){return this.trackElements_.length}});for(var r=0,s=t.length;r0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var r=B(this,e.call(this)),s=r;if(O)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l={id:n.id||"vjs_track_"+Ie(),kind:n.kind||"",label:n.label||"",language:n.language||""},u=function(e){Object.defineProperty(s,e,{get:function(){return l[e]},set:function(){}})};for(var c in l)u(c);return i=s,B(r,i)}return D(t,e),t}(rt),ii=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=a.createElement("a");i.href=e;var n=""===i.host&&"file:"!==i.protocol,s=void 0;n&&(s=a.createElement("div"),s.innerHTML='',i=s.firstChild,s.setAttribute("style","display:none; position:absolute;"),a.body.appendChild(s));for(var o={},l=0;lx',e=t.firstChild.href}return e},ri=function(e){if("string"===typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,i=t.exec(e);if(i)return i.pop().toLowerCase()}return""},ai=function(e){var t=r.location,i=ii(e),n=":"===i.protocol?t.protocol:i.protocol,a=n+i.host!==t.protocol+t.host;return a},si=(Object.freeze||Object)({parseUrl:ii,getAbsoluteURL:ni,getFileExtension:ri,isCrossOrigin:ai}),oi=function(e,t){var i=new r.WebVTT.Parser(r,r.vttjs,r.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(r.console&&r.console.groupCollapsed&&r.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach((function(e){return X.error(e)})),r.console&&r.console.groupEnd&&r.console.groupEnd()),i.flush()},li=function(e,t){var i={uri:e},n=ai(e);n&&(i.cors=n),l(i,tt(this,(function(e,i,n){if(e)return X.error(e,i);if(t.loaded_=!0,"function"!==typeof r.WebVTT){if(t.tech_){var a=function(){return oi(n,t)};t.tech_.on("vttjsloaded",a),t.tech_.on("vttjserror",(function(){X.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",a)}))}}else oi(n,t)})))},ui=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(R(this,t),!r.tech)throw new Error("A tech was not provided.");var a=vt(r,{kind:Zt[r.kind]||"subtitles",language:r.language||r.srclang||""}),s=ei[a.mode]||"disabled",o=a["default"];"metadata"!==a.kind&&"chapters"!==a.kind||(s="hidden");var l=(i=B(this,e.call(this,a)),i);if(l.tech_=a.tech,O)for(var u in t.prototype)"constructor"!==u&&(l[u]=t.prototype[u]);l.cues_=[],l.activeCues_=[];var c=new Kt(l.cues_),d=new Kt(l.activeCues_),h=!1,p=tt(l,(function(){this.activeCues=this.activeCues,h&&(this.trigger("cuechange"),h=!1)}));return"disabled"!==s&&l.tech_.ready((function(){l.tech_.on("timeupdate",p)}),!0),Object.defineProperty(l,"default",{get:function(){return o},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(e){var t=this;ei[e]&&(s=e,"disabled"!==s?this.tech_.ready((function(){t.tech_.on("timeupdate",p)}),!0):this.tech_.off("timeupdate",p),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?c:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(h=!1,t.length!==this.activeCues_.length)h=!0;else for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var a=vt(r,{kind:Qt[r.kind]||""}),s=(i=B(this,e.call(this,a)),i),o=!1;if(O)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),a.enabled&&(s.enabled=a.enabled),s.loaded_=!0,n=s,B(i,n)}return D(t,e),t}(ti),di=function(e){function t(){var i,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var a=vt(r,{kind:Jt[r.kind]||""}),s=(i=B(this,e.call(this,a)),i),o=!1;if(O)for(var l in t.prototype)"constructor"!==l&&(s[l]=t.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return o},set:function(e){"boolean"===typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),a.selected&&(s.selected=a.selected),n=s,B(i,n)}return D(t,e),t}(ti),hi=0,pi=1,fi=2,mi=3,gi=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};R(this,t);var n=B(this,e.call(this)),r=void 0,s=n;if(O)for(var o in s=a.createElement("custom"),t.prototype)"constructor"!==o&&(s[o]=t.prototype[o]);var l,u=new ui(i);return s.kind=u.kind,s.src=u.src,s.srclang=u.language,s.label=u.label,s["default"]=u["default"],Object.defineProperty(s,"readyState",{get:function(){return r}}),Object.defineProperty(s,"track",{get:function(){return u}}),r=hi,u.addEventListener("loadeddata",(function(){r=fi,s.trigger({type:"load",target:s})})),O?(l=s,B(n,l)):n}return D(t,e),t}(rt);gi.prototype.allowedEvents_={load:"load"},gi.NONE=hi,gi.LOADING=pi,gi.LOADED=fi,gi.ERROR=mi;var yi={audio:{ListClass:zt,TrackClass:ci,capitalName:"Audio"},video:{ListClass:Yt,TrackClass:di,capitalName:"Video"},text:{ListClass:$t,TrackClass:ui,capitalName:"Text"}};Object.keys(yi).forEach((function(e){yi[e].getterName=e+"Tracks",yi[e].privateName=e+"Tracks_"}));var vi={remoteText:{ListClass:$t,TrackClass:ui,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Xt,TrackClass:gi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},_i=vt(yi,vi);function bi(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var s=new _i.text.TrackClass(r);return a.addTrack(s),s}vi.names=Object.keys(vi),yi.names=Object.keys(yi),_i.names=[].concat(vi.names).concat(yi.names);var Ti=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};R(this,t),i.reportTouchActivity=!1;var r=B(this,e.call(this,null,i,n));return r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),_i.names.forEach((function(e){var t=_i[e];i&&i[t.getterName]&&(r[t.privateName]=i[t.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===i["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===i.nativeCaptions||!1===i.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new _i.text.ListClass,r.initTrackListeners(),i.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}return D(t,e),t.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(tt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return St(0,0)},t.prototype.bufferedPercent=function(){return kt(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(yi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach((function(e){var i=t[e+"Tracks"]()||[],n=i.length;while(n--){var r=i[n];"text"===e&&t.removeRemoteTextTrack(r),i.removeTrack(r)}}))},t.prototype.cleanupAutoTextTracks=function(){var e=this.autoRemoteTextTracks_||[],t=e.length;while(t--){var i=e[t];this.removeRemoteTextTrack(i)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new Pt(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?St(0,0):St()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTrackListeners=function(){var e=this;yi.names.forEach((function(t){var i=yi[t],n=function(){e.trigger(t+"trackchange")},r=e[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),e.on("dispose",(function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!r.WebVTT)if(a.body.contains(this.el())){if(!this.options_["vtt.js"]&&z(u)&&Object.keys(u).length>0)return void this.trigger("vttjsloaded");var t=a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),r.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),n=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],n=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(X.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==i&&this.ready((function(){return e.autoRemoteTextTracks_.addTrack(n.track)})),n},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=gt(e),t.techs_[e]=i,"Tech"!==e&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(e)return e=gt(e),t.techs_&&t.techs_[e]?t.techs_[e]:r&&r.videojs&&r.videojs[e]?(X.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r.videojs[e]):void 0},t}(_t);_i.names.forEach((function(e){var t=_i[e];Ti.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Ti.prototype.featuresVolumeControl=!0,Ti.prototype.featuresMuteControl=!0,Ti.prototype.featuresFullscreenResize=!1,Ti.prototype.featuresPlaybackRate=!1,Ti.prototype.featuresProgressEvents=!1,Ti.prototype.featuresSourceset=!1,Ti.prototype.featuresTimeupdateEvents=!1,Ti.prototype.featuresNativeTextTracks=!1,Ti.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(var i=e.sourceHandlers||[],n=void 0,r=0;r3&&void 0!==arguments[3]?arguments[3]:null,r="call"+gt(i),a=e.reduce(Mi(r),n),s=a===ki,o=s?null:t[i](a);return Ri(e,i,o,s),o}var Pi={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Li={setCurrentTime:1},Ii={play:1,pause:1};function Mi(e){return function(t,i){return t===ki?ki:i[e]?i[e](t):t}}function Ri(e,t,i,n){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](n,i)}}function Di(e){Si[e.id()]=null}function Bi(e,t){var i=Si[e.id()],n=null;if(void 0===i||null===i)return n=t(e),Si[e.id()]=[[t,n]],n;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments[2],n=arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=t[0],o=t.slice(1);if("string"===typeof s)Ni(e,wi[s],i,n,r,a);else if(s){var l=Bi(n,s);if(!l.setSource)return r.push(l),Ni(e,o,i,n,r,a);l.setSource(q({},e),(function(t,s){if(t)return Ni(e,o,i,n,r,a);r.push(l),Ni(s,e.type===s.type?o:wi[s.type],i,n,r,a)}))}else o.length?Ni(e,o,i,n,r,a):a?i(e,r):Ni(e,wi["*"],i,n,r,!0)}var Ui={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Fi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=ri(e),i=Ui[t.toLowerCase()];return i||""},Vi=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter((function(e){return e.src===t}));if(i.length)return i[0].type;for(var n=e.$$("source"),r=0;r0&&void 0!==arguments[0]?arguments[0]:"div",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=q({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},i),"button"===t&&X.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=q({role:"button"},n),this.tabIndex_=i.tabIndex;var r=e.prototype.createEl.call(this,t,i,n);return this.createControlTextEl(r),r},t.prototype.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=se("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,oe(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},t.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){We(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){ze(a,"keydown",tt(this,this.handleKeyPress))},t}(_t);_t.registerComponent("ClickableComponent",zi);var Gi=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.update(),i.on("posterchange",tt(r,r.update)),r}return D(t,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=se("div",{className:"vjs-poster",tabIndex:-1});return L||(this.fallbackImg_=se("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?Mt(this.player_.play()):this.player_.pause())},t}(zi);_t.registerComponent("PosterImage",Gi);var Yi="#222",$i="#ccc",Xi={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Ki(e,t){var i=void 0;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Ji(e,t,i){try{e.style[t]=i}catch(n){return}}var Qi=function(e){function t(i,n,a){R(this,t);var s=B(this,e.call(this,i,n,a)),o=tt(s,s.updateDisplay);return i.on("loadstart",tt(s,s.toggleDisplay)),i.on("texttrackchange",o),i.on("loadstart",tt(s,s.preselectTrack)),i.ready(tt(s,(function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",o),i.on("playerresize",o),r.addEventListener&&r.addEventListener("orientationchange",o),i.on("dispose",(function(){return r.removeEventListener("orientationchange",o)}));for(var e=this.options_.playerOptions.tracks||[],t=0;t1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e="button",t=q({innerHTML:'',className:this.buildCSSClass()},t),i=q({type:"button"},i);var n=_t.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(n),n},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.constructor.name;return X.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),_t.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(zi);_t.registerComponent("Button",en);var tn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)Mt(t);else{var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){var r=function(){return n.focus()};It(t)?t.then(r,(function(){})):this.setTimeout(r,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(en);tn.prototype.controlText_="Play Video",_t.registerComponent("BigPlayButton",tn);var nn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.controlText(n&&n.controlText||r.localize("Close")),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(en);_t.registerComponent("CloseButton",nn);var rn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.on(i,"play",r.handlePlay),r.on(i,"pause",r.handlePause),r.on(i,"ended",r.handleEnded),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(en);rn.prototype.controlText_="Play",_t.registerComponent("PlayToggle",rn);var an=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),r=r>0||s>0?r+":":"",n=((r||a>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,r+n+i},sn=an;function on(e){sn=e}function ln(){sn=an}var un=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return sn(e,t)},cn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.throttledUpdateContent=it(tt(r,r.updateContent),25),r.on(i,"timeupdate",r.throttledUpdateContent),r}return D(t,e),t.prototype.createEl=function(t){var i=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:i+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=se("span",{className:i+"-display"},{"aria-live":"off"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},t.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.prototype.updateTextNode_=function(){if(this.contentEl_){while(this.contentEl_.firstChild)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=a.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.prototype.formatTime_=function(e){return un(e)},t.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.prototype.updateContent=function(e){},t}(_t);cn.prototype.labelText_="Time",cn.prototype.controlText_="Time",_t.registerComponent("TimeDisplay",cn);var dn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.on(i,"ended",r.handleEnded),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-current-time"},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(cn);dn.prototype.labelText_="Current Time",dn.prototype.controlText_="Current Time",_t.registerComponent("CurrentTimeDisplay",dn);var hn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.on(i,"durationchange",r.updateContent),r.on(i,"loadedmetadata",r.throttledUpdateContent),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-duration"},t.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(cn);hn.prototype.labelText_="Duration",hn.prototype.controlText_="Duration",_t.registerComponent("DurationDisplay",hn);var pn=function(e){function t(){return R(this,t),B(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},t}(_t);_t.registerComponent("TimeDivider",pn);var fn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.on(i,"durationchange",r.throttledUpdateContent),r.on(i,"ended",r.handleEnded),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-remaining-time"},t.prototype.formatTime_=function(t){return"-"+e.prototype.formatTime_.call(this,t)},t.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(cn);fn.prototype.labelText_="Remaining Time",fn.prototype.controlText_="Remaining Time",_t.registerComponent("RemainingTimeDisplay",fn);var mn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}return D(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=se("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(_t);_t.registerComponent("LiveDisplay",mn);var gn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}return D(t,e),t.prototype.enabled=function(){return this.enabled_},t.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)},t.prototype.disable=function(){if(this.enabled()){var e=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(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.prototype.createEl=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.className=i.className+" vjs-slider",i=q({tabIndex:0},i),n=q({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,i,n)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||E||e.preventDefault(),ve(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;_e(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!==typeof e||e!==e||e<0||e===1/0)&&(e=0);var i=(100*e).toFixed(2)+"%",n=t.el().style;return this.vertical()?n.height=i:n.width=i,e}}},t.prototype.calculateDistance=function(e){var t=we(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(_t);_t.registerComponent("Slider",gn);var yn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.partEls_=[],r.on(i,"progress",r.update),r}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},t.prototype.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},t.prototype.update=function(e){var t=this.player_.buffered(),i=this.player_.duration(),n=this.player_.bufferedEnd(),r=this.partEls_,a=function(e,t){var i=e/t||0;return 100*(i>=1?1:i)+"%"};this.el_.style.width=a(n,i);for(var s=0;st.length;c--)this.el_.removeChild(r[c-1]);r.length=t.length},t}(_t);_t.registerComponent("LoadProgressBar",yn);var vn=function(e){function t(){return R(this,t),B(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,i){var n=be(this.el_),r=be(this.player_.el()),a=e.width*t;if(r&&n){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),l=n.width/2;sn.width&&(l=n.width),this.el_.style.right="-"+l+"px",oe(this.el_,i)}},t}(_t);_t.registerComponent("TimeTooltip",vn);var _n=function(e){function t(){return R(this,t),B(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=i.player_.scrubbing()?i.player_.getCache().currentTime:i.player_.currentTime(),r=un(n,i.player_.duration()),a=i.getChild("timeTooltip");a&&a.update(e,t,r)}))},t}(_t);_n.prototype.options_={children:[]},A&&!(A>8)||y||_||_n.prototype.options_.children.push("timeTooltip"),_t.registerComponent("PlayProgressBar",_n);var bn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.update=it(tt(r,r.update),25),r}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.update=function(e,t){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var n=i.player_.duration(),r=un(t*n,n);i.el_.style.left=e.width*t+"px",i.getChild("timeTooltip").update(e,t,r)}))},t}(_t);bn.prototype.options_={children:["timeTooltip"]},_t.registerComponent("MouseTimeDisplay",bn);var Tn=5,wn=30,Sn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.setEventHandlers_(),r}return D(t,e),t.prototype.setEventHandlers_=function(){var e=this;this.update=it(tt(this,this.update),wn),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval((function(){e.requestAnimationFrame((function(){e.update()}))}),wn)})),this.on(this.player_,["ended","pause","waiting"],(function(){e.clearInterval(e.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.prototype.update_=function(e,t){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[un(e,i),un(i,i)],"{1} of {2}")),this.bar.update(be(this.el_),t)},t.prototype.update=function(t){var i=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),i),i},t.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){Ae(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.prototype.handleMouseMove=function(e){if(Ae(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},t.prototype.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.prototype.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Mt(this.player_.play())},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+Tn)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-Tn)},t.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t}(gn);Sn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},A&&!(A>8)||y||_||Sn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Sn.prototype.playerEvent="timeupdate",_t.registerComponent("SeekBar",Sn);var kn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.handleMouseMove=it(tt(r,r.handleMouseMove),25),r.throttledHandleMouseSeek=it(tt(r,r.handleMouseSeek),25),r.enable(),r}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("mouseTimeDisplay"),n=t.el(),r=be(n),a=we(n,e).x;a>1?a=1:a<0&&(a=0),i&&i.update(r,a)}},t.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.prototype.enabled=function(){return this.enabled_},t.prototype.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.prototype.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(_t);kn.prototype.options_={children:["seekBar"]},_t.registerComponent("ProgressControl",kn);var En=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.on(i,"fullscreenchange",r.handleFullscreenChange),!1===a[Et.fullscreenEnabled]&&r.disable(),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(en);En.prototype.controlText_="Fullscreen",_t.registerComponent("FullscreenToggle",En);var Cn=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},On=function(e){function t(){return R(this,t),B(this,e.apply(this,arguments))}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},t}(_t);_t.registerComponent("VolumeLevel",On);var An=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.on("slideractive",r.updateLastVolume_),r.on(i,"volumechange",r.updateARIAAttributes),i.ready((function(){return r.updateARIAAttributes()})),r}return D(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.prototype.handleMouseDown=function(t){Ae(t)&&e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){Ae(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(gn);An.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},An.prototype.playerEvent="volumechange",_t.registerComponent("VolumeBar",An);var xn=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t),n.vertical=n.vertical||!1,("undefined"===typeof n.volumeBar||z(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical);var r=B(this,e.call(this,i,n));return Cn(r,i),r.throttledHandleMouseMove=it(tt(r,r.handleMouseMove),25),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}return D(t,e),t.prototype.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(_t);xn.prototype.options_={children:["volumeBar"]},_t.registerComponent("VolumeControl",xn);var jn=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))},Pn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return jn(r,i),r.on(i,["loadstart","volumechange"],r.update),r}return D(t,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},t.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;y&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)de(this.el_,"vjs-vol-"+i);ce(this.el_,"vjs-vol-"+t)},t.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume(),t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(en);Pn.prototype.controlText_="Mute",_t.registerComponent("MuteToggle",Pn);var Ln=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t),"undefined"!==typeof n.inline?n.inline=n.inline:n.inline=!0,("undefined"===typeof n.volumeControl||z(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline);var r=B(this,e.call(this,i,n));return r.on(i,["loadstart"],r.volumePanelState_),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}return D(t,e),t.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},t.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.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")},t.prototype.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t}(_t);Ln.prototype.options_={children:["muteToggle","volumeControl"]},_t.registerComponent("VolumePanel",Ln);var In=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyPress),r}return D(t,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",tt(this,(function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=se(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),We(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},t.prototype.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice(),i=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);i&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(_t);_t.registerComponent("Menu",In);var Mn=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R(this,t);var r=B(this,e.call(this,i,n));r.menuButton_=new en(i,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var a=en.prototype.buildCSSClass();return r.menuButton_.el_.className=r.buildCSSClass()+" "+a,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0,r.on(r.menuButton_,"tap",r.handleClick),r.on(r.menuButton_,"click",r.handleClick),r.on(r.menuButton_,"focus",r.handleFocus),r.on(r.menuButton_,"blur",r.handleBlur),r.on("keydown",r.handleSubmenuKeyPress),r}return D(t,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new In(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=se("li",{className:"vjs-menu-title",innerHTML:gt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),le(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},t.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",tt(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.focus=function(){this.menuButton_.focus()},t.prototype.blur=function(){this.menuButton_.blur()},t.prototype.handleFocus=function(){We(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleBlur=function(){ze(a,"keydown",tt(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},t.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),y&&re())return;this.menu.focus()}},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(_t);_t.registerComponent("MenuButton",Mn);var Rn=function(e){function t(i,n){R(this,t);var r=n.tracks,a=B(this,e.call(this,i,n));if(a.items.length<=1&&a.hide(),!r)return B(a);var s=tt(a,a.update);return r.addEventListener("removetrack",s),r.addEventListener("addtrack",s),a.player_.on("ready",s),a.player_.on("dispose",(function(){r.removeEventListener("removetrack",s),r.removeEventListener("addtrack",s)})),a}return D(t,e),t}(Mn);_t.registerComponent("TrackButton",Rn);var Dn=function(e){function t(i,n){R(this,t);var r=B(this,e.call(this,i,n));return r.selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}return D(t,e),t.prototype.createEl=function(t,i,n){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",q({className:"vjs-menu-item",innerHTML:''+this.localize(this.options_.label)+"",tabIndex:-1},i),n)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(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))},t}(zi);_t.registerComponent("MenuItem",Dn);var Bn=function(e){function t(i,n){R(this,t);var s=n.track,o=i.textTracks();n.label=s.label||s.language||"Unknown",n.selected="showing"===s.mode;var l=B(this,e.call(this,i,n));l.track=s;var u=function(){for(var e=arguments.length,t=Array(e),i=0;i-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},t.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},t.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},t.prototype.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(Dn);_t.registerComponent("TextTrackMenuItem",Bn);var Nn=function(e){function t(i,n){return R(this,t),n.track={player:i,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,B(this,e.call(this,i,n))}return D(t,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n-1&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},t.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n-1&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Bn);_t.registerComponent("OffTextTrackMenuItem",Nn);var Un=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return R(this,t),n.tracks=i.textTracks(),B(this,e.call(this,i,n))}return D(t,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bn,i=void 0;this.label_&&(i=this.label_+" off"),e.push(new Nn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r-1){var s=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(Rn);_t.registerComponent("TextTrackButton",Un);var Fn=function(e){function t(i,n){R(this,t);var r=n.track,a=n.cue,s=i.currentTime();n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s=0;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(gt(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i