=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,c=!1;return{s:function(){a=t[Symbol.iterator]()},n:function(){var t=a.next();return s=t.done,t},e:function(t){c=!0,r=t},f:function(){try{s||null==a["return"]||a["return"]()}finally{if(c)throw r}}}}},bac8:function(t,e,a){"use strict";var n=a("dcce"),i=a.n(n);i.a},d28b:function(t,e,a){var n=a("746f");n("iterator")},dcce:function(t,e,a){var n=a("0174");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("499e").default;i("80004b20",n,!0,{sourceMap:!1,shadowMode:!1})},e01a:function(t,e,a){"use strict";var n=a("23e7"),i=a("83ab"),o=a("da84"),r=a("5135"),s=a("861d"),c=a("9bf2").f,l=a("e893"),u=o.Symbol;if(i&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var d={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof h?new u(t):void 0===t?u():u(t);return""===t&&(d[e]=!0),e};l(h,u);var f=h.prototype=u.prototype;f.constructor=h;var p=f.toString,v="Symbol(test)"==String(u("test")),b=/^Symbol\((.*)\)[^)]+$/;c(f,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=p.call(t);if(r(d,t))return"";var a=v?e.slice(7,-1):e.replace(b,"$1");return""===a?void 0:a}}),n({global:!0,forced:!0},{Symbol:h})}},fb6a:function(t,e,a){"use strict";var n=a("23e7"),i=a("861d"),o=a("e8b5"),r=a("23cb"),s=a("50c4"),c=a("fc6a"),l=a("8418"),u=a("b622"),d=a("1dde"),h=a("ae40"),f=d("slice"),p=h("slice",{ACCESSORS:!0,0:0,1:2}),v=u("species"),b=[].slice,g=Math.max;n({target:"Array",proto:!0,forced:!f||!p},{slice:function(t,e){var a,n,u,d=c(this),h=s(d.length),f=r(t,h),p=r(void 0===e?h:e,h);if(o(d)&&(a=d.constructor,"function"!=typeof a||a!==Array&&!o(a.prototype)?i(a)&&(a=a[v],null===a&&(a=void 0)):a=void 0,a===Array||void 0===a))return b.call(d,f,p);for(n=new(void 0===a?Array:a)(g(p-f,0)),u=0;f=0&&t<=100}function o(){var t=100,e=3,n=0,o=100,s=0,a=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!i(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!==typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!i(t))throw new Error("RegionAnchorX must be between 0 and 100.");o=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!i(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(t){if(!i(t))throw new Error("ViewportAnchorY must be between 0 and 100.");a=t}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(t){if(!i(t))throw new Error("ViewportAnchorX must be between 0 and 100.");s=t}},scroll:{enumerable:!0,get:function(){return l},set:function(t){var e=r(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");l=e}}})}t.exports=o},6081:function(t,e,n){"use strict";var r=n("d302"),i=n.n(r);i.a},6767:function(t,e,n){
-/**
- * @license
- * Video.js 6.12.1
- * Copyright Brightcove, Inc.
- * Available under Apache License Version 2.0
- *
- *
- * Includes vtt.js
- * Available under Apache License Version 2.0
- *
- */
-function r(t){return t&&"object"===typeof t&&"default"in t?t["default"]:t}var i=r(n("ecdc")),o=r(n("0335")),s=r(n("1f90")),a=r(n("0630")),l=r(n("eaf9")),c=r(n("edcb")),u="6.12.1",h=i.navigator&&i.navigator.userAgent||"",p=/AppleWebKit\/([\d.]+)/i.exec(h),d=p?parseFloat(p.pop()):null,f=/iPad/i.test(h),v=/iPhone/i.test(h)&&!f,y=/iPod/i.test(h),g=v||f||y,m=function(){var t=h.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),_=/Android/i.test(h),b=function(){var t=h.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),T=_&&/webkit/i.test(h)&&b<2.3,C=_&&b<5&&d<537,k=/Firefox/i.test(h),w=/Edge/i.test(h),E=!w&&(/Chrome/i.test(h)||/CriOS/i.test(h)),S=function(){var t=h.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),j=/MSIE\s8\.0/.test(h),x=function(){var t=/MSIE\s(\d+)\.\d/.exec(h),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(h)&&/rv:11.0/.test(h)&&(e=11),e}(),P=/Safari/i.test(h)&&!E&&!_&&!w,A=(P||g)&&!E,O=nt()&&("ontouchstart"in i||i.navigator.maxTouchPoints||i.DocumentTouch&&i.document instanceof i.DocumentTouch),M=nt()&&"backgroundSize"in i.document.createElement("video").style,N=(Object.freeze||Object)({IS_IPAD:f,IS_IPHONE:v,IS_IPOD:y,IS_IOS:g,IOS_VERSION:m,IS_ANDROID:_,ANDROID_VERSION:b,IS_OLD_ANDROID:T,IS_NATIVE_ANDROID:C,IS_FIREFOX:k,IS_EDGE:w,IS_CHROME:E,CHROME_VERSION:S,IS_IE8:j,IE_VERSION:x,IS_SAFARI:P,IS_ANY_SAFARI:A,TOUCH_ENABLED:O,BACKGROUND_SIZE_SUPPORTED:M}),I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},R=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},L=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e},B=function(t,e){return t.raw=e,t},F=Object.prototype.toString,H=function(t){return U(t)?Object.keys(t):[]};function V(t,e){H(t).forEach((function(n){return e(t[n],n)}))}function z(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return H(t).reduce((function(n,r){return e(n,t[r],r)}),n)}function W(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:!!x&&x<11,r=X.levels[K],o=new RegExp("^("+r+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),q&&q.push([].concat(e)),e.unshift("VIDEOJS:"),i.console){var s=i.console[t];s||"debug"!==t||(s=i.console.info||i.console.log),s&&r&&o.test(t)&&(n&&(e=e.map((function(t){if(U(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)})).join(" ")),s.apply?s[Array.isArray(e)?"apply":"call"](i.console,e):s(e))}};X=function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=o.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(G.warn(s(Q,t,n)),i.setAttribute(t,n)):"textContent"===t?at(i,n):i[t]=n})),Object.getOwnPropertyNames(n).forEach((function(t){i.setAttribute(t,n[t])})),r&&St(i,r),i}function at(t,e){return"undefined"===typeof t.textContent?t.innerText=e:t.textContent=e,t}function lt(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function ct(t,e){return tt(e),t.classList?t.classList.contains(e):et(e).test(t.className)}function ut(t,e){return t.classList?t.classList.add(e):ct(t,e)||(t.className=(t.className+" "+e).trim()),t}function ht(t,e){return t.classList?t.classList.remove(e):(tt(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function pt(t,e,n){var r=ct(t,e);if("function"===typeof n&&(n=n(t,e)),"boolean"!==typeof n&&(n=!r),n!==r)return n?ut(t,e):ht(t,e),t}function dt(t,e){Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];null===r||"undefined"===typeof r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)}))}function ft(t){var e={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,s=r[i].value;"boolean"!==typeof t[o]&&-1===n.indexOf(","+o+",")||(s=null!==s),e[o]=s}return e}function vt(t,e){return t.getAttribute(e)}function yt(t,e,n){t.setAttribute(e,n)}function gt(t,e){t.removeAttribute(e)}function mt(){o.body.focus(),o.onselectstart=function(){return!1}}function _t(){o.onselectstart=function(){return!0}}function bt(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),n.height||(n.height=parseFloat(J(t,"height"))),n.width||(n.width=parseFloat(J(t,"width"))),n}}function Tt(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=o.documentElement,r=o.body,s=n.clientLeft||r.clientLeft||0,a=i.pageXOffset||r.scrollLeft,l=e.left+a-s,c=n.clientTop||r.clientTop||0,u=i.pageYOffset||r.scrollTop,h=e.top+u-c;return{left:Math.round(l),top:Math.round(h)}}function Ct(t,e){var n={},r=Tt(t),i=t.offsetWidth,o=t.offsetHeight,s=r.top,a=r.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-l+o)/o)),n.x=Math.max(0,Math.min(1,(c-a)/i)),n}function kt(t){return U(t)&&3===t.nodeType}function wt(t){while(t.firstChild)t.removeChild(t.firstChild);return t}function Et(t){return"function"===typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"===typeof t&&(t=t()),rt(t)||kt(t)?t:"string"===typeof t&&/\S/.test(t)?o.createTextNode(t):void 0})).filter((function(t){return t}))}function St(t,e){return Et(e).forEach((function(e){return t.appendChild(e)})),t}function jt(t,e){return St(wt(t),e)}function xt(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||(9===x||0===t.button&&1===t.buttons))}var Pt=ot("querySelector"),At=ot("querySelectorAll"),Ot=(Object.freeze||Object)({isReal:nt,isEl:rt,isInFrame:it,createEl:st,textContent:at,prependTo:lt,hasClass:ct,addClass:ut,removeClass:ht,toggleClass:pt,setAttributes:dt,getAttributes:ft,getAttribute:vt,setAttribute:yt,removeAttribute:gt,blockTextSelection:mt,unblockTextSelection:_t,getBoundingClientRect:bt,findPosition:Tt,getPointerPosition:Ct,isTextNode:kt,emptyEl:wt,normalizeContent:Et,appendContent:St,insertContent:jt,isSingleLeftClick:xt,$:Pt,$$:At}),Mt=1;function Nt(){return Mt++}var It={},Dt="vdata"+(new Date).getTime();function Rt(t){var e=t[Dt];return e||(e=t[Dt]=Nt()),It[e]||(It[e]={}),It[e]}function Lt(t){var e=t[Dt];return!!e&&!!Object.getOwnPropertyNames(It[e]).length}function Bt(t){var e=t[Dt];if(e){delete It[e];try{delete t[Dt]}catch(n){t.removeAttribute?t.removeAttribute(Dt):t[Dt]=null}}}function Ft(t,e){var n=Rt(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Bt(t)}function Ht(t,e,n,r){n.forEach((function(n){t(e,n,r)}))}function Vt(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||i.event;for(var s in t={},r)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&r.preventDefault||(t[s]=r[s]));if(t.target||(t.target=t.srcElement||o),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var a=o.documentElement,l=o.body;t.pageX=t.clientX+(a&&a.scrollLeft||l&&l.scrollLeft||0)-(a&&a.clientLeft||l&&l.clientLeft||0),t.pageY=t.clientY+(a&&a.scrollTop||l&&l.scrollTop||0)-(a&&a.clientTop||l&&l.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}var zt=!1;(function(){try{var t=Object.defineProperty({},"passive",{get:function(){zt=!0}});i.addEventListener("test",null,t),i.removeEventListener("test",null,t)}catch(e){}})();var Wt=["touchstart","touchmove"];function Ut(t,e,n){if(Array.isArray(e))return Ht(Ut,t,e,n);var r=Rt(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=Nt()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=Vt(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),s=0,a=o.length;s-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function $t(t,e,n){if(Lt(t)){var r=Rt(t);if(r.handlers){if(Array.isArray(e))return Ht($t,t,e,n);var i=function(t,e){r.handlers[e]=[],Ft(t,e)};if(void 0!==e){var o=r.handlers[e];if(o)if(n){if(n.guid)for(var s=0;s0)for(var i=0,s=t.length;i0)for(var a=0,l=e.length;a0)for(var c=0,u=n.length;c0)for(var h=0,p=r.length;h=e&&(t.apply(void 0,arguments),n=r)};return r},re=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i,o=void 0;return function(){var i=this,s=arguments,a=function(){o=null,a=null,n||t.apply(i,s)};!o&&n&&t.apply(i,s),r.clearTimeout(o),o=r.setTimeout(a,e)}},ie=function(){};ie.prototype.allowedEvents_={},ie.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Ut(this,t,e),this.addEventListener=n},ie.prototype.addEventListener=ie.prototype.on,ie.prototype.off=function(t,e){$t(this,t,e)},ie.prototype.removeEventListener=ie.prototype.off,ie.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Kt(this,t,e),this.addEventListener=n},ie.prototype.trigger=function(t){var e=t.type||t;"string"===typeof t&&(t={type:e}),t=Vt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Xt(this,t)},ie.prototype.dispatchEvent=ie.prototype.trigger;var oe=function(t){return t instanceof ie||!!t.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"===typeof t[e]}))},se=function(t){return"string"===typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},ae=function(t){if(!t.nodeName&&!oe(t))throw new Error("Invalid target; must be a DOM node or evented object.")},le=function(t){if(!se(t))throw new Error("Invalid event type; must be a non-empty string or array.")},ce=function(t){if("function"!==typeof t)throw new Error("Invalid listener; must be a function.")},ue=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),ae(r),le(i),ce(o),o=ee(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},he=function(t,e,n,r){ae(t),t.nodeName?qt[e](t,n,r):t[e](n,r)},pe={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=st("span",{className:"vjs-event-bus"});return W(t,pe),t.on("dispose",(function(){t.off(),i.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var fe={state:{},setState:function(t){var e=this;"function"===typeof t&&(t=t());var n=void 0;return V(t,(function(t,r){e.state[r]!==t&&(n=n||{},n[r]={from:e.state[r],to:t}),e.state[r]=t})),n&&oe(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function ve(t,e){return W(t,fe),t.state=W({},t.state,e),"function"===typeof t.handleStateChanged&&oe(t)&&t.on("statechanged",t.handleStateChanged),t}function ye(t){return"string"!==typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ge(t,e){return ye(t)===ye(e)}function me(){for(var t={},e=arguments.length,n=Array(e),r=0;r=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_),Bt(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return G.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=me(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return st(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],s=r&&r.split("-")[0],a=i&&i[s],l=n;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,(function(t,n){var r=e[n-1],i=r;return"undefined"===typeof r&&(i=t),i}))),l},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=ye(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"===typeof e){o=ye(e);var s=n.componentClass||o;n.name=o;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!==typeof a)return null;i=new a(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"===typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&ye(i.name()),o&&(this.childNameIndex_[o]=i),"function"===typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},t.prototype.removeChild=function(t){if("string"===typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,s=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter((function(t){return!o.some((function(e){return"string"===typeof e?t===e:t===e.name}))}))).map((function(t){var r=void 0,i=void 0;return"string"===typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||ye(e.name));return n&&!s.isTech(n)})).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},t.prototype.$=function(t,e){return Pt(t,e||this.contentEl())},t.prototype.$$=function(t,e){return At(t,e||this.contentEl())},t.prototype.hasClass=function(t){return ct(this.el_,t)},t.prototype.addClass=function(t){ut(this.el_,t)},t.prototype.removeClass=function(t){ht(this.el_,t)},t.prototype.toggleClass=function(t,e){pt(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return vt(this.el_,t)},t.prototype.setAttribute=function(t,e){yt(this.el_,t,e)},t.prototype.removeAttribute=function(t){gt(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+ye(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"===typeof i.getComputedStyle){var n=i.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(e=parseFloat(e),0===e){var r="offset"+ye(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=10,r=200,i=void 0;this.on("touchstart",(function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),i=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)i=!1;else if(e){var r=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY,s=Math.sqrt(r*r+o*o);s>n&&(i=!1)}}));var o=function(){i=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",(function(n){if(e=null,!0===i){var o=(new Date).getTime()-t;o0&&c.map((function(t){return l[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=ye(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();function be(t,e,n){if("number"!==typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function Te(t,e,n,r){return be(t,r,n.length-1),n[r][e]}function Ce(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:Te.bind(null,"start",0,t),end:Te.bind(null,"end",1,t)}}function ke(t,e){return Array.isArray(t)?Ce(t):void 0===t||void 0===e?Ce():Ce([[t,e]])}function we(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=ke(0,0));for(var o=0;oe&&(i=e),n+=i-r;return n/e}_e.prototype.supportsRaf_="function"===typeof i.requestAnimationFrame&&"function"===typeof i.cancelAnimationFrame,_e.registerComponent("Component",_e);for(var Ee={},Se=[["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"]],je=Se[0],xe=void 0,Pe=0;Pe0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;D(this,e);var s=L(this,t.call(this));if(!i&&(i=s,j))for(var a in i=o.createElement("custom"),e.prototype)"constructor"!==a&&(i[a]=e.prototype[a]);i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);for(var s=void 0,a=i.length-1;a>=0;a--)if(i[a].enabled){Ue(i,i[a]);break}if(j){for(var l in s=o.createElement("custom"),ze.prototype)"constructor"!==l&&(s[l]=ze.prototype[l]);for(var c in e.prototype)"constructor"!==c&&(s[c]=e.prototype[c])}return n=L(this,t.call(this,i,s)),s=n,s.changing_=!1,r=s,L(n,r)}return R(e,t),e.prototype.addTrack=function(e){var n=this;e.enabled&&Ue(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",(function(){n.changing_||(n.changing_=!0,Ue(n,e),n.changing_=!1,n.trigger("change"))}))},e}(ze),Xe=function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);for(var s=void 0,a=i.length-1;a>=0;a--)if(i[a].selected){Xe(i,i[a]);break}if(j){for(var l in s=o.createElement("custom"),ze.prototype)"constructor"!==l&&(s[l]=ze.prototype[l]);for(var c in e.prototype)"constructor"!==c&&(s[c]=e.prototype[c])}return n=L(this,t.call(this,i,s)),s=n,s.changing_=!1,Object.defineProperty(s,"selectedIndex",{get:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);var s=void 0;if(j){for(var a in s=o.createElement("custom"),ze.prototype)"constructor"!==a&&(s[a]=ze.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l])}return n=L(this,t.call(this,i,s)),s=n,r=s,L(n,r)}return R(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",ee(this,(function(){this.trigger("change")})));var n=["metadata","chapters"];-1===n.indexOf(e.kind)&&e.addEventListener("modechange",ee(this,(function(){this.trigger("selectedlanguagechange")})))},e}(ze),Ye=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];D(this,t);var n=this;if(j)for(var r in n=o.createElement("custom"),t.prototype)"constructor"!==r&&(n[r]=t.prototype[r]);n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,s=e.length;i0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var i=L(this,t.call(this)),s=i;if(j)for(var a in s=o.createElement("custom"),e.prototype)"constructor"!==a&&(s[a]=e.prototype[a]);var l={id:r.id||"vjs_track_"+Nt(),kind:r.kind||"",label:r.label||"",language:r.language||""},c=function(t){Object.defineProperty(s,t,{get:function(){return l[t]},set:function(){}})};for(var u in l)c(u);return n=s,L(i,n)}return R(e,t),e}(ie),nn=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=o.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,s=void 0;r&&(s=o.createElement("div"),s.innerHTML='',n=s.firstChild,s.setAttribute("style","display:none; position:absolute;"),o.body.appendChild(s));for(var a={},l=0;lx
',t=e.firstChild.href}return t},on=function(t){if("string"===typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=e.exec(t);if(n)return n.pop().toLowerCase()}return""},sn=function(t){var e=i.location,n=nn(t),r=":"===n.protocol?e.protocol:n.protocol,o=r+n.host!==e.protocol+e.host;return o},an=(Object.freeze||Object)({parseUrl:nn,getAbsoluteURL:rn,getFileExtension:on,isCrossOrigin:sn}),ln=function(t,e){var n=new i.WebVTT.Parser(i,i.vttjs,i.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(i.console&&i.console.groupCollapsed&&i.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach((function(t){return G.error(t)})),i.console&&i.console.groupEnd&&i.console.groupEnd()),n.flush()},cn=function(t,e){var n={uri:t},r=sn(t);r&&(n.cors=r),l(n,ee(this,(function(t,n,r){if(t)return G.error(t,n);if(e.loaded_=!0,"function"!==typeof i.WebVTT){if(e.tech_){var o=function(){return ln(r,e)};e.tech_.on("vttjsloaded",o),e.tech_.on("vttjserror",(function(){G.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",o)}))}}else ln(r,e)})))},un=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(D(this,e),!i.tech)throw new Error("A tech was not provided.");var o=me(i,{kind:Ze[i.kind]||"subtitles",language:i.language||i.srclang||""}),s=tn[o.mode]||"disabled",a=o["default"];"metadata"!==o.kind&&"chapters"!==o.kind||(s="hidden");var l=(n=L(this,t.call(this,o)),n);if(l.tech_=o.tech,j)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new Ge(l.cues_),h=new Ge(l.activeCues_),p=!1,d=ee(l,(function(){this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1)}));return"disabled"!==s&&l.tech_.ready((function(){l.tech_.on("timeupdate",d)}),!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;tn[t]&&(s=t,"showing"===s&&this.tech_.ready((function(){e.tech_.on("timeupdate",d)}),!0),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n=t||i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t)&&e.push(i)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var o=me(i,{kind:Qe[i.kind]||""}),s=(n=L(this,t.call(this,o)),n),a=!1;if(j)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a},set:function(t){"boolean"===typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),o.enabled&&(s.enabled=o.enabled),s.loaded_=!0,r=s,L(n,r)}return R(e,t),e}(en),pn=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var o=me(i,{kind:Je[i.kind]||""}),s=(n=L(this,t.call(this,o)),n),a=!1;if(j)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return a},set:function(t){"boolean"===typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),o.selected&&(s.selected=o.selected),r=s,L(n,r)}return R(e,t),e}(en),dn=0,fn=1,vn=2,yn=3,gn=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var r=L(this,t.call(this)),i=void 0,s=r;if(j)for(var a in s=o.createElement("custom"),e.prototype)"constructor"!==a&&(s[a]=e.prototype[a]);var l,c=new un(n);return s.kind=c.kind,s.src=c.src,s.srclang=c.language,s.label=c.label,s["default"]=c["default"],Object.defineProperty(s,"readyState",{get:function(){return i}}),Object.defineProperty(s,"track",{get:function(){return c}}),i=dn,c.addEventListener("loadeddata",(function(){i=vn,s.trigger({type:"load",target:s})})),j?(l=s,L(r,l)):r}return R(e,t),e}(ie);gn.prototype.allowedEvents_={load:"load"},gn.NONE=dn,gn.LOADING=fn,gn.LOADED=vn,gn.ERROR=yn;var mn={audio:{ListClass:$e,TrackClass:hn,capitalName:"Audio"},video:{ListClass:Ke,TrackClass:pn,capitalName:"Video"},text:{ListClass:qe,TrackClass:un,capitalName:"Text"}};Object.keys(mn).forEach((function(t){mn[t].getterName=t+"Tracks",mn[t].privateName=t+"Tracks_"}));var _n={remoteText:{ListClass:qe,TrackClass:un,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ye,TrackClass:gn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},bn=me(mn,_n);function Tn(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new bn.text.TrackClass(i);return o.addTrack(s),s}_n.names=Object.keys(_n),mn.names=Object.keys(mn),bn.names=[].concat(_n.names).concat(mn.names);var Cn=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};D(this,e),n.reportTouchActivity=!1;var i=L(this,t.call(this,null,n,r));return i.hasStarted_=!1,i.on("playing",(function(){this.hasStarted_=!0})),i.on("loadstart",(function(){this.hasStarted_=!1})),bn.names.forEach((function(t){var e=bn[t];n&&n[e.getterName]&&(i[e.privateName]=n[e.getterName])})),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===n["native"+t+"Tracks"]&&(i["featuresNative"+t+"Tracks"]=!1)})),!1===n.nativeCaptions||!1===n.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new bn.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return R(e,t),e.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,type:"sourceset"})},e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ee(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return ke(0,0)},e.prototype.bufferedPercent=function(){return we(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(mn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach((function(t){var n=e[t+"Tracks"]()||[],r=n.length;while(r--){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}}))},e.prototype.cleanupAutoTextTracks=function(){var t=this.autoRemoteTextTracks_||[],e=t.length;while(e--){var n=t[e];this.removeRemoteTextTrack(n)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new Oe(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?ke(0,0):ke()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;mn.names.forEach((function(e){var n=mn[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},e.prototype.addWebVttScript_=function(){var t=this;if(!i.WebVTT)if(o.body.contains(this.el())){if(!this.options_["vtt.js"]&&$(c)&&Object.keys(c).length>0)return void this.trigger("vttjsloaded");var e=o.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){e.onload=null,e.onerror=null})),i.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(G.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready((function(){return t.autoRemoteTextTracks_.addTrack(r.track)})),r},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=ye(t),e.techs_[t]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return t=ye(t),e.techs_&&e.techs_[t]?e.techs_[t]:i&&i.videojs&&i.videojs[t]?(G.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i.videojs[t]):void 0},e}(_e);bn.names.forEach((function(t){var e=bn[t];Cn.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),Cn.prototype.featuresVolumeControl=!0,Cn.prototype.featuresMuteControl=!0,Cn.prototype.featuresFullscreenResize=!1,Cn.prototype.featuresPlaybackRate=!1,Cn.prototype.featuresProgressEvents=!1,Cn.prototype.featuresSourceset=!1,Cn.prototype.featuresTimeupdateEvents=!1,Cn.prototype.featuresNativeTextTracks=!1,Cn.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n=t.sourceHandlers||[],r=void 0,i=0;i3&&void 0!==arguments[3]?arguments[3]:null,i="call"+ye(n),o=t.reduce(Dn(i),r),s=o===En,a=s?null:e[n](o);return Rn(t,n,a,s),a}var Mn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Nn={setCurrentTime:1},In={play:1,pause:1};function Dn(t){return function(e,n){return e===En?En:n[t]?n[t](e):e}}function Rn(t,e,n,r){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](r,n)}}function Ln(t){wn[t.id()]=null}function Bn(t,e){var n=wn[t.id()],r=null;if(void 0===n||null===n)return r=e(t),wn[t.id()]=[[e,r]],r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=e[0],a=e.slice(1);if("string"===typeof s)Fn(t,kn[s],n,r,i,o);else if(s){var l=Bn(r,s);if(!l.setSource)return i.push(l),Fn(t,a,n,r,i,o);l.setSource(W({},t),(function(e,s){if(e)return Fn(t,a,n,r,i,o);i.push(l),Fn(s,t.type===s.type?a:kn[s.type],n,r,i,o)}))}else a.length?Fn(t,a,n,r,i,o):o?n(t,i):Fn(t,kn["*"],n,r,i,!0)}var Hn={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"},Vn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=on(t),n=Hn[e.toLowerCase()];return n||""},zn=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter((function(t){return t.src===e}));if(n.length)return n[0].type;for(var r=t.$$("source"),i=0;i0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=W({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&G.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),r=W({role:"button"},r),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,r);return this.createControlTextEl(i),i},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=st("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,at(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.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))},e.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)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){Ut(o,"keydown",ee(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){$t(o,"keydown",ee(this,this.handleKeyPress))},e}(_e);_e.registerComponent("ClickableComponent",Xn);var Kn=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.update(),n.on("posterchange",ee(i,i.update)),i}return R(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=st("div",{className:"vjs-poster",tabIndex:-1});return M||(this.fallbackImg_=st("img"),t.appendChild(this.fallbackImg_)),t},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){if(this.fallbackImg_)this.fallbackImg_.src=t;else{var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e}},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?Ie(this.player_.play()):this.player_.pause())},e}(Xn);_e.registerComponent("PosterImage",Kn);var qn="#222",Yn="#ccc",Gn={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 Jn(t,e){var n=void 0;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Qn(t,e,n){try{t.style[e]=n}catch(r){return}}var Zn=function(t){function e(n,r,i){D(this,e);var o=L(this,t.call(this,n,r,i));return n.on("loadstart",ee(o,o.toggleDisplay)),n.on("texttrackchange",ee(o,o.updateDisplay)),n.on("loadstart",ee(o,o.preselectTrack)),n.ready(ee(o,(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",ee(this,this.updateDisplay));for(var t=this.options_.playerOptions.tracks||[],e=0;e1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=W({innerHTML:'',className:this.buildCSSClass()},e),n=W({type:"button"},n);var r=_e.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(r),r},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return G.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),_e.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Xn);_e.registerComponent("Button",er);var nr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Ie(e);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};Ne(e)?e.then(i,(function(){})):this.setTimeout(i,1)}else this.player_.focus()}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(er);nr.prototype.controlText_="Play Video",_e.registerComponent("BigPlayButton",nr);var rr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(er);_e.registerComponent("CloseButton",rr);var ir=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(er);ir.prototype.controlText_="Play",_e.registerComponent("PlayToggle",ir);var or=function(t,e){t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),i=i>0||s>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n},sr=or;function ar(t){sr=t}function lr(){sr=or}var cr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return sr(t,e)},ur=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.throttledUpdateContent=ne(ee(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return R(e,t),e.prototype.createEl=function(e){var n=this.buildCSSClass(),r=t.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=st("span",{className:n+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){while(this.contentEl_.firstChild)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=o.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return cr(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(_e);ur.prototype.labelText_="Time",ur.prototype.controlText_="Time",_e.registerComponent("TimeDisplay",ur);var hr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(ur);hr.prototype.labelText_="Current Time",hr.prototype.controlText_="Current Time",_e.registerComponent("CurrentTimeDisplay",hr);var pr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(ur);pr.prototype.labelText_="Duration",pr.prototype.controlText_="Duration",_e.registerComponent("DurationDisplay",pr);var dr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"/
"})},e}(_e);_e.registerComponent("TimeDivider",dr);var fr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(ur);fr.prototype.labelText_="Remaining Time",fr.prototype.controlText_="Remaining Time",_e.registerComponent("RemainingTimeDisplay",fr);var vr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return R(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=st("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(_e);_e.registerComponent("LiveDisplay",vr);var yr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return R(e,t),e.prototype.enabled=function(){return this.enabled_},e.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)},e.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}},e.prototype.createEl=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=W({tabIndex:0},n),r=W({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),t.prototype.createEl.call(this,e,n,r)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||E||t.preventDefault(),mt(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;_t(),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()},e.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!==typeof t||t!==t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%",r=e.el().style;return this.vertical()?r.height=n:r.width=n,t}}},e.prototype.calculateDistance=function(t){var e=Ct(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.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")},e}(_e);_e.registerComponent("Slider",yr);var gr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(t,e){var n=t/e||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=o(r,n);for(var s=0;se.length;u--)this.el_.removeChild(i[u-1]);i.length=e.length},e}(_e);_e.registerComponent("LoadProgressBar",gr);var mr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,n){var r=bt(this.el_),i=bt(this.player_.el()),o=t.width*e;if(i&&r){var s=t.left-i.left+o,a=t.width-o+(i.right-t.right),l=r.width/2;sr.width&&(l=r.width),this.el_.style.right="-"+l+"px",at(this.el_,n)}},e}(_e);_e.registerComponent("TimeTooltip",mr);var _r=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=cr(r,n.player_.duration()),o=n.getChild("timeTooltip");o&&o.update(t,e,i)}))},e}(_e);_r.prototype.options_={children:[]},x&&!(x>8)||g||_||_r.prototype.options_.children.push("timeTooltip"),_e.registerComponent("PlayProgressBar",_r);var br=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.update=ne(ee(i,i.update),25),i}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.duration(),i=cr(e*r,r);n.el_.style.left=t.width*e+"px",n.getChild("timeTooltip").update(t,e,i)}))},e}(_e);br.prototype.options_={children:["timeTooltip"]},_e.registerComponent("MouseTimeDisplay",br);var Tr=5,Cr=30,kr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.setEventHandlers_(),i}return R(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=ne(ee(this,this.update),Cr),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()}))}),Cr)})),this.on(this.player_,["ended","pause","waiting"],(function(){t.clearInterval(t.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[cr(t,n),cr(n,n)],"{1} of {2}")),this.bar.update(bt(this.el_),e)},e.prototype.update=function(e){var n=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){xt(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(xt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Ie(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+Tr)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-Tr)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(yr);kr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},x&&!(x>8)||g||_||kr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),kr.prototype.playerEvent="timeupdate",_e.registerComponent("SeekBar",kr);var wr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.handleMouseMove=ne(ee(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=ne(ee(i,i.handleMouseSeek),25),i.enable(),i}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var n=e.getChild("mouseTimeDisplay"),r=e.el(),i=bt(r),o=Ct(r,t).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.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)},e.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)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(_e);wr.prototype.options_={children:["seekBar"]},_e.registerComponent("ProgressControl",wr);var Er=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),!1===o[Ee.fullscreenEnabled]&&i.disable(),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(er);Er.prototype.controlText_="Fullscreen",_e.registerComponent("FullscreenToggle",Er);var Sr=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))},jr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},e}(_e);_e.registerComponent("VolumeLevel",jr);var xr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready((function(){return i.updateARIAAttributes()})),i}return R(e,t),e.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"})},e.prototype.handleMouseDown=function(e){xt(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){xt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(yr);xr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},xr.prototype.playerEvent="volumechange",_e.registerComponent("VolumeBar",xr);var Pr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),r.vertical=r.vertical||!1,("undefined"===typeof r.volumeBar||$(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=L(this,t.call(this,n,r));return Sr(i,n),i.throttledHandleMouseMove=ne(ee(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}return R(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(_e);Pr.prototype.options_={children:["volumeBar"]},_e.registerComponent("VolumeControl",Pr);var Ar=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))},Or=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return Ar(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;g&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var n=0;n<4;n++)ht(this.el_,"vjs-vol-"+n);ut(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume(),e=t?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(er);Or.prototype.controlText_="Mute",_e.registerComponent("MuteToggle",Or);var Mr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),"undefined"!==typeof r.inline?r.inline=r.inline:r.inline=!0,("undefined"===typeof r.volumeControl||$(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=L(this,t.call(this,n,r));return i.on(n,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return R(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.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")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(_e);Mr.prototype.options_={children:["muteToggle","volumeControl"]},_e.registerComponent("VolumePanel",Mr);var Nr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return R(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",ee(this,(function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())})))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=st(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ut(n,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),n},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice(),n=e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className);n&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(_e);_e.registerComponent("Menu",Nr);var Ir=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e);var i=L(this,t.call(this,n,r));i.menuButton_=new er(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=er.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return R(e,t),e.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()},e.prototype.createMenu=function(){var t=new Nr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=st("li",{className:"vjs-menu-title",innerHTML:ye(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),lt(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",ee(this,(function(t){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){Ut(o,"keydown",ee(this,this.handleKeyPress))},e.prototype.handleBlur=function(){$t(o,"keydown",ee(this,this.handleKeyPress))},e.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())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),g&&it())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(_e);_e.registerComponent("MenuButton",Ir);var Dr=function(t){function e(n,r){D(this,e);var i=r.tracks,o=L(this,t.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return L(o);var s=ee(o,o.update);return i.addEventListener("removetrack",s),i.addEventListener("addtrack",s),o.player_.on("ready",s),o.player_.on("dispose",(function(){i.removeEventListener("removetrack",s),i.removeEventListener("addtrack",s)})),o}return R(e,t),e}(Ir);_e.registerComponent("TrackButton",Dr);var Rr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.selectable=r.selectable,i.isSelected_=r.selected||!1,i.multiSelectable=r.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}return R(e,t),e.prototype.createEl=function(e,n,r){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",W({className:"vjs-menu-item",innerHTML:'",tabIndex:-1},n),r)},e.prototype.handleClick=function(t){this.selected(!0)},e.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))},e}(Xn);_e.registerComponent("MenuItem",Rr);var Lr=function(t){function e(n,r){D(this,e);var s=r.track,a=n.textTracks();r.label=s.label||s.language||"Unknown",r.selected="showing"===s.mode;var l=L(this,t.call(this,n,r));l.track=s;var c=function(){for(var t=arguments.length,e=Array(t),n=0;n-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(Rr);_e.registerComponent("TextTrackMenuItem",Lr);var Br=function(t){function e(n,r){return D(this,e),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,L(this,t.call(this,n,r))}return R(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(Lr);_e.registerComponent("OffTextTrackMenuItem",Br);var Fr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D(this,e),r.tracks=n.textTracks(),L(this,t.call(this,n,r))}return R(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lr,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new Br(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i-1){var s=new e(this.player_,{track:o,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+o.kind+"-menu-item"),t.push(s)}}return t},e}(Dr);_e.registerComponent("TextTrackButton",Fr);var Hr=function(t){function e(n,r){D(this,e);var i=r.track,o=r.cue,s=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=o.text,r.selected=o.startTime<=s&&s=0;e--){var n=t[e];if(n.kind===this.kind_)return n}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ye(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n\n '+this.localize("Captions")+"\n "),i+="";var o=t.prototype.createEl.call(this,e,W({innerHTML:i},n),r);return o},e}(Lr);_e.registerComponent("SubsCapsMenuItem",Xr);var Kr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e);var i=L(this,t.call(this,n,r));return i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(ye(i.label_)),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Ur(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,Xr),e},e}(Fr);Kr.prototype.kinds_=["captions","subtitles"],Kr.prototype.controlText_="Subtitles",_e.registerComponent("SubsCapsButton",Kr);var qr=function(t){function e(n,r){D(this,e);var i=r.track,o=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var s=L(this,t.call(this,n,r));s.track=i,s.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var t=arguments.length,e=Array(t),n=0;n\n '+this.localize("Descriptions")+"\n "),i+="";var o=t.prototype.createEl.call(this,e,W({innerHTML:i},n),r);return o},e.prototype.handleClick=function(e){var n=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return D(this,e),r.tracks=n.audioTracks(),L(this,t.call(this,n,r))}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),n=0;n=0;n--)t.addChild(new Gr(this.player(),{rate:e[n]+"x"}));return t},e.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;ie){r=n[i];break}this.player().playbackRate(r)},e.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},e.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(Ir);Jr.prototype.controlText_="Playback Rate",_e.registerComponent("PlaybackRateMenuButton",Jr);var Qr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(_e);_e.registerComponent("Spacer",Qr);var Zr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(Qr);_e.registerComponent("CustomControlSpacer",Zr);var ti=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(_e);ti.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},_e.registerComponent("ControlBar",ti);var ei=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"error",i.open),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},e.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(Ve);ei.prototype.options_=me(Ve.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),_e.registerComponent("ErrorDisplay",ei);var ni="vjs-text-track-settings",ri=["#000","Black"],ii=["#00F","Blue"],oi=["#0FF","Cyan"],si=["#0F0","Green"],ai=["#F0F","Magenta"],li=["#F00","Red"],ci=["#FFF","White"],ui=["#FF0","Yellow"],hi=["1","Opaque"],pi=["0.5","Semi-Transparent"],di=["0","Transparent"],fi={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ri,ci,li,si,ii,ui,ai,oi]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[hi,pi,di]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ci,ri,li,si,ii,ui,ai,oi]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[hi,pi]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[di,pi,hi]}};function vi(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function yi(t,e){var n=t.options[t.options.selectedIndex].value;return vi(n,e)}function gi(t,e,n){if(e)for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",i=fi[t],o=i.id.replace("%s",this.id_),s=[n,o].join(" ").trim();return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),""+r+">",'").join("")},e.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['"].join("")},e.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['"].join("")},e.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['"].join("")},e.prototype.createElColors_=function(){return st("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.prototype.createElFont_=function(){return st("div",{className:"vjs-track-settings-font",innerHTML:['",'",'"].join("")})},e.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return st("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},e.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.prototype.label=function(){return this.localize("Caption Settings Dialog")},e.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.prototype.getValues=function(){var t=this;return z(fi,(function(e,n,r){var i=yi(t.$(n.selector),n.parser);return void 0!==i&&(e[r]=i),e}),{})},e.prototype.setValues=function(t){var e=this;V(fi,(function(n,r){gi(e.$(n.selector),t[r],n.parser)}))},e.prototype.setDefaults=function(){var t=this;V(fi,(function(e){var n=e.hasOwnProperty("default")?e["default"]:0;t.$(e.selector).selectedIndex=n}))},e.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(i.localStorage.getItem(ni))}catch(e){G.warn(e)}t&&this.setValues(t)},e.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?i.localStorage.setItem(ni,JSON.stringify(t)):i.localStorage.removeItem(ni)}catch(e){G.warn(e)}}},e.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(o,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},e}(Ve);_e.registerComponent("TextTrackSettings",mi);var _i=function(t){function e(n,r){D(this,e);var o=r.ResizeObserver||i.ResizeObserver;null===r.ResizeObserver&&(o=!1);var s=me({createEl:!o},r),a=L(this,t.call(this,n,s));return a.ResizeObserver=r.ResizeObserver||i.ResizeObserver,a.loadListener_=null,a.resizeObserver_=null,a.debouncedHandler_=re((function(){a.resizeHandler()}),100,!1,n),o?(a.resizeObserver_=new a.ResizeObserver(a.debouncedHandler_),a.resizeObserver_.observe(n.el())):(a.loadListener_=function(){a.el_.contentWindow&&Ut(a.el_.contentWindow,"resize",a.debouncedHandler_),a.off("load",a.loadListener_)},a.on("load",a.loadListener_)),a}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.prototype.resizeHandler=function(){this.player_.trigger("playerresize")},e.prototype.dispose=function(){this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&$t(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},e}(_e);_e.registerComponent("ResizeManager",_i);var bi=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var n=t.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o=2&&i.push("loadeddata"),t.readyState>=3&&i.push("canplay"),t.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(t){this.trigger(t)}),this)}))}},e.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(e){G(e,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;if(this.el_.duration===1/0&&_&&E&&0===this.el_.currentTime){var e=function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN},e.prototype.width=function(){return this.el_.offsetWidth},e.prototype.height=function(){return this.el_.offsetHeight},e.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)}))}},e.prototype.supportsFullScreen=function(){if("function"===typeof this.el_.webkitEnterFullScreen){var t=i.navigator&&i.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},e.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},e.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},e.prototype.reset=function(){e.resetMediaElement(this.el_)},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.prototype.setControls=function(t){this.el_.controls=!!t},e.prototype.addTextTrack=function(e,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,r):t.prototype.addTextTrack.call(this,e,n,r)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var n=o.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e["default"]&&(n["default"]=e["default"]),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n},e.prototype.addRemoteTextTrack=function(e,n){var r=t.prototype.addRemoteTextTrack.call(this,e,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},e.prototype.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks){var n=this.$$("track"),r=n.length;while(r--)e!==n[r]&&e!==n[r].track||this.el().removeChild(n[r])}},e.prototype.getVideoPlaybackQuality=function(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),i.performance&&"function"===typeof i.performance.now?t.creationTime=i.performance.now():i.performance&&i.performance.timing&&"number"===typeof i.performance.timing.navigationStart&&(t.creationTime=i.Date.now()-i.performance.timing.navigationStart),t},e}(Cn);if(nt()){Pi.TEST_VID=o.createElement("video");var Ai=o.createElement("track");Ai.kind="captions",Ai.srclang="en",Ai.label="English",Pi.TEST_VID.appendChild(Ai)}Pi.isSupported=function(){try{Pi.TEST_VID.volume=.5}catch(t){return!1}return!(!Pi.TEST_VID||!Pi.TEST_VID.canPlayType)},Pi.canPlayType=function(t){return Pi.TEST_VID.canPlayType(t)},Pi.canPlaySource=function(t,e){return Pi.canPlayType(t.type)},Pi.canControlVolume=function(){try{var t=Pi.TEST_VID.volume;return Pi.TEST_VID.volume=t/2+.1,t!==Pi.TEST_VID.volume}catch(e){return!1}},Pi.canMuteVolume=function(){try{var t=Pi.TEST_VID.muted;return Pi.TEST_VID.muted=!t,Pi.TEST_VID.muted?yt(Pi.TEST_VID,"muted","muted"):gt(Pi.TEST_VID,"muted","muted"),t!==Pi.TEST_VID.muted}catch(e){return!1}},Pi.canControlPlaybackRate=function(){if(_&&E&&S<58)return!1;try{var t=Pi.TEST_VID.playbackRate;return Pi.TEST_VID.playbackRate=t/2+.1,t!==Pi.TEST_VID.playbackRate}catch(e){return!1}},Pi.canOverrideAttributes=function(){if(j)return!1;try{var t=function(){};Object.defineProperty(o.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(o.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(o.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(o.createElement("audio"),"innerHTML",{get:t,set:t})}catch(e){return!1}return!0},Pi.supportsNativeTextTracks=function(){return A||g&&E},Pi.supportsNativeVideoTracks=function(){return!(!Pi.TEST_VID||!Pi.TEST_VID.videoTracks)},Pi.supportsNativeAudioTracks=function(){return!(!Pi.TEST_VID||!Pi.TEST_VID.audioTracks)},Pi.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Pi.prototype.featuresVolumeControl=Pi.canControlVolume(),Pi.prototype.featuresMuteControl=Pi.canMuteVolume(),Pi.prototype.featuresPlaybackRate=Pi.canControlPlaybackRate(),Pi.prototype.featuresSourceset=Pi.canOverrideAttributes(),Pi.prototype.movingMediaElementInDOM=!g,Pi.prototype.featuresFullscreenResize=!0,Pi.prototype.featuresProgressEvents=!0,Pi.prototype.featuresTimeupdateEvents=!0,Pi.prototype.featuresNativeTextTracks=Pi.supportsNativeTextTracks(),Pi.prototype.featuresNativeVideoTracks=Pi.supportsNativeVideoTracks(),Pi.prototype.featuresNativeAudioTracks=Pi.supportsNativeAudioTracks();var Oi=Pi.TEST_VID&&Pi.TEST_VID.constructor.prototype.canPlayType,Mi=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Ni=/^video\/mp4/i;Pi.patchCanPlayType=function(){b>=4&&!k&&!E?Pi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Mi.test(t)?"maybe":Oi.call(this,t)}:T&&(Pi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Ni.test(t)?"maybe":Oi.call(this,t)})},Pi.unpatchCanPlayType=function(){var t=Pi.TEST_VID.constructor.prototype.canPlayType;return Pi.TEST_VID.constructor.prototype.canPlayType=Oi,t},Pi.patchCanPlayType(),Pi.disposeMediaElement=function(t){if(t){t.parentNode&&t.parentNode.removeChild(t);while(t.hasChildNodes())t.removeChild(t.firstChild);t.removeAttribute("src"),"function"===typeof t.load&&function(){try{t.load()}catch(e){}}()}},Pi.resetMediaElement=function(t){if(t){var e=t.querySelectorAll("source"),n=e.length;while(n--)t.removeChild(e[n]);t.removeAttribute("src"),"function"===typeof t.load&&function(){try{t.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Pi.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Pi.prototype["set"+ye(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){Pi.prototype[t]=function(){return this.el_[t]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(t){Pi.prototype["set"+ye(t)]=function(e){this.el_[t]=e}})),["pause","load","play"].forEach((function(t){Pi.prototype[t]=function(){return this.el_[t]()}})),Cn.withSourceHandlers(Pi),Pi.nativeSourceHandler={},Pi.nativeSourceHandler.canPlayType=function(t){try{return Pi.TEST_VID.canPlayType(t)}catch(e){return""}},Pi.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Pi.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=on(t.src);return Pi.nativeSourceHandler.canPlayType("video/"+n)}return""},Pi.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},Pi.nativeSourceHandler.dispose=function(){},Pi.registerSourceHandler(Pi.nativeSourceHandler),Cn.registerTech("Html5",Pi);var Ii=B(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),Di=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ri={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Li=function(t){function e(n,r,i){if(D(this,e),n.id=n.id||r.id||"vjs_video_"+Nt(),r=W(e.getTagSettings(n),r),r.initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"===typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else{var s=n;while(s&&1===s.nodeType){if(ft(s).hasOwnProperty("lang")){r.language=s.getAttribute("lang");break}s=s.parentNode}}var a=L(this,t.call(this,null,r,i));if(a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&ft(n),a.language(a.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(t){l[t.toLowerCase()]=r.languages[t]})),a.languages_=l}else a.languages_=e.prototype.options_.languages;a.cache_={},a.poster_=r.poster||"",a.controls_=!!r.controls,a.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?a.options_.autoplay=!0:a.autoplay(a.options_.autoplay),a.scrubbing_=!1,a.el_=a.createEl(),a.cache_.lastPlaybackRate=a.defaultPlaybackRate(),de(a,{eventBusKey:"el_"});var c=me(a.options_);if(r.plugins){var h=r.plugins;Object.keys(h).forEach((function(t){if("function"!==typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](h[t])}),a)}a.options_.playerOptions=c,a.middleware_=[],a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),g||a.addClass("vjs-workinghover"),e.players[a.id_]=a;var p=u.split(".")[0];return a.addClass("vjs-v"+p),a.userActive(!0),a.reportUserActivity(),a.one("play",a.listenForUserActivity_),a.on("fullscreenchange",a.handleFullscreenChange_),a.on("stageclick",a.handleStageClick_),a.changingSrc_=!1,a.playWaitingForReady_=!1,a.playOnLoadstart_=null,a}return R(e,t),e.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Ln(this),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var e=this.tag,n=void 0,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=e.parentNode:s||(n=this.el_=t.prototype.createEl.call(this,"div"));var a=ft(e);if(s){n=this.el_=e,e=this.tag=o.createElement("video");while(n.children.length)e.appendChild(n.firstChild);ct(n,"video-js")||ut(n,"video-js"),n.appendChild(e),r=this.playerElIngest_=n,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(t){"undefined"!==typeof n[t]&&(e[t]=n[t])}))}if(e.setAttribute("tabindex","-1"),x&&e.setAttribute("role","application"),e.removeAttribute("width"),e.removeAttribute("height"),Object.getOwnPropertyNames(a).forEach((function(t){"class"===t?(n.className+=" "+a[t],s&&(e.className+=" "+a[t])):(n.setAttribute(t,a[t]),s&&e.setAttribute(t,a[t]))})),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused"),!0!==i.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Zt("vjs-styles-dimensions");var l=Pt(".vjs-styles-defaults"),c=Pt("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var u=e.getElementsByTagName("a"),h=0;h0?this.videoWidth()+":"+this.videoHeight():"16:9";var o=n.split(":"),s=o[1]/o[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*s,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),te(this.styleEl_,"\n ."+r+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+r+".vjs-fluid {\n padding-top: "+100*s+"%;\n }\n ")}else{var a="number"===typeof this.width_?this.width_:this.options_.width,l="number"===typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(a>=0&&(c.width=a),l>=0&&(c.height=l))}},e.prototype.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var r=ye(t),i=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(Cn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o="string"!==typeof this.autoplay()&&this.autoplay(),s={source:e,autoplay:o,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};bn.names.forEach((function(t){var e=bn[t];s[e.getterName]=n[e.privateName]})),W(s,this.options_[r]),W(s,this.options_[i]),W(s,this.options_[t.toLowerCase()]),this.tag&&(s.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var a=Cn.getTech(t);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(s),this.tech_.ready(ee(this,this.handleTechReady_),!0),Be.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Di.forEach((function(t){n.on(n.tech_,t,n["handleTech"+ye(t)+"_"])})),Object.keys(Ri).forEach((function(t){n.on(n.tech_,t,(function(e){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Ri[t]+"_"].bind(n),event:e}):n["handleTech"+Ri[t]+"_"](e)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||lt(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.prototype.unloadTech_=function(){var t=this;bn.names.forEach((function(e){var n=bn[e];t[n.privateName]=t[n.getterName]()})),this.textTracksJson_=Be.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.prototype.tech=function(t){return void 0===t&&G.warn(s(Ii)),this.tech_},e.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},e.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(t){G("deleting tag.poster throws in some browsers",t)}},e.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},e.prototype.manualAutoplay_=function(t){var e=this;if(this.tech_&&"string"===typeof t){var n=function(){var t=e.muted();e.muted(!0);var n=e.play();if(n&&n.then&&n["catch"])return n["catch"]((function(n){e.muted(t)}))},r=void 0;if("any"===t?(r=this.play(),r&&r.then&&r["catch"]&&r["catch"]((function(){return n()}))):r="muted"===t?n():this.play(),r&&r.then&&r["catch"])return r.then((function(){e.trigger({type:"autoplay-success",autoplay:t})}))["catch"]((function(n){e.trigger({type:"autoplay-failure",autoplay:t})}))}},e.prototype.updateSourceCaches_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t,n="";if("string"!==typeof e&&(e=t.src,n=t.type),!/^blob:/.test(e)){this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!n&&(n=zn(this,e)),this.cache_.source=me({},t,{src:e,type:n});for(var r=this.cache_.sources.filter((function(t){return t.src&&t.src===e})),i=[],o=this.$$("source"),s=[],a=0;a0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(t){return t.callback(t.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},e.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(G.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.prototype.handleTechClick_=function(t){xt(t)&&this.controls_&&(this.paused()?Ie(this.play()):this.pause())},e.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},e.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},e.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.prototype.handleStageClick_=function(){this.reportUserActivity()},e.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},e.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},e.prototype.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.prototype.getCache=function(){return this.cache_},e.prototype.techCall_=function(t,e){this.ready((function(){if(t in Nn)return An(this.middleware_,this.tech_,t,e);if(t in In)return On(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(n){throw G(n),n}}),!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Mn)return Pn(this.middleware_,this.tech_,t);if(t in In)return On(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw G("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw G("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw G(e),e}}},e.prototype.play=function(){var t=this,e=this.options_.Promise||i.Promise;return e?new e((function(e){t.play_(e)})):this.play_()},e.prototype.play_=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ie;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void e(this.techGet_("play"));this.playOnLoadstart_=function(){t.playOnLoadstart_=null,e(t.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){t.playWaitingForReady_=!1,e(t.play())}))}},e.prototype.pause=function(){this.techCall_("pause")},e.prototype.paused=function(){return!1!==this.techGet_("paused")},e.prototype.played=function(){return this.techGet_("played")||ke(0,0)},e.prototype.scrubbing=function(t){if("undefined"===typeof t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.prototype.currentTime=function(t){return"undefined"!==typeof t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.prototype.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;t=parseFloat(t),t<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},e.prototype.remainingTime=function(){return this.duration()-this.currentTime()},e.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=ke(0,0)),t},e.prototype.bufferedPercent=function(){return we(this.buffered(),this.duration())},e.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),n=t.end(t.length-1);return n>e&&(n=e),n},e.prototype.volume=function(t){var e=void 0;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},e.prototype.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},e.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},e.prototype.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},e.prototype.requestFullscreen=function(){var t=Ee;this.isFullscreen(!0),t.requestFullscreen?(Ut(o,t.fullscreenchange,ee(this,(function e(n){this.isFullscreen(o[t.fullscreenElement]),!1===this.isFullscreen()&&$t(o,t.fullscreenchange,e),this.trigger("fullscreenchange")}))),this.el_[t.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.prototype.exitFullscreen=function(){var t=Ee;this.isFullscreen(!1),t.requestFullscreen?o[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=o.documentElement.style.overflow,Ut(o,"keydown",ee(this,this.fullWindowOnEscKey)),o.documentElement.style.overflow="hidden",ut(o.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.prototype.exitFullWindow=function(){this.isFullWindow=!1,$t(o,"keydown",this.fullWindowOnEscKey),o.documentElement.style.overflow=this.docOrigOverflow,ht(o.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.canPlayType=function(t){for(var e=void 0,n=0,r=this.options_.techOrder;n1?e.src(n.slice(1)):(e.changingSrc_=!1,e.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void e.triggerReady());xn(r,e.tech_)}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},e.prototype.src_=function(t){var e=this,n=this.selectSource([t]);return!n||(ge(n.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready((function(){e.changingSrc_=!1})),!1))},e.prototype.load=function(){this.techCall_("load")},e.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},e.prototype.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},e.prototype.currentSource=function(){return this.cache_.source||{}},e.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},e.prototype.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e=void 0;"string"===typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},e.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},e.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},e.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},e.prototype.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.prototype.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new Oe(t),this.addClass("vjs-error"),G.error("(CODE:"+this.error_.code+" "+Oe.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},e.prototype.reportUserActivity=function(t){this.userActivity_=!0},e.prototype.userActive=function(t){if(void 0===t)return this.userActive_;if(t=!!t,t!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.prototype.listenForUserActivity_=function(){var t=void 0,e=void 0,n=void 0,r=ee(this,this.reportUserActivity),i=function(t){t.screenX===e&&t.screenY===n||(e=t.screenX,n=t.screenY,r())},o=function(){r(),this.clearInterval(t),t=this.setInterval(r,250)},s=function(e){r(),this.clearInterval(t)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",s),this.on("keydown",r),this.on("keyup",r);var a=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var t=this.options_.inactivityTimeout;t<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),t))}}),250)},e.prototype.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},e.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.prototype.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},e.prototype.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},e.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},e.prototype.removeRemoteTextTrack=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.track,n=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},e.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.prototype.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},e.prototype.languages=function(){return me(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=me(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.prototype.trigger=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xt(this.eventBusEl_,t,this.getEventHash(e))},t.prototype.handleStateChanged=function(t){},t.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[Hi][t]=!1,this.player=this.state=null,e[t]=Ki(t,Vi[t])},t.isBasic=function(e){var n="string"===typeof e?Wi(e):e;return"function"===typeof n&&!t.prototype.isPrototypeOf(n.prototype)},t.registerPlugin=function(e,n){if("string"!==typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+("undefined"===typeof e?"undefined":I(e))+".");if(zi(e))G.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(Li.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!==typeof n)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+("undefined"===typeof n?"undefined":I(n))+".");return Vi[e]=n,e!==Fi&&(t.isBasic(n)?Li.prototype[e]=Xi(e,n):Li.prototype[e]=Ki(e,n)),n},t.deregisterPlugin=function(t){if(t===Fi)throw new Error("Cannot de-register base plugin.");zi(t)&&(delete Vi[t],delete Li.prototype[t])},t.getPlugins=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(Vi),e=void 0;return t.forEach((function(t){var n=Wi(t);n&&(e=e||{},e[t]=n)})),e},t.getPluginVersion=function(t){var e=Wi(t);return e&&e.VERSION||""},t}();qi.getPlugin=Wi,qi.BASE_PLUGIN_NAME=Fi,qi.registerPlugin(Fi,qi),Li.prototype.usingPlugin=function(t){return!!this[Hi]&&!0===this[Hi][t]},Li.prototype.hasPlugin=function(t){return!!zi(t)};var Yi=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof e?"undefined":I(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)},Gi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){t.apply(this,arguments)},r={};for(var i in"object"===("undefined"===typeof e?"undefined":I(e))?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"===typeof e&&(n=e),Yi(n,t),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n};"undefined"===typeof HTMLVideoElement&&nt()&&(o.createElement("video"),o.createElement("audio"),o.createElement("track"),o.createElement("video-js"));var Ji=function(t){return 0===t.indexOf("#")?t.slice(1):t};function Qi(t,e,n){var r=Qi.getPlayer(t);if(r)return e&&G.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"===typeof t?Pt("#"+Ji(t)):t;if(!rt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");o.body.contains(i)||G.warn("The element supplied is not included in the DOM"),e=e||{},Qi.hooks("beforesetup").forEach((function(t){var n=t(i,me(e));U(n)&&!Array.isArray(n)?e=me(e,n):G.error("please return an object in beforesetup hooks")}));var s=_e.getComponent("Player");return r=new s(i,e,n),Qi.hooks("setup").forEach((function(t){return t(r)})),r}if(Qi.hooks_={},Qi.hooks=function(t,e){return Qi.hooks_[t]=Qi.hooks_[t]||[],e&&(Qi.hooks_[t]=Qi.hooks_[t].concat(e)),Qi.hooks_[t]},Qi.hook=function(t,e){Qi.hooks(t,e)},Qi.hookOnce=function(t,e){Qi.hooks(t,[].concat(e).map((function(e){var n=function n(){return Qi.removeHook(t,n),e.apply(void 0,arguments)};return n})))},Qi.removeHook=function(t,e){var n=Qi.hooks(t).indexOf(e);return!(n<=-1)&&(Qi.hooks_[t]=Qi.hooks_[t].slice(),Qi.hooks_[t].splice(n,1),!0)},!0!==i.VIDEOJS_NO_DYNAMIC_STYLE&&nt()){var Zi=Pt(".vjs-styles-defaults");if(!Zi){Zi=Zt("vjs-styles-defaults");var to=Pt("head");to&&to.insertBefore(Zi,to.firstChild),te(Zi,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Qt(1,Qi),Qi.VERSION=u,Qi.options=Li.prototype.options_,Qi.getPlayers=function(){return Li.players},Qi.getPlayer=function(t){var e=Li.players,n=void 0;if("string"===typeof t){var r=Ji(t),i=e[r];if(i)return i;n=Pt("#"+r)}else n=t;if(rt(n)){var o=n,s=o.player,a=o.playerId;if(s||e[a])return s||e[a]}},Qi.getAllPlayers=function(){return Object.keys(Li.players).map((function(t){return Li.players[t]})).filter(Boolean)},Qi.players=Li.players,Qi.getComponent=_e.getComponent,Qi.registerComponent=function(t,e){Cn.isTech(e)&&G.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),_e.registerComponent.call(_e,t,e)},Qi.getTech=Cn.getTech,Qi.registerTech=Cn.registerTech,Qi.use=Sn,!j&&Object.defineProperty?(Object.defineProperty(Qi,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Qi.middleware,"TERMINATOR",{value:En,writeable:!1,enumerable:!0})):Qi.middleware={TERMINATOR:En},Qi.browser=N,Qi.TOUCH_ENABLED=O,Qi.extend=Gi,Qi.mergeOptions=me,Qi.bind=ee,Qi.registerPlugin=qi.registerPlugin,Qi.deregisterPlugin=qi.deregisterPlugin,Qi.plugin=function(t,e){return G.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),qi.registerPlugin(t,e)},Qi.getPlugins=qi.getPlugins,Qi.getPlugin=qi.getPlugin,Qi.getPluginVersion=qi.getPluginVersion,Qi.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),Qi.options.languages=me(Qi.options.languages,(n={},n[t]=e,n)),Qi.options.languages[t]},Qi.log=G,Qi.createTimeRange=Qi.createTimeRanges=ke,Qi.formatTime=cr,Qi.setFormatTime=ar,Qi.resetFormatTime=lr,Qi.parseUrl=nn,Qi.isCrossOrigin=sn,Qi.EventTarget=ie,Qi.on=Ut,Qi.one=Kt,Qi.off=$t,Qi.trigger=Xt,Qi.xhr=l,Qi.TextTrack=un,Qi.AudioTrack=hn,Qi.VideoTrack=pn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(t){Qi[t]=function(){return G.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),Ot[t].apply(null,arguments)}})),Qi.computedStyle=J,Qi.dom=Ot,Qi.url=an,t.exports=Qi},"6a9f":function(t,e,n){(function(e){var n;n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},t.exports=n}).call(this,n("c8ba"))},7100:function(t,e,n){var r=n("ba22");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("499e").default;i("6b808faf",r,!0,{sourceMap:!1,shadowMode:!1})},7161:function(t,e){var n=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function r(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function i(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function o(){this.values=n(null)}function s(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"===typeof i[o]){var s=i[o].split(n);if(2===s.length){var a=s[0],l=s[1];e(a,l)}}}function a(t,e,n){var a=t;function l(){var e=i(t);if(null===e)throw new r(r.Errors.BadTimeStamp,"Malformed timestamp: "+a);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function c(t,e){var r=new o;s(t,(function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),s=o[0];r.integer(t,s),r.percent(t,s)&&r.set("snapToLines",!1),r.alt(t,s,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","middle","end","left","right"]);break}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical",""),e.line=r.get("line","auto"),e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align","middle"),e.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=l(),u(),"--\x3e"!==t.substr(0,3))throw new r(r.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+a);t=t.substr(3),u(),e.endTime=l(),u(),c(t,e)}r.prototype=n(Error.prototype),r.prototype.constructor=r,r.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r=0&&e<=100))&&(this.set(t,e),!0)}};var l={"&":"&","<":"<",">":">","":"","":""," ":" "},c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={v:"title",lang:"lang"},h={rt:"ruby"};function p(t,e){function n(){if(!e)return null;function t(t){return e=e.substr(t.length),t}var n=e.match(/^([^<]*)(<[^>]*>?)?/);return t(n[1]?n[1]:n[2])}function r(t){return l[t]}function o(t){while(m=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))t=t.replace(m[0],r);return t}function s(t,e){return!h[e.localName]||h[e.localName]===t.localName}function a(e,n){var r=c[e];if(!r)return null;var i=t.document.createElement(r);i.localName=r;var o=u[e];return o&&n&&(i[o]=n.trim()),i}var p,d=t.document.createElement("div"),f=d,v=[];while(null!==(p=n()))if("<"!==p[0])f.appendChild(t.document.createTextNode(o(p)));else{if("/"===p[1]){v.length&&v[v.length-1]===p.substr(2).replace(">","")&&(v.pop(),f=f.parentNode);continue}var y,g=i(p.substr(1,p.length-2));if(g){y=t.document.createProcessingInstruction("timestamp",g),f.appendChild(y);continue}var m=p.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!m)continue;if(y=a(m[1],m[3]),!y)continue;if(!s(f,y))continue;m[2]&&(y.className=m[2].substr(1).replace("."," ")),v.push(m[1]),f.appendChild(y),f=y}return d}var d=[[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]];function f(t){for(var e=0;e=n[0]&&t<=n[1])return!0}return!1}function v(t){var e,n=[],r="";if(!t||!t.childNodes)return"ltr";function i(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function o(t){if(!t||!t.length)return null;var e=t.pop(),n=e.textContent||e.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?(t.length=0,r[0]):n}return"ruby"===e.tagName?o(t):e.childNodes?(i(t,e),o(t)):void 0}i(n,t);while(r=o(n))for(var s=0;s=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;il&&(i=new _(t),s=l),t=new _(o)}return i||o}var o=new _(e),s=e.cue,a=y(s),l=[];if(s.snapToLines){var c;switch(s.vertical){case"":l=["+y","-y"],c="height";break;case"rl":l=["+x","-x"],c="width";break;case"lr":l=["-x","+x"],c="width";break}var u=o.lineHeight,h=u*Math.round(a),p=n[c]+u,d=l[0];Math.abs(h)>p&&(h=h<0?-1:1,h*=Math.ceil(p/u)*u),a<0&&(h+=""===s.vertical?n.height:n.width,l=l.reverse()),o.move(d,h)}else{var f=o.lineHeight/n.height*100;switch(s.lineAlign){case"middle":a-=f/2;break;case"end":a-=f;break}switch(s.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")});break}l=["+y","-x","+x","-y"],o=new _(e)}var v=i(o,l);e.move(v.toCSSCompatValues(n))}function T(){}g.prototype.applyStyles=function(t,e){for(var n in e=e||this.div,t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},g.prototype.formatStyle=function(t,e){return 0===t?0:t+e},m.prototype=n(g.prototype),m.prototype.constructor=m,_.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}},_.prototype.overlaps=function(t){return this.leftt.left&&this.topt.top},_.prototype.overlapsAny=function(t){for(var e=0;e=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},_.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.leftt.right;case"+y":return this.topt.bottom}},_.prototype.intersectPercentage=function(t){var e=Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left)),n=Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top)),r=e*n;return r/(this.height*this.width)},_.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}},_.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t;var i={left:t.left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n};return i},T.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!==typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},T.convertCueToDOMTree=function(t,e){return t&&e?p(t,e):null};var C=.05,k="sans-serif",w="1.5%";T.processCues=function(t,e,n){if(!t||!e||!n)return null;while(n.firstChild)n.removeChild(n.firstChild);var r=t.document.createElement("div");function i(t){for(var e=0;e100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",a({},c,{get:function(){return T},set:function(t){var e=s(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",a({},c,{get:function(){return C},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");C=t,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",a({},c,{get:function(){return k},set:function(t){var e=s(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");k=e,this.hasBeenReset=!0}})),i.displayState=void 0,l)return i}l.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.exports=l},ba22:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".vjs-custom-skin>.video-js{width:100%;font-family:PingFang SC,Helvetica Neue,Hiragino Sans GB,Segoe UI,Microsoft YaHei,微软雅黑,sans-serif}.video-js.vjs-no-flex .vjs-menu-button-inline,.vjs-custom-skin>.video-js .vjs-menu-button-inline.vjs-slider-active,.vjs-custom-skin>.video-js .vjs-menu-button-inline:focus,.vjs-custom-skin>.video-js .vjs-menu-button-inline:hover{width:10em}.vjs-custom-skin>.video-js .vjs-controls-disabled .vjs-big-play-button{display:none!important}.vjs-custom-skin>.video-js .vjs-control{width:3em}.vjs-custom-skin>.video-js .vjs-control.vjs-live-control{width:auto;padding-left:.5em;letter-spacing:.1em}.vjs-custom-skin>.video-js .vjs-menu-button-inline:before{width:1.5em}.vjs-menu-button-inline .vjs-menu{left:3em}.vjs-custom-skin>.video-js .vjs-load-progress div,.vjs-seeking .vjs-big-play-button,.vjs-waiting .vjs-big-play-button{display:none!important}.vjs-custom-skin>.video-js .vjs-mouse-display:after,.vjs-custom-skin>.video-js .vjs-play-progress:after{padding:0 .4em .3em}.video-js.vjs-ended .vjs-loading-spinner{display:none}.video-js.vjs-ended .vjs-big-play-button{display:block!important}.video-js.vjs-ended .vjs-big-play-button,.video-js.vjs-paused .vjs-big-play-button,.vjs-paused.vjs-has-started.vjs-custom-skin>.video-js .vjs-big-play-button{display:block}.vjs-custom-skin>.video-js .vjs-big-play-button{top:50%;left:50%;margin-left:-1.5em;margin-top:-1em;background-color:rgba(0,0,0,.45);font-size:3.5em;height:2em!important;line-height:2em!important;margin-top:-1em!important}.video-js:hover .vjs-big-play-button,.vjs-custom-skin>.video-js .vjs-big-play-button:active,.vjs-custom-skin>.video-js .vjs-big-play-button:focus{background-color:rgba(36,131,213,.9)}.vjs-custom-skin>.video-js .vjs-loading-spinner{border-color:rgba(36,131,213,.8)}.vjs-custom-skin>.video-js .vjs-control-bar2{background-color:#000}.vjs-custom-skin>.video-js .vjs-control-bar{color:#fff;font-size:14px}.vjs-custom-skin>.video-js .vjs-play-progress,.vjs-custom-skin>.video-js .vjs-volume-level{background-color:#2483d5}.vjs-custom-skin>.video-js .vjs-play-progress:before{top:-.3em}.vjs-custom-skin>.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.3em}.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu{left:0}.vjs-custom-skin>.video-js .vjs-menu li{padding:0;line-height:2em;font-size:1.1em;font-family:PingFang SC,Helvetica Neue,Hiragino Sans GB,Segoe UI,Microsoft YaHei,微软雅黑,sans-serif}.vjs-custom-skin>.video-js .vjs-mouse-display:after,.vjs-custom-skin>.video-js .vjs-play-progress:after,.vjs-custom-skin>.video-js .vjs-time-tooltip{border-radius:0;font-size:1em;padding:0;width:3em;height:1.5em;line-height:1.5em;top:-3em}.vjs-custom-skin>.video-js .vjs-menu-button-popup .vjs-menu{width:5em;left:-1em}.vjs-custom-skin>.video-js .vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu{left:0}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-play-control{order:0}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-time-control{min-width:1em;padding:0;margin:0 .1em;text-align:center;display:block;order:1}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-playback-rate .vjs-playback-rate-value{font-size:1.2em;line-height:2.4}.vjs-custom-skin>.video-js .vjs-progress-control.vjs-control{order:2}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-volume-menu-button{order:3}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-resolution-button{order:4}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-resolution-button .vjs-resolution-button-label{display:block;line-height:3em}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-playback-rate{order:5}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-fullscreen-control{order:6}",""]),t.exports=e},bd95:function(t,e,n){"use strict";var r=n("0dd7"),i=n.n(r);i.a},cf62:function(t,e){t.exports=r;var n=Object.prototype.toString;function r(t){if(!t)return!1;var e=n.call(t);return"[object Function]"===e||"function"===typeof t&&"[object RegExp]"!==e||"undefined"!==typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}},d1dd:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-79e7233f]{text-align:left}.realTime[data-v-79e7233f]{padding:24px}",""]),t.exports=e},d302:function(t,e,n){var r=n("d1dd");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("499e").default;i("9d977c50",r,!0,{sourceMap:!1,shadowMode:!1})},d7ad:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"realTime bg-white"},[n("a-tabs",{attrs:{slot:"headerContent","default-active-key":"1"},on:{change:t.tabsChange},slot:"headerContent",model:{value:t.tabKey,callback:function(e){t.tabKey=e},expression:"tabKey"}},t._l(t.realTimeListData,(function(t){return n("a-tab-pane",{key:t.streetId.toString(),attrs:{tab:t.streetName}})})),1),n("a-row",{attrs:{gutter:20}},t._l(t.cameras.slice(0,t.selectTab.videoStyleRow*t.selectTab.videoStyleColumn),(function(e,r){return n("a-col",{key:r,attrs:{span:24/t.selectTab.videoStyleColumn}},[t.showVideo?n("video-player",{style:{height:t.videoHeight,marginBottom:t.selectTab.videoStyleRow*t.selectTab.videoStyleColumn-r-1>=t.selectTab.videoStyleColumn?"20px":0},attrs:{src:e.m3u8},on:{showModel:function(n){return t.showModel(e)}}}):t._e()],1)})),1)],1)},i=[],o=(n("4de4"),n("4160"),n("159b"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("video-player",{ref:"video-player",staticClass:"vjs-custom-skin",attrs:{options:t.playerOptions},on:{pause:function(e){return t.onPlayerPause(e)},playing:function(e){return t.onPlayerPlaying(e)},ended:function(e){return t.onPlayerEnded(e)}},nativeOn:{click:function(e){return t.onPlayerClick(e)}}})}),s=[],a=(n("7100"),n("e248")),l={name:"VideoPlayer",props:{src:{type:String,required:!0}},components:{videoPlayer:a["videoPlayer"]},data:function(){return{isPlay:!1,playerOptions:{sources:[{type:"application/x-mpegURL",withCredentials:!1,src:this.src}],height:"100%",language:"zh-CN",preload:"auto",techOrder:["html5"],flash:{hls:{withCredentials:!1}},html5:{hls:{withCredentials:!1}},autoplay:!0,muted:!0,controls:!0,notSupportedMessage:"不支持的视频格式",controlBar:{timeDivider:!1,durationDisplay:!1,remainingTimeDisplay:!1,fullscreenToggle:!0}}}},mounted:function(){},methods:{onPlayerPause:function(){this.isPlay=!1},onPlayerPlaying:function(){this.isPlay=!0},onPlayerEnded:function(t){this.isPlay=!1},onPlayerClick:function(){this.$emit("showModel")}}},c=l,u=(n("bd95"),n("2877")),h=Object(u["a"])(c,o,s,!1,null,"7cd3656d",null),p=h.exports,d={name:"historyMonitoring",components:{VideoPlayer:p},data:function(){return{realTimeListData:[],url:"722e6f04-bb3c-34b1-bcc7-ae9f6cd72e68",tabKey:"0",path:[],player:"",visible:!1,modelData:[],clientHeight:0,showVideo:!1}},computed:{selectTab:function(){var t=this;return this.realTimeListData.filter((function(e){return e.streetId==t.tabKey}))[0]||{}},cameras:function(){return this.selectTab.cameras||[]},videoHeight:function(){return(this.clientHeight-20*this.selectTab.videoStyleRow)/this.selectTab.videoStyleRow+"px"}},inject:["reload"],mounted:function(){this.getRealTimeList(),null==sessionStorage.getItem("tabKey")&&sessionStorage.setItem("tabKey",0),this.tabKey=sessionStorage.getItem("tabKey"),this.getClientHeight()},destroyed:function(){},methods:{getClientHeight:function(){this.clientHeight=this.$el.clientHeight-80},getRealTimeList:function(){var t=this;this.showVideo=!1,this.$api.httpApi.getRealTimeList({data:{}}).then((function(e){200==e.code&&(t.realTimeListData=e.data.reverse(),t.showVideo=!0)})).catch((function(t){console.log(t)}))},playVideo:function(t,e){var n=this;this.$nextTick((function(){n.$refs.video.forEach((function(t){t.play()}))}))},tabsChange:function(t){sessionStorage.setItem("tabKey",t),this.reload()},showModel:function(t){var e=this;this.$nextTick((function(){e.$router.push({name:"realTimeMonitoringModel",query:{modelData:t}})}))}}},f=d,v=(n("6081"),Object(u["a"])(f,r,i,!1,null,"79e7233f",null));e["default"]=v.exports},e248:function(t,e,n){!function(e,r){t.exports=r(n("6767"))}(0,(function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=3)}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=window.videojs||o.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r0&&(f=setTimeout((function(){if(!h){h=!0,d.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",s(t)}}),t.timeout)),d.setRequestHeader)for(c in m)m.hasOwnProperty(c)&&d.setRequestHeader(c,m[c]);else if(t.headers&&!l(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(d.responseType=t.responseType),"beforeSend"in t&&"function"===typeof t.beforeSend&&t.beforeSend(d),d.send(g||null),d}function p(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}function d(){}t.exports=u,u.XMLHttpRequest=r.XMLHttpRequest||d,u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:r.XDomainRequest,a(["get","put","post","patch","head","delete"],(function(t){u["delete"===t?"del":t]=function(e,n,r){return n=c(e,n,r),n.method=t.toUpperCase(),h(n)}}))},ec92:function(t,e){var n=function(t){return t.replace(/^\s+|\s+$/g,"")},r=function(t){return"[object Array]"===Object.prototype.toString.call(t)};t.exports=function(t){if(!t)return{};for(var e={},i=n(t).split("\n"),o=0;o0?o:0)}}},[t._v("<上一个")]),i("p",[t._v(t._s(t.checkObj.row)+"行"+t._s(t.checkObj.column)+"列")]),i("a-button",{staticClass:"btn",on:{click:function(i){return t.next(o<=e.length?o:o=e.length-1)}}},[t._v("下一个> ")])],1):t._e()])})),0):t._e()])})),0):i("div",t._l(t.streetDetail.leftColumn,(function(e,s){return i("div",{key:s,staticClass:"line"},t._l(t.streetDetail.leftRow,(function(o,a){return i("div",{key:a,staticClass:"el",staticStyle:{width:"100%",display:"flex","align-items":"center","justify-content":"space-between","flex-direction":"column"}},[o==t.row&&e==t.column?i("div",{staticClass:"carousel-page"},[i("p",{staticClass:"carousel-page-title"},[i("span",[t._v(" 货架号 : "+t._s(t.$route.query.shelveId)+" ")]),i("span",{staticStyle:{width:"400px",display:"inline-block",cursor:"pointer"},on:{click:function(e){return t.goHistory()}}},[t._v(" 工单号:暂无 ")])]),i("div",{staticClass:"carousel-page-content"},[i("div",{staticClass:"img-box"},[i("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",width:"500px",height:"400px",background:"#eaeaea"}},[t.checkObj.preoperationPic?i("img",{staticStyle:{width:"100%",height:"358px"},attrs:{src:t.imgUrl+t.checkObj.preoperationPic,alt:""}}):i("span",[t._v("暂无图片")])]),i("p",[t._v("操作前照片")])]),i("div",{staticClass:"img-box"},[i("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",width:"500px",height:"400px",background:"#eaeaea"}},[t.checkObj.overoperationPic?i("img",{staticStyle:{width:"100%",height:"358px"},attrs:{src:t.imgUrl+t.checkObj.overoperationPic,alt:""}}):i("span",[t._v("暂无图片")])]),i("p",[t._v("操作后照片")])]),i("div",{staticClass:"img-box"},[i("ul",t._l(t.params,(function(e){return i("li",{key:e.label},[i("span",{staticClass:"img-box-title"},[t._v(" "+t._s(e.label)+": ")]),i("span",{staticClass:"img-box-value"},[t._v(" "+t._s(t.scanAndCheck[e.key])+" ")])])})),0)])]),i("div",{staticClass:"carousel-page-footer"},[t._m(0,!0),i("div",{staticClass:"status"},[t._v(" 未核对 ")]),i("div",{staticClass:"status-btn"},[i("a-button",{staticClass:"btn",attrs:{type:"danger"},on:{click:function(e){return t.showModel({},s)}}},[t._v("人工复核 ")]),i("a-button",{staticClass:"btn",staticStyle:{background:"#29c12b","border-color":"#29c12b"},attrs:{type:"primary"},on:{click:function(e){return t.checkSure(t.row,t.column,t.shelveId,s)}}},[t._v("核对正确 ")])],1),o==t.row&&e==t.column?i("div",{staticClass:"bottom-btn"},[i("a-button",{staticClass:"btn",on:{click:function(i){return t.defaultPrev(o,e)}}},[t._v("<上一个")]),i("p",[t._v(t._s(o)+"行"+t._s(e)+"列")]),i("a-button",{staticClass:"btn",on:{click:function(i){return t.defaultNext(o,e)}}},[t._v("下一个> ")])],1):t._e()])]):t._e()])})),0)})),0),i("Model",{attrs:{visible:t.visible,modelData:t.modelData,index:t.index},on:{"update:visible":function(e){t.visible=e},"update:modelData":function(e){t.modelData=e},"update:model-data":function(e){t.modelData=e},sure:t.submit,close:t.closeModel}})],1)},o=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"info-box"},[i("p",[t._v("系统登记品规:暂无")]),i("p",[t._v("系统登记数量:暂无")])])}],a=(i("b0c0"),i("a9e3"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.isShow?i("div",[i("a-modal",{staticClass:"p-model",attrs:{title:"复核调整",closable:t.closable,"ok-text":"确认","cancel-text":"取消"},on:{ok:t.handleOk,cancel:t.handleCancel},model:{value:t.isShow,callback:function(e){t.isShow=e},expression:"isShow"}},[i("a-form",{attrs:{form:t.form,"wrapper-col":t.formItemAcrossLayout.wrapperCol}},[i("a-form-item",{attrs:{label:"品规","label-col":t.formItemAcrossLayout.labelCol}},[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["category",{rules:[{required:!0,message:"请输入品规名称!"}]}],expression:"['category', {rules: [{ required: true, message: '请输入品规名称!' }] }]"}],on:{input:t.onInput}}),t.searchListShow?i("happy-scroll",{staticClass:"search-list"},t._l(t.searchList,(function(e,s){return i("div",{key:s,staticClass:"search-item",on:{click:function(i){return t.select(e.name)}}},[t._v(" "+t._s(e.name)+" ")])})),0):t._e()],1),i("a-form-item",{attrs:{label:"数量","label-col":t.formItemAcrossLayout.labelCol}},[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["count",{rules:[{required:!0,message:"请输入数量!"}]}],expression:"['count', {rules: [{ required: true, message: '请输入数量!' }] }]"}]})],1)],1)],1)],1):t._e()}),c=[],n=i("5530"),l={labelCol:{span:8},wrapperCol:{span:14}},r={labelCol:{span:4},wrapperCol:{span:8,offset:4}},h={props:["visible","modelData","index"],watch:{visible:function(t){this.isShow=t},modelData:function(t){var e=this;console.log(t),this.mData=t,this.$nextTick((function(){e.form.setFieldsValue({category:t.category,count:t.count})}))},index:function(t){this.i=t}},data:function(){return{isShow:!1,title:"",closable:!1,confirmLoading:!1,form:this.$form.createForm(this,{name:"dynamic_rule"}),formItemAcrossLayout:l,formItemVerticalLayout:r,category:"",searchList:[],searchListShow:!1,mData:{},i:0}},mounted:function(){console.log("mounted执行了")},methods:{handleOk:function(){var t=this;"{}"!==JSON.stringify(this.mData)?(this.confirmLoading=!0,setTimeout((function(){t.form.validateFields((function(e,i){console.log(i),e||t.$api.httpApi.stockCheckByMan({data:Object(n["a"])(Object(n["a"])({},i),{},{column:t.mData.column,row:t.mData.row,shelveId:t.mData.shelveId})}).then((function(e){200==e.code&&(t.$emit("sure",!1,t.i),t.$message.success("复核成功"))})).catch((function(t){}))})),t.confirmLoading=!1}),500)):this.$message.error("该货位暂时没有记录")},handleCancel:function(){console.log("Clicked cancel button"),this.$emit("close",!1,{})},onInput:function(t){var e=this;console.log(this.form.getFieldValue("category"));var i=this.form.getFieldValue("category");this.$api.httpApi.getCategoryList({params:{name:i}}).then((function(t){200==t.code&&(e.searchList=t.data,t.data.length>0&&(e.searchListShow=!0))})).catch((function(t){}))},select:function(t){this.form.setFieldsValue({category:t}),this.searchListShow=!1}}},u=h,d=(i("f3a2"),i("2877")),p=Object(d["a"])(u,a,c,!1,null,"435504d0",null),f=p.exports,g=i("2000"),m={data:function(){return{listData:[],scanAndCheck:{},checkObj:{},streetDetail:{},checkList:{},id:0,row:1,column:1,selectName:"",shelveId:"",selectType:"",selectType2:"",visible:!1,category:"",count:0,modelData:{},index:0,imgUrl:"",params:[{label:"系统条码号",key:"SystemCode"},{label:"扫描条码号",key:"ScanCode"},{label:"系统数量",key:"SystemNumber"},{label:"检测数量",key:"CheckNumber"}]}},beforeRouteLeave:function(t,e,i){this.$destroy(),i()},created:function(){this.imgUrl=g["a"],console.log(this.$route.query.id),this.$route.query.row&&this.$route.query.column&&this.$route.query.shelveId&&this.$route.query.id&&this.$route.query.name?(this.id=this.$route.query.id,this.row=this.$route.query.row,this.column=this.$route.query.column,this.shelveId=this.$route.query.shelveId,this.selectName=this.$route.query.name,this.selectType=this.$route.query.type,this.selectType2=this.$route.query.type2,console.log(this.shelveId),console.log(this.row),console.log(this.column),this.getStockInfo(this.row,this.column,this.shelveId)):this.$route.query.checkObj&&this.$route.query.item&&this.$route.query.item.id&&this.$route.query.item.name&&(this.checkObj=this.$route.query.checkObj,this.streetDetail=this.$route.query.item,this.id=this.$route.query.item.id,this.selectName=this.$route.query.item.name,this.getScanAndCheck())},mounted:function(){this.getStreetList(),"{}"!==JSON.stringify(this.checkObj)&&(this.checkObj.shelveId==this.streetDetail.leftShelveId?this.selectType="left":this.selectType="right"),console.log(this.selectType2)},components:{Model:f},methods:{getScanAndCheck:function(){var t=this;this.$set(this,"scanAndCheck",{SystemCode:this.checkObj.category,ScanCode:null,SystemNumber:this.checkObj.count,CheckNumber:null}),2==this.checkObj.status?(this.scanAndCheck.ScanCode=this.scanAndCheck.SystemCode,this.scanAndCheck.CheckNumber=this.scanAndCheck.SystemNumber):this.$api.httpNodeApi.getStockRowColumnNesInfo({params:{row:Number(this.row),column:Number(this.column),shelveId:this.shelveId+""}}).then((function(e){200===e.code&&(t.scanAndCheck.ScanCode=e.data.new_category,t.scanAndCheck.CheckNumber=e.data.new_count)}))},getStreetList:function(){var t=this;this.$api.httpApi.getStreetList({data:{pageNum:1,pageSize:50}}).then((function(e){t.listData=e.data.list,t.select=t.id,t.getStreetDetail(t.id),t.getStockList(t.id)})).catch((function(t){console.error(t)}))},getStreetDetail:function(t){var e=this;this.$axios.get("/street/"+t,{data:{}}).then((function(t){e.streetDetail=t.data,console.log(e.streetDetail)})).catch((function(t){}))},getStockList:function(t){var e=this;this.$api.httpApi.getStockList({params:{streetId:t}}).then((function(t){e.checkList=t.data,console.log(e.checkList)})).catch((function(t){}))},getStockInfo:function(t,e,i){var s=this;this.$api.httpApi.getStockInfo({data:{row:Number(t),column:Number(e),shelveId:i}}).then((function(t){t.data&&(s.checkObj=t.data,s.shelveId=t.data.shelveId,s.getScanAndCheck())})).catch((function(t){}))},handleChange:function(t){console.log(t),this.select=t,this.id=t,this.row=1,this.column=1,console.log(JSON.stringify(this.checkObj)),this.getStreetList();for(var e=0;e2)if(r=m(r),e=r.charCodeAt(0),43===e||45===e){if(i=r.charCodeAt(2),88===i||120===i)return NaN}else if(48===e){switch(r.charCodeAt(1)){case 66:case 98:s=2,o=49;break;case 79:case 111:s=8,o=55;break;default:return+r}for(a=r.slice(2),c=a.length,n=0;no)return NaN;return parseInt(a,s)}return+r};if(a(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var I,S=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof S&&(y?u((function(){k.valueOf.call(i)})):l(i)!=v)?r(new b(x(e)),i,S):x(e)},w=s?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;w.length>C;C++)n(b,I=w[C])&&!n(S,I)&&g(S,I,f(b,I));S.prototype=k,k.constructor=S,c(o,v,S)}},ae5c:function(t,e,i){var s=i("16cf");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=i("499e").default;o("1db0f4a1",s,!0,{sourceMap:!1,shadowMode:!1})},db07:function(t,e,i){var s=i("3f88");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=i("499e").default;o("3e9bf9a5",s,!0,{sourceMap:!1,shadowMode:!1})},f3a2:function(t,e,i){"use strict";var s=i("db07"),o=i.n(s);o.a}}]);
\ No newline at end of file
diff --git a/js/chunk-47777934.c7f8e6fb.js b/js/chunk-47777934.c7f8e6fb.js
new file mode 100644
index 0000000..0ef3a79
--- /dev/null
+++ b/js/chunk-47777934.c7f8e6fb.js
@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-47777934"],{"02d3":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"checkOperation"},[i("div",{staticClass:"topMenu"},[t.listData[0]?i("a-select",{staticClass:"select-roadway",staticStyle:{width:"160px","margin-right":"25px"},attrs:{"default-value":t.selectName},on:{change:t.handleChange}},t._l(t.listData,(function(e){return i("a-select-option",{key:e.name,attrs:{value:e.id}},[t._v(" "+t._s(e.name)+" ")])})),1):t._e(),i("a-select",{staticStyle:{width:"160px","margin-right":"25px"},attrs:{value:t.selectType},on:{change:t.handleTypeChange}},[i("a-select-option",{attrs:{value:"left"}},[t._v(" 左货架 ")]),i("a-select-option",{attrs:{value:"right"}},[t._v(" 右货架 ")])],1),"none"!==t.selectType2&&""!==t.selectType2?i("a-select",{staticStyle:{width:"160px"},attrs:{value:t.selectType2},on:{change:t.sideStreetChange}},[i("a-select-option",{attrs:{value:"out"}},[t._v(" 外 ")]),i("a-select-option",{attrs:{value:"inside"}},[t._v(" 内 ")])],1):t._e(),i("span",[t._v(" 货架号 : "+t._s(t.shelveId)+" "+t._s(t.rowCount)+" "+t._s(t.columnCount)+" ")])],1),i("div",[i("div",{staticClass:"carousel-page"},[i("div",{staticClass:"carousel-page-content"},[i("div",{staticClass:"img-box"},[i("ul",[i("li",[i("span",{staticClass:"img-box-title"},[t._v(" 核对状态: ")]),i("span",{staticClass:"img-box-value"},[t._v(" "+t._s(t.statusMap[t.checkObj.status])+" ")])]),t._l(t.params,(function(e){return i("li",{key:e.label},[i("span",{staticClass:"img-box-title"},[t._v(" "+t._s(e.label)+": ")]),i("span",{staticClass:"img-box-value"},[t._v(" "+t._s(t.checkObj[e.key])+" ")])])})),t._m(0),[t.checkObj.checkPic?i("span",[i("happy-scroll",{staticClass:"scroll-box",staticStyle:{width:"50",height:"90px"},attrs:{color:"rgba(100,100,100,0.5)",size:"1"}},[i("viewer",[i("img",{staticClass:"historyImg",attrs:{src:t.imgUrl+t.checkObj.checkPic}})])],1)],1):i("span",[t._v(" 暂无盘点图 ")])]],2)]),i("div",{staticClass:"img-box"},[t.checkObj.preoperationPic?i("img",{staticStyle:{width:"100%",height:"358px"},attrs:{src:t.imgUrl+t.checkObj.preoperationPic,alt:""}}):i("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",width:"600px",height:"400px",background:"#eaeaea"}},[t._v(" 暂无图片 ")]),i("p",[t._v("操作前照片")])]),i("div",{staticClass:"img-box"},[t.checkObj.overoperationPic?i("img",{staticStyle:{width:"100%",height:"358px"},attrs:{src:t.imgUrl+t.checkObj.overoperationPic,alt:""}}):i("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",width:"600px",height:"400px",background:"#eaeaea"}},[t._v(" 暂无图片 ")]),i("p",[t._v("操作后照片")])])])]),i("div",{staticClass:"carousel-page-footer"},[0==t.checkObj.status?i("div",{staticClass:"status-btn"},[i("a-button",{staticClass:"btn",staticStyle:{background:"#29c12b","border-color":"#29c12b"},attrs:{type:"primary"},on:{click:function(e){return t.checkSure(t.checkObj.row,t.checkObj.column,t.checkObj.shelveId,t.index)}}},[t._v("核对正确 ")])],1):t._e(),1==t.checkObj.status||2==t.checkObj.status?i("div",{staticClass:"status-btn"},[i("a-button",{staticClass:"btn",attrs:{type:"danger"},on:{click:function(e){return t.showModel(t.checkObj,t.index)}}},[t._v("核对错误 ")]),i("a-button",{staticClass:"btn",staticStyle:{background:"#29c12b","border-color":"#29c12b"},attrs:{type:"primary"},on:{click:function(e){return t.checkSure(t.checkObj.row,t.checkObj.column,t.checkObj.shelveId,t.index)}}},[t._v("核对正确 ")])],1):t._e()]),i("div",{staticClass:"bottom-btn"},[i("a-button",{staticClass:"btn",on:{click:function(e){return t.prev()}}},[t._v("<上一个")]),i("p",[t._v(t._s(t.checkObj.row)+"行"+t._s(t.checkObj.column)+"列")]),i("a-button",{staticClass:"btn",on:{click:function(e){return t.next()}}},[t._v("下一个> ")])],1)]),i("Model",{attrs:{visible:t.visible,modelData:t.modelData,index:t.index},on:{"update:visible":function(e){t.visible=e},"update:modelData":function(e){t.modelData=e},"update:model-data":function(e){t.modelData=e},sure:t.submit,close:t.closeModel}})],1)},o=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",[i("span",{staticClass:"img-box-title"},[t._v(" 盘点图: ")])])}],a=(i("b0c0"),i("a9e3"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.isShow?i("div",[i("a-modal",{staticClass:"p-model",attrs:{title:"复核调整",closable:t.closable,"ok-text":"确认","cancel-text":"取消"},on:{ok:t.handleOk,cancel:t.handleCancel},model:{value:t.isShow,callback:function(e){t.isShow=e},expression:"isShow"}},[i("a-form",{attrs:{form:t.form,"wrapper-col":t.formItemAcrossLayout.wrapperCol}},[i("a-form-item",{attrs:{label:"品规","label-col":t.formItemAcrossLayout.labelCol}},[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["category",{rules:[{required:!0,message:"请输入品规名称!"}]}],expression:"['category', {rules: [{ required: true, message: '请输入品规名称!' }] }]"}],on:{input:t.onInput}}),t.searchListShow?i("happy-scroll",{staticClass:"search-list"},t._l(t.searchList,(function(e,s){return i("div",{key:s,staticClass:"search-item",on:{click:function(i){return t.select(e.name)}}},[t._v(" "+t._s(e.name)+" ")])})),0):t._e()],1),i("a-form-item",{attrs:{label:"数量","label-col":t.formItemAcrossLayout.labelCol}},[i("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["count",{rules:[{required:!0,message:"请输入数量!"}]}],expression:"['count', {rules: [{ required: true, message: '请输入数量!' }] }]"}]})],1)],1)],1)],1):t._e()}),n=[],l=i("5530"),c={labelCol:{span:8},wrapperCol:{span:14}},r={labelCol:{span:4},wrapperCol:{span:8,offset:4}},h={props:["visible","modelData","index"],watch:{visible:function(t){this.isShow=t},modelData:function(t){var e=this;console.log(t),this.mData=t,this.$nextTick((function(){e.form.setFieldsValue({category:t.category,count:t.count})}))},index:function(t){this.i=t}},data:function(){return{isShow:!1,title:"",closable:!1,confirmLoading:!1,form:this.$form.createForm(this,{name:"dynamic_rule"}),formItemAcrossLayout:c,formItemVerticalLayout:r,category:"",searchList:[],searchListShow:!1,mData:{},i:0}},mounted:function(){console.log("mounted执行了")},methods:{handleOk:function(){var t=this;"{}"!==JSON.stringify(this.mData)?(this.confirmLoading=!0,setTimeout((function(){t.form.validateFields((function(e,i){console.log(i),e||t.$api.httpApi.stockCheckByMan({data:Object(l["a"])(Object(l["a"])({},i),{},{column:t.mData.column,row:t.mData.row,shelveId:t.mData.shelveId})}).then((function(e){200==e.code&&(t.$emit("sure",!1,t.i),t.$message.success("复核成功"))})).catch((function(t){}))})),t.confirmLoading=!1}),500)):this.$message.error("该货位暂时没有记录")},handleCancel:function(){console.log("Clicked cancel button"),this.$emit("close",!1,{})},onInput:function(t){var e=this;console.log(this.form.getFieldValue("category"));var i=this.form.getFieldValue("category");this.$api.httpApi.getCategoryList({params:{name:i}}).then((function(t){200==t.code&&(e.searchList=t.data,t.data.length>0&&(e.searchListShow=!0))})).catch((function(t){}))},select:function(t){this.form.setFieldsValue({category:t}),this.searchListShow=!1}}},u=h,d=(i("f3a2"),i("2877")),p=Object(d["a"])(u,a,n,!1,null,"435504d0",null),f=p.exports,m=i("2000"),g={data:function(){return{listData:[],scanAndCheck:{},checkObj:{},streetDetail:{},checkList:{},id:0,row:1,column:1,rowCount:0,columnCount:0,selectName:"",shelveId:"",selectType:"left",selectType2:"",visible:!1,category:"",count:0,modelData:{},index:0,imgUrl:"",params:[{label:"工单号",key:"orderNum"},{label:"系统条码号",key:"wmsCode"},{label:"扫描条码号",key:"code"}],statusMap:{0:"未盘点",1:"盘点异常",2:"核对正确"}}},beforeRouteLeave:function(t,e,i){this.$destroy()},created:function(){this.imgUrl=m["a"],console.log(this.$route.query.id),this.getStreetList(),this.$route.query.row&&this.$route.query.column&&this.$route.query.shelveId&&this.$route.query.id&&this.$route.query.name&&(this.id=this.$route.query.id,this.row=this.$route.query.row,this.column=this.$route.query.column,this.shelveId=this.$route.query.shelveId,this.selectName=this.$route.query.name,this.selectType=this.$route.query.type,this.selectType2=this.$route.query.type2,this.getStockInfo(this.row,this.column,this.shelveId))},mounted:function(){},components:{Model:f},methods:{getStreetList:function(){var t=this;this.$api.httpApi.getStreetList({data:{pageNum:1,pageSize:50}}).then((function(e){t.listData=e.data.list,t.select=t.id,t.getStreetDetail(t.id)})).catch((function(t){console.error(t)}))},getStreetDetail:function(t){var e=this;this.$axios.get("/street/"+t,{data:{}}).then((function(t){e.streetDetail=t.data,e.getRowColumnCounts()})).catch((function(t){}))},getRowColumnCounts:function(){this.updateShleveAndRowColumnCount(this.selectType)},getStockInfo:function(t,e,i){var s=this;this.$api.httpApi.getStockInfo({data:{row:Number(t),column:Number(e),shelveId:i}}).then((function(t){t.data&&(s.checkObj=t.data)})).catch((function(t){console.log(t)}))},handleChange:function(t){this.select=t,this.id=t,this.row=1,this.column=1,this.getStreetList();for(var e=0;e1?this.column=this.column-1:this.row>1?(this.row=this.row-1,this.column=this.columnCount):(this.row=this.rowCount,this.column=this.columnCount),this.getStockInfo(this.row,this.column,this.shelveId)},next:function(){this.column2)if(r=g(r),e=r.charCodeAt(0),43===e||45===e){if(i=r.charCodeAt(2),88===i||120===i)return NaN}else if(48===e){switch(r.charCodeAt(1)){case 66:case 98:s=2,o=49;break;case 79:case 111:s=8,o=55;break;default:return+r}for(a=r.slice(2),n=a.length,l=0;lo)return NaN;return parseInt(a,s)}return+r};if(a(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var k,C=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof C&&(y?u((function(){x.valueOf.call(i)})):c(i)!=v)?r(new b(w(e)),i,C):w(e)},I=s?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;I.length>S;S++)l(b,k=I[S])&&!l(C,k)&&m(C,k,f(b,k));C.prototype=x,x.constructor=C,n(o,v,C)}},ae5c:function(t,e,i){var s=i("16cf");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=i("499e").default;o("1db0f4a1",s,!0,{sourceMap:!1,shadowMode:!1})},db07:function(t,e,i){var s=i("3f88");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var o=i("499e").default;o("3e9bf9a5",s,!0,{sourceMap:!1,shadowMode:!1})},f3a2:function(t,e,i){"use strict";var s=i("db07"),o=i.n(s);o.a}}]);
\ No newline at end of file
diff --git a/js/chunk-4e0fc9bc.16ffda3b.js b/js/chunk-4e0fc9bc.16ffda3b.js
new file mode 100644
index 0000000..3b8a0b5
--- /dev/null
+++ b/js/chunk-4e0fc9bc.16ffda3b.js
@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4e0fc9bc"],{"0242":function(t,e,o){var r=o("24fb");e=r(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-16cdd280]{text-align:left}",""]),t.exports=e},"06d1":function(t,e,o){var r=o("24fb");e=r(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-7775a66c]{text-align:left}",""]),t.exports=e},1191:function(t,e,o){var r=o("06d1");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=o("499e").default;a("a336de30",r,!0,{sourceMap:!1,shadowMode:!1})},2134:function(t,e,o){var r=o("24fb");e=r(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-9ffcfb8a]{text-align:left}",""]),t.exports=e},"2bbd":function(t,e,o){"use strict";var r=o("c02e"),a=o.n(r);a.a},"2c2a":function(t,e,o){"use strict";var r=o("89eb"),a=o.n(r);a.a},"43c7":function(t,e,o){"use strict";var r=o("1191"),a=o.n(r);a.a},"53ca":function(t,e,o){"use strict";o.d(e,"a",(function(){return r}));o("a4d3"),o("e01a"),o("d28b"),o("d3b7"),o("3ca3"),o("ddb0");function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}},5501:function(t,e,o){"use strict";var r=o("9515"),a=o.n(r);a.a},"6dc4":function(t,e,o){"use strict";var r=o("b3db"),a=o.n(r);a.a},"89eb":function(t,e,o){var r=o("b77d");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=o("499e").default;a("266cddc8",r,!0,{sourceMap:!1,shadowMode:!1})},9515:function(t,e,o){var r=o("f804");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=o("499e").default;a("46b9b242",r,!0,{sourceMap:!1,shadowMode:!1})},b3db:function(t,e,o){var r=o("2134");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=o("499e").default;a("3fc88897",r,!0,{sourceMap:!1,shadowMode:!1})},b77d:function(t,e,o){var r=o("24fb");e=r(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-75eab44f]{text-align:left}",""]),t.exports=e},c02e:function(t,e,o){var r=o("0242");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=o("499e").default;a("6e96c118",r,!0,{sourceMap:!1,shadowMode:!1})},d28b:function(t,e,o){var r=o("746f");r("iterator")},d3fe:function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"index"},[o("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,"label-width":"100px"}},[o("a-collapse",{model:{value:t.activeKey,callback:function(e){t.activeKey=e},expression:"activeKey"}},[o("a-collapse-panel",{key:"0",attrs:{header:"主题"}},[o("styles-theme",{attrs:{form:t.formData.theme},on:{"update:form":function(e){return t.$set(t.formData,"theme",e)}}})],1),o("a-collapse-panel",{key:"1",attrs:{header:"标题"}},[o("styles-title",{attrs:{form:t.formData.title},on:{"update:form":function(e){return t.$set(t.formData,"title",e)}}})],1),o("a-collapse-panel",{key:"2",attrs:{header:"菜单"}},[o("styles-menu",{attrs:{form:t.formData.menu},on:{"update:form":function(e){return t.$set(t.formData,"menu",e)}}})],1)],1),o("el-form-item",[o("span",{staticStyle:{float:"right"}},[o("a-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit()}}},[t._v(" 保存 ")]),o("a-button",{attrs:{type:"info"},on:{click:function(e){return t.init()}}},[t._v(" 重置 ")])],1)])],1)],1)},a=[],n=o("5530"),l=o("2f62"),c=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"styles-title"},[o("el-form-item",{attrs:{label:"标题文字",prop:"title.text",rules:{required:!0,message:"请输入标题",trigger:["blur","change"]}}},[o("a-input",{model:{value:t.form.text,callback:function(e){t.$set(t.form,"text",e)},expression:"form.text"}})],1),o("el-form-item",{attrs:{label:"字体颜色"}},[o("select-color",{model:{value:t.form.style.color,callback:function(e){t.$set(t.form.style,"color",e)},expression:"form.style.color"}})],1),o("el-form-item",{attrs:{label:"背景颜色"}},[o("select-color",{model:{value:t.form.style["background-color"],callback:function(e){t.$set(t.form.style,"background-color",e)},expression:"form.style['background-color']"}})],1)],1)},s=[],i=o("53ca"),f=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("el-color-picker",{attrs:{"show-alpha":"",size:"medium",value:t.color,predefine:t.predefineColors},on:{change:function(e){return t.$emit("change",e)}}})},u=[],m={name:"SelectColor",components:{},props:{color:{type:String}},computed:{},watch:{},model:{prop:"color",event:"change"},data:function(){return{predefineColors:["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","hsv(51, 100, 98)","hsva(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","#c7158577"]}},mounted:function(){},created:function(){},destroyed:function(){},methods:{}},d=m,p=(o("2bbd"),o("2877")),b=Object(p["a"])(d,f,u,!1,null,"16cdd280",null),y=b.exports,v={name:"StylesTitle",components:{SelectColor:y},props:{form:{}},computed:{},watch:{},data:function(){return{}},mounted:function(){},created:function(){},destroyed:function(){},methods:{onJsonChange:function(t){"object"===Object(i["a"])(t)&&(this.form.style=t)},onError:function(t){}}},h=v,g=(o("43c7"),Object(p["a"])(h,c,s,!1,null,"7775a66c",null)),x=g.exports,S=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"StylesMenu"},[o("p",[t._v("默认")]),o("el-form-item",{attrs:{label:"字体颜色"}},[o("select-color",{model:{value:t.form.default.color,callback:function(e){t.$set(t.form.default,"color",e)},expression:"form.default.color"}})],1),o("el-form-item",{attrs:{label:"背景颜色"}},[o("select-color",{model:{value:t.form.default["background-color"],callback:function(e){t.$set(t.form.default,"background-color",e)},expression:"form.default['background-color']"}})],1),o("p",[t._v("选中后")]),o("el-form-item",{attrs:{label:"字体颜色"}},[o("select-color",{model:{value:t.form.select.color,callback:function(e){t.$set(t.form.select,"color",e)},expression:"form.select.color"}})],1),o("el-form-item",{attrs:{label:"背景颜色"}},[o("select-color",{model:{value:t.form.select["background-color"],callback:function(e){t.$set(t.form.select,"background-color",e)},expression:"form.select['background-color']"}})],1)],1)},k=[],w={name:"StylesMenu",components:{SelectColor:y},props:{form:{}},computed:{},watch:{},data:function(){return{}},mounted:function(){},created:function(){},destroyed:function(){},methods:{}},$=w,O=(o("2c2a"),Object(p["a"])($,S,k,!1,null,"75eab44f",null)),j=O.exports,_=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"StylesTheme"},[o("el-form-item",{attrs:{label:"主题颜色"}},[o("select-color",{model:{value:t.form["primary-color"],callback:function(e){t.$set(t.form,"primary-color",e)},expression:"form['primary-color']"}})],1)],1)},M=[],C={name:"StylesTheme",components:{SelectColor:y},props:{form:{}},computed:{},watch:{},data:function(){return{}},mounted:function(){},created:function(){},destroyed:function(){},methods:{}},D=C,E=(o("6dc4"),Object(p["a"])(D,_,M,!1,null,"9ffcfb8a",null)),J=E.exports,T={name:"index",components:{StylesTheme:J,StylesMenu:j,StylesTitle:x},props:{},computed:Object(n["a"])(Object(n["a"])({},Object(l["mapGetters"])(["styles"])),{},{watchStyles:function(){return JSON.stringify(this.styles)}}),watch:{watchStyles:function(){this.init()}},data:function(){return{activeKey:["0","1","2"],formData:{}}},mounted:function(){},created:function(){console.log(this.styles),this.init()},destroyed:function(){},methods:Object(n["a"])(Object(n["a"])({},Object(l["mapActions"])(["updateStyles"])),{},{init:function(){console.log("init"),this.formData=JSON.parse(JSON.stringify(this.styles))},handleSubmit:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(!e)return console.log("error submit!!"),!1;t.updateStyles(t.formData),t.$message.success("刷新后生效")}))}})},K=T,F=(o("5501"),Object(p["a"])(K,r,a,!1,null,"1dbe66ae",null));e["default"]=F.exports},e01a:function(t,e,o){"use strict";var r=o("23e7"),a=o("83ab"),n=o("da84"),l=o("5135"),c=o("861d"),s=o("9bf2").f,i=o("e893"),f=n.Symbol;if(a&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var u={},m=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof m?new f(t):void 0===t?f():f(t);return""===t&&(u[e]=!0),e};i(m,f);var d=m.prototype=f.prototype;d.constructor=m;var p=d.toString,b="Symbol(test)"==String(f("test")),y=/^Symbol\((.*)\)[^)]+$/;s(d,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=p.call(t);if(l(u,t))return"";var o=b?e.slice(7,-1):e.replace(y,"$1");return""===o?void 0:o}}),r({global:!0,forced:!0},{Symbol:m})}},f804:function(t,e,o){var r=o("24fb");e=r(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-1dbe66ae]{text-align:left}.index[data-v-1dbe66ae] {width:70%;margin:auto}.index[data-v-1dbe66ae] .ant-form-item{margin-bottom:10px}.index[data-v-1dbe66ae] .jsoneditor-menu{display:none}",""]),t.exports=e}}]);
\ No newline at end of file
diff --git a/js/chunk-50c80e87.a61e3762.js b/js/chunk-50c80e87.a61e3762.js
deleted file mode 100644
index 1f0ae5d..0000000
--- a/js/chunk-50c80e87.a61e3762.js
+++ /dev/null
@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-50c80e87"],{2e3:function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return n})),a.d(e,"d",(function(){return s})),a.d(e,"a",(function(){return o})),a.d(e,"e",(function(){return r}));var i="/api/camera/config/import",n="/api/category/import",s="/api/stock/import",o="/api/pic/",r="/api/mp4/"},3768:function(t,e,a){"use strict";var i=a("f965"),n=a.n(i);n.a},"4aee":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-4f813492]{text-align:left}.video-model .across-layout[data-v-4f813492]{display:flex}.ant-btn[data-v-4f813492]{white-space:inherit;text-align:left}.video-js[data-v-4f813492]{width:100%;height:300px}.video-close[data-v-4f813492]{position:absolute;right:10px;top:10px;color:#fff;font-size:18px;width:24px;height:24px;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:10}",""]),t.exports=e},"4e41":function(t,e,a){"use strict";var i=a("bbf2"),n=a.n(i);n.a},bbf2:function(t,e,a){var i=a("c758");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("499e").default;n("06a55a22",i,!0,{sourceMap:!1,shadowMode:!1})},c758:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-217d0a51]{text-align:left}.history[data-v-217d0a51]{padding:24px}.ant-drawer-content-wrapper[data-v-217d0a51]{height:auto!important}.ant-drawer-body[data-v-217d0a51]{text-align:center}.ant-advanced-search-form .ant-form-item[data-v-217d0a51]{display:flex;width:100%}.historyImg[data-v-217d0a51]{width:80px;height:auto;margin:5px}",""]),t.exports=e},f965:function(t,e,a){var i=a("4aee");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("499e").default;n("12b65daa",i,!0,{sourceMap:!1,shadowMode:!1})},f9bc:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"history bg-white"},[a("div",{staticClass:"ant-advanced-search-form"},[a("a-form",{attrs:{layout:"inline",form:t.queryParam}},[a("a-row",{attrs:{gutter:24}},[a("a-col",{staticStyle:{"text-align":"left"},attrs:{span:4}},[a("a-select",{staticStyle:{width:"180px"},attrs:{"default-value":0},on:{change:t.handleChange}},[a("a-select-option",{attrs:{value:0}},[t._v(" 全部 ")]),t._l(t.streetList,(function(e,i){return a("a-select-option",{key:i,attrs:{value:e.id}},[t._v(" "+t._s(e.name)+" ")])}))],2)],1),a("a-col",{attrs:{span:10}},[a("a-form-item",{staticClass:"ageInput",attrs:{label:"告警时间"}},[a("a-range-picker",{attrs:{format:"YYYY-MM-DD HH:mm:ss","show-time":{defaultValue:[t.moment("00:00:00","HH:mm:ss"),t.moment("23:59:59","HH:mm:ss")]}},on:{change:t.onTimeChange},model:{value:t.time,callback:function(e){t.time=e},expression:"time"}},[a("a-icon",{attrs:{slot:"suffixIcon",type:"calendar"},slot:"suffixIcon"})],1)],1)],1),a("a-col",{staticStyle:{"text-align":"right"},attrs:{span:10}},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleSearch}},[t._v("搜索")]),a("a-button",{staticStyle:{"margin-left":"15px"},on:{click:t.reset}},[t._v("重置")])],1)],1)],1)],1),a("a-table",{attrs:{columns:t.columns,"row-key":function(t){return t.id},"data-source":t.data,pagination:t.pagination},on:{change:t.handleGetalarmLog},scopedSlots:t._u([{key:"streetType",fn:function(e){return a("span",{},[t._v(" "+t._s(null===e?"-":0===e?"单伸":"双伸")+" ")])}},{key:"pics",fn:function(e){return a("span",{staticStyle:{width:"auto"}},[[e.pics?a("span",{staticStyle:{height:"100%"}},[a("happy-scroll",{staticClass:"scroll-box",staticStyle:{width:"320px",height:"90px"},attrs:{color:"rgba(100,100,100,0.5)",size:"8"}},[a("viewer",{attrs:{images:e.pics}},t._l(e.pics,(function(e,i){return a("img",{key:i,staticClass:"historyImg",attrs:{src:t.imgUrl+e}})})),0)],1)],1):a("span",[t._v(" 暂无图片 ")])]],2)}},{key:"status",fn:function(e){return a("span",{},[a("span",{style:1==e.status?" color:red":""},[t._v(" "+t._s(null==e.status?" ":0==e.status?"正常":"告警")+" ")])])}},{key:"videoPath1",fn:function(e){return a("span",{},[e.videoPath1?a("a-button",{attrs:{type:"link"},on:{click:function(a){return t.showModel(e.videoPath1,e.cmd1)}}},[t._v(" 查看视频 ")]):a("span",[t._v(" -- ")])],1)}},{key:"videoPath2",fn:function(e){return a("span",{},[e.videoPath2?a("a-button",{attrs:{type:"link"},on:{click:function(a){return t.showModel(e.videoPath2,e.cmd2)}}},[t._v(" 查看视频 ")]):a("span",[t._v(" -- ")])],1)}}])}),a("Model",{attrs:{visible:t.visible,vid:t.vid},on:{"update:visible":function(e){t.visible=e},"update:vid":function(e){t.vid=e},close:t.closeModel}})],1)},n=[],s=(a("4160"),a("159b"),a("5530")),o=a("2000"),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.isShow?a("div",[a("a-modal",{staticClass:"video-model",attrs:{footer:null,maskClosable:!1,bodyStyle:{padding:0},centered:!0},on:{cancel:t.handleCancel},model:{value:t.isShow,callback:function(e){t.isShow=e},expression:"isShow"}},[a("div",{attrs:{slot:"closeIcon"},slot:"closeIcon"},[a("div",{staticClass:"video-close"},[t._v(" ╳ ")])]),a("div",{staticClass:"test_two_box"},[a("video",{staticClass:"video-js",attrs:{id:"myVideo",autoplay:!0,controls:""}},[a("source",{attrs:{src:t.video,type:"video/mp4"}})])])])],1):t._e()},l=[],c={props:["visible","vid"],watch:{visible:function(t){this.isShow=t},vid:function(t){console.log(t),console.log(1111111),this.video=t,this.$nextTick((function(){}))}},data:function(){return{isShow:!1,confirmLoading:!1,video:""}},mounted:function(){console.log("mounted执行了")},methods:{handleCancel:function(){this.$emit("close",!1,"")}}},d=c,u=(a("3768"),a("2877")),m=Object(u["a"])(d,r,l,!1,null,"4f813492",null),h=m.exports,p=a("c1df"),f=a.n(p),g={name:"alarmLog",data:function(){var t=this;return{queryParam:{startTime:f()().subtract(1,"weeks").format("YYYY-MM-DD HH:mm:ss"),endTime:f()().format("YYYY-MM-DD HH:mm:ss")},time:[],pageNum:1,pageSize:10,data:[],pagination:{total:0,defaultPageSize:10,current:1,showTotal:function(t){return"共 ".concat(t," 条数据")},showSizeChanger:!0,pageSizeOptions:["10","20","30"],onShowSizeChange:function(e,a){return t.pageSize=a}},loading:!1,imgUrl:o["a"],columns:[{title:"序号",customRender:function(t,e,a){return 10*(e.pageNumber-1)+a+1}},{title:"告警信号",dataIndex:"signal"},{title:"告警时间",dataIndex:"startTime"},{title:"复位时间",dataIndex:"endTime"},{title:"巷道",dataIndex:"streetName"},{title:"涉及货位",dataIndex:"location"},{title:"视频时长",dataIndex:"timeLength"},{title:"球机1",scopedSlots:{customRender:"videoPath1"}},{title:"球机2",scopedSlots:{customRender:"videoPath2"}}],visible:!1,vid:"",streetList:[]}},mounted:function(){this.getStreetList(),this.handleGetalarmLog(),console.log(this.imgUrl)},methods:{moment:f.a,range:function(t,e){for(var a=[],i=t;i=0&&t<=100}function o(){var t=100,e=3,n=0,o=100,s=0,a=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!i(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!==typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!i(t))throw new Error("RegionAnchorX must be between 0 and 100.");o=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!i(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(t){if(!i(t))throw new Error("ViewportAnchorY must be between 0 and 100.");a=t}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(t){if(!i(t))throw new Error("ViewportAnchorX must be between 0 and 100.");s=t}},scroll:{enumerable:!0,get:function(){return l},set:function(t){var e=r(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");l=e}}})}t.exports=o},"64e0":function(t,e,n){"use strict";var r=n("9391"),i=n.n(r);i.a},6767:function(t,e,n){
-/**
- * @license
- * Video.js 6.12.1
- * Copyright Brightcove, Inc.
- * Available under Apache License Version 2.0
- *
- *
- * Includes vtt.js
- * Available under Apache License Version 2.0
- *
- */
-function r(t){return t&&"object"===typeof t&&"default"in t?t["default"]:t}var i=r(n("ecdc")),o=r(n("0335")),s=r(n("1f90")),a=r(n("0630")),l=r(n("eaf9")),c=r(n("edcb")),u="6.12.1",h=i.navigator&&i.navigator.userAgent||"",p=/AppleWebKit\/([\d.]+)/i.exec(h),d=p?parseFloat(p.pop()):null,f=/iPad/i.test(h),v=/iPhone/i.test(h)&&!f,y=/iPod/i.test(h),g=v||f||y,m=function(){var t=h.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),_=/Android/i.test(h),b=function(){var t=h.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),T=_&&/webkit/i.test(h)&&b<2.3,C=_&&b<5&&d<537,k=/Firefox/i.test(h),w=/Edge/i.test(h),E=!w&&(/Chrome/i.test(h)||/CriOS/i.test(h)),S=function(){var t=h.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),j=/MSIE\s8\.0/.test(h),x=function(){var t=/MSIE\s(\d+)\.\d/.exec(h),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(h)&&/rv:11.0/.test(h)&&(e=11),e}(),P=/Safari/i.test(h)&&!E&&!_&&!w,A=(P||g)&&!E,O=nt()&&("ontouchstart"in i||i.navigator.maxTouchPoints||i.DocumentTouch&&i.document instanceof i.DocumentTouch),M=nt()&&"backgroundSize"in i.document.createElement("video").style,N=(Object.freeze||Object)({IS_IPAD:f,IS_IPHONE:v,IS_IPOD:y,IS_IOS:g,IOS_VERSION:m,IS_ANDROID:_,ANDROID_VERSION:b,IS_OLD_ANDROID:T,IS_NATIVE_ANDROID:C,IS_FIREFOX:k,IS_EDGE:w,IS_CHROME:E,CHROME_VERSION:S,IS_IE8:j,IE_VERSION:x,IS_SAFARI:P,IS_ANY_SAFARI:A,TOUCH_ENABLED:O,BACKGROUND_SIZE_SUPPORTED:M}),I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},R=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},L=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e},B=function(t,e){return t.raw=e,t},F=Object.prototype.toString,H=function(t){return U(t)?Object.keys(t):[]};function V(t,e){H(t).forEach((function(n){return e(t[n],n)}))}function z(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return H(t).reduce((function(n,r){return e(n,t[r],r)}),n)}function W(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:!!x&&x<11,r=X.levels[K],o=new RegExp("^("+r+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),q&&q.push([].concat(e)),e.unshift("VIDEOJS:"),i.console){var s=i.console[t];s||"debug"!==t||(s=i.console.info||i.console.log),s&&r&&o.test(t)&&(n&&(e=e.map((function(t){if(U(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)})).join(" ")),s.apply?s[Array.isArray(e)?"apply":"call"](i.console,e):s(e))}};X=function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=o.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(G.warn(s(Q,t,n)),i.setAttribute(t,n)):"textContent"===t?at(i,n):i[t]=n})),Object.getOwnPropertyNames(n).forEach((function(t){i.setAttribute(t,n[t])})),r&&St(i,r),i}function at(t,e){return"undefined"===typeof t.textContent?t.innerText=e:t.textContent=e,t}function lt(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function ct(t,e){return tt(e),t.classList?t.classList.contains(e):et(e).test(t.className)}function ut(t,e){return t.classList?t.classList.add(e):ct(t,e)||(t.className=(t.className+" "+e).trim()),t}function ht(t,e){return t.classList?t.classList.remove(e):(tt(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function pt(t,e,n){var r=ct(t,e);if("function"===typeof n&&(n=n(t,e)),"boolean"!==typeof n&&(n=!r),n!==r)return n?ut(t,e):ht(t,e),t}function dt(t,e){Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];null===r||"undefined"===typeof r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)}))}function ft(t){var e={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,s=r[i].value;"boolean"!==typeof t[o]&&-1===n.indexOf(","+o+",")||(s=null!==s),e[o]=s}return e}function vt(t,e){return t.getAttribute(e)}function yt(t,e,n){t.setAttribute(e,n)}function gt(t,e){t.removeAttribute(e)}function mt(){o.body.focus(),o.onselectstart=function(){return!1}}function _t(){o.onselectstart=function(){return!0}}function bt(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),n.height||(n.height=parseFloat(J(t,"height"))),n.width||(n.width=parseFloat(J(t,"width"))),n}}function Tt(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=o.documentElement,r=o.body,s=n.clientLeft||r.clientLeft||0,a=i.pageXOffset||r.scrollLeft,l=e.left+a-s,c=n.clientTop||r.clientTop||0,u=i.pageYOffset||r.scrollTop,h=e.top+u-c;return{left:Math.round(l),top:Math.round(h)}}function Ct(t,e){var n={},r=Tt(t),i=t.offsetWidth,o=t.offsetHeight,s=r.top,a=r.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-l+o)/o)),n.x=Math.max(0,Math.min(1,(c-a)/i)),n}function kt(t){return U(t)&&3===t.nodeType}function wt(t){while(t.firstChild)t.removeChild(t.firstChild);return t}function Et(t){return"function"===typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"===typeof t&&(t=t()),rt(t)||kt(t)?t:"string"===typeof t&&/\S/.test(t)?o.createTextNode(t):void 0})).filter((function(t){return t}))}function St(t,e){return Et(e).forEach((function(e){return t.appendChild(e)})),t}function jt(t,e){return St(wt(t),e)}function xt(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||(9===x||0===t.button&&1===t.buttons))}var Pt=ot("querySelector"),At=ot("querySelectorAll"),Ot=(Object.freeze||Object)({isReal:nt,isEl:rt,isInFrame:it,createEl:st,textContent:at,prependTo:lt,hasClass:ct,addClass:ut,removeClass:ht,toggleClass:pt,setAttributes:dt,getAttributes:ft,getAttribute:vt,setAttribute:yt,removeAttribute:gt,blockTextSelection:mt,unblockTextSelection:_t,getBoundingClientRect:bt,findPosition:Tt,getPointerPosition:Ct,isTextNode:kt,emptyEl:wt,normalizeContent:Et,appendContent:St,insertContent:jt,isSingleLeftClick:xt,$:Pt,$$:At}),Mt=1;function Nt(){return Mt++}var It={},Dt="vdata"+(new Date).getTime();function Rt(t){var e=t[Dt];return e||(e=t[Dt]=Nt()),It[e]||(It[e]={}),It[e]}function Lt(t){var e=t[Dt];return!!e&&!!Object.getOwnPropertyNames(It[e]).length}function Bt(t){var e=t[Dt];if(e){delete It[e];try{delete t[Dt]}catch(n){t.removeAttribute?t.removeAttribute(Dt):t[Dt]=null}}}function Ft(t,e){var n=Rt(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Bt(t)}function Ht(t,e,n,r){n.forEach((function(n){t(e,n,r)}))}function Vt(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||i.event;for(var s in t={},r)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&r.preventDefault||(t[s]=r[s]));if(t.target||(t.target=t.srcElement||o),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var a=o.documentElement,l=o.body;t.pageX=t.clientX+(a&&a.scrollLeft||l&&l.scrollLeft||0)-(a&&a.clientLeft||l&&l.clientLeft||0),t.pageY=t.clientY+(a&&a.scrollTop||l&&l.scrollTop||0)-(a&&a.clientTop||l&&l.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}var zt=!1;(function(){try{var t=Object.defineProperty({},"passive",{get:function(){zt=!0}});i.addEventListener("test",null,t),i.removeEventListener("test",null,t)}catch(e){}})();var Wt=["touchstart","touchmove"];function Ut(t,e,n){if(Array.isArray(e))return Ht(Ut,t,e,n);var r=Rt(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=Nt()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=Vt(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),s=0,a=o.length;s-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function $t(t,e,n){if(Lt(t)){var r=Rt(t);if(r.handlers){if(Array.isArray(e))return Ht($t,t,e,n);var i=function(t,e){r.handlers[e]=[],Ft(t,e)};if(void 0!==e){var o=r.handlers[e];if(o)if(n){if(n.guid)for(var s=0;s0)for(var i=0,s=t.length;i0)for(var a=0,l=e.length;a0)for(var c=0,u=n.length;c0)for(var h=0,p=r.length;h=e&&(t.apply(void 0,arguments),n=r)};return r},re=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i,o=void 0;return function(){var i=this,s=arguments,a=function(){o=null,a=null,n||t.apply(i,s)};!o&&n&&t.apply(i,s),r.clearTimeout(o),o=r.setTimeout(a,e)}},ie=function(){};ie.prototype.allowedEvents_={},ie.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Ut(this,t,e),this.addEventListener=n},ie.prototype.addEventListener=ie.prototype.on,ie.prototype.off=function(t,e){$t(this,t,e)},ie.prototype.removeEventListener=ie.prototype.off,ie.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Kt(this,t,e),this.addEventListener=n},ie.prototype.trigger=function(t){var e=t.type||t;"string"===typeof t&&(t={type:e}),t=Vt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Xt(this,t)},ie.prototype.dispatchEvent=ie.prototype.trigger;var oe=function(t){return t instanceof ie||!!t.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"===typeof t[e]}))},se=function(t){return"string"===typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},ae=function(t){if(!t.nodeName&&!oe(t))throw new Error("Invalid target; must be a DOM node or evented object.")},le=function(t){if(!se(t))throw new Error("Invalid event type; must be a non-empty string or array.")},ce=function(t){if("function"!==typeof t)throw new Error("Invalid listener; must be a function.")},ue=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),ae(r),le(i),ce(o),o=ee(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},he=function(t,e,n,r){ae(t),t.nodeName?qt[e](t,n,r):t[e](n,r)},pe={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=st("span",{className:"vjs-event-bus"});return W(t,pe),t.on("dispose",(function(){t.off(),i.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var fe={state:{},setState:function(t){var e=this;"function"===typeof t&&(t=t());var n=void 0;return V(t,(function(t,r){e.state[r]!==t&&(n=n||{},n[r]={from:e.state[r],to:t}),e.state[r]=t})),n&&oe(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function ve(t,e){return W(t,fe),t.state=W({},t.state,e),"function"===typeof t.handleStateChanged&&oe(t)&&t.on("statechanged",t.handleStateChanged),t}function ye(t){return"string"!==typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ge(t,e){return ye(t)===ye(e)}function me(){for(var t={},e=arguments.length,n=Array(e),r=0;r=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_),Bt(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return G.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=me(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return st(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],s=r&&r.split("-")[0],a=i&&i[s],l=n;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,(function(t,n){var r=e[n-1],i=r;return"undefined"===typeof r&&(i=t),i}))),l},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=ye(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"===typeof e){o=ye(e);var s=n.componentClass||o;n.name=o;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!==typeof a)return null;i=new a(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"===typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&ye(i.name()),o&&(this.childNameIndex_[o]=i),"function"===typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},t.prototype.removeChild=function(t){if("string"===typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,s=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter((function(t){return!o.some((function(e){return"string"===typeof e?t===e:t===e.name}))}))).map((function(t){var r=void 0,i=void 0;return"string"===typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||ye(e.name));return n&&!s.isTech(n)})).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},t.prototype.$=function(t,e){return Pt(t,e||this.contentEl())},t.prototype.$$=function(t,e){return At(t,e||this.contentEl())},t.prototype.hasClass=function(t){return ct(this.el_,t)},t.prototype.addClass=function(t){ut(this.el_,t)},t.prototype.removeClass=function(t){ht(this.el_,t)},t.prototype.toggleClass=function(t,e){pt(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return vt(this.el_,t)},t.prototype.setAttribute=function(t,e){yt(this.el_,t,e)},t.prototype.removeAttribute=function(t){gt(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+ye(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"===typeof i.getComputedStyle){var n=i.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(e=parseFloat(e),0===e){var r="offset"+ye(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=10,r=200,i=void 0;this.on("touchstart",(function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),i=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)i=!1;else if(e){var r=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY,s=Math.sqrt(r*r+o*o);s>n&&(i=!1)}}));var o=function(){i=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",(function(n){if(e=null,!0===i){var o=(new Date).getTime()-t;o0&&c.map((function(t){return l[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=ye(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();function be(t,e,n){if("number"!==typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function Te(t,e,n,r){return be(t,r,n.length-1),n[r][e]}function Ce(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:Te.bind(null,"start",0,t),end:Te.bind(null,"end",1,t)}}function ke(t,e){return Array.isArray(t)?Ce(t):void 0===t||void 0===e?Ce():Ce([[t,e]])}function we(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=ke(0,0));for(var o=0;oe&&(i=e),n+=i-r;return n/e}_e.prototype.supportsRaf_="function"===typeof i.requestAnimationFrame&&"function"===typeof i.cancelAnimationFrame,_e.registerComponent("Component",_e);for(var Ee={},Se=[["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"]],je=Se[0],xe=void 0,Pe=0;Pe0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;D(this,e);var s=L(this,t.call(this));if(!i&&(i=s,j))for(var a in i=o.createElement("custom"),e.prototype)"constructor"!==a&&(i[a]=e.prototype[a]);i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);for(var s=void 0,a=i.length-1;a>=0;a--)if(i[a].enabled){Ue(i,i[a]);break}if(j){for(var l in s=o.createElement("custom"),ze.prototype)"constructor"!==l&&(s[l]=ze.prototype[l]);for(var c in e.prototype)"constructor"!==c&&(s[c]=e.prototype[c])}return n=L(this,t.call(this,i,s)),s=n,s.changing_=!1,r=s,L(n,r)}return R(e,t),e.prototype.addTrack=function(e){var n=this;e.enabled&&Ue(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",(function(){n.changing_||(n.changing_=!0,Ue(n,e),n.changing_=!1,n.trigger("change"))}))},e}(ze),Xe=function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);for(var s=void 0,a=i.length-1;a>=0;a--)if(i[a].selected){Xe(i,i[a]);break}if(j){for(var l in s=o.createElement("custom"),ze.prototype)"constructor"!==l&&(s[l]=ze.prototype[l]);for(var c in e.prototype)"constructor"!==c&&(s[c]=e.prototype[c])}return n=L(this,t.call(this,i,s)),s=n,s.changing_=!1,Object.defineProperty(s,"selectedIndex",{get:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);var s=void 0;if(j){for(var a in s=o.createElement("custom"),ze.prototype)"constructor"!==a&&(s[a]=ze.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l])}return n=L(this,t.call(this,i,s)),s=n,r=s,L(n,r)}return R(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",ee(this,(function(){this.trigger("change")})));var n=["metadata","chapters"];-1===n.indexOf(e.kind)&&e.addEventListener("modechange",ee(this,(function(){this.trigger("selectedlanguagechange")})))},e}(ze),Ye=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];D(this,t);var n=this;if(j)for(var r in n=o.createElement("custom"),t.prototype)"constructor"!==r&&(n[r]=t.prototype[r]);n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,s=e.length;i0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var i=L(this,t.call(this)),s=i;if(j)for(var a in s=o.createElement("custom"),e.prototype)"constructor"!==a&&(s[a]=e.prototype[a]);var l={id:r.id||"vjs_track_"+Nt(),kind:r.kind||"",label:r.label||"",language:r.language||""},c=function(t){Object.defineProperty(s,t,{get:function(){return l[t]},set:function(){}})};for(var u in l)c(u);return n=s,L(i,n)}return R(e,t),e}(ie),nn=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=o.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,s=void 0;r&&(s=o.createElement("div"),s.innerHTML='',n=s.firstChild,s.setAttribute("style","display:none; position:absolute;"),o.body.appendChild(s));for(var a={},l=0;lx
',t=e.firstChild.href}return t},on=function(t){if("string"===typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=e.exec(t);if(n)return n.pop().toLowerCase()}return""},sn=function(t){var e=i.location,n=nn(t),r=":"===n.protocol?e.protocol:n.protocol,o=r+n.host!==e.protocol+e.host;return o},an=(Object.freeze||Object)({parseUrl:nn,getAbsoluteURL:rn,getFileExtension:on,isCrossOrigin:sn}),ln=function(t,e){var n=new i.WebVTT.Parser(i,i.vttjs,i.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(i.console&&i.console.groupCollapsed&&i.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach((function(t){return G.error(t)})),i.console&&i.console.groupEnd&&i.console.groupEnd()),n.flush()},cn=function(t,e){var n={uri:t},r=sn(t);r&&(n.cors=r),l(n,ee(this,(function(t,n,r){if(t)return G.error(t,n);if(e.loaded_=!0,"function"!==typeof i.WebVTT){if(e.tech_){var o=function(){return ln(r,e)};e.tech_.on("vttjsloaded",o),e.tech_.on("vttjserror",(function(){G.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",o)}))}}else ln(r,e)})))},un=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(D(this,e),!i.tech)throw new Error("A tech was not provided.");var o=me(i,{kind:Ze[i.kind]||"subtitles",language:i.language||i.srclang||""}),s=tn[o.mode]||"disabled",a=o["default"];"metadata"!==o.kind&&"chapters"!==o.kind||(s="hidden");var l=(n=L(this,t.call(this,o)),n);if(l.tech_=o.tech,j)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new Ge(l.cues_),h=new Ge(l.activeCues_),p=!1,d=ee(l,(function(){this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1)}));return"disabled"!==s&&l.tech_.ready((function(){l.tech_.on("timeupdate",d)}),!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;tn[t]&&(s=t,"showing"===s&&this.tech_.ready((function(){e.tech_.on("timeupdate",d)}),!0),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n=t||i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t)&&e.push(i)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var o=me(i,{kind:Qe[i.kind]||""}),s=(n=L(this,t.call(this,o)),n),a=!1;if(j)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a},set:function(t){"boolean"===typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),o.enabled&&(s.enabled=o.enabled),s.loaded_=!0,r=s,L(n,r)}return R(e,t),e}(en),pn=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var o=me(i,{kind:Je[i.kind]||""}),s=(n=L(this,t.call(this,o)),n),a=!1;if(j)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return a},set:function(t){"boolean"===typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),o.selected&&(s.selected=o.selected),r=s,L(n,r)}return R(e,t),e}(en),dn=0,fn=1,vn=2,yn=3,gn=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var r=L(this,t.call(this)),i=void 0,s=r;if(j)for(var a in s=o.createElement("custom"),e.prototype)"constructor"!==a&&(s[a]=e.prototype[a]);var l,c=new un(n);return s.kind=c.kind,s.src=c.src,s.srclang=c.language,s.label=c.label,s["default"]=c["default"],Object.defineProperty(s,"readyState",{get:function(){return i}}),Object.defineProperty(s,"track",{get:function(){return c}}),i=dn,c.addEventListener("loadeddata",(function(){i=vn,s.trigger({type:"load",target:s})})),j?(l=s,L(r,l)):r}return R(e,t),e}(ie);gn.prototype.allowedEvents_={load:"load"},gn.NONE=dn,gn.LOADING=fn,gn.LOADED=vn,gn.ERROR=yn;var mn={audio:{ListClass:$e,TrackClass:hn,capitalName:"Audio"},video:{ListClass:Ke,TrackClass:pn,capitalName:"Video"},text:{ListClass:qe,TrackClass:un,capitalName:"Text"}};Object.keys(mn).forEach((function(t){mn[t].getterName=t+"Tracks",mn[t].privateName=t+"Tracks_"}));var _n={remoteText:{ListClass:qe,TrackClass:un,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ye,TrackClass:gn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},bn=me(mn,_n);function Tn(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new bn.text.TrackClass(i);return o.addTrack(s),s}_n.names=Object.keys(_n),mn.names=Object.keys(mn),bn.names=[].concat(_n.names).concat(mn.names);var Cn=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};D(this,e),n.reportTouchActivity=!1;var i=L(this,t.call(this,null,n,r));return i.hasStarted_=!1,i.on("playing",(function(){this.hasStarted_=!0})),i.on("loadstart",(function(){this.hasStarted_=!1})),bn.names.forEach((function(t){var e=bn[t];n&&n[e.getterName]&&(i[e.privateName]=n[e.getterName])})),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===n["native"+t+"Tracks"]&&(i["featuresNative"+t+"Tracks"]=!1)})),!1===n.nativeCaptions||!1===n.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new bn.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return R(e,t),e.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,type:"sourceset"})},e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ee(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return ke(0,0)},e.prototype.bufferedPercent=function(){return we(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(mn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach((function(t){var n=e[t+"Tracks"]()||[],r=n.length;while(r--){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}}))},e.prototype.cleanupAutoTextTracks=function(){var t=this.autoRemoteTextTracks_||[],e=t.length;while(e--){var n=t[e];this.removeRemoteTextTrack(n)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new Oe(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?ke(0,0):ke()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;mn.names.forEach((function(e){var n=mn[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},e.prototype.addWebVttScript_=function(){var t=this;if(!i.WebVTT)if(o.body.contains(this.el())){if(!this.options_["vtt.js"]&&$(c)&&Object.keys(c).length>0)return void this.trigger("vttjsloaded");var e=o.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){e.onload=null,e.onerror=null})),i.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(G.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready((function(){return t.autoRemoteTextTracks_.addTrack(r.track)})),r},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=ye(t),e.techs_[t]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return t=ye(t),e.techs_&&e.techs_[t]?e.techs_[t]:i&&i.videojs&&i.videojs[t]?(G.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i.videojs[t]):void 0},e}(_e);bn.names.forEach((function(t){var e=bn[t];Cn.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),Cn.prototype.featuresVolumeControl=!0,Cn.prototype.featuresMuteControl=!0,Cn.prototype.featuresFullscreenResize=!1,Cn.prototype.featuresPlaybackRate=!1,Cn.prototype.featuresProgressEvents=!1,Cn.prototype.featuresSourceset=!1,Cn.prototype.featuresTimeupdateEvents=!1,Cn.prototype.featuresNativeTextTracks=!1,Cn.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n=t.sourceHandlers||[],r=void 0,i=0;i3&&void 0!==arguments[3]?arguments[3]:null,i="call"+ye(n),o=t.reduce(Dn(i),r),s=o===En,a=s?null:e[n](o);return Rn(t,n,a,s),a}var Mn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Nn={setCurrentTime:1},In={play:1,pause:1};function Dn(t){return function(e,n){return e===En?En:n[t]?n[t](e):e}}function Rn(t,e,n,r){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](r,n)}}function Ln(t){wn[t.id()]=null}function Bn(t,e){var n=wn[t.id()],r=null;if(void 0===n||null===n)return r=e(t),wn[t.id()]=[[e,r]],r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=e[0],a=e.slice(1);if("string"===typeof s)Fn(t,kn[s],n,r,i,o);else if(s){var l=Bn(r,s);if(!l.setSource)return i.push(l),Fn(t,a,n,r,i,o);l.setSource(W({},t),(function(e,s){if(e)return Fn(t,a,n,r,i,o);i.push(l),Fn(s,t.type===s.type?a:kn[s.type],n,r,i,o)}))}else a.length?Fn(t,a,n,r,i,o):o?n(t,i):Fn(t,kn["*"],n,r,i,!0)}var Hn={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"},Vn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=on(t),n=Hn[e.toLowerCase()];return n||""},zn=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter((function(t){return t.src===e}));if(n.length)return n[0].type;for(var r=t.$$("source"),i=0;i0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=W({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&G.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),r=W({role:"button"},r),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,r);return this.createControlTextEl(i),i},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=st("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,at(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.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))},e.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)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){Ut(o,"keydown",ee(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){$t(o,"keydown",ee(this,this.handleKeyPress))},e}(_e);_e.registerComponent("ClickableComponent",Xn);var Kn=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.update(),n.on("posterchange",ee(i,i.update)),i}return R(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=st("div",{className:"vjs-poster",tabIndex:-1});return M||(this.fallbackImg_=st("img"),t.appendChild(this.fallbackImg_)),t},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){if(this.fallbackImg_)this.fallbackImg_.src=t;else{var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e}},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?Ie(this.player_.play()):this.player_.pause())},e}(Xn);_e.registerComponent("PosterImage",Kn);var qn="#222",Yn="#ccc",Gn={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 Jn(t,e){var n=void 0;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Qn(t,e,n){try{t.style[e]=n}catch(r){return}}var Zn=function(t){function e(n,r,i){D(this,e);var o=L(this,t.call(this,n,r,i));return n.on("loadstart",ee(o,o.toggleDisplay)),n.on("texttrackchange",ee(o,o.updateDisplay)),n.on("loadstart",ee(o,o.preselectTrack)),n.ready(ee(o,(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",ee(this,this.updateDisplay));for(var t=this.options_.playerOptions.tracks||[],e=0;e1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=W({innerHTML:'',className:this.buildCSSClass()},e),n=W({type:"button"},n);var r=_e.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(r),r},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return G.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),_e.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Xn);_e.registerComponent("Button",er);var nr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Ie(e);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};Ne(e)?e.then(i,(function(){})):this.setTimeout(i,1)}else this.player_.focus()}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(er);nr.prototype.controlText_="Play Video",_e.registerComponent("BigPlayButton",nr);var rr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(er);_e.registerComponent("CloseButton",rr);var ir=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(er);ir.prototype.controlText_="Play",_e.registerComponent("PlayToggle",ir);var or=function(t,e){t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),i=i>0||s>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n},sr=or;function ar(t){sr=t}function lr(){sr=or}var cr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return sr(t,e)},ur=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.throttledUpdateContent=ne(ee(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return R(e,t),e.prototype.createEl=function(e){var n=this.buildCSSClass(),r=t.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=st("span",{className:n+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){while(this.contentEl_.firstChild)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=o.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return cr(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(_e);ur.prototype.labelText_="Time",ur.prototype.controlText_="Time",_e.registerComponent("TimeDisplay",ur);var hr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(ur);hr.prototype.labelText_="Current Time",hr.prototype.controlText_="Current Time",_e.registerComponent("CurrentTimeDisplay",hr);var pr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(ur);pr.prototype.labelText_="Duration",pr.prototype.controlText_="Duration",_e.registerComponent("DurationDisplay",pr);var dr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"/
"})},e}(_e);_e.registerComponent("TimeDivider",dr);var fr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(ur);fr.prototype.labelText_="Remaining Time",fr.prototype.controlText_="Remaining Time",_e.registerComponent("RemainingTimeDisplay",fr);var vr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return R(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=st("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(_e);_e.registerComponent("LiveDisplay",vr);var yr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return R(e,t),e.prototype.enabled=function(){return this.enabled_},e.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)},e.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}},e.prototype.createEl=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=W({tabIndex:0},n),r=W({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),t.prototype.createEl.call(this,e,n,r)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||E||t.preventDefault(),mt(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;_t(),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()},e.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!==typeof t||t!==t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%",r=e.el().style;return this.vertical()?r.height=n:r.width=n,t}}},e.prototype.calculateDistance=function(t){var e=Ct(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.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")},e}(_e);_e.registerComponent("Slider",yr);var gr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(t,e){var n=t/e||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=o(r,n);for(var s=0;se.length;u--)this.el_.removeChild(i[u-1]);i.length=e.length},e}(_e);_e.registerComponent("LoadProgressBar",gr);var mr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,n){var r=bt(this.el_),i=bt(this.player_.el()),o=t.width*e;if(i&&r){var s=t.left-i.left+o,a=t.width-o+(i.right-t.right),l=r.width/2;sr.width&&(l=r.width),this.el_.style.right="-"+l+"px",at(this.el_,n)}},e}(_e);_e.registerComponent("TimeTooltip",mr);var _r=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=cr(r,n.player_.duration()),o=n.getChild("timeTooltip");o&&o.update(t,e,i)}))},e}(_e);_r.prototype.options_={children:[]},x&&!(x>8)||g||_||_r.prototype.options_.children.push("timeTooltip"),_e.registerComponent("PlayProgressBar",_r);var br=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.update=ne(ee(i,i.update),25),i}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.duration(),i=cr(e*r,r);n.el_.style.left=t.width*e+"px",n.getChild("timeTooltip").update(t,e,i)}))},e}(_e);br.prototype.options_={children:["timeTooltip"]},_e.registerComponent("MouseTimeDisplay",br);var Tr=5,Cr=30,kr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.setEventHandlers_(),i}return R(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=ne(ee(this,this.update),Cr),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()}))}),Cr)})),this.on(this.player_,["ended","pause","waiting"],(function(){t.clearInterval(t.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[cr(t,n),cr(n,n)],"{1} of {2}")),this.bar.update(bt(this.el_),e)},e.prototype.update=function(e){var n=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){xt(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(xt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Ie(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+Tr)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-Tr)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(yr);kr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},x&&!(x>8)||g||_||kr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),kr.prototype.playerEvent="timeupdate",_e.registerComponent("SeekBar",kr);var wr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.handleMouseMove=ne(ee(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=ne(ee(i,i.handleMouseSeek),25),i.enable(),i}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var n=e.getChild("mouseTimeDisplay"),r=e.el(),i=bt(r),o=Ct(r,t).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.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)},e.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)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(_e);wr.prototype.options_={children:["seekBar"]},_e.registerComponent("ProgressControl",wr);var Er=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),!1===o[Ee.fullscreenEnabled]&&i.disable(),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(er);Er.prototype.controlText_="Fullscreen",_e.registerComponent("FullscreenToggle",Er);var Sr=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))},jr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},e}(_e);_e.registerComponent("VolumeLevel",jr);var xr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready((function(){return i.updateARIAAttributes()})),i}return R(e,t),e.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"})},e.prototype.handleMouseDown=function(e){xt(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){xt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(yr);xr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},xr.prototype.playerEvent="volumechange",_e.registerComponent("VolumeBar",xr);var Pr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),r.vertical=r.vertical||!1,("undefined"===typeof r.volumeBar||$(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=L(this,t.call(this,n,r));return Sr(i,n),i.throttledHandleMouseMove=ne(ee(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}return R(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(_e);Pr.prototype.options_={children:["volumeBar"]},_e.registerComponent("VolumeControl",Pr);var Ar=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))},Or=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return Ar(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;g&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var n=0;n<4;n++)ht(this.el_,"vjs-vol-"+n);ut(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume(),e=t?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(er);Or.prototype.controlText_="Mute",_e.registerComponent("MuteToggle",Or);var Mr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),"undefined"!==typeof r.inline?r.inline=r.inline:r.inline=!0,("undefined"===typeof r.volumeControl||$(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=L(this,t.call(this,n,r));return i.on(n,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return R(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.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")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(_e);Mr.prototype.options_={children:["muteToggle","volumeControl"]},_e.registerComponent("VolumePanel",Mr);var Nr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return R(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",ee(this,(function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())})))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=st(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ut(n,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),n},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice(),n=e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className);n&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(_e);_e.registerComponent("Menu",Nr);var Ir=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e);var i=L(this,t.call(this,n,r));i.menuButton_=new er(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=er.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return R(e,t),e.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()},e.prototype.createMenu=function(){var t=new Nr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=st("li",{className:"vjs-menu-title",innerHTML:ye(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),lt(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",ee(this,(function(t){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){Ut(o,"keydown",ee(this,this.handleKeyPress))},e.prototype.handleBlur=function(){$t(o,"keydown",ee(this,this.handleKeyPress))},e.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())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),g&&it())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(_e);_e.registerComponent("MenuButton",Ir);var Dr=function(t){function e(n,r){D(this,e);var i=r.tracks,o=L(this,t.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return L(o);var s=ee(o,o.update);return i.addEventListener("removetrack",s),i.addEventListener("addtrack",s),o.player_.on("ready",s),o.player_.on("dispose",(function(){i.removeEventListener("removetrack",s),i.removeEventListener("addtrack",s)})),o}return R(e,t),e}(Ir);_e.registerComponent("TrackButton",Dr);var Rr=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.selectable=r.selectable,i.isSelected_=r.selected||!1,i.multiSelectable=r.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}return R(e,t),e.prototype.createEl=function(e,n,r){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",W({className:"vjs-menu-item",innerHTML:'",tabIndex:-1},n),r)},e.prototype.handleClick=function(t){this.selected(!0)},e.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))},e}(Xn);_e.registerComponent("MenuItem",Rr);var Lr=function(t){function e(n,r){D(this,e);var s=r.track,a=n.textTracks();r.label=s.label||s.language||"Unknown",r.selected="showing"===s.mode;var l=L(this,t.call(this,n,r));l.track=s;var c=function(){for(var t=arguments.length,e=Array(t),n=0;n-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(Rr);_e.registerComponent("TextTrackMenuItem",Lr);var Br=function(t){function e(n,r){return D(this,e),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,L(this,t.call(this,n,r))}return R(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(Lr);_e.registerComponent("OffTextTrackMenuItem",Br);var Fr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D(this,e),r.tracks=n.textTracks(),L(this,t.call(this,n,r))}return R(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lr,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new Br(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i-1){var s=new e(this.player_,{track:o,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+o.kind+"-menu-item"),t.push(s)}}return t},e}(Dr);_e.registerComponent("TextTrackButton",Fr);var Hr=function(t){function e(n,r){D(this,e);var i=r.track,o=r.cue,s=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=o.text,r.selected=o.startTime<=s&&s=0;e--){var n=t[e];if(n.kind===this.kind_)return n}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ye(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n\n '+this.localize("Captions")+"\n "),i+="";var o=t.prototype.createEl.call(this,e,W({innerHTML:i},n),r);return o},e}(Lr);_e.registerComponent("SubsCapsMenuItem",Xr);var Kr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e);var i=L(this,t.call(this,n,r));return i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(ye(i.label_)),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Ur(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,Xr),e},e}(Fr);Kr.prototype.kinds_=["captions","subtitles"],Kr.prototype.controlText_="Subtitles",_e.registerComponent("SubsCapsButton",Kr);var qr=function(t){function e(n,r){D(this,e);var i=r.track,o=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var s=L(this,t.call(this,n,r));s.track=i,s.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var t=arguments.length,e=Array(t),n=0;n\n '+this.localize("Descriptions")+"\n "),i+="";var o=t.prototype.createEl.call(this,e,W({innerHTML:i},n),r);return o},e.prototype.handleClick=function(e){var n=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return D(this,e),r.tracks=n.audioTracks(),L(this,t.call(this,n,r))}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),n=0;n=0;n--)t.addChild(new Gr(this.player(),{rate:e[n]+"x"}));return t},e.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;ie){r=n[i];break}this.player().playbackRate(r)},e.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},e.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(Ir);Jr.prototype.controlText_="Playback Rate",_e.registerComponent("PlaybackRateMenuButton",Jr);var Qr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(_e);_e.registerComponent("Spacer",Qr);var Zr=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(Qr);_e.registerComponent("CustomControlSpacer",Zr);var ti=function(t){function e(){return D(this,e),L(this,t.apply(this,arguments))}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(_e);ti.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},_e.registerComponent("ControlBar",ti);var ei=function(t){function e(n,r){D(this,e);var i=L(this,t.call(this,n,r));return i.on(n,"error",i.open),i}return R(e,t),e.prototype.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},e.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(Ve);ei.prototype.options_=me(Ve.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),_e.registerComponent("ErrorDisplay",ei);var ni="vjs-text-track-settings",ri=["#000","Black"],ii=["#00F","Blue"],oi=["#0FF","Cyan"],si=["#0F0","Green"],ai=["#F0F","Magenta"],li=["#F00","Red"],ci=["#FFF","White"],ui=["#FF0","Yellow"],hi=["1","Opaque"],pi=["0.5","Semi-Transparent"],di=["0","Transparent"],fi={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ri,ci,li,si,ii,ui,ai,oi]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[hi,pi,di]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ci,ri,li,si,ii,ui,ai,oi]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[hi,pi]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[di,pi,hi]}};function vi(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function yi(t,e){var n=t.options[t.options.selectedIndex].value;return vi(n,e)}function gi(t,e,n){if(e)for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",i=fi[t],o=i.id.replace("%s",this.id_),s=[n,o].join(" ").trim();return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),""+r+">",'").join("")},e.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['"].join("")},e.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['"].join("")},e.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['"].join("")},e.prototype.createElColors_=function(){return st("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.prototype.createElFont_=function(){return st("div",{className:"vjs-track-settings-font",innerHTML:['",'",'"].join("")})},e.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return st("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},e.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.prototype.label=function(){return this.localize("Caption Settings Dialog")},e.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.prototype.getValues=function(){var t=this;return z(fi,(function(e,n,r){var i=yi(t.$(n.selector),n.parser);return void 0!==i&&(e[r]=i),e}),{})},e.prototype.setValues=function(t){var e=this;V(fi,(function(n,r){gi(e.$(n.selector),t[r],n.parser)}))},e.prototype.setDefaults=function(){var t=this;V(fi,(function(e){var n=e.hasOwnProperty("default")?e["default"]:0;t.$(e.selector).selectedIndex=n}))},e.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(i.localStorage.getItem(ni))}catch(e){G.warn(e)}t&&this.setValues(t)},e.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?i.localStorage.setItem(ni,JSON.stringify(t)):i.localStorage.removeItem(ni)}catch(e){G.warn(e)}}},e.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(o,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},e}(Ve);_e.registerComponent("TextTrackSettings",mi);var _i=function(t){function e(n,r){D(this,e);var o=r.ResizeObserver||i.ResizeObserver;null===r.ResizeObserver&&(o=!1);var s=me({createEl:!o},r),a=L(this,t.call(this,n,s));return a.ResizeObserver=r.ResizeObserver||i.ResizeObserver,a.loadListener_=null,a.resizeObserver_=null,a.debouncedHandler_=re((function(){a.resizeHandler()}),100,!1,n),o?(a.resizeObserver_=new a.ResizeObserver(a.debouncedHandler_),a.resizeObserver_.observe(n.el())):(a.loadListener_=function(){a.el_.contentWindow&&Ut(a.el_.contentWindow,"resize",a.debouncedHandler_),a.off("load",a.loadListener_)},a.on("load",a.loadListener_)),a}return R(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.prototype.resizeHandler=function(){this.player_.trigger("playerresize")},e.prototype.dispose=function(){this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&$t(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},e}(_e);_e.registerComponent("ResizeManager",_i);var bi=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var n=t.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o=2&&i.push("loadeddata"),t.readyState>=3&&i.push("canplay"),t.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(t){this.trigger(t)}),this)}))}},e.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(e){G(e,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;if(this.el_.duration===1/0&&_&&E&&0===this.el_.currentTime){var e=function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN},e.prototype.width=function(){return this.el_.offsetWidth},e.prototype.height=function(){return this.el_.offsetHeight},e.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)}))}},e.prototype.supportsFullScreen=function(){if("function"===typeof this.el_.webkitEnterFullScreen){var t=i.navigator&&i.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},e.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},e.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},e.prototype.reset=function(){e.resetMediaElement(this.el_)},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.prototype.setControls=function(t){this.el_.controls=!!t},e.prototype.addTextTrack=function(e,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,r):t.prototype.addTextTrack.call(this,e,n,r)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var n=o.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e["default"]&&(n["default"]=e["default"]),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n},e.prototype.addRemoteTextTrack=function(e,n){var r=t.prototype.addRemoteTextTrack.call(this,e,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},e.prototype.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks){var n=this.$$("track"),r=n.length;while(r--)e!==n[r]&&e!==n[r].track||this.el().removeChild(n[r])}},e.prototype.getVideoPlaybackQuality=function(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),i.performance&&"function"===typeof i.performance.now?t.creationTime=i.performance.now():i.performance&&i.performance.timing&&"number"===typeof i.performance.timing.navigationStart&&(t.creationTime=i.Date.now()-i.performance.timing.navigationStart),t},e}(Cn);if(nt()){Pi.TEST_VID=o.createElement("video");var Ai=o.createElement("track");Ai.kind="captions",Ai.srclang="en",Ai.label="English",Pi.TEST_VID.appendChild(Ai)}Pi.isSupported=function(){try{Pi.TEST_VID.volume=.5}catch(t){return!1}return!(!Pi.TEST_VID||!Pi.TEST_VID.canPlayType)},Pi.canPlayType=function(t){return Pi.TEST_VID.canPlayType(t)},Pi.canPlaySource=function(t,e){return Pi.canPlayType(t.type)},Pi.canControlVolume=function(){try{var t=Pi.TEST_VID.volume;return Pi.TEST_VID.volume=t/2+.1,t!==Pi.TEST_VID.volume}catch(e){return!1}},Pi.canMuteVolume=function(){try{var t=Pi.TEST_VID.muted;return Pi.TEST_VID.muted=!t,Pi.TEST_VID.muted?yt(Pi.TEST_VID,"muted","muted"):gt(Pi.TEST_VID,"muted","muted"),t!==Pi.TEST_VID.muted}catch(e){return!1}},Pi.canControlPlaybackRate=function(){if(_&&E&&S<58)return!1;try{var t=Pi.TEST_VID.playbackRate;return Pi.TEST_VID.playbackRate=t/2+.1,t!==Pi.TEST_VID.playbackRate}catch(e){return!1}},Pi.canOverrideAttributes=function(){if(j)return!1;try{var t=function(){};Object.defineProperty(o.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(o.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(o.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(o.createElement("audio"),"innerHTML",{get:t,set:t})}catch(e){return!1}return!0},Pi.supportsNativeTextTracks=function(){return A||g&&E},Pi.supportsNativeVideoTracks=function(){return!(!Pi.TEST_VID||!Pi.TEST_VID.videoTracks)},Pi.supportsNativeAudioTracks=function(){return!(!Pi.TEST_VID||!Pi.TEST_VID.audioTracks)},Pi.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Pi.prototype.featuresVolumeControl=Pi.canControlVolume(),Pi.prototype.featuresMuteControl=Pi.canMuteVolume(),Pi.prototype.featuresPlaybackRate=Pi.canControlPlaybackRate(),Pi.prototype.featuresSourceset=Pi.canOverrideAttributes(),Pi.prototype.movingMediaElementInDOM=!g,Pi.prototype.featuresFullscreenResize=!0,Pi.prototype.featuresProgressEvents=!0,Pi.prototype.featuresTimeupdateEvents=!0,Pi.prototype.featuresNativeTextTracks=Pi.supportsNativeTextTracks(),Pi.prototype.featuresNativeVideoTracks=Pi.supportsNativeVideoTracks(),Pi.prototype.featuresNativeAudioTracks=Pi.supportsNativeAudioTracks();var Oi=Pi.TEST_VID&&Pi.TEST_VID.constructor.prototype.canPlayType,Mi=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Ni=/^video\/mp4/i;Pi.patchCanPlayType=function(){b>=4&&!k&&!E?Pi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Mi.test(t)?"maybe":Oi.call(this,t)}:T&&(Pi.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Ni.test(t)?"maybe":Oi.call(this,t)})},Pi.unpatchCanPlayType=function(){var t=Pi.TEST_VID.constructor.prototype.canPlayType;return Pi.TEST_VID.constructor.prototype.canPlayType=Oi,t},Pi.patchCanPlayType(),Pi.disposeMediaElement=function(t){if(t){t.parentNode&&t.parentNode.removeChild(t);while(t.hasChildNodes())t.removeChild(t.firstChild);t.removeAttribute("src"),"function"===typeof t.load&&function(){try{t.load()}catch(e){}}()}},Pi.resetMediaElement=function(t){if(t){var e=t.querySelectorAll("source"),n=e.length;while(n--)t.removeChild(e[n]);t.removeAttribute("src"),"function"===typeof t.load&&function(){try{t.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Pi.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Pi.prototype["set"+ye(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){Pi.prototype[t]=function(){return this.el_[t]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(t){Pi.prototype["set"+ye(t)]=function(e){this.el_[t]=e}})),["pause","load","play"].forEach((function(t){Pi.prototype[t]=function(){return this.el_[t]()}})),Cn.withSourceHandlers(Pi),Pi.nativeSourceHandler={},Pi.nativeSourceHandler.canPlayType=function(t){try{return Pi.TEST_VID.canPlayType(t)}catch(e){return""}},Pi.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Pi.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=on(t.src);return Pi.nativeSourceHandler.canPlayType("video/"+n)}return""},Pi.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},Pi.nativeSourceHandler.dispose=function(){},Pi.registerSourceHandler(Pi.nativeSourceHandler),Cn.registerTech("Html5",Pi);var Ii=B(["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "],["\n Using the tech directly can be dangerous. I hope you know what you're doing.\n See https://github.com/videojs/video.js/issues/2617 for more info.\n "]),Di=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ri={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Li=function(t){function e(n,r,i){if(D(this,e),n.id=n.id||r.id||"vjs_video_"+Nt(),r=W(e.getTagSettings(n),r),r.initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"===typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else{var s=n;while(s&&1===s.nodeType){if(ft(s).hasOwnProperty("lang")){r.language=s.getAttribute("lang");break}s=s.parentNode}}var a=L(this,t.call(this,null,r,i));if(a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&ft(n),a.language(a.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach((function(t){l[t.toLowerCase()]=r.languages[t]})),a.languages_=l}else a.languages_=e.prototype.options_.languages;a.cache_={},a.poster_=r.poster||"",a.controls_=!!r.controls,a.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?a.options_.autoplay=!0:a.autoplay(a.options_.autoplay),a.scrubbing_=!1,a.el_=a.createEl(),a.cache_.lastPlaybackRate=a.defaultPlaybackRate(),de(a,{eventBusKey:"el_"});var c=me(a.options_);if(r.plugins){var h=r.plugins;Object.keys(h).forEach((function(t){if("function"!==typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](h[t])}),a)}a.options_.playerOptions=c,a.middleware_=[],a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),g||a.addClass("vjs-workinghover"),e.players[a.id_]=a;var p=u.split(".")[0];return a.addClass("vjs-v"+p),a.userActive(!0),a.reportUserActivity(),a.one("play",a.listenForUserActivity_),a.on("fullscreenchange",a.handleFullscreenChange_),a.on("stageclick",a.handleStageClick_),a.changingSrc_=!1,a.playWaitingForReady_=!1,a.playOnLoadstart_=null,a}return R(e,t),e.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Ln(this),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var e=this.tag,n=void 0,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=e.parentNode:s||(n=this.el_=t.prototype.createEl.call(this,"div"));var a=ft(e);if(s){n=this.el_=e,e=this.tag=o.createElement("video");while(n.children.length)e.appendChild(n.firstChild);ct(n,"video-js")||ut(n,"video-js"),n.appendChild(e),r=this.playerElIngest_=n,["autoplay","controls","crossOrigin","defaultMuted","defaultPlaybackRate","loop","muted","playbackRate","src","volume"].forEach((function(t){"undefined"!==typeof n[t]&&(e[t]=n[t])}))}if(e.setAttribute("tabindex","-1"),x&&e.setAttribute("role","application"),e.removeAttribute("width"),e.removeAttribute("height"),Object.getOwnPropertyNames(a).forEach((function(t){"class"===t?(n.className+=" "+a[t],s&&(e.className+=" "+a[t])):(n.setAttribute(t,a[t]),s&&e.setAttribute(t,a[t]))})),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused"),!0!==i.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Zt("vjs-styles-dimensions");var l=Pt(".vjs-styles-defaults"),c=Pt("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var u=e.getElementsByTagName("a"),h=0;h0?this.videoWidth()+":"+this.videoHeight():"16:9";var o=n.split(":"),s=o[1]/o[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*s,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),te(this.styleEl_,"\n ."+r+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+r+".vjs-fluid {\n padding-top: "+100*s+"%;\n }\n ")}else{var a="number"===typeof this.width_?this.width_:this.options_.width,l="number"===typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(a>=0&&(c.width=a),l>=0&&(c.height=l))}},e.prototype.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var r=ye(t),i=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(Cn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var o="string"!==typeof this.autoplay()&&this.autoplay(),s={source:e,autoplay:o,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};bn.names.forEach((function(t){var e=bn[t];s[e.getterName]=n[e.privateName]})),W(s,this.options_[r]),W(s,this.options_[i]),W(s,this.options_[t.toLowerCase()]),this.tag&&(s.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var a=Cn.getTech(t);if(!a)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new a(s),this.tech_.ready(ee(this,this.handleTechReady_),!0),Be.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Di.forEach((function(t){n.on(n.tech_,t,n["handleTech"+ye(t)+"_"])})),Object.keys(Ri).forEach((function(t){n.on(n.tech_,t,(function(e){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Ri[t]+"_"].bind(n),event:e}):n["handleTech"+Ri[t]+"_"](e)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||lt(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.prototype.unloadTech_=function(){var t=this;bn.names.forEach((function(e){var n=bn[e];t[n.privateName]=t[n.getterName]()})),this.textTracksJson_=Be.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.prototype.tech=function(t){return void 0===t&&G.warn(s(Ii)),this.tech_},e.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},e.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(t){G("deleting tag.poster throws in some browsers",t)}},e.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},e.prototype.manualAutoplay_=function(t){var e=this;if(this.tech_&&"string"===typeof t){var n=function(){var t=e.muted();e.muted(!0);var n=e.play();if(n&&n.then&&n["catch"])return n["catch"]((function(n){e.muted(t)}))},r=void 0;if("any"===t?(r=this.play(),r&&r.then&&r["catch"]&&r["catch"]((function(){return n()}))):r="muted"===t?n():this.play(),r&&r.then&&r["catch"])return r.then((function(){e.trigger({type:"autoplay-success",autoplay:t})}))["catch"]((function(n){e.trigger({type:"autoplay-failure",autoplay:t})}))}},e.prototype.updateSourceCaches_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=t,n="";if("string"!==typeof e&&(e=t.src,n=t.type),!/^blob:/.test(e)){this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!n&&(n=zn(this,e)),this.cache_.source=me({},t,{src:e,type:n});for(var r=this.cache_.sources.filter((function(t){return t.src&&t.src===e})),i=[],o=this.$$("source"),s=[],a=0;a0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(t){return t.callback(t.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},e.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(G.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.prototype.handleTechClick_=function(t){xt(t)&&this.controls_&&(this.paused()?Ie(this.play()):this.pause())},e.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},e.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},e.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.prototype.handleStageClick_=function(){this.reportUserActivity()},e.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},e.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},e.prototype.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.prototype.getCache=function(){return this.cache_},e.prototype.techCall_=function(t,e){this.ready((function(){if(t in Nn)return An(this.middleware_,this.tech_,t,e);if(t in In)return On(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(n){throw G(n),n}}),!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Mn)return Pn(this.middleware_,this.tech_,t);if(t in In)return On(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw G("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw G("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw G(e),e}}},e.prototype.play=function(){var t=this,e=this.options_.Promise||i.Promise;return e?new e((function(e){t.play_(e)})):this.play_()},e.prototype.play_=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ie;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void e(this.techGet_("play"));this.playOnLoadstart_=function(){t.playOnLoadstart_=null,e(t.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready((function(){t.playWaitingForReady_=!1,e(t.play())}))}},e.prototype.pause=function(){this.techCall_("pause")},e.prototype.paused=function(){return!1!==this.techGet_("paused")},e.prototype.played=function(){return this.techGet_("played")||ke(0,0)},e.prototype.scrubbing=function(t){if("undefined"===typeof t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.prototype.currentTime=function(t){return"undefined"!==typeof t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.prototype.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;t=parseFloat(t),t<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},e.prototype.remainingTime=function(){return this.duration()-this.currentTime()},e.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=ke(0,0)),t},e.prototype.bufferedPercent=function(){return we(this.buffered(),this.duration())},e.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),n=t.end(t.length-1);return n>e&&(n=e),n},e.prototype.volume=function(t){var e=void 0;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},e.prototype.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},e.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},e.prototype.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},e.prototype.requestFullscreen=function(){var t=Ee;this.isFullscreen(!0),t.requestFullscreen?(Ut(o,t.fullscreenchange,ee(this,(function e(n){this.isFullscreen(o[t.fullscreenElement]),!1===this.isFullscreen()&&$t(o,t.fullscreenchange,e),this.trigger("fullscreenchange")}))),this.el_[t.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.prototype.exitFullscreen=function(){var t=Ee;this.isFullscreen(!1),t.requestFullscreen?o[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=o.documentElement.style.overflow,Ut(o,"keydown",ee(this,this.fullWindowOnEscKey)),o.documentElement.style.overflow="hidden",ut(o.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.prototype.exitFullWindow=function(){this.isFullWindow=!1,$t(o,"keydown",this.fullWindowOnEscKey),o.documentElement.style.overflow=this.docOrigOverflow,ht(o.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.canPlayType=function(t){for(var e=void 0,n=0,r=this.options_.techOrder;n1?e.src(n.slice(1)):(e.changingSrc_=!1,e.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void e.triggerReady());xn(r,e.tech_)}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},e.prototype.src_=function(t){var e=this,n=this.selectSource([t]);return!n||(ge(n.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready((function(){e.changingSrc_=!1})),!1))},e.prototype.load=function(){this.techCall_("load")},e.prototype.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},e.prototype.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},e.prototype.currentSource=function(){return this.cache_.source||{}},e.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},e.prototype.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e=void 0;"string"===typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},e.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},e.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},e.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},e.prototype.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.prototype.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new Oe(t),this.addClass("vjs-error"),G.error("(CODE:"+this.error_.code+" "+Oe.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},e.prototype.reportUserActivity=function(t){this.userActivity_=!0},e.prototype.userActive=function(t){if(void 0===t)return this.userActive_;if(t=!!t,t!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.prototype.listenForUserActivity_=function(){var t=void 0,e=void 0,n=void 0,r=ee(this,this.reportUserActivity),i=function(t){t.screenX===e&&t.screenY===n||(e=t.screenX,n=t.screenY,r())},o=function(){r(),this.clearInterval(t),t=this.setInterval(r,250)},s=function(e){r(),this.clearInterval(t)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",s),this.on("keydown",r),this.on("keyup",r);var a=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var t=this.options_.inactivityTimeout;t<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),t))}}),250)},e.prototype.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},e.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.prototype.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},e.prototype.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},e.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},e.prototype.removeRemoteTextTrack=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.track,n=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},e.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.prototype.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},e.prototype.languages=function(){return me(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=me(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.prototype.trigger=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xt(this.eventBusEl_,t,this.getEventHash(e))},t.prototype.handleStateChanged=function(t){},t.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[Hi][t]=!1,this.player=this.state=null,e[t]=Ki(t,Vi[t])},t.isBasic=function(e){var n="string"===typeof e?Wi(e):e;return"function"===typeof n&&!t.prototype.isPrototypeOf(n.prototype)},t.registerPlugin=function(e,n){if("string"!==typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+("undefined"===typeof e?"undefined":I(e))+".");if(zi(e))G.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(Li.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!==typeof n)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+("undefined"===typeof n?"undefined":I(n))+".");return Vi[e]=n,e!==Fi&&(t.isBasic(n)?Li.prototype[e]=Xi(e,n):Li.prototype[e]=Ki(e,n)),n},t.deregisterPlugin=function(t){if(t===Fi)throw new Error("Cannot de-register base plugin.");zi(t)&&(delete Vi[t],delete Li.prototype[t])},t.getPlugins=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(Vi),e=void 0;return t.forEach((function(t){var n=Wi(t);n&&(e=e||{},e[t]=n)})),e},t.getPluginVersion=function(t){var e=Wi(t);return e&&e.VERSION||""},t}();qi.getPlugin=Wi,qi.BASE_PLUGIN_NAME=Fi,qi.registerPlugin(Fi,qi),Li.prototype.usingPlugin=function(t){return!!this[Hi]&&!0===this[Hi][t]},Li.prototype.hasPlugin=function(t){return!!zi(t)};var Yi=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof e?"undefined":I(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)},Gi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){t.apply(this,arguments)},r={};for(var i in"object"===("undefined"===typeof e?"undefined":I(e))?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"===typeof e&&(n=e),Yi(n,t),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n};"undefined"===typeof HTMLVideoElement&&nt()&&(o.createElement("video"),o.createElement("audio"),o.createElement("track"),o.createElement("video-js"));var Ji=function(t){return 0===t.indexOf("#")?t.slice(1):t};function Qi(t,e,n){var r=Qi.getPlayer(t);if(r)return e&&G.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"===typeof t?Pt("#"+Ji(t)):t;if(!rt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");o.body.contains(i)||G.warn("The element supplied is not included in the DOM"),e=e||{},Qi.hooks("beforesetup").forEach((function(t){var n=t(i,me(e));U(n)&&!Array.isArray(n)?e=me(e,n):G.error("please return an object in beforesetup hooks")}));var s=_e.getComponent("Player");return r=new s(i,e,n),Qi.hooks("setup").forEach((function(t){return t(r)})),r}if(Qi.hooks_={},Qi.hooks=function(t,e){return Qi.hooks_[t]=Qi.hooks_[t]||[],e&&(Qi.hooks_[t]=Qi.hooks_[t].concat(e)),Qi.hooks_[t]},Qi.hook=function(t,e){Qi.hooks(t,e)},Qi.hookOnce=function(t,e){Qi.hooks(t,[].concat(e).map((function(e){var n=function n(){return Qi.removeHook(t,n),e.apply(void 0,arguments)};return n})))},Qi.removeHook=function(t,e){var n=Qi.hooks(t).indexOf(e);return!(n<=-1)&&(Qi.hooks_[t]=Qi.hooks_[t].slice(),Qi.hooks_[t].splice(n,1),!0)},!0!==i.VIDEOJS_NO_DYNAMIC_STYLE&&nt()){var Zi=Pt(".vjs-styles-defaults");if(!Zi){Zi=Zt("vjs-styles-defaults");var to=Pt("head");to&&to.insertBefore(Zi,to.firstChild),te(Zi,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Qt(1,Qi),Qi.VERSION=u,Qi.options=Li.prototype.options_,Qi.getPlayers=function(){return Li.players},Qi.getPlayer=function(t){var e=Li.players,n=void 0;if("string"===typeof t){var r=Ji(t),i=e[r];if(i)return i;n=Pt("#"+r)}else n=t;if(rt(n)){var o=n,s=o.player,a=o.playerId;if(s||e[a])return s||e[a]}},Qi.getAllPlayers=function(){return Object.keys(Li.players).map((function(t){return Li.players[t]})).filter(Boolean)},Qi.players=Li.players,Qi.getComponent=_e.getComponent,Qi.registerComponent=function(t,e){Cn.isTech(e)&&G.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),_e.registerComponent.call(_e,t,e)},Qi.getTech=Cn.getTech,Qi.registerTech=Cn.registerTech,Qi.use=Sn,!j&&Object.defineProperty?(Object.defineProperty(Qi,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Qi.middleware,"TERMINATOR",{value:En,writeable:!1,enumerable:!0})):Qi.middleware={TERMINATOR:En},Qi.browser=N,Qi.TOUCH_ENABLED=O,Qi.extend=Gi,Qi.mergeOptions=me,Qi.bind=ee,Qi.registerPlugin=qi.registerPlugin,Qi.deregisterPlugin=qi.deregisterPlugin,Qi.plugin=function(t,e){return G.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),qi.registerPlugin(t,e)},Qi.getPlugins=qi.getPlugins,Qi.getPlugin=qi.getPlugin,Qi.getPluginVersion=qi.getPluginVersion,Qi.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),Qi.options.languages=me(Qi.options.languages,(n={},n[t]=e,n)),Qi.options.languages[t]},Qi.log=G,Qi.createTimeRange=Qi.createTimeRanges=ke,Qi.formatTime=cr,Qi.setFormatTime=ar,Qi.resetFormatTime=lr,Qi.parseUrl=nn,Qi.isCrossOrigin=sn,Qi.EventTarget=ie,Qi.on=Ut,Qi.one=Kt,Qi.off=$t,Qi.trigger=Xt,Qi.xhr=l,Qi.TextTrack=un,Qi.AudioTrack=hn,Qi.VideoTrack=pn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(t){Qi[t]=function(){return G.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),Ot[t].apply(null,arguments)}})),Qi.computedStyle=J,Qi.dom=Ot,Qi.url=an,t.exports=Qi},"6a9f":function(t,e,n){(function(e){var n;n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},t.exports=n}).call(this,n("c8ba"))},7100:function(t,e,n){var r=n("ba22");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("499e").default;i("6b808faf",r,!0,{sourceMap:!1,shadowMode:!1})},7161:function(t,e){var n=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function r(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function i(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function o(){this.values=n(null)}function s(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"===typeof i[o]){var s=i[o].split(n);if(2===s.length){var a=s[0],l=s[1];e(a,l)}}}function a(t,e,n){var a=t;function l(){var e=i(t);if(null===e)throw new r(r.Errors.BadTimeStamp,"Malformed timestamp: "+a);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function c(t,e){var r=new o;s(t,(function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),s=o[0];r.integer(t,s),r.percent(t,s)&&r.set("snapToLines",!1),r.alt(t,s,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","middle","end","left","right"]);break}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical",""),e.line=r.get("line","auto"),e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align","middle"),e.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=l(),u(),"--\x3e"!==t.substr(0,3))throw new r(r.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+a);t=t.substr(3),u(),e.endTime=l(),u(),c(t,e)}r.prototype=n(Error.prototype),r.prototype.constructor=r,r.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r=0&&e<=100))&&(this.set(t,e),!0)}};var l={"&":"&","<":"<",">":">","":"","":""," ":" "},c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={v:"title",lang:"lang"},h={rt:"ruby"};function p(t,e){function n(){if(!e)return null;function t(t){return e=e.substr(t.length),t}var n=e.match(/^([^<]*)(<[^>]*>?)?/);return t(n[1]?n[1]:n[2])}function r(t){return l[t]}function o(t){while(m=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))t=t.replace(m[0],r);return t}function s(t,e){return!h[e.localName]||h[e.localName]===t.localName}function a(e,n){var r=c[e];if(!r)return null;var i=t.document.createElement(r);i.localName=r;var o=u[e];return o&&n&&(i[o]=n.trim()),i}var p,d=t.document.createElement("div"),f=d,v=[];while(null!==(p=n()))if("<"!==p[0])f.appendChild(t.document.createTextNode(o(p)));else{if("/"===p[1]){v.length&&v[v.length-1]===p.substr(2).replace(">","")&&(v.pop(),f=f.parentNode);continue}var y,g=i(p.substr(1,p.length-2));if(g){y=t.document.createProcessingInstruction("timestamp",g),f.appendChild(y);continue}var m=p.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!m)continue;if(y=a(m[1],m[3]),!y)continue;if(!s(f,y))continue;m[2]&&(y.className=m[2].substr(1).replace("."," ")),v.push(m[1]),f.appendChild(y),f=y}return d}var d=[[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]];function f(t){for(var e=0;e=n[0]&&t<=n[1])return!0}return!1}function v(t){var e,n=[],r="";if(!t||!t.childNodes)return"ltr";function i(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function o(t){if(!t||!t.length)return null;var e=t.pop(),n=e.textContent||e.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?(t.length=0,r[0]):n}return"ruby"===e.tagName?o(t):e.childNodes?(i(t,e),o(t)):void 0}i(n,t);while(r=o(n))for(var s=0;s=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;il&&(i=new _(t),s=l),t=new _(o)}return i||o}var o=new _(e),s=e.cue,a=y(s),l=[];if(s.snapToLines){var c;switch(s.vertical){case"":l=["+y","-y"],c="height";break;case"rl":l=["+x","-x"],c="width";break;case"lr":l=["-x","+x"],c="width";break}var u=o.lineHeight,h=u*Math.round(a),p=n[c]+u,d=l[0];Math.abs(h)>p&&(h=h<0?-1:1,h*=Math.ceil(p/u)*u),a<0&&(h+=""===s.vertical?n.height:n.width,l=l.reverse()),o.move(d,h)}else{var f=o.lineHeight/n.height*100;switch(s.lineAlign){case"middle":a-=f/2;break;case"end":a-=f;break}switch(s.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")});break}l=["+y","-x","+x","-y"],o=new _(e)}var v=i(o,l);e.move(v.toCSSCompatValues(n))}function T(){}g.prototype.applyStyles=function(t,e){for(var n in e=e||this.div,t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},g.prototype.formatStyle=function(t,e){return 0===t?0:t+e},m.prototype=n(g.prototype),m.prototype.constructor=m,_.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e;break}},_.prototype.overlaps=function(t){return this.leftt.left&&this.topt.top},_.prototype.overlapsAny=function(t){for(var e=0;e=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},_.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.leftt.right;case"+y":return this.topt.bottom}},_.prototype.intersectPercentage=function(t){var e=Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left)),n=Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top)),r=e*n;return r/(this.height*this.width)},_.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}},_.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t;var i={left:t.left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n};return i},T.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!==typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},T.convertCueToDOMTree=function(t,e){return t&&e?p(t,e):null};var C=.05,k="sans-serif",w="1.5%";T.processCues=function(t,e,n){if(!t||!e||!n)return null;while(n.firstChild)n.removeChild(n.firstChild);var r=t.document.createElement("div");function i(t){for(var e=0;e100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",a({},c,{get:function(){return T},set:function(t){var e=s(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",a({},c,{get:function(){return C},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");C=t,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",a({},c,{get:function(){return k},set:function(t){var e=s(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");k=e,this.hasBeenReset=!0}})),i.displayState=void 0,l)return i}l.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.exports=l},9391:function(t,e,n){var r=n("df33");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("499e").default;i("03d85a4b",r,!0,{sourceMap:!1,shadowMode:!1})},b89b:function(t,e,n){"use strict";var r=n("017c"),i=n.n(r);i.a},ba22:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".vjs-custom-skin>.video-js{width:100%;font-family:PingFang SC,Helvetica Neue,Hiragino Sans GB,Segoe UI,Microsoft YaHei,微软雅黑,sans-serif}.video-js.vjs-no-flex .vjs-menu-button-inline,.vjs-custom-skin>.video-js .vjs-menu-button-inline.vjs-slider-active,.vjs-custom-skin>.video-js .vjs-menu-button-inline:focus,.vjs-custom-skin>.video-js .vjs-menu-button-inline:hover{width:10em}.vjs-custom-skin>.video-js .vjs-controls-disabled .vjs-big-play-button{display:none!important}.vjs-custom-skin>.video-js .vjs-control{width:3em}.vjs-custom-skin>.video-js .vjs-control.vjs-live-control{width:auto;padding-left:.5em;letter-spacing:.1em}.vjs-custom-skin>.video-js .vjs-menu-button-inline:before{width:1.5em}.vjs-menu-button-inline .vjs-menu{left:3em}.vjs-custom-skin>.video-js .vjs-load-progress div,.vjs-seeking .vjs-big-play-button,.vjs-waiting .vjs-big-play-button{display:none!important}.vjs-custom-skin>.video-js .vjs-mouse-display:after,.vjs-custom-skin>.video-js .vjs-play-progress:after{padding:0 .4em .3em}.video-js.vjs-ended .vjs-loading-spinner{display:none}.video-js.vjs-ended .vjs-big-play-button{display:block!important}.video-js.vjs-ended .vjs-big-play-button,.video-js.vjs-paused .vjs-big-play-button,.vjs-paused.vjs-has-started.vjs-custom-skin>.video-js .vjs-big-play-button{display:block}.vjs-custom-skin>.video-js .vjs-big-play-button{top:50%;left:50%;margin-left:-1.5em;margin-top:-1em;background-color:rgba(0,0,0,.45);font-size:3.5em;height:2em!important;line-height:2em!important;margin-top:-1em!important}.video-js:hover .vjs-big-play-button,.vjs-custom-skin>.video-js .vjs-big-play-button:active,.vjs-custom-skin>.video-js .vjs-big-play-button:focus{background-color:rgba(36,131,213,.9)}.vjs-custom-skin>.video-js .vjs-loading-spinner{border-color:rgba(36,131,213,.8)}.vjs-custom-skin>.video-js .vjs-control-bar2{background-color:#000}.vjs-custom-skin>.video-js .vjs-control-bar{color:#fff;font-size:14px}.vjs-custom-skin>.video-js .vjs-play-progress,.vjs-custom-skin>.video-js .vjs-volume-level{background-color:#2483d5}.vjs-custom-skin>.video-js .vjs-play-progress:before{top:-.3em}.vjs-custom-skin>.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.3em}.vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu{left:0}.vjs-custom-skin>.video-js .vjs-menu li{padding:0;line-height:2em;font-size:1.1em;font-family:PingFang SC,Helvetica Neue,Hiragino Sans GB,Segoe UI,Microsoft YaHei,微软雅黑,sans-serif}.vjs-custom-skin>.video-js .vjs-mouse-display:after,.vjs-custom-skin>.video-js .vjs-play-progress:after,.vjs-custom-skin>.video-js .vjs-time-tooltip{border-radius:0;font-size:1em;padding:0;width:3em;height:1.5em;line-height:1.5em;top:-3em}.vjs-custom-skin>.video-js .vjs-menu-button-popup .vjs-menu{width:5em;left:-1em}.vjs-custom-skin>.video-js .vjs-menu-button-popup.vjs-volume-menu-button-vertical .vjs-menu{left:0}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-play-control{order:0}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-time-control{min-width:1em;padding:0;margin:0 .1em;text-align:center;display:block;order:1}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-playback-rate .vjs-playback-rate-value{font-size:1.2em;line-height:2.4}.vjs-custom-skin>.video-js .vjs-progress-control.vjs-control{order:2}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-volume-menu-button{order:3}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-resolution-button{order:4}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-resolution-button .vjs-resolution-button-label{display:block;line-height:3em}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-playback-rate{order:5}.vjs-custom-skin>.video-js .vjs-control-bar .vjs-fullscreen-control{order:6}",""]),t.exports=e},cf62:function(t,e){t.exports=r;var n=Object.prototype.toString;function r(t){if(!t)return!1;var e=n.call(t);return"[object Function]"===e||"function"===typeof t&&"[object RegExp]"!==e||"undefined"!==typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}},d7ad:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"realTime bg-white"},[n("a-tabs",{attrs:{slot:"headerContent","default-active-key":"1"},on:{change:t.tabsChange},slot:"headerContent",model:{value:t.tabKey,callback:function(e){t.tabKey=e},expression:"tabKey"}},t._l(t.realTimeListData,(function(t){return n("a-tab-pane",{key:t.streetId.toString(),attrs:{tab:t.streetName}})})),1),n("a-row",{attrs:{gutter:20}},t._l(t.cameras.slice(0,t.selectTab.videoStyleRow*t.selectTab.videoStyleColumn),(function(e,r){return n("a-col",{key:r,style:{height:t.videoHeight,marginBottom:t.selectTab.videoStyleRow*t.selectTab.videoStyleColumn-r-1>=t.selectTab.videoStyleColumn?"20px":0},attrs:{span:24/t.selectTab.videoStyleColumn}},[t.showVideo?n("video-player",{attrs:{src:e.m3u8},on:{showModel:function(n){return t.showModel(e)}}}):t._e()],1)})),1)],1)},i=[],o=(n("4de4"),n("4160"),n("159b"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.showVideo?n("video-player",{ref:"video-player",staticClass:"vjs-custom-skin",attrs:{options:t.playerOptions},on:{pause:t.onPlayerPause,playing:t.onPlayerPlaying,timeupdate:t.onPlayerTimeupdate,ended:t.onPlayerEnded}}):t._e()}),s=[],a=(n("7100"),n("e248")),l={name:"VideoPlayer",props:{src:{type:String,required:!0}},components:{videoPlayer:a["videoPlayer"]},data:function(){return{showVideo:!0,isPlay:!1,playerOptions:{sources:[{type:"application/x-mpegURL",withCredentials:!1,src:this.src}],height:"100%",language:"zh-CN",preload:"auto",techOrder:["html5"],flash:{hls:{withCredentials:!1}},html5:{hls:{withCredentials:!1}},autoplay:!0,muted:!0,controls:!0,notSupportedMessage:"不支持的视频格式",controlBar:{timeDivider:!1,durationDisplay:!1,remainingTimeDisplay:!1,fullscreenToggle:!0}}}},mounted:function(){var t=this;this.$nextTick((function(){var e=t.$refs["video-player"];console.log(e)}))},methods:{onPlayerPause:function(){this.isPlay&&this.$emit("showModel")},onPlayerPlaying:function(){this.isPlay=!0},onPlayerEnded:function(t){this.isPlay=!1},onPlayerTimeupdate:function(t){var e=this,n=t.bufferedEnd(),r=t.currentTime(),i=n-r;i>60&&(this.showVideo=!1,this.$nextTick((function(){e.showVideo=!0})))}}},c=l,u=(n("b89b"),n("2877")),h=Object(u["a"])(c,o,s,!1,null,"30c2f0fc",null),p=h.exports,d={name:"historyMonitoring",components:{VideoPlayer:p},data:function(){return{realTimeListData:[],url:"722e6f04-bb3c-34b1-bcc7-ae9f6cd72e68",tabKey:"0",path:[],player:"",visible:!1,modelData:[],clientHeight:0,showVideo:!1}},computed:{selectTab:function(){var t=this;return this.realTimeListData.filter((function(e){return e.streetId==t.tabKey}))[0]||{}},cameras:function(){return this.selectTab.cameras||[]},videoHeight:function(){return(this.clientHeight-20*this.selectTab.videoStyleRow)/this.selectTab.videoStyleRow+"px"}},inject:["reload"],mounted:function(){this.getRealTimeList(),null==sessionStorage.getItem("tabKey")&&sessionStorage.setItem("tabKey",0),this.tabKey=sessionStorage.getItem("tabKey"),this.getClientHeight()},destroyed:function(){},methods:{getClientHeight:function(){this.clientHeight=this.$el.clientHeight-80},getRealTimeList:function(){var t=this;this.showVideo=!1,this.$api.httpApi.getRealTimeList({data:{}}).then((function(e){200==e.code&&(t.realTimeListData=e.data.reverse(),t.showVideo=!0)})).catch((function(t){console.log(t)}))},playVideo:function(t,e){var n=this;this.$nextTick((function(){n.$refs.video.forEach((function(t){t.play()}))}))},tabsChange:function(t){sessionStorage.setItem("tabKey",t),this.reload()},showModel:function(t){var e=this;this.$nextTick((function(){e.$router.push({name:"realTimeMonitoringModel",query:{modelData:t}})}))}}},f=d,v=(n("64e0"),Object(u["a"])(f,r,i,!1,null,"74e4893a",null));e["default"]=v.exports},df33:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-74e4893a]{text-align:left}.realTime[data-v-74e4893a]{padding:24px}",""]),t.exports=e},e248:function(t,e,n){!function(e,r){t.exports=r(n("6767"))}(0,(function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=3)}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i),s=window.videojs||o.default;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r0&&(f=setTimeout((function(){if(!h){h=!0,d.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",s(t)}}),t.timeout)),d.setRequestHeader)for(c in m)m.hasOwnProperty(c)&&d.setRequestHeader(c,m[c]);else if(t.headers&&!l(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(d.responseType=t.responseType),"beforeSend"in t&&"function"===typeof t.beforeSend&&t.beforeSend(d),d.send(g||null),d}function p(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}function d(){}t.exports=u,u.XMLHttpRequest=r.XMLHttpRequest||d,u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:r.XDomainRequest,a(["get","put","post","patch","head","delete"],(function(t){u["delete"===t?"del":t]=function(e,n,r){return n=c(e,n,r),n.method=t.toUpperCase(),h(n)}}))},ec92:function(t,e){var n=function(t){return t.replace(/^\s+|\s+$/g,"")},r=function(t){return"[object Array]"===Object.prototype.toString.call(t)};t.exports=function(t){if(!t)return{};for(var e={},i=n(t).split("\n"),o=0;oe.length)&&(t=e.length);for(var i=0,r=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s=!0,o=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return s=e.done,e},e:function(e){o=!0,n=e},f:function(){try{s||null==i["return"]||i["return"]()}finally{if(o)throw n}}}}var o=i("165c"),p={name:"login",data:function(){return{isLoading:!1,isAuth:!1}},methods:{existsAccount:function(){this.form.getFieldValue("account")&&this.$api.userApi.existsAccount({query:{account:this.form.getFieldValue("account")}}).then((function(e){console.log(e)})).catch((function(e){}))},permissionCheck:function(e){if(sessionStorage.setItem("userInfo",JSON.stringify(e)),this.setState({userInfo:e}),this.isAuth){var t=e.permissionList.filter((function(e){return 1===e.type})),i=e.permissionList.filter((function(e){return 2===e.type}));t&&t.length?this.$router.push({name:t[0].rights}):i&&i.length?this.$router.push({name:i[0].rights}):(this.$message.info("没有权限"),sessionStorage.clear())}else{var r=this.$router.options.routes[0].children[0].name;this.$router.push({name:r})}}},beforeRouteEnter:function(e,t,i){if(location.search){var r=window.location.search.substring(window.location.search.indexOf("=")+1);"logout"===r&&(localStorage.clear(),sessionStorage.clear()),i()}else localStorage.setItem("userInfo",JSON.stringify(o)),localStorage.getItem("userInfo")?i((function(e){var t=JSON.parse(localStorage.getItem("userInfo")).permissionList,i=e.$router.options.routes[0].children;if(location.search||t.some((function(e){return 2===e.type}))){var r,a=s(i);try{var d=function(){var i=r.value;if(t.some((function(e){if(e.rights===i.name&&2===e.type)return!0})))return e.$router.push({name:i.name}),{v:void 0}};for(a.s();!(r=a.n()).done;){var o=d();if("object"===Object(n["a"])(o))return o.v}}catch(p){a.e(p)}finally{a.f()}}else e.$message.info("没权限",1,(function(){e.$api({url:"/app/userCenter",method:"GET"}).then((function(e){window.open(e.url+"?redirect="+location.origin,"_self")})).catch((function(e){}))}))})):location.search||i((function(e){e.$api({url:"/app/userCenter",method:"GET"}).then((function(e){window.open(e.url+"?redirect="+location.origin,"_self")})).catch((function(e){}))}))}},c=p,l=(i("46ea"),i("2877")),g=Object(l["a"])(c,r,a,!1,null,null,null);t["default"]=g.exports},e01a:function(e,t,i){"use strict";var r=i("23e7"),a=i("83ab"),n=i("da84"),d=i("5135"),s=i("861d"),o=i("9bf2").f,p=i("e893"),c=n.Symbol;if(a&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var l={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof g?new c(e):void 0===e?c():c(e);return""===e&&(l[t]=!0),t};p(g,c);var I=g.prototype=c.prototype;I.constructor=g;var u=I.toString,T="Symbol(test)"==String(c("test")),m=/^Symbol\((.*)\)[^)]+$/;o(I,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=u.call(e);if(d(l,e))return"";var i=T?t.slice(7,-1):t.replace(m,"$1");return""===i?void 0:i}}),r({global:!0,forced:!0},{Symbol:g})}},fafc:function(e,t,i){var r=i("24fb");t=r(!1),t.push([e.i,".alarm .ant-form-item-label{text-align:left}.login{top:0;left:0;right:0;bottom:0;background:#f0f3f7;display:flex;align-items:center;justify-content:center}.login,.login-bg{position:absolute}.login-bg-1{left:176px;top:113px}.login-bg-2{left:197px;top:242px}.login-bg-3{left:79px;bottom:59px}.login-bg-4{right:280px;top:82px}.login-bg-5{right:0;bottom:59px}.login-cover{width:368px}.login-cover-logo{display:flex;justify-content:center;line-height:48px}.login-cover-logo img{height:120px}.login-cover-title{text-align:center;height:22px;font-size:14px;font-family:PingFangSC-Regular;font-weight:400;color:rgba(0,0,0,.45);line-height:22px;margin:16px 0 32px 0}.login-cover .ant-tabs-nav-scroll{display:flex;justify-content:center}.login-submit{width:100%}.login-forget{height:22px;font-size:14px;font-family:PingFangSC-Regular;font-weight:400;color:rgba(0,0,0,.45);line-height:22px;text-align:right;margin-bottom:24px}.login-footer{position:fixed;left:50%;bottom:28px;transform:translateX(-50%)}",""]),e.exports=t},fb6a:function(e,t,i){"use strict";var r=i("23e7"),a=i("861d"),n=i("e8b5"),d=i("23cb"),s=i("50c4"),o=i("fc6a"),p=i("8418"),c=i("b622"),l=i("1dde"),g=i("ae40"),I=l("slice"),u=g("slice",{ACCESSORS:!0,0:0,1:2}),T=c("species"),m=[].slice,f=Math.max;r({target:"Array",proto:!0,forced:!I||!u},{slice:function(e,t){var i,r,c,l=o(this),g=s(l.length),I=d(e,g),u=d(void 0===t?g:t,g);if(n(l)&&(i=l.constructor,"function"!=typeof i||i!==Array&&!n(i.prototype)?a(i)&&(i=i[T],null===i&&(i=void 0)):i=void 0,i===Array||void 0===i))return m.call(l,I,u);for(r=new(void 0===i?Array:i)(f(u-I,0)),c=0;I2&&void 0!==arguments[2]?arguments[2]:{};n(this,t),Object(c["a"])(this,"webrtc",null),Object(c["a"])(this,"video",null),Object(c["a"])(this,"server",null),Object(c["a"])(this,"codecLink",null),Object(c["a"])(this,"rsdpLink",null),Object(c["a"])(this,"stream",new MediaStream),Object(c["a"])(this,"uuid",null),Object(c["a"])(this,"options",{onStatusChange:null}),console.log("new uuid:"+e),this.server=t.server,this.video=o,this.uuid=e,Object.assign(this.options,i),this.createLinks(),this.play()}return s(t,[{key:"createLinks",value:function(){this.codecLink="//"+this.server+"/stream/codec/"+this.uuid,this.rsdpLink="//"+this.server+"/stream/receiver/"+this.uuid}},{key:"play",value:function(){var t=this;this.webrtc=new RTCPeerConnection({iceServers:[{urls:["stun:stun.l.google.com:19302"]}]}),this.webrtc||console.log("no"),this.webrtc.onnegotiationneeded=this.handleNegotiationNeeded.bind(this),this.webrtc.ontrack=this.onTrack.bind(this),fetch(this.codecLink).then((function(o){o.json().then((function(o){o.forEach((function(o,e){t.webrtc.addTransceiver(o.Type,{direction:"sendrecv"})}))}))})).catch((function(t){console.log(t)})),this.webrtc.onconnectionstatechange=function(){"connected"==t.webrtc.connectionState||"connecting"==t.webrtc.connectionState?console.log("uuid:"+t.uuid+" status:"+t.webrtc.connectionState):(console.log(t.webrtc.connectionState),t.load(t.uuid))}}},{key:"handleNegotiationNeeded",value:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var o,e,i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.webrtc.createOffer();case 2:return o=t.sent,t.next=5,this.webrtc.setLocalDescription(o);case 5:e=new FormData,e.append("suuid",this.uuid),e.append("data",btoa(this.webrtc.localDescription.sdp)),fetch(this.rsdpLink,{method:"POST",body:e}).then((function(t){t.text().then((function(t){i.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:atob(t)}))}))})).catch((function(t){}));case 9:case"end":return t.stop()}}),t,this)})));function o(){return t.apply(this,arguments)}return o}()},{key:"onTrack",value:function(t){this.stream.addTrack(t.track),this.video.srcObject=this.stream,this.video.play()}},{key:"load",value:function(t){this.destroy(),this.uuid=t,this.createLinks(),this.play()}},{key:"destroy",value:function(){console.log("destroy uuid:"+this.uuid),this.webrtc.close(),this.webrtc=null,this.video.srcObject=null,this.stream=new MediaStream}},{key:"getImageUrl",value:function(){var t=document.createElement("canvas");t.width=this.video.videoWidth,t.height=this.video.videoHeight,t.getContext("2d").drawImage(video,0,0,t.width,t.height);var o=t.toDataURL();return t.remove(),o}}],[{key:"setServer",value:function(t){this.server=t}}]),t}();Object(c["a"])(r,"server","127.0.0.1:8083");o["a"]=r},9545:function(t,o,e){"use strict";e.r(o);var i=function(){var t=this,o=t.$createElement,e=t._self._c||o;return t.isShow?e("div",["add"==t.type||"edit"==t.type?[e("a-modal",{staticClass:"add-edit-model",attrs:{title:["add"==t.type?"新增球机":"编辑球机"],closable:t.closable,"ok-text":"确认","cancel-text":"取消"},on:{ok:t.handleOk,cancel:t.handleCancel},model:{value:t.isShow,callback:function(o){t.isShow=o},expression:"isShow"}},[e("a-form",{attrs:{form:t.form,"wrapper-col":t.formItemAcrossLayout.wrapperCol}},[e("a-form-item",{attrs:{label:"球机名称","label-col":t.formItemVerticalLayout.labelCol}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入球机名称!"}]}],expression:"['name', { rules: [{ required: true, message: '请输入球机名称!' }] }]"}]})],1),e("a-form-item",{attrs:{label:"球机IP","label-col":t.formItemVerticalLayout.labelCol}},[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["ip",{rules:[{required:!0,message:"请输入球机ip!"}]}],expression:"['ip', { rules: [{ required: true, message: '请输入球机ip!' }] }]"}]})],1)],1)],1)]:"test"==t.type?[e("a-modal",{staticClass:"config-model",attrs:{footer:null,maskClosable:!1,width:"1600px",bodyStyle:{padding:0,display:"flex"},centered:!0},on:{cancel:t.handleCancel},model:{value:t.isShow,callback:function(o){t.isShow=o},expression:"isShow"}},[e("div",{staticClass:"test-model"},[e("video",{attrs:{width:"80%",height:"80%",id:"camera"+t.id,autoplay:"",muted:""},domProps:{muted:!0}}),e("div",{staticClass:"operation-list"},[e("div",{staticClass:"operation-item"},[e("img",{attrs:{src:t.zoomSubUrl,alt:""},on:{mousedown:t.zoomDecStart,mouseup:t.zoomDecStop}}),e("span",[t._v("变倍")]),e("img",{attrs:{src:t.zoomAddUrl,alt:""},on:{mousedown:t.zoomAddStart,mouseup:t.zoomAddStop}})]),e("div",{staticClass:"operation-item"},[e("img",{attrs:{src:t.focusSubUrl,alt:""},on:{mousedown:t.focusDecStart,mouseup:t.focusDecStop}}),e("span",[t._v("变焦")]),e("img",{attrs:{src:t.focusAddUrl,alt:""},on:{mousedown:t.focusAddStart,mouseup:t.focusAddStop}})]),e("div",{staticClass:"operation-item"},[e("img",{attrs:{src:t.irisSubUrl,alt:""},on:{mousedown:t.irisDecStart,mouseup:t.irisDecStop}}),e("span",[t._v("光圈")]),e("img",{attrs:{src:t.irisAddUrl,alt:""},on:{mousedown:t.irisAddStart,mouseup:t.irisAddStop}})])]),e("div",{staticClass:"direction-list"},[e("div",{staticClass:"direction-item"},[e("img",{attrs:{src:t.leftUpUrl,alt:""},on:{mousedown:t.leftUpStart,mouseup:t.leftUpStop}}),e("img",{attrs:{src:t.upUrl,alt:""},on:{mousedown:t.upStart,mouseup:t.upStop}}),e("img",{attrs:{src:t.rightUpUrl,alt:""},on:{mousedown:t.rightUpStart,mouseup:t.rightUpStop}})]),e("div",{staticClass:"direction-item"},[e("img",{attrs:{src:t.leftUrl,alt:""},on:{mousedown:t.leftStart,mouseup:t.leftStop}}),e("img",{attrs:{src:t.rightUrl,alt:""},on:{mousedown:t.rightStart,mouseup:t.rightStop}})]),e("div",{staticClass:"direction-item"},[e("img",{attrs:{src:t.leftDownUrl,alt:""},on:{mousedown:t.leftDownStart,mouseup:t.leftDownStop}}),e("img",{attrs:{src:t.downUrl,alt:""},on:{mousedown:t.downStart,mouseup:t.downStop}}),e("img",{attrs:{src:t.rightDownUrl,alt:""},on:{mousedown:t.rightDownStart,mouseup:t.rightDownStop}})])])])])]:"config"==t.type?[e("a-modal",{staticClass:"config-model",attrs:{footer:null,maskClosable:!1,width:"1600px",bodyStyle:{padding:0,display:"flex"},centered:!0},on:{cancel:t.handleCancel},model:{value:t.isShow,callback:function(o){t.isShow=o},expression:"isShow"}},[e("video",{attrs:{width:"900",height:"600",id:"camera"+t.id,autoplay:"",muted:""},domProps:{muted:!0}}),e("div",{staticClass:"operation-list"},[e("div",{staticClass:"operation-item"},[e("img",{attrs:{src:t.zoomSubUrl,alt:""},on:{mousedown:t.zoomDecStart,mouseup:t.zoomDecStop}}),e("span",[t._v("变倍")]),e("img",{attrs:{src:t.zoomAddUrl,alt:""},on:{mousedown:t.zoomAddStart,mouseup:t.zoomAddStop}})]),e("div",{staticClass:"operation-item"},[e("img",{attrs:{src:t.focusSubUrl,alt:""},on:{mousedown:t.focusDecStart,mouseup:t.focusDecStop}}),e("span",[t._v("变焦")]),e("img",{attrs:{src:t.focusAddUrl,alt:""},on:{mousedown:t.focusAddStart,mouseup:t.focusAddStop}})]),e("div",{staticClass:"operation-item"},[e("img",{attrs:{src:t.irisSubUrl,alt:""},on:{mousedown:t.irisDecStart,mouseup:t.irisDecStop}}),e("span",[t._v("光圈")]),e("img",{attrs:{src:t.irisAddUrl,alt:""},on:{mousedown:t.irisAddStart,mouseup:t.irisAddStop}})])]),e("div",{staticClass:"direction-list"},[e("div",{staticClass:"direction-item"},[e("img",{attrs:{src:t.leftUpUrl,alt:""},on:{mousedown:t.leftUpStart,mouseup:t.leftUpStop}}),e("img",{attrs:{src:t.upUrl,alt:""},on:{mousedown:t.upStart,mouseup:t.upStop}}),e("img",{attrs:{src:t.rightUpUrl,alt:""},on:{mousedown:t.rightUpStart,mouseup:t.rightUpStop}})]),e("div",{staticClass:"direction-item"},[e("img",{attrs:{src:t.leftUrl,alt:""},on:{mousedown:t.leftStart,mouseup:t.leftStop}}),e("img",{attrs:{src:t.rightUrl,alt:""},on:{mousedown:t.rightStart,mouseup:t.rightStop}})]),e("div",{staticClass:"direction-item"},[e("img",{attrs:{src:t.leftDownUrl,alt:""},on:{mousedown:t.leftDownStart,mouseup:t.leftDownStop}}),e("img",{attrs:{src:t.downUrl,alt:""},on:{mousedown:t.downStart,mouseup:t.downStop}}),e("img",{attrs:{src:t.rightDownUrl,alt:""},on:{mousedown:t.rightDownStart,mouseup:t.rightDownStop}})])]),e("div",{staticClass:"config-table"},[e("h2",[t._v("球机配置")]),e("a-table",{attrs:{columns:t.columns,"row-key":function(t){return t.name},"data-source":t.configData,bordered:"",pagination:!1,scroll:{y:335}},on:{change:t.getConfigIoList},scopedSlots:t._u([{key:"name",fn:function(o,i){return e("span",{},[e("a-button",{attrs:{type:"link"},on:{click:function(o){return t.toPtz(i)}}},[t._v(t._s(o)+"("+t._s(i.code)+")")])],1)}},{key:"position",fn:function(o,i){return e("span",{},[o?e("div",[t._v(" 已写入 "),e("a-button",{staticClass:"plc",attrs:{type:"link"},on:{click:function(o){return t.coverage(0,i)}}},[t._v(" 覆盖 ")])],1):e("a-button",{staticClass:"plc",attrs:{type:"primary"},on:{click:function(o){return t.coverage(0,i)}}},[t._v(" 写入 ")])],1)}}],null,!1,2762861366)})],1)])]:t._e()],2):t._e()},n=[],a=(e("b0c0"),e("d3b7"),e("25f0"),e("3ea2")),s={labelCol:{span:8},wrapperCol:{span:14}},c={labelCol:{span:4},wrapperCol:{span:8,offset:4}},r=[{title:"PLC IO指令",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"配置",dataIndex:"position",scopedSlots:{customRender:"position"}}],l={props:["visible","modelType","modelData"],watch:{visible:function(t){this.isShow=t},modelType:function(t){this.type=t},modelData:function(t){var o=this;this.mdata=t,console.log(this.type),t.id&&"edit"==this.type?(this.id=t.id,this.$nextTick((function(){o.form.setFieldsValue({name:t.name,ip:t.ip,rtsp:t.rtsp})}))):t.id&&"config"==this.type&&(this.id=t.id,this.mdata=t,console.log(t),this.$nextTick((function(){console.log(t.rtsp),o.getConfigIoList()})))}},data:function(){return{isShow:!1,player:null,type:"",title:"",closable:!1,formItemAcrossLayout:s,formItemVerticalLayout:c,confirmLoading:!1,form:this.$form.createForm(this,{name:"dynamic_rule"}),id:"",mdata:[],zoomSubUrl:e("a49c"),zoomAddUrl:e("42f5"),focusSubUrl:e("a49c"),focusAddUrl:e("42f5"),irisSubUrl:e("a49c"),irisAddUrl:e("42f5"),leftUpUrl:e("6dc0"),upUrl:e("90e6"),rightUpUrl:e("298d"),leftUrl:e("cce0"),rightUrl:e("cd76"),leftDownUrl:e("30fb"),downUrl:e("5046"),rightDownUrl:e("883f"),columns:r,configData:[]}},mounted:function(){var t=this;this.setVideoServer(),"test"==this.$route.query.modelType?(this.isShow=!0,this.id=this.$route.query.modelData.id,this.type=this.$route.query.modelType,this.mdata=this.$route.query.modelData,this.$nextTick((function(){t.autoPlay(t.id)}))):"config"==this.$route.query.modelType&&(this.isShow=!0,this.id=this.$route.query.modelData.id,this.type=this.$route.query.modelType,this.mdata=this.$route.query.modelData,this.$nextTick((function(){t.autoPlay(t.id)})),this.getConfigIoList())},destroy:function(){},methods:{handleOk:function(){var t=this;this.confirmLoading=!0,setTimeout((function(){t.form.validateFields((function(o,e){console.log(e),o||(console.log(t.title),"add"==t.type?t.$api.httpApi.addCamera({data:e}).then((function(o){200==o.code&&(t.$emit("sure",!1),t.$message.success("新增球机成功"))})).catch((function(t){})):"edit"==t.type&&(e.id=t.id,t.$api.httpApi.editCamera({data:e}).then((function(o){200==o.code&&(t.$emit("sure",!1),t.$message.success("编辑球机成功"))})).catch((function(t){}))))})),t.confirmLoading=!1}),500)},handleCancel:function(){this.player.destroy(),console.log("Clicked cancel button"),this.$emit("close",!1,{}),("test"==this.type||"config"==this.type)&&(this.$router.go(-1),this.player=null)},autoPlay:function(t){var o=document.getElementById("camera"+t);this.player=new a["a"](o,"camera"+t),this.player.load("camera"+t)},setVideoServer:function(){this.$api.httpApi.getVideoServer({data:{}}).then((function(t){200==t.code&&a["a"].setServer(t.data.toString())})).catch((function(t){console.log(t)}))},getConfigIoList:function(){var t=this;this.$axios.post("/camera/"+this.id+"/io/list",{data:{}}).then((function(o){console.log(o),200==o.code&&(t.configData=o.data)})).catch((function(t){}))},coverage:function(t,o){var e=this;this.$api.httpApi.writeInCameraIoptz({data:{cameraId:this.id,cameraIOId:o.id,name:o.name,code:o.code,type:t}}).then((function(t){e.getConfigIoList()})).catch((function(t){}))},toPtz:function(t){this.$api.httpApi.cameraIoToPtz({data:{cameraId:this.id,cameraIOId:t.id,name:t.name}}).then((function(t){console.log(t)})).catch((function(t){}))},zoomDecStart:function(){console.log("变倍-按下"),this.zoomSubUrl=e("3b7d"),this.$axios.post("/camera/control/zoomDec/start/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},zoomDecStop:function(){console.log("变倍-抬起"),this.zoomSubUrl=e("a49c"),this.$axios.post("/camera/control/zoomDec/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},zoomAddStart:function(){console.log("变倍+按下"),this.zoomAddUrl=e("f88c"),this.$axios.post("/camera/control/zoomAdd/start/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},zoomAddStop:function(){console.log("变倍+抬起"),this.zoomAddUrl=e("42f5"),this.$axios.post("/camera/control/zoomAdd/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},focusDecStart:function(){console.log("变焦-按下"),this.focusSubUrl=e("3b7d"),this.$axios.post("/camera/control/focusDec/start/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},focusDecStop:function(){console.log("变焦-抬起"),this.focusSubUrl=e("a49c"),this.$axios.post("/camera/control/focusDec/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},focusAddStart:function(){console.log("变焦+按下"),this.focusAddUrl=e("f88c"),this.$axios.post("/camera/control/focusAdd/start/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},focusAddStop:function(){console.log("变焦+抬起"),this.focusAddUrl=e("42f5"),this.$axios.post("/camera/control/focusAdd/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},irisDecStart:function(){console.log("光圈-按下"),this.irisSubUrl=e("3b7d"),this.$axios.post("/camera/control/irisDec/start/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},irisDecStop:function(){console.log("光圈-抬起"),this.irisSubUrl=e("a49c"),this.$axios.post("/camera/control/irisDec/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},irisAddStart:function(){console.log("光圈+按下"),this.irisAddUrl=e("f88c"),this.$axios.post("/camera/control/irisAdd/start/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},irisAddStop:function(){console.log("光圈+抬起"),this.irisAddUrl=e("42f5"),this.$axios.post("/camera/control/irisAdd/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},leftUpStart:function(){console.log("左上鼠标按下"),this.leftUpUrl=e("13fc"),this.$axios.post("/camera/control/leftUp/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},leftUpStop:function(){console.log("左上鼠标抬起"),this.leftUpUrl=e("6dc0"),this.$axios.post("/camera/control/leftUp/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},upStart:function(){console.log("上鼠标按下"),this.upUrl=e("ad2e"),this.$axios.post("/camera/control/up/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},upStop:function(){console.log("上鼠标抬起"),this.upUrl=e("90e6"),this.$axios.post("/camera/control/up/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},rightUpStart:function(){console.log("右上鼠标按下"),this.rightUpUrl=e("5bc3"),this.$axios.post("/camera/control/rightUp/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},rightUpStop:function(){console.log("右上鼠标抬起"),this.rightUpUrl=e("298d"),this.$axios.post("/camera/control/rightUp/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},leftStart:function(){console.log("左转鼠标按下"),this.leftUrl=e("2216"),this.$axios.post("/camera/control/left/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},leftStop:function(){this.leftUrl=e("cce0"),console.log("左转鼠标抬起"),this.$axios.post("/camera/control/left/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},rightStart:function(){console.log("右转鼠标按下"),this.rightUrl=e("b241"),this.$axios.post("/camera/control/right/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},rightStop:function(){console.log("右转鼠标抬起"),this.rightUrl=e("cd76"),this.$axios.post("/camera/control/right/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},leftDownStart:function(){console.log("左下鼠标按下"),this.leftDownUrl=e("1e74"),this.$axios.post("/camera/control/leftDown/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},leftDownStop:function(){console.log("左下鼠标抬起"),this.leftDownUrl=e("30fb"),this.$axios.post("/camera/control/leftDown/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},downStart:function(){console.log("下鼠标按下"),this.downUrl=e("3c12"),this.$axios.post("/camera/control/down/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},downStop:function(){console.log("下鼠标抬起"),this.downUrl=e("5046"),this.$axios.post("/camera/control/down/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},rightDownStart:function(){console.log("右下鼠标按下"),this.rightDownUrl=e("5cf9"),this.$axios.post("/camera/control/rightDown/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))},rightDownStop:function(){console.log("右下鼠标抬起"),this.rightDownUrl=e("883f"),this.$axios.post("/camera/control/rightDown/stop/"+this.id,{data:{}}).then((function(t){})).catch((function(t){}))}}},d=l,u=(e("1bf8"),e("2877")),h=Object(u["a"])(d,i,n,!1,null,"5a4483ce",null);o["default"]=h.exports},ebcf:function(t,o,e){var i=e("24fb");o=i(!1),o.push([t.i,".alarm .ant-form-item-label[data-v-5a4483ce]{text-align:left}.add-edit-model .across-layout[data-v-5a4483ce]{display:flex}.add-edit-model .ant-divider-horizontal[data-v-5a4483ce]{margin:6px 0}.test-model[data-v-5a4483ce]{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(0,0,0,.5);z-index:1000;display:flex;align-items:center;justify-content:center}.test-model #video-test[data-v-5a4483ce]{width:100%;height:100%}.test-model .video-close[data-v-5a4483ce]{position:absolute;right:20px;top:20px;color:#fff;font-size:24px;width:32px;height:32px;background:rgba(0,0,0,.5);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:10}.test-model .operation-list[data-v-5a4483ce]{position:absolute;right:200px;bottom:20px;z-index:10}.test-model .operation-list .operation-item img[data-v-5a4483ce]{width:42px}.test-model .operation-list .operation-item span[data-v-5a4483ce]{padding:5px 10px;background:rgba(0,0,0,.5);font-size:18px;color:#fff}.test-model .direction-list[data-v-5a4483ce]{position:absolute;right:30px;bottom:20px;width:150px;z-index:10}.test-model .direction-list .direction-item[data-v-5a4483ce]{display:flex;align-items:center;justify-content:space-between}.test-model .direction-list .direction-item img[data-v-5a4483ce]{width:42px}.test-model img[data-v-5a4483ce]{cursor:pointer}.config-model[data-v-5a4483ce]{display:flex;align-items:center;justify-content:center}.config-model .operation-list[data-v-5a4483ce]{position:absolute;right:1000px;bottom:20px;z-index:10}.config-model .operation-list .operation-item img[data-v-5a4483ce]{width:32px}.config-model .operation-list .operation-item span[data-v-5a4483ce]{padding:3px 6px;background:rgba(0,0,0,.5);font-size:16px;color:#fff}.config-model .direction-list[data-v-5a4483ce]{position:absolute;right:830px;bottom:20px;width:150px;z-index:10}.config-model .direction-list .direction-item[data-v-5a4483ce]{display:flex;align-items:center;justify-content:space-between}.config-model .direction-list .direction-item img[data-v-5a4483ce]{width:32px}.config-model img[data-v-5a4483ce]{cursor:pointer}.config-model .config-table[data-v-5a4483ce]{width:800px;height:600px;overflow:hidden}.config-model .config-table h2[data-v-5a4483ce]{padding:15px;font-size:20px;background:#fafafa;margin:0}.vxgplayer[data-v-5a4483ce]{border:none;margin:0;display:block}.ant-btn[data-v-5a4483ce]{white-space:inherit;text-align:left}",""]),t.exports=o}}]);
\ No newline at end of file
diff --git a/js/chunk-7f9ca11f.b5a89faf.js b/js/chunk-7f9ca11f.b5a89faf.js
deleted file mode 100644
index 52c2576..0000000
--- a/js/chunk-7f9ca11f.b5a89faf.js
+++ /dev/null
@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7f9ca11f"],{"06c5":function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));a("a630"),a("fb6a"),a("b0c0"),a("d3b7"),a("25f0"),a("3ca3");function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a=n.data.random.column[0]&&o<=n.data.random.column[1]?a("div",{key:i,staticClass:"line"},t._l(e.leftRow,(function(i,r){return i>=n.data.random.row[0]&&i<=n.data.random.row[1]?a("div",{key:r,staticClass:"el"},[a("span",{staticClass:"default",style:{background:t.getStatusBg(t.stockInfo.left,i+"-"+o)},on:{click:function(a){return t.tocheck(i,o,t.leftShelveId.shelveId,e.id,e.name,"left",t.leftShelveId.shelveType)}}},[t._v(" "+t._s(i)+"-"+t._s(o)+" ")])]):t._e()})),0):t._e()})),0)])]}}],null,!0)}):t._e()],1)})),a("div",{staticClass:"center-box"},[a("span",{staticClass:"shelf-number"},[t._v(" 右货架号: "+t._s(t.rightShelveId.shelveId)+" ")]),t.streetDetail.rightInsideShelveId&&t.streetDetail.rightOutsideShelveId?a("a-radio-group",{staticStyle:{margin:"10px 0"},on:{change:t.getStockRowColumn},model:{value:t.size2,callback:function(e){t.size2=e},expression:"size2"}},[a("a-radio-button",{attrs:{value:"rightOutsideShelveId"}},[t._v(" 外 ")]),a("a-radio-button",{attrs:{value:"rightInsideShelveId"}},[t._v(" 内 ")])],1):t._e()],1),t._l(t.data,(function(e){return a("div",{key:e.name,staticClass:"check-content"},[e.id==t.select?a("subsection",{attrs:{total:{row:e.leftRow,column:e.leftColumn},stockInfo:t.stockInfo.right},scopedSlots:t._u([{key:"default",fn:function(n){return[a("div",{staticClass:"roadway-buttom"},[a("div",{staticClass:"roadway-box"},t._l(e.rightColumn,(function(o,i){return o>=n.data.random.column[0]&&o<=n.data.random.column[1]?a("div",{key:i,staticClass:"line"},t._l(e.rightRow,(function(i,r){return i>=n.data.random.row[0]&&i<=n.data.random.row[1]?a("div",{key:r,staticClass:"el"},[a("span",{staticClass:"default",style:{background:t.getStatusBg(t.stockInfo.right,i+"-"+o)},on:{click:function(a){return t.tocheck(i,o,t.rightShelveId.shelveId,e.id,e.name,"right",t.rightShelveId.shelveType)}}},[t._v(" "+t._s(i)+"-"+t._s(o)+" ")])]):t._e()})),0):t._e()})),0)])]}}],null,!0)}):t._e()],1)}))],2)},o=[],i=(a("4de4"),a("96cf"),a("1da1")),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"subsection"},[a("a-layout",{staticStyle:{width:"900px"}},[a("a-layout",{staticStyle:{width:"100%",height:"310px"}},[a("a-layout-sider",{attrs:{width:"110px"}},[t.total.column>t.nums.column?a("a-tabs",{attrs:{"default-active-key":"1","tab-position":"left"},on:{change:function(e){return t.select.column=e}}},t._l(t.latticeColumn,(function(e){return a("a-tab-pane",{key:e},[a("span",{attrs:{slot:"tab"},slot:"tab"},[t._v(" "+t._s(t.getRandom(e,t.latticeColumn,t.nums.column,t.total.column))+" "),1===t.status.column[e]?a("a-icon",{staticStyle:{color:"#d81e06"},attrs:{type:"close-circle"}}):2===t.status.column[e]?a("a-icon",{staticStyle:{color:"#1afa29"},attrs:{type:"check-circle"}}):a("a-icon",{staticStyle:{color:"#909399"},attrs:{type:"exclamation-circle"}})],1)])})),1):t._e()],1),a("a-layout-content",[t._t("default",null,{data:{select:t.select,nums:t.nums,random:t.random}})],2)],1),a("a-layout-footer",[t.total.row>t.nums.row?a("a-tabs",{attrs:{"default-active-key":"1","tab-position":"bottom"},on:{change:function(e){return t.select.row=e}}},t._l(t.latticeRow,(function(e){return a("a-tab-pane",{key:e},[a("span",{attrs:{slot:"tab"},slot:"tab"},[t._v(" "+t._s(t.getRandom(e,t.latticeRow,t.nums.row,t.total.row))+" "),1===t.status.row[e]?a("a-icon",{staticStyle:{color:"#d81e06"},attrs:{type:"close-circle"}}):2===t.status.row[e]?a("a-icon",{staticStyle:{color:"#1afa29"},attrs:{type:"check-circle"}}):a("a-icon",{staticStyle:{color:"#909399"},attrs:{type:"exclamation-circle"}})],1)])})),1):t._e()],1)],1)],1)},s=[];a("99af"),a("d81d"),a("a9e3"),a("ac1f"),a("1276");function c(t){if(Array.isArray(t))return t}a("a4d3"),a("e01a"),a("d28b"),a("d3b7"),a("3ca3"),a("ddb0");function l(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var a=[],n=!0,o=!1,i=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done);n=!0)if(a.push(r.value),e&&a.length===e)break}catch(c){o=!0,i=c}finally{try{n||null==s["return"]||s["return"]()}finally{if(o)throw i}}return a}}var u=a("06c5");function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t,e){return c(t)||l(t,e)||Object(u["a"])(t,e)||d()}var h={name:"Subsection",components:{},props:{select:{type:Object,default:function(){return{row:1,column:1}}},total:{row:1,column:1},nums:{type:Object,default:function(){return{row:15,column:10}}},stockInfo:{type:Object,default:function(){return{}}}},computed:{latticeRow:function(){return parseInt(this.total.row/this.nums.row)+(this.total.row%this.nums.row>0?1:0)},latticeColumn:function(){return parseInt(this.total.column/this.nums.column)+(this.total.column%this.nums.column>0?1:0)},random:function(){return{row:this.getRandomRow(this.select.row),column:this.getRandomColumn(this.select.column)}},watchStockInfo:function(){return JSON.stringify(this.stockInfo)}},watch:{watchStockInfo:function(){this.getStatus()}},data:function(){return{status:{row:{},column:{}}}},mounted:function(){},created:function(){this.getStatus()},destroyed:function(){},methods:{getRandom:function(t,e,a,n){return t!==e?"".concat((t-1)*a+1," - ").concat(t*a):"".concat((t-1)*a+1," - ").concat(n)},getRandomRow:function(t){return this.getRandom(t,this.latticeRow,this.nums.row,this.total.row).split(" - ").map((function(t){return Number(t)}))},getRandomColumn:function(t){return this.getRandom(t,this.latticeColumn,this.nums.column,this.total.column).split(" - ").map((function(t){return Number(t)}))},fragmentStatus:function(t,e){var a=1,n=this.total.row,o=1,i=this.total.column;if("row"===t){var r=this.getRandomRow(e),s=f(r,2);a=s[0],n=s[1]}else{var c=this.getRandomColumn(e),l=f(c,2);o=l[0],i=l[1]}console.log(a,n,o,i)},getStatus:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var a,n,o,i,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(a=1;a<=t.total.row;a++)for(n=1;n<=t.total.column;n++)o=(t.stockInfo["".concat(a,"-").concat(n)]||{}).status||0,o<2&&(i=parseInt(a/t.nums.row)+(a%t.nums.row>0?1:0),r=parseInt(n/t.nums.column)+(n%t.nums.column>0?1:0),1===o?(console.log("第几段",i,r),console.log(a,n,o),t.$set(t.status.row,i,o),t.$set(t.status.column,r,o)):(t.status.row[i]||t.$set(t.status.row,i,o),t.status.column[r]||t.$set(t.status.column,r,o)));console.log(t.status);case 2:case"end":return e.stop()}}),e)})))()}}},p=h,v=(a("cb51"),a("2877")),g=Object(v["a"])(p,r,s,!1,null,"35fa32c8",null),m=g.exports,b={name:"checkManage",data:function(){return{size:"leftOutsideShelveId",size2:"rightOutsideShelveId",data:[],select:"",streetId:0,streetDetail:{},checkList:[],stockInfo:{left:{},right:{}},timer:null}},computed:{leftShelveId:function(){var t,e="none";return this.streetDetail.leftShelveId?t=this.streetDetail.leftShelveId:this.streetDetail.leftInsideShelveId&&"leftInsideShelveId"==this.size?(t=this.streetDetail.leftInsideShelveId,e="inside"):this.streetDetail.leftOutsideShelveId&&"leftOutsideShelveId"==this.size&&(t=this.streetDetail.leftOutsideShelveId,e="out"),{shelveId:t,shelveType:e}},rightShelveId:function(){var t,e="none";return this.streetDetail.rightShelveId?t=this.streetDetail.rightShelveId:this.streetDetail.rightInsideShelveId&&"rightInsideShelveId"==this.size2?(t=this.streetDetail.rightInsideShelveId,e="inside"):this.streetDetail.rightOutsideShelveId&&"rightOutsideShelveId"==this.size2&&(t=this.streetDetail.rightOutsideShelveId,e="out"),{shelveId:t,shelveType:e}}},mounted:function(){this.request()},activated:function(){this.request()},beforeRouteLeave:function(t,e,a){this.timer&&clearInterval(this.timer),a()},methods:{request:function(){var t=this;this.$api.httpApi.getStreetList({data:{pageNum:1,pageSize:50}}).then((function(e){t.data=e.data.list,t.select=e.data.list[0].id,t.getStockList(e.data.list[0].id),t.getStreetDetail(e.data.list[0].id),t.getStockRowColumn()})).catch((function(t){}))},getStockRowColumn:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:a=function(){var e=t.data.filter((function(e){return e.id===t.select}))[0],a=null,n=null;e.leftInsideShelveId&&"leftInsideShelveId"==t.size?a=e.leftInsideShelveId:e.leftOutsideShelveId&&"leftOutsideShelveId"==t.size?a=e.leftOutsideShelveId:e.leftShelveId&&(a=e.leftShelveId),e.rightInsideShelveId&&"rightInsideShelveId"==t.size2?n=e.rightInsideShelveId:e.rightOutsideShelveId&&"rightOutsideShelveId"==t.size2?n=e.rightOutsideShelveId:e.rightShelveId&&(n=e.rightShelveId);var o={leftShelveId:a,rightShelveId:n};t.$api.httpNodeApi.getStockRowColumnAPI({params:o}).then((function(e){var a=e.data;t.$set(t,"stockInfo",a)}))},t.timer&&clearInterval(t.timer),a(),t.timer=setInterval(a,5e3);case 4:case"end":return e.stop()}}),e)})))()},getStatus:function(t,e){return(t[e]||{}).status},getStatusBg:function(t,e){var a=this.getStatus(t,e);return 1==a?"#d81e06":2==a?"#1afa29":"#bfbfbf"},getStreetDetail:function(t){var e=this;this.$axios.get("/street/"+t,{data:{}}).then((function(t){e.streetDetail=t.data})).catch((function(t){}))},getStockList:function(t){var e=this;this.$api.httpApi.getStockList({params:{streetId:t}}).then((function(t){e.checkList=t.data})).catch((function(t){}))},handleChange:function(t){console.error("handleChange"),console.log(t),this.select=t,this.getStreetDetail(t),this.getStockList(t),this.getStockRowColumn()},tocheckOperation:function(t,e){console.log(t),console.log(e),this.$router.push({name:"checkOperation",query:{checkObj:t,item:e}})},tocheck:function(t,e,a,n,o,i,r){console.log(i),console.log(r),this.$router.push({name:"checkOperation",query:{row:t,column:e,shelveId:a,id:n,name:o,type:i,type2:r}})},exportStock:function(){var t=this;this.$api.httpApi.exportStock({params:{streetId:this.select}}).then((function(e){var a=new Blob([e],{type:"application/vnd.ms-excel"});t.$utils.downloadFile("巷道列表.xls",a)})).catch((function(t){}))}},components:{Subsection:m}},y=b,S=(a("ca2c"),Object(v["a"])(y,n,o,!1,null,"fa099e7c",null));e["default"]=S.exports},"2f6b":function(t,e,a){var n=a("a027");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=a("499e").default;o("89028e2c",n,!0,{sourceMap:!1,shadowMode:!1})},5899:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"58a8":function(t,e,a){var n=a("1d80"),o=a("5899"),i="["+o+"]",r=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),c=function(t){return function(e){var a=String(n(e));return 1&t&&(a=a.replace(r,"")),2&t&&(a=a.replace(s,"")),a}};t.exports={start:c(1),end:c(2),trim:c(3)}},7156:function(t,e,a){var n=a("861d"),o=a("d2bb");t.exports=function(t,e,a){var i,r;return o&&"function"==typeof(i=e.constructor)&&i!==a&&n(r=i.prototype)&&r!==a.prototype&&o(t,r),t}},"8a9b":function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-35fa32c8]{text-align:left}.subsection[data-v-35fa32c8] {width:100%;height:360px;overflow:hidden}.subsection[data-v-35fa32c8] .ant-tabs-nav .ant-tabs-tab{margin-right:0}.subsection[data-v-35fa32c8] .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){background:#40a9ff;border-color:#40a9ff;box-shadow:-1px 0 0 0 #40a9ff}.subsection[data-v-35fa32c8] .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{background:#40a9ff;border-color:#40a9ff}.subsection[data-v-35fa32c8] .ant-radio-button-wrapper-checked{box-shadow:-1px 0 0 0 #40a9ff}.subsection[data-v-35fa32c8] .radio-button-cell{width:100px;text-align:center}.subsection[data-v-35fa32c8] .ant-layout-sider{height:100%}.subsection[data-v-35fa32c8] .ant-layout-sider .ant-tabs{height:300px}.subsection[data-v-35fa32c8] .ant-layout-sider .ant-tabs-tab{padding:8px;margin-bottom:5px;width:104px}.subsection[data-v-35fa32c8] .ant-layout-footer{padding:0 0 0 110px}.subsection[data-v-35fa32c8] .ant-layout-footer .ant-tabs-bottom-bar{margin-top:0}.subsection[data-v-35fa32c8] .ant-layout,.subsection[data-v-35fa32c8] .ant-layout-footer,.subsection[data-v-35fa32c8] .ant-layout-sider{background-color:#fff}",""]),t.exports=e},"94a6":function(t,e,a){var n=a("8a9b");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=a("499e").default;o("565a2cc3",n,!0,{sourceMap:!1,shadowMode:!1})},"99af":function(t,e,a){"use strict";var n=a("23e7"),o=a("d039"),i=a("e8b5"),r=a("861d"),s=a("7b0b"),c=a("50c4"),l=a("8418"),u=a("65f0"),d=a("1dde"),f=a("b622"),h=a("2d00"),p=f("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",m=h>=51||!o((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),b=d("concat"),y=function(t){if(!r(t))return!1;var e=t[p];return void 0!==e?!!e:i(t)},S=!m||!b;n({target:"Array",proto:!0,forced:S},{concat:function(t){var e,a,n,o,i,r=s(this),d=u(r,0),f=0;for(e=-1,n=arguments.length;ev)throw TypeError(g);for(a=0;a=v)throw TypeError(g);l(d,f++,i)}return d.length=f,d}})},a027:function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-fa099e7c]{text-align:left}.check-page[data-v-fa099e7c]{position:relative}.check-page .title-info[data-v-fa099e7c]{display:flex;align-items:center;justify-content:start}.check-page .title-info .explain[data-v-fa099e7c]{font-weight:600}.check-page .title-info .info-text[data-v-fa099e7c]{display:flex;align-items:center;justify-content:center;margin-right:15px}.check-page .ant-tag[data-v-fa099e7c]{margin-right:0;display:block;line-height:25px;text-align:center;cursor:pointer}.check-page .roadway-top[data-v-fa099e7c],.check-page roadway-buttom[data-v-fa099e7c]{padding:5px 0;width:100%}.check-page .roadway-box[data-v-fa099e7c]{transform:rotateX(180deg);padding:10px 10px 0 0}.check-page .roadway-box .line[data-v-fa099e7c]{display:flex;transform:rotateX(180deg)}.check-page .roadway-box .line .el[data-v-fa099e7c]{width:46px;height:25px;line-height:25px;margin:2px;font-size:12px;text-align:center;border-radius:4px;cursor:pointer;position:relative}.check-page .roadway-box .line .el .default[data-v-fa099e7c]{position:absolute;top:0;left:0;right:0;bottom:0}.check-page .center-box[data-v-fa099e7c]{width:500px;height:52px;line-height:52px}.check-page .center-box .shelf-number[data-v-fa099e7c]{display:inline-block;width:200px}.check-page .export-all[data-v-fa099e7c]{position:absolute;right:20px}",""]),t.exports=e},a630:function(t,e,a){var n=a("23e7"),o=a("4df4"),i=a("1c7e"),r=!i((function(t){Array.from(t)}));n({target:"Array",stat:!0,forced:r},{from:o})},a9e3:function(t,e,a){"use strict";var n=a("83ab"),o=a("da84"),i=a("94ca"),r=a("6eeb"),s=a("5135"),c=a("c6b6"),l=a("7156"),u=a("c04e"),d=a("d039"),f=a("7c73"),h=a("241c").f,p=a("06cf").f,v=a("9bf2").f,g=a("58a8").trim,m="Number",b=o[m],y=b.prototype,S=c(f(y))==m,I=function(t){var e,a,n,o,i,r,s,c,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=g(l),e=l.charCodeAt(0),43===e||45===e){if(a=l.charCodeAt(2),88===a||120===a)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+l}for(i=l.slice(2),r=i.length,s=0;so)return NaN;return parseInt(i,n)}return+l};if(i(m,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var w,x=function(t){var e=arguments.length<1?0:t,a=this;return a instanceof x&&(S?d((function(){y.valueOf.call(a)})):c(a)!=m)?l(new b(I(e)),a,x):I(e)},k=n?h(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;k.length>_;_++)s(b,w=k[_])&&!s(x,w)&&v(x,w,p(b,w));x.prototype=y,y.constructor=x,r(o,m,x)}},ca2c:function(t,e,a){"use strict";var n=a("2f6b"),o=a.n(n);o.a},cb51:function(t,e,a){"use strict";var n=a("94a6"),o=a.n(n);o.a},d28b:function(t,e,a){var n=a("746f");n("iterator")},e01a:function(t,e,a){"use strict";var n=a("23e7"),o=a("83ab"),i=a("da84"),r=a("5135"),s=a("861d"),c=a("9bf2").f,l=a("e893"),u=i.Symbol;if(o&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var d={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new u(t):void 0===t?u():u(t);return""===t&&(d[e]=!0),e};l(f,u);var h=f.prototype=u.prototype;h.constructor=f;var p=h.toString,v="Symbol(test)"==String(u("test")),g=/^Symbol\((.*)\)[^)]+$/;c(h,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=p.call(t);if(r(d,t))return"";var a=v?e.slice(7,-1):e.replace(g,"$1");return""===a?void 0:a}}),n({global:!0,forced:!0},{Symbol:f})}},fb6a:function(t,e,a){"use strict";var n=a("23e7"),o=a("861d"),i=a("e8b5"),r=a("23cb"),s=a("50c4"),c=a("fc6a"),l=a("8418"),u=a("b622"),d=a("1dde"),f=a("ae40"),h=d("slice"),p=f("slice",{ACCESSORS:!0,0:0,1:2}),v=u("species"),g=[].slice,m=Math.max;n({target:"Array",proto:!0,forced:!h||!p},{slice:function(t,e){var a,n,u,d=c(this),f=s(d.length),h=r(t,f),p=r(void 0===e?f:e,f);if(i(d)&&(a=d.constructor,"function"!=typeof a||a!==Array&&!i(a.prototype)?o(a)&&(a=a[v],null===a&&(a=void 0)):a=void 0,a===Array||void 0===a))return g.call(d,h,p);for(n=new(void 0===a?Array:a)(m(p-h,0)),u=0;he.length)&&(t=e.length);for(var i=0,r=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d,s=!0,o=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return s=e.done,e},e:function(e){o=!0,d=e},f:function(){try{s||null==i["return"]||i["return"]()}finally{if(o)throw d}}}}},ba1d:function(e,t,i){e.exports=i.p+"img/img3-login.e7f5ef8c.png"},bb06:function(e,t,i){e.exports=i.p+"img/img1-login.38ccb349.png"},cf05:function(e,t,i){e.exports=i.p+"img/logo.82b9c7a5.png"},d28b:function(e,t,i){var r=i("746f");r("iterator")},dd7b:function(e,t,i){"use strict";i.r(t);var r=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},a=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login"},[r("div",{staticClass:"login-bg login-bg-1"},[r("img",{attrs:{src:i("bb06"),alt:""}})]),r("div",{staticClass:"login-bg login-bg-2"},[r("img",{attrs:{src:i("5f70"),alt:""}})]),r("div",{staticClass:"login-bg login-bg-3"},[r("img",{attrs:{src:i("ba1d"),alt:""}})]),r("div",{staticClass:"login-bg login-bg-4"},[r("img",{attrs:{src:i("670b"),alt:""}})]),r("div",{staticClass:"login-bg login-bg-5"},[r("img",{attrs:{src:i("705c"),alt:""}})]),r("div",{staticClass:"login-cover"},[r("div",{staticClass:"login-cover-logo"},[r("img",{attrs:{src:i("cf05"),alt:"logo"}})]),r("div",{staticClass:"login-cover-title"},[e._v("垛机视觉系统")])])])}],n=(i("4de4"),i("c975"),i("45fc"),i("b0c0"),i("ac1f"),i("841c"),i("53ca")),d=i("b85c"),s=i("165c"),o={name:"login",data:function(){return{isLoading:!1,isAuth:!1}},methods:{existsAccount:function(){this.form.getFieldValue("account")&&this.$api.userApi.existsAccount({query:{account:this.form.getFieldValue("account")}}).then((function(e){console.log(e)})).catch((function(e){}))},permissionCheck:function(e){if(sessionStorage.setItem("userInfo",JSON.stringify(e)),this.setState({userInfo:e}),this.isAuth){var t=e.permissionList.filter((function(e){return 1===e.type})),i=e.permissionList.filter((function(e){return 2===e.type}));t&&t.length?this.$router.push({name:t[0].rights}):i&&i.length?this.$router.push({name:i[0].rights}):(this.$message.info("没有权限"),sessionStorage.clear())}else{var r=this.$router.options.routes[0].children[0].name;this.$router.push({name:r})}}},beforeRouteEnter:function(e,t,i){if(location.search){var r=window.location.search.substring(window.location.search.indexOf("=")+1);"logout"===r&&(localStorage.clear(),sessionStorage.clear()),i()}else localStorage.setItem("userInfo",JSON.stringify(s)),localStorage.getItem("userInfo")?i((function(e){var t=JSON.parse(localStorage.getItem("userInfo")).permissionList,i=e.$router.options.routes[0].children;if(location.search||t.some((function(e){return 2===e.type}))){var r,a=Object(d["a"])(i);try{var s=function(){var i=r.value;if(t.some((function(e){if(e.rights===i.name&&2===e.type)return!0})))return e.$router.push({name:i.name}),{v:void 0}};for(a.s();!(r=a.n()).done;){var o=s();if("object"===Object(n["a"])(o))return o.v}}catch(p){a.e(p)}finally{a.f()}}else e.$message.info("没权限",1,(function(){e.$api({url:"/app/userCenter",method:"GET"}).then((function(e){window.open(e.url+"?redirect="+location.origin,"_self")})).catch((function(e){}))}))})):location.search||i((function(e){e.$api({url:"/app/userCenter",method:"GET"}).then((function(e){window.open(e.url+"?redirect="+location.origin,"_self")})).catch((function(e){}))}))}},p=o,c=(i("46ea"),i("2877")),l=Object(c["a"])(p,r,a,!1,null,null,null);t["default"]=l.exports},e01a:function(e,t,i){"use strict";var r=i("23e7"),a=i("83ab"),n=i("da84"),d=i("5135"),s=i("861d"),o=i("9bf2").f,p=i("e893"),c=n.Symbol;if(a&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var l={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof g?new c(e):void 0===e?c():c(e);return""===e&&(l[t]=!0),t};p(g,c);var I=g.prototype=c.prototype;I.constructor=g;var u=I.toString,T="Symbol(test)"==String(c("test")),m=/^Symbol\((.*)\)[^)]+$/;o(I,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=u.call(e);if(d(l,e))return"";var i=T?t.slice(7,-1):t.replace(m,"$1");return""===i?void 0:i}}),r({global:!0,forced:!0},{Symbol:g})}},fafc:function(e,t,i){var r=i("24fb");t=r(!1),t.push([e.i,".alarm .ant-form-item-label{text-align:left}.login{top:0;left:0;right:0;bottom:0;background:#f0f3f7;display:flex;align-items:center;justify-content:center}.login,.login-bg{position:absolute}.login-bg-1{left:176px;top:113px}.login-bg-2{left:197px;top:242px}.login-bg-3{left:79px;bottom:59px}.login-bg-4{right:280px;top:82px}.login-bg-5{right:0;bottom:59px}.login-cover{width:368px}.login-cover-logo{display:flex;justify-content:center;line-height:48px}.login-cover-logo img{height:120px}.login-cover-title{text-align:center;height:22px;font-size:14px;font-family:PingFangSC-Regular;font-weight:400;color:rgba(0,0,0,.45);line-height:22px;margin:16px 0 32px 0}.login-cover .ant-tabs-nav-scroll{display:flex;justify-content:center}.login-submit{width:100%}.login-forget{height:22px;font-size:14px;font-family:PingFangSC-Regular;font-weight:400;color:rgba(0,0,0,.45);line-height:22px;text-align:right;margin-bottom:24px}.login-footer{position:fixed;left:50%;bottom:28px;transform:translateX(-50%)}",""]),e.exports=t},fb6a:function(e,t,i){"use strict";var r=i("23e7"),a=i("861d"),n=i("e8b5"),d=i("23cb"),s=i("50c4"),o=i("fc6a"),p=i("8418"),c=i("b622"),l=i("1dde"),g=i("ae40"),I=l("slice"),u=g("slice",{ACCESSORS:!0,0:0,1:2}),T=c("species"),m=[].slice,f=Math.max;r({target:"Array",proto:!0,forced:!I||!u},{slice:function(e,t){var i,r,c,l=o(this),g=s(l.length),I=d(e,g),u=d(void 0===t?g:t,g);if(n(l)&&(i=l.constructor,"function"!=typeof i||i!==Array&&!n(i.prototype)?a(i)&&(i=i[T],null===i&&(i=void 0)):i=void 0,i===Array||void 0===i))return m.call(l,I,u);for(r=new(void 0===i?Array:i)(f(u-I,0)),c=0;I2&&void 0!==arguments[2]?arguments[2]:{};a(this,t),Object(s["a"])(this,"webrtc",null),Object(s["a"])(this,"video",null),Object(s["a"])(this,"server",null),Object(s["a"])(this,"codecLink",null),Object(s["a"])(this,"rsdpLink",null),Object(s["a"])(this,"stream",new MediaStream),Object(s["a"])(this,"uuid",null),Object(s["a"])(this,"options",{onStatusChange:null}),console.log("new uuid:"+n),this.server=t.server,this.video=e,this.uuid=n,Object.assign(this.options,i),this.createLinks(),this.play()}return o(t,[{key:"createLinks",value:function(){this.codecLink="//"+this.server+"/stream/codec/"+this.uuid,this.rsdpLink="//"+this.server+"/stream/receiver/"+this.uuid}},{key:"play",value:function(){var t=this;this.webrtc=new RTCPeerConnection({iceServers:[{urls:["stun:stun.l.google.com:19302"]}]}),this.webrtc||console.log("no"),this.webrtc.onnegotiationneeded=this.handleNegotiationNeeded.bind(this),this.webrtc.ontrack=this.onTrack.bind(this),fetch(this.codecLink).then((function(e){e.json().then((function(e){e.forEach((function(e,n){t.webrtc.addTransceiver(e.Type,{direction:"sendrecv"})}))}))})).catch((function(t){console.log(t)})),this.webrtc.onconnectionstatechange=function(){"connected"==t.webrtc.connectionState||"connecting"==t.webrtc.connectionState?console.log("uuid:"+t.uuid+" status:"+t.webrtc.connectionState):(console.log(t.webrtc.connectionState),t.load(t.uuid))}}},{key:"handleNegotiationNeeded",value:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e,n,i=this;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.webrtc.createOffer();case 2:return e=t.sent,t.next=5,this.webrtc.setLocalDescription(e);case 5:n=new FormData,n.append("suuid",this.uuid),n.append("data",btoa(this.webrtc.localDescription.sdp)),fetch(this.rsdpLink,{method:"POST",body:n}).then((function(t){t.text().then((function(t){i.webrtc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:atob(t)}))}))})).catch((function(t){}));case 9:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"onTrack",value:function(t){this.stream.addTrack(t.track),this.video.srcObject=this.stream,this.video.play()}},{key:"load",value:function(t){this.destroy(),this.uuid=t,this.createLinks(),this.play()}},{key:"destroy",value:function(){console.log("destroy uuid:"+this.uuid),this.webrtc.close(),this.webrtc=null,this.video.srcObject=null,this.stream=new MediaStream}},{key:"getImageUrl",value:function(){var t=document.createElement("canvas");t.width=this.video.videoWidth,t.height=this.video.videoHeight,t.getContext("2d").drawImage(video,0,0,t.width,t.height);var e=t.toDataURL();return t.remove(),e}}],[{key:"setServer",value:function(t){this.server=t}}]),t}();Object(s["a"])(c,"server","127.0.0.1:8083");e["a"]=c},"41c4":function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-4fa80a1b]{text-align:left}.realTime[data-v-4fa80a1b]{padding:10px}",""]),t.exports=e},"634a":function(t,e,n){var i=n("41c4");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("499e").default;a("17dbe64a",i,!0,{sourceMap:!1,shadowMode:!1})},a630:function(t,e,n){var i=n("23e7"),a=n("4df4"),r=n("1c7e"),o=!r((function(t){Array.from(t)}));i({target:"Array",stat:!0,forced:o},{from:a})},b85c:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),n("a630"),n("fb6a"),n("b0c0"),n("25f0");function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n["return"]||n["return"]()}finally{if(c)throw o}}}}},d28b:function(t,e,n){var i=n("746f");i("iterator")},d42b:function(t,e,n){"use strict";var i=n("634a"),a=n.n(i);a.a},d7ad:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"realTime bg-white"},[n("a-tabs",{attrs:{slot:"headerContent","default-active-key":"1","padding:10px":""},on:{change:t.tabsChange},slot:"headerContent",model:{value:t.tabKey,callback:function(e){t.tabKey=e},expression:"tabKey"}},t._l(t.realTimeListData,(function(t){return n("a-tab-pane",{key:t.streetId.toString(),attrs:{tab:t.streetName}})})),1),n("a-row",{attrs:{gutter:20}},t._l(t.cameras.slice(0,t.selectTab.videoStyleRow*t.selectTab.videoStyleColumn),(function(e,i){return n("a-col",{key:i,style:{height:t.videoHeight,marginBottom:t.selectTab.videoStyleRow*t.selectTab.videoStyleColumn-i-1>=t.selectTab.videoStyleColumn?"20px":0},attrs:{span:24/t.selectTab.videoStyleColumn}},[n("video",{style:{height:t.videoHeight},attrs:{id:"camera"+e.id,autoplay:"",muted:""},domProps:{muted:!0}})])})),1)],1)},a=[],r=(n("4de4"),n("d3b7"),n("25f0"),n("b85c")),o=n("3ea2"),s={name:"historyMonitoring",components:{},data:function(){return{realTimeListData:[],url:"722e6f04-bb3c-34b1-bcc7-ae9f6cd72e68",tabKey:"0",path:[],player:"",visible:!1,modelData:[],clientHeight:0,showVideo:!1,players:[]}},computed:{selectTab:function(){var t=this;return this.realTimeListData.filter((function(e){return e.streetId==t.tabKey}))[0]||{}},cameras:function(){return this.selectTab.cameras||[]},videoHeight:function(){return(this.clientHeight-20*this.selectTab.videoStyleRow)/this.selectTab.videoStyleRow+"px"}},inject:["reload"],mounted:function(){this.setVideoServer(),this.getRealTimeList(),null==sessionStorage.getItem("tabKey")&&sessionStorage.setItem("tabKey",0),this.tabKey=sessionStorage.getItem("tabKey"),this.getClientHeight()},destroyed:function(){this.destory()},methods:{getClientHeight:function(){this.clientHeight=this.$el.clientHeight-80},getRealTimeList:function(){var t=this;this.showVideo=!1,this.$api.httpApi.getRealTimeList({data:{}}).then((function(e){200==e.code&&(t.realTimeListData=e.data.reverse(),t.showVideo=!0,t.$nextTick((function(){t.autoPlay()})))})).catch((function(t){console.log(t)}))},tabsChange:function(t){var e=this;sessionStorage.setItem("tabKey",t),this.$nextTick((function(){e.autoPlay()}))},showModel:function(t){var e=this;this.$nextTick((function(){e.$router.push({name:"realTimeMonitoringModel",query:{modelData:t}})}))},autoPlay:function(){this.players=[];var t,e=Object(r["a"])(this.realTimeListData);try{for(e.s();!(t=e.n()).done;){var n,i=t.value,a=Object(r["a"])(i.cameras);try{for(a.s();!(n=a.n()).done;){var s=n.value,c=document.getElementById("camera"+s.id);if(c){var l=new o["a"](c,"camera"+s.id);l.load("camera"+s.id),this.players.push(l)}}}catch(u){a.e(u)}finally{a.f()}}}catch(u){e.e(u)}finally{e.f()}},destory:function(){var t,e=Object(r["a"])(this.players);try{for(e.s();!(t=e.n()).done;){var n=t.value;console.log("stop"),n.destroy()}}catch(i){e.e(i)}finally{e.f()}},setVideoServer:function(){this.$api.httpApi.getVideoServer({data:{}}).then((function(t){200==t.code&&o["a"].setServer(t.data.toString())})).catch((function(t){console.log(t)}))}}},c=s,l=(n("d42b"),n("2877")),u=Object(l["a"])(c,i,a,!1,null,"4fa80a1b",null);e["default"]=u.exports},e01a:function(t,e,n){"use strict";var i=n("23e7"),a=n("83ab"),r=n("da84"),o=n("5135"),s=n("861d"),c=n("9bf2").f,l=n("e893"),u=r.Symbol;if(a&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var d={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof h?new u(t):void 0===t?u():u(t);return""===t&&(d[e]=!0),e};l(h,u);var f=h.prototype=u.prototype;f.constructor=h;var b=f.toString,v="Symbol(test)"==String(u("test")),y=/^Symbol\((.*)\)[^)]+$/;c(f,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=b.call(t);if(o(d,t))return"";var n=v?e.slice(7,-1):e.replace(y,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:h})}},fb6a:function(t,e,n){"use strict";var i=n("23e7"),a=n("861d"),r=n("e8b5"),o=n("23cb"),s=n("50c4"),c=n("fc6a"),l=n("8418"),u=n("b622"),d=n("1dde"),h=n("ae40"),f=d("slice"),b=h("slice",{ACCESSORS:!0,0:0,1:2}),v=u("species"),y=[].slice,p=Math.max;i({target:"Array",proto:!0,forced:!f||!b},{slice:function(t,e){var n,i,u,d=c(this),h=s(d.length),f=o(t,h),b=o(void 0===e?h:e,h);if(r(d)&&(n=d.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)?a(n)&&(n=n[v],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return y.call(d,f,b);for(i=new(void 0===n?Array:n)(p(b-f,0)),u=0;f2)if(c=v(c),t=c.charCodeAt(0),43===t||45===t){if(a=c.charCodeAt(2),88===a||120===a)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,l=49;break;case 79:case 111:r=8,l=55;break;default:return+c}for(o=c.slice(2),s=o.length,i=0;il)return NaN;return parseInt(o,r)}return+c};if(o(g,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var C,N=function(e){var t=arguments.length<1?0:e,a=this;return a instanceof N&&(y?u((function(){I.valueOf.call(a)})):n(a)!=g)?c(new b(S(t)),a,N):S(t)},w=r?p(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),T=0;w.length>T;T++)i(b,C=w[T])&&!i(N,C)&&h(N,C,f(b,C));N.prototype=I,I.constructor=N,s(l,g,N)}},db79:function(e,t,a){var r=a("1c6d");"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var l=a("499e").default;l("003eda88",r,!0,{sourceMap:!1,shadowMode:!1})},ddc9:function(e,t,a){var r=a("8194");"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var l=a("499e").default;l("91ff9898",r,!0,{sourceMap:!1,shadowMode:!1})},dff9:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("a-button",{staticClass:"add",attrs:{type:"primary"},on:{click:function(t){return e.showModel("add","")}}},[e._v(" 新增巷道 ")]),a("a-table",{attrs:{columns:e.columns,"row-key":function(e){return e.id},"data-source":e.data,pagination:e.pagination},on:{change:e.handleGetStreetList},scopedSlots:e._u([{key:"leftType",fn:function(t){return a("span",{},[e._v(" "+e._s(null===t?"-":0===t?"单伸":"双伸")+" ")])}},{key:"rightType",fn:function(t){return a("span",{},[e._v(" "+e._s(null===t?"-":0===t?"单伸":"双伸")+" ")])}},{key:"actions",fn:function(t){return a("span",{},[[t.camera1Name&&t.camera2Name?a("span",[e._v(e._s(t.camera1Name)+" 、"+e._s(t.camera2Name))]):a("span",[t.camera1Name?a("span",[e._v(e._s(t.camera1Name))]):e._e(),t.camera2Name?a("span",[e._v(e._s(t.camera2Name))]):e._e()])]],2)}},{key:"action",fn:function(t,r){return a("span",{},[a("a",{on:{click:function(t){return e.showModel("edit",r)}}},[e._v(" 编辑 ")]),a("a-divider",{attrs:{type:"vertical"}}),a("a-popconfirm",{attrs:{title:"是否删除?"},on:{confirm:function(){return e.delDosage(r)}}},[a("a",[e._v("删除")])])],1)}}])}),a("Model",{attrs:{visible:e.visible,modelTitle:e.modelTitle,modelData:e.modelData},on:{"update:visible":function(t){e.visible=t},"update:modelData":function(t){e.modelData=t},"update:model-data":function(t){e.modelData=t},sure:e.submit,close:e.closeModel}})],1)},l=[],o=a("5530"),s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.isShow?a("div",[a("a-modal",{staticClass:"p-model",attrs:{title:e.title,closable:e.closable,"ok-text":"确认","cancel-text":"取消"},on:{ok:e.handleOk,cancel:e.handleCancel},model:{value:e.isShow,callback:function(t){e.isShow=t},expression:"isShow"}},[a("a-form",{attrs:{form:e.form,"wrapper-col":e.formItemAcrossLayout.wrapperCol}},[a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"巷道名称","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入巷道名称!"}]}],expression:"['name', { rules: [{ required: true, message: '请输入巷道名称!' }] }]"}]})],1),a("a-form-item",{attrs:{label:"PLC-ID","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["plcId",{rules:[{required:!0,message:"请输入PLC-ID!"}]}],expression:"['plcId', { rules: [{ required: true, message: '请输入PLC-ID!' }] }]"}]})],1)],1),a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"PLC IP地址","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["plcIp",{rules:[{required:!0,message:"请输入PLC IP地址!"}]}],expression:"['plcIp', { rules: [{ required: true, message: '请输入PLC IP地址!' }] }]"}]})],1),a("a-form-item",{attrs:{label:"端口","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["plcPort",{rules:[{required:!0,message:"请输入端口!"}]}],expression:"['plcPort', { rules: [{ required: true, message: '请输入端口!' }] }]"}]})],1)],1),a("a-divider"),a("div",{staticClass:"leftType"},[a("h3",[e._v("左货架")]),a("a-form-item",{attrs:{label:"类型","label-col":e.formItemVerticalLayout.labelCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["leftType",{rules:[{required:!0,message:"请选择类型!"}]}],expression:"[\n 'leftType',\n { rules: [{ required: true, message: '请选择类型!' }] },\n ]"}],attrs:{placeholder:"选择类型"},on:{change:e.handleSelectChangeLeft}},[a("a-select-option",{attrs:{value:"0"}},[e._v(" 单伸 ")]),a("a-select-option",{attrs:{value:"1"}},[e._v(" 双伸 ")])],1)],1),a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"货架规格","label-col":{span:7}}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["leftRow",{rules:[{required:!0,message:"请输入行数!"}]}],expression:"['leftRow', { rules: [{ required: true, message: '请输入行数!' }] }]"}],attrs:{suffix:"行"}})],1),a("a-form-item",{attrs:{label:"","wrapper-col":{span:20}}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["leftColumn",{rules:[{required:!0,message:"请输入列数!"}]}],expression:"['leftColumn', { rules: [{ required: true, message: '请输入列数!' }] }]"}],attrs:{suffix:"列"}})],1)],1),"0"==e.leftType?a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"货架号","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["leftShelveId",{rules:[{required:!0,message:"请输入货架号!"}]}],expression:"['leftShelveId', { rules: [{ required: true, message: '请输入货架号!' }] }]"}]})],1)],1):e._e(),"1"==e.leftType?a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"内货架号","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["leftInsideShelveId",{rules:[{required:!0,message:"请输入内货架号!"}]}],expression:"['leftInsideShelveId', { rules: [{ required: true, message: '请输入内货架号!' }] }]"}]})],1),a("a-form-item",{attrs:{label:"外货架号","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["leftOutsideShelveId",{rules:[{required:!0,message:"请输入外货架号!"}]}],expression:"['leftOutsideShelveId', { rules: [{ required: true, message: '请输入外货架号!' }] }]"}]})],1)],1):e._e(),a("a-divider")],1),a("div",{staticClass:"leftType"},[a("h3",[e._v("右货架")]),a("a-form-item",{attrs:{label:"类型","label-col":e.formItemVerticalLayout.labelCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["rightType",{rules:[{required:!0,message:"请选择类型!"}]}],expression:"[\n 'rightType',\n { rules: [{ required: true, message: '请选择类型!' }] },\n ]"}],attrs:{placeholder:"选择类型"},on:{change:e.handleSelectChangeRight}},[a("a-select-option",{attrs:{value:"0"}},[e._v(" 单伸 ")]),a("a-select-option",{attrs:{value:"1"}},[e._v(" 双伸 ")])],1)],1),a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"货架规格","label-col":{span:7}}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["rightRow",{rules:[{required:!0,message:"请输入行!"}]}],expression:"['rightRow', { rules: [{ required: true, message: '请输入行!' }] }]"}],attrs:{suffix:"行"}})],1),a("a-form-item",{attrs:{label:"","wrapper-col":{span:20}}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["rightColumn",{rules:[{required:!0,message:"请输入列!"}]}],expression:"['rightColumn', { rules: [{ required: true, message: '请输入列!' }] }]"}],attrs:{suffix:"列"}})],1)],1),"0"==e.rightType?a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"货架号","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["rightShelveId",{rules:[{required:!0,message:"请输入货架号!"}]}],expression:"['rightShelveId', { rules: [{ required: true, message: '请输入货架号!' }] }]"}]})],1)],1):e._e(),"1"==e.rightType?a("div",{staticClass:"across-layout"},[a("a-form-item",{attrs:{label:"内货架号","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["rightInsideShelveId",{rules:[{required:!0,message:"请输入内货架号!"}]}],expression:"['rightInsideShelveId', { rules: [{ required: true, message: '请输入内货架号!' }] }]"}]})],1),a("a-form-item",{attrs:{label:"外货架号","label-col":e.formItemAcrossLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["rightOutsideShelveId",{rules:[{required:!0,message:"请输入外货架号!"}]}],expression:"['rightOutsideShelveId', { rules: [{ required: true, message: '请输入外货架号!' }] }]"}]})],1)],1):e._e(),a("a-divider")],1),e.cameraList.length>0?a("div",[a("a-form-item",{attrs:{label:"球机1","label-col":e.formItemVerticalLayout.labelCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["camera1Id"],expression:"[\n 'camera1Id',\n ]"}],attrs:{placeholder:"选择球机"},on:{dropdownVisibleChange:e.handleSelectCamera}},e._l(e.cameraList,(function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.name)+" ")])})),1)],1),a("a-form-item",{attrs:{label:"球机2","label-col":e.formItemVerticalLayout.labelCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["camera2Id"],expression:"[\n 'camera2Id',\n ]"}],attrs:{placeholder:"选择球机"}},e._l(e.cameraList,(function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.name)+" ")])})),1)],1)],1):a("div",[a("a-form-item",{attrs:{label:"球机1","label-col":e.formItemVerticalLayout.labelCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["camera1Name"],expression:"[\n 'camera1Name',\n ]"}],attrs:{placeholder:"选择球机"},on:{dropdownVisibleChange:e.handleSelectCamera}},e._l(e.cameraList,(function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.name)+" ")])})),1)],1),a("a-form-item",{attrs:{label:"球机2","label-col":e.formItemVerticalLayout.labelCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["camera2Name"],expression:"[\n 'camera2Name',\n ]"}],attrs:{placeholder:"选择球机"}},e._l(e.cameraList,(function(t){return a("a-select-option",{key:t.id,attrs:{value:t.id}},[e._v(" "+e._s(t.name)+" ")])})),1)],1)],1)],1)],1)],1):e._e()},i=[],n=(a("b0c0"),a("a9e3"),{labelCol:{span:8},wrapperCol:{span:14}}),c={labelCol:{span:4},wrapperCol:{span:8,offset:4}},d={props:["visible","modelTitle","modelData"],watch:{visible:function(e){this.isShow=e},modelTitle:function(e){this.title=e},modelData:function(e){var t=this;console.log(e),e.id&&(this.mdata=e,this.leftType=e.leftType,this.rightType=e.rightType,this.id=e.id,this.$nextTick((function(){t.form.setFieldsValue({name:e.name,plcId:e.plcId,plcIp:e.plcIp,plcPort:e.plcPort,leftType:null===e.leftType?"":0===e.leftType?"单伸":"双伸",leftRow:7,leftColumn:18,leftShelveId:e.leftShelveId,leftInsideShelveId:e.leftInsideShelveId,leftOutsideShelveId:e.leftOutsideShelveId,rightType:null===e.rightType?"":0===e.rightType?"单伸":"双伸",rightRow:7,rightColumn:18,rightShelveId:e.rightShelveId,rightInsideShelveId:e.rightInsideShelveId,rightOutsideShelveId:e.rightOutsideShelveId,camera1Id:e.camera1Name,camera2Id:e.camera2Name,camera1Name:e.camera1Name,camera2Name:e.camera2Name})})))}},data:function(){return{isShow:!1,title:"",closable:!1,formItemAcrossLayout:n,formItemVerticalLayout:c,confirmLoading:!1,form:this.$form.createForm(this,{name:"dynamic_rule"}),leftType:"",rightType:"",id:"",cameraList:[],mdata:[]}},mounted:function(){console.log("mounted执行了")},methods:{handleOk:function(){var e=this;this.confirmLoading=!0,setTimeout((function(){e.form.validateFields((function(t,a){if(console.log(a),a.leftColumn=Number(a.leftColumn),a.leftRow=Number(a.leftRow),a.leftType=Number(a.leftType),a.plcPort=Number(a.plcPort),a.rightColumn=Number(a.rightColumn),a.rightRow=Number(a.rightRow),a.rightType=Number(a.rightType),!t)if(console.log(e.title),"新增巷道"==e.title)e.$api.httpApi.addStreet({data:a}).then((function(t){200==t.code&&(e.$emit("sure",!1),e.$message.success("新增巷道成功"))})).catch((function(e){}));else if("编辑巷道"==e.title){switch(a.id=e.id,a.leftType){case"单伸":a.leftType="0";break;case"双伸":a.leftType="1";break}switch(a.rightType){case"单伸":a.rightType="0";break;case"双伸":a.rightType="1";break}!e.cameraList.length>0&&(a.camera1Id=e.mdata.camera1Id,a.camera2Id=e.mdata.camera2Id),e.$api.httpApi.editStreet({data:a}).then((function(t){200==t.code&&(e.$emit("sure",!1),e.$message.success("编辑巷道成功"))})).catch((function(e){}))}})),e.confirmLoading=!1}),500)},handleCancel:function(){console.log("Clicked cancel button"),console.log(this.title),this.$emit("close",!1,{})},handleSelectChangeLeft:function(e){console.log(e),this.form.setFieldsValue({leftInsideShelveId:"",leftOutsideShelveId:"",leftShelveId:""}),this.leftType=e},handleSelectChangeRight:function(e){this.form.setFieldsValue({rightInsideShelveId:"",rightOutsideShelveId:"",rightShelveId:""}),this.rightType=e},handleSelectCamera:function(){var e=this;this.$api.httpApi.getCameraList({data:{pageNum:0,pageSize:0}}).then((function(t){e.cameraList=t.data.list})).catch((function(e){}))}}},u=d,m=(a("80a3"),a("2877")),p=Object(m["a"])(u,s,i,!1,null,"d6bdde64",null),f=p.exports,h=[{title:"巷道名称",dataIndex:"name"},{title:"PLC-ID",dataIndex:"plcId"},{title:"左货架类型",dataIndex:"leftType",scopedSlots:{customRender:"leftType"}},{title:"右货架类型",dataIndex:"rightType",scopedSlots:{customRender:"rightType"}},{title:"对应球机",scopedSlots:{customRender:"actions"}},{title:"修改时间",dataIndex:"updateTime"},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}],v={data:function(){var e=this;return{pageNum:1,pageSize:10,data:[],pagination:{total:0,defaultPageSize:10,showTotal:function(e){return"共 ".concat(e," 条数据")},showSizeChanger:!0,pageSizeOptions:["10","20","30"],onShowSizeChange:function(t,a){return e.pageSize=a}},loading:!1,columns:h,visible:!1,modelTitle:"",modelData:[]}},mounted:function(){this.handleGetStreetList()},methods:{handleGetStreetList:function(e){console.log(e),e&&(this.pagination.current=e.current,this.pagination.pageSize=e.pageSize,this.pageNum=e.current,this.pageSize=e.pageSize),this.request()},request:function(){var e=this;this.$api.httpApi.getStreetList({data:{pageNum:this.pageNum,pageSize:this.pageSize}}).then((function(t){var a=Object(o["a"])({},e.pagination);a.total=t.data.total,e.data=t.data.list,e.pagination=a})).catch((function(e){}))},showModel:function(e,t){this.visible=!0,console.log(e),"add"==e?this.modelTitle="新增巷道":"edit"==e&&(this.modelTitle="编辑巷道",this.modelData=t)},submit:function(e){this.visible=e,this.handleGetStreetList()},closeModel:function(e,t){this.visible=e,this.modelData=t},delDosage:function(e){var t=this;console.log(e.id);var a=e.id;this.$axios.delete("/street/"+a,{data:{}}).then((function(e){200==e.code&&(t.$message.success("删除巷道成功"),t.handleGetStreetList())})).catch((function(e){}))}},components:{Model:f}},g=v,b=(a("92e4"),Object(m["a"])(g,r,l,!1,null,"377d716d",null));t["default"]=b.exports}}]);
\ No newline at end of file
diff --git a/js/chunk-d8c3b5aa.5bf19687.js b/js/chunk-d8c3b5aa.e36d8a2c.js
similarity index 100%
rename from js/chunk-d8c3b5aa.5bf19687.js
rename to js/chunk-d8c3b5aa.e36d8a2c.js
diff --git a/js/chunk-e0f9bdd0.3fc81169.js b/js/chunk-e0f9bdd0.0eb55b03.js
similarity index 100%
rename from js/chunk-e0f9bdd0.3fc81169.js
rename to js/chunk-e0f9bdd0.0eb55b03.js
diff --git a/js/chunk-e205a644.052c67a3.js b/js/chunk-e205a644.2096910b.js
similarity index 100%
rename from js/chunk-e205a644.052c67a3.js
rename to js/chunk-e205a644.2096910b.js
diff --git a/js/chunk-e63447d2.b91f7eb2.js b/js/chunk-e63447d2.b91f7eb2.js
new file mode 100644
index 0000000..943d867
--- /dev/null
+++ b/js/chunk-e63447d2.b91f7eb2.js
@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e63447d2"],{"14bf":function(t,e,a){"use strict";var o=a("aa52"),i=a.n(o);i.a},2e3:function(t,e,a){"use strict";a.d(e,"c",(function(){return o})),a.d(e,"b",(function(){return i})),a.d(e,"d",(function(){return n})),a.d(e,"a",(function(){return s})),a.d(e,"e",(function(){return r}));var o="/api/camera/config/import",i="/api/category/import",n="/api/stock/import",s="/api/pic/",r="/api/mp4/"},"517d":function(t,e,a){"use strict";var o=a("901f"),i=a.n(o);i.a},"901f":function(t,e,a){var o=a("a2a6");"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("9b377522",o,!0,{sourceMap:!1,shadowMode:!1})},"98e8":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"button-box"},[a("a-button",{staticClass:"add",attrs:{type:"primary"},on:{click:function(e){return t.showModel("add","")}}},[t._v(" 新增 ")]),a("a-upload",{ref:"table",staticStyle:{"margin-right":"15px"},attrs:{name:"file",multiple:!0,accept:".xlsx",action:t.uploadProps.action,showUploadList:!1},on:{change:t.handleChange}},[a("a-button",{attrs:{type:"primary"}},[t._v(" 导入 ")])],1),a("a-button",{attrs:{type:""},on:{click:t.categoryExportModel}},[t._v(" 模板下载 ")])],1),a("a-table",{staticStyle:{"margin-top":"40px"},attrs:{columns:t.columns,"row-key":function(t){return t.id},"data-source":t.data,pagination:t.pagination},on:{change:t.handleGetCameraIoList},scopedSlots:t._u([{key:"action",fn:function(e,o){return a("span",{},[a("a-divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.showModel("edit",o)}}},[t._v(" 编辑 ")]),a("a-divider",{attrs:{type:"vertical"}}),a("a-popconfirm",{attrs:{title:"是否删除?"},on:{confirm:function(){return t.delDosage(o)}}},[a("a",[t._v("删除")])])],1)}}])}),a("Model",{attrs:{visible:t.visible,modelType:t.modelType,modelData:t.modelData},on:{"update:visible":function(e){t.visible=e},"update:modelData":function(e){t.modelData=e},"update:model-data":function(e){t.modelData=e},sure:t.submit,close:t.closeModel}})],1)},i=[],n=(a("4160"),a("159b"),a("5530")),s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.isShow?a("div",["add"==t.type||"edit"==t.type?[a("a-modal",{staticClass:"p-model",attrs:{title:["add"==t.type?"新增品规":"编辑品规"],closable:t.closable,"ok-text":"确认","cancel-text":"取消"},on:{ok:t.handleOk,cancel:t.handleCancel},model:{value:t.isShow,callback:function(e){t.isShow=e},expression:"isShow"}},[a("a-form",{attrs:{form:t.form,"wrapper-col":t.formItemAcrossLayout.wrapperCol}},[a("a-form-item",{attrs:{label:"名称","label-col":t.formItemVerticalLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入品规名称!"}]}],expression:"['name', { rules: [{ required: true, message: '请输入品规名称!' }] }]"}]})],1),a("a-form-item",{attrs:{label:"条码","label-col":t.formItemVerticalLayout.labelCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["code",{rules:[{required:!0,message:"请输入条码!"}]}],expression:"['code', { rules: [{ required: true, message: '请输入条码!' }] }]"}]})],1)],1)],1)]:t._e()],2):t._e()},r=[],c=(a("b0c0"),{labelCol:{span:8},wrapperCol:{span:14}}),l={labelCol:{span:4},wrapperCol:{span:8,offset:4}},d={props:["visible","modelType","modelData"],watch:{visible:function(t){this.isShow=t},modelType:function(t){this.type=t},modelData:function(t){var e=this;this.mdata=t,console.log(this.type),t.id&&"edit"==this.type&&(this.id=t.id,this.$nextTick((function(){e.form.setFieldsValue({name:t.name,code:t.code,ip:t.ip,rtsp:t.rtsp})})))}},data:function(){return{isShow:!1,type:"",title:"",closable:!1,formItemAcrossLayout:c,formItemVerticalLayout:l,confirmLoading:!1,form:this.$form.createForm(this,{name:"dynamic_rule"}),id:"",mdata:[]}},mounted:function(){console.log("mounted执行了")},methods:{handleOk:function(){var t=this;this.confirmLoading=!0,setTimeout((function(){t.form.validateFields((function(e,a){console.log(a),e||(console.log(t.title),"add"==t.type?t.$api.httpApi.addCategory({data:a}).then((function(e){200==e.code&&(t.$emit("sure",!1),t.$message.success("新增品规成功"))})).catch((function(t){})):"edit"==t.type&&(a.id=t.id,t.$api.httpApi.editCategory({data:a}).then((function(e){200==e.code&&(t.$emit("sure",!1),t.$message.success("编辑品规成功"))})).catch((function(t){}))))})),t.confirmLoading=!1}),500)},handleCancel:function(){console.log("Clicked cancel button"),console.log(this.title),this.$emit("close",!1,{})}}},p=d,u=(a("517d"),a("2877")),f=Object(u["a"])(p,s,r,!1,null,"485fcf4c",null),m=f.exports,h=a("2000"),g=[{title:"序号",customRender:function(t,e,a){return 10*(e.pageNumber-1)+a+1}},{title:"品类",dataIndex:"name"},{title:"条码",dataIndex:"code"},{title:"修改时间",dataIndex:"updateTime"},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}],v={data:function(){var t=this;return{pageNum:1,pageSize:10,data:[],pagination:{total:0,current:1,defaultPageSize:10,showTotal:function(t){return"共 ".concat(t," 条数据")},showSizeChanger:!0,pageSizeOptions:["10","20","30"],onShowSizeChange:function(e,a){return t.pageSize=a}},loading:!1,columns:g,visible:!1,modelType:"",modelData:[]}},computed:{uploadProps:function(){return{action:h["b"]}}},mounted:function(){this.handleGetCameraIoList()},methods:{handleChange:function(t){console.log(t),"done"==t.file.status?(this.$message.success(t.file.response.message),this.handleGetCameraIoList()):"error"==t.file.status&&this.$message.error(t.file.response.message)},handleGetCameraIoList:function(t){console.log(t),t&&(this.pagination.current=t.current,this.pagination.pageSize=t.pageSize,this.pageNum=t.current,this.pageSize=t.pageSize),this.request()},request:function(){var t=this;this.$api.httpApi.categoryList({data:{pageNum:this.pageNum,pageSize:this.pageSize}}).then((function(e){var a=Object(n["a"])({},t.pagination);a.total=e.data.total,t.data=e.data.list,t.pagination=a,e.data.list.forEach((function(e,a){e.pageNumber=t.pagination.current}))})).catch((function(t){}))},categoryExportModel:function(){var t=this;this.$api.httpApi.categoryExportModel({params:{}}).then((function(e){var a=new Blob([e],{type:"application/vnd.ms-excel"});t.$utils.downloadFile("品规模板.xls",a)})).catch((function(t){}))},showModel:function(t,e){this.visible=!0,console.log(t),this.modelType=t,this.modelData=e},submit:function(t){this.visible=t,this.handleGetCameraIoList()},closeModel:function(t,e){this.visible=t,this.modelData=e},delDosage:function(t){var e=this;console.log(t.id);var a=t.id;this.$axios.delete("/category/"+a,{data:{}}).then((function(t){200==t.code&&(e.$message.success("删除分类成功"),e.handleGetCameraIoList())})).catch((function(t){}))}},components:{Model:m}},b=v,x=(a("14bf"),Object(u["a"])(b,o,i,!1,null,"4ffe296b",null));e["default"]=x.exports},"9bd0":function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-4ffe296b]{text-align:left}.button-box[data-v-4ffe296b]{position:absolute;top:20px;right:40px;display:flex;align-items:center;justify-content:center}.button-box .add[data-v-4ffe296b]{margin-right:15px}",""]),t.exports=e},a2a6:function(t,e,a){var o=a("24fb");e=o(!1),e.push([t.i,".alarm .ant-form-item-label[data-v-485fcf4c]{text-align:left}.p-model .across-layout[data-v-485fcf4c]{display:flex}.p-model .ant-divider-horizontal[data-v-485fcf4c]{margin:6px 0}.video-mask[data-v-485fcf4c]{position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(0,0,0,.5);z-index:1000}.video-mask[data-v-485fcf4c],.video-mask .video-close[data-v-485fcf4c]{display:flex;align-items:center;justify-content:center}.video-mask .video-close[data-v-485fcf4c]{position:absolute;right:20px;top:20px;color:#fff;font-size:24px;width:32px;height:32px;background:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;z-index:10}.video-mask .operation-list[data-v-485fcf4c]{position:absolute;right:200px;bottom:20px;z-index:10}.video-mask .operation-list .operation-item img[data-v-485fcf4c]{width:42px}.video-mask .operation-list .operation-item span[data-v-485fcf4c]{padding:5px 10px;background:rgba(0,0,0,.5);font-size:18px;color:#fff}.video-mask .direction-list[data-v-485fcf4c]{position:absolute;right:30px;bottom:20px;width:150px;z-index:10}.video-mask .direction-list .direction-item[data-v-485fcf4c]{display:flex;align-items:center;justify-content:space-between}.video-mask .direction-list .direction-item img[data-v-485fcf4c]{width:42px}.video-mask img[data-v-485fcf4c]{cursor:pointer}",""]),t.exports=e},aa52:function(t,e,a){var o=a("9bd0");"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=a("499e").default;i("ba9853b8",o,!0,{sourceMap:!1,shadowMode:!1})}}]);
\ No newline at end of file
diff --git a/js/chunk-f2934902.01158827.js b/js/chunk-f2934902.f8820570.js
similarity index 100%
rename from js/chunk-f2934902.01158827.js
rename to js/chunk-f2934902.f8820570.js
diff --git a/js/chunk-vendors.14cd7611.js b/js/chunk-vendors.7fd227c6.js
similarity index 99%
rename from js/chunk-vendors.14cd7611.js
rename to js/chunk-vendors.7fd227c6.js
index 68fc3df..4a9bee8 100644
--- a/js/chunk-vendors.14cd7611.js
+++ b/js/chunk-vendors.7fd227c6.js
@@ -127,7 +127,7 @@ var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","
//! moment.js locale configuration
var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],i=e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return i}))},"52bd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
//! moment.js locale configuration
-var t=e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t}))},5319:function(e,t,n){"use strict";var i=n("d784"),a=n("825a"),r=n("7b0b"),o=n("50c4"),s=n("a691"),l=n("1d80"),c=n("8aa5"),d=n("14c3"),u=Math.max,h=Math.min,p=Math.floor,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g,b=function(e){return void 0===e?e:String(e)};i("replace",2,(function(e,t,n,i){var g=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=i.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,i){var a=l(this),r=void 0==n?void 0:n[e];return void 0!==r?r.call(n,a,i):t.call(String(a),n,i)},function(e,i){if(!g&&v||"string"===typeof i&&-1===i.indexOf(y)){var r=n(t,e,this,i);if(r.done)return r.value}var l=a(e),p=String(this),f="function"===typeof i;f||(i=String(i));var m=l.global;if(m){var _=l.unicode;l.lastIndex=0}var w=[];while(1){var k=d(l,p);if(null===k)break;if(w.push(k),!m)break;var C=String(k[0]);""===C&&(l.lastIndex=c(p,o(l.lastIndex),_))}for(var M="",S=0,O=0;O=S&&(M+=p.slice(S,L)+P,S=L+z.length)}return M+p.slice(S)}];function x(e,n,i,a,o,s){var l=i+e.length,c=a.length,d=m;return void 0!==o&&(o=r(o),d=f),t.call(s,d,(function(t,r){var s;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,i);case"'":return n.slice(l);case"<":s=o[r.slice(1,-1)];break;default:var d=+r;if(0===d)return t;if(d>c){var u=p(d/10);return 0===u?t:u<=c?void 0===a[u-1]?r.charAt(1):a[u-1]+r.charAt(1):t}s=a[d-1]}return void 0===s?"":s}))}}))},5488:function(e,t,n){"use strict";t.__esModule=!0;var i=n("5924");function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(){a(this,e)}return e.prototype.beforeEnter=function(e){(0,i.addClass)(e,"collapse-transition"),e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height="0",e.style.paddingTop=0,e.style.paddingBottom=0},e.prototype.enter=function(e){e.dataset.oldOverflow=e.style.overflow,0!==e.scrollHeight?(e.style.height=e.scrollHeight+"px",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom):(e.style.height="",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom),e.style.overflow="hidden"},e.prototype.afterEnter=function(e){(0,i.removeClass)(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow},e.prototype.beforeLeave=function(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=e.scrollHeight+"px",e.style.overflow="hidden"},e.prototype.leave=function(e){0!==e.scrollHeight&&((0,i.addClass)(e,"collapse-transition"),e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0)},e.prototype.afterLeave=function(e){(0,i.removeClass)(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},e}();t.default={name:"ElCollapseTransition",functional:!0,render:function(e,t){var n=t.children,i={on:new r};return e("transition",i,n)}}},"54eb":function(e,t,n){var i=n("8eeb"),a=n("32f4");function r(e,t){return i(e,a(e),t)}e.exports=r},5524:function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},5530:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n("a4d3"),n("4de4"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t}))},5319:function(e,t,n){"use strict";var i=n("d784"),a=n("825a"),r=n("7b0b"),o=n("50c4"),s=n("a691"),l=n("1d80"),c=n("8aa5"),d=n("14c3"),u=Math.max,h=Math.min,p=Math.floor,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g,b=function(e){return void 0===e?e:String(e)};i("replace",2,(function(e,t,n,i){var g=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=i.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,i){var a=l(this),r=void 0==n?void 0:n[e];return void 0!==r?r.call(n,a,i):t.call(String(a),n,i)},function(e,i){if(!g&&v||"string"===typeof i&&-1===i.indexOf(y)){var r=n(t,e,this,i);if(r.done)return r.value}var l=a(e),p=String(this),f="function"===typeof i;f||(i=String(i));var m=l.global;if(m){var _=l.unicode;l.lastIndex=0}var w=[];while(1){var k=d(l,p);if(null===k)break;if(w.push(k),!m)break;var C=String(k[0]);""===C&&(l.lastIndex=c(p,o(l.lastIndex),_))}for(var M="",S=0,O=0;O=S&&(M+=p.slice(S,L)+P,S=L+z.length)}return M+p.slice(S)}];function x(e,n,i,a,o,s){var l=i+e.length,c=a.length,d=m;return void 0!==o&&(o=r(o),d=f),t.call(s,d,(function(t,r){var s;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,i);case"'":return n.slice(l);case"<":s=o[r.slice(1,-1)];break;default:var d=+r;if(0===d)return t;if(d>c){var u=p(d/10);return 0===u?t:u<=c?void 0===a[u-1]?r.charAt(1):a[u-1]+r.charAt(1):t}s=a[d-1]}return void 0===s?"":s}))}}))},5488:function(e,t,n){"use strict";t.__esModule=!0;var i=n("5924");function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(){a(this,e)}return e.prototype.beforeEnter=function(e){(0,i.addClass)(e,"collapse-transition"),e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height="0",e.style.paddingTop=0,e.style.paddingBottom=0},e.prototype.enter=function(e){e.dataset.oldOverflow=e.style.overflow,0!==e.scrollHeight?(e.style.height=e.scrollHeight+"px",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom):(e.style.height="",e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom),e.style.overflow="hidden"},e.prototype.afterEnter=function(e){(0,i.removeClass)(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow},e.prototype.beforeLeave=function(e){e.dataset||(e.dataset={}),e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=e.scrollHeight+"px",e.style.overflow="hidden"},e.prototype.leave=function(e){0!==e.scrollHeight&&((0,i.addClass)(e,"collapse-transition"),e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0)},e.prototype.afterLeave=function(e){(0,i.removeClass)(e,"collapse-transition"),e.style.height="",e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom},e}();t.default={name:"ElCollapseTransition",functional:!0,render:function(e,t){var n=t.children,i={on:new r};return e("transition",i,n)}}},"54eb":function(e,t,n){var i=n("8eeb"),a=n("32f4");function r(e,t){return i(e,a(e),t)}e.exports=r},5524:function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},5530:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n("a4d3"),n("4de4"),n("4160"),n("e439"),n("dbb4"),n("b64b"),n("159b");var i=n("ade3");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t=0;(t||a)&&this.restoreModeVerticalFromInline()},handleClick:function(e){this.handleOpenChange([]),this.$emit("click",e)},handleSelect:function(e){this.$emit("select",e),this.$emit("selectChange",e.selectedKeys)},handleDeselect:function(e){this.$emit("deselect",e),this.$emit("selectChange",e.selectedKeys)},handleOpenChange:function(e){this.setOpenKeys(e),this.$emit("openChange",e),this.$emit("update:openKeys",e)},setOpenKeys:function(e){Object(f["s"])(this,"openKeys")||this.setState({sOpenKeys:e})},getRealMenuMode:function(){var e=this.getInlineCollapsed();if(this.switchingModeFromInline&&e)return"inline";var t=this.$props.mode;return e?"vertical":t},getInlineCollapsed:function(){var e=this.$props.inlineCollapsed;return void 0!==this.layoutSiderContext.sCollapsed?this.layoutSiderContext.sCollapsed:e},getMenuOpenAnimation:function(e){var t=this.$props,n=t.openAnimation,i=t.openTransitionName,a=n||i;return void 0===n&&void 0===i&&("horizontal"===e?a="slide-up":"inline"===e?a={on:y["a"]}:this.switchingModeFromInline?(a="",this.switchingModeFromInline=!1):a="zoom-big"),a}},render:function(){var e,t=this,n=arguments[0],i=this.layoutSiderContext,r=this.$slots,s=i.collapsedWidth,d=this.configProvider.getPopupContainer,u=Object(f["l"])(this),p=u.prefixCls,m=u.theme,b=u.getPopupContainer,g=this.configProvider.getPrefixCls,v=g("menu",p),y=this.getRealMenuMode(),x=this.getMenuOpenAnimation(y),_=(e={},o()(e,v+"-"+m,!0),o()(e,v+"-inline-collapsed",this.getInlineCollapsed()),e),w={props:l()({},Object(c["a"])(u,["inlineCollapsed"]),{getPopupContainer:b||d,openKeys:this.sOpenKeys,mode:y,prefixCls:v}),on:l()({},Object(f["k"])(this),{select:this.handleSelect,deselect:this.handleDeselect,openChange:this.handleOpenChange,mouseenter:this.handleMouseEnter}),nativeOn:{transitionend:this.handleTransitionEnd}};Object(f["s"])(this,"selectedKeys")||delete w.props.selectedKeys,"inline"!==y?(w.on.click=this.handleClick,w.props.openTransitionName=x):(w.on.click=function(e){t.$emit("click",e)},w.props.openAnimation=x);var k=this.getInlineCollapsed()&&(0===s||"0"===s||"0px"===s);return k&&(w.props.openKeys=[]),n(h["a"],a()([w,{class:_}]),[r["default"]])},install:function(e){e.use(z["a"]),e.component(D.name,D),e.component(D.Item.name,D.Item),e.component(D.SubMenu.name,D.SubMenu),e.component(D.Divider.name,D.Divider),e.component(D.ItemGroup.name,D.ItemGroup)}};t["a"]=D},5669:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={placeholder:"请选择时间"};t["default"]=i},5692:function(e,t,n){var i=n("c430"),a=n("c6cd");(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(e,t,n){var i=n("d066"),a=n("241c"),r=n("7418"),o=n("825a");e.exports=i("Reflect","ownKeys")||function(e){var t=a.f(o(e)),n=r.f;return n?t.concat(n(e)):t}},"576c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
//! moment.js locale configuration
@@ -245,7 +245,7 @@ var t=e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilika
//! moment.js locale configuration
function t(e,t,n,i){var a={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return i?a[n][0]:a[n][1]}var n=e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}});return n}))},ab13:function(e,t,n){var i=n("b622"),a=i("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[a]=!1,"/./"[e](t)}catch(i){}}return!1}},ab81:function(e,t){var n="\\ud800-\\udfff",i="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=i+a+r,s="\\ufe0e\\ufe0f",l="["+n+"]",c="["+o+"]",d="\\ud83c[\\udffb-\\udfff]",u="(?:"+c+"|"+d+")",h="[^"+n+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=u+"?",g="["+s+"]?",v="(?:"+m+"(?:"+[h,p,f].join("|")+")"+g+b+")*",y=g+b+v,x="(?:"+[h+c+"?",c,p,f,l].join("|")+")",_=RegExp(d+"(?="+d+")|"+x+y,"g");function w(e){var t=_.lastIndex=0;while(_.test(e))++t;return t}e.exports=w},ac1f:function(e,t,n){"use strict";var i=n("23e7"),a=n("9263");i({target:"RegExp",proto:!0,forced:/./.exec!==a},{exec:a})},ac41:function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}e.exports=n},ad6d:function(e,t,n){"use strict";var i=n("825a");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ada2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
//! moment.js locale configuration
-function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,i){var a={ss:n?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===i?n?"хвилина":"хвилину":"h"===i?n?"година":"годину":e+" "+t(a[i],+e)}function i(e,t){var n,i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?i["nominative"].slice(1,7).concat(i["nominative"].slice(0,1)):e?(n=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative",i[n][e.day()]):i["nominative"]}function a(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var r=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:i,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:a("[Сьогодні "),nextDay:a("[Завтра "),lastDay:a("[Вчора "),nextWeek:a("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return a("[Минулої] dddd [").call(this);case 1:case 2:case 4:return a("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:n,m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return r}))},adf5:function(e,t,n){e.exports={default:n("9b21"),__esModule:!0}},ae40:function(e,t,n){var i=n("83ab"),a=n("d039"),r=n("5135"),o=Object.defineProperty,s={},l=function(e){throw e};e.exports=function(e,t){if(r(s,e))return s[e];t||(t={});var n=[][e],c=!!r(t,"ACCESSORS")&&t.ACCESSORS,d=r(t,0)?t[0]:l,u=r(t,1)?t[1]:void 0;return s[e]=!!n&&!a((function(){if(c&&!i)return!0;var e={length:-1};c?o(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,d,u)}))}},ae55:function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var i=n("6042"),a=n.n(i),r=n("41b2"),o=n.n(r),s=void 0;if("undefined"!==typeof window){var l=function(e){return{media:e,matches:!1,addListener:function(){},removeListener:function(){}}};window.matchMedia||(window.matchMedia=l),s=n("8e95")}var c=["xxl","xl","lg","md","sm","xs"],d={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},u=[],h=-1,p={},f={dispatch:function(e){return p=e,!(u.length<1)&&(u.forEach((function(e){e.func(p)})),!0)},subscribe:function(e){0===u.length&&this.register();var t=(++h).toString();return u.push({token:t,func:e}),e(p),t},unsubscribe:function(e){u=u.filter((function(t){return t.token!==e})),0===u.length&&this.unregister()},unregister:function(){Object.keys(d).map((function(e){return s.unregister(d[e])}))},register:function(){var e=this;Object.keys(d).map((function(t){return s.register(d[t],{match:function(){var n=o()({},p,a()({},t,!0));e.dispatch(n)},unmatch:function(){var n=o()({},p,a()({},t,!1));e.dispatch(n)},destroy:function(){}})}))}};t["a"]=f},ae93:function(e,t,n){"use strict";var i,a,r,o=n("e163"),s=n("9112"),l=n("5135"),c=n("b622"),d=n("c430"),u=c("iterator"),h=!1,p=function(){return this};[].keys&&(r=[].keys(),"next"in r?(a=o(o(r)),a!==Object.prototype&&(i=a)):h=!0),void 0==i&&(i={}),d||l(i,u)||s(i,u,p),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:h}},b041:function(e,t,n){"use strict";var i=n("00ee"),a=n("f5df");e.exports=i?{}.toString:function(){return"[object "+a(this)+"]"}},b047:function(e,t,n){var i=n("1a8c"),a=n("408c"),r=n("b4b0"),o="Expected a function",s=Math.max,l=Math.min;function c(e,t,n){var c,d,u,h,p,f,m=0,b=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError(o);function y(t){var n=c,i=d;return c=d=void 0,m=t,h=e.apply(i,n),h}function x(e){return m=e,p=setTimeout(k,t),b?y(e):h}function _(e){var n=e-f,i=e-m,a=t-n;return g?l(a,u-i):a}function w(e){var n=e-f,i=e-m;return void 0===f||n>=t||n<0||g&&i>=u}function k(){var e=a();if(w(e))return C(e);p=setTimeout(k,_(e))}function C(e){return p=void 0,v&&c?y(e):(c=d=void 0,h)}function M(){void 0!==p&&clearTimeout(p),m=0,c=f=d=p=void 0}function S(){return void 0===p?h:C(a())}function O(){var e=a(),n=w(e);if(c=arguments,d=this,f=e,n){if(void 0===p)return x(f);if(g)return clearTimeout(p),p=setTimeout(k,t),y(f)}return void 0===p&&(p=setTimeout(k,t)),h}return t=r(t)||0,i(n)&&(b=!!n.leading,g="maxWait"in n,u=g?s(r(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),O.cancel=M,O.flush=S,O}e.exports=c},b047f:function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},b0a8:function(e,t){var n=9007199254740991,i=Math.floor;function a(e,t){var a="";if(!e||t<1||t>n)return a;do{t%2&&(a+=e),t=i(t/2),t&&(e+=e)}while(t);return a}e.exports=a},b0c0:function(e,t,n){var i=n("83ab"),a=n("9bf2").f,r=Function.prototype,o=r.toString,s=/^\s*function ([^ (]*)/,l="name";i&&!(l in r)&&a(r,l,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(e){return""}}})},b1b3:function(e,t,n){var i=n("77e9"),a=n("23dd");e.exports=n("5524").getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return i(t.call(e))}},b1e0:function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return x}));var i=n("92fa"),a=n.n(i),r=n("6042"),o=n.n(r),s=n("8e8e"),l=n.n(s),c=n("b047"),d=n.n(c),u=n("4d91"),h=n("b488"),p=n("daa3"),f=n("7b05"),m=n("4df5"),b=u["a"].oneOf(["small","default","large"]),g=function(){return{prefixCls:u["a"].string,spinning:u["a"].bool,size:b,wrapperClassName:u["a"].string,tip:u["a"].string,delay:u["a"].number,indicator:u["a"].any}},v=void 0;function y(e,t){return!!e&&!!t&&!isNaN(Number(t))}function x(e){v="function"===typeof e.indicator?e.indicator:function(t){return t(e.indicator)}}t["b"]={name:"ASpin",mixins:[h["a"]],props:Object(p["t"])(g(),{size:"default",spinning:!0,wrapperClassName:""}),inject:{configProvider:{default:function(){return m["a"]}}},data:function(){var e=this.spinning,t=this.delay,n=y(e,t);return this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props),{sSpinning:e&&!n}},mounted:function(){this.updateSpinning()},updated:function(){var e=this;this.$nextTick((function(){e.debouncifyUpdateSpinning(),e.updateSpinning()}))},beforeDestroy:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var t=e||this.$props,n=t.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=d()(this.originalUpdateSpinning,n))},updateSpinning:function(){var e=this.spinning,t=this.sSpinning;t!==e&&this.setState({sSpinning:e})},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},getChildren:function(){return this.$slots&&this.$slots["default"]?Object(p["c"])(this.$slots["default"]):null},renderIndicator:function(e,t){var n=t+"-dot",i=Object(p["g"])(this,"indicator");return null===i?null:(Array.isArray(i)&&(i=Object(p["c"])(i),i=1===i.length?i[0]:i),Object(p["w"])(i)?Object(f["a"])(i,{class:n}):v&&Object(p["w"])(v(e))?Object(f["a"])(v(e),{class:n}):e("span",{class:n+" "+t+"-dot-spin"},[e("i",{class:t+"-dot-item"}),e("i",{class:t+"-dot-item"}),e("i",{class:t+"-dot-item"}),e("i",{class:t+"-dot-item"})]))}},render:function(e){var t,n=this.$props,i=n.size,r=n.prefixCls,s=n.tip,c=n.wrapperClassName,d=l()(n,["size","prefixCls","tip","wrapperClassName"]),u=this.configProvider.getPrefixCls,h=u("spin",r),f=this.sSpinning,m=(t={},o()(t,h,!0),o()(t,h+"-sm","small"===i),o()(t,h+"-lg","large"===i),o()(t,h+"-spinning",f),o()(t,h+"-show-text",!!s),t),b=e("div",a()([d,{class:m}]),[this.renderIndicator(e,h),s?e("div",{class:h+"-text"},[s]):null]),g=this.getChildren();if(g){var v,y=(v={},o()(v,h+"-container",!0),o()(v,h+"-blur",f),v);return e("div",a()([{on:Object(p["k"])(this)},{class:[h+"-nested-loading",c]}]),[f&&e("div",{key:"loading"},[b]),e("div",{class:y,key:"container"},[g])])}return b}}},b1e5:function(e,t,n){var i=n("a994"),a=1,r=Object.prototype,o=r.hasOwnProperty;function s(e,t,n,r,s,l){var c=n&a,d=i(e),u=d.length,h=i(t),p=h.length;if(u!=p&&!c)return!1;var f=u;while(f--){var m=d[f];if(!(c?m in t:o.call(t,m)))return!1}var b=l.get(e),g=l.get(t);if(b&&g)return b==t&&g==e;var v=!0;l.set(e,t),l.set(t,e);var y=c;while(++f-1&&e%1==0&&e<=n}e.exports=i},b24f:function(e,t,n){"use strict";t.__esModule=!0;var i=n("93ff"),a=s(i),r=n("1727"),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}t.default=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,l=(0,o.default)(e);!(i=(s=l.next()).done);i=!0)if(n.push(s.value),t&&n.length===t)break}catch(c){a=!0,r=c}finally{try{!i&&l["return"]&&l["return"]()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,a.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},b29d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
+function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,i){var a={ss:n?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===i?n?"хвилина":"хвилину":"h"===i?n?"година":"годину":e+" "+t(a[i],+e)}function i(e,t){var n,i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?i["nominative"].slice(1,7).concat(i["nominative"].slice(0,1)):e?(n=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative",i[n][e.day()]):i["nominative"]}function a(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var r=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:i,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:a("[Сьогодні "),nextDay:a("[Завтра "),lastDay:a("[Вчора "),nextWeek:a("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return a("[Минулої] dddd [").call(this);case 1:case 2:case 4:return a("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:n,m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return r}))},ade3:function(e,t,n){"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return i}))},adf5:function(e,t,n){e.exports={default:n("9b21"),__esModule:!0}},ae40:function(e,t,n){var i=n("83ab"),a=n("d039"),r=n("5135"),o=Object.defineProperty,s={},l=function(e){throw e};e.exports=function(e,t){if(r(s,e))return s[e];t||(t={});var n=[][e],c=!!r(t,"ACCESSORS")&&t.ACCESSORS,d=r(t,0)?t[0]:l,u=r(t,1)?t[1]:void 0;return s[e]=!!n&&!a((function(){if(c&&!i)return!0;var e={length:-1};c?o(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,d,u)}))}},ae55:function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var i=n("6042"),a=n.n(i),r=n("41b2"),o=n.n(r),s=void 0;if("undefined"!==typeof window){var l=function(e){return{media:e,matches:!1,addListener:function(){},removeListener:function(){}}};window.matchMedia||(window.matchMedia=l),s=n("8e95")}var c=["xxl","xl","lg","md","sm","xs"],d={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},u=[],h=-1,p={},f={dispatch:function(e){return p=e,!(u.length<1)&&(u.forEach((function(e){e.func(p)})),!0)},subscribe:function(e){0===u.length&&this.register();var t=(++h).toString();return u.push({token:t,func:e}),e(p),t},unsubscribe:function(e){u=u.filter((function(t){return t.token!==e})),0===u.length&&this.unregister()},unregister:function(){Object.keys(d).map((function(e){return s.unregister(d[e])}))},register:function(){var e=this;Object.keys(d).map((function(t){return s.register(d[t],{match:function(){var n=o()({},p,a()({},t,!0));e.dispatch(n)},unmatch:function(){var n=o()({},p,a()({},t,!1));e.dispatch(n)},destroy:function(){}})}))}};t["a"]=f},ae93:function(e,t,n){"use strict";var i,a,r,o=n("e163"),s=n("9112"),l=n("5135"),c=n("b622"),d=n("c430"),u=c("iterator"),h=!1,p=function(){return this};[].keys&&(r=[].keys(),"next"in r?(a=o(o(r)),a!==Object.prototype&&(i=a)):h=!0),void 0==i&&(i={}),d||l(i,u)||s(i,u,p),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:h}},b041:function(e,t,n){"use strict";var i=n("00ee"),a=n("f5df");e.exports=i?{}.toString:function(){return"[object "+a(this)+"]"}},b047:function(e,t,n){var i=n("1a8c"),a=n("408c"),r=n("b4b0"),o="Expected a function",s=Math.max,l=Math.min;function c(e,t,n){var c,d,u,h,p,f,m=0,b=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError(o);function y(t){var n=c,i=d;return c=d=void 0,m=t,h=e.apply(i,n),h}function x(e){return m=e,p=setTimeout(k,t),b?y(e):h}function _(e){var n=e-f,i=e-m,a=t-n;return g?l(a,u-i):a}function w(e){var n=e-f,i=e-m;return void 0===f||n>=t||n<0||g&&i>=u}function k(){var e=a();if(w(e))return C(e);p=setTimeout(k,_(e))}function C(e){return p=void 0,v&&c?y(e):(c=d=void 0,h)}function M(){void 0!==p&&clearTimeout(p),m=0,c=f=d=p=void 0}function S(){return void 0===p?h:C(a())}function O(){var e=a(),n=w(e);if(c=arguments,d=this,f=e,n){if(void 0===p)return x(f);if(g)return clearTimeout(p),p=setTimeout(k,t),y(f)}return void 0===p&&(p=setTimeout(k,t)),h}return t=r(t)||0,i(n)&&(b=!!n.leading,g="maxWait"in n,u=g?s(r(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),O.cancel=M,O.flush=S,O}e.exports=c},b047f:function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},b0a8:function(e,t){var n=9007199254740991,i=Math.floor;function a(e,t){var a="";if(!e||t<1||t>n)return a;do{t%2&&(a+=e),t=i(t/2),t&&(e+=e)}while(t);return a}e.exports=a},b0c0:function(e,t,n){var i=n("83ab"),a=n("9bf2").f,r=Function.prototype,o=r.toString,s=/^\s*function ([^ (]*)/,l="name";i&&!(l in r)&&a(r,l,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(e){return""}}})},b1b3:function(e,t,n){var i=n("77e9"),a=n("23dd");e.exports=n("5524").getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return i(t.call(e))}},b1e0:function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return x}));var i=n("92fa"),a=n.n(i),r=n("6042"),o=n.n(r),s=n("8e8e"),l=n.n(s),c=n("b047"),d=n.n(c),u=n("4d91"),h=n("b488"),p=n("daa3"),f=n("7b05"),m=n("4df5"),b=u["a"].oneOf(["small","default","large"]),g=function(){return{prefixCls:u["a"].string,spinning:u["a"].bool,size:b,wrapperClassName:u["a"].string,tip:u["a"].string,delay:u["a"].number,indicator:u["a"].any}},v=void 0;function y(e,t){return!!e&&!!t&&!isNaN(Number(t))}function x(e){v="function"===typeof e.indicator?e.indicator:function(t){return t(e.indicator)}}t["b"]={name:"ASpin",mixins:[h["a"]],props:Object(p["t"])(g(),{size:"default",spinning:!0,wrapperClassName:""}),inject:{configProvider:{default:function(){return m["a"]}}},data:function(){var e=this.spinning,t=this.delay,n=y(e,t);return this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props),{sSpinning:e&&!n}},mounted:function(){this.updateSpinning()},updated:function(){var e=this;this.$nextTick((function(){e.debouncifyUpdateSpinning(),e.updateSpinning()}))},beforeDestroy:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var t=e||this.$props,n=t.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=d()(this.originalUpdateSpinning,n))},updateSpinning:function(){var e=this.spinning,t=this.sSpinning;t!==e&&this.setState({sSpinning:e})},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},getChildren:function(){return this.$slots&&this.$slots["default"]?Object(p["c"])(this.$slots["default"]):null},renderIndicator:function(e,t){var n=t+"-dot",i=Object(p["g"])(this,"indicator");return null===i?null:(Array.isArray(i)&&(i=Object(p["c"])(i),i=1===i.length?i[0]:i),Object(p["w"])(i)?Object(f["a"])(i,{class:n}):v&&Object(p["w"])(v(e))?Object(f["a"])(v(e),{class:n}):e("span",{class:n+" "+t+"-dot-spin"},[e("i",{class:t+"-dot-item"}),e("i",{class:t+"-dot-item"}),e("i",{class:t+"-dot-item"}),e("i",{class:t+"-dot-item"})]))}},render:function(e){var t,n=this.$props,i=n.size,r=n.prefixCls,s=n.tip,c=n.wrapperClassName,d=l()(n,["size","prefixCls","tip","wrapperClassName"]),u=this.configProvider.getPrefixCls,h=u("spin",r),f=this.sSpinning,m=(t={},o()(t,h,!0),o()(t,h+"-sm","small"===i),o()(t,h+"-lg","large"===i),o()(t,h+"-spinning",f),o()(t,h+"-show-text",!!s),t),b=e("div",a()([d,{class:m}]),[this.renderIndicator(e,h),s?e("div",{class:h+"-text"},[s]):null]),g=this.getChildren();if(g){var v,y=(v={},o()(v,h+"-container",!0),o()(v,h+"-blur",f),v);return e("div",a()([{on:Object(p["k"])(this)},{class:[h+"-nested-loading",c]}]),[f&&e("div",{key:"loading"},[b]),e("div",{class:y,key:"container"},[g])])}return b}}},b1e5:function(e,t,n){var i=n("a994"),a=1,r=Object.prototype,o=r.hasOwnProperty;function s(e,t,n,r,s,l){var c=n&a,d=i(e),u=d.length,h=i(t),p=h.length;if(u!=p&&!c)return!1;var f=u;while(f--){var m=d[f];if(!(c?m in t:o.call(t,m)))return!1}var b=l.get(e),g=l.get(t);if(b&&g)return b==t&&g==e;var v=!0;l.set(e,t),l.set(t,e);var y=c;while(++f-1&&e%1==0&&e<=n}e.exports=i},b24f:function(e,t,n){"use strict";t.__esModule=!0;var i=n("93ff"),a=s(i),r=n("1727"),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}t.default=function(){function e(e,t){var n=[],i=!0,a=!1,r=void 0;try{for(var s,l=(0,o.default)(e);!(i=(s=l.next()).done);i=!0)if(n.push(s.value),t&&n.length===t)break}catch(c){a=!0,r=c}finally{try{!i&&l["return"]&&l["return"]()}finally{if(a)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,a.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},b29d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
//! moment.js locale configuration
var t=e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});return t}))},b367:function(e,t,n){var i=n("5524"),a=n("ef08"),r="__core-js_shared__",o=a[r]||(a[r]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("e444")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},b3eb:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
//! moment.js locale configuration
diff --git a/video_play_plugins/videojs-contrib-hls.min.js b/video_play_plugins/videojs-contrib-hls.min.js
index feeaefb..deb44e3 100644
--- a/video_play_plugins/videojs-contrib-hls.min.js
+++ b/video_play_plugins/videojs-contrib-hls.min.js
@@ -1,8 +1,8 @@
-!function e(t,i,n){function r(s,o){if(!i[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var l=i[s]={exports:{}};t[s][0].call(l.exports,function(e){var i=t[s][1][e];return r(i||e)},l,l.exports,e,t,i,n)}return i[s].exports}for(var a="function"==typeof require&&require,s=0;s=r.adStartTime&&t<=r.adEndTime)return r}return null},o=function(e,t){var i=arguments.length<=2||arguments[2]===undefined?0:arguments[2];if(e.segments)for(var r=i,o=undefined,u=0;u=32&&e<126?String.fromCharCode(e):"."},s=function(e){var t={};return Object.keys(e).forEach(function(i){var n=e[i];ArrayBuffer.isView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n}),t},o=function(e){var t=e.byterange||{length:Infinity,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},u={hexDump:function(e){for(var t=Array.prototype.slice.call(e),i="",n=undefined,s=undefined,o=0;o1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var t=e.selectPlaylist(),i=e.masterPlaylistLoader_.media(),n=e.tech_.buffered(),r=n.length?n.end(n.length-1)-e.tech_.currentTime():0,a=e.bufferLowWaterLine();(!i.endList||e.duration()=a)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){e.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(t){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})}),this.audioSegmentLoader_.on("ended",function(){e.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"fastQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_()&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===Infinity&&this.tech_.currentTime()e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=_["default"].createTimeRanges([[t.start(0)>e.start(0)?t.start(0):e.start(0),t.end(0)0&&(i=Math.max(i,n.end(n.length-1))),t!==i&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",r):r())}},{key:"dispose",value:function(){var e=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(t){var i=e.mediaTypes_[t].groups;for(var n in i)i[n].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e=this.masterPlaylistLoader_.media(),t=undefined;if(e&&"open"===this.mediaSource.readyState){if(t=q(this.masterPlaylistLoader_.master,e),t.length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.mainSegmentLoader_.mimeType(t[0]),t[1]&&this.audioSegmentLoader_.mimeType(t[1]),this.excludeIncompatibleVariants_(e)}}},{key:"excludeIncompatibleVariants_",value:function(e){var t=this.masterPlaylistLoader_.master,i=2,n=null,r=undefined;e.attributes.CODECS&&(r=(0,I.parseCodecs)(e.attributes.CODECS),n=r.videoCodec,i=r.codecCount),t.playlists.forEach(function(e){var t={codecCount:2,videoCodec:null};if(e.attributes.CODECS){var r=e.attributes.CODECS;t=(0,I.parseCodecs)(r),window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+B(r)+'"')&&(e.excludeUntil=Infinity)}t.codecCount!==i&&(e.excludeUntil=Infinity),t.videoCodec!==n&&(e.excludeUntil=Infinity)})}},{key:"updateAdCues_",value:function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),b["default"].updateAdCues(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=P["default"].GOAL_BUFFER_LENGTH,i=P["default"].GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,P["default"].MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=P["default"].BUFFER_LOW_WATER_LINE,i=P["default"].BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,P["default"].MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,n)}}]),t}(_["default"].EventTarget);i.MasterPlaylistController=G}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,i){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(i,"__esModule",{value:!0});var r="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,a=n(r),s=e(9),o=n(s),u=function(){},d=function(e){var t=e["default"]?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},l=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)};i.stopLoaders=l;var f=function(e,t){t.activePlaylistLoader=e,e.load()};i.startLoaders=f;var c=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;if(l(n,a),o){if(!o.playlistLoader)return void(u&&r.resetEverything());n.resyncLoader(),f(o.playlistLoader,a)}}};i.onGroupChanged=c;var h=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;if(l(n,a),o){if(!o.playlistLoader)return void r.resetEverything();if(u===o.playlistLoader)return void f(o.playlistLoader,a);n.track&&n.track(s),n.resetEverything(),f(o.playlistLoader,a)}}};i.onTrackChanged=h;var p={AUDIO:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;l(i,n);var s=n.activeTrack(),o=n.activeGroup(),u=(o.filter(function(e){return e["default"]})[0]||o[0]).id,d=n.tracks[u];if(s===d)return void r({message:"Problem encountered loading the default audio track."});a["default"].log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var f in n.tracks)n.tracks[f].enabled=n.tracks[f]===d;n.onTrackChanged()}},SUBTITLES:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e];a["default"].log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),l(i,n);var r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}};i.onError=p;var m={AUDIO:function(e,t,i){if(t){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",p[e](e,i))}},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",p[e](e,i))}};i.setupListeners=m;var g={AUDIO:function(e,t){var i=t.mode,n=t.hls,r=t.segmentLoaders[e],s=t.requestOptions,u=t.master.mediaGroups,l=t.mediaTypes[e],f=l.groups,c=l.tracks;u[e]&&0!==Object.keys(u[e]).length&&"html5"===i||(u[e]={main:{"default":{"default":!0}}});for(var h in u[e]){f[h]||(f[h]=[]);for(var g in u[e][h]){var y=u[e][h][g],_=undefined;if(_=y.resolvedUri?new o["default"](y.resolvedUri,n,s):null,y=a["default"].mergeOptions({id:g,playlistLoader:_},y),m[e](e,y.playlistLoader,t),f[h].push(y),"undefined"==typeof c[g]){var v=new a["default"].AudioTrack({id:g,kind:d(y),enabled:!1,language:y.language,"default":y["default"],label:g});c[g]=v}}}r.on("error",p[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,n=t.hls,r=t.segmentLoaders[e],s=t.requestOptions,u=t.master.mediaGroups,d=t.mediaTypes[e],l=d.groups,f=d.tracks;for(var c in u[e]){l[c]||(l[c]=[]);for(var h in u[e][c])if(!u[e][c][h].forced){var g=u[e][c][h];if(g=a["default"].mergeOptions({id:h,playlistLoader:new o["default"](g.resolvedUri,n,s)},g),m[e](e,g.playlistLoader,t),l[c].push(g),"undefined"==typeof f[h]){var y=i.addRemoteTextTrack({id:h,kind:"subtitles",enabled:!1,language:g.language,label:h},!1).track;f[h]=y}}}r.on("error",p[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],s=r.groups,o=r.tracks;for(var u in n[e]){s[u]||(s[u]=[]);for(var d in n[e][u]){var l=n[e][u][d];if(l.instreamId.match(/CC\d/)&&(s[u].push(a["default"].mergeOptions({id:d},l)),"undefined"==typeof o[d])){var f=i.addRemoteTextTrack({id:l.instreamId,kind:"captions",enabled:!1,language:l.language,label:d},!1).track;o[d]=f}}}}};i.initialize=g;var y=function(e,t){return function(i){var n=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,a=n.media();if(!a)return null;var s=null;return a.attributes[e]&&(s=r[a.attributes[e]]),s=s||r.main,void 0===i?s:null===i?null:s.filter(function(e){return e.id===i.id})[0]||null}};i.activeGroup=y;var _={AUDIO:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if(i[n].enabled)return i[n];return null}},SUBTITLES:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if("showing"===i[n].mode)return i[n];return null}}};i.activeTrack=_;var v=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){g[t](t,e)});var t=e.mediaTypes,i=e.masterPlaylistLoader,n=e.tech,r=e.hls;["AUDIO","SUBTITLES"].forEach(function(i){t[i].activeGroup=y(i,e),t[i].activeTrack=_[i](i,e),t[i].onGroupChanged=c(i,e),t[i].onTrackChanged=h(i,e)});var a=t.AUDIO.activeGroup(),s=(a.filter(function(e){return e["default"]})[0]||a[0]).id;t.AUDIO.tracks[s].enabled=!0,t.AUDIO.onTrackChanged(),i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return t[e].onGroupChanged()})});var o=function(){t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})};n.audioTracks().addEventListener("change",o),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){n.audioTracks().removeEventListener("change",o),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(var u in t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[u])};i.setupMediaGroups=v;var b=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:u,activeTrack:u,onGroupChanged:u,onTrackChanged:u}}),e};i.createMediaTypes=b}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(e,t,i){(function(t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,r=function(e){return e&&e.__esModule?e:{"default":e}}(n),a=e(2),s={FAILURE:2,TIMEOUT:-101,ABORTED:-102};i.REQUEST_ERRORS=s;var o=function(e){var t=(undefined,undefined);return t=e.offset+e.length-1,"bytes="+e.offset+"-"+t},u=function(e){var t={};return e.byterange&&(t.Range=o(e.byterange)),t},d=function(e){e.forEach(function(e){e.abort()})},l=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}},f=function(e){var t=e.target,i=Date.now()-t.requestTime,n={bandwidth:Infinity,bytesReceived:0,roundTripTime:i||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},c=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:s.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:s.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:s.FAILURE,xhr:t}:null},h=function(e,t){return function(i,n){var r=n.response,a=c(i,n);if(a)return t(a,e);if(16!==r.byteLength)return t({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:s.FAILURE,xhr:n},e);var o=new DataView(r);return e.key.bytes=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),t(null,e)}},p=function(e,t){return function(i,n){var r=n.response,a=c(i,n);return a?t(a,e):0===r.byteLength?t({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:s.FAILURE,xhr:n},e):(e.map.bytes=new Uint8Array(n.response),t(null,e))}},m=function(e,t){return function(i,n){var r=n.response,a=c(i,n);return a?t(a,e):0===r.byteLength?t({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:s.FAILURE,xhr:n},e):(e.stats=l(n),e.key?e.encryptedBytes=new Uint8Array(n.response):e.bytes=new Uint8Array(n.response),t(null,e))}},g=function(e,t,i){var n=function r(n){if(n.data.source===t.requestId){e.removeEventListener("message",r);var a=n.data.decrypted;return t.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength),i(null,t)}};e.addEventListener("message",n),e.postMessage((0,a.createTransferableMessage)({source:t.requestId,encrypted:t.encryptedBytes,key:t.key.bytes,iv:t.key.iv}),[t.encryptedBytes.buffer,t.key.bytes.buffer])},y=function(e){return e.reduce(function(e,t){return t.code>e.code?t:e})},_=function(e,t,i){var n=[],r=0;return function(a,s){if(a&&(d(e),n.push(a)),(r+=1)===e.length){if(s.endOfAllRequests=Date.now(),n.length>0){var o=y(n);return i(o,s)}return s.encryptedBytes?g(t,s,i):i(null,s)}}},v=function(e,t){return function(i){return e.stats=r["default"].mergeOptions(e.stats,f(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)}},b=function(e,t,i,n,a,s){var o=[],l=_(o,i,s);if(n.key){var f=r["default"].mergeOptions(t,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),c=h(n,l),g=e(f,c);o.push(g)}if(n.map&&!n.map.bytes){var y=r["default"].mergeOptions(t,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:u(n.map)}),b=p(n,l),T=e(y,b);o.push(T)}var S=r["default"].mergeOptions(t,{uri:n.resolvedUri,responseType:"arraybuffer",headers:u(n)}),w=m(n,l),k=e(S,w);return k.addEventListener("progress",v(n,a)),o.push(k),function(){return d(o)}};i.mediaSegmentRequest=b}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,t,i){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
- Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i")),this.logger_("initialize");var n=function(){return i.monitorCurrentTime_()},r=function(){return i.techWaiting_()},s=function(){return i.cancelTimer_()},o=function(){return i.fixesBadSeeks_()};this.tech_.on("seekablechanged",o),this.tech_.on("waiting",r),this.tech_.on(h,s),this.tech_.on("canplay",n),this.dispose=function(){i.logger_("dispose"),i.tech_.off("seekablechanged",o),i.tech_.off("waiting",r),i.tech_.off(h,s),i.tech_.off("canplay",n),i.checkCurrentTimeTimeout_&&u["default"].clearTimeout(i.checkCurrentTimeTimeout_),i.cancelTimer_()}}return s(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&u["default"].clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=u["default"].setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+l["default"].SAFE_TIME_DELTA>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var e=this.tech_.seeking(),t=this.seekable(),i=this.tech_.currentTime(),n=undefined;if(e&&this.afterSeekableWindow_(t,i)){n=t.end(t.length-1)}if(e&&this.beforeSeekableWindow_(t,i)){n=t.start(0)+l["default"].SAFE_TIME_DELTA}return void 0!==n&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+l["default"].printableRange(t)+". Seeking to "+n+"."),this.tech_.setCurrentTime(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=l["default"].findRange(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),r=l["default"].findNextRange(n,t);if(this.videoUnderflow_(r,n,t))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(r.length>0){var a=r.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+r.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t){return!!e.length&&t>e.end(e.length-1)+l["default"].SAFE_TIME_DELTA}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t2)return{start:r,end:a}}return null}},{key:"logger_",value:function(){}}]),e}();i["default"]=p,t.exports=i["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(e,t,i){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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)}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){var i=this;this.request=null,this.state="HAVE_METADATA";var n=new c["default"].Parser;n.push(e.responseText),n.end(),n.manifest.uri=t,n.manifest.attributes=n.manifest.attributes||{};var r=y(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,r?(this.master=r,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(p["default"].clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=p["default"].setTimeout(function(){i.trigger("mediaupdatetimeout")},b(this.media(),!!r))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),p["default"].clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var n=!this.media_||e.uri!==this.media_.uri;if(this.master.playlists[e.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(n){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(n,r){if(t.request){if(e.resolvedUri=t.resolveManifestRedirect(e.resolvedUri,r),n)return t.playlistRequestError(t.request,e.uri,i);t.haveMetadata(r,e.uri),"HAVE_MASTER"===i?t.trigger("loadedmetadata"):t.trigger("mediachange")}})}}},{key:"resolveManifestRedirect",value:function(e,t){return this.handleManifestRedirects&&t.responseURL&&e!==t.responseURL?t.responseURL:e}},{key:"pause",value:function(){this.stopRequest(),p["default"].clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var t=this;p["default"].clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=p["default"].setTimeout(function(){return t.load()},n))}if(!this.started)return void this.start();i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}},{key:"start",value:function(){var e=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,i){if(e.request){if(e.request=null,t)return e.error={status:i.status,message:"HLS playlist request error at URL: "+e.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");var n=new c["default"].Parser;return n.push(i.responseText),(n.end(),e.state="HAVE_MASTER",e.srcUrl=e.resolveManifestRedirect(e.srcUrl,i),n.manifest.uri=e.srcUrl,n.manifest.playlists)?(e.master=n.manifest,_(e.master),v(e.master),e.trigger("loadedplaylist"),void(e.request||e.media(n.manifest.playlists[0]))):(e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:p["default"].location.href,playlists:[{uri:e.srcUrl,resolvedUri:e.srcUrl,attributes:{}}]},e.master.playlists[e.srcUrl]=e.master.playlists[0],e.haveMetadata(i,e.srcUrl),e.trigger("loadedmetadata"))}})}}]),t}(l.EventTarget);i["default"]=T}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],10:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e(3),a=n(r),s=e(11),o=n(s),u=e(19),d=function(e,t){var i=undefined;return e?(i=window.getComputedStyle(e),i?i[t]:""):""},l=function(e,t){var i=e.slice();e.sort(function(e,n){var r=t(e,n);return 0===r?i.indexOf(e)-i.indexOf(n):r})},f=function(e,t){var i=undefined,n=undefined;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||window.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||window.Number.MAX_VALUE,i-n};i.comparePlaylistBandwidth=f;var c=function(e,t){var i=undefined,n=undefined;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||window.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||window.Number.MAX_VALUE,i===n&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n};i.comparePlaylistResolution=c;var h=function(e,t,i,n){var r=e.playlists.map(function(e){var t=undefined,i=undefined,n=undefined;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,n=e.attributes.BANDWIDTH,n=n||window.Number.MAX_VALUE,{bandwidth:n,width:t,height:i,playlist:e}});l(r,function(e,t){return e.bandwidth-t.bandwidth}),r=r.filter(function(e){return!o["default"].isIncompatible(e.playlist)});var s=r.filter(function(e){return o["default"].isEnabled(e.playlist)});s.length||(s=r.filter(function(e){return!o["default"].isDisabled(e.playlist)}));var u=s.filter(function(e){return e.bandwidth*a["default"].BANDWIDTH_VARIANCEi||e.height>n}),g=m.filter(function(e){return e.width===m[0].width&&e.height===m[0].height}),d=g[g.length-1],y=g.filter(function(e){return e.bandwidth===d.bandwidth})[0]);var _=y||p||f||s[0]||r[0];return _?_.playlist:null};i.simpleSelector=h;var p=function(){return h(this.playlists.master,this.systemBandwidth,parseInt(d(this.tech_.el(),"width"),10),parseInt(d(this.tech_.el(),"height"),10))};i.lastBandwidthSelector=p;var m=function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,h(this.playlists.master,t,parseInt(d(this.tech_.el(),"width"),10),parseInt(d(this.tech_.el(),"height"),10))}};i.movingAverageBandwidthSelector=m;var g=function(e){var t=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,u=e.currentTimeline,d=e.syncController,c=t.playlists.filter(function(e){return!o["default"].isIncompatible(e)}),h=c.filter(o["default"].isEnabled);h.length||(h=c.filter(function(e){return!o["default"].isDisabled(e)}));var p=h.filter(o["default"].hasAttribute.bind(null,"BANDWIDTH")),m=p.map(function(e){var t=d.getSyncPoint(e,r,u,i),l=t?1:2;return{playlist:e,rebufferingImpact:o["default"].estimateSegmentRequestTime(a,n,e)*l-s}}),g=m.filter(function(e){return e.rebufferingImpact<=0});return l(g,function(e,t){return f(t.playlist,e.playlist)}),g.length?g[0]:(l(m,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),m[0]||null)};i.minRebufferMaxBandwidthSelector=g;var y=function(){var e=this.playlists.master.playlists.filter(o["default"].isEnabled);return l(e,function(e,t){return f(e,t)}),e.filter(function(e){return(0,u.parseCodecs)(e.attributes.CODECS).videoCodec})[0]||null};i.lowestBitrateCompatibleVariantSelector=y},{}],11:[function(e,t,i){(function(t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,r=e(32),a=function(e){return e&&e.__esModule?e:{"default":e}}(r),s=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if("undefined"!=typeof r.start)return{result:r.start,precise:!0};if("undefined"!=typeof r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(r=e.segments[n],"undefined"!=typeof r.end)return{result:i+r.end,precise:!0};if(i+=r.duration,"undefined"!=typeof r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}},o=function(e,t){for(var i=0,n=undefined,r=t-e.mediaSequence;ri){var r=[i,t];t=r[0],i=r[1]}if(t<0){for(var a=t;a=n););return Math.max(0,t)};i.safeLiveIndex=f;var c=function(e,t,i){if(!e||!e.segments)return null;if(e.endList)return d(e);if(null===t)return null;t=t||0;var n=i?f(e):e.segments.length;return u(e,e.mediaSequence+n,t)};i.playlistEnd=c;var h=function(e,t){var i=t||0,r=c(e,t,!0);return null===r?(0,n.createTimeRange)():(0,n.createTimeRange)(i,r)};i.seekable=h;var p=function(e){return e-Math.floor(e)==0},m=function(e,t){if(p(t))return t+.1*e;for(var i=t.toString().split(".")[1].length,n=1;n<=i;n++){var r=Math.pow(10,n),a=t*r;if(p(a)||n===i)return(a+e)/r}},g=m.bind(null,1),y=m.bind(null,-1),_=function(e,t,i,n){var r=undefined,a=undefined,s=e.segments.length,o=t-n;if(o<0){if(i>0)for(r=i-1;r>=0;r--)if(a=e.segments[r],(o+=y(a.duration))>0)return{mediaIndex:r,startTime:n-l(e,i,r)};return{mediaIndex:0,startTime:t}}if(i<0){for(r=i;r<0;r++)if((o-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(r=i;rDate.now()};i.isBlacklisted=v;var b=function(e){return e.excludeUntil&&e.excludeUntil===Infinity};i.isIncompatible=b;var T=function(e){var t=v(e);return!e.disabled&&!t};i.isEnabled=T;var S=function(e){return e.disabled};i.isDisabled=S;var w=function(e){for(var t=0;t=t})},d=function(e,t){return o(e,function(e){return e-1/30>=t})},l=function(e){if(e.length<2)return a["default"].createTimeRanges();for(var t=[],i=1;i=r};if(e)for(i=0;i "+e.end(i));return t.join(", ")},g=function(e,t){var i=arguments.length<=2||arguments[2]===undefined?1:arguments[2];return((e.length?e.end(e.length-1):0)-t)/i};i["default"]={findRange:u,findNextRange:d,findGaps:l,findSoleUncommonTimeRangesEnd:f,getSegmentBufferedPercent:p,TIME_FUDGE_FACTOR:1/30,SAFE_TIME_DELTA:.1,printableRange:m,timeUntilRebuffer:g},t.exports=i["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(e,t,i){(function(e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null,r=function(e){return e&&e.__esModule?e:{"default":e}}(n),a={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},s=function u(e,t){var i=0,n=0,s=r["default"].mergeOptions(a,t);e.ready(function(){e.trigger({type:"usage",name:"hls-error-reload-initialized"})});var o=function(){n&&e.currentTime(n)},d=function(t){null!==t&&t!==undefined&&(n=e.duration()!==Infinity&&e.currentTime()||0,e.one("loadedmetadata",o),e.src(t),e.trigger({type:"usage",name:"hls-error-reload"}),e.play())},l=function(){return Date.now()-i<1e3*s.errorInterval?void e.trigger({type:"usage",name:"hls-error-reload-canceled"}):s.getSource&&"function"==typeof s.getSource?(i=Date.now(),s.getSource.call(e,d)):void r["default"].log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},f=function h(){e.off("loadedmetadata",o),e.off("error",l),e.off("dispose",h)},c=function(t){f(),u(e,t)};e.on("error",l),e.on("dispose",f),e.reloadSourceOnError=c},o=function(e){s(this,e)};i["default"]=o,t.exports=i["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var r=e(11),a=function(e,t,i){return function(n){var a=e.master.playlists[t],s=(0,r.isIncompatible)(a),o=(0,r.isEnabled)(a);return void 0===n?o:(n?delete a.disabled:a.disabled=!0,n===o||s||(i(),n?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),n)}},s=function u(e,t,i){n(this,u);var r=e.masterPlaylistController_.fastQualityChange_.bind(e.masterPlaylistController_);if(t.attributes.RESOLUTION){var s=t.attributes.RESOLUTION;this.width=s.width,this.height=s.height}this.bandwidth=t.attributes.BANDWIDTH,this.id=i,this.enabled=a(e.playlists,t.uri,r)},o=function(e){var t=e.playlists;e.representations=function(){return t.master.playlists.filter(function(e){return!(0,r.isIncompatible)(e)}).map(function(t,i){return new s(e,t,t.uri)})}};i["default"]=o,t.exports=i["default"]},{}],15:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e(63),a=n(r),s=e(32),o=n(s),u=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=a["default"].buildAbsoluteURL(o["default"].location.href,e)),a["default"].buildAbsoluteURL(e,t))};i["default"]=u,t.exports=i["default"]},{}],16:[function(e,t,i){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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)}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i0&&e.start(0)"))}return a(t,e),s(t,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_()}},{key:"abort",value:function(){if("WAITING"!==this.state)return void(this.pendingSegment_&&(this.pendingSegment_=null));this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return void 0!==e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():f["default"].createTimeRanges()}},{key:"initSegment",value:function(e){var t=!(arguments.length<=1||arguments[1]===undefined)&&arguments[1];if(!e)return null;var i=(0,b.initSegmentId)(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes}),n||e}},{
- key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new h["default"](this.mediaSource_,this.mimeType_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(e){var i=this.playlist_,n=this.pendingSegment_;if(this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0}),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return void(null!==this.mediaIndex&&this.resyncLoader());var r=e.mediaSequence-i.mediaSequence;this.logger_("mediaSequenceDiff",r),null!==this.mediaIndex&&(this.mediaIndex-=r),n&&(n.mediaIndex-=r,n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,e)}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(y["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e){this.mimeType_||(this.mimeType_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_()),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t){this.sourceUpdater_&&this.sourceUpdater_.remove(e,t),(0,v["default"])(e,t,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&y["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y["default"].setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&y["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y["default"].setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e){if(k(this.playlist_,this.mediaSource_,e.mediaIndex))return void this.endOfStream();(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment=this.goalBufferLength_())return null;if(!n&&u>=1)return null;if(this.logger_("checkBuffer_","mediaIndex:",i,"hasPlayed:",n,"currentTime:",r,"syncPoint:",a,"fetchAtBuffer:",this.fetchAtBuffer_,"bufferedTime:",u),null===a)return i=this.getSyncSegmentCandidate_(t),this.logger_("getSync","mediaIndex:",i),this.generateSegmentInfo_(t,i,null,!0);if(null!==i){this.logger_("walkForward","mediaIndex:",i+1);var l=t.segments[i];return o=l&&l.end?l.end:s,this.generateSegmentInfo_(t,i+1,o,!1)}if(this.fetchAtBuffer_){var f=d["default"].getMediaInfoForTime(t,s,a.segmentIndex,a.time);i=f.mediaIndex,o=f.startTime}else{var f=d["default"].getMediaInfoForTime(t,r,a.segmentIndex,a.time);i=f.mediaIndex,o=f.startTime}return this.logger_("getMediaIndexForTime","mediaIndex:",i,"startOfSegment:",o),this.generateSegmentInfo_(t,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var i=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===t.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,i,n){if(t<0||t>=e.segments.length)return null;var r=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=d["default"].estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),a=(0,S.timeUntilRebuffer)(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(r<=a)return!1;var s=(0,w.minRebufferMaxBandwidthSelector)({master:this.hls_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a,u=o-s.rebufferingImpact,l=.5;return a<=S.TIME_FUDGE_FACTOR&&(l=1),!s.playlist||s.playlist.uri===this.playlist_.uri||u0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var n=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key={resolvedUri:t.key.resolvedUri,iv:n}}return t.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),!this.pendingSegment_)return void(this.mediaRequestsAborted+=1);if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===T.REQUEST_ERRORS.ABORTED?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===T.REQUEST_ERRORS.TIMEOUT?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),this.processSegmentResponse_(t)}}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(!this.pendingSegment_)return void(this.state="READY");var t=this.pendingSegment_,i=t.segment,n=this.syncController_.probeSegmentInfo(t);"undefined"==typeof this.startingMedia_&&n&&(n.containsAudio||n.containsVideo)&&(this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo});var r=E(this.loaderType_,this.startingMedia_,n);if(r)return this.error({message:r,blacklistDuration:Infinity}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset"));var a=this.syncController_.mappingForTimeline(t.timeline);null!==a&&this.trigger({type:"segmenttimemapping",mapping:a}),this.state="APPENDING",i.map&&function(){var t=(0,b.initSegmentId)(i.map);if(!e.activeInitSegmentId_||e.activeInitSegmentId_!==t){var n=e.initSegment(i.map);e.sourceUpdater_.appendBuffer(n.bytes,function(){e.activeInitSegmentId_=t})}}(),t.byteLength=t.bytes.byteLength,"number"==typeof i.start&&"number"==typeof i.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.sourceUpdater_.appendBuffer(t.bytes,this.handleUpdateEnd_.bind(this))}},{key:"handleUpdateEnd_",value:function(){if(this.logger_("handleUpdateEnd_","segmentInfo:",this.pendingSegment_),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,i=null!==this.mediaIndex;if(this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration)return void this.resetEverything();i&&this.trigger("bandwidthupdate"),this.trigger("progress"),k(e.playlist,this.mediaSource_,e.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_()}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},{key:"logger_",value:function(){}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,n=t.end;if(O(i)&&O(n)){(0,v["default"])(i,n,this.segmentMetadataTrack_);var r=y["default"].WebKitDataCue||y["default"].VTTCue,a={bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.uri,start:i,end:n},s=JSON.stringify(a),o=new r(i,n,s);o.value=a,this.segmentMetadataTrack_.addCue(o)}}}}]),t}(f["default"].EventTarget);i["default"]=L}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t,i){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i=l)&&(o=l,s={time:d.start,segmentIndex:u})}}return s}},{name:"Discontinuity",run:function(e,t,i,n,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o=f)&&(s=f,a={time:l.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(e,t,i,n,r){if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}}return null}}];i.syncPointStrategies=p;var m=function(e){function t(){var e=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];r(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.inspectCache_=undefined,this.timelines=[],this.discontinuities=[],this.datetimeToDisplayTime=null,e.debug&&(this.logger_=h["default"].log.bind(h["default"],"sync-controller ->"))}return a(t,e),s(t,[{key:"getSyncPoint",value:function(e,t,i,n){var r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+(0,f.sumDurations)(e,n.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,i,n){for(var r=[],a=0;a:",o))}return r}},{key:"selectSyncPoint_",value:function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a chosen: ",i),i}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var i=t.mediaSequence-e.mediaSequence,n=i-1;n>=0;n--){var r=e.segments[n];if(r&&"undefined"!=typeof r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist sync:",t.syncInfo),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.dateTimeObject){var t=e.dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=undefined}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,i=e.playlist,n=undefined;return n=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e),n&&this.calculateSegmentTimeMapping_(e,n)&&(this.saveDiscontinuitySyncInfo_(e),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:t.start})),n}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,i=d["default"].timescale(t.map.bytes),n=d["default"].startTime(i,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=n),{start:n,end:n+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=(0,l.inspect)(e.bytes,this.inspectCache_),i=undefined,n=undefined;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,n=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,n=t.audio[1].dtsTime),{start:i,end:n,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var i=e.segment,n=this.timelines[e.timeline];if(null!==e.timestampOffset)this.logger_("tsO:",e.timestampOffset),n={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=n,this.trigger("timestampoffset"),i.start=e.startOfSegment,i.end=t.end+n.mapping;else{if(!n)return!1;i.start=t.start+n.mapping,i.end=t.end+n.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts.length)for(var n=0;no){var u=undefined;u=s<0?i.start-(0,f.sumDurations)(t,e.mediaIndex,r):i.end+(0,f.sumDurations)(t,e.mediaIndex+1,r),this.discontinuities[a]={time:u,accuracy:o}}}}},{key:"logger_",value:function(){}}]),t}(h["default"].EventTarget);i["default"]=m}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){var e=arguments.length<=0||arguments[0]===undefined?"":arguments[0],t={codecCount:0},i=undefined;return t.codecCount=e.split(",").length,t.codecCount=t.codecCount||2,i=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(e),i&&(t.videoCodec=i[2],t.videoObjectTypeIndicator=i[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(e),t.audioProfile=t.audioProfile&&t.audioProfile[2],t};i.parseCodecs=n},{}],20:[function(e,t,i){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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)}Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i>7))^a]=a;for(s=o=0;!n[s];s^=l||1,o=d[o]||1)for(h=o^o<<1^o<<2^o<<3^o<<4,h=h>>8^255&h^99,n[s]=h,r[h]=s,c=u[f=u[l=u[s]]],m=16843009*c^65537*f^257*l^16843008*s,p=257*u[h]^16843008*h,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][h]=m=m<<24^m>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e},s=null,o=function(){function e(t){n(this,e),s||(s=a()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];var i=undefined,r=undefined,o=undefined,u=undefined,d=undefined,l=this._tables[0][4],f=this._tables[1],c=t.length,h=1;if(4!==c&&6!==c&&8!==c)throw new Error("Invalid aes key size");for(u=t.slice(0),d=[],this._key=[u,d],i=c;i<4*c+28;i++)o=u[i-1],(i%c==0||8===c&&i%c==4)&&(o=l[o>>>24]<<24^l[o>>16&255]<<16^l[o>>8&255]<<8^l[255&o],i%c==0&&(o=o<<8^o>>>24^h<<24,h=h<<1^283*(h>>7))),u[i]=u[i-c]^o;for(r=0;i;r++,i--)o=u[3&r?i:i-4],d[r]=i<=4||r<4?o:f[0][l[o>>>24]]^f[1][l[o>>16&255]]^f[2][l[o>>8&255]]^f[3][l[255&o]]}return r(e,[{key:"decrypt",value:function(e,t,i,n,r,a){var s=this._key[1],o=e^s[0],u=n^s[1],d=i^s[2],l=t^s[3],f=undefined,c=undefined,h=undefined,p=s.length/4-2,m=undefined,g=4,y=this._tables[1],_=y[0],v=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m>>24]^v[u>>16&255]^b[d>>8&255]^T[255&l]^s[g],c=_[u>>>24]^v[d>>16&255]^b[l>>8&255]^T[255&o]^s[g+1],h=_[d>>>24]^v[l>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],l=_[l>>>24]^v[o>>16&255]^b[u>>8&255]^T[255&d]^s[g+3],g+=4,o=f,u=c,d=h;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[d>>8&255]<<8^S[255&l]^s[g++],f=o,o=u,u=d,d=l,l=f}}]),e}();i["default"]=o,t.exports=i["default"]},{}],23:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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)}Object.defineProperty(i,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i>8|e>>>24},c=function(e,t,i){var n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new o["default"](Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),u=undefined,d=undefined,l=undefined,c=undefined,h=undefined,p=undefined,m=undefined,g=undefined,y=undefined;for(u=i[0],d=i[1],l=i[2],c=i[3],y=0;y-1)}},{key:"trigger",value:function(e){var t=undefined,i=undefined,n=undefined,r=undefined;if(t=this.listeners[e])if(2===arguments.length)for(n=t.length,i=0;i-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}]),t}(u["default"]);i["default"]=d},{}],35:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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}function a(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)}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){var i=[],n=!0,r=!1,a=undefined;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(u){r=!0,a=u}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw a}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var i=0;i0&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key:function(){return e.attributes?"NONE"===e.attributes.METHOD?void(d=null):e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),d={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void("undefined"!=typeof e.attributes.IV&&(d.iv=e.attributes.IV))):void this.trigger("warn",{message:"ignoring key declaration without URI"}):void this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){if(!isFinite(e.number))return void this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number});this.manifest.mediaSequence=e.number},"discontinuity-sequence":function(){if(!isFinite(e.number))return void this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number});this.manifest.discontinuitySequence=e.number,h=e.number},"playlist-type":function(){if(!/VOD|EVENT/.test(e.playlistType))return void this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist});this.manifest.playlistType=e.playlistType},map:function(){u={},e.uri&&(u.uri=e.uri),e.byterange&&(u.byterange=e.byterange)},"stream-inf":function(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||f,!e.attributes)return void this.trigger("warn",{message:"ignoring empty stream-inf attributes"});s.attributes||(s.attributes={}),o(s.attributes,e.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||f,!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{},t=i[e.attributes["GROUP-ID"]],r={"default":/yes/i.test(e.attributes.DEFAULT)},r["default"]?r.autoselect=!0:r.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(r.language=e.attributes.LANGUAGE),e.attributes.URI&&(r.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(r.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(r.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(r.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=r},discontinuity:function(){h+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time":function(){this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject},targetduration:function(){if(!isFinite(e.duration)||e.duration<0)return void this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration});this.manifest.targetDuration=e.duration},totalduration:function(){if(!isFinite(e.duration)||e.duration<0)return void this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration});this.manifest.totalDuration=e.duration},"cue-out":function(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data}})[e.tagType]||l).call(i)},uri:function(){s.uri=e.uri,n.push(s),!this.manifest.targetDuration||"duration"in s||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),d&&(s.key=d),s.timeline=h,u&&(s.map=u),s={}},comment:function(){}})[e.type].call(i)}),e}return s(t,e),u(t,[{key:"push",value:function(e){this.lineStream.push(e)}},{key:"end",value:function(){this.lineStream.push("\n")}}]),t}(l["default"]);i["default"]=m},{}],37:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i-1}},{key:"trigger",value:function(e){var t=this.listeners[e],i=void 0,n=void 0,r=void 0;if(t)if(2===arguments.length)for(n=t.length,i=0;i>4?i+20:i+10},this.parseAdtsSize=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},this.push=function(i){var n,r,a,s,o=0,u=0;for(e.length?(s=e.length,e=new Uint8Array(i.byteLength+s),e.set(e.subarray(0,s)),e.set(i,s)):e=i;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(!0&e[u]&&240==(240&e[u+1])){if(e.length-u<7)break;if((o=this.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else u++;else{if(e.length-u<10)break;if((o=this.parseId3TagSize(e,u))>e.length)break;r={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",r),u+=o}n=e.length-u,e=n>0?e.subarray(u):new Uint8Array}},n.prototype=new r,t.exports=n},{}],39:[function(e,t,i){"use strict";var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},a=function(e,t,i){var n,r="";for(n=t;n>4?i+20:i+10},u=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},d=function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},l=function(e){for(var t=0;t+5>>2];t++}return null},f=function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=r(e.subarray(10,14)));do{if((i=r(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var a=0;a>>2;return d*=4,d+=3&u[7]}break}}t+=10,t+=i}while(t>5,o=1024*(1+(3&e[d+6])),u=9e4*o/a[(60&e[d+2])>>>2],r=d+i,e.byteLength>>6&3),channelcount:(1&e[d+2])<<2|(192&e[d+3])>>>6,samplerate:a[(60&e[d+2])>>>2],samplingfrequencyindex:(60&e[d+2])>>>2,samplesize:16,data:e.subarray(d+7+n,r)}),e.byteLength===r)return void(e=undefined);l++,e=e.subarray(r)}else d++},this.flush=function(){this.trigger("done")}},n.prototype=new r,t.exports=n},{}],41:[function(e,t,i){"use strict";var n,r,a,s=e(62),o=e(61);r=function(){var e,t,i=0;r.prototype.init.call(this),this.push=function(n){var r;for(t?(r=new Uint8Array(t.byteLength+n.data.byteLength),r.set(t),r.set(n.data,t.byteLength),t=r):t=n.data;i3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")}},r.prototype=new s,a={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},n=function(){var e,t,i,s,u,d,l,f=new r;n.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,f.push(e))},f.on("data",function(n){var r={trackId:t,pts:i,dts:s,data:n};switch(31&n[0]){case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp",r.escapedRBSP=u(n.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp",r.escapedRBSP=u(n.subarray(1)),r.config=d(r.escapedRBSP);break;case 8:r.nalUnitType="pic_parameter_set_rbsp";break;case 9:r.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",r)}),f.on("done",function(){e.trigger("done")}),this.flush=function(){f.flush()},l=function(e,t){var i,n,r=8,a=8;for(i=0;i0)throw new Error("Attempted to create new NAL wihout closing the old one");r=this.length,this.length+=4,this.position=this.length},this.endNalUnit=function(e){var t,i;this.length===r+4?this.length-=4:r>0&&(t=r+4,i=this.length-t,this.position=r,this.view.setUint32(this.position,i),this.position=this.length,e&&e.push(this.bytes.subarray(t,t+i))),r=0},this.writeMetaDataDouble=function(e,t){var i;if(s(this,2+e.length+9),this.view.setUint16(this.position,e.length),this.position+=2,"width"===e)this.bytes.set(o,this.position),this.position+=5;else if("height"===e)this.bytes.set(u,this.position),this.position+=6;else if("videocodecid"===e)this.bytes.set(d,this.position),this.position+=12;else for(i=0;i>>16,this.bytes[14]=(65280&e)>>>8,this.bytes[15]=(255&e)>>>0;break;case n.AUDIO_TAG:this.bytes[11]=175,this.bytes[12]=t?0:1;break;case n.METADATA_TAG:this.position=11,this.view.setUint8(this.position,2),this.position++,this.view.setUint16(this.position,10),this.position+=2,this.bytes.set([111,110,77,101,116,97,68,97,116,97],this.position),this.position+=10,this.bytes[this.position]=8,this.position++,this.view.setUint32(this.position,r),this.position=this.length,this.bytes.set([0,0,9],this.position),this.position+=3,this.length=this.position}return i=this.length-11,this.bytes[1]=(16711680&i)>>>16,this.bytes[2]=(65280&i)>>>8,this.bytes[3]=(255&i)>>>0,this.bytes[4]=(16711680&this.dts)>>>16,this.bytes[5]=(65280&this.dts)>>>8,this.bytes[6]=(255&this.dts)>>>0,this.bytes[7]=(4278190080&this.dts)>>>24,this.bytes[8]=0,this.bytes[9]=0,this.bytes[10]=0,s(this,4),this.view.setUint32(this.length,this.length),this.length+=4,this.position+=4,this.bytes=this.bytes.subarray(0,this.length),this.frameTime=n.frameTime(this.bytes),this}},n.AUDIO_TAG=8,n.VIDEO_TAG=9,n.METADATA_TAG=18,n.isAudioFrame=function(e){return n.AUDIO_TAG===e[0]},n.isVideoFrame=function(e){return n.VIDEO_TAG===e[0]},n.isMetaData=function(e){return n.METADATA_TAG===e[0]},n.isKeyFrame=function(e){return n.isVideoFrame(e)?23===e[11]:!!n.isAudioFrame(e)||!!n.isMetaData(e)},n.frameTime=function(e){var t=e[4]<<16;return t|=e[5]<<8,t|=e[6]<<0,t|=e[7]<<24},t.exports=n},{}],46:[function(e,t,i){t.exports={tag:e(45),Transmuxer:e(48),getFlvHeader:e(44)}},{}],47:[function(e,t,i){"use strict";var n=function(){var e=this;this.list=[],this.push=function(e){this.list.push({bytes:e.bytes,dts:e.dts,pts:e.pts,keyFrame:e.keyFrame,metaDataTag:e.metaDataTag})},Object.defineProperty(this,"length",{get:function(){return e.list.length}})};t.exports=n},{}],48:[function(e,t,i){"use strict";var n,r,a,s,o,u,d=e(62),l=e(45),f=e(50),c=e(40),h=e(41).H264Stream,p=e(43),m=e(47);s=function(e,t){"number"==typeof t.pts&&(e.timelineStartInfo.pts===undefined?e.timelineStartInfo.pts=t.pts:e.timelineStartInfo.pts=Math.min(e.timelineStartInfo.pts,t.pts)),"number"==typeof t.dts&&(e.timelineStartInfo.dts===undefined?e.timelineStartInfo.dts=t.dts:e.timelineStartInfo.dts=Math.min(e.timelineStartInfo.dts,t.dts))},o=function(e,t){var i=new l(l.METADATA_TAG);return i.dts=t,i.pts=t,i.writeMetaDataDouble("videocodecid",7),i.writeMetaDataDouble("width",e.width),i.writeMetaDataDouble("height",e.height),i},u=function(e,t){var i,n=new l(l.VIDEO_TAG,!0);for(n.dts=t,n.pts=t,n.writeByte(1),n.writeByte(e.profileIdc),n.writeByte(e.profileCompatibility),n.writeByte(e.levelIdc),n.writeByte(255),n.writeByte(225),n.writeShort(e.sps[0].length),n.writeBytes(e.sps[0]),n.writeByte(e.pps.length),i=0;i=n[0]&&(s=n.shift(),this.writeMetaDataTags(o,s)),(e.extraData!==t||r.pts-s>=1e3)&&(this.writeMetaDataTags(o,r.pts),t=e.extraData,s=r.pts),a=new l(l.AUDIO_TAG),a.pts=r.pts,a.dts=r.dts,a.writeBytes(r.data),o.push(a.finalize());n.length=0,t=null,this.trigger("data",{track:e,tags:o.list}),this.trigger("done","AudioSegmentStream")},this.writeMetaDataTags=function(t,i){var n;n=new l(l.METADATA_TAG),n.pts=i,n.dts=i,n.writeMetaDataDouble("audiocodecid",10),n.writeMetaDataBoolean("stereo",2===e.channelcount),n.writeMetaDataDouble("audiosamplerate",e.samplerate),n.writeMetaDataDouble("audiosamplesize",16),t.push(n.finalize()),n=new l(l.AUDIO_TAG,!0),n.pts=i,n.dts=i,n.view.setUint16(n.position,e.extraData),n.position+=2,n.length=Math.max(n.length,n.position),t.push(n.finalize())},this.onVideoKeyFrame=function(e){n.push(e)}},a.prototype=new d,r=function(e){var t,i,n=[];r.prototype.init.call(this),this.finishFrame=function(n,r){if(r){if(t&&e&&e.newMetadata&&(r.keyFrame||0===n.length)){var a=o(t,r.dts).finalize(),s=u(e,r.dts).finalize();a.metaDataTag=s.metaDataTag=!0,n.push(a),n.push(s),e.newMetadata=!1,this.trigger("keyframe",r.dts)}r.endNalUnit(),n.push(r.finalize()),i=null}},this.push=function(t){s(e,t),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),n.push(t)},this.flush=function(){for(var r,a=new m;n.length&&"access_unit_delimiter_rbsp"!==n[0].nalUnitType;)n.shift();if(0===n.length)return void this.trigger("done","VideoSegmentStream");for(;n.length;)r=n.shift(),"seq_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,t=r.config,e.width=t.width,e.height=t.height,e.sps=[r.data],e.profileIdc=t.profileIdc,e.levelIdc=t.levelIdc,e.profileCompatibility=t.profileCompatibility,i.endNalUnit()):"pic_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,e.pps=[r.data],i.endNalUnit()):"access_unit_delimiter_rbsp"===r.nalUnitType?(i&&this.finishFrame(a,i),i=new l(l.VIDEO_TAG),i.pts=r.pts,i.dts=r.dts):("slice_layer_without_partitioning_rbsp_idr"===r.nalUnitType&&(i.keyFrame=!0),i.endNalUnit()),i.startNalUnit(),i.writeBytes(r.data);i&&this.finishFrame(a,i),this.trigger("data",{track:e,tags:a.list}),this.trigger("done","VideoSegmentStream")}},r.prototype=new d,n=function(e){var t,i,s,o,u,d,l,m,g,y,_,v,b=this;n.prototype.init.call(this),e=e||{},this.metadataStream=new f.MetadataStream,e.metadataStream=this.metadataStream,t=new f.TransportPacketStream,i=new f.TransportParseStream,s=new f.ElementaryStream,o=new f.TimestampRolloverStream("video"),u=new f.TimestampRolloverStream("audio"),d=new f.TimestampRolloverStream("timed-metadata"),l=new c,m=new h,v=new p(e),t.pipe(i).pipe(s),s.pipe(o).pipe(m),s.pipe(u).pipe(l),s.pipe(d).pipe(this.metadataStream).pipe(v),_=new f.CaptionStream,m.pipe(_).pipe(v),s.on("data",function(e){var t,i,n;if("metadata"===e.type){for(t=e.tracks.length;t--;)"video"===e.tracks[t].type?i=e.tracks[t]:"audio"===e.tracks[t].type&&(n=e.tracks[t]);i&&!g&&(v.numberOfTracks++,g=new r(i),m.pipe(g).pipe(v)),n&&!y&&(v.numberOfTracks++,y=new a(n),l.pipe(y).pipe(v),g&&g.on("keyframe",y.onVideoKeyFrame))}}),this.push=function(e){t.push(e)},this.flush=function(){t.flush()},this.resetCaptions=function(){_.reset()},v.on("data",function(e){b.trigger("data",e)}),v.on("done",function(){b.trigger("done")})},n.prototype=new d,t.exports=n},{}],49:[function(e,t,i){"use strict";var n=e(62),r=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.topRow_=13,this.mode_="rollUp";else if(t===this.ROLL_UP_3_ROWS_)this.topRow_=12,this.mode_="rollUp";else if(t===this.ROLL_UP_4_ROWS_)this.topRow_=11,this.mode_="rollUp";else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[14]=this.nonDisplayed_[14].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=f();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=f();else if(t===this.RESUME_DIRECT_CAPTIONING_)this.mode_="paintOn";else if(this.isSpecialCharacter(n,r))n=(3&n)<<8,a=d(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1),n=(3&n)<<8,a=d(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=l.indexOf(7968&t);s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=d(n),a+=d(r),this[this.mode_](e.pts,a),this.column_+=a.length)}};c.prototype=new n,c.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){return e.trim()}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},c.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=f(),this.nonDisplayed_=f(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.formatting_=[]},c.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},c.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},c.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},c.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},c.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},c.prototype.isPAC=function(e,t){return e>=this.BASE_&&e=64&&t<=127},c.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},c.prototype.isNormalChar=function(e){return e>=32&&e<=127},c.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)},c.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+""+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},c.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},c.prototype.rollUp=function(e,t){var i=this.displayed_[14];i+=t,this.displayed_[14]=i},c.prototype.shiftRowsUp_=function(){var e;for(e=0;e>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===undefined?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=u.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=u.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},r.prototype=new s,r.STREAM_TYPES={h264:27,adts:15},a=function(){var e=this,t={data:[],size:0},i={data:[],size:0},n={data:[],size:0},r=function(e,t){var i;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])},s=function(t,i,n){var a,s=new Uint8Array(t.size),o={type:i},u=0,d=0,l=!1;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,u=0;u>>2;p*=4,p+=3&h[7],u.timeStamp=p,t.pts===undefined&&t.dts===undefined&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),n+=10,n+=a}while(n>>4>1&&(t+=e[4]+1),t},o=function(e,t){var i=r(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},u=function(e){var t=a(e),i=4+s(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},d=function(e){var t={},i=a(e),n=4+s(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r,o,u;r=(15&e[n+1])<<8|e[n+2],o=3+r-4,u=(15&e[n+10])<<8|e[n+11];for(var d=12+u;d=e.byteLength)return null;var i,n=null;return i=e[t+7],192&i&&(n={},n.pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},c=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},h=function(e){for(var t,i=4+s(e),n=e.subarray(i),r=0,a=0,o=!1;a3&&"slice_layer_without_partitioning_rbsp_idr"===(t=c(31&n[a+3]))&&(o=!0),o};t.exports={parseType:o,parsePat:u,parsePmt:d,parsePayloadUnitStartIndicator:a,parsePesType:l,parsePesTime:f,videoPacketContainsKeyFrame:h}},{}],53:[function(e,t,i){"use strict";t.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],54:[function(e,t,i){"use strict";var n=e(62),r=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},a=function(e){var t,i;a.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(i===undefined&&(i=e.dts),e.dts=r(e.dts,i),e.pts=r(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.discontinuity=function(){i=void 0,t=void 0}};a.prototype=new n,t.exports={TimestampRolloverStream:a,handleRollover:r}},{}],55:[function(e,t,i){t.exports={generator:e(56),Transmuxer:e(58).Transmuxer,AudioSegmentStream:e(58).AudioSegmentStream,VideoSegmentStream:e(58).VideoSegmentStream}},{}],56:[function(e,t,i){"use strict";var n,r,a,s,o,u,d,l,f,c,h,p,m,g,y,_,v,b,T,S,w,k,O,E,A,L,P,I,C,U,M,D,R,x,B,j,N=Math.pow(2,32)-1;!function(){var e;if(O={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in O)O.hasOwnProperty(e)&&(O[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),L=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),C={video:P,audio:I},D=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),M=new Uint8Array([0,0,0,0,0,0,0,0]),R=new Uint8Array([0,0,0,0,0,0,0,0]),x=R,B=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),j=R,U=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var t,i,n,r=[],a=0;for(t=1;t>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},s=function(){return n(O.ftyp,E,A,E,L)},_=function(e){return n(O.hdlr,C[e])},o=function(e){return n(O.mdat,e)},y=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(O.mdhd,t)},g=function(e){return n(O.mdia,y(e),_(e.type),d(e))},u=function(e){return n(O.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return n(O.minf,"video"===e.type?n(O.vmhd,U):n(O.smhd,M),r(),b(e))},l=function(e,t){for(var i=[],r=t.length;r--;)i[r]=S(t[r]);return n.apply(null,[O.moof,u(e)].concat(i))},f=function(e){for(var t=e.length,i=[];t--;)i[t]=p(e[t]);return n.apply(null,[O.moov,h(4294967295)].concat(i).concat(c(e)))},c=function(e){for(var t=e.length,i=[];t--;)i[t]=w(e[t]);return n.apply(null,[O.mvex].concat(i))},h=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(O.mvhd,t)},v=function(e){var t,i,r=e.samples||[],a=new Uint8Array(4+r.length);for(i=0;i>>8),a.push(255&i[t].byteLength),a=a.concat(Array.prototype.slice.call(i[t]));for(t=0;t>>8),s.push(255&r[t].byteLength),s=s.concat(Array.prototype.slice.call(r[t]));return n(O.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(O.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length]).concat(a).concat([r.length]).concat(s))),n(O.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},t=function(e){return n(O.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),a(e))}}(),m=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(O.tkhd,t)},S=function(e){var t,i,r,a,s,o,u;return t=n(O.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/(N+1)),u=Math.floor(e.baseMediaDecodeTime%(N+1)),i=n(O.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,u>>>24&255,u>>>16&255,u>>>8&255,255&u])),s=92,"audio"===e.type?(r=k(e,s),n(O.traf,t,i,r)):(a=v(e),r=k(e,a.length+s),n(O.traf,t,i,r,a))},p=function(e){return e.duration=e.duration||4294967295,n(O.trak,m(e),g(e))},w=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(O.trex,t)},function(){var e,t,i;i=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(e[0].duration!==undefined&&(i=1),e[0].size!==undefined&&(n=2),e[0].flags!==undefined&&(r=4),e[0].compositionTimeOffset!==undefined&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,a,s,o;for(a=e.samples||[],t+=20+16*a.length,r=i(a,t),o=0;o>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);return n(O.trun,new Uint8Array(r))},e=function(e,t){var r,a,s,o;for(a=e.samples||[],t+=20+8*a.length,r=i(a,t),o=0;o>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);return n(O.trun,new Uint8Array(r))},k=function(i,n){return"audio"===i.type?e(i,n):t(i,n)}}(),t.exports={ftyp:s,mdat:o,moof:l,moov:f,initSegment:function(e){var t,i=s(),n=f(e);return t=new Uint8Array(i.byteLength+n.byteLength),t.set(i),t.set(n,i.byteLength),t}}},{}],57:[function(e,t,i){
- "use strict";var n,r,a,s;n=function(e,t){var i,a,s,o,u,d=[];if(!t.length)return null;for(i=0;i1?i+a:e.byteLength,s===t[0]&&(1===t.length?d.push(e.subarray(i+8,o)):(u=n(e.subarray(i+8,o),t.slice(1)),u.length&&(d=d.concat(u)))),i=o;return d},r=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},a=function(e){var t={};return n(e,["moov","trak"]).reduce(function(e,t){var i,r,a,s,o;return(i=n(t,["tkhd"])[0])?(r=i[0],a=0===r?12:20,s=i[a]<<24|i[a+1]<<16|i[a+2]<<8|i[a+3],(o=n(t,["mdia","mdhd"])[0])?(r=o[0],a=0===r?12:20,e[s]=o[a]<<24|o[a+1]<<16|o[a+2]<<8|o[a+3],e):null):null},t)},s=function(e,t){var i,r,a;return i=n(t,["moof","traf"]),r=[].concat.apply([],i.map(function(t){return n(t,["tfhd"]).map(function(i){var r,a,s;return r=i[4]<<24|i[5]<<16|i[6]<<8|i[7],a=e[r]||9e4,s=n(t,["tfdt"]).map(function(e){var t,i;return t=e[0],i=e[4]<<24|e[5]<<16|e[6]<<8|e[7],1===t&&(i*=Math.pow(2,32),i+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),i})[0],(s=s||Infinity)/a})})),a=Math.min.apply(null,r),isFinite(a)?a:0},t.exports={parseType:r,timescale:a,startTime:s}},{}],58:[function(e,t,i){"use strict";var n,r,a,s,o,u,d,l,f,c,h,p=e(62),m=e(56),g=e(50),y=e(40),_=e(41).H264Stream,v=e(38),b=e(42),T=e(60),S=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],w=["width","height","profileIdc","levelIdc","profileCompatibility"];o=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}},u=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},c=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i45e3))){for(n=b[e.samplerate],n||(n=t[0].data),r=0;r=n?t:(e.minSegmentDts=Infinity,t.filter(function(t){return t.dts>=n&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)}))},this.generateSampleTable_=function(e){var t,i,n=[];for(t=0;t=-1e4&&i<=45e3&&(!n||o>i)&&(n=a,o=i));return n?n.gop:null},this.extendFirstKeyFrame_=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},this.groupNalsIntoFrames_=function(e){var t,i,n=[],r=[];for(n.byteLength=0,t=0;tn.pts?t++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration);return 0===i?e:i===e.length?null:(d=e.slice(i),d.byteLength=a,d.duration=o,d.nalCount=s,d.pts=d[0].pts,d.dts=d[0].dts,d)},this.alignGopsAtEnd_=function(e){var t,i,n,r,a,s;for(t=u.length-1,i=e.length-1,a=null,s=!1;t>=0&&i>=0;){if(n=u[t],r=e[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?t--:(t===u.length-1&&(a=i),i--)}if(!s&&null===a)return null;var o;if(0===(o=s?i:a))return e;var d=e.slice(o),l=d.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return d.byteLength=l.byteLength,d.duration=l.duration,d.nalCount=l.nalCount,d.pts=d[0].pts,d.dts=d[0].dts,d},this.alignGopsWith=function(e){u=e}},n.prototype=new p,d=function(e,t){"number"==typeof t.pts&&(e.timelineStartInfo.pts===undefined&&(e.timelineStartInfo.pts=t.pts),e.minSegmentPts===undefined?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),e.maxSegmentPts===undefined?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(e.timelineStartInfo.dts===undefined&&(e.timelineStartInfo.dts=t.dts),e.minSegmentDts===undefined?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.maxSegmentDts===undefined?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},l=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},f=function(e){var t,i,n=e.minSegmentDts-e.timelineStartInfo.dts;return t=e.timelineStartInfo.baseMediaDecodeTime,t+=n,t=Math.max(0,t),"audio"===e.type&&(i=e.samplerate/9e4,t*=i,t=Math.floor(t)),t},s=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!=typeof e.remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,s.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}},s.prototype=new p,s.prototype.flush=function(e){var t,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,w.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,S.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=m.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},a=function(e){var t,i,o=this,d=!0;a.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new g.MetadataStream,t.aacStream=new v,t.audioTimestampRolloverStream=new g.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new g.TimestampRolloverStream("timed-metadata"),t.adtsStream=new y,t.coalesceStream=new s(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type||t.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:o.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new r(i),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var a={};this.transmuxPipeline_=a,a.type="ts",a.metadataStream=new g.MetadataStream,a.packetStream=new g.TransportPacketStream,a.parseStream=new g.TransportParseStream,a.elementaryStream=new g.ElementaryStream,a.videoTimestampRolloverStream=new g.TimestampRolloverStream("video"),a.audioTimestampRolloverStream=new g.TimestampRolloverStream("audio"),a.timedMetadataTimestampRolloverStream=new g.TimestampRolloverStream("timed-metadata"),a.adtsStream=new y,a.h264Stream=new _,a.captionStream=new g.CaptionStream,a.coalesceStream=new s(e,a.metadataStream),a.headOfPipeline=a.packetStream,a.packetStream.pipe(a.parseStream).pipe(a.elementaryStream),a.elementaryStream.pipe(a.videoTimestampRolloverStream).pipe(a.h264Stream),a.elementaryStream.pipe(a.audioTimestampRolloverStream).pipe(a.adtsStream),a.elementaryStream.pipe(a.timedMetadataTimestampRolloverStream).pipe(a.metadataStream).pipe(a.coalesceStream),a.h264Stream.pipe(a.captionStream).pipe(a.coalesceStream),a.elementaryStream.on("data",function(s){var u;if("metadata"===s.type){for(u=s.tracks.length;u--;)t||"video"!==s.tracks[u].type?i||"audio"!==s.tracks[u].type||(i=s.tracks[u],i.timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime):(t=s.tracks[u],t.timelineStartInfo.baseMediaDecodeTime=o.baseMediaDecodeTime);t&&!a.videoSegmentStream&&(a.coalesceStream.numberOfTracks++,a.videoSegmentStream=new n(t,e),a.videoSegmentStream.on("timelineStartInfo",function(e){i&&(i.timelineStartInfo=e,a.audioSegmentStream.setEarliestDts(e.dts))}),a.videoSegmentStream.on("processedGopsInfo",o.trigger.bind(o,"gopInfo")),a.videoSegmentStream.on("baseMediaDecodeTime",function(e){i&&a.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),a.h264Stream.pipe(a.videoSegmentStream).pipe(a.coalesceStream)),i&&!a.audioSegmentStream&&(a.coalesceStream.numberOfTracks++,a.audioSegmentStream=new r(i),a.adtsStream.pipe(a.audioSegmentStream).pipe(a.coalesceStream))}}),a.coalesceStream.on("data",this.trigger.bind(this,"data")),a.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(e){var n=this.transmuxPipeline_;this.baseMediaDecodeTime=e,i&&(i.timelineStartInfo.dts=undefined,i.timelineStartInfo.pts=undefined,l(i),i.timelineStartInfo.baseMediaDecodeTime=e,n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[],n.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=undefined,t.timelineStartInfo.pts=undefined,l(t),n.captionStream.reset(),t.timelineStartInfo.baseMediaDecodeTime=e),n.timedMetadataTimestampRolloverStream&&n.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(d){var t=u(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),d=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){d=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},a.prototype=new p,t.exports={Transmuxer:a,VideoSegmentStream:n,AudioSegmentStream:r,AUDIO_PROPERTIES:S,VIDEO_PROPERTIES:w}},{}],59:[function(e,t,i){"use strict";var n=e(53),r=e(54).handleRollover,a={};a.ts=e(52),a.aac=e(39);var s=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},o=function(e,t){for(var i,n=0,r=188;r=0;)if(71!==e[u]||71!==e[d])u--,d--;else{switch(n=e.subarray(u,d),a.ts.parseType(n,t.pid)){case"pes":r=a.ts.parsePesType(n,t.table),s=a.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&s&&(o=a.ts.parsePesTime(n))&&(o.type="audio",i.audio.push(o),l=!0)}if(l)break;u-=188,d-=188}},d=function(e,t,i){for(var n,r,s,o,u,d,l,f=0,c=188,h=!1,p={data:[],size:0};c=0;)if(71!==e[f]||71!==e[c])f--,c--;else{switch(n=e.subarray(f,c),a.ts.parseType(n,t.pid)){case"pes":r=a.ts.parsePesType(n,t.table),s=a.ts.parsePayloadUnitStartIndicator(n),"video"===r&&s&&(o=a.ts.parsePesTime(n))&&(o.type="video",i.video.push(o),h=!0)}if(h)break;f-=188,c-=188}},l=function(e,t){if(e.audio&&e.audio.length){var i=t;void 0===i&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=r(e.dts,i),e.pts=r(e.pts,i),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})}if(e.video&&e.video.length){var n=t;if(void 0===n&&(n=e.video[0].dts),e.video.forEach(function(e){e.dts=r(e.dts,n),e.pts=r(e.pts,n),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}),e.firstKeyFrame){var a=e.firstKeyFrame;a.dts=r(a.dts,n),a.pts=r(a.pts,n),a.dtsTime=a.dts/9e4,a.ptsTime=a.dts/9e4}}},f=function(e){for(var t,i=!1,n=0,r=null,s=null,o=0,u=0;e.length-u>=3;){switch(a.aac.parseType(e,u)){case"timed-metadata":if(e.length-u<10){i=!0;break}if((o=a.aac.parseId3TagSize(e,u))>e.length){i=!0;break}null===s&&(t=e.subarray(u,u+o),s=a.aac.parseAacTimestamp(t)),u+=o;break;case"audio":if(e.length-u<7){i=!0;break}if((o=a.aac.parseAdtsSize(e,u))>e.length){i=!0;break}null===r&&(t=e.subarray(u,u+o),r=a.aac.parseSampleRate(t)),n++,u+=o;break;default:u++}if(i)return null}if(null===r||null===s)return null;var d=9e4/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*n*d,pts:s+1024*n*d}]}},c=function(e){var t={pid:null,table:null},i={};o(e,t);for(var r in t.table)if(t.table.hasOwnProperty(r)){var a=t.table[r];switch(a){case n.H264_STREAM_TYPE:i.video=[],d(e,t,i),0===i.video.length&&delete i.video;break;case n.ADTS_STREAM_TYPE:i.audio=[],u(e,t,i),0===i.audio.length&&delete i.audio}}return i},h=function(e,t){var i,n=s(e);return(i=n?f(e):c(e))&&(i.audio||i.video)?(l(i,t),i):null};t.exports={inspect:h}},{}],60:[function(e,t,i){var n,r,a,s,o,u;n=function(e){return 9e4*e},r=function(e,t){return e*t},a=function(e){return e/9e4},s=function(e,t){return e/t},o=function(e,t){return n(s(e,t))},u=function(e,t){return r(a(e),t)},t.exports={secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:a,audioTsToSeconds:s,audioTsToVideoTs:o,videoTsToAudioTs:u}},{}],61:[function(e,t,i){"use strict";var n;n=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),i=new DataView(a.buffer).getUint32(0),n=8*s,t-=s},this.skipBits=function(e){var r;n>e?(i<<=e,n-=e):(e-=n,r=Math.floor(e/8),e-=8*r,t-=r,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var r=Math.min(n,e),a=i>>>32-r;return n-=r,n>0?i<<=r:t>0&&this.loadWord(),r=e-r,r>0?a<>>e))return i<<=e,n-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},t.exports=n},{}],62:[function(e,t,i){"use strict";var n=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,r,a;if(i=e[t])if(2===arguments.length)for(r=i.length,n=0;n1){var n=i[0].replace(/"/g,"").trim(),r=i[1].replace(/"/g,"").trim();t.parameters[n]=r}}),t},s=function(e){return e.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})})};i["default"]={isAudioCodec:n,parseContentType:a,isVideoCodec:r,translateLegacyCodecs:s},t.exports=i["default"]},{}],66:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t,i){var n=t.player_;if(i.captions&&i.captions.length){e.inbandTextTracks_||(e.inbandTextTracks_={});for(var r in i.captionStreams)if(!e.inbandTextTracks_[r]){n.tech_.trigger({type:"usage",name:"hls-608"});var a=n.textTracks().getTrackById(r);e.inbandTextTracks_[r]=a||n.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}}i.metadata&&i.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)};i["default"]=n,t.exports=i["default"]},{}],67:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={TIME_BETWEEN_CHUNKS:1,BYTES_PER_CHUNK:32768};i["default"]=n,t.exports=i["default"]},{}],68:[function(e,t,i){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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)}Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i=0&&(this.timestampOffset_=e,this.mediaSource_.swfObj.vjs_discontinuity(),this.basePtsOffset_=NaN,this.audioBufferEnd_=NaN,this.videoBufferEnd_=NaN,this.transmuxer_.postMessage({action:"reset"}))}}),Object.defineProperty(this,"buffered",{get:function(){if(!(this.mediaSource_&&this.mediaSource_.swfObj&&"vjs_getProperty"in this.mediaSource_.swfObj))return c["default"].createTimeRange();var e=this.mediaSource_.swfObj.vjs_getProperty("buffered");return e&&e.length&&(e[0][0]=P(e[0][0],3),e[0][1]=P(e[0][1],3)),c["default"].createTimeRanges(e)}}),this.mediaSource_.player_.on("seeked",function(){if((0,g["default"])(0,Infinity,i.metadataTrack_),i.inbandTextTracks_)for(var e in i.inbandTextTracks_)(0,g["default"])(0,Infinity,i.inbandTextTracks_[e])});var s=this.onHlsReset_.bind(this);this.mediaSource_.player_.tech_.on("hls-reset",s),this.mediaSource_.player_.tech_.hls.on("dispose",function(){i.transmuxer_.terminate(),i.mediaSource_.player_.tech_.off("hls-reset",s)})}return s(t,e),o(t,[{key:"appendBuffer",value:function(e){var t=undefined;if(this.updating)throw t=new Error("SourceBuffer.append() cannot be called while an update is in progress"),t.name="InvalidStateError",t.code=11,t;this.updating=!0,this.mediaSource_.readyState="open",this.trigger({type:"update"}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"abort",value:function(){this.buffer_=[],this.bufferSize_=0,this.mediaSource_.swfObj.vjs_abort(),this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"remove",value:function(e,t){if((0,g["default"])(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)(0,g["default"])(e,t,this.inbandTextTracks_[i]);this.trigger({type:"update"}),this.trigger({type:"updateend"})}},{key:"receiveBuffer_",value:function(e){var t=this;(0,_["default"])(this,this.mediaSource_,e),(0,v.addTextTrackData)(this,e.captions,e.metadata),A(function(){var i=t.convertTagsToData_(e);0===t.buffer_.length&&A(t.processBuffer_.bind(t)),i&&(t.buffer_.push(i),t.bufferSize_+=i.byteLength)})}},{key:"processBuffer_",value:function(){var e=this,t=O["default"].BYTES_PER_CHUNK;if(!this.buffer_.length)return void(!1!==this.updating&&(this.updating=!1,this.trigger({type:"updateend"})));var i=this.buffer_[0].subarray(0,t);i.byteLength=n){for(;--d;){var l=a[d];if(!(l.pts>n)&&(l.keyFrame||l.metaDataTag))break}for(;d;){if(!a[d-1].metaDataTag)break;d--}}var f=a.slice(d),c=undefined;for(c=isNaN(this.audioBufferEnd_)?n:this.audioBufferEnd_+.1,f.length&&(c=Math.min(c,f[0].pts)),d=0;d=c);)d++;var h=s.slice(d);h.length&&(this.audioBufferEnd_=h[h.length-1].pts),f.length&&(this.videoBufferEnd_=f[f.length-1].pts);var p=this.getOrderedTags_(f,h);if(0!==p.length){if(p[0].ptsthis.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=undefined,i=(0,_.parseContentType)(e);if(/^(video|audio)\/mp2t$/i.test(i.type)){var n=[];i.parameters&&i.parameters.codecs&&(n=i.parameters.codecs.split(","),n=(0,_.translateLegacyCodecs)(n),n=n.filter(function(e){return(0,_.isAudioCodec)(e)||(0,_.isVideoCodec)(e)})),0===n.length&&(n=["avc1.4d400d","mp4a.40.2"]),t=new g["default"](this,n),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}}]),t}(p["default"].EventTarget);i["default"]=v,t.exports=i["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],72:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(e,t,i){var n=undefined,r=undefined;if(i&&i.cues)for(n=i.cues.length;n--;)r=i.cues[n],r.startTime<=t&&r.endTime>=e&&i.removeCue(r)};i["default"]=n,t.exports=i["default"]},{}],73:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;in);r++);return e.slice(r)};i.gopsSafeToAlignWith=S;var w=function(e,t,i){if(!t.length)return e;if(i)return t.slice();var n=t[0].pts,r=0;for(r;r=n);r++);return e.slice(0,r).concat(t)};i.updateGopBuffer=w;var k=function(e,t,i,n){for(var r=Math.ceil(9e4*(t-n)),a=Math.ceil(9e4*(i-n)),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=r););return u=Math.max(u,0),s.splice(u,o-u+1),s};i.removeGopBuffer=k;var O=function(e){function t(e,i){var n=this;r(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,d["default"].EventTarget),this.timestampOffset_=0,this.pendingBuffers_=[],this.bufferUpdating_=!1,this.mediaSource_=e,this.codecs_=i,this.audioCodec_=null,this.videoCodec_=null,this.audioDisabled_=!1,this.appendAudioInitSegment_=!0,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=d["default"].browser.IE_VERSION>=11;var a={remux:!1,alignGopsAtEnd:this.safeAppend_};this.codecs_.forEach(function(e){(0,v.isAudioCodec)(e)?n.audioCodec_=e:(0,v.isVideoCodec)(e)&&(n.videoCodec_=e)}),this.transmuxer_=(0,g["default"])(_["default"],b()),this.transmuxer_.postMessage({action:"init",options:a}),this.transmuxer_.onmessage=function(e){return"data"===e.data.action?n.data_(e):"done"===e.data.action?n.done_(e):"gopInfo"===e.data.action?n.appendGopInfo_(e):void 0},Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&e>=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(this,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(this,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(this,"buffered",{get:function(){var e=null,t=null,i=0,n=[],r=[];if(!this.videoBuffer_&&!this.audioBuffer_)return d["default"].createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_)return this.videoBuffer_.buffered;if(this.audioDisabled_)return this.videoBuffer_.buffered;if(0===this.videoBuffer_.buffered.length&&0===this.audioBuffer_.buffered.length)return d["default"].createTimeRange();for(var a=this.videoBuffer_.buffered,s=this.audioBuffer_.buffered,o=a.length;o--;)n.push({time:a.start(o),type:"start"}),n.push({time:a.end(o),type:"end"});for(o=s.length;o--;)n.push({time:s.start(o),type:"start"}),n.push({time:s.end(o),type:"end"});for(n.sort(function(e,t){return e.time-t.time}),o=0;o0?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){w["default"].log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return t.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return t.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return t.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return t.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return t.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return t.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return t.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return t.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",function(){(0,L["default"])(t)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.tech_.ready(function(){return t.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(w["default"].URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var e=this,t=w["default"].players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){j(e.qualityLevels_,e)}),this.playlists.on("mediachange",function(){B(e.qualityLevels_,e.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),o(Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}}]),t}(N),q=function H(e){return{canHandleSource:function(t){var i=arguments.length<=1||arguments[1]===undefined?{}:arguments[1],n=w["default"].mergeOptions(w["default"].options,i);return(!n.hls||!n.hls.mode||n.hls.mode===e)&&H.canPlayType(t.type,n)},handleSource:function(t,i){var n=arguments.length<=2||arguments[2]===undefined?{}:arguments[2],r=w["default"].mergeOptions(w["default"].options,n,{hls:{mode:e}});return"flash"===e&&i.setTimeout(function(){i.trigger("loadstart")},1),i.hls=new F(t,i,r),i.hls.xhr=(0,m["default"])(),i.hls.src(t.src),i.hls},canPlayType:function(e){var t=arguments.length<=1||arguments[1]===undefined?{}:arguments[1],i=w["default"].mergeOptions(w["default"].options,t);return H.canPlayType(e,i)?"maybe":""}}};q.canPlayType=function(e,t){if(w["default"].browser.IE_VERSION&&w["default"].browser.IE_VERSION<=10)return!1;var i=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;return!(!t.hls.overrideNative&&x.supportsNativeHls)&&i.test(e)},"undefined"!=typeof w["default"].MediaSource&&"undefined"!=typeof w["default"].URL||(w["default"].MediaSource=v.MediaSource,w["default"].URL=v.URL);var G=w["default"].getTech("Flash");v.MediaSource.supportsNativeMediaSources()&&w["default"].getTech("Html5").registerSourceHandler(q("html5"),0),I["default"].Uint8Array&&G&&G.registerSourceHandler(q("flash")),w["default"].HlsHandler=F,w["default"].HlsSourceHandler=q,w["default"].Hls=x,w["default"].use||w["default"].registerComponent("Hls",x),w["default"].m3u8=T["default"],w["default"].options.hls=w["default"].options.hls||{},w["default"].registerPlugin?w["default"].registerPlugin("reloadSourceOnError",D["default"]):w["default"].plugin("reloadSourceOnError",D["default"]),t.exports={Hls:x,HlsHandler:F,HlsSourceHandler:q}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[77]);
+!function e(t,i,n){function r(s,o){if(!i[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var l=i[s]={exports:{}};t[s][0].call(l.exports,function(e){var i=t[s][1][e];return r(i||e)},l,l.exports,e,t,i,n)}return i[s].exports}for(var a="function"==typeof require&&require,s=0;s=r.adStartTime&&t<=r.adEndTime)return r}return null},o=function(e,t){var i=arguments.length<=2||arguments[2]===undefined?0:arguments[2];if(e.segments)for(var r=i,o=undefined,u=0;u=32&&e<126?String.fromCharCode(e):"."},s=function(e){var t={};return Object.keys(e).forEach(function(i){var n=e[i];ArrayBuffer.isView(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n}),t},o=function(e){var t=e.byterange||{length:Infinity,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},u={hexDump:function(e){for(var t=Array.prototype.slice.call(e),i="",n=undefined,s=undefined,o=0;o1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var t=e.selectPlaylist(),i=e.masterPlaylistLoader_.media(),n=e.tech_.buffered(),r=n.length?n.end(n.length-1)-e.tech_.currentTime():0,a=e.bufferLowWaterLine();(!i.endList||e.duration()=a)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){e.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(t){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})}),this.audioSegmentLoader_.on("ended",function(){e.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"fastQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_()&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===Infinity&&this.tech_.currentTime()e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=_["default"].createTimeRanges([[t.start(0)>e.start(0)?t.start(0):e.start(0),t.end(0)0&&(i=Math.max(i,n.end(n.length-1))),t!==i&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",r):r())}},{key:"dispose",value:function(){var e=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(t){var i=e.mediaTypes_[t].groups;for(var n in i)i[n].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e=this.masterPlaylistLoader_.media(),t=undefined;if(e&&"open"===this.mediaSource.readyState){if(t=q(this.masterPlaylistLoader_.master,e),t.length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.mainSegmentLoader_.mimeType(t[0]),t[1]&&this.audioSegmentLoader_.mimeType(t[1]),this.excludeIncompatibleVariants_(e)}}},{key:"excludeIncompatibleVariants_",value:function(e){var t=this.masterPlaylistLoader_.master,i=2,n=null,r=undefined;e.attributes.CODECS&&(r=(0,I.parseCodecs)(e.attributes.CODECS),n=r.videoCodec,i=r.codecCount),t.playlists.forEach(function(e){var t={codecCount:2,videoCodec:null};if(e.attributes.CODECS){var r=e.attributes.CODECS;t=(0,I.parseCodecs)(r),window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+B(r)+'"')&&(e.excludeUntil=Infinity)}t.codecCount!==i&&(e.excludeUntil=Infinity),t.videoCodec!==n&&(e.excludeUntil=Infinity)})}},{key:"updateAdCues_",value:function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),b["default"].updateAdCues(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=P["default"].GOAL_BUFFER_LENGTH,i=P["default"].GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,P["default"].MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=P["default"].BUFFER_LOW_WATER_LINE,i=P["default"].BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,P["default"].MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,n)}}]),t}(_["default"].EventTarget);i.MasterPlaylistController=G}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,i){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(i,"__esModule",{value:!0});var r="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,a=n(r),s=e(9),o=n(s),u=function(){},d=function(e){var t=e["default"]?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},l=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)};i.stopLoaders=l;var f=function(e,t){t.activePlaylistLoader=e,e.load()};i.startLoaders=f;var c=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;if(l(n,a),o){if(!o.playlistLoader)return void(u&&r.resetEverything());n.resyncLoader(),f(o.playlistLoader,a)}}};i.onGroupChanged=c;var h=function(e,t){return function(){var i=t.segmentLoaders,n=i[e],r=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.activeGroup(s),u=a.activePlaylistLoader;if(l(n,a),o){if(!o.playlistLoader)return void r.resetEverything();if(u===o.playlistLoader)return void f(o.playlistLoader,a);n.track&&n.track(s),n.resetEverything(),f(o.playlistLoader,a)}}};i.onTrackChanged=h;var p={AUDIO:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;l(i,n);var s=n.activeTrack(),o=n.activeGroup(),u=(o.filter(function(e){return e["default"]})[0]||o[0]).id,d=n.tracks[u];if(s===d)return void r({message:"Problem encountered loading the default audio track."});a["default"].log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var f in n.tracks)n.tracks[f].enabled=n.tracks[f]===d;n.onTrackChanged()}},SUBTITLES:function(e,t){return function(){var i=t.segmentLoaders[e],n=t.mediaTypes[e];a["default"].log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),l(i,n);var r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}};i.onError=p;var m={AUDIO:function(e,t,i){if(t){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",p[e](e,i))}},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",p[e](e,i))}};i.setupListeners=m;var g={AUDIO:function(e,t){var i=t.mode,n=t.hls,r=t.segmentLoaders[e],s=t.requestOptions.withCredentials,u=t.master.mediaGroups,l=t.mediaTypes[e],f=l.groups,c=l.tracks;u[e]&&0!==Object.keys(u[e]).length&&"html5"===i||(u[e]={main:{"default":{"default":!0}}});for(var h in u[e]){f[h]||(f[h]=[]);for(var g in u[e][h]){var y=u[e][h][g],_=undefined;if(_=y.resolvedUri?new o["default"](y.resolvedUri,n,s):null,y=a["default"].mergeOptions({id:g,playlistLoader:_},y),m[e](e,y.playlistLoader,t),f[h].push(y),"undefined"==typeof c[g]){var v=new a["default"].AudioTrack({id:g,kind:d(y),enabled:!1,language:y.language,"default":y["default"],label:g});c[g]=v}}}r.on("error",p[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,n=t.hls,r=t.segmentLoaders[e],s=t.requestOptions.withCredentials,u=t.master.mediaGroups,d=t.mediaTypes[e],l=d.groups,f=d.tracks;for(var c in u[e]){l[c]||(l[c]=[]);for(var h in u[e][c])if(!u[e][c][h].forced){var g=u[e][c][h];if(g=a["default"].mergeOptions({id:h,playlistLoader:new o["default"](g.resolvedUri,n,s)},g),m[e](e,g.playlistLoader,t),l[c].push(g),"undefined"==typeof f[h]){var y=i.addRemoteTextTrack({id:h,kind:"subtitles",enabled:!1,language:g.language,label:h},!1).track;f[h]=y}}}r.on("error",p[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],s=r.groups,o=r.tracks;for(var u in n[e]){s[u]||(s[u]=[]);for(var d in n[e][u]){var l=n[e][u][d];if(l.instreamId.match(/CC\d/)&&(s[u].push(a["default"].mergeOptions({id:d},l)),"undefined"==typeof o[d])){var f=i.addRemoteTextTrack({id:l.instreamId,kind:"captions",enabled:!1,language:l.language,label:d},!1).track;o[d]=f}}}}};i.initialize=g;var y=function(e,t){return function(i){var n=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,a=n.media();if(!a)return null;var s=null;return a.attributes[e]&&(s=r[a.attributes[e]]),s=s||r.main,void 0===i?s:null===i?null:s.filter(function(e){return e.id===i.id})[0]||null}};i.activeGroup=y;var _={AUDIO:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if(i[n].enabled)return i[n];return null}},SUBTITLES:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var n in i)if("showing"===i[n].mode)return i[n];return null}}};i.activeTrack=_;var v=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){g[t](t,e)});var t=e.mediaTypes,i=e.masterPlaylistLoader,n=e.tech,r=e.hls;["AUDIO","SUBTITLES"].forEach(function(i){t[i].activeGroup=y(i,e),t[i].activeTrack=_[i](i,e),t[i].onGroupChanged=c(i,e),t[i].onTrackChanged=h(i,e)});var a=t.AUDIO.activeGroup(),s=(a.filter(function(e){return e["default"]})[0]||a[0]).id;t.AUDIO.tracks[s].enabled=!0,t.AUDIO.onTrackChanged(),i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return t[e].onGroupChanged()})});var o=function(){t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})};n.audioTracks().addEventListener("change",o),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){n.audioTracks().removeEventListener("change",o),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(var u in t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[u])};i.setupMediaGroups=v;var b=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:u,activeTrack:u,onGroupChanged:u,onTrackChanged:u}}),e};i.createMediaTypes=b}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(e,t,i){(function(t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,r=function(e){return e&&e.__esModule?e:{"default":e}}(n),a=e(2),s={FAILURE:2,TIMEOUT:-101,ABORTED:-102};i.REQUEST_ERRORS=s;var o=function(e){var t=(undefined,undefined);return t=e.offset+e.length-1,"bytes="+e.offset+"-"+t},u=function(e){var t={};return e.byterange&&(t.Range=o(e.byterange)),t},d=function(e){e.forEach(function(e){e.abort()})},l=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}},f=function(e){var t=e.target,i=Date.now()-t.requestTime,n={bandwidth:Infinity,bytesReceived:0,roundTripTime:i||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},c=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:s.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:s.ABORTED,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:s.FAILURE,xhr:t}:null},h=function(e,t){return function(i,n){var r=n.response,a=c(i,n);if(a)return t(a,e);if(16!==r.byteLength)return t({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:s.FAILURE,xhr:n},e);var o=new DataView(r);return e.key.bytes=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),t(null,e)}},p=function(e,t){return function(i,n){var r=n.response,a=c(i,n);return a?t(a,e):0===r.byteLength?t({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:s.FAILURE,xhr:n},e):(e.map.bytes=new Uint8Array(n.response),t(null,e))}},m=function(e,t){return function(i,n){var r=n.response,a=c(i,n);return a?t(a,e):0===r.byteLength?t({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:s.FAILURE,xhr:n},e):(e.stats=l(n),e.key?e.encryptedBytes=new Uint8Array(n.response):e.bytes=new Uint8Array(n.response),t(null,e))}},g=function(e,t,i){var n=function r(n){if(n.data.source===t.requestId){e.removeEventListener("message",r);var a=n.data.decrypted;return t.bytes=new Uint8Array(a.bytes,a.byteOffset,a.byteLength),i(null,t)}};e.addEventListener("message",n),e.postMessage((0,a.createTransferableMessage)({source:t.requestId,encrypted:t.encryptedBytes,key:t.key.bytes,iv:t.key.iv}),[t.encryptedBytes.buffer,t.key.bytes.buffer])},y=function(e){return e.reduce(function(e,t){return t.code>e.code?t:e})},_=function(e,t,i){var n=[],r=0;return function(a,s){if(a&&(d(e),n.push(a)),(r+=1)===e.length){if(s.endOfAllRequests=Date.now(),n.length>0){var o=y(n);return i(o,s)}return s.encryptedBytes?g(t,s,i):i(null,s)}}},v=function(e,t){return function(i){return e.stats=r["default"].mergeOptions(e.stats,f(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)}},b=function(e,t,i,n,a,s){var o=[],l=_(o,i,s);if(n.key){var f=r["default"].mergeOptions(t,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),c=h(n,l),g=e(f,c);o.push(g)}if(n.map&&!n.map.bytes){var y=r["default"].mergeOptions(t,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:u(n.map)}),b=p(n,l),T=e(y,b);o.push(T)}var S=r["default"].mergeOptions(t,{uri:n.resolvedUri,responseType:"arraybuffer",headers:u(n)}),w=m(n,l),k=e(S,w);return k.addEventListener("progress",v(n,a)),o.push(k),function(){return d(o)}};i.mediaSegmentRequest=b}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,t,i){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")
+ }Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i")),this.logger_("initialize");var n=function(){return i.monitorCurrentTime_()},r=function(){return i.techWaiting_()},s=function(){return i.cancelTimer_()},o=function(){return i.fixesBadSeeks_()};this.tech_.on("seekablechanged",o),this.tech_.on("waiting",r),this.tech_.on(h,s),this.tech_.on("canplay",n),this.dispose=function(){i.logger_("dispose"),i.tech_.off("seekablechanged",o),i.tech_.off("waiting",r),i.tech_.off(h,s),i.tech_.off("canplay",n),i.checkCurrentTimeTimeout_&&u["default"].clearTimeout(i.checkCurrentTimeTimeout_),i.cancelTimer_()}}return s(e,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&u["default"].clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=u["default"].setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+l["default"].SAFE_TIME_DELTA>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var e=this.tech_.seeking(),t=this.seekable(),i=this.tech_.currentTime(),n=undefined;if(e&&this.afterSeekableWindow_(t,i)){n=t.end(t.length-1)}if(e&&this.beforeSeekableWindow_(t,i)){n=t.start(0)+l["default"].SAFE_TIME_DELTA}return void 0!==n&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+l["default"].printableRange(t)+". Seeking to "+n+"."),this.tech_.setCurrentTime(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=l["default"].findRange(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),r=l["default"].findNextRange(n,t);if(this.videoUnderflow_(r,n,t))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(r.length>0){var a=r.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+r.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t){return!!e.length&&t>e.end(e.length-1)+l["default"].SAFE_TIME_DELTA}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t2)return{start:r,end:a}}return null}},{key:"logger_",value:function(){}}]),e}();i["default"]=p,t.exports=i["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(e,t,i){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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)}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){var i=this;this.request=null,this.state="HAVE_METADATA";var n=new c["default"].Parser;n.push(e.responseText),n.end(),n.manifest.uri=t,n.manifest.attributes=n.manifest.attributes||{};var r=y(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,r?(this.master=r,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(p["default"].clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=p["default"].setTimeout(function(){i.trigger("mediaupdatetimeout")},b(this.media(),!!r))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),p["default"].clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var n=!this.media_||e.uri!==this.media_.uri;if(this.master.playlists[e.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(n){if(this.state="SWITCHING_MEDIA",this.request){if((0,d["default"])(this.master.uri,e.uri)===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:(0,d["default"])(this.master.uri,e.uri),withCredentials:this.withCredentials},function(n,r){if(t.request){if(n)return t.playlistRequestError(t.request,e.uri,i);t.haveMetadata(r,e.uri),"HAVE_MASTER"===i?t.trigger("loadedmetadata"):t.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest(),p["default"].clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var t=this;p["default"].clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=p["default"].setTimeout(function(){return t.load()},n))}if(!this.started)return void this.start();i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}},{key:"start",value:function(){var e=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,i){if(e.request){if(e.request=null,t)return e.error={status:i.status,message:"HLS playlist request error at URL: "+e.srcUrl,responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");var n=new c["default"].Parser;return n.push(i.responseText),(n.end(),e.state="HAVE_MASTER",n.manifest.uri=e.srcUrl,n.manifest.playlists)?(e.master=n.manifest,_(e.master),v(e.master),e.trigger("loadedplaylist"),void(e.request||e.media(n.manifest.playlists[0]))):(e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:p["default"].location.href,playlists:[{uri:e.srcUrl}]},e.master.playlists[e.srcUrl]=e.master.playlists[0],e.master.playlists[0].resolvedUri=e.srcUrl,e.master.playlists[0].attributes=e.master.playlists[0].attributes||{},e.haveMetadata(i,e.srcUrl),e.trigger("loadedmetadata"))}})}}]),t}(l.EventTarget);i["default"]=T}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],10:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e(3),a=n(r),s=e(11),o=n(s),u=e(19),d=function(e,t){var i=undefined;return e?(i=window.getComputedStyle(e),i?i[t]:""):""},l=function(e,t){var i=e.slice();e.sort(function(e,n){var r=t(e,n);return 0===r?i.indexOf(e)-i.indexOf(n):r})},f=function(e,t){var i=undefined,n=undefined;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||window.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||window.Number.MAX_VALUE,i-n};i.comparePlaylistBandwidth=f;var c=function(e,t){var i=undefined,n=undefined;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||window.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||window.Number.MAX_VALUE,i===n&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n};i.comparePlaylistResolution=c;var h=function(e,t,i,n){var r=e.playlists.map(function(e){var t=undefined,i=undefined,n=undefined;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,n=e.attributes.BANDWIDTH,n=n||window.Number.MAX_VALUE,{bandwidth:n,width:t,height:i,playlist:e}});l(r,function(e,t){return e.bandwidth-t.bandwidth}),r=r.filter(function(e){return!o["default"].isIncompatible(e.playlist)});var s=r.filter(function(e){return o["default"].isEnabled(e.playlist)});s.length||(s=r.filter(function(e){return!o["default"].isDisabled(e.playlist)}));var u=s.filter(function(e){return e.bandwidth*a["default"].BANDWIDTH_VARIANCEi||e.height>n}),g=m.filter(function(e){return e.width===m[0].width&&e.height===m[0].height}),d=g[g.length-1],y=g.filter(function(e){return e.bandwidth===d.bandwidth})[0]);var _=y||p||f||s[0]||r[0];return _?_.playlist:null};i.simpleSelector=h;var p=function(){return h(this.playlists.master,this.systemBandwidth,parseInt(d(this.tech_.el(),"width"),10),parseInt(d(this.tech_.el(),"height"),10))};i.lastBandwidthSelector=p;var m=function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,h(this.playlists.master,t,parseInt(d(this.tech_.el(),"width"),10),parseInt(d(this.tech_.el(),"height"),10))}};i.movingAverageBandwidthSelector=m;var g=function(e){var t=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,u=e.currentTimeline,d=e.syncController,c=t.playlists.filter(function(e){return!o["default"].isIncompatible(e)}),h=c.filter(o["default"].isEnabled);h.length||(h=c.filter(function(e){return!o["default"].isDisabled(e)}));var p=h.filter(o["default"].hasAttribute.bind(null,"BANDWIDTH")),m=p.map(function(e){var t=d.getSyncPoint(e,r,u,i),l=t?1:2;return{playlist:e,rebufferingImpact:o["default"].estimateSegmentRequestTime(a,n,e)*l-s}}),g=m.filter(function(e){return e.rebufferingImpact<=0});return l(g,function(e,t){return f(t.playlist,e.playlist)}),g.length?g[0]:(l(m,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),m[0]||null)};i.minRebufferMaxBandwidthSelector=g;var y=function(){var e=this.playlists.master.playlists.filter(o["default"].isEnabled);return l(e,function(e,t){return f(e,t)}),e.filter(function(e){return(0,u.parseCodecs)(e.attributes.CODECS).videoCodec})[0]||null};i.lowestBitrateCompatibleVariantSelector=y},{}],11:[function(e,t,i){(function(t){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,r=e(32),a=function(e){return e&&e.__esModule?e:{"default":e}}(r),s=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if("undefined"!=typeof r.start)return{result:r.start,precise:!0};if("undefined"!=typeof r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(r=e.segments[n],"undefined"!=typeof r.end)return{result:i+r.end,precise:!0};if(i+=r.duration,"undefined"!=typeof r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}},o=function(e,t){for(var i=0,n=undefined,r=t-e.mediaSequence;ri){var r=[i,t];t=r[0],i=r[1]}if(t<0){for(var a=t;a=n););return Math.max(0,t)};i.safeLiveIndex=f;var c=function(e,t,i){if(!e||!e.segments)return null;if(e.endList)return d(e);if(null===t)return null;t=t||0;var n=i?f(e):e.segments.length;return u(e,e.mediaSequence+n,t)};i.playlistEnd=c;var h=function(e,t){var i=t||0,r=c(e,t,!0);return null===r?(0,n.createTimeRange)():(0,n.createTimeRange)(i,r)};i.seekable=h;var p=function(e){return e-Math.floor(e)==0},m=function(e,t){if(p(t))return t+.1*e;for(var i=t.toString().split(".")[1].length,n=1;n<=i;n++){var r=Math.pow(10,n),a=t*r;if(p(a)||n===i)return(a+e)/r}},g=m.bind(null,1),y=m.bind(null,-1),_=function(e,t,i,n){var r=undefined,a=undefined,s=e.segments.length,o=t-n;if(o<0){if(i>0)for(r=i-1;r>=0;r--)if(a=e.segments[r],(o+=y(a.duration))>0)return{mediaIndex:r,startTime:n-l(e,i,r)};return{mediaIndex:0,startTime:t}}if(i<0){for(r=i;r<0;r++)if((o-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(r=i;rDate.now()};i.isBlacklisted=v;var b=function(e){return e.excludeUntil&&e.excludeUntil===Infinity};i.isIncompatible=b;var T=function(e){var t=v(e);return!e.disabled&&!t};i.isEnabled=T;var S=function(e){return e.disabled};i.isDisabled=S;var w=function(e){for(var t=0;t=t})},d=function(e,t){return o(e,function(e){return e-1/30>=t})},l=function(e){if(e.length<2)return a["default"].createTimeRanges();for(var t=[],i=1;i=r};if(e)for(i=0;i "+e.end(i));return t.join(", ")},g=function(e,t){var i=arguments.length<=2||arguments[2]===undefined?1:arguments[2];return((e.length?e.end(e.length-1):0)-t)/i};i["default"]={findRange:u,findNextRange:d,findGaps:l,findSoleUncommonTimeRangesEnd:f,getSegmentBufferedPercent:p,TIME_FUDGE_FACTOR:1/30,SAFE_TIME_DELTA:.1,printableRange:m,timeUntilRebuffer:g},t.exports=i["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(e,t,i){(function(e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n="undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null,r=function(e){return e&&e.__esModule?e:{"default":e}}(n),a={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},s=function u(e,t){var i=0,n=0,s=r["default"].mergeOptions(a,t);e.ready(function(){e.trigger({type:"usage",name:"hls-error-reload-initialized"})});var o=function(){n&&e.currentTime(n)},d=function(t){null!==t&&t!==undefined&&(n=e.duration()!==Infinity&&e.currentTime()||0,e.one("loadedmetadata",o),e.src(t),e.trigger({type:"usage",name:"hls-error-reload"}),e.play())},l=function(){return Date.now()-i<1e3*s.errorInterval?void e.trigger({type:"usage",name:"hls-error-reload-canceled"}):s.getSource&&"function"==typeof s.getSource?(i=Date.now(),s.getSource.call(e,d)):void r["default"].log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},f=function h(){e.off("loadedmetadata",o),e.off("error",l),e.off("dispose",h)},c=function(t){f(),u(e,t)};e.on("error",l),e.on("dispose",f),e.reloadSourceOnError=c},o=function(e){s(this,e)};i["default"]=o,t.exports=i["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var r=e(11),a=function(e,t,i){return function(n){var a=e.master.playlists[t],s=(0,r.isIncompatible)(a),o=(0,r.isEnabled)(a);return void 0===n?o:(n?delete a.disabled:a.disabled=!0,n===o||s||(i(),n?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),n)}},s=function u(e,t,i){n(this,u);var r=e.masterPlaylistController_.fastQualityChange_.bind(e.masterPlaylistController_);if(t.attributes.RESOLUTION){var s=t.attributes.RESOLUTION;this.width=s.width,this.height=s.height}this.bandwidth=t.attributes.BANDWIDTH,this.id=i,this.enabled=a(e.playlists,t.uri,r)},o=function(e){var t=e.playlists;e.representations=function(){return t.master.playlists.filter(function(e){return!(0,r.isIncompatible)(e)}).map(function(t,i){return new s(e,t,t.uri)})}};i["default"]=o,t.exports=i["default"]},{}],15:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(i,"__esModule",{value:!0});var r=e(63),a=n(r),s=e(32),o=n(s),u=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=a["default"].buildAbsoluteURL(o["default"].location.href,e)),a["default"].buildAbsoluteURL(e,t))};i["default"]=u,t.exports=i["default"]},{}],16:[function(e,t,i){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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)}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i0&&e.start(0)"))}return a(t,e),s(t,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_()}},{key:"abort",value:function(){if("WAITING"!==this.state)return void(this.pendingSegment_&&(this.pendingSegment_=null));this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return void 0!==e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():f["default"].createTimeRanges()}},{key:"initSegment",value:function(e){var t=!(arguments.length<=1||arguments[1]===undefined)&&arguments[1];if(!e)return null;var i=(0,b.initSegmentId)(e),n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes}),n||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),
+ this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new h["default"](this.mediaSource_,this.mimeType_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=arguments.length<=1||arguments[1]===undefined?{}:arguments[1];if(e){var i=this.playlist_,n=this.pendingSegment_;if(this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0}),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return void(null!==this.mediaIndex&&this.resyncLoader());var r=e.mediaSequence-i.mediaSequence;this.logger_("mediaSequenceDiff",r),null!==this.mediaIndex&&(this.mediaIndex-=r),n&&(n.mediaIndex-=r,n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,e)}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(y["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e){this.mimeType_||(this.mimeType_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_()),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t){this.sourceUpdater_&&this.sourceUpdater_.remove(e,t),(0,v["default"])(e,t,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&y["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y["default"].setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&y["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y["default"].setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e){if(k(this.playlist_,this.mediaSource_,e.mediaIndex))return void this.endOfStream();(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment=this.goalBufferLength_())return null;if(!n&&u>=1)return null;if(this.logger_("checkBuffer_","mediaIndex:",i,"hasPlayed:",n,"currentTime:",r,"syncPoint:",a,"fetchAtBuffer:",this.fetchAtBuffer_,"bufferedTime:",u),null===a)return i=this.getSyncSegmentCandidate_(t),this.logger_("getSync","mediaIndex:",i),this.generateSegmentInfo_(t,i,null,!0);if(null!==i){this.logger_("walkForward","mediaIndex:",i+1);var l=t.segments[i];return o=l&&l.end?l.end:s,this.generateSegmentInfo_(t,i+1,o,!1)}if(this.fetchAtBuffer_){var f=d["default"].getMediaInfoForTime(t,s,a.segmentIndex,a.time);i=f.mediaIndex,o=f.startTime}else{var f=d["default"].getMediaInfoForTime(t,r,a.segmentIndex,a.time);i=f.mediaIndex,o=f.startTime}return this.logger_("getMediaIndexForTime","mediaIndex:",i,"startOfSegment:",o),this.generateSegmentInfo_(t,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var i=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===t.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,i,n){if(t<0||t>=e.segments.length)return null;var r=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=d["default"].estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),a=(0,S.timeUntilRebuffer)(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(r<=a)return!1;var s=(0,w.minRebufferMaxBandwidthSelector)({master:this.hls_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a,u=o-s.rebufferingImpact,l=.5;return a<=S.TIME_FUDGE_FACTOR&&(l=1),!s.playlist||s.playlist.uri===this.playlist_.uri||u0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var n=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key={resolvedUri:t.key.resolvedUri,iv:n}}return t.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),!this.pendingSegment_)return void(this.mediaRequestsAborted+=1);if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===T.REQUEST_ERRORS.ABORTED?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===T.REQUEST_ERRORS.TIMEOUT?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),this.processSegmentResponse_(t)}}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(!this.pendingSegment_)return void(this.state="READY");var t=this.pendingSegment_,i=t.segment,n=this.syncController_.probeSegmentInfo(t);"undefined"==typeof this.startingMedia_&&n&&(n.containsAudio||n.containsVideo)&&(this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo});var r=E(this.loaderType_,this.startingMedia_,n);if(r)return this.error({message:r,blacklistDuration:Infinity}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset"));var a=this.syncController_.mappingForTimeline(t.timeline);null!==a&&this.trigger({type:"segmenttimemapping",mapping:a}),this.state="APPENDING",i.map&&function(){var t=(0,b.initSegmentId)(i.map);if(!e.activeInitSegmentId_||e.activeInitSegmentId_!==t){var n=e.initSegment(i.map);e.sourceUpdater_.appendBuffer(n.bytes,function(){e.activeInitSegmentId_=t})}}(),t.byteLength=t.bytes.byteLength,"number"==typeof i.start&&"number"==typeof i.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.sourceUpdater_.appendBuffer(t.bytes,this.handleUpdateEnd_.bind(this))}},{key:"handleUpdateEnd_",value:function(){if(this.logger_("handleUpdateEnd_","segmentInfo:",this.pendingSegment_),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,i=null!==this.mediaIndex;if(this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration)return void this.resetEverything();i&&this.trigger("bandwidthupdate"),this.trigger("progress"),k(e.playlist,this.mediaSource_,e.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_()}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},{key:"logger_",value:function(){}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,n=t.end;if(O(i)&&O(n)){(0,v["default"])(i,n,this.segmentMetadataTrack_);var r=y["default"].WebKitDataCue||y["default"].VTTCue,a={bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.uri,start:i,end:n},s=JSON.stringify(a),o=new r(i,n,s);o.value=a,this.segmentMetadataTrack_.addCue(o)}}}}]),t}(f["default"].EventTarget);i["default"]=L}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t,i){(function(e){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i=l)&&(o=l,s={time:d.start,segmentIndex:u})}}return s}},{name:"Discontinuity",run:function(e,t,i,n,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o=f)&&(s=f,a={time:l.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(e,t,i,n,r){if(t.syncInfo){return{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}}return null}}];i.syncPointStrategies=p;var m=function(e){function t(){var e=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];r(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.inspectCache_=undefined,this.timelines=[],this.discontinuities=[],this.datetimeToDisplayTime=null,e.debug&&(this.logger_=h["default"].log.bind(h["default"],"sync-controller ->"))}return a(t,e),s(t,[{key:"getSyncPoint",value:function(e,t,i,n){var r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+(0,f.sumDurations)(e,n.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,i,n){for(var r=[],a=0;a:",o))}return r}},{key:"selectSyncPoint_",value:function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a chosen: ",i),i}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var i=t.mediaSequence-e.mediaSequence,n=i-1;n>=0;n--){var r=e.segments[n];if(r&&"undefined"!=typeof r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist sync:",t.syncInfo),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.dateTimeObject){var t=e.dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=undefined}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,i=e.playlist,n=undefined;return n=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e),n&&this.calculateSegmentTimeMapping_(e,n)&&(this.saveDiscontinuitySyncInfo_(e),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:t.start})),n}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,i=d["default"].timescale(t.map.bytes),n=d["default"].startTime(i,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=n),{start:n,end:n+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=(0,l.inspect)(e.bytes,this.inspectCache_),i=undefined,n=undefined;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,n=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,n=t.audio[1].dtsTime),{start:i,end:n,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var i=e.segment,n=this.timelines[e.timeline];if(null!==e.timestampOffset)this.logger_("tsO:",e.timestampOffset),n={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=n,this.trigger("timestampoffset"),i.start=e.startOfSegment,i.end=t.end+n.mapping;else{if(!n)return!1;i.start=t.start+n.mapping,i.end=t.end+n.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts.length)for(var n=0;no){var u=undefined;u=s<0?i.start-(0,f.sumDurations)(t,e.mediaIndex,r):i.end+(0,f.sumDurations)(t,e.mediaIndex+1,r),this.discontinuities[a]={time:u,accuracy:o}}}}},{key:"logger_",value:function(){}}]),t}(h["default"].EventTarget);i["default"]=m}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=function(){var e=arguments.length<=0||arguments[0]===undefined?"":arguments[0],t={codecCount:0},i=undefined;return t.codecCount=e.split(",").length,t.codecCount=t.codecCount||2,i=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(e),i&&(t.videoCodec=i[2],t.videoObjectTypeIndicator=i[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(e),t.audioProfile=t.audioProfile&&t.audioProfile[2],t};i.parseCodecs=n},{}],20:[function(e,t,i){(function(n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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)}Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i>7))^a]=a;for(s=o=0;!n[s];s^=l||1,o=d[o]||1)for(h=o^o<<1^o<<2^o<<3^o<<4,h=h>>8^255&h^99,n[s]=h,r[h]=s,c=u[f=u[l=u[s]]],m=16843009*c^65537*f^257*l^16843008*s,p=257*u[h]^16843008*h,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][h]=m=m<<24^m>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e},s=null,o=function(){function e(t){n(this,e),s||(s=a()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];var i=undefined,r=undefined,o=undefined,u=undefined,d=undefined,l=this._tables[0][4],f=this._tables[1],c=t.length,h=1;if(4!==c&&6!==c&&8!==c)throw new Error("Invalid aes key size");for(u=t.slice(0),d=[],this._key=[u,d],i=c;i<4*c+28;i++)o=u[i-1],(i%c==0||8===c&&i%c==4)&&(o=l[o>>>24]<<24^l[o>>16&255]<<16^l[o>>8&255]<<8^l[255&o],i%c==0&&(o=o<<8^o>>>24^h<<24,h=h<<1^283*(h>>7))),u[i]=u[i-c]^o;for(r=0;i;r++,i--)o=u[3&r?i:i-4],d[r]=i<=4||r<4?o:f[0][l[o>>>24]]^f[1][l[o>>16&255]]^f[2][l[o>>8&255]]^f[3][l[255&o]]}return r(e,[{key:"decrypt",value:function(e,t,i,n,r,a){var s=this._key[1],o=e^s[0],u=n^s[1],d=i^s[2],l=t^s[3],f=undefined,c=undefined,h=undefined,p=s.length/4-2,m=undefined,g=4,y=this._tables[1],_=y[0],v=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m>>24]^v[u>>16&255]^b[d>>8&255]^T[255&l]^s[g],c=_[u>>>24]^v[d>>16&255]^b[l>>8&255]^T[255&o]^s[g+1],h=_[d>>>24]^v[l>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],l=_[l>>>24]^v[o>>16&255]^b[u>>8&255]^T[255&d]^s[g+3],g+=4,o=f,u=c,d=h;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[d>>8&255]<<8^S[255&l]^s[g++],f=o,o=u,u=d,d=l,l=f}}]),e}();i["default"]=o,t.exports=i["default"]},{}],23:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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)}Object.defineProperty(i,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i>8|e>>>24},c=function(e,t,i){var n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new o["default"](Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),u=undefined,d=undefined,l=undefined,c=undefined,h=undefined,p=undefined,m=undefined,g=undefined,y=undefined;for(u=i[0],d=i[1],l=i[2],c=i[3],y=0;y-1)}},{key:"trigger",value:function(e){var t=undefined,i=undefined,n=undefined,r=undefined;if(t=this.listeners[e])if(2===arguments.length)for(n=t.length,i=0;i-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}]),t}(u["default"]);i["default"]=d},{}],35:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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}function a(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)}Object.defineProperty(i,"__esModule",{value:!0});var s=function(){function e(e,t){var i=[],n=!0,r=!1,a=undefined;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(u){r=!0,a=u}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw a}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var i=0;i0&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key:function(){return e.attributes?"NONE"===e.attributes.METHOD?void(d=null):e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),d={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void("undefined"!=typeof e.attributes.IV&&(d.iv=e.attributes.IV))):void this.trigger("warn",{message:"ignoring key declaration without URI"}):void this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){if(!isFinite(e.number))return void this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number});this.manifest.mediaSequence=e.number},"discontinuity-sequence":function(){if(!isFinite(e.number))return void this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number});this.manifest.discontinuitySequence=e.number,h=e.number},"playlist-type":function(){if(!/VOD|EVENT/.test(e.playlistType))return void this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist});this.manifest.playlistType=e.playlistType},map:function(){u={},e.uri&&(u.uri=e.uri),e.byterange&&(u.byterange=e.byterange)},"stream-inf":function(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||f,!e.attributes)return void this.trigger("warn",{message:"ignoring empty stream-inf attributes"});s.attributes||(s.attributes={}),o(s.attributes,e.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||f,!(e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});var i=this.manifest.mediaGroups[e.attributes.TYPE];i[e.attributes["GROUP-ID"]]=i[e.attributes["GROUP-ID"]]||{},t=i[e.attributes["GROUP-ID"]],r={"default":/yes/i.test(e.attributes.DEFAULT)},r["default"]?r.autoselect=!0:r.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(r.language=e.attributes.LANGUAGE),e.attributes.URI&&(r.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(r.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(r.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(r.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=r},discontinuity:function(){h+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time":function(){this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject},targetduration:function(){if(!isFinite(e.duration)||e.duration<0)return void this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration});this.manifest.targetDuration=e.duration},totalduration:function(){if(!isFinite(e.duration)||e.duration<0)return void this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration});this.manifest.totalDuration=e.duration},"cue-out":function(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data}})[e.tagType]||l).call(i)},uri:function(){s.uri=e.uri,n.push(s),!this.manifest.targetDuration||"duration"in s||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),d&&(s.key=d),s.timeline=h,u&&(s.map=u),s={}},comment:function(){}})[e.type].call(i)}),e}return s(t,e),u(t,[{key:"push",value:function(e){this.lineStream.push(e)}},{key:"end",value:function(){this.lineStream.push("\n")}}]),t}(l["default"]);i["default"]=m},{}],37:[function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i-1}},{key:"trigger",value:function(e){var t=this.listeners[e],i=void 0,n=void 0,r=void 0;if(t)if(2===arguments.length)for(n=t.length,i=0;i>4?i+20:i+10},this.parseAdtsSize=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},this.push=function(i){var n,r,a,s,o=0,u=0;for(e.length?(s=e.length,e=new Uint8Array(i.byteLength+s),e.set(e.subarray(0,s)),e.set(i,s)):e=i;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(!0&e[u]&&240==(240&e[u+1])){if(e.length-u<7)break;if((o=this.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else u++;else{if(e.length-u<10)break;if((o=this.parseId3TagSize(e,u))>e.length)break;r={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",r),u+=o}n=e.length-u,e=n>0?e.subarray(u):new Uint8Array}},n.prototype=new r,t.exports=n},{}],39:[function(e,t,i){"use strict";var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},a=function(e,t,i){var n,r="";for(n=t;n>4?i+20:i+10},u=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},d=function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},l=function(e){for(var t=0;t+5>>2];t++}return null},f=function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=r(e.subarray(10,14)));do{if((i=r(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var a=0;a>>2;return d*=4,d+=3&u[7]}break}}t+=10,t+=i}while(t>5,o=1024*(1+(3&e[d+6])),u=9e4*o/a[(60&e[d+2])>>>2],r=d+i,e.byteLength>>6&3),channelcount:(1&e[d+2])<<2|(192&e[d+3])>>>6,samplerate:a[(60&e[d+2])>>>2],samplingfrequencyindex:(60&e[d+2])>>>2,samplesize:16,data:e.subarray(d+7+n,r)}),e.byteLength===r)return void(e=undefined);l++,e=e.subarray(r)}else d++},this.flush=function(){this.trigger("done")}},n.prototype=new r,t.exports=n},{}],41:[function(e,t,i){"use strict";var n,r,a,s=e(62),o=e(61);r=function(){var e,t,i=0;r.prototype.init.call(this),this.push=function(n){var r;for(t?(r=new Uint8Array(t.byteLength+n.data.byteLength),r.set(t),r.set(n.data,t.byteLength),t=r):t=n.data;i3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")}},r.prototype=new s,a={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},n=function(){var e,t,i,s,u,d,l,f=new r;n.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,s=e.dts,f.push(e))},f.on("data",function(n){var r={trackId:t,pts:i,dts:s,data:n};switch(31&n[0]){case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp",r.escapedRBSP=u(n.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp",r.escapedRBSP=u(n.subarray(1)),r.config=d(r.escapedRBSP);break;case 8:r.nalUnitType="pic_parameter_set_rbsp";break;case 9:r.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",r)}),f.on("done",function(){e.trigger("done")}),this.flush=function(){f.flush()},l=function(e,t){var i,n,r=8,a=8;for(i=0;i0)throw new Error("Attempted to create new NAL wihout closing the old one");r=this.length,this.length+=4,this.position=this.length},this.endNalUnit=function(e){var t,i;this.length===r+4?this.length-=4:r>0&&(t=r+4,i=this.length-t,this.position=r,this.view.setUint32(this.position,i),this.position=this.length,e&&e.push(this.bytes.subarray(t,t+i))),r=0},this.writeMetaDataDouble=function(e,t){var i;if(s(this,2+e.length+9),this.view.setUint16(this.position,e.length),this.position+=2,"width"===e)this.bytes.set(o,this.position),this.position+=5;else if("height"===e)this.bytes.set(u,this.position),this.position+=6;else if("videocodecid"===e)this.bytes.set(d,this.position),this.position+=12;else for(i=0;i>>16,this.bytes[14]=(65280&e)>>>8,this.bytes[15]=(255&e)>>>0;break;case n.AUDIO_TAG:this.bytes[11]=175,this.bytes[12]=t?0:1;break;case n.METADATA_TAG:this.position=11,this.view.setUint8(this.position,2),this.position++,this.view.setUint16(this.position,10),this.position+=2,this.bytes.set([111,110,77,101,116,97,68,97,116,97],this.position),this.position+=10,this.bytes[this.position]=8,this.position++,this.view.setUint32(this.position,r),this.position=this.length,this.bytes.set([0,0,9],this.position),this.position+=3,this.length=this.position}return i=this.length-11,this.bytes[1]=(16711680&i)>>>16,this.bytes[2]=(65280&i)>>>8,this.bytes[3]=(255&i)>>>0,this.bytes[4]=(16711680&this.dts)>>>16,this.bytes[5]=(65280&this.dts)>>>8,this.bytes[6]=(255&this.dts)>>>0,this.bytes[7]=(4278190080&this.dts)>>>24,this.bytes[8]=0,this.bytes[9]=0,this.bytes[10]=0,s(this,4),this.view.setUint32(this.length,this.length),this.length+=4,this.position+=4,this.bytes=this.bytes.subarray(0,this.length),this.frameTime=n.frameTime(this.bytes),this}},n.AUDIO_TAG=8,n.VIDEO_TAG=9,n.METADATA_TAG=18,n.isAudioFrame=function(e){return n.AUDIO_TAG===e[0]},n.isVideoFrame=function(e){return n.VIDEO_TAG===e[0]},n.isMetaData=function(e){return n.METADATA_TAG===e[0]},n.isKeyFrame=function(e){return n.isVideoFrame(e)?23===e[11]:!!n.isAudioFrame(e)||!!n.isMetaData(e)},n.frameTime=function(e){var t=e[4]<<16;return t|=e[5]<<8,t|=e[6]<<0,t|=e[7]<<24},t.exports=n},{}],46:[function(e,t,i){t.exports={tag:e(45),Transmuxer:e(48),getFlvHeader:e(44)}},{}],47:[function(e,t,i){"use strict";var n=function(){var e=this;this.list=[],this.push=function(e){this.list.push({bytes:e.bytes,dts:e.dts,pts:e.pts,keyFrame:e.keyFrame,metaDataTag:e.metaDataTag})},Object.defineProperty(this,"length",{get:function(){return e.list.length}})};t.exports=n},{}],48:[function(e,t,i){"use strict";var n,r,a,s,o,u,d=e(62),l=e(45),f=e(50),c=e(40),h=e(41).H264Stream,p=e(43),m=e(47);s=function(e,t){"number"==typeof t.pts&&(e.timelineStartInfo.pts===undefined?e.timelineStartInfo.pts=t.pts:e.timelineStartInfo.pts=Math.min(e.timelineStartInfo.pts,t.pts)),"number"==typeof t.dts&&(e.timelineStartInfo.dts===undefined?e.timelineStartInfo.dts=t.dts:e.timelineStartInfo.dts=Math.min(e.timelineStartInfo.dts,t.dts))},o=function(e,t){var i=new l(l.METADATA_TAG);return i.dts=t,i.pts=t,i.writeMetaDataDouble("videocodecid",7),i.writeMetaDataDouble("width",e.width),i.writeMetaDataDouble("height",e.height),i},u=function(e,t){var i,n=new l(l.VIDEO_TAG,!0);for(n.dts=t,n.pts=t,n.writeByte(1),n.writeByte(e.profileIdc),n.writeByte(e.profileCompatibility),n.writeByte(e.levelIdc),n.writeByte(255),n.writeByte(225),n.writeShort(e.sps[0].length),n.writeBytes(e.sps[0]),n.writeByte(e.pps.length),i=0;i=n[0]&&(s=n.shift(),this.writeMetaDataTags(o,s)),(e.extraData!==t||r.pts-s>=1e3)&&(this.writeMetaDataTags(o,r.pts),t=e.extraData,s=r.pts),a=new l(l.AUDIO_TAG),a.pts=r.pts,a.dts=r.dts,a.writeBytes(r.data),o.push(a.finalize());n.length=0,t=null,this.trigger("data",{track:e,tags:o.list}),this.trigger("done","AudioSegmentStream")},this.writeMetaDataTags=function(t,i){var n;n=new l(l.METADATA_TAG),n.pts=i,n.dts=i,n.writeMetaDataDouble("audiocodecid",10),n.writeMetaDataBoolean("stereo",2===e.channelcount),n.writeMetaDataDouble("audiosamplerate",e.samplerate),n.writeMetaDataDouble("audiosamplesize",16),t.push(n.finalize()),n=new l(l.AUDIO_TAG,!0),n.pts=i,n.dts=i,n.view.setUint16(n.position,e.extraData),n.position+=2,n.length=Math.max(n.length,n.position),t.push(n.finalize())},this.onVideoKeyFrame=function(e){n.push(e)}},a.prototype=new d,r=function(e){var t,i,n=[];r.prototype.init.call(this),this.finishFrame=function(n,r){if(r){if(t&&e&&e.newMetadata&&(r.keyFrame||0===n.length)){var a=o(t,r.dts).finalize(),s=u(e,r.dts).finalize();a.metaDataTag=s.metaDataTag=!0,n.push(a),n.push(s),e.newMetadata=!1,this.trigger("keyframe",r.dts)}r.endNalUnit(),n.push(r.finalize()),i=null}},this.push=function(t){s(e,t),t.pts=Math.round(t.pts/90),t.dts=Math.round(t.dts/90),n.push(t)},this.flush=function(){for(var r,a=new m;n.length&&"access_unit_delimiter_rbsp"!==n[0].nalUnitType;)n.shift();if(0===n.length)return void this.trigger("done","VideoSegmentStream");for(;n.length;)r=n.shift(),"seq_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,t=r.config,e.width=t.width,e.height=t.height,e.sps=[r.data],e.profileIdc=t.profileIdc,e.levelIdc=t.levelIdc,e.profileCompatibility=t.profileCompatibility,i.endNalUnit()):"pic_parameter_set_rbsp"===r.nalUnitType?(e.newMetadata=!0,e.pps=[r.data],i.endNalUnit()):"access_unit_delimiter_rbsp"===r.nalUnitType?(i&&this.finishFrame(a,i),i=new l(l.VIDEO_TAG),i.pts=r.pts,i.dts=r.dts):("slice_layer_without_partitioning_rbsp_idr"===r.nalUnitType&&(i.keyFrame=!0),i.endNalUnit()),i.startNalUnit(),i.writeBytes(r.data);i&&this.finishFrame(a,i),this.trigger("data",{track:e,tags:a.list}),this.trigger("done","VideoSegmentStream")}},r.prototype=new d,n=function(e){var t,i,s,o,u,d,l,m,g,y,_,v,b=this;n.prototype.init.call(this),e=e||{},this.metadataStream=new f.MetadataStream,e.metadataStream=this.metadataStream,t=new f.TransportPacketStream,i=new f.TransportParseStream,s=new f.ElementaryStream,o=new f.TimestampRolloverStream("video"),u=new f.TimestampRolloverStream("audio"),d=new f.TimestampRolloverStream("timed-metadata"),l=new c,m=new h,v=new p(e),t.pipe(i).pipe(s),s.pipe(o).pipe(m),s.pipe(u).pipe(l),s.pipe(d).pipe(this.metadataStream).pipe(v),_=new f.CaptionStream,m.pipe(_).pipe(v),s.on("data",function(e){var t,i,n;if("metadata"===e.type){for(t=e.tracks.length;t--;)"video"===e.tracks[t].type?i=e.tracks[t]:"audio"===e.tracks[t].type&&(n=e.tracks[t]);i&&!g&&(v.numberOfTracks++,g=new r(i),m.pipe(g).pipe(v)),n&&!y&&(v.numberOfTracks++,y=new a(n),l.pipe(y).pipe(v),g&&g.on("keyframe",y.onVideoKeyFrame))}}),this.push=function(e){t.push(e)},this.flush=function(){t.flush()},this.resetCaptions=function(){_.reset()},v.on("data",function(e){b.trigger("data",e)}),v.on("done",function(){b.trigger("done")})},n.prototype=new d,t.exports=n},{}],49:[function(e,t,i){"use strict";var n=e(62),r=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.topRow_=13,this.mode_="rollUp";else if(t===this.ROLL_UP_3_ROWS_)this.topRow_=12,this.mode_="rollUp";else if(t===this.ROLL_UP_4_ROWS_)this.topRow_=11,this.mode_="rollUp";else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[14]=this.nonDisplayed_[14].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=f();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=f();else if(t===this.RESUME_DIRECT_CAPTIONING_)this.mode_="paintOn";else if(this.isSpecialCharacter(n,r))n=(3&n)<<8,a=d(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1),n=(3&n)<<8,a=d(n|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=l.indexOf(7968&t);s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=d(n),a+=d(r),this[this.mode_](e.pts,a),this.column_+=a.length)}};c.prototype=new n,c.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){return e.trim()}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},c.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=f(),this.nonDisplayed_=f(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.formatting_=[]},c.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},c.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},c.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},c.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},c.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},c.prototype.isPAC=function(e,t){return e>=this.BASE_&&e=64&&t<=127},c.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},c.prototype.isNormalChar=function(e){return e>=32&&e<=127},c.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)},c.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+""+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},c.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},c.prototype.rollUp=function(e,t){var i=this.displayed_[14];i+=t,this.displayed_[14]=i},c.prototype.shiftRowsUp_=function(){var e;for(e=0;e>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===undefined?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=u.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=u.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},r.prototype=new s,r.STREAM_TYPES={h264:27,adts:15},a=function(){var e=this,t={data:[],size:0},i={data:[],size:0},n={data:[],size:0},r=function(e,t){var i;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),i=e[7],192&i&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])},s=function(t,i,n){var a,s=new Uint8Array(t.size),o={type:i},u=0,d=0,l=!1;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,u=0;u>>2;p*=4,p+=3&h[7],u.timeStamp=p,t.pts===undefined&&t.dts===undefined&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),n+=10,n+=a}while(n>>4>1&&(t+=e[4]+1),t},o=function(e,t){var i=r(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},u=function(e){var t=a(e),i=4+s(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},d=function(e){var t={},i=a(e),n=4+s(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r,o,u;r=(15&e[n+1])<<8|e[n+2],o=3+r-4,u=(15&e[n+10])<<8|e[n+11];for(var d=12+u;d=e.byteLength)return null;var i,n=null;return i=e[t+7],192&i&&(n={},n.pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},c=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},h=function(e){for(var t,i=4+s(e),n=e.subarray(i),r=0,a=0,o=!1;a3&&"slice_layer_without_partitioning_rbsp_idr"===(t=c(31&n[a+3]))&&(o=!0),o};t.exports={parseType:o,parsePat:u,parsePmt:d,parsePayloadUnitStartIndicator:a,parsePesType:l,parsePesTime:f,videoPacketContainsKeyFrame:h}},{}],53:[function(e,t,i){"use strict";t.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],54:[function(e,t,i){"use strict";var n=e(62),r=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},a=function(e){var t,i;a.prototype.init.call(this),this.type_=e,this.push=function(e){e.type===this.type_&&(i===undefined&&(i=e.dts),e.dts=r(e.dts,i),e.pts=r(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.discontinuity=function(){i=void 0,t=void 0}};a.prototype=new n,t.exports={TimestampRolloverStream:a,handleRollover:r}},{}],55:[function(e,t,i){t.exports={generator:e(56),Transmuxer:e(58).Transmuxer,AudioSegmentStream:e(58).AudioSegmentStream,VideoSegmentStream:e(58).VideoSegmentStream}},{}],56:[function(e,t,i){"use strict";var n,r,a,s,o,u,d,l,f,c,h,p,m,g,y,_,v,b,T,S,w,k,O,E,A,L,P,I,C,U,D,M,R,x,B,j,N=Math.pow(2,32)-1;!function(){var e;if(O={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in O)O.hasOwnProperty(e)&&(O[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),L=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),C={video:P,audio:I},M=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D=new Uint8Array([0,0,0,0,0,0,0,0]),R=new Uint8Array([0,0,0,0,0,0,0,0]),x=R,B=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),j=R,U=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var t,i,n,r=[],a=0;for(t=1;t>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},s=function(){return n(O.ftyp,E,A,E,L)},_=function(e){return n(O.hdlr,C[e])},o=function(e){return n(O.mdat,e)},y=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(O.mdhd,t)},g=function(e){return n(O.mdia,y(e),_(e.type),d(e))},u=function(e){return n(O.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(e){return n(O.minf,"video"===e.type?n(O.vmhd,U):n(O.smhd,D),r(),b(e))},l=function(e,t){for(var i=[],r=t.length;r--;)i[r]=S(t[r]);return n.apply(null,[O.moof,u(e)].concat(i))},f=function(e){for(var t=e.length,i=[];t--;)i[t]=p(e[t]);return n.apply(null,[O.moov,h(4294967295)].concat(i).concat(c(e)))},c=function(e){for(var t=e.length,i=[];t--;)i[t]=w(e[t]);return n.apply(null,[O.mvex].concat(i))},h=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(O.mvhd,t)},v=function(e){var t,i,r=e.samples||[],a=new Uint8Array(4+r.length);for(i=0;i>>8),a.push(255&i[t].byteLength),a=a.concat(Array.prototype.slice.call(i[t]));for(t=0;t>>8),s.push(255&r[t].byteLength),s=s.concat(Array.prototype.slice.call(r[t]));return n(O.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(O.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length]).concat(a).concat([r.length]).concat(s))),n(O.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},t=function(e){return n(O.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),a(e))}}(),m=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(O.tkhd,t)},S=function(e){var t,i,r,a,s,o,u;return t=n(O.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/(N+1)),u=Math.floor(e.baseMediaDecodeTime%(N+1)),i=n(O.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,u>>>24&255,u>>>16&255,u>>>8&255,255&u])),s=92,"audio"===e.type?(r=k(e,s),n(O.traf,t,i,r)):(a=v(e),r=k(e,a.length+s),n(O.traf,t,i,r,a))},p=function(e){return e.duration=e.duration||4294967295,n(O.trak,m(e),g(e))},w=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(O.trex,t)},function(){var e,t,i;i=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(e[0].duration!==undefined&&(i=1),e[0].size!==undefined&&(n=2),e[0].flags!==undefined&&(r=4),e[0].compositionTimeOffset!==undefined&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,a,s,o;for(a=e.samples||[],t+=20+16*a.length,r=i(a,t),o=0;o>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size,s.flags.isLeading<<2|s.flags.dependsOn,s.flags.isDependedOn<<6|s.flags.hasRedundancy<<4|s.flags.paddingValue<<1|s.flags.isNonSyncSample,61440&s.flags.degradationPriority,15&s.flags.degradationPriority,(4278190080&s.compositionTimeOffset)>>>24,(16711680&s.compositionTimeOffset)>>>16,(65280&s.compositionTimeOffset)>>>8,255&s.compositionTimeOffset]);return n(O.trun,new Uint8Array(r))},e=function(e,t){var r,a,s,o;for(a=e.samples||[],t+=20+8*a.length,r=i(a,t),o=0;o>>24,(16711680&s.duration)>>>16,(65280&s.duration)>>>8,255&s.duration,(4278190080&s.size)>>>24,(16711680&s.size)>>>16,(65280&s.size)>>>8,255&s.size]);return n(O.trun,new Uint8Array(r))},k=function(i,n){return"audio"===i.type?e(i,n):t(i,n)}}(),t.exports={ftyp:s,mdat:o,moof:l,moov:f,initSegment:function(e){var t,i=s(),n=f(e);return t=new Uint8Array(i.byteLength+n.byteLength),t.set(i),t.set(n,i.byteLength),t}}},{}],57:[function(e,t,i){"use strict";var n,r,a,s;n=function(e,t){var i,a,s,o,u,d=[];if(!t.length)return null;for(i=0;i