|
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t){return t.replace(/\n\r?\s*/g,"")}function n(t,e){Ue(t).forEach(function(n){return e(t[n],n)})}function r(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Ue(t).reduce(function(n,r){return e(n,t[r],r)},n)}function i(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[t].concat(r)):(r.forEach(function(e){e&&n(e,function(e,n){t[n]=e})}),t)}function o(t){return!!t&&"object"===(void 0===t?"undefined":Oe(t))}function a(t){return o(t)&&"[object Object]"===Ne.call(t)&&t.constructor===Object}function s(t,e){if(!t||!e)return"";if("function"==typeof _e.getComputedStyle){var n=_e.getComputedStyle(t);return n?n[e]:""}return""}function u(t){return"string"==typeof t&&/\S/.test(t)}function l(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function c(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function d(){return we===_e.document}function h(t){return o(t)&&1===t.nodeType}function f(){try{return _e.parent!==_e.self}catch(t){return!0}}function p(t){return function(e,n){if(!u(e))return we[t](null);u(n)&&(n=we.querySelector(n));var r=h(n)?n:we;return r[t]&&r[t](e)}}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=we.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(xe.warn(Re(Be,t,n)),i.setAttribute(t,n)):"textContent"===t?m(i,n):i[t]=n}),Object.getOwnPropertyNames(n).forEach(function(t){i.setAttribute(t,n[t])}),r&&j(i,r),i}function m(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function g(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function y(t,e){return l(e),t.classList?t.classList.contains(e):c(e).test(t.className)}function A(t,e){return t.classList?t.classList.add(e):y(t,e)||(t.className=(t.className+" "+e).trim()),t}function _(t,e){return t.classList?t.classList.remove(e):(l(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function b(t,e,n){var r=y(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?A(t,e):_(t,e),t}function T(t,e){Object.getOwnPropertyNames(e).forEach(function(n){var r=e[n];null===r||void 0===r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)})}function S(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof t[i]&&-1===",autoplay,stretch,fluent,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),e[i]=o}return e}function E(t,e){return t.getAttribute(e)}function w(t,e,n){t.setAttribute(e,n)}function k(t,e){t.removeAttribute(e)}function C(){we.body.focus(),we.onselectstart=function(){return!1}}function L(){we.onselectstart=function(){return!0}}function I(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(n[t]=e[t])}),n.height||(n.height=parseFloat(s(t,"height"))),n.width||(n.width=parseFloat(s(t,"width"))),n}}function x(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=we.documentElement,r=we.body,i=n.clientLeft||r.clientLeft||0,o=_e.pageXOffset||r.scrollLeft,a=e.left+o-i,s=n.clientTop||r.clientTop||0,u=_e.pageYOffset||r.scrollTop,l=e.top+u-s;return{left:Math.round(a),top:Math.round(l)}}function R(t,e){var n={},r=x(t),i=t.offsetWidth,o=t.offsetHeight,a=r.top,s=r.left,u=e.pageY,l=e.pageX;return e.changedTouches&&(l=e.changedTouches[0].pageX,u=e.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(a-u+o)/o)),n.x=Math.max(0,Math.min(1,(l-s)/i)),n}function O(t){return o(t)&&3===t.nodeType}function D(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function M(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),h(t)||O(t)?t:"string"==typeof t&&/\S/.test(t)?we.createTextNode(t):void 0}).filter(function(t){return t})}function j(t,e){return M(e).forEach(function(e){return t.appendChild(e)}),t}function P(t,e){return j(D(t),e)}function N(t){return void 0===t.button&&void 0===t.buttons||0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons}function U(){return Ve++}function B(t){var e=t[We];return e||(e=t[We]=U()),He[e]||(He[e]={}),He[e]}function F(t){var e=t[We];return!!e&&!!Object.getOwnPropertyNames(He[e]).length}function G(t){var e=t[We];if(e){delete He[e];try{delete t[We]}catch(e){t.removeAttribute?t.removeAttribute(We):t[We]=null}}}function z(t,e){var n=B(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&G(t)}function V(t,e,n,r){n.forEach(function(n){t(e,n,r)})}function H(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||_e.event;t={};for(var i in r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(t[i]=r[i]));if(t.target||(t.target=t.srcElement||we),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var o=we.documentElement,a=we.body;t.pageX=t.clientX+(o&&o.scrollLeft||a&&a.scrollLeft||0)-(o&&o.clientLeft||a&&a.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||a&&a.scrollTop||0)-(o&&o.clientTop||a&&a.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}function W(t,e,n){if(Array.isArray(e))return V(W,t,e,n);var r=B(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=U()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=H(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!e.isImmediatePropagationStopped();a++)try{o[a].call(t,e,n)}catch(t){xe.error(t)}}}),1===r.handlers[e].length)if(t.addEventListener){var i=!1;Qe&&Ye.indexOf(e)>-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function Q(t,e,n){if(F(t)){var r=B(t);if(r.handlers){if(Array.isArray(e))return V(Q,t,e,n);var i=function(t,e){r.handlers[e]=[],z(t,e)};if(void 0!==e){var o=r.handlers[e];if(o){if(!n)return void i(t,e);if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);z(t,e)}}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(t,s)}}}function Y(t,e,n){var r=F(t)?B(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=H(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)Y.call(null,i,e,n);else if(!i&&!e.defaultPrevented){var o=B(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function q(t,e,n){if(Array.isArray(e))return V(q,t,e,n);var r=function r(){Q(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||U(),W(t,e,r)}function K(t,e){e&&(Xe=e),_e.setTimeout(Ze,t)}function X(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=v("span",{className:"vjs-event-bus"});return i(t,fn),t.on("dispose",function(){t.off(),_e.setTimeout(function(){t.eventBusEl_=null},0)}),t}function Z(t,e){return i(t,pn),t.state=i({},t.state,e),"function"==typeof t.handleStateChanged&&an(t)&&t.on("statechanged",t.handleStateChanged),t}function J(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function $(t,e){return J(t)===J(e)}function tt(){for(var t={},e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return r.forEach(function(e){e&&n(e,function(e,n){if(!a(e))return void(t[n]=e);a(t[n])||(t[n]={}),t[n]=tt(t[n],e)})}),t}function et(t,e,n){if("number"!=typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function nt(t,e,n,r){return et(t,r,n.length-1),n[r][e]}function rt(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:nt.bind(null,"start",0,t),end:nt.bind(null,"end",1,t)}}function it(t,e){return Array.isArray(t)?rt(t):void 0===t||void 0===e?rt():rt([[t,e]])}function ot(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=it(0,0));for(var o=0;o<t.length;o++)r=t.start(o),i=t.end(o),i>e&&(i=e),n+=i-r;return n/e}function at(t){if(t instanceof at)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:o(t)&&("number"==typeof t.code&&(this.code=t.code),i(this,t)),this.message||(this.message=at.defaultMessages[this.code]||"")}function st(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(t){r=t}return[r,n]}function ut(t){return void 0!==t&&null!==t&&"function"==typeof t.then}function lt(t){ut(t)&&t.then(null,function(t){})}function ct(t){var e=mr.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}function dt(t,e,n){if(!Tr(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===Er.call(t)?ht(t,e,n):"string"==typeof t?ft(t,e,n):pt(t,e,n)}function ht(t,e,n){for(var r=0,i=t.length;r<i;r++)wr.call(t,r)&&e.call(n,t[r],r,t)}function ft(t,e,n){for(var r=0,i=t.length;r<i;r++)e.call(n,t.charAt(r),r,t)}function pt(t,e,n){for(var r in t)wr.call(t,r)&&e.call(n,t[r],r,t)}function vt(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)Dr.call(n,r)&&(t[r]=n[r])}return t}function mt(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function gt(t,e,n){var r=t;return Tr(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=Pr(e,{uri:t}),r.callback=n,r}function yt(t,e,n){return e=gt(t,e,n),At(e)}function At(t){function e(){4===s.readyState&&setTimeout(i,0)}function n(){var t=void 0;if(t=s.response?s.response:s.responseText||_t(s),m)try{t=JSON.parse(t)}catch(t){}return t}function r(t){return clearTimeout(c),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,a(t,g)}function i(){if(!l){var e;clearTimeout(c),e=t.useXDR&&void 0===s.status?200:1223===s.status?204:s.status;var r=g,i=null;return 0!==e?(r={body:n(),statusCode:e,method:h,headers:{},url:d,rawRequest:s},s.getAllResponseHeaders&&(r.headers=jr(s.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,r,r.body)}}if(void 0===t.callback)throw new Error("callback argument missing");var o=!1,a=function(e,n,r){o||(o=!0,t.callback(e,n,r))},s=t.xhr||null;s||(s=t.cors||t.useXDR?new yt.XDomainRequest:new yt.XMLHttpRequest);var u,l,c,d=s.url=t.uri||t.url,h=s.method=t.method||"GET",f=t.body||t.data,p=s.headers=t.headers||{},v=!!t.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:s};if("json"in t&&!1!==t.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),f=JSON.stringify(!0===t.json?f:t.json))),s.onreadystatechange=e,s.onload=i,s.onerror=r,s.onprogress=function(){},s.onabort=function(){l=!0},s.ontimeout=r,s.open(h,d,!v,t.username,t.password),v||(s.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(c=setTimeout(function(){if(!l){l=!0,s.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}},t.timeout)),s.setRequestHeader)for(u in p)p.hasOwnProperty(u)&&s.setRequestHeader(u,p[u]);else if(t.headers&&!mt(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(s.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(s),s.send(f||null),s}function _t(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 bt(){}function Tt(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function St(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 Et(){this.values=Kr(null)}function wt(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length){var s=a[0],u=a[1];e(s,u)}}}function kt(t,e,n){function r(){var e=St(t);if(null===e)throw new Tt(Tt.Errors.BadTimeStamp,"Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function i(){t=t.replace(/^\s+/,"")}var o=t;if(i(),e.startTime=r(),i(),"--\x3e"!==t.substr(0,3))throw new Tt(Tt.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);t=t.substr(3),i(),e.endTime=r(),i(),function(t,e){var r=new Et;wt(t,function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),a=o[0];r.integer(t,a),r.percent(t,a)&&r.set("snapToLines",!1),r.alt(t,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical",""),e.line=r.get("line","auto"),e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align","middle"),e.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}(t,e)}function Ct(t,e){function n(t){return Xr[t]}for(var r,i=t.document.createElement("div"),o=i,a=[];null!==(r=function(){if(!e)return null;var t=e.match(/^([^<]*)(<[^>]*>?)?/);return function(t){return e=e.substr(t.length),t}(t[1]?t[1]:t[2])}());)if("<"!==r[0])o.appendChild(t.document.createTextNode(function(t){for(;l=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(l[0],n);return t}(r)));else{if("/"===r[1]){a.length&&a[a.length-1]===r.substr(2).replace(">","")&&(a.pop(),o=o.parentNode);continue}var s,u=St(r.substr(1,r.length-2));if(u){s=t.document.createProcessingInstruction("timestamp",u),o.appendChild(s);continue}var l=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!l)continue;if(!(s=function(e,n){var r=Zr[e];if(!r)return null;var i=t.document.createElement(r);i.localName=r;var o=Jr[e];return o&&n&&(i[o]=n.trim()),i}(l[1],l[3])))continue;if(!function(t,e){return!$r[e.localName]||$r[e.localName]===t.localName}(o,s))continue;l[2]&&(s.className=l[2].substr(1).replace("."," ")),a.push(l[1]),o.appendChild(s),o=s}return i}function Lt(t){for(var e=0;e<ti.length;e++){var n=ti[e];if(t>=n[0]&&t<=n[1])return!0}return!1}function It(t){function e(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function n(t){if(!t||!t.length)return null;var r=t.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):i}return"ruby"===r.tagName?n(t):r.childNodes?(e(t,r),n(t)):void 0}var r,i=[],o="";if(!t||!t.childNodes)return"ltr";for(e(i,t);o=n(i);)for(var a=0;a<o.length;a++)if(r=o.charCodeAt(a),Lt(r))return"rtl";return"ltr"}function xt(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;i<n.length&&n[i]!==e;i++)"showing"===n[i].mode&&r++;return-1*++r}function Rt(){}function Ot(t,e,n){Rt.call(this),this.cue=e,this.cueDiv=Ct(t,e.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=t.document.createElement("div"),r={direction:It(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(e.positionAlign){case"start":i=e.position;break;case"middle":i=e.position-e.size/2;break;case"end":i=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function Dt(t){var e,n,r,i;if(t.div){n=t.div.offsetHeight,r=t.div.offsetWidth,i=t.div.offsetTop;var o=(o=t.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();t=t.div.getBoundingClientRect(),e=o?Math.max(o[0]&&o[0].height||0,t.height/o.length):0}this.left=t.left,this.right=t.right,this.top=t.top||i,this.height=t.height||n,this.bottom=t.bottom||i+(t.height||n),this.width=t.width||r,this.lineHeight=void 0!==e?e:t.lineHeight}function Mt(t,e,n,r){var i=new Dt(e),o=e.cue,a=xt(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(a),d=n[u]+l,h=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),a<0&&(c+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(h,c)}else{var f=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":a-=f/2;break;case"end":a-=f}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new Dt(e)}var p=function(t,e){for(var i,o=new Dt(t),a=1,s=0;s<e.length;s++){for(;t.overlapsOppositeAxis(n,e[s])||t.within(n)&&t.overlapsAny(r);)t.move(e[s]);if(t.within(n))return t;var u=t.intersectPercentage(n);a>u&&(i=new Dt(t),a=u),t=new Dt(o)}return i||o}(i,s);e.move(p.toCSSCompatValues(n))}function jt(){}function Pt(t){return"string"==typeof t&&!!ii[t.toLowerCase()]&&t.toLowerCase()}function Nt(t){return"string"==typeof t&&!!oi[t.toLowerCase()]&&t.toLowerCase()}function Ut(t,e,n){this.hasBeenReset=!1;var r="",i=!1,o=t,a=e,s=n,u=null,l="",c=!0,d="auto",h="start",f=50,p="middle",v=50,m="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(t){r=""+t}},pauseOnExit:{enumerable:!0,get:function(){return i},set:function(t){i=!!t}},startTime:{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");o=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");a=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return s},set:function(t){s=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(t){u=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(t){var e=Pt(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");l=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(t){c=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(t){if("number"!=typeof t&&t!==ri)throw new SyntaxError("An invalid number or illegal string was specified.");d=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(t){var e=Nt(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");h=e,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return f},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");f=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(t){var e=Nt(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return v},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");v=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return m},set:function(t){var e=Nt(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");m=e,this.hasBeenReset=!0}}}),this.displayState=void 0}function Bt(t){return"string"==typeof t&&!!ui[t.toLowerCase()]&&t.toLowerCase()}function Ft(t){return"number"==typeof t&&t>=0&&t<=100}function Gt(){var t=100,e=3,n=0,r=100,i=0,o=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!Ft(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(t){if(!Ft(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!Ft(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!Ft(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!Ft(t))throw new Error("ViewportAnchorX must be between 0 and 100.");i=t}},scroll:{enumerable:!0,get:function(){return a},set:function(t){var e=Bt(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");a=e}}})}function zt(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var a=new qr.text.TrackClass(i);return o.addTrack(a),a}function Vt(t,e){mi[t]=mi[t]||[],mi[t].push(e)}function Ht(t,e,n){t.setTimeout(function(){return $t(e,mi[e.type],n,t)},1)}function Wt(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}function Qt(t,e,n){return t.reduceRight(Kt(n),e[n]())}function Yt(t,e,n,r){return e[n](t.reduce(Kt(n),r))}function qt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i="call"+J(n),o=t.reduce(Kt(i),r),a=o===yi,s=a?null:e[n](o);return Xt(t,n,s,a),s}function Kt(t){return function(e,n){return e===yi?yi:n[t]?n[t](e):e}}function Xt(t,e,n,r){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](r,n)}}function Zt(t){gi[t.id()]=null}function Jt(t,e){var n=gi[t.id()],r=null;if(void 0===n||null===n)return r=e(t),gi[t.id()]=[[e,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===e&&(r=s)}return null===r&&(r=e(t),n.push([e,r])),r}function $t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=e[0],u=e.slice(1);if("string"==typeof s)$t(t,mi[s],n,r,o,a);else if(s){var l=Jt(r,s);if(!l.setSource)return o.push(l),$t(t,u,n,r,o,a);l.setSource(i({},t),function(e,i){if(e)return $t(t,u,n,r,o,a);o.push(l),$t(i,t.type===i.type?u:mi[i.type],n,r,o,a)})}else u.length?$t(t,u,n,r,o,a):a?n(t,o):$t(t,mi["*"],n,r,o,!0)}function te(t){var e=Si(t.src);return!t.type&&e&&(t.type=e),t}function ee(t,e){var n=void 0;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function ne(t,e,n){try{t.style[e]=n}catch(t){return}}function re(t){Ni=t}function ie(){Ni=Pi}function oe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return Ni(t,e)}function ae(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function se(t,e){return ae(t.options[t.options.selectedIndex].value,e)}function ue(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(ae(t.options[r].value,n)===e){t.selectedIndex=r;break}}function le(t,e,n){var r=le.getPlayer(t);if(r)return e&&xe.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof t?Fe("#"+ga(t)):t;if(!h(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");we.body.contains(i)||xe.warn("The element supplied is not included in the DOM"),e=e||{},le.hooks("beforesetup").forEach(function(t){var n=t(i,tt(e));if(!o(n)||Array.isArray(n))return void xe.error("please return an object in beforesetup hooks");e=tt(e,n)});var a=vn.getComponent("Player");return r=new a(i,e,n),le.hooks("setup").forEach(function(t){return t(r)}),r}function ce(t){for(var e=_e.atob(t),n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}function de(t){return t.subarray(0,t.byteLength-t[t.byteLength-1])}function he(t,e){return function(n){var r=this;if(!e)return new up(t);if(up&&!n){var i=e.toString().replace(/^function.+?{/,"").slice(0,-1),o=fe(i);return this[ip]=new up(o),pe(this[ip],o),this[ip]}var a={postMessage:function(t){r.onmessage&&setTimeout(function(){r.onmessage({data:t,target:a})})}};e.call(a),this.postMessage=function(t){setTimeout(function(){a.onmessage({data:t,target:r})})},this.isThisThread=!0}}function fe(t){try{return sp.createObjectURL(new Blob([t],{type:op}))}catch(n){var e=new ap;return e.append(t),sp.createObjectURL(e.getBlob(type))}}function pe(t,e){if(t&&e){var n=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&sp.revokeObjectURL(t.objURL),n.call(t)}}}function ve(){}var me,ge="7.2.4",ye="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};me="undefined"!=typeof window?window:void 0!==ye?ye:"undefined"!=typeof self?self:{};var Ae,_e=me,be={},Te=Object.freeze({default:be}),Se=Te&&be||Te,Ee=void 0!==ye?ye:"undefined"!=typeof window?window:{};"undefined"!=typeof document?Ae=document:(Ae=Ee["__GLOBAL_DOCUMENT_CACHE@4"])||(Ae=Ee["__GLOBAL_DOCUMENT_CACHE@4"]=Se);var we=Ae,ke=void 0,Ce="info",Le=[],Ie=function(t,e){var n=ke.levels[Ce],r=new RegExp("^("+n+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),Le&&Le.push([].concat(e)),e.unshift("VIDEOJS:"),_e.console){var i=_e.console[t];i||"debug"!==t||(i=_e.console.info||_e.console.log),i&&n&&r.test(t)&&i[Array.isArray(e)?"apply":"call"](_e.console,e)}};ke=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];Ie("log",e)},ke.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:Ce},ke.level=function(t){if("string"==typeof t){if(!ke.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');Ce=t}return Ce},ke.history=function(){return Le?[].concat(Le):[]},ke.history.clear=function(){Le&&(Le.length=0)},ke.history.disable=function(){null!==Le&&(Le.length=0,Le=null)},ke.history.enable=function(){null===Le&&(Le=[])},ke.error=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ie("error",e)},ke.warn=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ie("warn",e)},ke.debug=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return Ie("debug",e)};var xe=ke,Re=function(t){for(var n="",r=0;r<arguments.length;r++)n+=e(t[r])+(arguments[r+1]||"");return n},Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Me=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},je=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Pe=function(t,e){return t.raw=e,t},Ne=Object.prototype.toString,Ue=function(t){return o(t)?Object.keys(t):[]},Be=Pe(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),Fe=p("querySelector"),Ge=p("querySelectorAll"),ze=Object.freeze({isReal:d,isEl:h,isInFrame:f,createEl:v,textContent:m,prependTo:g,hasClass:y,addClass:A,removeClass:_,toggleClass:b,setAttributes:T,getAttributes:S,getAttribute:E,setAttribute:w,removeAttribute:k,blockTextSelection:C,unblockTextSelection:L,getBoundingClientRect:I,findPosition:x,getPointerPosition:R,isTextNode:O,emptyEl:D,normalizeContent:M,appendContent:j,insertContent:P,isSingleLeftClick:N,$:Fe,$$:Ge}),Ve=1,He={},We="vdata"+(new Date).getTime(),Qe=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){Qe=!0}});_e.addEventListener("test",null,t),_e.removeEventListener("test",null,t)}catch(t){}}();var Ye=["touchstart","touchmove"],qe=Object.freeze({fixEvent:H,on:W,off:Q,trigger:Y,one:q}),Ke=!1,Xe=void 0,Ze=function(){if(d()&&!1!==Xe.options.autoSetup){var t=Array.prototype.slice.call(we.getElementsByTagName("video")),e=Array.prototype.slice.call(we.getElementsByTagName("audio")),n=Array.prototype.slice.call(we.getElementsByTagName("video-js")),r=t.concat(e,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var a=r[i];if(!a||!a.getAttribute){K(1);break}if(void 0===a.player){var s=a.getAttribute("data-setup");null!==s&&Xe(a)}}else Ke||K(1)}};d()&&"complete"===we.readyState?Ke=!0:q(_e,"load",function(){Ke=!0});var Je=function(t){var e=we.createElement("style");return e.className=t,e},$e=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},tn=function(t,e,n){e.guid||(e.guid=U());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},en=function(t,e){var n=Date.now();return function(){var r=Date.now();r-n>=e&&(t.apply(void 0,arguments),n=r)}},nn=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_e,i=void 0,o=function(){r.clearTimeout(i),i=null},a=function(){var o=this,a=arguments,s=function(){i=null,s=null,n||t.apply(o,a)};!i&&n&&t.apply(o,a),r.clearTimeout(i),i=r.setTimeout(s,e)};return a.cancel=o,a},rn=function(){};rn.prototype.allowedEvents_={},rn.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},W(this,t,e),this.addEventListener=n},rn.prototype.addEventListener=rn.prototype.on,rn.prototype.off=function(t,e){Q(this,t,e)},rn.prototype.removeEventListener=rn.prototype.off,rn.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},q(this,t,e),this.addEventListener=n},rn.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=H(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Y(this,t)},rn.prototype.dispatchEvent=rn.prototype.trigger;var on=void 0;rn.prototype.queueTrigger=function(t){var e=this;on||(on=new Map);var n=t.type||t,r=on.get(this);r||(r=new Map,on.set(this,r));var i=r.get(n);r.delete(n),_e.clearTimeout(i);var o=_e.setTimeout(function(){0===r.size&&(r=null,on.delete(e)),e.trigger(t)},0);r.set(n,o)};var an=function(t){return t instanceof rn||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},sn=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},un=function(t){if(!t.nodeName&&!an(t))throw new Error("Invalid target; must be a DOM node or evented object.")},ln=function(t){if(!sn(t))throw new Error("Invalid event type; must be a non-empty string or array.")},cn=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},dn=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),un(r),ln(i),cn(o),o=tn(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},hn=function(t,e,n,r){un(t),t.nodeName?qe[e](t,n,r):t[e](n,r)},fn={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=dn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(hn(a,"on",s,u),!o){var l=function(){return t.off(a,s,u)};l.guid=u.guid;var c=function(){return t.off("dispose",l)};c.guid=u.guid,hn(this,"on","dispose",l),hn(a,"on","dispose",c)}},one:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=dn(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)hn(a,"one",s,u);else{var l=function e(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t.off(a,s,e),u.apply(null,r)};l.guid=u.guid,hn(a,"one",s,l)}},off:function(t,e,n){if(!t||sn(t))Q(this.eventBusEl_,t,e);else{var r=t,i=e;un(r),ln(i),cn(n),n=tn(this,n),this.off("dispose",n),r.nodeName?(Q(r,i,n),Q(r,"dispose",n)):an(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return Y(this.eventBusEl_,t,e)}},pn={state:{},setState:function(t){var e=this;"function"==typeof t&&(t=t());var r=void 0;return n(t,function(t,n){e.state[n]!==t&&(r=r||{},r[n]={from:e.state[n],to:t}),e.state[n]=t}),r&&an(this)&&this.trigger({changes:r,type:"statechanged"}),r}},vn=function(){function t(e,n,r){if(De(this,t),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=tt({},this.options_),n=this.options_=tt(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+U()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),!1!==n.evented&&X(this,{eventBusKey:this.el_?"el_":null}),Z(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),G(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return xe.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=tt(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return v(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[t]?u=o[t]:s&&s[t]&&(u=s[t]),e&&(u=u.replace(/\{(\d+)\}/g,function(t,n){var r=e[n-1],i=r;return void 0===r&&(i=t),i})),u},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=J(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=J(e);var a=n.componentClass||o;n.name=o;var s=t.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&J(i.name()),o&&(this.childNameIndex_[o]=i),"function"==typeof i.el&&i.el()){var u=this.contentEl().children,l=u[r]||null;this.contentEl().insertBefore(i.el(),l)}return i},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,a=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter(function(t){return!o.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var r=void 0,i=void 0;return"string"==typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}}).filter(function(e){var n=t.getComponent(e.opts.componentClass||J(e.name));return n&&!a.isTech(n)}).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},t.prototype.$=function(t,e){return Fe(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Ge(t,e||this.contentEl())},t.prototype.hasClass=function(t){return y(this.el_,t)},t.prototype.addClass=function(t){A(this.el_,t)},t.prototype.removeClass=function(t){_(this.el_,t)},t.prototype.toggleClass=function(t,e){b(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 E(this.el_,t)},t.prototype.setAttribute=function(t,e){w(this.el_,t,e)},t.prototype.removeAttribute=function(t){k(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"+J(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 _e.getComputedStyle){var n=_e.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var r="offset"+J(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=void 0;this.on("touchstart",function(r){1===r.touches.length&&(e={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=(new Date).getTime(),n=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)n=!1;else if(e){var r=t.touches[0].pageX-e.pageX,i=t.touches[0].pageY-e.pageY,o=Math.sqrt(r*r+i*i);o>10&&(n=!1)}});var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){e=null,!0===n&&(new Date).getTime()-t<200&&(r.preventDefault(),this.trigger("tap"))})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=tn(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.prototype.setTimeout=function(t,e){var n,r,i=this;return t=tn(this,t),n=_e.setTimeout(function(){i.off("dispose",r),t()},e),r=function(){return i.clearTimeout(n)},r.guid="vjs-timeout-"+n,this.on("dispose",r),n},t.prototype.clearTimeout=function(t){_e.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var n=this;t=tn(this,t);var r=_e.setInterval(t,e),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},t.prototype.clearInterval=function(t){_e.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e,n,r=this;return this.supportsRaf_?(t=tn(this,t),e=_e.requestAnimationFrame(function(){r.off("dispose",n),t()}),n=function(){return r.cancelAnimationFrame(e)},n.guid="vjs-raf-"+e,this.on("dispose",n),e):this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){_e.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r=t.getComponent("Tech"),i=r&&r.isTech(n),o=t===n||t.prototype.isPrototypeOf(n.prototype);if(i||!o){var a=void 0;throw a=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+a+".")}e=J(e),t.components_||(t.components_={});var s=t.getComponent("Player");if("Player"===e&&s&&s.players){var u=s.players,l=Object.keys(u);if(u&&l.length>0&&l.map(function(t){return u[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=J(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();vn.prototype.supportsRaf_="function"==typeof _e.requestAnimationFrame&&"function"==typeof _e.cancelAnimationFrame,vn.registerComponent("Component",vn);for(var mn=_e.navigator&&_e.navigator.userAgent||"",gn=/AppleWebKit\/([\d.]+)/i.exec(mn),yn=gn?parseFloat(gn.pop()):null,An=/iPad/i.test(mn),_n=/iPhone/i.test(mn)&&!An,bn=/iPod/i.test(mn),Tn=_n||An||bn,Sn=function(){var t=mn.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),En=/Android/i.test(mn),wn=function(){var t=mn.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),kn=En&&wn<5&&yn<537,Cn=/Firefox/i.test(mn),Ln=/Edge/i.test(mn),In=!Ln&&(/Chrome/i.test(mn)||/CriOS/i.test(mn)),xn=function(){var t=mn.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),Rn=function(){var t=/MSIE\s(\d+)\.\d/.exec(mn),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(mn)&&/rv:11.0/.test(mn)&&(e=11),e}(),On=/Safari/i.test(mn)&&!In&&!En&&!Ln,Dn=(On||Tn)&&!In,Mn=(d()&&("ontouchstart"in _e||_e.navigator.maxTouchPoints||_e.DocumentTouch&&_e.document instanceof _e.DocumentTouch)),jn=Object.freeze({IS_IPAD:An,IS_IPHONE:_n,IS_IPOD:bn,IS_IOS:Tn,IOS_VERSION:Sn,IS_ANDROID:En,ANDROID_VERSION:wn,IS_NATIVE_ANDROID:kn,IS_FIREFOX:Cn,IS_EDGE:Ln,IS_CHROME:In,CHROME_VERSION:xn,IE_VERSION:Rn,IS_SAFARI:On,IS_ANY_SAFARI:Dn,TOUCH_ENABLED:Mn}),Pn={},Nn=[["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"]],Un=Nn[0],Bn=void 0,Fn=0;Fn<Nn.length;Fn++)if(Nn[Fn][1]in we){Bn=Nn[Fn];break}if(Bn)for(var Gn=0;Gn<Bn.length;Gn++)Pn[Un[Gn]]=Bn[Gn];at.prototype.code=0,at.prototype.message="",at.prototype.status=null,at.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],at.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var zn=0;zn<at.errorTypes.length;zn++)at[at.errorTypes[zn]]=zn,at.prototype[at.errorTypes[zn]]=zn;var Vn=st,Hn=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,n,r){return t[n]&&(e[n]=t[n]),e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},Wn=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=Hn(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===n.indexOf(t)}).map(Hn))},Qn=function(t,e){return t.forEach(function(t){var n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return n.addCue(t)})}),e.textTracks()},Yn={textTracksToJson:Wn,jsonToTextTracks:Qn,trackToJson_:Hn},qn="vjs-modal-dialog",Kn=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=v("div",{className:qn+"-content"},{role:"document"}),i.descEl_=v("p",{className:qn+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),m(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return Me(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return qn+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",tn(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",tn(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!e&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},e.prototype.fill=function(){this.fillWith(this.content())},e.prototype.fillWith=function(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),P(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},e.prototype.empty=function(){this.trigger("beforemodalempty"),D(this.contentEl()),this.trigger("modalempty")},e.prototype.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.prototype.conditionalFocus_=function(){var t=we.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(we,"keydown",this.handleKeyDown))},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(we,"keydown",this.handleKeyDown)},e.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<e.length;i++)if(n===e[i]){r=i;break}we.activeElement===this.el_&&(r=0),t.shiftKey&&0===r?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||r!==e.length-1||(e[0].focus(),t.preventDefault())}},e.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof _e.HTMLAnchorElement||t instanceof _e.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof _e.HTMLInputElement||t instanceof _e.HTMLSelectElement||t instanceof _e.HTMLTextAreaElement||t instanceof _e.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof _e.HTMLIFrameElement||t instanceof _e.HTMLObjectElement||t instanceof _e.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},e}(vn);Kn.prototype.options_={pauseOnOpen:!0,temporary:!0},vn.registerComponent("ModalDialog",Kn);var Xn=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,e);var r=je(this,t.call(this));r.tracks_=[],Object.defineProperty(r,"length",{get:function(){return this.tracks_.length}});for(var i=0;i<n.length;i++)r.addTrack(n[i]);return r}return Me(e,t),e.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.prototype.removeTrack=function(t){for(var e=void 0,n=0,r=this.length;n<r;n++)if(this[n]===t){e=this[n],e.off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.prototype.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(rn);Xn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Zn in Xn.prototype.allowedEvents_)Xn.prototype["on"+Zn]=null;var Jn=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},$n=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,e);for(var r=n.length-1;r>=0;r--)if(n[r].enabled){Jn(n,n[r]);break}var i=je(this,t.call(this,n));return i.changing_=!1,i}return Me(e,t),e.prototype.addTrack=function(e){var n=this;e.enabled&&Jn(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){n.changing_||(n.changing_=!0,Jn(n,e),n.changing_=!1,n.trigger("change"))})},e}(Xn),tr=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},er=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,e);for(var r=n.length-1;r>=0;r--)if(n[r].selected){tr(n,n[r]);break}var i=je(this,t.call(this,n));return i.changing_=!1,Object.defineProperty(i,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),i}return Me(e,t),e.prototype.addTrack=function(e){var n=this;e.selected&&tr(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",function(){n.changing_||(n.changing_=!0,tr(n,e),n.changing_=!1,n.trigger("change"))})},e}(Xn),nr=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",tn(this,function(){this.queueTrigger("change")})),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",tn(this,function(){this.trigger("selectedlanguagechange")}))},e}(Xn),rr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,t),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var n=0,r=e.length;n<r;n++)this.addTrackElement_(e[n])}return t.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},t.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},t.prototype.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),ir=function(){function t(e){De(this,t),t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}return t.prototype.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},t.prototype.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},t}(),or={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ar={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},sr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ur={disabled:"disabled",hidden:"hidden",showing:"showing"},lr=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var r=je(this,t.call(this)),i={id:n.id||"vjs_track_"+U(),kind:n.kind||"",label:n.label||"",language:n.language||""};for(var o in i)!function(t){Object.defineProperty(r,t,{get:function(){return i[t]},set:function(){}})}(o);return r}return Me(e,t),e}(rn),cr=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=we.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&(i=we.createElement("div"),i.innerHTML='<a href="'+t+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),we.body.appendChild(i));for(var o={},a=0;a<e.length;a++)o[e[a]]=n[e[a]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=_e.location.protocol),r&&we.body.removeChild(i),o},dr=function(t){if(!t.match(/^https?:\/\//)){var e=we.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},hr=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=e.exec(t);if(n)return n.pop().toLowerCase()}return""},fr=function(t){var e=_e.location,n=cr(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},pr=Object.freeze({parseUrl:cr,getAbsoluteURL:dr,getFileExtension:hr,isCrossOrigin:fr}),vr=ct,mr=Object.prototype.toString,gr=Object.freeze({default:vr,__moduleExports:vr}),yr=t(function(t,e){function n(t){return t.replace(/^\s*|\s*$/g,"")}e=t.exports=n,e.left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),Ar=yr.left,_r=yr.right,br=Object.freeze({default:yr,__moduleExports:yr,left:Ar,right:_r}),Tr=gr&&vr||gr,Sr=dt,Er=Object.prototype.toString,wr=Object.prototype.hasOwnProperty,kr=Object.freeze({default:Sr,__moduleExports:Sr}),Cr=br&&yr||br,Lr=kr&&Sr||kr,Ir=function(t){return"[object Array]"===Object.prototype.toString.call(t)},xr=function(t){if(!t)return{};var e={};return Lr(Cr(t).split("\n"),function(t){var n=t.indexOf(":"),r=Cr(t.slice(0,n)).toLowerCase(),i=Cr(t.slice(n+1));void 0===e[r]?e[r]=i:Ir(e[r])?e[r].push(i):e[r]=[e[r],i]}),e},Rr=Object.freeze({default:xr,__moduleExports:xr}),Or=vt,Dr=Object.prototype.hasOwnProperty,Mr=Object.freeze({default:Or,__moduleExports:Or}),jr=Rr&&xr||Rr,Pr=Mr&&Or||Mr,Nr=yt;yt.XMLHttpRequest=_e.XMLHttpRequest||bt,yt.XDomainRequest="withCredentials"in new yt.XMLHttpRequest?yt.XMLHttpRequest:_e.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)!function(t){yt["delete"===t?"del":t]=function(e,n,r){return n=gt(e,n,r),n.method=t.toUpperCase(),At(n)}}(t[n])}(["get","put","post","patch","head","delete"]);var Ur=function(t,e){var n=new _e.WebVTT.Parser(_e,_e.vttjs,_e.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&&(_e.console&&_e.console.groupCollapsed&&_e.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach(function(t){return xe.error(t)}),_e.console&&_e.console.groupEnd&&_e.console.groupEnd()),n.flush()},Br=function(t,e){var n={uri:t},r=fr(t);r&&(n.cors=r),Nr(n,tn(this,function(t,n,r){if(t)return xe.error(t,n);if(e.loaded_=!0,"function"!=typeof _e.WebVTT){if(e.tech_){var i=function(){return Ur(r,e)};e.tech_.on("vttjsloaded",i),e.tech_.on("vttjserror",function(){xe.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",i)})}}else Ur(r,e)}))},Fr=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(De(this,e),!n.tech)throw new Error("A tech was not provided.");var r=tt(n,{kind:sr[n.kind]||"subtitles",language:n.language||n.srclang||""}),i=ur[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden");var a=je(this,t.call(this,r));a.tech_=r.tech,a.cues_=[],a.activeCues_=[];var s=new ir(a.cues_),u=new ir(a.activeCues_),l=!1,c=tn(a,function(){this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1)});return"disabled"!==i&&a.tech_.ready(function(){a.tech_.on("timeupdate",c)},!0),Object.defineProperties(a,{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(t){var e=this;ur[t]&&(i=t,"disabled"!==i?this.tech_.ready(function(){e.tech_.on("timeupdate",c)},!0):this.tech_.off("timeupdate",c),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return u;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=t&&i.endTime>=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(l=!1,e.length!==this.activeCues_.length)l=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(l=!0);return this.activeCues_=e,u.setCues_(this.activeCues_),u},set:function(){}}}),r.src?(a.src=r.src,Br(r.src,a)):a.loaded_=!0,a}return Me(e,t),e.prototype.addCue=function(t){var e=t;if(_e.vttjs&&!(t instanceof _e.vttjs.VTTCue)){e=new _e.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(var n in t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(lr);Fr.prototype.allowedEvents_={cuechange:"cuechange"};var Gr=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var r=tt(n,{kind:ar[n.kind]||""}),i=je(this,t.call(this,r)),o=!1;return Object.defineProperty(i,"enabled",{get:function(){return o},set:function(t){"boolean"==typeof t&&t!==o&&(o=t,this.trigger("enabledchange"))}}),r.enabled&&(i.enabled=r.enabled),i.loaded_=!0,i}return Me(e,t),e}(lr),zr=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var r=tt(n,{kind:or[n.kind]||""}),i=je(this,t.call(this,r)),o=!1;return Object.defineProperty(i,"selected",{get:function(){return o},set:function(t){"boolean"==typeof t&&t!==o&&(o=t,this.trigger("selectedchange"))}}),r.selected&&(i.selected=r.selected),i}return Me(e,t),e}(lr),Vr=0,Hr=2,Wr=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var r=je(this,t.call(this)),i=void 0,o=new Fr(n);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,Object.defineProperties(r,{readyState:{get:function(){return i}},track:{get:function(){return o}}}),i=Vr,o.addEventListener("loadeddata",function(){i=Hr,r.trigger({type:"load",target:r})}),r}return Me(e,t),e}(rn);Wr.prototype.allowedEvents_={load:"load"},Wr.NONE=Vr,Wr.LOADING=1,Wr.LOADED=Hr,Wr.ERROR=3;var Qr={audio:{ListClass:$n,TrackClass:Gr,capitalName:"Audio"},video:{ListClass:er,TrackClass:zr,capitalName:"Video"},text:{ListClass:nr,TrackClass:Fr,capitalName:"Text"}};Object.keys(Qr).forEach(function(t){Qr[t].getterName=t+"Tracks",Qr[t].privateName=t+"Tracks_"});var Yr={remoteText:{ListClass:nr,TrackClass:Fr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:rr,TrackClass:Wr,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},qr=tt(Qr,Yr);Yr.names=Object.keys(Yr),Qr.names=Object.keys(Qr),qr.names=[].concat(Yr.names).concat(Qr.names);var Kr=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}}();Tt.prototype=Kr(Error.prototype),Tt.prototype.constructor=Tt,Tt.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Et.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<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var Xr={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},Zr={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Jr={v:"title",lang:"lang"},$r={rt:"ruby"},ti=[[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]];Rt.prototype.applyStyles=function(t,e){e=e||this.div;for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},Rt.prototype.formatStyle=function(t,e){return 0===t?0:t+e},Ot.prototype=Kr(Rt.prototype),Ot.prototype.constructor=Ot,Dt.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}},Dt.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},Dt.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},Dt.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Dt.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},Dt.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Dt.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Dt.getSimpleBoxPosition=function(t){var 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;return t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t,{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}},jt.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},jt.convertCueToDOMTree=function(t,e){return t&&e?Ct(t,e):null},jt.processCues=function(t,e,n){if(!t||!e||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=t.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){var i=[],o=Dt.getSimpleBoxPosition(r),a=Math.round(.05*o.height*100)/100,s={font:a+"px sans-serif"};!function(){for(var n,a,u=0;u<e.length;u++)a=e[u],n=new Ot(t,a,s),r.appendChild(n.div),Mt(t,n,o,i),a.displayState=n.div,i.push(Dt.getSimpleBoxPosition(n))}()}else for(var u=0;u<e.length;u++)r.appendChild(e[u].displayState)},jt.Parser=function(t,e,n){n||(n=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},jt.Parser.prototype={reportOrThrowError:function(t){if(!(t instanceof Tt))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){function e(){for(var t=i.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,i.buffer=t.substr(e),n}function n(t){var e=new Et;if(wt(t,function(t,n){switch(t){case"id":e.set(t,n);break;case"width":e.percent(t,n);break;case"lines":e.integer(t,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new Et;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;e.set(t+"X",i.get("x")),e.set(t+"Y",i.get("y"));break;case"scroll":e.alt(t,n,["up"])}},/=/,/\s/),e.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=e.get("width",100),n.lines=e.get("lines",3),n.regionAnchorX=e.get("regionanchorX",0),n.regionAnchorY=e.get("regionanchorY",100),n.viewportAnchorX=e.get("viewportanchorX",0),n.viewportAnchorY=e.get("viewportanchorY",100),n.scroll=e.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:e.get("id"),region:n})}}function r(t){var e=new Et;wt(t,function(t,n){switch(t){case"MPEGT":e.integer(t+"S",n);break;case"LOCA":e.set(t+"L",St(n))}},/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:e.get("MPEGTS"),LOCAL:e.get("LOCAL")})}var i=this;t&&(i.buffer+=i.decoder.decode(t,{stream:!0}));try{var o;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;o=e();var a=o.match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Tt(Tt.Errors.BadSignature);i.state="HEADER"}for(var s=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(s?s=!1:o=e(),i.state){case"HEADER":/:/.test(o)?function(t){t.match(/X-TIMESTAMP-MAP/)?wt(t,function(t,e){switch(t){case"X-TIMESTAMP-MAP":r(e)}},/=/):wt(t,function(t,e){switch(t){case"Region":n(e)}},/:/)}(o):o||(i.state="ID");continue;case"NOTE":o||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){i.state="NOTE";break}if(!o)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===o.indexOf("--\x3e")){i.cue.id=o;continue}case"CUE":try{kt(o,i.cue,i.regionList)}catch(t){i.reportOrThrowError(t),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var u=-1!==o.indexOf("--\x3e");if(!o||u&&(s=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=o;continue;case"BADCUE":o||(i.state="ID");continue}}}catch(t){i.reportOrThrowError(t),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Tt(Tt.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var ei=jt,ni=Object.freeze({default:ei,__moduleExports:ei}),ri="auto",ii={"":1,lr:1,rl:1},oi={start:1,middle:1,end:1,left:1,right:1};Ut.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var ai=Ut,si=Object.freeze({default:ai,__moduleExports:ai}),ui={"":!0,up:!0},li=Gt,ci=Object.freeze({default:li,__moduleExports:li}),di=ni&&ei||ni,hi=si&&ai||si,fi=ci&&li||ci,pi=t(function(t){var e=t.exports={WebVTT:di,VTTCue:hi,VTTRegion:fi};_e.vttjs=e,_e.WebVTT=e.WebVTT;var n=e.VTTCue,r=e.VTTRegion,i=_e.VTTCue,o=_e.VTTRegion;e.shim=function(){_e.VTTCue=n,_e.VTTRegion=r},e.restore=function(){_e.VTTCue=i,_e.VTTRegion=o},_e.VTTCue||e.shim()}),vi=(pi.WebVTT,pi.VTTCue,pi.VTTRegion,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(){};De(this,e),n.reportTouchActivity=!1;var i=je(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}),qr.names.forEach(function(t){var e=qr[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 qr.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return Me(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(tn(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 it(0,0)},e.prototype.bufferedPercent=function(){return ot(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(Qr.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){for(var n=e[t+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}})},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new at(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?it(0,0):it()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;Qr.names.forEach(function(e){var n=Qr[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(!_e.WebVTT)if(we.body.contains(this.el())){if(!this.options_["vtt.js"]&&a(pi)&&Object.keys(pi).length>0)return void this.trigger("vttjsloaded");var e=we.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/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}),_e.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")},a=function(){o();for(var t=0;t<e.length;t++){var n=e[t];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),e.addEventListener("change",a),e.addEventListener("addtrack",a),e.addEventListener("removetrack",a),this.on("dispose",function(){n.off("addtrack",r),n.off("removetrack",i),e.removeEventListener("change",a),e.removeEventListener("addtrack",a),e.removeEventListener("removetrack",a);for(var t=0;t<e.length;t++)e[t].removeEventListener("cuechange",o)})},e.prototype.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return zt(this,t,e,n)},e.prototype.createRemoteTextTrack=function(t){var e=tt(t,{tech:this});return new Yr.remoteTextEl.TrackClass(e)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(xe.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.overrideNativeAudioTracks=function(){},e.prototype.overrideNativeVideoTracks=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=J(t),e.techs_[t]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return t=J(t),e.techs_&&e.techs_[t]?e.techs_[t]:_e&&_e.videojs&&_e.videojs[t]?(xe.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),_e.videojs[t]):void 0},e}(vn));qr.names.forEach(function(t){var e=qr[t];vi.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),vi.prototype.featuresVolumeControl=!0,vi.prototype.featuresMuteControl=!0,vi.prototype.featuresFullscreenResize=!1,vi.prototype.featuresPlaybackRate=!1,vi.prototype.featuresProgressEvents=!1,vi.prototype.featuresSourceset=!1,vi.prototype.featuresTimeupdateEvents=!1,vi.prototype.featuresNativeTextTracks=!1,vi.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;i<n.length;i++)if(r=n[i].canPlayType(e))return r;return""},t.selectSourceHandler=function(e,n){for(var r=t.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(e,n))return r[i];return null},t.canPlaySource=function(e,n){var r=t.selectSourceHandler(e,n);return r?r.canHandleSource(e,n):""},["seekable","seeking","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(e){var n=t.selectSourceHandler(e,this.options_);n||(t.nativeSourceHandler?n=t.nativeSourceHandler:xe.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=n.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},vn.registerComponent("Tech",vi),vi.registerTech("Tech",vi),vi.defaultTechOrder_=[];var mi={},gi={},yi={},Ai={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},_i={setCurrentTime:1},bi={play:1,pause:1},Ti={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"},Si=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=hr(t);return Ti[e.toLowerCase()]||""},Ei=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;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===e)return o.type}return Si(e)},wi=function t(e){if(Array.isArray(e)){var n=[];e.forEach(function(e){e=t(e),Array.isArray(e)?n=n.concat(e):o(e)&&n.push(e)}),e=n}else e="string"==typeof e&&e.trim()?[te({src:e})]:o(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[te(e)]:[];return e},ki=function(t){function e(n,r,i){De(this,e);var o=tt({createEl:!1},r),a=je(this,t.call(this,n,o,i));if(r.playerOptions.sources&&0!==r.playerOptions.sources.length)n.src(r.playerOptions.sources);else for(var s=0,u=r.playerOptions.techOrder;s<u.length;s++){var l=J(u[s]),c=vi.getTech(l);if(l||(c=vn.getComponent(l)),c&&c.isSupported()){n.loadTech_(l);break}}return a}return Me(e,t),e}(vn);vn.registerComponent("MediaLoader",ki);var Ci=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.emitTapEvents(),i.enable(),i}return Me(e,t),e.prototype.createEl=function(){var e=arguments.length>0&&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=i({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&xe.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),r=i({role:"button"},r),this.tabIndex_=n.tabIndex;var o=t.prototype.createEl.call(this,e,n,r);return this.createControlTextEl(o),o},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=v("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,m(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"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){W(we,"keydown",tn(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){Q(we,"keydown",tn(this,this.handleKeyPress))},e}(vn);vn.registerComponent("ClickableComponent",Ci);var Li=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.update(),n.on("posterchange",tn(i,i.update)),i}return Me(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){return v("div",{className:"vjs-poster",tabIndex:-1})},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?lt(this.player_.play()):this.player_.pause())},e}(Ci);vn.registerComponent("PosterImage",Li);var Ii={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'},xi=function(t){function e(n,r,i){De(this,e);var o=je(this,t.call(this,n,r,i)),a=tn(o,o.updateDisplay);return n.on("loadstart",tn(o,o.toggleDisplay)),n.on("texttrackchange",a),n.on("loadstart",tn(o,o.preselectTrack)),n.ready(tn(o,function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)return void this.hide();n.on("fullscreenchange",a),n.on("playerresize",a),_e.addEventListener("orientationchange",a),n.on("dispose",function(){return _e.removeEventListener("orientationchange",a)});for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()})),o}return Me(e,t),e.prototype.preselectTrack=function(){for(var t={captions:1,subtitles:1},e=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,o=void 0,a=0;a<e.length;a++){var s=e[a];n&&n.enabled&&n.language===s.language?s.kind===n.kind?o=s:o||(o=s):n&&!n.enabled?(o=null,r=null,i=null):s.default&&("descriptions"!==s.kind||r?s.kind in t&&!i&&(i=s):r=s)}o?o.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},e.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.prototype.clearDisplay=function(){"function"==typeof _e.WebVTT&&_e.WebVTT.processCues(_e,[],this.el_)},e.prototype.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,n=null,r=t.length;r--;){var i=t[r];"showing"===i.mode&&("descriptions"===i.kind?e=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},e.prototype.updateForTrack=function(t){if("function"==typeof _e.WebVTT&&t.activeCues){for(var e=[],n=0;n<t.activeCues.length;n++)e.push(t.activeCues[n]);if(_e.WebVTT.processCues(_e,e,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),i=e.length;i--;){var o=e[i];if(o){var a=o.displayState;if(r.color&&(a.firstChild.style.color=r.color),r.textOpacity&&ne(a.firstChild,"color",ee(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(a.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&ne(a.firstChild,"backgroundColor",ee(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?ne(a,"backgroundColor",ee(r.windowColor,r.windowOpacity)):a.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===r.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===r.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===r.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),r.fontPercent&&1!==r.fontPercent){var s=_e.parseFloat(a.style.fontSize);a.style.fontSize=s*r.fontPercent+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Ii[r.fontFamily])}}}},e}(vn);vn.registerComponent("TextTrackDisplay",xi);var Ri=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.createEl=function(){var e=this.player_.isAudio(),n=this.localize(e?"Audio Player":"Video Player"),r=v("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},e}(vn);vn.registerComponent("LoadingSpinner",Ri);var Oi=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.createEl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=i({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),n=i({type:"button"},n);var r=vn.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 xe.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),vn.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}(Ci);vn.registerComponent("Button",Oi);var Di=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return Me(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)return void lt(e);var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(!r)return void this.player_.focus();var i=function(){return r.focus()};ut(e)?e.then(i,function(){}):this.setTimeout(i,1)},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(Oi);Di.prototype.controlText_="Play Video",vn.registerComponent("BigPlayButton",Di);var Mi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return Me(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}(Oi);vn.registerComponent("CloseButton",Mi);var ji=function(t){function e(n,r){De(this,e);var i=je(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 Me(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}(Oi);ji.prototype.controlText_="Play",vn.registerComponent("PlayToggle",ji);var Pi=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),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),i=i>0||a>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n},Ni=Pi,Ui=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.throttledUpdateContent=en(tn(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return Me(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:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=v("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_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=we.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return oe(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}(vn);Ui.prototype.labelText_="Time",Ui.prototype.controlText_="Time",vn.registerComponent("TimeDisplay",Ui);var Bi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return Me(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}(Ui);Bi.prototype.labelText_="Current Time",Bi.prototype.controlText_="Current Time",vn.registerComponent("CurrentTimeDisplay",Bi);var Fi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return Me(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}(Ui);Fi.prototype.labelText_="Duration",Fi.prototype.controlText_="Duration",vn.registerComponent("DurationDisplay",Fi);var Gi=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}(vn);vn.registerComponent("TimeDivider",Gi);var zi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return Me(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}(Ui);zi.prototype.labelText_="Remaining Time",zi.prototype.controlText_="Remaining Time",vn.registerComponent("RemainingTimeDisplay",zi);var Vi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return Me(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=v("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+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}(vn);vn.registerComponent("LiveDisplay",Vi);var Hi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return Me(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=i({tabIndex:0},n),r=i({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||In||t.preventDefault(),C(),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;L(),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=R(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}(vn);vn.registerComponent("Slider",Hi);var Wi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return Me(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},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 a=0;a<e.length;a++){var s=e.start(a),u=e.end(a),l=i[a];l||(l=this.el_.appendChild(v()),i[a]=l),l.style.left=o(s,r),l.style.width=o(u-s,r)}for(var c=i.length;c>e.length;c--)this.el_.removeChild(i[c-1]);i.length=e.length},e}(vn);vn.registerComponent("LoadProgressBar",Wi);var Qi=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(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=I(this.el_),i=I(this.player_.el()),o=t.width*e;if(i&&r){var a=t.left-i.left+o,s=t.width-o+(i.right-t.right),u=r.width/2;a<u?u+=u-a:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),this.el_.style.right="-"+u+"px",m(this.el_,n)}},e}(vn);vn.registerComponent("TimeTooltip",Qi);var Yi=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},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=oe(r,n.player_.duration()),o=n.getChild("timeTooltip");o&&o.update(t,e,i)})},e}(vn);Yi.prototype.options_={children:[]},Tn||En||Yi.prototype.options_.children.push("timeTooltip"),vn.registerComponent("PlayProgressBar",Yi);var qi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.update=en(tn(i,i.update),25),i}return Me(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=oe(e*r,r);n.el_.style.left=t.width*e+"px",n.getChild("timeTooltip").update(t,e,i)})},e}(vn);qi.prototype.options_={children:["timeTooltip"]},vn.registerComponent("MouseTimeDisplay",qi);var Ki=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.setEventHandlers_(),i}return Me(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=en(tn(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval(function(){t.requestAnimationFrame(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(){t.clearInterval(t.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},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}",[oe(t,n),oe(n,n)],"{1} of {2}")),this.bar.update(I(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||0},e.prototype.handleMouseDown=function(e){N(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(N(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&<(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},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}(Hi);Ki.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Tn||En||Ki.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Ki.prototype.playerEvent="timeupdate",vn.registerComponent("SeekBar",Ki);var Xi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.handleMouseMove=en(tn(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=en(tn(i,i.handleMouseSeek),25),i.enable(),i}return Me(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=I(r),o=R(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}(vn);Xi.prototype.options_={children:["seekBar"]},vn.registerComponent("ProgressControl",Xi);var Zi=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),!1===we[Pn.fullscreenEnabled]&&i.disable(),i}return Me(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}(Oi);Zi.prototype.controlText_="Fullscreen",vn.registerComponent("FullscreenToggle",Zi);var Ji=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")})},$i=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(vn);vn.registerComponent("VolumeLevel",$i);var to=function(t){function e(n,r){De(this,e);var i=je(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 Me(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){N(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){N(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}(Hi);to.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},to.prototype.playerEvent="volumechange",vn.registerComponent("VolumeBar",to);var eo=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e),r.vertical=r.vertical||!1,(void 0===r.volumeBar||a(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=je(this,t.call(this,n,r));return Ji(i,n),i.throttledHandleMouseMove=en(tn(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 Me(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}(vn);eo.prototype.options_={children:["volumeBar"]},vn.registerComponent("VolumeControl",eo);var no=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")})},ro=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return no(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return Me(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;Tn&&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++)_(this.el_,"vjs-vol-"+n);A(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}(Oi);ro.prototype.controlText_="Mute",vn.registerComponent("MuteToggle",ro);var io=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e),void 0!==r.inline?r.inline=r.inline:r.inline=!0,(void 0===r.volumeControl||a(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=je(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 Me(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}(vn);io.prototype.options_={children:["muteToggle","volumeControl"]},vn.registerComponent("VolumePanel",io);var oo=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return Me(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",tn(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_=v(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_),W(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();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(vn);vn.registerComponent("Menu",oo);var ao=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e);var i=je(this,t.call(this,n,r));i.menuButton_=new Oi(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=Oi.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 Me(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 oo(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=v("li",{className:"vjs-menu-title",innerHTML:J(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),g(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)t.addItem(this.items[n]);return t},e.prototype.createItems=function(){},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},e.prototype.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+Oi.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},e.prototype.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},e.prototype.controlText=function(t){var e=arguments.length>1&&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",tn(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(){W(we,"keydown",tn(this,this.handleKeyPress))},e.prototype.handleBlur=function(){Q(we,"keydown",tn(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"),Tn&&f())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}(vn);vn.registerComponent("MenuButton",ao);var so=function(t){function e(n,r){De(this,e);var i=r.tracks,o=je(this,t.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return je(o);var a=tn(o,o.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),o.player_.on("ready",a),o.player_.on("dispose",function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a)}),o}return Me(e,t),e}(ao);vn.registerComponent("TrackButton",so);var uo=function(t){function e(n,r){De(this,e);var i=je(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 Me(e,t),e.prototype.createEl=function(e,n,r){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",i({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",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}(Ci);vn.registerComponent("MenuItem",uo);var lo=function(t){function e(n,r){De(this,e);var i=r.track,o=n.textTracks();r.label=i.label||i.language||"Unknown",r.selected="showing"===i.mode;var a=je(this,t.call(this,n,r));a.track=i;var s=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];a.handleTracksChange.apply(a,e)},u=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];a.handleSelectedLanguageChange.apply(a,e)};if(n.on(["loadstart","texttrackchange"],s),o.addEventListener("change",s),o.addEventListener("selectedlanguagechange",u),a.on("dispose",function(){n.off(["loadstart","texttrackchange"],s),o.removeEventListener("change",s),o.removeEventListener("selectedlanguagechange",u)}),void 0===o.onchange){var l=void 0;a.on(["tap","click"],function(){if("object"!==Oe(_e.Event))try{l=new _e.Event("change")}catch(t){}l||(l=we.createEvent("Event"),l.initEvent("change",!0,!0)),o.dispatchEvent(l)})}return a.handleTracksChange(),a}return Me(e,t),e.prototype.handleClick=function(e){var n=this.track.kind,r=this.track.kinds,i=this.player_.textTracks();if(r||(r=[n]),t.prototype.handleClick.call(this,e),i)for(var o=0;o<i.length;o++){var a=i[o];a===this.track&&r.indexOf(a.kind)>-1?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.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}(uo);vn.registerComponent("TextTrackMenuItem",lo);var co=function(t){function e(n,r){return De(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,je(this,t.call(this,n,r))}return Me(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(this.options_.kinds.indexOf(o.kind)>-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<i;r++){var o=e[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(lo);vn.registerComponent("OffTextTrackMenuItem",co);var ho=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return De(this,e),r.tracks=n.textTracks(),je(this,t.call(this,n,r))}return Me(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]:lo,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new co(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<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new e(this.player_,{track:o,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),t.push(a)}}return t},e}(so);vn.registerComponent("TextTrackButton",ho);var fo=function(t){function e(n,r){De(this,e);var i=r.track,o=r.cue,a=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=o.text,r.selected=o.startTime<=a&&a<o.endTime;var s=je(this,t.call(this,n,r));return s.track=i,s.cue=o,i.addEventListener("cuechange",tn(s,s.update)),s}return Me(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.prototype.update=function(t){var e=this.cue,n=this.player_.currentTime();this.selected(e.startTime<=n&&n<e.endTime)},e}(uo);vn.registerComponent("ChaptersTrackMenuItem",fo);var po=function(t){function e(n,r,i){return De(this,e),je(this,t.call(this,n,r,i))}return Me(e,t),e.prototype.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},e.prototype.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},e.prototype.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;e>=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(J(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<r;n++){var i=e[n],o=new fo(this.player_,{track:this.track_,cue:i});t.push(o)}return t},e}(ho);po.prototype.kind_="chapters",po.prototype.controlText_="Chapters",vn.registerComponent("ChaptersButton",po);var vo=function(t){function e(n,r,i){De(this,e);var o=je(this,t.call(this,n,r,i)),a=n.textTracks(),s=tn(o,o.handleTracksChange);return a.addEventListener("change",s),o.on("dispose",function(){a.removeEventListener("change",s)}),o}return Me(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!1,r=0,i=e.length;r<i;r++){var o=e[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},e.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(ho);vo.prototype.kind_="descriptions",vo.prototype.controlText_="Descriptions",vn.registerComponent("DescriptionsButton",vo);var mo=function(t){function e(n,r,i){return De(this,e),je(this,t.call(this,n,r,i))}return Me(e,t),e.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(ho);mo.prototype.kind_="subtitles",mo.prototype.controlText_="Subtitles",vn.registerComponent("SubtitlesButton",mo);var go=function(t){function e(n,r){De(this,e),r.track={player:n,kind:r.kind,label:r.kind+" settings",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="CaptionSettingsMenuItem";var i=je(this,t.call(this,n,r));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+r.kind+" settings dialog"),i}return Me(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(lo);vn.registerComponent("CaptionSettingsMenuItem",go);var yo=function(t){function e(n,r,i){return De(this,e),je(this,t.call(this,n,r,i))}return Me(e,t),e.prototype.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-captions-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 go(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(ho);yo.prototype.kind_="captions",yo.prototype.controlText_="Captions",vn.registerComponent("CaptionsButton",yo);var Ao=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.createEl=function(e,n,r){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(o+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),o+="</span>",t.prototype.createEl.call(this,e,i({innerHTML:o},n),r)},e}(lo);vn.registerComponent("SubsCapsMenuItem",Ao);var _o=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e);var i=je(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(J(i.label_)),i}return Me(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 go(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,Ao)},e}(ho);_o.prototype.kinds_=["captions","subtitles"],_o.prototype.controlText_="Subtitles",vn.registerComponent("SubsCapsButton",_o);var bo=function(t){function e(n,r){De(this,e);var i=r.track,o=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var a=je(this,t.call(this,n,r));a.track=i,a.addClass("vjs-"+i.kind+"-menu-item");var s=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];a.handleTracksChange.apply(a,e)};return o.addEventListener("change",s),a.on("dispose",function(){o.removeEventListener("change",s)}),a}return Me(e,t),e.prototype.createEl=function(e,n,r){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(o+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),o+="</span>",t.prototype.createEl.call(this,e,i({innerHTML:o},n),r)},e.prototype.handleClick=function(e){var n=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},e.prototype.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(uo);vn.registerComponent("AudioTrackMenuItem",bo);var To=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return De(this,e),r.tracks=n.audioTracks(),je(this,t.call(this,n,r))}return Me(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<e.length;n++){var r=e[n];t.push(new bo(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return t},e}(so);To.prototype.controlText_="Audio Track",vn.registerComponent("AudioTrackButton",To);var So=function(t){function e(n,r){De(this,e);var i=r.rate,o=parseFloat(i,10);r.label=i,r.selected=1===o,r.selectable=!0,r.multiSelectable=!1;var a=je(this,t.call(this,n,r));return a.label=i,a.rate=o,a.on(n,"ratechange",a.update),a}return Me(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.prototype.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(uo);So.prototype.contentElType="button",vn.registerComponent("PlaybackRateMenuItem",So);var Eo=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.updateVisibility(),i.updateLabel(),i.on(n,"loadstart",i.updateVisibility),i.on(n,"ratechange",i.updateLabel),i}return Me(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=v("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},e.prototype.dispose=function(){this.labelEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createMenu=function(){var t=new oo(this.player()),e=this.playbackRates();if(e)for(var n=e.length-1;n>=0;n--)t.addChild(new So(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;i<n.length;i++)if(n[i]>e){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}(ao);Eo.prototype.controlText_="Playback Rate",vn.registerComponent("PlaybackRateMenuButton",Eo);var wo=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(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}(vn);vn.registerComponent("Spacer",wo);var ko=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(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}(wo);vn.registerComponent("CustomControlSpacer",ko);var Co=function(t){function e(){return De(this,e),je(this,t.apply(this,arguments))}return Me(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(vn);Co.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},vn.registerComponent("ControlBar",Co);var Lo=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r));return i.on(n,"error",i.open),i}return Me(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}(Kn);Lo.prototype.options_=tt(Kn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),vn.registerComponent("ErrorDisplay",Lo);var Io=["#000","Black"],xo=["#00F","Blue"],Ro=["#0FF","Cyan"],Oo=["#0F0","Green"],Do=["#F0F","Magenta"],Mo=["#F00","Red"],jo=["#FFF","White"],Po=["#FF0","Yellow"],No=["1","Opaque"],Uo=["0.5","Semi-Transparent"],Bo=["0","Transparent"],Fo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Io,jo,Mo,Oo,xo,Po,Do,Ro]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[No,Uo,Bo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[jo,Io,Mo,Oo,xo,Po,Do,Ro]},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:[No,Uo]},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:[Bo,Uo,No]}};Fo.windowColor.options=Fo.backgroundColor.options;var Go=function(t){function e(r,i){De(this,e),i.temporary=!1;var o=je(this,t.call(this,r,i));return o.updateDisplay=tn(o,o.updateDisplay),o.fill(),o.hasBeenOpened_=o.hasBeenFilled_=!0,o.endDialog=v("p",{className:"vjs-control-text",textContent:o.localize("End of dialog window.")}),o.el().appendChild(o.endDialog),o.setDefaults(),void 0===i.persistTextTrackSettings&&(o.options_.persistTextTrackSettings=o.options_.playerOptions.persistTextTrackSettings),o.on(o.$(".vjs-done-button"),"click",function(){o.saveSettings(),o.close()}),o.on(o.$(".vjs-default-button"),"click",function(){o.setDefaults(),o.updateDisplay()}),n(Fo,function(t){o.on(o.$(t.selector),"change",o.updateDisplay)}),o.options_.persistTextTrackSettings&&o.restoreSettings(),o}return Me(e,t),e.prototype.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},e.prototype.createElSelect_=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",i=Fo[t],o=i.id.replace("%s",this.id_),a=[n,o].join(" ").trim();return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map(function(t){var n=o+"-"+t[1].replace(/\W+/g,"");return['<option id="'+n+'" value="'+t[0]+'" ','aria-labelledby="'+a+" "+n+'">',e.localize(t[1]),"</option>"].join("")})).concat("</select>").join("")},e.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},e.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},e.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},e.prototype.createElColors_=function(){return v("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.prototype.createElFont_=function(){return v("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},e.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return v("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].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 r(Fo,function(e,n,r){var i=se(t.$(n.selector),n.parser);return void 0!==i&&(e[r]=i),e},{})},e.prototype.setValues=function(t){var e=this;n(Fo,function(n,r){ue(e.$(n.selector),t[r],n.parser)})},e.prototype.setDefaults=function(){var t=this;n(Fo,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(_e.localStorage.getItem("vjs-text-track-settings"))}catch(t){xe.warn(t)}t&&this.setValues(t)},e.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?_e.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):_e.localStorage.removeItem("vjs-text-track-settings")}catch(t){xe.warn(t)}}},e.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(we,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},e}(Kn);vn.registerComponent("TextTrackSettings",Go);var zo=function(t){function e(n,r){De(this,e);var i=r.ResizeObserver||_e.ResizeObserver;null===r.ResizeObserver&&(i=!1);var o=tt({createEl:!i,reportTouchActivity:!1},r),a=je(this,t.call(this,n,o));return a.ResizeObserver=r.ResizeObserver||_e.ResizeObserver,a.loadListener_=null,a.resizeObserver_=null,a.debouncedHandler_=nn(function(){a.resizeHandler()},100,!1,a),i?(a.resizeObserver_=new a.ResizeObserver(a.debouncedHandler_),a.resizeObserver_.observe(n.el())):(a.loadListener_=function(){a.el_&&a.el_.contentWindow&&W(a.el_.contentWindow,"resize",a.debouncedHandler_)},a.one("load",a.loadListener_)),a}return Me(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},e.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&Q(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}(vn);vn.registerComponent("ResizeManager",zo);var Vo=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<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),t.triggerSourceset(i),!0)},Ho=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=we.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var n=we.createDocumentFragment();e.childNodes.length;)n.appendChild(e.childNodes[0]);return this.innerText="",_e.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Wo=function(t,e){for(var n={},r=0;r<t.length&&!((n=Object.getOwnPropertyDescriptor(t[r],e))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},Qo=function(t){return Wo([t.el(),_e.HTMLMediaElement.prototype,_e.Element.prototype,Ho],"innerHTML")},Yo=function(t){var e=t.el();if(!e.resetSourceWatch_){var n={},r=Qo(t),i=function(n){return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=n.apply(e,i);return Vo(t),a}};["append","appendChild","insertAdjacentHTML"].forEach(function(t){e[t]&&(n[t]=e[t],e[t]=i(n[t]))}),Object.defineProperty(e,"innerHTML",tt(r,{set:i(r.set)})),e.resetSourceWatch_=function(){e.resetSourceWatch_=null,Object.keys(n).forEach(function(t){e[t]=n[t]}),Object.defineProperty(e,"innerHTML",r)},t.one("sourceset",e.resetSourceWatch_)}},qo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?dr(_e.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return _e.Element.prototype.setAttribute.call(this,"src",t),t}}),Ko=function(t){return Wo([t.el(),_e.HTMLMediaElement.prototype,qo],"src")},Xo=function(t){if(t.featuresSourceset){var e=t.el();if(!e.resetSourceset_){var n=Ko(t),r=e.setAttribute,i=e.load;Object.defineProperty(e,"src",tt(n,{set:function(r){var i=n.set.call(e,r);return t.triggerSourceset(e.src),i}})),e.setAttribute=function(n,i){var o=r.call(e,n,i);return/src/i.test(n)&&t.triggerSourceset(e.src),o},e.load=function(){var n=i.call(e);return Vo(t)||(t.triggerSourceset(""),Yo(t)),n},e.currentSrc?t.triggerSourceset(e.currentSrc):Vo(t)||Yo(t),e.resetSourceset_=function(){e.resetSourceset_=null,e.load=i,e.setAttribute=r,Object.defineProperty(e,"src",n),e.resetSourceWatch_&&e.resetSourceWatch_()}}}},Zo=Pe(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."]),Jo=function(t){function e(n,r){De(this,e);var i=je(this,t.call(this,n,r)),o=n.source,a=!1;if(o&&(i.el_.currentSrc!==o.src||n.tag&&3===n.tag.initNetworkState_)?i.setSource(o):i.handleLateInit_(i.el_),n.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var s=i.el_.childNodes,u=s.length,l=[];u--;){var c=s[u];"track"===c.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(c),i.remoteTextTracks().addTrack(c.track),i.textTracks().addTrack(c.track),a||i.el_.hasAttribute("crossorigin")||!fr(c.src)||(a=!0)):l.push(c))}for(var d=0;d<l.length;d++)i.el_.removeChild(l[d])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&a&&xe.warn(Re(Zo)),i.restoreMetadataTracksInIOSNativePlayer_(),(Mn||_n||kn)&&!0===n.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}return Me(e,t),e.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,t.prototype.dispose.call(this)},e.prototype.setupSourcesetHandling_=function(){Xo(this)},e.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var t=this.textTracks(),e=void 0,n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",function(){return t.removeEventListener("change",n)});var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)})},e.prototype.overrideNative_=function(t,e){var n=this;if(e===this["featuresNative"+t+"Tracks"]){var r=t.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach(function(t){n.el()[r+"Tracks"].removeEventListener(t,n[r+"TracksListeners_"][t])}),this["featuresNative"+t+"Tracks"]=!e,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},e.prototype.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},e.prototype.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},e.prototype.proxyNativeTracksForType_=function(t){var e=this,n=Qr[t],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(t){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},addtrack:function(t){i.addTrack(t.track)},removetrack:function(t){i.removeTrack(t.track)}},a=function(){for(var t=[],e=0;e<i.length;e++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[e]){n=!0;break}n||t.push(i[e])}for(;t.length;)i.removeTrack(t.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach(function(t){var n=o[t];r.addEventListener(t,n),e.on("dispose",function(e){return r.removeEventListener(t,n)})}),this.on("loadstart",a),this.on("dispose",function(t){return e.off("loadstart",a)})}},e.prototype.proxyNativeTracks_=function(){var t=this;Qr.names.forEach(function(e){t.proxyNativeTracksForType_(e)})},e.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),e.disposeMediaElement(t),t=n}else{t=we.createElement("video");var r=this.options_.tag&&S(this.options_.tag),o=tt({},r);Mn&&!0===this.options_.nativeControlsForTouch||delete o.controls,T(t,i(o,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&w(t,"preload",this.options_.preload);for(var a=["loop","muted","playsinline","autoplay","stretch","fluent"],s=0;s<a.length;s++){var u=a[s],l=this.options_[u];void 0!==l&&(l?w(t,u,u):k(t,u),t[u]=l)}return t},e.prototype.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,n=function(){e=!0};this.on("loadstart",n);var r=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),e||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),t.readyState>=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(t){xe(t,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;if(this.el_.duration===1/0&&En&&In&&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=_e.navigator&&_e.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=we.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)for(var n=this.$$("track"),r=n.length;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 void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),_e.performance&&"function"==typeof _e.performance.now?t.creationTime=_e.performance.now():_e.performance&&_e.performance.timing&&"number"==typeof _e.performance.timing.navigationStart&&(t.creationTime=_e.Date.now()-_e.performance.timing.navigationStart),t},e}(vi);if(d()){Jo.TEST_VID=we.createElement("video");var $o=we.createElement("track");$o.kind="captions",$o.srclang="en",$o.label="English",Jo.TEST_VID.appendChild($o)}Jo.isSupported=function(){try{Jo.TEST_VID.volume=.5}catch(t){return!1}return!(!Jo.TEST_VID||!Jo.TEST_VID.canPlayType)},Jo.canPlayType=function(t){return Jo.TEST_VID.canPlayType(t)},Jo.canPlaySource=function(t,e){return Jo.canPlayType(t.type)},Jo.canControlVolume=function(){try{var t=Jo.TEST_VID.volume;return Jo.TEST_VID.volume=t/2+.1,t!==Jo.TEST_VID.volume}catch(t){return!1}},Jo.canMuteVolume=function(){try{var t=Jo.TEST_VID.muted;return Jo.TEST_VID.muted=!t,Jo.TEST_VID.muted?w(Jo.TEST_VID,"muted","muted"):k(Jo.TEST_VID,"muted"),t!==Jo.TEST_VID.muted}catch(t){return!1}},Jo.canControlPlaybackRate=function(){if(En&&In&&xn<58)return!1;try{var t=Jo.TEST_VID.playbackRate;return Jo.TEST_VID.playbackRate=t/2+.1,t!==Jo.TEST_VID.playbackRate}catch(t){return!1}},Jo.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(we.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(we.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(we.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(we.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},Jo.supportsNativeTextTracks=function(){return Dn||Tn&&In},Jo.supportsNativeVideoTracks=function(){return!(!Jo.TEST_VID||!Jo.TEST_VID.videoTracks)},Jo.supportsNativeAudioTracks=function(){return!(!Jo.TEST_VID||!Jo.TEST_VID.audioTracks)},Jo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],Jo.prototype.featuresVolumeControl=Jo.canControlVolume(),Jo.prototype.featuresMuteControl=Jo.canMuteVolume(),Jo.prototype.featuresPlaybackRate=Jo.canControlPlaybackRate(),Jo.prototype.featuresSourceset=Jo.canOverrideAttributes(),Jo.prototype.movingMediaElementInDOM=!Tn,Jo.prototype.featuresFullscreenResize=!0,Jo.prototype.featuresProgressEvents=!0,Jo.prototype.featuresTimeupdateEvents=!0,Jo.prototype.featuresNativeTextTracks=Jo.supportsNativeTextTracks(),Jo.prototype.featuresNativeVideoTracks=Jo.supportsNativeVideoTracks(),Jo.prototype.featuresNativeAudioTracks=Jo.supportsNativeAudioTracks();var ta=Jo.TEST_VID&&Jo.TEST_VID.constructor.prototype.canPlayType,ea=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;Jo.patchCanPlayType=function(){wn>=4&&!Cn&&!In&&(Jo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&ea.test(t)?"maybe":ta.call(this,t)})},Jo.unpatchCanPlayType=function(){var t=Jo.TEST_VID.constructor.prototype.canPlayType;return Jo.TEST_VID.constructor.prototype.canPlayType=ta,t},Jo.patchCanPlayType(),Jo.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},Jo.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),n=e.length;n--;)t.removeChild(e[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","stretch","fluent","controls","loop","playsinline"].forEach(function(t){Jo.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Jo.prototype["set"+J(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){Jo.prototype[t]=function(){return this.el_[t]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(t){Jo.prototype["set"+J(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(t){Jo.prototype[t]=function(){return this.el_[t]()}}),vi.withSourceHandlers(Jo),Jo.nativeSourceHandler={},Jo.nativeSourceHandler.canPlayType=function(t){try{return Jo.TEST_VID.canPlayType(t)}catch(t){return""}},Jo.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Jo.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=hr(t.src);return Jo.nativeSourceHandler.canPlayType("video/"+n)}return""},Jo.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},Jo.nativeSourceHandler.dispose=function(){},Jo.registerSourceHandler(Jo.nativeSourceHandler),vi.registerTech("Html5",Jo);var na=Pe(["\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 "]),ra=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ia={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},oa=function(t){function e(n,r,o){if(De(this,e),n.id=n.id||r.id||"vjs_video_"+U(),r=i(e.getTagSettings(n),r),r.initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(r.language=a.getAttribute("lang"))}else for(var s=n;s&&1===s.nodeType;){if(S(s).hasOwnProperty("lang")){r.language=s.getAttribute("lang");break}s=s.parentNode}var u=je(this,t.call(this,null,r,o));if(u.isPosterFromTech_=!1,u.queuedCallbacks_=[],u.isReady_=!1,u.hasStarted_=!1,u.userActive_=!1,!u.options_||!u.options_.techOrder||!u.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(u.tag=n,u.tagAttributes=n&&S(n),u.language(u.options_.language),r.languages){var l={};Object.getOwnPropertyNames(r.languages).forEach(function(t){l[t.toLowerCase()]=r.languages[t]}),u.languages_=l}else u.languages_=e.prototype.options_.languages;u.cache_={},u.poster_=r.poster||"",u.controls_=!!r.controls,u.cache_.lastVolume=1,n.controls=!1,n.removeAttribute("controls"),n.hasAttribute("autoplay")?u.options_.autoplay=!0:u.autoplay(u.options_.autoplay),u.scrubbing_=!1,u.el_=u.createEl(),u.cache_.lastPlaybackRate=u.defaultPlaybackRate(),X(u,{eventBusKey:"el_"});var c=tt(u.options_);if(r.plugins){var d=r.plugins;Object.keys(d).forEach(function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](d[t])},u)}u.options_.playerOptions=c,u.middleware_=[],u.initChildren(),u.isAudio("audio"===n.nodeName.toLowerCase()),u.controls()?u.addClass("vjs-controls-enabled"):u.addClass("vjs-controls-disabled"),u.el_.setAttribute("role","region"),u.isAudio()?u.el_.setAttribute("aria-label",u.localize("Audio Player")):u.el_.setAttribute("aria-label",u.localize("Video Player")),u.isAudio()&&u.addClass("vjs-audio"),u.flexNotSupported_()&&u.addClass("vjs-no-flex"),Tn||u.addClass("vjs-workinghover"),e.players[u.id_]=u;var h=ge.split(".")[0];return u.addClass("vjs-v"+h),u.userActive(!0),u.reportUserActivity(),u.one("play",u.listenForUserActivity_),u.on("fullscreenchange",u.handleFullscreenChange_),u.on("stageclick",u.handleStageClick_),u.changingSrc_=!1,u.playWaitingForReady_=!1,u.playOnLoadstart_=null,u}return Me(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),Zt(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"),i="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=e.parentNode:i||(n=this.el_=t.prototype.createEl.call(this,"div"));var o=S(e);if(i){for(n=this.el_=e,e=this.tag=we.createElement("video");n.children.length;)e.appendChild(n.firstChild);y(n,"video-js")||A(n,"video-js"),n.appendChild(e),r=this.playerElIngest_=n,Object.keys(n).forEach(function(t){e[t]=n[t]})}if(e.setAttribute("tabindex","-1"),o.tabindex="-1",Rn&&(e.setAttribute("role","application"),o.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach(function(t){i&&"class"===t||n.setAttribute(t,o[t]),i&&e.setAttribute(t,o[t])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused"),!0!==_e.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Je("vjs-styles-dimensions");var a=Fe(".vjs-styles-defaults"),s=Fe("head");s.insertBefore(this.styleEl_,a?a.nextSibling:s.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"),l=0;l<u.length;l++){var c=u.item(l);A(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(n,e),g(e,n),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_=n,n},e.prototype.width=function(t){return this.dimension("width",t)},e.prototype.height=function(t){return this.dimension("height",t)},e.prototype.dimension=function(t,e){var n=t+"_";if(void 0===e)return this[n]||0;if(""===e)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(e);if(isNaN(r))return void xe.error('Improper value "'+e+'" supplied for for '+t);this[n]=r,this.updateStyleEl_()},e.prototype.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.prototype.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},e.prototype.updateStyleEl_=function(){if(!0===_e.VIDEOJS_NO_DYNAMIC_STYLE){var t="number"==typeof this.width_?this.width_:this.options_.width,e="number"==typeof this.height_?this.height_:this.options_.height,n=this.tech_&&this.tech_.el();return void(n&&(t>=0&&(n.width=t),e>=0&&(n.height=e)))}var r=void 0,i=void 0,o=void 0,a=void 0;o=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var s=o.split(":"),u=s[1]/s[0];r=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/u:this.videoWidth()||300,i=void 0!==this.height_?this.height_:r*u,a=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(a),$e(this.styleEl_,"\n ."+a+" {\n width: "+r+"px;\n height: "+i+"px;\n }\n\n ."+a+".vjs-fluid {\n padding-top: "+100*u+"%;\n }\n ")},e.prototype.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var r=J(t),o=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==r&&this.tag&&(vi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a="string"!=typeof this.autoplay()&&this.autoplay(),s={source:e,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+o+"_api",playsinline:this.options_.playsinline,stretch:this.options_.stretch,fluent:this.options_.fluent,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};qr.names.forEach(function(t){var e=qr[t];s[e.getterName]=n[e.privateName]}),i(s,this.options_[r]),i(s,this.options_[o]),i(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 u=vi.getTech(t);if(!u)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new u(s),this.tech_.ready(tn(this,this.handleTechReady_),!0),Yn.jsonToTextTracks(this.textTracksJson_||[],this.tech_),ra.forEach(function(t){n.on(n.tech_,t,n["handleTech"+J(t)+"_"])}),Object.keys(ia).forEach(function(t){n.on(n.tech_,t,function(e){if(0===n.tech_.playbackRate()&&n.tech_.seeking())return void n.queuedCallbacks_.push({callback:n["handleTech"+ia[t]+"_"].bind(n),event:e});n["handleTech"+ia[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_,"fullscreentoggle",this.handleTechFullscreenToggle_),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||g(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.prototype.unloadTech_=function(){var t=this;qr.names.forEach(function(e){var n=qr[e];t[n.privateName]=t[n.getterName]()}),this.textTracksJson_=Yn.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&&xe.warn(Re(na)),this.tech_},e.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),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_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},e.prototype.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},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.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=Ei(this,e)),this.cache_.source=tt({},t,{src:e,type:n});for(var r=this.cache_.sources.filter(function(t){return t.src&&t.src===e}),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=S(o[s]);i.push(u),u.src&&u.src===e&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e}},e.prototype.handleTechSourceset_=function(t){var e=this;if(!this.changingSrc_&&(this.updateSourceCaches_(t.src),!t.src)){var n=function t(n){"sourceset"!==n.type&&e.updateSourceCaches_(e.techGet_("currentSrc")),e.tech_.off(["sourceset","loadstart"],t)};this.tech_.one(["sourceset","loadstart"],n)}this.trigger({src:t.src,type:"sourceset"})},e.prototype.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},e.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.prototype.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&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&&(xe.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){N(t)&&this.controls_&&this.paused()},e.prototype.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)})||(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},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.handleTechFullscreenToggle_=function(t,e){this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()},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 _i)return Yt(this.middleware_,this.tech_,t,e);if(t in bi)return qt(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw xe(t),t}},!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Ai)return Qt(this.middleware_,this.tech_,t);if(t in bi)return qt(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw xe("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw xe("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw xe(e),e}}},e.prototype.play=function(){var t=this,e=this.options_.Promise||_e.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]:lt;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")||it(0,0)},e.prototype.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.prototype.currentTime=function(t){return void 0!==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=it(0,0)),t},e.prototype.bufferedPercent=function(){return ot(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){return void 0!==t?void this.techCall_("setMuted",t):this.techGet_("muted")||!1},e.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},e.prototype.lastVolume_=function(t){return void 0!==t&&0!==t?void(this.cache_.lastVolume=t):this.cache_.lastVolume},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){return void 0!==t?void(this.isFullscreen_=!!t):!!this.isFullscreen_},e.prototype.requestFullscreen=function(){var t=Pn;this.isFullscreen(!0),t.requestFullscreen?(W(we,t.fullscreenchange,tn(this,function e(n){this.isFullscreen(we[t.fullscreenElement]),!1===this.isFullscreen()&&Q(we,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=Pn;this.isFullscreen(!1),t.requestFullscreen?we[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=we.documentElement.style.overflow,W(we,"keydown",tn(this,this.fullWindowOnEscKey)),we.documentElement.style.overflow="hidden",A(we.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,Q(we,"keydown",this.fullWindowOnEscKey),we.documentElement.style.overflow=this.docOrigOverflow,_(we.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.canPlayType=function(t){for(var e=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=vi.getTech(i);if(o||(o=vn.getComponent(i)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else xe.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.prototype.selectSource=function(t){var e=this,n=this.options_.techOrder.map(function(t){return[t,vi.getTech(t)]}).filter(function(t){var e=t[0],n=t[1];return n?n.isSupported():(xe.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),r=function(t,e,n){var r=void 0;return t.some(function(t){return e.some(function(e){if(r=n(t,e))return!0})}),r},i=function(t,n){var r=t[0];if(t[1].canPlaySource(n,e.options_[r.toLowerCase()]))return{source:n,tech:r}};return(this.options_.sourceOrder?r(t,n,function(t){return function(e,n){return t(n,e)}}(i)):r(n,t,i))||!1},e.prototype.src=function(t){var e=this;if(void 0===t)return this.cache_.src||"";var n=wi(t);if(!n.length)return void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Ht(this,n[0],function(t,r){if(e.middleware_=r,e.cache_.sources=n,e.updateSourceCaches_(t),e.src_(t))return n.length>1?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());Wt(r,e.tech_)})},e.prototype.src_=function(t){var e=this,n=this.selectSource([t]);return!n||($(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.stretch=function(t){return void 0!==t?(this.techCall_("setStretch",t),this.options_.stretch=t,this):this.techGet_("stretch",t)},e.prototype.fluent=function(t){return void 0!=t?(this.techCall_("setFluent",t),this.options_.fluent=t,this):this.techGet_("fluent",t)},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 at(t),this.addClass("vjs-error"),xe.error("(CODE:"+this.error_.code+" "+at.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)!==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=tn(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)},a=function(e){r(),this.clearInterval(t)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",a),this.on("keydown",r),this.on("keyup",r);var s=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var t=this.options_.inactivityTimeout;t<=0||(s=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},e.prototype.playbackRate=function(t){return void 0!==t?void this.techCall_("setPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},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){return void 0!==t?void(this.isAudio_=!!t):!!this.isAudio_},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 tt(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=tt(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n<e.length;n++){var r=e[n];r=tt(r),r.player=void 0,t.tracks[n]=r}return t},e.prototype.createModal=function(t,e){var n=this;e=e||{},e.content=t||"";var r=new Kn(this,e);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},e.getTagSettings=function(t){var e={sources:[],tracks:[]},n=S(t),r=n["data-setup"];if(y(t,"vjs-fluid")&&(n.fluid=!0),null!==r){var o=Vn(r||"{}"),a=o[0],s=o[1];a&&xe.error(a),i(n,s)}if(i(e,n),t.hasChildNodes())for(var u=t.childNodes,l=0,c=u.length;l<c;l++){var d=u[l],h=d.nodeName.toLowerCase();"source"===h?e.sources.push(S(d)):"track"===h&&e.tracks.push(S(d))}return e},e.prototype.flexNotSupported_=function(){var t=we.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},e}(vn);qr.names.forEach(function(t){var e=qr[t];oa.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),oa.players={};var aa=_e.navigator;oa.prototype.options_={techOrder:vi.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:aa&&(aa.languages&&aa.languages[0]||aa.userLanguage||aa.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(t){oa.prototype[t]=function(){return this.techGet_(t)}}),ra.forEach(function(t){oa.prototype["handleTech"+J(t)+"_"]=function(){return this.trigger(t)}}),vn.registerComponent("Player",oa);var sa={},ua=function(t){return sa.hasOwnProperty(t)},la=function(t){return ua(t)?sa[t]:void 0},ca=function(t,e){t.activePlugins_=t.activePlugins_||{},t.activePlugins_[e]=!0},da=function(t,e,n){var r=(n?"before":"")+"pluginsetup";t.trigger(r,e),t.trigger(r+":"+e.name,e)},ha=function(t,e){var n=function(){da(this,{name:t,plugin:e,instance:null},!0);var n=e.apply(this,arguments);return ca(this,t),da(this,{name:t,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(t){n[t]=e[t]}),n},fa=function(t,e){return e.prototype.name=t,function(){da(this,{name:t,plugin:e,instance:null},!0);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=new(Function.prototype.bind.apply(e,[null].concat([this].concat(r))));return this[t]=function(){return o},da(this,o.getEventHash()),o}},pa=function(){function t(e){if(De(this,t),this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,X(this),delete this.trigger,Z(this,this.constructor.defaultState),ca(e,this.name),this.dispose=tn(this,this.dispose),e.on("dispose",this.dispose)}return t.prototype.version=function(){return this.constructor.VERSION},t.prototype.getEventHash=function(){var t=arguments.length>0&&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 Y(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.activePlugins_[t]=!1,this.player=this.state=null,e[t]=fa(t,sa[t])},t.isBasic=function(e){var n="string"==typeof e?la(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 '+(void 0===e?"undefined":Oe(e))+".");if(ua(e))xe.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(oa.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 '+(void 0===n?"undefined":Oe(n))+".");return sa[e]=n,"plugin"!==e&&(t.isBasic(n)?oa.prototype[e]=ha(e,n):oa.prototype[e]=fa(e,n)),n},t.deregisterPlugin=function(t){if("plugin"===t)throw new Error("Cannot de-register base plugin.");ua(t)&&(delete sa[t],delete oa.prototype[t])},t.getPlugins=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(sa),e=void 0;return t.forEach(function(t){var n=la(t);n&&(e=e||{},e[t]=n)}),e},t.getPluginVersion=function(t){var e=la(t);return e&&e.VERSION||""},t}();pa.getPlugin=la,pa.BASE_PLUGIN_NAME="plugin",pa.registerPlugin("plugin",pa),oa.prototype.usingPlugin=function(t){return!!this.activePlugins_&&!0===this.activePlugins_[t]},oa.prototype.hasPlugin=function(t){return!!ua(t)};var va=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":Oe(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)},ma=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){t.apply(this,arguments)},r={};"object"===(void 0===e?"undefined":Oe(e))?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"==typeof e&&(n=e),va(n,t);for(var i in r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},ga=function(t){return 0===t.indexOf("#")?t.slice(1):t};if(le.hooks_={},le.hooks=function(t,e){return le.hooks_[t]=le.hooks_[t]||[],e&&(le.hooks_[t]=le.hooks_[t].concat(e)),le.hooks_[t]},le.hook=function(t,e){le.hooks(t,e)},le.hookOnce=function(t,e){le.hooks(t,[].concat(e).map(function(e){return function n(){return le.removeHook(t,n),e.apply(void 0,arguments)}}))},le.removeHook=function(t,e){var n=le.hooks(t).indexOf(e);return!(n<=-1||(le.hooks_[t]=le.hooks_[t].slice(),le.hooks_[t].splice(n,1),0))},!0!==_e.VIDEOJS_NO_DYNAMIC_STYLE&&d()){var ya=Fe(".vjs-styles-defaults");if(!ya){ya=Je("vjs-styles-defaults");var Aa=Fe("head");Aa&&Aa.insertBefore(ya,Aa.firstChild),$e(ya,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}K(1,le),le.VERSION=ge,le.options=oa.prototype.options_,le.getPlayers=function(){return oa.players},le.getPlayer=function(t){var e=oa.players,n=void 0;if("string"==typeof t){var r=ga(t),i=e[r];if(i)return i;n=Fe("#"+r)}else n=t;if(h(n)){var o=n,a=o.player,s=o.playerId;if(a||e[s])return a||e[s]}},le.getAllPlayers=function(){return Object.keys(oa.players).map(function(t){return oa.players[t]}).filter(Boolean)},le.players=oa.players,le.getComponent=vn.getComponent,le.registerComponent=function(t,e){vi.isTech(e)&&xe.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),vn.registerComponent.call(vn,t,e)},le.getTech=vi.getTech,le.registerTech=vi.registerTech,le.use=Vt,Object.defineProperty(le,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(le.middleware,"TERMINATOR",{value:yi,writeable:!1,enumerable:!0}),le.browser=jn,le.TOUCH_ENABLED=Mn,le.extend=ma,le.mergeOptions=tt,le.bind=tn,le.registerPlugin=pa.registerPlugin,le.deregisterPlugin=pa.deregisterPlugin,le.plugin=function(t,e){return xe.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),pa.registerPlugin(t,e)},le.getPlugins=pa.getPlugins,le.getPlugin=pa.getPlugin,le.getPluginVersion=pa.getPluginVersion,le.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),le.options.languages=tt(le.options.languages,(n={},n[t]=e,n)),le.options.languages[t]},le.log=xe,le.createTimeRange=le.createTimeRanges=it,le.formatTime=oe,le.setFormatTime=re,le.resetFormatTime=ie,le.parseUrl=cr,le.isCrossOrigin=fr,le.EventTarget=rn,le.on=W,le.one=q,le.off=Q,le.trigger=Y,le.xhr=Nr,le.TextTrack=Fr,le.AudioTrack=Gr,le.VideoTrack=zr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){le[t]=function(){return xe.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),ze[t].apply(null,arguments)}}),le.computedStyle=s,le.dom=ze,le.url=pr;var _a,ba,Ta,Sa,Ea,wa=t(function(t,e){!function(e){var n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,a={buildAbsoluteURL:function(t,e,n){if(n=n||{},t=t.trim(),!(e=e.trim())){if(!n.alwaysNormalize)return t;var i=a.parseURL(t);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):e;var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=r.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=a.normalizePath(d)}else l.path=s.path,o.params||(l.params=s.params,o.query||(l.query=s.query));return null===l.path&&(l.path=n.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(l)},parseURL:function(t){var e=n.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(i,"");t.length!==(t=t.replace(o,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};t.exports=a}()}),ka=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ca=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},La=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":Oe(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)},Ia=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":Oe(e))&&"function"!=typeof e?t:e},xa=function(){function t(){ka(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var n=this.listeners[t].indexOf(e);return this.listeners[t].splice(n,1),n>-1},t.prototype.trigger=function(t){var e=this.listeners[t],n=void 0,r=void 0,i=void 0;if(e)if(2===arguments.length)for(r=e.length,n=0;n<r;++n)e[n].call(this,arguments[1]);else for(i=Array.prototype.slice.call(arguments,1),r=e.length,n=0;n<r;++n)e[n].apply(this,i)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},t}(),Ra=function(t){function e(){ka(this,e);var n=Ia(this,t.call(this));return n.buffer="",n}return La(e,t),e.prototype.push=function(t){var e=void 0;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},e}(xa),Oa=function(){return new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')},Da=function(t){for(var e=t.split(Oa()),n={},r=e.length,i=void 0;r--;)""!==e[r]&&(i=/([^=]*)=(.*)/.exec(e[r]).slice(1),i[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),n[i[0]]=i[1]);return n},Ma=function(t){function e(){ka(this,e);var n=Ia(this,t.call(this));return n.customParsers=[],n}return La(e,t),e.prototype.push=function(t){var e=void 0,n=void 0;if(t=t.replace(/^[\u0000\s]+|[\u0000\s]+$/g,""),0!==t.length){if("#"!==t[0])return void this.trigger("data",{type:"uri",uri:t});for(var r=0;r<this.customParsers.length;r++)if(this.customParsers[r].call(this,t))return;if(0!==t.indexOf("#EXT"))return void this.trigger("data",{type:"comment",text:t.slice(1)});if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))return void this.trigger("data",{type:"tag",tagType:"m3u"});if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return n={type:"tag",tagType:"inf"},e[1]&&(n.duration=parseFloat(e[1])),e[2]&&(n.title=e[2]),void this.trigger("data",n);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"targetduration"},e[1]&&(n.duration=parseInt(e[1],10)),void this.trigger("data",n);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"totalduration"},e[1]&&(n.duration=parseInt(e[1],10)),void this.trigger("data",n);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"version"},e[1]&&(n.version=parseInt(e[1],10)),void this.trigger("data",n);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return n={type:"tag",tagType:"media-sequence"},e[1]&&(n.number=parseInt(e[1],10)),void this.trigger("data",n);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return n={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(n.number=parseInt(e[1],10)),void this.trigger("data",n);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return n={type:"tag",tagType:"playlist-type"},e[1]&&(n.playlistType=e[1]),void this.trigger("data",n);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return n={type:"tag",tagType:"byterange"},e[1]&&(n.length=parseInt(e[1],10)),e[2]&&(n.offset=parseInt(e[2],10)),void this.trigger("data",n);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return n={type:"tag",tagType:"allow-cache"},e[1]&&(n.allowed=!/NO/.test(e[1])),void this.trigger("data",n);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(n={type:"tag",tagType:"map"},e[1]){var i=Da(e[1]);if(i.URI&&(n.uri=i.URI),i.BYTERANGE){var o=i.BYTERANGE.split("@"),a=o[0],s=o[1];n.byterange={},a&&(n.byterange.length=parseInt(a,10)),s&&(n.byterange.offset=parseInt(s,10))}}return void this.trigger("data",n)}if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(n={type:"tag",tagType:"stream-inf"},e[1]){if(n.attributes=Da(e[1]),n.attributes.RESOLUTION){var u=n.attributes.RESOLUTION.split("x"),l={};u[0]&&(l.width=parseInt(u[0],10)),u[1]&&(l.height=parseInt(u[1],10)),n.attributes.RESOLUTION=l}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}return void this.trigger("data",n)}if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return n={type:"tag",tagType:"media"},e[1]&&(n.attributes=Da(e[1])),void this.trigger("data",n);if(e=/^#EXT-X-ENDLIST/.exec(t))return void this.trigger("data",{type:"tag",tagType:"endlist"});if(e=/^#EXT-X-DISCONTINUITY/.exec(t))return void this.trigger("data",{type:"tag",tagType:"discontinuity"});if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return n={type:"tag",tagType:"program-date-time"},e[1]&&(n.dateTimeString=e[1],n.dateTimeObject=new Date(e[1])),void this.trigger("data",n);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return n={type:"tag",tagType:"key"},e[1]&&(n.attributes=Da(e[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void this.trigger("data",n);if(e=/^#EXT-X-START:?(.*)$/.exec(t))return n={type:"tag",tagType:"start"},e[1]&&(n.attributes=Da(e[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void this.trigger("data",n);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-out-cont"},e[1]?n.data=e[1]:n.data="",void this.trigger("data",n);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-out"},e[1]?n.data=e[1]:n.data="",void this.trigger("data",n);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return n={type:"tag",tagType:"cue-in"},e[1]?n.data=e[1]:n.data="",void this.trigger("data",n);this.trigger("data",{type:"tag",data:t.slice(4)})}},e.prototype.addParser=function(t){var e=this,n=t.expression,r=t.customType,i=t.dataParser,o=t.segment;"function"!=typeof i&&(i=function(t){return t}),this.customParsers.push(function(t){if(n.exec(t))return e.trigger("data",{type:"custom",data:i(t),customType:r,segment:o}),!0})},e}(xa),ja=function(t){function e(){ka(this,e);var n=Ia(this,t.call(this));n.lineStream=new Ra,n.parseStream=new Ma,n.lineStream.pipe(n.parseStream);var r=n,i=[],o={},a=void 0,s=void 0,u=function(){},l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;return n.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},n.parseStream.on("data",function(t){var e=void 0,n=void 0;({tag:function(){(({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&(o.byterange=e,e.length=t.length,"offset"in t||(this.trigger("info",{message:"defaulting offset to zero"}),t.offset=0)),"offset"in t&&(o.byterange=e,e.offset=t.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),t.duration>0&&(o.duration=t.duration),0===t.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key:function(){return t.attributes?"NONE"===t.attributes.METHOD?void(s=null):t.attributes.URI?(t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),s={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void(void 0!==t.attributes.IV&&(s.iv=t.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(t.number))return void this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number});this.manifest.mediaSequence=t.number},"discontinuity-sequence":function(){if(!isFinite(t.number))return void this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number});this.manifest.discontinuitySequence=t.number,c=t.number},"playlist-type":function(){if(!/VOD|EVENT/.test(t.playlistType))return void this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist});this.manifest.playlistType=t.playlistType},map:function(){a={},t.uri&&(a.uri=t.uri),t.byterange&&(a.byterange=t.byterange)},"stream-inf":function(){if(this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,!t.attributes)return void this.trigger("warn",{message:"ignoring empty stream-inf attributes"});o.attributes||(o.attributes={}),Ca(o.attributes,t.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,!(t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME))return void this.trigger("warn",{message:"ignoring incomplete or missing media group"});var r=this.manifest.mediaGroups[t.attributes.TYPE];r[t.attributes["GROUP-ID"]]=r[t.attributes["GROUP-ID"]]||{},e=r[t.attributes["GROUP-ID"]],n={default:/yes/i.test(t.attributes.DEFAULT)},n.default?n.autoselect=!0:n.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(n.language=t.attributes.LANGUAGE),t.attributes.URI&&(n.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(n.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(n.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(n.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=n},discontinuity:function(){c+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),o.dateTimeString=t.dateTimeString,o.dateTimeObject=t.dateTimeObject},targetduration:function(){if(!isFinite(t.duration)||t.duration<0)return void this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration});this.manifest.targetDuration=t.duration},totalduration:function(){if(!isFinite(t.duration)||t.duration<0)return void this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration});this.manifest.totalDuration=t.duration},start:function(){if(!t.attributes||isNaN(t.attributes["TIME-OFFSET"]))return void this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}},"cue-out":function(){o.cueOut=t.data},"cue-out-cont":function(){o.cueOutCont=t.data},"cue-in":function(){o.cueIn=t.data}})[t.tagType]||u).call(r)},uri:function(){o.uri=t.uri,i.push(o),!this.manifest.targetDuration||"duration"in o||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),s&&(o.key=s),o.timeline=c,a&&(o.map=a),o={}},comment:function(){},custom:function(){t.segment?(o.custom=o.custom||{},o.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(r)}),n}return La(e,t),e.prototype.push=function(t){this.lineStream.push(t)},e.prototype.end=function(){this.lineStream.push("\n")},e.prototype.addParser=function(t){this.parseStream.addParser(t)},e}(xa),Pa=function(t){var e,n=t.attributes,r=t.segments,i={attributes:(e={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(i.contentProtection=n.contentProtection),i},Na=function(t){var e,n=t.attributes,r=t.segments;return void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration),{attributes:(e={NAME:n.id,BANDWIDTH:n.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}},Ua=function(t){return t.reduce(function(t,e){var n=e.attributes.role&&e.attributes.role.value||"main",r=e.attributes.lang||"",i="main";return r&&(i=e.attributes.lang+" ("+n+")"),t[i]&&t[i].playlists[0].attributes.BANDWIDTH>e.attributes.bandwidth?t:(t[i]={language:r,autoselect:!0,default:"main"===n,playlists:[Pa(e)],uri:""},t)},{})},Ba=function(t){return t.reduce(function(t,e){var n=e.attributes.lang||"text";return t[n]?t:(t[n]={language:n,default:!1,autoselect:!1,playlists:[Na(e)],uri:""},t)},{})},Fa=function(t){var e,n=t.attributes,r=t.segments,i={attributes:(e={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(i.contentProtection=n.contentProtection),i},Ga=function(t){var e;if(!t.length)return{};var n=t[0].attributes,r=n.sourceDuration,i=n.minimumUpdatePeriod,o=void 0===i?0:i,a=function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video"===e.contentType},s=function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio"===e.contentType},u=function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType},l=t.filter(a).map(Fa),c=t.filter(s),d=t.filter(u),h={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(e={AUDIO:{},VIDEO:{}},e["CLOSED-CAPTIONS"]={},e.SUBTITLES={},e),uri:"",duration:r,playlists:l,minimumUpdatePeriod:1e3*o};return c.length&&(h.mediaGroups.AUDIO.audio=Ua(c)),d.length&&(h.mediaGroups.SUBTITLES.subs=Ba(d)),h},za="function"==typeof Symbol&&"symbol"===Oe(Symbol.iterator)?function(t){return void 0===t?"undefined":Oe(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":Oe(t)},Va=function(t){return!!t&&"object"===(void 0===t?"undefined":za(t))},Ha=function t(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.reduce(function(e,n){return Object.keys(n).forEach(function(r){Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=e[r].concat(n[r]):Va(e[r])&&Va(n[r])?e[r]=t(e[r],n[r]):e[r]=n[r]}),e},{})},Wa=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=wa.buildAbsoluteURL(_e.location.href,t)),wa.buildAbsoluteURL(t,e))},Qa=function(t){var e=t.baseUrl,n=void 0===e?"":e,r=t.source,i=void 0===r?"":r,o=t.range,a=void 0===o?"":o,s={uri:i,resolvedUri:Wa(n||"",i)};if(a){var u=a.split("-"),l=parseInt(u[0],10),c=parseInt(u[1],10);s.byterange={length:c-l,offset:l}}return s},Ya=function(t,e,n){var r=t.NOW,i=t.clientOffset,o=t.availabilityStartTime,a=t.timescale,s=void 0===a?1:a,u=t.start,l=void 0===u?0:u,c=t.minimumUpdatePeriod,d=void 0===c?0:c,h=(r+i)/1e3,f=o+l,p=h+d,v=p-f;return Math.ceil((v*s-e)/n)},qa=function(t,e){for(var n=t.type,r=void 0===n?"static":n,i=t.minimumUpdatePeriod,o=void 0===i?0:i,a=t.media,s=void 0===a?"":a,u=t.sourceDuration,l=t.timescale,c=void 0===l?1:l,d=t.startNumber,h=void 0===d?1:d,f=t.periodIndex,p=[],v=-1,m=0;m<e.length;m++){var g=e[m],y=g.d,A=g.r||0,_=g.t||0;v<0&&(v=_),_&&_>v&&(v=_);var b=void 0;if(A<0){var T=m+1;b=T===e.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?Ya(t,v,y):(u*c-v)/y:(e[T].t-v)/y}else b=A+1;for(var S=h+p.length+b,E=h+p.length;E<S;)p.push({number:E,duration:y/c,time:v,timeline:f}),v+=y,E++}return p},Ka=function(t,e){for(var n=[],r=t;r<e;r++)n.push(r);return n},Xa=function(t){return t.reduce(function(t,e){return t.concat(e)},[])},Za=function(t){if(!t.length)return[];for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e},Ja={static:function(t){var e=t.duration,n=t.timescale,r=void 0===n?1:n,i=t.sourceDuration;return{start:0,end:Math.ceil(i/(e/r))}},dynamic:function(t){var e=t.NOW,n=t.clientOffset,r=t.availabilityStartTime,i=t.timescale,o=void 0===i?1:i,a=t.duration,s=t.start,u=void 0===s?0:s,l=t.minimumUpdatePeriod,c=void 0===l?0:l,d=t.timeShiftBufferDepth,h=void 0===d?1/0:d,f=(e+n)/1e3,p=r+u,v=f+c,m=v-p,g=Math.ceil(m*o/a),y=Math.floor((f-p-h)*o/a),A=Math.floor((f-p)*o/a);return{start:Math.max(0,y),end:Math.min(g,A)}}},$a=function(t){return function(e,n){var r=t.duration,i=t.timescale,o=void 0===i?1:i,a=t.periodIndex,s=t.startNumber;return{number:(void 0===s?1:s)+e,duration:r/o,timeline:a,time:n*r}}},ts=function(t){var e=t.type,n=void 0===e?"static":e,r=t.duration,i=t.timescale,o=void 0===i?1:i,a=t.sourceDuration,s=Ja[n](t),u=s.start,l=s.end,c=Ka(u,l).map($a(t));if("static"===n){var d=c.length-1;c[d].duration=a-r/o*d}return c},es=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ns=function(t){return function(e,n,r,i){if("$$"===e)return"$";if(void 0===t[n])return e;var o=""+t[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}},rs=function(t,e){return t.replace(es,ns(e))},is=function(t,e){return t.duration||e?t.duration?ts(t):qa(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]},os=function(t,e){var n={RepresentationID:t.id,Bandwidth:t.bandwidth||0},r=t.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=Qa({baseUrl:t.baseUrl,source:rs(i.sourceURL,n),range:i.range});return is(t,e).map(function(e){n.Number=e.number,n.Time=e.time;var r=rs(t.media||"",n);return{uri:r,timeline:e.timeline,duration:e.duration,resolvedUri:Wa(t.baseUrl||"",r),map:o,number:e.number}})},as={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},ss=function(t,e){var n=t.baseUrl,r=t.initialization,i=void 0===r?{}:r,o=Qa({baseUrl:n,source:i.sourceURL,range:i.range}),a=Qa({baseUrl:n,source:e.media,range:e.mediaRange});return a.map=o,a},us=function(t,e){var n=t.duration,r=t.segmentUrls,i=void 0===r?[]:r;if(!n&&!e||n&&e)throw new Error(as.SEGMENT_TIME_UNSPECIFIED);var o=i.map(function(e){return ss(t,e)}),a=void 0;return n&&(a=ts(t)),e&&(a=qa(t,e)),a.map(function(t,e){if(o[e]){var n=o[e];return n.timeline=t.timeline,n.duration=t.duration,n.number=t.number,n}}).filter(function(t){return t})},ls=function(t){var e=t.baseUrl,n=t.initialization,r=void 0===n?{}:n,i=t.sourceDuration,o=t.timescale,a=void 0===o?1:o,s=t.indexRange,u=void 0===s?"":s,l=t.duration;if(!e)throw new Error(as.NO_BASE_URL);var c=Qa({baseUrl:e,source:r.sourceURL,range:r.range}),d=Qa({baseUrl:e,source:e,range:u});if(d.map=c,l){var h=ts(t);h.length&&(d.duration=h[0].duration,d.timeline=h[0].timeline)}else i&&(d.duration=i/a,d.timeline=0);return d.number=0,[d]},cs=function(t){var e=t.attributes,n=t.segmentInfo,r=void 0,i=void 0;if(n.template?(i=os,r=Ha(e,n.template)):n.base?(i=ls,r=Ha(e,n.base)):n.list&&(i=us,r=Ha(e,n.list)),!i)return{attributes:e};var o=i(r,n.timeline);if(r.duration){var a=r,s=a.duration,u=a.timescale,l=void 0===u?1:u;r.duration=s/l}else o.length?r.duration=o.reduce(function(t,e){return Math.max(t,Math.ceil(e.duration))},0):r.duration=0;return{attributes:r,segments:o}},ds=function(t){return t.map(cs)},hs=function(t,e){return Za(t.childNodes).filter(function(t){return t.tagName===e})},fs=function(t){return t.textContent.trim()},ps=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,n=e.exec(t);if(!n)return 0;var r=n.slice(1),i=r[0],o=r[1],a=r[2],s=r[3],u=r[4],l=r[5];return 31536e3*parseFloat(i||0)+2592e3*parseFloat(o||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(u||0)+parseFloat(l||0)},vs=function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t)&&(t+="Z"),Date.parse(t)},ms={mediaPresentationDuration:function(t){return ps(t)},availabilityStartTime:function(t){return vs(t)/1e3},minimumUpdatePeriod:function(t){return ps(t)},timeShiftBufferDepth:function(t){return ps(t)},start:function(t){return ps(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?ps(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},gs=function(t){return t&&t.attributes?Za(t.attributes).reduce(function(t,e){var n=ms[e.name]||ms.DEFAULT;return t[e.name]=n(e.value),t},{}):{}},ys={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},As=function(t,e){return e.length?Xa(t.map(function(t){return e.map(function(e){return Wa(t,fs(e))})})):t},_s=function(t){var e=hs(t,"SegmentTemplate")[0],n=hs(t,"SegmentList")[0],r=n&&hs(n,"SegmentURL").map(function(t){return Ha({tag:"SegmentURL"},gs(t))}),i=hs(t,"SegmentBase")[0],o=n||e,a=o&&hs(o,"SegmentTimeline")[0],s=n||i||e,u=s&&hs(s,"Initialization")[0],l=e&&gs(e);l&&u?l.initialization=u&&gs(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:a&&hs(a,"S").map(function(t){return gs(t)}),list:n&&Ha(gs(n),{segmentUrls:r,initialization:gs(u)}),base:i&&Ha(gs(i),{initialization:gs(u)})};return Object.keys(c).forEach(function(t){c[t]||delete c[t]}),c},bs=function(t,e,n){return function(r){var i=hs(r,"BaseURL"),o=As(e,i),a=Ha(t,gs(r)),s=_s(r);return o.map(function(t){return{segmentInfo:Ha(n,s),attributes:Ha(a,{baseUrl:t})}})}},Ts=function(t){return t.reduce(function(t,e){var n=gs(e),r=ys[n.schemeIdUri];if(r){t[r]={attributes:n};var i=hs(e,"cenc:pssh")[0];if(i){var o=fs(i),a=o&&ce(o);t[r].pssh=a}}return t},{})},Ss=function(t,e,n){return function(r){var i=gs(r),o=As(e,hs(r,"BaseURL")),a=hs(r,"Role")[0],s={role:gs(a)},u=Ha(t,i,s),l=Ts(hs(r,"ContentProtection"));Object.keys(l).length&&(u=Ha(u,{contentProtection:l}));var c=_s(r),d=hs(r,"Representation"),h=Ha(n,c);return Xa(d.map(bs(u,o,h)))}},Es=function(t,e){return function(n,r){var i=As(e,hs(n,"BaseURL")),o=gs(n),a=Ha(t,o,{periodIndex:r}),s=hs(n,"AdaptationSet"),u=_s(n);return Xa(s.map(Ss(a,i,u)))}},ws=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.manifestUri,r=void 0===n?"":n,i=e.NOW,o=void 0===i?Date.now():i,a=e.clientOffset,s=void 0===a?0:a,u=hs(t,"Period");if(1!==u.length)throw new Error(as.INVALID_NUMBER_OF_PERIOD);var l=gs(t),c=As([r],hs(t,"BaseURL"));return l.sourceDuration=l.mediaPresentationDuration||0,l.NOW=o,l.clientOffset=s,Xa(u.map(Es(l,c)))},ks=function(t){if(""===t)throw new Error(as.DASH_EMPTY_MANIFEST);var e=new _e.DOMParser,n=e.parseFromString(t,"application/xml"),r=n&&"MPD"===n.documentElement.tagName?n.documentElement:null;if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(as.DASH_INVALID_XML);return r},Cs=function(t){var e=hs(t,"UTCTiming")[0];if(!e)return null;var n=gs(e);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(as.UNSUPPORTED_UTC_TIMING_SCHEME)}return n},Ls=function(t,e){return Ga(ds(ws(ks(t),e)))},Is=function(t){return Cs(ks(t))},xs=function(t){return t>>>0},Rs={toUnsigned:xs},Os=Rs.toUnsigned,Ds=Object.freeze({default:Rs,__moduleExports:Rs,toUnsigned:Os}),Ms=Ds&&Rs||Ds,js=Ms.toUnsigned;_a=function(t,e){var n,r,i,o,a,s=[];if(!e.length)return null;for(n=0;n<t.byteLength;)r=js(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),i=ba(t.subarray(n+4,n+8)),o=r>1?n+r:t.byteLength,i===e[0]&&(1===e.length?s.push(t.subarray(n+8,o)):(a=_a(t.subarray(n+8,o),e.slice(1)),a.length&&(s=s.concat(a)))),n=o;return s},ba=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},Ta=function(t){var e={};return _a(t,["moov","trak"]).reduce(function(t,e){var n,r,i,o,a;return(n=_a(e,["tkhd"])[0])?(r=n[0],i=0===r?12:20,o=js(n[i]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=_a(e,["mdia","mdhd"])[0])?(r=a[0],i=0===r?12:20,t[o]=js(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),t):null):null},e)},Sa=function(t,e){var n,r,i;return n=_a(e,["moof","traf"]),r=[].concat.apply([],n.map(function(e){return _a(e,["tfhd"]).map(function(n){var r,i,o;return r=js(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=t[r]||9e4,o=_a(e,["tfdt"]).map(function(t){var e,n;return e=t[0],n=js(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(n*=Math.pow(2,32),n+=js(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),n})[0],(o=o||1/0)/i})})),i=Math.min.apply(null,r),isFinite(i)?i:0},Ea=function(t){var e=_a(t,["moov","trak"]),n=[];return e.forEach(function(t){var e=_a(t,["mdia","hdlr"]),r=_a(t,["tkhd"]);e.forEach(function(t,e){var i,o,a,s=ba(t.subarray(8,12)),u=r[e];"vide"===s&&(i=new DataView(u.buffer,u.byteOffset,u.byteLength),o=i.getUint8(0),a=0===o?i.getUint32(12):i.getUint32(20),n.push(a))})}),n};var Ps,Ns,Us,Bs,Fs,Gs,zs,Vs,Hs,Ws,Qs,Ys,qs,Ks,Xs,Zs,Js,$s,tu,eu,nu,ru,iu,ou,au,su,uu,lu,cu,du,hu,fu,pu,vu,mu,gu,yu={findBox:_a,parseType:ba,timescale:Ta,startTime:Sa,videoTrackIds:Ea},Au=Math.pow(2,32)-1;!function(){var t;if(iu={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(t in iu)iu.hasOwnProperty(t)&&(iu[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);ou=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),su=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),au=new Uint8Array([0,0,0,1]),uu=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]),lu=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]),cu={video:uu,audio:lu},fu=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),hu=new Uint8Array([0,0,0,0,0,0,0,0]),pu=new Uint8Array([0,0,0,0,0,0,0,0]),vu=pu,mu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),gu=pu,du=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),Ps=function(t){var e,n,r,i=[],o=0;for(e=1;e<arguments.length;e++)i.push(arguments[e]);for(e=i.length;e--;)o+=i[e].byteLength;for(n=new Uint8Array(o+8),r=new DataView(n.buffer,n.byteOffset,n.byteLength),r.setUint32(0,n.byteLength),n.set(t,4),e=0,o=8;e<i.length;e++)n.set(i[e],o),o+=i[e].byteLength;return n},Ns=function(){return Ps(iu.dinf,Ps(iu.dref,fu))},Us=function(t){return Ps(iu.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},Bs=function(){return Ps(iu.ftyp,ou,au,ou,su)},Zs=function(t){return Ps(iu.hdlr,cu[t])},Fs=function(t){return Ps(iu.mdat,t)},Xs=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),Ps(iu.mdhd,e)},Ks=function(t){return Ps(iu.mdia,Xs(t),Zs(t.type),zs(t))},Gs=function(t){return Ps(iu.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},zs=function(t){return Ps(iu.minf,"video"===t.type?Ps(iu.vmhd,du):Ps(iu.smhd,hu),Ns(),$s(t))},Vs=function(t,e){for(var n=[],r=e.length;r--;)n[r]=eu(e[r]);return Ps.apply(null,[iu.moof,Gs(t)].concat(n))},Hs=function(t){for(var e=t.length,n=[];e--;)n[e]=Ys(t[e]);return Ps.apply(null,[iu.moov,Qs(4294967295)].concat(n).concat(Ws(t)))},Ws=function(t){for(var e=t.length,n=[];e--;)n[e]=nu(t[e]);return Ps.apply(null,[iu.mvex].concat(n))},Qs=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 Ps(iu.mvhd,e)},Js=function(t){var e,n,r=t.samples||[],i=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)e=r[n].flags,i[n+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return Ps(iu.sdtp,i)},$s=function(t){return Ps(iu.stbl,tu(t),Ps(iu.stts,gu),Ps(iu.stsc,vu),Ps(iu.stsz,mu),Ps(iu.stco,pu))},function(){var t,e;tu=function(n){return Ps(iu.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?t(n):e(n))},t=function(t){var e,n=t.sps||[],r=t.pps||[],i=[],o=[];for(e=0;e<n.length;e++)i.push((65280&n[e].byteLength)>>>8),i.push(255&n[e].byteLength),i=i.concat(Array.prototype.slice.call(n[e]));for(e=0;e<r.length;e++)o.push((65280&r[e].byteLength)>>>8),o.push(255&r[e].byteLength),o=o.concat(Array.prototype.slice.call(r[e]));return Ps(iu.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&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.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]),Ps(iu.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([n.length]).concat(i).concat([r.length]).concat(o))),Ps(iu.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},e=function(t){return Ps(iu.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),Us(t))}}(),qs=function(t){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.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&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return Ps(iu.tkhd,e)},eu=function(t){var e,n,r,i,o,a,s;return e=Ps(iu.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(Au+1)),s=Math.floor(t.baseMediaDecodeTime%(Au+1)),n=Ps(iu.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),o=92,"audio"===t.type?(r=ru(t,o),Ps(iu.traf,e,n,r)):(i=Js(t),r=ru(t,i.length+o),Ps(iu.traf,e,n,r,i))},Ys=function(t){return t.duration=t.duration||4294967295,Ps(iu.trak,qs(t),Ks(t))},nu=function(t){var e=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(e[e.length-1]=0),Ps(iu.trex,e)},function(){var t,e,n;n=function(t,e){var n=0,r=0,i=0,o=0;return t.length&&(void 0!==t[0].duration&&(n=1),void 0!==t[0].size&&(r=2),void 0!==t[0].flags&&(i=4),void 0!==t[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},e=function(t,e){var r,i,o,a;for(i=t.samples||[],e+=20+16*i.length,r=n(i,e),a=0;a<i.length;a++)o=i[a],r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size,o.flags.isLeading<<2|o.flags.dependsOn,o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,61440&o.flags.degradationPriority,15&o.flags.degradationPriority,(4278190080&o.compositionTimeOffset)>>>24,(16711680&o.compositionTimeOffset)>>>16,(65280&o.compositionTimeOffset)>>>8,255&o.compositionTimeOffset]);return Ps(iu.trun,new Uint8Array(r))},t=function(t,e){var r,i,o,a;for(i=t.samples||[],e+=20+8*i.length,r=n(i,e),a=0;a<i.length;a++)o=i[a],r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size]);return Ps(iu.trun,new Uint8Array(r))},ru=function(n,r){return"audio"===n.type?t(n,r):e(n,r)}}();var _u={ftyp:Bs,mdat:Fs,moof:Vs,moov:Hs,initSegment:function(t){var e,n=Bs(),r=Hs(t);return e=new Uint8Array(n.byteLength+r.byteLength),e.set(n),e.set(r,n.byteLength),e}},bu=_u.ftyp,Tu=_u.mdat,Su=_u.moof,Eu=_u.moov,wu=_u.initSegment,ku=Object.freeze({default:_u,__moduleExports:_u,ftyp:bu,mdat:Tu,moof:Su,moov:Eu,initSegment:wu}),Cu=function(){this.init=function(){var t={};this.on=function(e,n){t[e]||(t[e]=[]),t[e]=t[e].concat(n)},this.off=function(e,n){var r;return!!t[e]&&(r=t[e].indexOf(n),t[e]=t[e].slice(),t[e].splice(r,1),r>-1)},this.trigger=function(e){var n,r,i,o;if(n=t[e])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){t={}}}};Cu.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),t},Cu.prototype.push=function(t){this.trigger("data",t)},Cu.prototype.flush=function(t){this.trigger("done",t)};var Lu=Cu,Iu=Object.freeze({default:Lu,__moduleExports:Lu}),xu=function(t){var e,n,r=[],i=[];for(r.byteLength=0,e=0;e<t.length;e++)n=t[e],"access_unit_delimiter_rbsp"===n.nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.push(r)),r=[n],r.byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.push(r),i},Ru=function(t){var e,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=t[0].pts,r.dts=t[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=t[0].pts,i.dts=t[0].dts,e=0;e<t.length;e++)n=t[e],n.keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),r=[n],r.nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},Ou=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},Du=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Mu=function(t,e){var n=Du();return n.dataOffset=e,n.compositionTimeOffset=t.pts-t.dts,n.duration=t.duration,n.size=4*t.length,n.size+=t.byteLength,t.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ju=function(t,e){var n,r,i,o,a,s=e||0,u=[];for(n=0;n<t.length;n++)for(o=t[n],r=0;r<o.length;r++)a=o[r],i=Mu(a,s),s+=i.size,u.push(i);return u},Pu=function(t){var e,n,r,i,o,a,s=0,u=t.byteLength,l=t.nalCount,c=u+4*l,d=new Uint8Array(c),h=new DataView(d.buffer);for(e=0;e<t.length;e++)for(i=t[e],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],h.setUint32(s,a.data.byteLength),s+=4,d.set(a.data,s),s+=a.data.byteLength;return d},Nu={groupNalsIntoFrames:xu,groupFramesIntoGops:Ru,extendFirstKeyFrame:Ou,generateSampleTable:ju,concatenateNalData:Pu},Uu=Nu.groupNalsIntoFrames,Bu=Nu.groupFramesIntoGops,Fu=Nu.extendFirstKeyFrame,Gu=Nu.generateSampleTable,zu=Nu.concatenateNalData,Vu=Object.freeze({default:Nu,__moduleExports:Nu,groupNalsIntoFrames:Uu,groupFramesIntoGops:Bu,extendFirstKeyFrame:Fu,generateSampleTable:Gu,concatenateNalData:zu}),Hu=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},Wu=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},Qu=function(t,e){var n,r,i=t.minSegmentDts;return e||(i-=t.timelineStartInfo.dts),n=t.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===t.type&&(r=t.samplerate/9e4,n*=r,n=Math.floor(n)),n},Yu={clearDtsInfo:Wu,calculateTrackBaseMediaDecodeTime:Qu,collectDtsInfo:Hu},qu=Yu.clearDtsInfo,Ku=Yu.calculateTrackBaseMediaDecodeTime,Xu=Yu.collectDtsInfo,Zu=Object.freeze({default:Yu,__moduleExports:Yu,clearDtsInfo:qu,calculateTrackBaseMediaDecodeTime:Ku,collectDtsInfo:Xu}),Ju=function(t){for(var e=0,n={payloadType:-1,payloadSize:0},r=0,i=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)r+=255,e++;for(r+=t[e++];255===t[e];)i+=255,e++;if(i+=t[e++],!n.payload&&4===r){n.payloadType=r,n.payloadSize=i,n.payload=t.subarray(e,e+i);break}e+=i,r=0,i=0}return n},$u=function(t){return 181!==t.payload[0]?null:49!=(t.payload[1]<<8|t.payload[2])?null:"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])?null:3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},tl=function(t,e){var n,r,i,o,a=[];if(!(64&e[0]))return a;for(r=31&e[0],n=0;n<r;n++)i=3*n,o={type:3&e[i+2],pts:t},4&e[i+2]&&(o.ccData=e[i+3]<<8|e[i+4],a.push(o));return a},el=function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n},nl={parseSei:Ju,parseUserData:$u,parseCaptionPackets:tl,discardEmulationPreventionBytes:el,USER_DATA_REGISTERED_ITU_T_T35:4},rl=nl.parseSei,il=nl.parseUserData,ol=nl.parseCaptionPackets,al=nl.discardEmulationPreventionBytes,sl=nl.USER_DATA_REGISTERED_ITU_T_T35,ul=Object.freeze({default:nl,__moduleExports:nl,parseSei:rl,parseUserData:il,parseCaptionPackets:ol,discardEmulationPreventionBytes:al,USER_DATA_REGISTERED_ITU_T_T35:sl}),ll=Iu&&Lu||Iu,cl=ul&&nl||ul,dl=function t(){t.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new ml(0,0),new ml(0,1),new ml(1,0),new ml(1,1)],this.reset(),this.ccStreams_.forEach(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))},this)};dl.prototype=new ll,dl.prototype.push=function(t){var e,n,r;if("sei_rbsp"===t.nalUnitType&&(e=cl.parseSei(t.escapedRBSP),e.payloadType===cl.USER_DATA_REGISTERED_ITU_T_T35&&(n=cl.parseUserData(e)))){if(t.dts<this.latestDts_)return void(this.ignoreNextEqualDts_=!0);if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return void(--this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=cl.parseCaptionPackets(t.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},dl.prototype.flush=function(){if(!this.captionPackets_.length)return void this.ccStreams_.forEach(function(t){t.flush()},this);this.captionPackets_.forEach(function(t,e){t.presortIndex=e}),this.captionPackets_.sort(function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts}),this.captionPackets_.forEach(function(t){t.type<2&&this.dispatchCea608Packet(t)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(t){t.flush()},this)},dl.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(t){t.reset()})},dl.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},dl.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},dl.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};var hl={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},fl=function(t){return null===t?"":(t=hl[t]||t,String.fromCharCode(t))},pl=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],vl=function(){for(var t=[],e=15;e--;)t.push("");return t},ml=function t(e,n){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,n,r,i,o;if((e=32639&t.ccData)===this.lastControlCode_)return void(this.lastControlCode_=null);if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),r=e>>>8,i=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=vl();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=vl();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=vl()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(r,i))r=(3&r)<<8,o=fl(r|i),this[this.mode_](t.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),r=(3&r)<<8,o=fl(r|i),this[this.mode_](t.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&i)&&this.addFormatting(t.pts,["i"]),1==(1&i)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=pl.indexOf(7968&e);"rollUp"===this.mode_&&this.setRollUp(t.pts,a),a!==this.row_&&(this.clearFormatting(t.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=fl(r),o+=fl(i),this[this.mode_](t.pts,o),this.column_+=o.length)}};ml.prototype=new ll,ml.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){return t.trim()}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},ml.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=vl(),this.nonDisplayed_=vl(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},ml.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_},ml.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},ml.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},ml.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},ml.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=33&&e<=35},ml.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},ml.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},ml.prototype.isNormalChar=function(t){return t>=32&&t<=127},ml.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=vl(),this.displayed_=vl()),void 0!==e&&e!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[e-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},ml.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var n=e.reduce(function(t,e){return t+"<"+e+">"},"");this[this.mode_](t,n)},ml.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+"</"+e+">"},"");this.formatting_=[],this[this.mode_](t,e)}},ml.prototype.popOn=function(t,e){var n=this.nonDisplayed_[this.row_];n+=e,this.nonDisplayed_[this.row_]=n},ml.prototype.rollUp=function(t,e){var n=this.displayed_[this.row_];n+=e,this.displayed_[this.row_]=n},ml.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},ml.prototype.paintOn=function(t,e){var n=this.displayed_[this.row_];n+=e,this.displayed_[this.row_]=n};var gl={CaptionStream:dl,Cea608Stream:ml},yl=gl.CaptionStream,Al=gl.Cea608Stream,_l=Object.freeze({default:gl,__moduleExports:gl,CaptionStream:yl,Cea608Stream:Al}),bl={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Tl=bl.H264_STREAM_TYPE,Sl=bl.ADTS_STREAM_TYPE,El=bl.METADATA_STREAM_TYPE,wl=Object.freeze({default:bl,__moduleExports:bl,H264_STREAM_TYPE:Tl,ADTS_STREAM_TYPE:Sl,METADATA_STREAM_TYPE:El}),kl=function(t,e){var n=1;for(t>e&&(n=-1);Math.abs(e-t)>4294967296;)t+=8589934592*n;return t},Cl=function t(e){var n,r;t.prototype.init.call(this),this.type_=e,this.push=function(t){t.type===this.type_&&(void 0===r&&(r=t.dts),t.dts=kl(t.dts,r),t.pts=kl(t.pts,r),n=t.dts,this.trigger("data",t))},this.flush=function(){r=n,this.trigger("done")},this.discontinuity=function(){r=void 0,n=void 0}};Cl.prototype=new ll;var Ll,Il={TimestampRolloverStream:Cl,handleRollover:kl},xl=Il.TimestampRolloverStream,Rl=Il.handleRollover,Ol=Object.freeze({default:Il,__moduleExports:Il,TimestampRolloverStream:xl,handleRollover:Rl}),Dl=wl&&bl||wl,Ml=function(t,e,n){var r,i="";for(r=e;r<n;r++)i+="%"+("00"+t[r].toString(16)).slice(-2);return i},jl=function(t,e,n){return decodeURIComponent(Ml(t,e,n))},Pl=function(t,e,n){return unescape(Ml(t,e,n))},Nl=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Ul={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=jl(t.data,1,e),t.value=jl(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=jl(t.data,1,e),t.url=jl(t.data,e+1,t.data.length);break}},PRIV:function(t){var e;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=Pl(t.data,0,e);break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};Ll=function(t){var e,n={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},r=0,i=[],o=0;if(Ll.prototype.init.call(this),this.dispatchType=Dl.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(e=0;e<n.descriptor.length;e++)this.dispatchType+=("00"+n.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,a,s,u,l,c;if("timed-metadata"===t.type){if(t.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))return void(n.debug&&console.log("Skipping unrecognized metadata packet"));if(i.push(t),o+=t.data.byteLength,1===i.length&&(r=Nl(t.data.subarray(6,10)),r+=10),!(o<r)){for(e={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)e.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&e.data[5]&&(a+=4,a+=Nl(e.data.subarray(10,14)),r-=Nl(e.data.subarray(16,20)));do{if((s=Nl(e.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if(c=String.fromCharCode(e.data[a],e.data[a+1],e.data[a+2],e.data[a+3]),u={id:c,data:e.data.subarray(a+10,a+s+10)},u.key=u.id,Ul[u.id]&&(Ul[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var d=u.data,h=(1&d[3])<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;h*=4,h+=3&d[7],u.timeStamp=h,void 0===e.pts&&void 0===e.dts&&(e.pts=u.timeStamp,e.dts=u.timeStamp),this.trigger("timestamp",u)}e.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",e)}}}},Ll.prototype=new ll;var Bl,Fl,Gl,zl=Ll,Vl=Object.freeze({default:zl,__moduleExports:zl}),Hl=_l&&gl||_l,Wl=Ol&&Il||Ol,Ql=Vl&&zl||Vl,Yl=Wl.TimestampRolloverStream;Bl=function(){var t=new Uint8Array(188),e=0;Bl.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(e?(r=new Uint8Array(n.byteLength+e),r.set(t.subarray(0,e)),r.set(n,e),e=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(t.set(r.subarray(i),0),e=r.byteLength-i)},this.flush=function(){188===e&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")}},Bl.prototype=new ll,Fl=function(){var t,e,n,r;Fl.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,r){var i=0;r.payloadUnitStartIndicator&&(i+=t[i]+1),"pat"===r.type?e(t.subarray(i),r):n(t.subarray(i),r)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],r.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=r.pmtPid},n=function(t,e){var n,i,o,a;if(1&t[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=(15&t[1])<<8|t[2],i=3+n-4,o=(15&t[10])<<8|t[11],a=12+o;a<i;){var s=t[a],u=(31&t[a+1])<<8|t[a+2];s===Dl.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=u:s===Dl.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=u:s===Dl.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][u]=s),a+=5+((15&t[a+3])<<8|t[a+4])}e.programMapTable=r.programMapTable}},this.push=function(e){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&e[1]),n.pid=31&e[1],n.pid<<=8,n.pid|=e[2],(48&e[3])>>>4>1&&(r+=e[r]+1),0===n.pid)n.type="pat",t(e.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",t(e.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,r,n]):this.processPes_(e,r,n)},this.processPes_=function(t,e,n){n.pid===this.programMapTable.video?n.streamType=Dl.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Dl.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=t.subarray(e),this.trigger("data",n)}},Fl.prototype=new ll,Fl.STREAM_TYPES={h264:27,adts:15},Gl=function(){var t=this,e={data:[],size:0},n={data:[],size:0},r={data:[],size:0},i=function(t,e){var n;e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=0!=(4&t[6]),n=t[7],192&n&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&n&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),e.data=t.subarray(9+t[8])},o=function(e,n,r){var o,a=new Uint8Array(e.size),s={type:n},u=0,l=0,c=!1;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)o=e.data[u],a.set(o.data,l),l+=o.data.byteLength;i(a,s),c="video"===n||s.packetLength<=e.size,(r||c)&&(e.size=0,e.data.length=0),c&&t.trigger("data",s)}};Gl.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,a;switch(i.streamType){case Dl.H264_STREAM_TYPE:case Dl.H264_STREAM_TYPE:t=e,a="video";break;case Dl.ADTS_STREAM_TYPE:t=n,a="audio";break;case Dl.METADATA_STREAM_TYPE:t=r,a="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&o(t,a,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]},n=i.programMapTable;null!==n.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),t.trigger("data",e)}})[i.type]()},this.flush=function(){o(e,"video"),o(n,"audio"),o(r,"timed-metadata"),this.trigger("done")}},Gl.prototype=new ll;var ql={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Bl,TransportParseStream:Fl,ElementaryStream:Gl,TimestampRolloverStream:Yl,CaptionStream:Hl.CaptionStream,Cea608Stream:Hl.Cea608Stream,MetadataStream:Ql};for(var Kl in Dl)Dl.hasOwnProperty(Kl)&&(ql[Kl]=Dl[Kl]);var Xl,Zl=ql,Jl=Object.freeze({default:Zl,__moduleExports:Zl}),$l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Xl=function(){var t;Xl.prototype.init.call(this),this.push=function(e){var n,r,i,o,a,s,u=0,l=0;if("audio"===e.type)for(t?(o=t,t=new Uint8Array(o.byteLength+e.data.byteLength),t.set(o),t.set(e.data,o.byteLength)):t=e.data;u+5<t.length;)if(255===t[u]&&240==(246&t[u+1])){if(r=2*(1&~t[u+1]),n=(3&t[u+3])<<11|t[u+4]<<3|(224&t[u+5])>>5,a=1024*(1+(3&t[u+6])),s=9e4*a/$l[(60&t[u+2])>>>2],i=u+n,t.byteLength<i)return;if(this.trigger("data",{pts:e.pts+l*s,dts:e.dts+l*s,sampleCount:a,audioobjecttype:1+(t[u+2]>>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:$l[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+r,i)}),t.byteLength===i)return void(t=void 0);l++,t=t.subarray(i)}else u++},this.flush=function(){this.trigger("done")}},Xl.prototype=new ll;var tc,ec=Xl,nc=Object.freeze({default:ec,__moduleExports:ec});tc=function(t){var e=t.byteLength,n=0,r=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+r},this.loadWord=function(){var i=t.byteLength-e,o=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");o.set(t.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,e-=a},this.skipBits=function(t){var i;r>t?(n<<=t,r-=t):(t-=r,i=Math.floor(t/8),t-=8*i,e-=i,this.loadWord(),n<<=t,r-=t)},this.readBits=function(t){var i=Math.min(r,t),o=n>>>32-i;return r-=i,r>0?n<<=i:e>0&&this.loadWord(),i=t-i,i>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var t;for(t=0;t<r;++t)if(0!=(n&2147483648>>>t))return n<<=t,r-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var rc,ic,oc,ac=tc,sc=Object.freeze({default:ac,__moduleExports:ac}),uc=sc&&ac||sc;ic=function(){var t,e,n=0;ic.prototype.init.call(this),this.push=function(r){var i;for(e?(i=new Uint8Array(e.byteLength+r.data.byteLength),i.set(e),i.set(r.data,e.byteLength),e=i):e=r.data;n<e.byteLength-3;n++)if(1===e[n+2]){t=n+5;break}for(;t<e.byteLength;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}n+3!==t-2&&this.trigger("data",e.subarray(n+3,t-2));do{t++}while(1!==e[t]&&t<e.length);n=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(n+3,t-2)),n=t-2,t+=3;break;default:t+=3}e=e.subarray(n),t-=n,n=0},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(n+3)),e=null,n=0,this.trigger("done")}},ic.prototype=new ll,oc={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},rc=function(){var t,e,n,r,i,o,a,s=new ic;rc.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,n=t.pts,r=t.dts,s.push(t))},s.on("data",function(a){var s={trackId:e,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",s)}),s.on("done",function(){t.trigger("done")}),this.flush=function(){s.flush()},a=function(t,e){var n,r,i=8,o=8;for(n=0;n<t;n++)0!==o&&(r=e.readExpGolomb(),o=(i+r+256)%256),i=0===o?i:o},i=function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n},o=function(t){var e,n,r,i,o,s,u,l,c,d,h,f,p,v=0,m=0,g=0,y=0,A=1;if(e=new uc(t),n=e.readUnsignedByte(),i=e.readUnsignedByte(),r=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),oc[n]&&(o=e.readUnsignedExpGolomb(),3===o&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==o?8:12,p=0;p<h;p++)e.readBoolean()&&(p<6?a(16,e):a(64,e));if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),u=e.readUnsignedExpGolomb(),p=0;p<u;p++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),l=e.readUnsignedExpGolomb(),c=e.readUnsignedExpGolomb(),d=e.readBits(1),0===d&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(v=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:f=[1,1];break;case 2:f=[12,11];break;case 3:f=[10,11];break;case 4:f=[16,11];break;case 5:f=[40,33];break;case 6:f=[24,11];break;case 7:f=[20,11];break;case 8:f=[32,11];break;case 9:f=[80,33];break;case 10:f=[18,11];break;case 11:f=[15,11];break;case 12:f=[64,33];break;case 13:f=[160,99];break;case 14:f=[4,3];break;case 15:f=[3,2];break;case 16:f=[2,1];break;case 255:f=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}f&&(A=f[0]/f[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*v-2*m)*A),height:(2-d)*(c+1)*16-2*g-2*y}}},rc.prototype=new ll;var lc,cc={H264Stream:rc,NalByteStream:ic},dc=cc.H264Stream,hc=cc.NalByteStream,fc=Object.freeze({default:cc,__moduleExports:cc,H264Stream:dc,NalByteStream:hc});lc=function(){var t=new Uint8Array,e=0;lc.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.parseId3TagSize=function(t,e){var n=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?n+20:n+10},this.parseAdtsSize=function(t,e){var n=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|n},this.push=function(n){var r,i,o,a,s=0,u=0;for(t.length?(a=t.length,t=new Uint8Array(n.byteLength+a),t.set(t.subarray(0,a)),t.set(n,a)):t=n;t.length-u>=3;)if(t[u]!=="I".charCodeAt(0)||t[u+1]!=="D".charCodeAt(0)||t[u+2]!=="3".charCodeAt(0))if(!0&t[u]&&240==(240&t[u+1])){if(t.length-u<7)break;if((s=this.parseAdtsSize(t,u))>t.length)break;o={type:"audio",data:t.subarray(u,u+s),pts:e,dts:e},this.trigger("data",o),u+=s}else u++;else{if(t.length-u<10)break;if((s=this.parseId3TagSize(t,u))>t.length)break;i={type:"timed-metadata",data:t.subarray(u,u+s)},this.trigger("data",i),u+=s}r=t.length-u,t=r>0?t.subarray(u):new Uint8Array}},lc.prototype=new ll;var pc,vc,mc,gc,yc,Ac,_c=lc,bc=Object.freeze({default:_c,__moduleExports:_c}),Tc=[33,16,5,32,164,27],Sc=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Ec=function(t){for(var e=[];t--;)e.push(0);return e},wc={96e3:[Tc,[227,64],Ec(154),[56]],88200:[Tc,[231],Ec(170),[56]],64e3:[Tc,[248,192],Ec(240),[56]],48e3:[Tc,[255,192],Ec(268),[55,148,128],Ec(54),[112]],44100:[Tc,[255,192],Ec(268),[55,163,128],Ec(84),[112]],32e3:[Tc,[255,192],Ec(268),[55,234],Ec(226),[112]],24e3:[Tc,[255,192],Ec(268),[55,255,128],Ec(268),[111,112],Ec(126),[224]],16e3:[Tc,[255,192],Ec(268),[55,255,128],Ec(268),[111,255],Ec(269),[223,108],Ec(195),[1,192]],12e3:[Sc,Ec(268),[3,127,248],Ec(268),[6,255,240],Ec(268),[13,255,224],Ec(268),[27,253,128],Ec(259),[56]],11025:[Sc,Ec(268),[3,127,248],Ec(268),[6,255,240],Ec(268),[13,255,224],Ec(268),[27,255,192],Ec(268),[55,175,128],Ec(108),[112]],8e3:[Sc,Ec(268),[3,121,16],Ec(47),[7]]},kc=function(t){return Object.keys(t).reduce(function(e,n){return e[n]=new Uint8Array(t[n].reduce(function(t,e){return t.concat(e)},[])),e},{})}(wc),Cc=Object.freeze({default:kc,__moduleExports:kc});pc=function(t){return 9e4*t},vc=function(t,e){return t*e},mc=function(t){return t/9e4},gc=function(t,e){return t/e},yc=function(t,e){return pc(gc(t,e))},Ac=function(t,e){return vc(mc(t),e)};var Lc,Ic,xc,Rc,Oc,Dc,Mc,jc={secondsToVideoTs:pc,secondsToAudioTs:vc,videoTsToSeconds:mc,audioTsToSeconds:gc,audioTsToVideoTs:yc,videoTsToAudioTs:Ac},Pc=jc.secondsToVideoTs,Nc=jc.secondsToAudioTs,Uc=jc.videoTsToSeconds,Bc=jc.audioTsToSeconds,Fc=jc.audioTsToVideoTs,Gc=jc.videoTsToAudioTs,zc=Object.freeze({default:jc,__moduleExports:jc,secondsToVideoTs:Pc,secondsToAudioTs:Nc,videoTsToSeconds:Uc,audioTsToSeconds:Bc,audioTsToVideoTs:Fc,videoTsToAudioTs:Gc}),Vc=ku&&_u||ku,Hc=Vu&&Nu||Vu,Wc=Zu&&Yu||Zu,Qc=Jl&&Zl||Jl,Yc=nc&&ec||nc,qc=fc&&cc||fc,Kc=bc&&_c||bc,Xc=Cc&&kc||Cc,Zc=zc&&jc||zc,Jc=qc.H264Stream,$c=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],td=["width","height","profileIdc","levelIdc","profileCompatibility"];Oc=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},Dc=function(t,e){var n;if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},Mc=function(t){var e,n,r=0;for(e=0;e<t.length;e++)n=t[e],r+=n.data.byteLength;return r},Ic=function(t,e){var n=[],r=0,i=0,o=0,a=1/0;e=e||{},Ic.prototype.init.call(this),this.push=function(e){Wc.collectDtsInfo(t,e),t&&$c.forEach(function(n){t[n]=e[n]}),n.push(e)},this.setEarliestDts=function(e){i=e-t.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){a=t},this.setAudioAppendStart=function(t){o=t},this.flush=function(){var i,o,a,s;if(0===n.length)return void this.trigger("done","AudioSegmentStream");i=this.trimAdtsFramesByEarliestDts_(n),t.baseMediaDecodeTime=Wc.calculateTrackBaseMediaDecodeTime(t,e.keepOriginalTimestamps),this.prefixWithSilence_(t,i),t.samples=this.generateSampleTable_(i),a=Vc.mdat(this.concatenateFrameData_(i)),n=[],o=Vc.moof(r,[t]),s=new Uint8Array(o.byteLength+a.byteLength),r++,s.set(o),s.set(a,o.byteLength),Wc.clearDtsInfo(t),this.trigger("data",{track:t,boxes:s}),this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(t,e){var n,r,i,s=0,u=0,l=0,c=0;if(e.length&&(n=Zc.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate),s=Math.ceil(9e4/(t.samplerate/1024)),o&&a&&(u=n-Math.max(o,a),l=Math.floor(u/s),c=l*s),!(l<1||c>45e3))){for(r=Xc[t.samplerate],r||(r=e[0].data),i=0;i<l;i++)e.splice(i,0,{data:r});t.baseMediaDecodeTime-=Math.floor(Zc.videoTsToAudioTs(c,t.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(e){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},this.generateSampleTable_=function(t){var e,n,r=[];for(e=0;e<t.length;e++)n=t[e],r.push({size:n.data.byteLength,duration:1024});return r},this.concatenateFrameData_=function(t){var e,n,r=0,i=new Uint8Array(Mc(t));for(e=0;e<t.length;e++)n=t[e],i.set(n.data,r),r+=n.data.byteLength;return i}},Ic.prototype=new ll,Lc=function(t,e){var n,r,i=0,o=[],a=[];e=e||{},Lc.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){Wc.collectDtsInfo(t,e),"seq_parameter_set_rbsp"!==e.nalUnitType||n||(n=e.config,t.sps=[e.data],td.forEach(function(e){t[e]=n[e]},this)),"pic_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,t.pps=[e.data]),o.push(e)},this.flush=function(){for(var n,r,s,u,l,c;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=Hc.groupNalsIntoFrames(o),s=Hc.groupFramesIntoGops(n),s[0][0].keyFrame||(r=this.getGopForFusion_(o[0],t),r?(s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=Hc.extendFirstKeyFrame(s)),a.length){var d;if(!(d=e.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Wc.clearDtsInfo(t),s=d}Wc.collectDtsInfo(t,s),t.samples=Hc.generateSampleTable(s),l=Vc.mdat(Hc.concatenateNalData(s)),t.baseMediaDecodeTime=Wc.calculateTrackBaseMediaDecodeTime(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map(function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}})),this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),u=Vc.moof(i,[t]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:t,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){Wc.clearDtsInfo(t),n=void 0,r=void 0},this.getGopForFusion_=function(e){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)o=this.gopCache_[a],i=o.gop,t.pps&&Dc(t.pps[0],o.pps[0])&&t.sps&&Dc(t.sps[0],o.sps[0])&&(i.dts<t.timelineStartInfo.dts||(n=e.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(t){var e,n,r,i,o,s,u,l;for(o=t.byteLength,s=t.nalCount,u=t.duration,e=n=0;e<a.length&&n<t.length&&(r=a[e],i=t[n],r.pts!==i.pts);)i.pts>r.pts?e++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?t:n===t.length?null:(l=t.slice(n),l.byteLength=o,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(t){var e,n,r,i,o,s;for(e=a.length-1,n=t.length-1,o=null,s=!1;e>=0&&n>=0;){if(r=a[e],i=t[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?e--:(e===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;var u;if(0===(u=s?n:o))return t;var l=t.slice(u),c=l.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(t){a=t}},Lc.prototype=new ll,Rc=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Rc.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}},Rc.prototype=new ll,Rc.prototype.flush=function(t){var e,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return void(++this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,td.forEach(function(t){a.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,$c.forEach(function(t){a.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=Vc.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)e=this.pendingCaptions[i],e.startTime=e.startPts-s,e.startTime/=9e4,e.endTime=e.endPts-s,e.endTime/=9e4,a.captionStreams[e.stream]=!0,a.captions.push(e);for(i=0;i<this.pendingMetadata.length;i++)n=this.pendingMetadata[i],n.cueTime=n.pts-s,n.cueTime/=9e4,a.metadata.push(n);a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},xc=function(t){var e,n,r=this,i=!0;xc.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};this.transmuxPipeline_=e,e.type="aac",e.metadataStream=new Qc.MetadataStream,e.aacStream=new Kc,e.audioTimestampRolloverStream=new Qc.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new Qc.TimestampRolloverStream("timed-metadata"),e.adtsStream=new Yc,e.coalesceStream=new Rc(t,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(i){"timed-metadata"!==i.type||e.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new Ic(n,t),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new Qc.MetadataStream,i.packetStream=new Qc.TransportPacketStream,i.parseStream=new Qc.TransportParseStream,i.elementaryStream=new Qc.ElementaryStream,i.videoTimestampRolloverStream=new Qc.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Qc.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Qc.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Yc,i.h264Stream=new Jc,i.captionStream=new Qc.CaptionStream,i.coalesceStream=new Rc(t,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)e||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||(n=o.tracks[a],n.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(e=o.tracks[a],e.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime);e&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new Lc(e,t),i.videoSegmentStream.on("timelineStartInfo",function(t){n&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Ic(n,t),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var r=this.transmuxPipeline_;this.baseMediaDecodeTime=t,n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Wc.clearDtsInfo(n),n.timelineStartInfo.baseMediaDecodeTime=t,r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),e&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,Wc.clearDtsInfo(e),r.captionStream.reset(),e.timelineStartInfo.baseMediaDecodeTime=t),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){e&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=Oc(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},xc.prototype=new ll;var ed,nd,rd={Transmuxer:xc,VideoSegmentStream:Lc,AudioSegmentStream:Ic,AUDIO_PROPERTIES:$c,VIDEO_PROPERTIES:td},id=rd.Transmuxer,od=rd.VideoSegmentStream,ad=rd.AudioSegmentStream,sd=rd.AUDIO_PROPERTIES,ud=rd.VIDEO_PROPERTIES,ld=Object.freeze({default:rd,__moduleExports:rd,Transmuxer:id,VideoSegmentStream:od,AudioSegmentStream:ad,AUDIO_PROPERTIES:sd,VIDEO_PROPERTIES:ud}),cd=yu.parseType,dd=function(t){return new Date(1e3*t-20828448e5)},hd=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},fd=function(t){var e,n,r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=[];for(e=0;e+4<t.length;e+=n)if(n=r.getUint32(e),e+=4,n<=0)i.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&t[e]){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+t[e]&31)}return i},pd={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:ed(t.subarray(78,t.byteLength))}},avcC:function(t){var e,n,r,i,o=new DataView(t.buffer,t.byteOffset,t.byteLength),a={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},s=31&t[5];for(r=6,i=0;i<s;i++)n=o.getUint16(r),r+=2,a.sps.push(new Uint8Array(t.subarray(r,r+n))),r+=n;for(e=t[r],r++,i=0;i<e;i++)n=o.getUint16(r),r+=2,a.pps.push(new Uint8Array(t.subarray(r,r+n))),r+=n;return a},btrt:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:e.getUint32(0),maxBitrate:e.getUint32(4),avgBitrate:e.getUint32(8)}},esds:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:31&t[8],decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={majorBrand:cd(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},r=8;r<t.byteLength;)n.compatibleBrands.push(cd(t.subarray(r,r+4))),r+=4;return n},dinf:function(t){return{boxes:ed(t)}},dref:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:ed(t.subarray(8))}},hdlr:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:cd(t.subarray(8,12)),name:""},r=8;for(r=24;r<t.byteLength;r++){if(0===t[r]){r++;break}n.name+=String.fromCharCode(t[r])}return n.name=decodeURIComponent(escape(n.name)),n},mdat:function(t){return{byteLength:t.byteLength,nals:fd(t)}},mdhd:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=4,i={version:n.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===i.version?(r+=4,i.creationTime=dd(n.getUint32(r)),r+=8,i.modificationTime=dd(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=8,i.duration=n.getUint32(r)):(i.creationTime=dd(n.getUint32(r)),r+=4,i.modificationTime=dd(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=4,i.duration=n.getUint32(r)),r+=4,e=n.getUint16(r),i.language+=String.fromCharCode(96+(e>>10)),i.language+=String.fromCharCode(96+((992&e)>>5)),i.language+=String.fromCharCode(96+(31&e)),i},mdia:function(t){return{boxes:ed(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:ed(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return t.byteLength>28&&(n.streamDescriptor=ed(t.subarray(28))[0]),n},moof:function(t){return{boxes:ed(t)}},moov:function(t){return{boxes:ed(t)}},mvex:function(t){return{boxes:ed(t)}},mvhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=dd(e.getUint32(n)),n+=8,r.modificationTime=dd(e.getUint32(n)),n+=4,r.timescale=e.getUint32(n),n+=8,r.duration=e.getUint32(n)):(r.creationTime=dd(e.getUint32(n)),n+=4,r.modificationTime=dd(e.getUint32(n)),n+=4,r.timescale=e.getUint32(n),n+=4,r.duration=e.getUint32(n)),n+=4,r.rate=e.getUint16(n)+e.getUint16(n+2)/16,n+=4,r.volume=e.getUint8(n)+e.getUint8(n+1)/8,n+=2,n+=2,n+=8,r.matrix=new Uint32Array(t.subarray(n,n+36)),n+=36,n+=24,r.nextTrackId=e.getUint32(n),r},pdin:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:e.getUint32(4),initialDelay:e.getUint32(8)}},sdtp:function(t){var e,n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]};for(e=4;e<t.byteLength;e++)n.samples.push({dependsOn:(48&t[e])>>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return n},sidx:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},i=n.getUint16(22);for(e=24;i;e+=12,i--)r.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&n.getUint32(e),subsegmentDuration:n.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&n.getUint32(e+8)});return r},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:ed(t)}},stco:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},i=n.getUint32(4);for(e=8;i;e+=4,i--)r.chunkOffsets.push(n.getUint32(e));return r},stsc:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=n.getUint32(4),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;r;e+=12,r--)i.sampleToChunks.push({firstChunk:n.getUint32(e),samplesPerChunk:n.getUint32(e+4),sampleDescriptionIndex:n.getUint32(e+8)});return i},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:ed(t.subarray(8))}},stsz:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(e=12;e<t.byteLength;e+=4)r.entries.push(n.getUint32(e));return r},stts:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},i=n.getUint32(4);for(e=8;i;e+=8,i--)r.timeToSamples.push({sampleCount:n.getUint32(e),sampleDelta:n.getUint32(e+4)});return r},styp:function(t){return pd.ftyp(t)},tfdt:function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]),e},tfhd:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return e=8,i&&(e+=4,r.baseDataOffset=n.getUint32(12),e+=4),o&&(r.sampleDescriptionIndex=n.getUint32(e),e+=4),a&&(r.defaultSampleDuration=n.getUint32(e),e+=4),s&&(r.defaultSampleSize=n.getUint32(e),e+=4),u&&(r.defaultSampleFlags=n.getUint32(e)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},tkhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=dd(e.getUint32(n)),n+=8,r.modificationTime=dd(e.getUint32(n)),n+=4,r.trackId=e.getUint32(n),n+=4,n+=8,r.duration=e.getUint32(n)):(r.creationTime=dd(e.getUint32(n)),n+=4,r.modificationTime=dd(e.getUint32(n)),n+=4,r.trackId=e.getUint32(n),n+=4,n+=4,r.duration=e.getUint32(n)),n+=4,n+=8,r.layer=e.getUint16(n),n+=2,r.alternateGroup=e.getUint16(n),n+=2,r.volume=e.getUint8(n)+e.getUint8(n+1)/8,n+=2,n+=2,r.matrix=new Uint32Array(t.subarray(n,n+36)),n+=36,r.width=e.getUint16(n)+e.getUint16(n+2)/16,n+=4,r.height=e.getUint16(n)+e.getUint16(n+2)/16,r},traf:function(t){return{boxes:ed(t)}},trak:function(t){return{boxes:ed(t)}},trex:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:e.getUint32(4),defaultSampleDescriptionIndex:e.getUint32(8),defaultSampleDuration:e.getUint32(12),defaultSampleSize:e.getUint32(16),sampleDependsOn:3&t[20],sampleIsDependedOn:(192&t[21])>>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),o&&c&&(e={flags:hd(t.subarray(d,d+4))},d+=4,a&&(e.duration=r.getUint32(d),d+=4),s&&(e.size=r.getUint32(d),d+=4),l&&(e.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(e),c--);c--;)e={},a&&(e.duration=r.getUint32(d),d+=4),s&&(e.size=r.getUint32(d),d+=4),u&&(e.flags=hd(t.subarray(d,d+4)),d+=4),l&&(e.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(e);return n},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}};ed=function(t){for(var e,n,r,i,o,a=0,s=[],u=new ArrayBuffer(t.length),l=new Uint8Array(u),c=0;c<t.length;++c)l[c]=t[c];for(e=new DataView(u);a<t.byteLength;)n=e.getUint32(a),r=cd(t.subarray(a+4,a+8)),i=n>1?a+n:t.byteLength,o=(pd[r]||function(t){return{data:t}})(t.subarray(a+8,i)),o.size=n,o.type=r,s.push(o),a=i;return s},nd=function(t,e){var n;return e=e||0,n=new Array(2*e+1).join(" "),t.map(function(t,r){return n+t.type+"\n"+Object.keys(t).filter(function(t){return"type"!==t&&"boxes"!==t}).map(function(e){var r=n+" "+e+": ",i=t[e];if(i instanceof Uint8Array||i instanceof Uint32Array){var o=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(function(t){return" "+("00"+t.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return o?1===o.length?r+"<"+o.join("").slice(1)+">":r+"<\n"+o.map(function(t){return n+" "+t}).join("\n")+"\n"+n+" >":r+"<>"}return r+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:n+" "+t}).join("\n")}).join("\n")+(t.boxes?"\n"+nd(t.boxes,e+1):"")}).join("\n")};var vd={inspect:ed,textify:nd,parseTfdt:pd.tfdt,parseHdlr:pd.hdlr,parseTfhd:pd.tfhd,parseTrun:pd.trun},md=vd.inspect,gd=vd.textify,yd=vd.parseTfdt,Ad=vd.parseHdlr,_d=vd.parseTfhd,bd=vd.parseTrun,Td=Object.freeze({default:vd,__moduleExports:vd,inspect:md,textify:gd,parseTfdt:yd,parseHdlr:Ad,parseTfhd:_d,parseTrun:bd}),Sd=Td&&vd||Td,Ed=cl.discardEmulationPreventionBytes,wd=Hl.CaptionStream,kd=function(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(n<i.size)return i;n-=i.size}return null},Cd=function(t,e,n){var r,i,o,a,s=new DataView(t.buffer,t.byteOffset,t.byteLength),u=[];for(i=0;i+4<t.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&t[i]){case 6:var l=t.subarray(i+1,i+1+o),c=kd(i,e);r={nalUnitType:"sei_rbsp",size:o,data:l,escapedRBSP:Ed(l),trackId:n},c?(r.pts=c.pts,r.dts=c.dts,a=c):(r.pts=a.pts,r.dts=a.dts),u.push(r)}return u},Ld=function(t,e,n){var r=e,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return t.forEach(function(t){var e=Sd.parseTrun(t),n=e.samples;n.forEach(function(t){void 0===t.duration&&(t.duration=i),void 0===t.size&&(t.size=o),t.trackId=a,t.dts=r,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=r+t.compositionTimeOffset,r+=t.duration}),s=s.concat(n)}),s},Id=function(t,e){var n=yu.findBox(t,["moof","traf"]),r=yu.findBox(t,["mdat"]),i={},o=[];return r.forEach(function(t,e){var r=n[e];o.push({mdat:t,traf:r})}),o.forEach(function(t){var n,r,o=t.mdat,a=t.traf,s=yu.findBox(a,["tfhd"]),u=Sd.parseTfhd(s[0]),l=u.trackId,c=yu.findBox(a,["tfdt"]),d=c.length>0?Sd.parseTfdt(c[0]).baseMediaDecodeTime:0,h=yu.findBox(a,["trun"]);e===l&&h.length>0&&(n=Ld(h,d,u),r=Cd(o,n,l),i[l]||(i[l]=[]),i[l]=i[l].concat(r))}),i},xd=function(t,e,n){var r;return e?(r=Id(t,e),{seiNals:r[e],timescale:n}):null},Rd=function(){var t,e,n,r,i,o=!1;this.isInitialized=function(){return o},this.init=function(){t=new wd,o=!0,t.on("data",function(t){t.startTime=t.startPts/r,t.endTime=t.endPts/r,i.captions.push(t),i.captionStreams[t.stream]=!0})},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"===(void 0===e?"undefined":Oe(e))&&0===Object.keys(e).length||n===t[0]&&r===e[n])},this.parse=function(t,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(!n||!r)return e.push(t),null;for(;e.length>0;){var u=e.shift();this.parse(u,o,a)}return null!==(s=xd(t,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach(function(e){t.push(e)})},this.flushStream=function(){if(!this.isInitialized())return null;t.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){e=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},Od=Rd,Dd=Object.freeze({default:Od,__moduleExports:Od}),Md=ld&&rd||ld,jd=Dd&&Od||Dd,Pd={generator:Vc,probe:yu,Transmuxer:Md.Transmuxer,AudioSegmentStream:Md.AudioSegmentStream,VideoSegmentStream:Md.VideoSegmentStream,CaptionParser:jd},Nd=Pd.CaptionParser,Ud=function(t){var e=31&t[1];return e<<=8,e|=t[2]},Bd=function(t){return!!(64&t[1])},Fd=function(t){var e=0;return(48&t[3])>>>4>1&&(e+=t[4]+1),e},Gd=function(t,e){var n=Ud(t);return 0===n?"pat":n===e?"pmt":e?"pes":null},zd=function(t){var e=Bd(t),n=4+Fd(t);return e&&(n+=t[n]+1),(31&t[n+10])<<8|t[n+11]},Vd=function(t){var e={},n=Bd(t),r=4+Fd(t);if(n&&(r+=t[r]+1),1&t[r+5]){var i,o,a;i=(15&t[r+1])<<8|t[r+2],o=3+i-4,a=(15&t[r+10])<<8|t[r+11];for(var s=12+a;s<o;){var u=r+s;e[(31&t[u+1])<<8|t[u+2]]=t[u],s+=5+((15&t[u+3])<<8|t[u+4])}return e}},Hd=function(t,e){switch(e[Ud(t)]){case Dl.H264_STREAM_TYPE:return"video";case Dl.ADTS_STREAM_TYPE:return"audio";case Dl.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Wd=function(t){if(!Bd(t))return null;var e=4+Fd(t);if(e>=t.byteLength)return null;var n,r=null;return n=t[e+7],192&n&&(r={},r.pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,r.pts*=4,r.pts+=(6&t[e+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,r.dts*=4,r.dts+=(6&t[e+18])>>>1)),r},Qd=function(t){switch(t){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}},Yd=function(t){for(var e,n=4+Fd(t),r=t.subarray(n),i=0,o=0,a=!1;o<r.byteLength-3;o++)if(1===r[o+2]){i=o+5;break}for(;i<r.byteLength;)switch(r[i]){case 0:if(0!==r[i-1]){i+=2;break}if(0!==r[i-2]){i++;break}o+3!==i-2&&"slice_layer_without_partitioning_rbsp_idr"===(e=Qd(31&r[o+3]))&&(a=!0);do{i++}while(1!==r[i]&&i<r.length);o=i-2,i+=3;break;case 1:if(0!==r[i-1]||0!==r[i-2]){i+=3;break}e=Qd(31&r[o+3]),"slice_layer_without_partitioning_rbsp_idr"===e&&(a=!0),o=i-2,i+=3;break;default:i+=3}return r=r.subarray(o),i-=o,o=0,r&&r.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===(e=Qd(31&r[o+3]))&&(a=!0),a},qd={parseType:Gd,parsePat:zd,parsePmt:Vd,parsePayloadUnitStartIndicator:Bd,parsePesType:Hd,parsePesTime:Wd,videoPacketContainsKeyFrame:Yd},Kd=qd.parseType,Xd=qd.parsePat,Zd=qd.parsePmt,Jd=qd.parsePayloadUnitStartIndicator,$d=qd.parsePesType,th=qd.parsePesTime,eh=qd.videoPacketContainsKeyFrame,nh=Object.freeze({default:qd,__moduleExports:qd,parseType:Kd,parsePat:Xd,parsePmt:Zd,parsePayloadUnitStartIndicator:Jd,parsePesType:$d,parsePesTime:th,videoPacketContainsKeyFrame:eh}),rh=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ih=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},oh=function(t,e,n){var r,i="";for(r=e;r<n;r++)i+="%"+("00"+t[r].toString(16)).slice(-2);return i},ah=function(t,e,n){return unescape(oh(t,e,n))},sh=function(t,e){var n=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?n+20:n+10},uh=function(t,e){var n=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|n},lh=function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},ch=function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return rh[(60&t[e+2])>>>2];e++}return null},dh=function(t){var e,n,r;e=10,64&t[5]&&(e+=4,e+=ih(t.subarray(10,14)));do{if((n=ih(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){r=t.subarray(e+10,e+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){var o=ah(r,0,i);if("com.apple.streaming.transportStreamTimestamp"===o){var a=r.subarray(i+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}break}}e+=10,e+=n}while(e<t.byteLength);return null},hh={parseId3TagSize:sh,parseAdtsSize:uh,parseType:lh,parseSampleRate:ch,parseAacTimestamp:dh},fh=hh.parseId3TagSize,ph=hh.parseAdtsSize,vh=hh.parseType,mh=hh.parseSampleRate,gh=hh.parseAacTimestamp,yh=Object.freeze({default:hh,__moduleExports:hh,parseId3TagSize:fh,parseAdtsSize:ph,parseType:vh,parseSampleRate:mh,parseAacTimestamp:gh}),Ah=nh&&qd||nh,_h=yh&&hh||yh,bh=Wl.handleRollover,Th={};Th.ts=Ah,Th.aac=_h;var Sh=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},Eh=function(t,e){for(var n,r=0,i=188;i<t.byteLength;)if(71!==t[r]||71!==t[i])r++,i++;else{switch(n=t.subarray(r,i),Th.ts.parseType(n,e.pid)){case"pat":e.pid||(e.pid=Th.ts.parsePat(n));break;case"pmt":e.table||(e.table=Th.ts.parsePmt(n))}if(e.pid&&e.table)return;r+=188,i+=188}},wh=function(t,e,n){for(var r,i,o,a,s=0,u=188,l=!1;u<t.byteLength;)if(71!==t[s]||71!==t[u])s++,u++;else{switch(r=t.subarray(s,u),Th.ts.parseType(r,e.pid)){case"pes":i=Th.ts.parsePesType(r,e.table),o=Th.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(a=Th.ts.parsePesTime(r))&&(a.type="audio",n.audio.push(a),l=!0)}if(l)break;s+=188,u+=188}for(u=t.byteLength,s=u-188,l=!1;s>=0;)if(71!==t[s]||71!==t[u])s--,u--;else{switch(r=t.subarray(s,u),Th.ts.parseType(r,e.pid)){case"pes":i=Th.ts.parsePesType(r,e.table),o=Th.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(a=Th.ts.parsePesTime(r))&&(a.type="audio",n.audio.push(a),l=!0)}if(l)break;s-=188,u-=188}},kh=function(t,e,n){for(var r,i,o,a,s,u,l,c=0,d=188,h=!1,f={data:[],size:0};d<t.byteLength;)if(71!==t[c]||71!==t[d])c++,d++;else{switch(r=t.subarray(c,d),Th.ts.parseType(r,e.pid)){case"pes":if(i=Th.ts.parsePesType(r,e.table),o=Th.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(o&&!h&&(a=Th.ts.parsePesTime(r))&&(a.type="video",n.video.push(a),h=!0),!n.firstKeyFrame)){if(o&&0!==f.size){for(s=new Uint8Array(f.size),u=0;f.data.length;)l=f.data.shift(),s.set(l,u),u+=l.byteLength;Th.ts.videoPacketContainsKeyFrame(s)&&(n.firstKeyFrame=Th.ts.parsePesTime(s),n.firstKeyFrame.type="video"),f.size=0}f.data.push(r),f.size+=r.byteLength}}if(h&&n.firstKeyFrame)break;c+=188,d+=188}for(d=t.byteLength,c=d-188,h=!1;c>=0;)if(71!==t[c]||71!==t[d])c--,d--;else{switch(r=t.subarray(c,d),Th.ts.parseType(r,e.pid)){case"pes":i=Th.ts.parsePesType(r,e.table),o=Th.ts.parsePayloadUnitStartIndicator(r),"video"===i&&o&&(a=Th.ts.parsePesTime(r))&&(a.type="video",n.video.push(a),h=!0)}if(h)break;c-=188,d-=188}},Ch=function(t,e){if(t.audio&&t.audio.length){var n=e;void 0===n&&(n=t.audio[0].dts),t.audio.forEach(function(t){t.dts=bh(t.dts,n),t.pts=bh(t.pts,n),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4})}if(t.video&&t.video.length){var r=e;if(void 0===r&&(r=t.video[0].dts),t.video.forEach(function(t){t.dts=bh(t.dts,r),t.pts=bh(t.pts,r),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4}),t.firstKeyFrame){var i=t.firstKeyFrame;i.dts=bh(i.dts,r),i.pts=bh(i.pts,r),i.dtsTime=i.dts/9e4,i.ptsTime=i.dts/9e4}}},Lh=function(t){for(var e,n=!1,r=0,i=null,o=null,a=0,s=0;t.length-s>=3;){switch(Th.aac.parseType(t,s)){case"timed-metadata":if(t.length-s<10){n=!0;break}if((a=Th.aac.parseId3TagSize(t,s))>t.length){n=!0;break}null===o&&(e=t.subarray(s,s+a),o=Th.aac.parseAacTimestamp(e)),s+=a;break;case"audio":if(t.length-s<7){n=!0;break}if((a=Th.aac.parseAdtsSize(t,s))>t.length){n=!0;break}null===i&&(e=t.subarray(s,s+a),i=Th.aac.parseSampleRate(e)),r++,s+=a;break;default:s++}if(n)return null}if(null===i||null===o)return null;var u=9e4/i;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*r*u,pts:o+1024*r*u}]}},Ih=function(t){var e={pid:null,table:null},n={};Eh(t,e);for(var r in e.table)if(e.table.hasOwnProperty(r)){var i=e.table[r];switch(i){case Dl.H264_STREAM_TYPE:n.video=[],kh(t,e,n),0===n.video.length&&delete n.video;break;case Dl.ADTS_STREAM_TYPE:n.audio=[],wh(t,e,n),0===n.audio.length&&delete n.audio}}return n},xh=function(t,e){var n;return(n=Sh(t)?Lh(t):Ih(t))&&(n.audio||n.video)?(Ch(n,e),n):null},Rh={inspect:xh},Oh=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Dh=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Mh=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":Oe(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)},jh=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":Oe(e))&&"function"!=typeof e?t:e},Ph=function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],n=t[1],r=e[4],i=n[4],o=void 0,a=void 0,s=void 0,u=[],l=[],c=void 0,d=void 0,h=void 0,f=void 0,p=void 0,v=void 0;for(o=0;o<256;o++)l[(u[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!r[a];a^=c||1,s=l[s]||1)for(f=s^s<<1^s<<2^s<<3^s<<4,f=f>>8^255&f^99,r[a]=f,i[f]=a,h=u[d=u[c=u[a]]],v=16843009*h^65537*d^257*c^16843008*a,p=257*u[f]^16843008*f,o=0;o<4;o++)e[o][a]=p=p<<24^p>>>8,n[o][f]=v=v<<24^v>>>8;for(o=0;o<5;o++)e[o]=e[o].slice(0),n[o]=n[o].slice(0);return t},Nh=null,Uh=function(){function t(e){Oh(this,t),Nh||(Nh=Ph()),this._tables=[[Nh[0][0].slice(),Nh[0][1].slice(),Nh[0][2].slice(),Nh[0][3].slice(),Nh[0][4].slice()],[Nh[1][0].slice(),Nh[1][1].slice(),Nh[1][2].slice(),Nh[1][3].slice(),Nh[1][4].slice()]];var n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=this._tables[0][4],u=this._tables[1],l=e.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(o=e.slice(0),a=[],this._key=[o,a],n=l;n<4*l+28;n++)i=o[n-1],(n%l==0||8===l&&n%l==4)&&(i=s[i>>>24]<<24^s[i>>16&255]<<16^s[i>>8&255]<<8^s[255&i],n%l==0&&(i=i<<8^i>>>24^c<<24,c=c<<1^283*(c>>7))),o[n]=o[n-l]^i;for(r=0;n;r++,n--)i=o[3&r?n:n-4],a[r]=n<=4||r<4?i:u[0][s[i>>>24]]^u[1][s[i>>16&255]]^u[2][s[i>>8&255]]^u[3][s[255&i]]}return t.prototype.decrypt=function(t,e,n,r,i,o){var a=this._key[1],s=t^a[0],u=r^a[1],l=n^a[2],c=e^a[3],d=void 0,h=void 0,f=void 0,p=a.length/4-2,v=void 0,m=4,g=this._tables[1],y=g[0],A=g[1],_=g[2],b=g[3],T=g[4];for(v=0;v<p;v++)d=y[s>>>24]^A[u>>16&255]^_[l>>8&255]^b[255&c]^a[m],h=y[u>>>24]^A[l>>16&255]^_[c>>8&255]^b[255&s]^a[m+1],f=y[l>>>24]^A[c>>16&255]^_[s>>8&255]^b[255&u]^a[m+2],c=y[c>>>24]^A[s>>16&255]^_[u>>8&255]^b[255&l]^a[m+3],m+=4,s=d,u=h,l=f;for(v=0;v<4;v++)i[(3&-v)+o]=T[s>>>24]<<24^T[u>>16&255]<<16^T[l>>8&255]<<8^T[255&c]^a[m++],d=s,s=u,u=l,l=c,c=d},t}(),Bh=function(){function t(){Oh(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var n=this.listeners[t].indexOf(e);return this.listeners[t].splice(n,1),n>-1},t.prototype.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var n=e.length,r=0;r<n;++r)e[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=e.length,a=0;a<o;++a)e[a].apply(this,i)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},t}(),Fh=function(t){function e(){Oh(this,e);var n=jh(this,t.call(this,Bh));return n.jobs=[],n.delay=1,n.timeout_=null,n}return Mh(e,t),e.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},e.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(Bh),Gh=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},zh=function(t,e,n){var r=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),i=new Uh(Array.prototype.slice.call(e)),o=new Uint8Array(t.byteLength),a=new Int32Array(o.buffer),s=void 0,u=void 0,l=void 0,c=void 0,d=void 0,h=void 0,f=void 0,p=void 0,v=void 0;for(s=n[0],u=n[1],l=n[2],c=n[3],v=0;v<r.length;v+=4)d=Gh(r[v]),h=Gh(r[v+1]),f=Gh(r[v+2]),p=Gh(r[v+3]),i.decrypt(d,h,f,p,a,v),a[v]=Gh(a[v]^s),a[v+1]=Gh(a[v+1]^u),a[v+2]=Gh(a[v+2]^l),a[v+3]=Gh(a[v+3]^c),s=d,u=h,l=f,c=p;return o},Vh=function(){function t(e,n,r,i){Oh(this,t);var o=t.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),u=0;for(this.asyncStream_=new Fh,this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+o),n,r,s)),u=o;u<a.length;u+=o)r=new Uint32Array([Gh(a[u-4]),Gh(a[u-3]),Gh(a[u-2]),Gh(a[u-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+o),n,r,s));this.asyncStream_.push(function(){i(null,de(s))})}return t.prototype.decryptChunk_=function(t,e,n,r){return function(){var i=zh(t,e,n);r.set(i,t.byteOffset)}},Dh(t,null,[{key:"STEP",get:function(){return 32e3}}]),t}(),Hh=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=wa.buildAbsoluteURL(_e.location.href,t)),wa.buildAbsoluteURL(t,e))},Wh=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Qh=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Yh=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},qh=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":Oe(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)},Kh=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":Oe(e))&&"function"!=typeof e?t:e},Xh=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Zh=le.mergeOptions,Jh=le.EventTarget,$h=le.log,tf=function(t,e){["AUDIO","SUBTITLES"].forEach(function(n){for(var r in t.mediaGroups[n])for(var i in t.mediaGroups[n][r]){var o=t.mediaGroups[n][r][i];e(o,n,r,i)}})},ef=function(t,e,n){var r=e.slice();n=n||0;for(var i=Math.min(t.length,e.length+n),o=n;o<i;o++)r[o-n]=Zh(t[o],r[o-n]);return r},nf=function(t,e){t.resolvedUri||(t.resolvedUri=Hh(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=Hh(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=Hh(e,t.map.uri))},rf=function(t,e){var n=Zh(t,{}),r=n.playlists[e.uri];if(!r)return null;if(r.segments&&e.segments&&r.segments.length===e.segments.length&&r.mediaSequence===e.mediaSequence)return null;var i=Zh(r,e);r.segments&&(i.segments=ef(r.segments,e.segments,e.mediaSequence-r.mediaSequence)),i.segments.forEach(function(t){nf(t,i.resolvedUri)});for(var o=0;o<n.playlists.length;o++)n.playlists[o].uri===e.uri&&(n.playlists[o]=i);return n.playlists[e.uri]=i,n},of=function(t){for(var e=t.playlists.length;e--;){var n=t.playlists[e];t.playlists[n.uri]=n,n.resolvedUri=Hh(t.uri,n.uri),n.id=e,n.attributes||(n.attributes={},$h.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},af=function(t){tf(t,function(e){e.uri&&(e.resolvedUri=Hh(t.uri,e.uri))})},sf=function(t,e){var n=t.segments[t.segments.length-1];return e&&n&&n.duration?1e3*n.duration:500*(t.targetDuration||10)},uf=function(t){function e(t,n,r){Wh(this,e);var i=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(i.srcUrl=t,i.hls_=n,i.withCredentials=r,!i.srcUrl)throw new Error("A non-empty playlist URL is required");return i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.hls_.xhr({uri:Hh(i.master.uri,i.media().uri),withCredentials:i.withCredentials},function(t,e){if(i.request)return t?i.playlistRequestError(i.request,i.media().uri,"HAVE_METADATA"):void i.haveMetadata(i.request,i.media().uri)}))}),i}return qh(e,t),Qh(e,[{key:"playlistRequestError",value:function(t,e,n){this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[e],status:t.status,message:"HLS playlist request error at URL: "+e,responseText:t.responseText,code:t.status>=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(t,e){var n=this;this.request=null,this.state="HAVE_METADATA";var r=new ja;r.push(t.responseText),r.end(),r.manifest.uri=e,r.manifest.attributes=r.manifest.attributes||{};var i=rf(this.master,r.manifest);this.targetDuration=r.manifest.targetDuration,i?(this.master=i,this.media_=this.master.playlists[r.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(_e.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=_e.setTimeout(function(){n.trigger("mediaupdatetimeout")},sf(this.media(),!!i))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),_e.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}},{key:"media",value:function(t){var e=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}var r=!this.media_||t.uri!==this.media_.uri;if(this.master.playlists[t.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(r){if(this.state="SWITCHING_MEDIA",this.request){if(Hh(this.master.uri,t.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:Hh(this.master.uri,t.uri),withCredentials:this.withCredentials},function(r,i){if(e.request){if(r)return e.playlistRequestError(e.request,t.uri,n);e.haveMetadata(i,t.uri),"HAVE_MASTER"===n?e.trigger("loadedmetadata"):e.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest(),_e.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(t){var e=this;_e.clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(t){var r=n?n.targetDuration/2*1e3:5e3;return void(this.mediaUpdateTimeout=_e.setTimeout(function(){return e.load()},r))}if(!this.started)return void this.start();n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}},{key:"start",value:function(){var t=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,n){if(t.request){if(t.request=null,e)return t.error={status:n.status,message:"HLS playlist request error at URL: "+t.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");var r=new ja;return r.push(n.responseText),r.end(),t.state="HAVE_MASTER",r.manifest.uri=t.srcUrl,r.manifest.playlists?(t.master=r.manifest,of(t.master),af(t.master),t.trigger("loadedplaylist"),void(t.request||t.media(r.manifest.playlists[0]))):(t.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:_e.location.href,playlists:[{uri:t.srcUrl,id:0}]},t.master.playlists[t.srcUrl]=t.master.playlists[0],t.master.playlists[0].resolvedUri=t.srcUrl,t.master.playlists[0].attributes=t.master.playlists[0].attributes||{},t.haveMetadata(n,t.srcUrl),t.trigger("loadedmetadata"))}})}}]),e}(Jh),lf=le.createTimeRange,cf=function(t,e){var n=0,r=e-t.mediaSequence,i=t.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(i=t.segments[r],void 0!==i.end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}},df=function(t,e){for(var n=0,r=void 0,i=e-t.mediaSequence;i<t.segments.length;i++){if(r=t.segments[i],void 0!==r.start)return{result:r.start-n,precise:!0};if(n+=r.duration,void 0!==r.end)return{result:r.end-n,precise:!0}}return{result:-1,precise:!1}},hf=function(t,e,n){var r=void 0,i=void 0;return void 0===e&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence?0:(r=cf(t,e),r.precise?r.result:(i=df(t,e),i.precise?i.result:r.result+n))},ff=function(t,e,n){if(!t)return 0;if("number"!=typeof n&&(n=0),void 0===e){if(t.totalDuration)return t.totalDuration;if(!t.endList)return _e.Infinity}return hf(t,e,n)},pf=function(t,e,n){var r=0;if(e>n){var i=[n,e];e=i[0],n=i[1]}if(e<0){for(var o=e;o<Math.min(0,n);o++)r+=t.targetDuration;e=0}for(var a=e;a<n;a++)r+=t.segments[a].duration;return r},vf=function(t){if(!t.segments.length)return 0;for(var e=t.segments.length-1,n=t.segments[e].duration||t.targetDuration,r=n+2*t.targetDuration;e--&&!((n+=t.segments[e].duration)>=r););return Math.max(0,e)},mf=function(t,e,n){if(!t||!t.segments)return null;if(t.endList)return ff(t);if(null===e)return null;e=e||0;var r=n?vf(t):t.segments.length;return hf(t,t.mediaSequence+r,e)},gf=function(t,e){var n=e||0,r=mf(t,e,!0);return null===r?lf():lf(n,r)},yf=function(t){return t-Math.floor(t)==0},Af=function(t,e){if(yf(e))return e+.1*t;for(var n=e.toString().split(".")[1].length,r=1;r<=n;r++){var i=Math.pow(10,r),o=e*i;if(yf(o)||r===n)return(o+t)/i}},_f=Af.bind(null,1),bf=Af.bind(null,-1),Tf=function(t,e,n,r){var i=void 0,o=void 0,a=t.segments.length,s=e-r;if(s<0){if(n>0)for(i=n-1;i>=0;i--)if(o=t.segments[i],(s+=bf(o.duration))>0)return{mediaIndex:i,startTime:r-pf(t,n,i)};return{mediaIndex:0,startTime:e}}if(n<0){for(i=n;i<0;i++)if((s-=t.targetDuration)<0)return{mediaIndex:0,startTime:e};n=0}for(i=n;i<a;i++)if(o=t.segments[i],(s-=_f(o.duration))<0)return{mediaIndex:i,startTime:r+pf(t,n,i)};return{mediaIndex:a-1,startTime:e}},Sf=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},Ef=function(t){return t.excludeUntil&&t.excludeUntil===1/0},wf=function(t){var e=Sf(t);return!t.disabled&&!e},kf=function(t){return t.disabled},Cf=function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},Lf=function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].map)return!0;return!1},If=function(t,e){return e.attributes&&e.attributes[t]},xf=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return If("BANDWIDTH",n)?(t*n.attributes.BANDWIDTH-8*r)/e:NaN},Rf=function(t,e){if(1===t.playlists.length)return!0;var n=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter(function(t){return!!wf(t)&&(t.attributes.BANDWIDTH||0)<n}).length},Of={duration:ff,seekable:gf,safeLiveIndex:vf,getMediaInfoForTime:Tf,isEnabled:wf,isDisabled:kf,isBlacklisted:Sf,isIncompatible:Ef,playlistEnd:mf,isAes:Cf,isFmp4:Lf,hasAttribute:If,estimateSegmentRequestTime:xf,isLowestEnabledRendition:Rf},Df=le.xhr,Mf=le.mergeOptions,jf=function(){return function t(e,n){e=Mf({timeout:45e3},e);var r=t.beforeRequest||le.Hls.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(e);i&&(e=i)}var o=Df(e,function(t,e){var r=o.response;!t&&r&&(o.responseTime=Date.now(),o.roundTripTime=o.responseTime-o.requestTime,o.bytesReceived=r.byteLength||r.length,o.bandwidth||(o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3))),e.headers&&(o.responseHeaders=e.headers),t&&"ETIMEDOUT"===t.code&&(o.timedout=!0),t||o.aborted||200===e.statusCode||206===e.statusCode||0===e.statusCode||(t=new Error("XHR Failed with a response of: "+(o&&(r||o.responseText)))),n(t,o)}),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=e.uri,o.requestTime=Date.now(),o}},Pf=function(t,e){return t.start(e)+"-"+t.end(e)},Nf=function(t,e){var n=t.toString(16);return"00".substring(0,2-n.length)+n+(e%2?" ":"")},Uf=function(t){return t>=32&&t<126?String.fromCharCode(t):"."},Bf=function(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];ArrayBuffer.isView(r)?e[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:e[n]=r}),e},Ff=function(t){var e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")},Gf=function(t){for(var e=Array.prototype.slice.call(t),n="",r=void 0,i=void 0,o=0;o<e.length/16;o++)r=e.slice(16*o,16*o+16).map(Nf).join(""),i=e.slice(16*o,16*o+16).map(Uf).join(""),n+=r+" "+i+"\n";return n},zf=function(t){var e=t.bytes;return Gf(e)},Vf=function(t){var e="",n=void 0;for(n=0;n<t.length;n++)e+=Pf(t,n)+" ";return e},Hf=Object.freeze({createTransferableMessage:Bf,initSegmentId:Ff,hexDump:Gf,tagDump:zf,textRanges:Vf}),Wf=function(t,e){var n=[],r=void 0;if(t&&t.length)for(r=0;r<t.length;r++)e(t.start(r),t.end(r))&&n.push([t.start(r),t.end(r)]);return le.createTimeRanges(n)},Qf=function(t,e){return Wf(t,function(t,n){return t-1/30<=e&&n+1/30>=e})},Yf=function(t,e){return Wf(t,function(t){return t-1/30>=e})},qf=function(t){if(t.length<2)return le.createTimeRanges();for(var e=[],n=1;n<t.length;n++){var r=t.end(n-1),i=t.start(n);e.push([r,i])}return le.createTimeRanges(e)},Kf=function(t){var e=[];if(!t||!t.length)return"";for(var n=0;n<t.length;n++)e.push(t.start(n)+" => "+t.end(n));return e.join(", ")},Xf=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return((t.length?t.end(t.length-1):0)-e)/n},Zf=function(t){for(var e=[],n=0;n<t.length;n++)e.push({start:t.start(n),end:t.end(n)});return e},Jf=function(t,e,n){var r=e.player_;if(n.captions&&n.captions.length){t.inbandTextTracks_||(t.inbandTextTracks_={});for(var i in n.captionStreams)if(!t.inbandTextTracks_[i]){r.tech_.trigger({type:"usage",name:"hls-608"});var o=r.textTracks().getTrackById(i);t.inbandTextTracks_[i]=o||r.addRemoteTextTrack({kind:"captions",id:i,label:i},!1).track}}n.metadata&&n.metadata.length&&!t.metadataTrack_&&(t.metadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,t.metadataTrack_.inBandMetadataTrackDispatchType=n.metadata.dispatchType)},$f=function(t,e,n){var r=void 0,i=void 0;if(n&&n.cues)for(r=n.cues.length;r--;)i=n.cues[r],i.startTime<=e&&i.endTime>=t&&n.removeCue(i)},tp=function(t){Object.defineProperties(t.frame,{id:{get:function(){return le.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return le.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return le.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})},ep=function(t){return isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t},np=function(t,e,n){var r=_e.WebKitDataCue||_e.VTTCue;if(e&&e.forEach(function(t){var e=t.stream;this.inbandTextTracks_[e].addCue(new r(t.startTime+this.timestampOffset,t.endTime+this.timestampOffset,t.text))},t),n){var i=ep(t.mediaSource_.duration);if(n.forEach(function(t){var e=t.cueTime+this.timestampOffset;t.frames.forEach(function(t){var n=new r(e,e,t.value||t.url||t.data||"");n.frame=t,n.value=t,tp(n),this.metadataTrack_.addCue(n)},this)},t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){for(var o=t.metadataTrack_.cues,a=[],s=0;s<o.length;s++)o[s]&&a.push(o[s]);var u=a.reduce(function(t,e){var n=t[e.startTime]||[];return n.push(e),t[e.startTime]=n,t},{}),l=Object.keys(u).sort(function(t,e){return Number(t)-Number(e)});l.forEach(function(t,e){var n=u[t],r=Number(l[e+1])||i;n.forEach(function(t){t.endTime=r})})}}},rp="undefined"!=typeof window?window:{},ip="undefined"==typeof Symbol?"__target":Symbol(),op="application/javascript",ap=rp.BlobBuilder||rp.WebKitBlobBuilder||rp.MozBlobBuilder||rp.MSBlobBuilder,sp=rp.URL||rp.webkitURL||sp&&sp.msURL,up=rp.Worker;if(up){var lp,cp=fe("self.onmessage = function () {}"),dp=new Uint8Array(1);try{lp=new up(cp),lp.postMessage(dp,[dp.buffer])}catch(t){up=null}finally{sp.revokeObjectURL(cp),lp&&lp.terminate()}}var hp=new he("./transmuxer-worker.worker.js",function(t,e){var n=this;!function(){var t,e,r,i,o,a,s,u,l,c,d,h,f,p,v,m,g,y,A,_,b,T,S,E,w,k,C,L,I,x,R,O,D,M,j,P,N=Math.pow(2,32)-1;!function(){var t;if(S={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(t in S)S.hasOwnProperty(t)&&(S[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),k=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),w=new Uint8Array([0,0,0,1]),C=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]),L=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]),I={video:C,audio:L},O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),R=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),M=D,j=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),P=D,x=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(t){var e,n,r,i=[],o=0;for(e=1;e<arguments.length;e++)i.push(arguments[e]);for(e=i.length;e--;)o+=i[e].byteLength;for(n=new Uint8Array(o+8),r=new DataView(n.buffer,n.byteOffset,n.byteLength),r.setUint32(0,n.byteLength),n.set(t,4),e=0,o=8;e<i.length;e++)n.set(i[e],o),o+=i[e].byteLength;return n},e=function(){return t(S.dinf,t(S.dref,O))},r=function(e){return t(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},i=function(){return t(S.ftyp,E,w,E,k)},m=function(e){return t(S.hdlr,I[e])},o=function(e){return t(S.mdat,e)},v=function(e){var n=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&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(S.mdhd,n)},p=function(e){return t(S.mdia,v(e),m(e.type),s(e))},a=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},s=function(n){return t(S.minf,"video"===n.type?t(S.vmhd,x):t(S.smhd,R),e(),y(n))},u=function(e,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return t.apply(null,[S.moof,a(e)].concat(r))},l=function(e){for(var n=e.length,r=[];n--;)r[n]=h(e[n]);return t.apply(null,[S.moov,d(4294967295)].concat(r).concat(c(e)))},c=function(e){for(var n=e.length,r=[];n--;)r[n]=b(e[n]);return t.apply(null,[S.mvex].concat(r))},d=function(e){var n=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 t(S.mvhd,n)},g=function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,o)},y=function(e){return t(S.stbl,A(e),t(S.stts,P),t(S.stsc,M),t(S.stsz,j),t(S.stco,D))},function(){var e,n;A=function(r){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===r.type?e(r):n(r))},e=function(e){var n,r=e.sps||[],i=e.pps||[],o=[],a=[];for(n=0;n<r.length;n++)o.push((65280&r[n].byteLength)>>>8),o.push(255&r[n].byteLength),o=o.concat(Array.prototype.slice.call(r[n]));for(n=0;n<i.length;n++)a.push((65280&i[n].byteLength)>>>8),a.push(255&i[n].byteLength),a=a.concat(Array.prototype.slice.call(i[n]));return t(S.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]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length]).concat(o).concat([i.length]).concat(a))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},n=function(e){return t(S.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]),r(e))}}(),f=function(e){var n=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 t(S.tkhd,n)},_=function(e){var n,r,i,o,a,s,u;return n=t(S.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])),s=Math.floor(e.baseMediaDecodeTime/(N+1)),u=Math.floor(e.baseMediaDecodeTime%(N+1)),r=t(S.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,u>>>24&255,u>>>16&255,u>>>8&255,255&u])),a=92,"audio"===e.type?(i=T(e,a),t(S.traf,n,r,i)):(o=g(e),i=T(e,o.length+a),t(S.traf,n,r,i,o))},h=function(e){return e.duration=e.duration||4294967295,t(S.trak,f(e),p(e))},b=function(e){var n=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&&(n[n.length-1]=0),t(S.trex,n)},function(){var e,n,r;r=function(t,e){var n=0,r=0,i=0,o=0;return t.length&&(void 0!==t[0].duration&&(n=1),void 0!==t[0].size&&(r=2),void 0!==t[0].flags&&(i=4),void 0!==t[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},n=function(e,n){var i,o,a,s;for(o=e.samples||[],n+=20+16*o.length,i=r(o,n),s=0;s<o.length;s++)a=o[s],i=i.concat([(4278190080&a.duration)>>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size,a.flags.isLeading<<2|a.flags.dependsOn,a.flags.isDependedOn<<6|a.flags.hasRedundancy<<4|a.flags.paddingValue<<1|a.flags.isNonSyncSample,61440&a.flags.degradationPriority,15&a.flags.degradationPriority,(4278190080&a.compositionTimeOffset)>>>24,(16711680&a.compositionTimeOffset)>>>16,(65280&a.compositionTimeOffset)>>>8,255&a.compositionTimeOffset]);return t(S.trun,new Uint8Array(i))},e=function(e,n){var i,o,a,s;for(o=e.samples||[],n+=20+8*o.length,i=r(o,n),s=0;s<o.length;s++)a=o[s],i=i.concat([(4278190080&a.duration)>>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size]);return t(S.trun,new Uint8Array(i))},T=function(t,r){return"audio"===t.type?e(t,r):n(t,r)}}();var U,B,F,G,z,V={ftyp:i,mdat:o,moof:u,moov:l,initSegment:function(t){var e,n=i(),r=l(t);return e=new Uint8Array(n.byteLength+r.byteLength),e.set(n),e.set(r,n.byteLength),e}},H=function(t){return t>>>0},W={toUnsigned:H},Q=W.toUnsigned;U=function(t,e){var n,r,i,o,a,s=[];if(!e.length)return null;for(n=0;n<t.byteLength;)r=Q(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),i=B(t.subarray(n+4,n+8)),o=r>1?n+r:t.byteLength,i===e[0]&&(1===e.length?s.push(t.subarray(n+8,o)):(a=U(t.subarray(n+8,o),e.slice(1)),a.length&&(s=s.concat(a)))),n=o;return s},B=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},F=function(t){var e={};return U(t,["moov","trak"]).reduce(function(t,e){var n,r,i,o,a;return(n=U(e,["tkhd"])[0])?(r=n[0],i=0===r?12:20,o=Q(n[i]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=U(e,["mdia","mdhd"])[0])?(r=a[0],i=0===r?12:20,t[o]=Q(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),t):null):null},e)},G=function(t,e){var n,r,i;return n=U(e,["moof","traf"]),r=[].concat.apply([],n.map(function(e){return U(e,["tfhd"]).map(function(n){var r,i,o;return r=Q(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=t[r]||9e4,o=U(e,["tfdt"]).map(function(t){var e,n;return e=t[0],n=Q(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(n*=Math.pow(2,32),n+=Q(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),n})[0],(o=o||1/0)/i})})),i=Math.min.apply(null,r),isFinite(i)?i:0},z=function(t){var e=U(t,["moov","trak"]),n=[];return e.forEach(function(t){var e=U(t,["mdia","hdlr"]),r=U(t,["tkhd"]);e.forEach(function(t,e){var i,o,a,s=B(t.subarray(8,12)),u=r[e];"vide"===s&&(i=new DataView(u.buffer,u.byteOffset,u.byteLength),o=i.getUint8(0),a=0===o?i.getUint32(12):i.getUint32(20),n.push(a))})}),n};var Y={findBox:U,parseType:B,timescale:F,startTime:G,videoTrackIds:z},q=function(){this.init=function(){var t={};this.on=function(e,n){t[e]||(t[e]=[]),t[e]=t[e].concat(n)},this.off=function(e,n){var r;return!!t[e]&&(r=t[e].indexOf(n),t[e]=t[e].slice(),t[e].splice(r,1),r>-1)},this.trigger=function(e){var n,r,i,o;if(n=t[e])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){t={}}}};q.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),t},q.prototype.push=function(t){this.trigger("data",t)},q.prototype.flush=function(t){this.trigger("done",t)};var K=q,X=function(t){var e,n,r=[],i=[];for(r.byteLength=0,e=0;e<t.length;e++)n=t[e],"access_unit_delimiter_rbsp"===n.nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.push(r)),r=[n],r.byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.push(r),i},Z=function(t){var e,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=t[0].pts,r.dts=t[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=t[0].pts,i.dts=t[0].dts,e=0;e<t.length;e++)n=t[e],n.keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),r=[n],r.nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},J=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},$=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},tt=function(t,e){var n=$();return n.dataOffset=e,n.compositionTimeOffset=t.pts-t.dts,n.duration=t.duration,n.size=4*t.length,n.size+=t.byteLength,t.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},et=function(t,e){var n,r,i,o,a,s=e||0,u=[];for(n=0;n<t.length;n++)for(o=t[n],r=0;r<o.length;r++)a=o[r],i=tt(a,s),s+=i.size,u.push(i);return u},nt=function(t){var e,n,r,i,o,a,s=0,u=t.byteLength,l=t.nalCount,c=u+4*l,d=new Uint8Array(c),h=new DataView(d.buffer);for(e=0;e<t.length;e++)for(i=t[e],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],h.setUint32(s,a.data.byteLength),s+=4,d.set(a.data,s),s+=a.data.byteLength;return d},rt={groupNalsIntoFrames:X,groupFramesIntoGops:Z,extendFirstKeyFrame:J,generateSampleTable:et,concatenateNalData:nt},it=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},ot=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},at=function(t,e){var n,r,i=t.minSegmentDts;return e||(i-=t.timelineStartInfo.dts),n=t.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===t.type&&(r=t.samplerate/9e4,n*=r,n=Math.floor(n)),n},st={clearDtsInfo:ot,calculateTrackBaseMediaDecodeTime:at,collectDtsInfo:it},ut=function(t){for(var e=0,n={payloadType:-1,payloadSize:0},r=0,i=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)r+=255,e++;for(r+=t[e++];255===t[e];)i+=255,e++;if(i+=t[e++],!n.payload&&4===r){n.payloadType=r,n.payloadSize=i,n.payload=t.subarray(e,e+i);break}e+=i,r=0,i=0}return n},lt=function(t){return 181!==t.payload[0]?null:49!=(t.payload[1]<<8|t.payload[2])?null:"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])?null:3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},ct=function(t,e){var n,r,i,o,a=[];if(!(64&e[0]))return a;for(r=31&e[0],n=0;n<r;n++)i=3*n,o={type:3&e[i+2],pts:t},4&e[i+2]&&(o.ccData=e[i+3]<<8|e[i+4],a.push(o));return a},dt=function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n},ht={parseSei:ut,parseUserData:lt,parseCaptionPackets:ct,discardEmulationPreventionBytes:dt,USER_DATA_REGISTERED_ITU_T_T35:4},ft=function t(){t.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new yt(0,0),new yt(0,1),new yt(1,0),new yt(1,1)],this.reset(),this.ccStreams_.forEach(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))},this)};ft.prototype=new K,ft.prototype.push=function(t){var e,n,r;if("sei_rbsp"===t.nalUnitType&&(e=ht.parseSei(t.escapedRBSP),e.payloadType===ht.USER_DATA_REGISTERED_ITU_T_T35&&(n=ht.parseUserData(e)))){if(t.dts<this.latestDts_)return void(this.ignoreNextEqualDts_=!0);if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return void(--this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=ht.parseCaptionPackets(t.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},ft.prototype.flush=function(){if(!this.captionPackets_.length)return void this.ccStreams_.forEach(function(t){t.flush()},this);this.captionPackets_.forEach(function(t,e){t.presortIndex=e}),this.captionPackets_.sort(function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts}),this.captionPackets_.forEach(function(t){t.type<2&&this.dispatchCea608Packet(t)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(t){t.flush()},this)},ft.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(t){t.reset()})},ft.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},ft.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},ft.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};var pt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},vt=function(t){return null===t?"":(t=pt[t]||t,String.fromCharCode(t))},mt=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],gt=function(){for(var t=[],e=15;e--;)t.push("");return t},yt=function t(e,n){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,n,r,i,o;if((e=32639&t.ccData)===this.lastControlCode_)return void(this.lastControlCode_=null);if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),r=e>>>8,i=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=gt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=gt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=gt()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(r,i))r=(3&r)<<8,o=vt(r|i),this[this.mode_](t.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),r=(3&r)<<8,o=vt(r|i),this[this.mode_](t.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&i)&&this.addFormatting(t.pts,["i"]),1==(1&i)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=mt.indexOf(7968&e);"rollUp"===this.mode_&&this.setRollUp(t.pts,a),a!==this.row_&&(this.clearFormatting(t.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=vt(r),o+=vt(i),this[this.mode_](t.pts,o),this.column_+=o.length)}};yt.prototype=new K,yt.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){return t.trim()}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},yt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=gt(),this.nonDisplayed_=gt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},yt.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_},yt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},yt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},yt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},yt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=33&&e<=35},yt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},yt.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},yt.prototype.isNormalChar=function(t){return t>=32&&t<=127},yt.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=gt(),this.displayed_=gt()),void 0!==e&&e!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[e-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},yt.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var n=e.reduce(function(t,e){return t+"<"+e+">"},"");this[this.mode_](t,n)},yt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+"</"+e+">"},"");this.formatting_=[],this[this.mode_](t,e)}},yt.prototype.popOn=function(t,e){var n=this.nonDisplayed_[this.row_];n+=e,this.nonDisplayed_[this.row_]=n},yt.prototype.rollUp=function(t,e){var n=this.displayed_[this.row_];n+=e,this.displayed_[this.row_]=n},yt.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},yt.prototype.paintOn=function(t,e){var n=this.displayed_[this.row_];n+=e,this.displayed_[this.row_]=n};var At={CaptionStream:ft,Cea608Stream:yt},_t={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},bt=function(t,e){var n=1;for(t>e&&(n=-1);Math.abs(e-t)>4294967296;)t+=8589934592*n;return t},Tt=function t(e){var n,r;t.prototype.init.call(this),this.type_=e,this.push=function(t){t.type===this.type_&&(void 0===r&&(r=t.dts),t.dts=bt(t.dts,r),t.pts=bt(t.pts,r),n=t.dts,this.trigger("data",t))},this.flush=function(){r=n,this.trigger("done")},this.discontinuity=function(){r=void 0,n=void 0}};Tt.prototype=new K;var St,Et={TimestampRolloverStream:Tt,handleRollover:bt},wt=function(t,e,n){var r,i="";for(r=e;r<n;r++)i+="%"+("00"+t[r].toString(16)).slice(-2);return i},kt=function(t,e,n){return decodeURIComponent(wt(t,e,n))},Ct=function(t,e,n){return unescape(wt(t,e,n))},Lt=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},It={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=kt(t.data,1,e),t.value=kt(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=kt(t.data,1,e),t.url=kt(t.data,e+1,t.data.length);break}},PRIV:function(t){var e;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=Ct(t.data,0,e);break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};St=function(t){var e,n={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},r=0,i=[],o=0;if(St.prototype.init.call(this),this.dispatchType=_t.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(e=0;e<n.descriptor.length;e++)this.dispatchType+=("00"+n.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,a,s,u,l,c;if("timed-metadata"===t.type){if(t.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))return void(n.debug&&console.log("Skipping unrecognized metadata packet"));if(i.push(t),o+=t.data.byteLength,1===i.length&&(r=Lt(t.data.subarray(6,10)),r+=10),!(o<r)){for(e={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)e.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&e.data[5]&&(a+=4,a+=Lt(e.data.subarray(10,14)),r-=Lt(e.data.subarray(16,20)));do{if((s=Lt(e.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if(c=String.fromCharCode(e.data[a],e.data[a+1],e.data[a+2],e.data[a+3]),u={id:c,data:e.data.subarray(a+10,a+s+10)},u.key=u.id,It[u.id]&&(It[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var d=u.data,h=(1&d[3])<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;h*=4,h+=3&d[7],u.timeStamp=h,void 0===e.pts&&void 0===e.dts&&(e.pts=u.timeStamp,e.dts=u.timeStamp),this.trigger("timestamp",u)}e.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",e)}}}},St.prototype=new K;var xt,Rt,Ot,Dt=St,Mt=Et.TimestampRolloverStream;xt=function(){var t=new Uint8Array(188),e=0;xt.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(e?(r=new Uint8Array(n.byteLength+e),r.set(t.subarray(0,e)),r.set(n,e),e=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(t.set(r.subarray(i),0),e=r.byteLength-i)},this.flush=function(){188===e&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")}},xt.prototype=new K,Rt=function(){var t,e,n,r;Rt.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,r){var i=0;r.payloadUnitStartIndicator&&(i+=t[i]+1),"pat"===r.type?e(t.subarray(i),r):n(t.subarray(i),r)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],r.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=r.pmtPid},n=function(t,e){var n,i,o,a;if(1&t[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=(15&t[1])<<8|t[2],i=3+n-4,o=(15&t[10])<<8|t[11],a=12+o;a<i;){var s=t[a],u=(31&t[a+1])<<8|t[a+2];s===_t.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=u:s===_t.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=u:s===_t.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][u]=s),a+=5+((15&t[a+3])<<8|t[a+4])}e.programMapTable=r.programMapTable}},this.push=function(e){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&e[1]),n.pid=31&e[1],n.pid<<=8,n.pid|=e[2],(48&e[3])>>>4>1&&(r+=e[r]+1),0===n.pid)n.type="pat",t(e.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",t(e.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,r,n]):this.processPes_(e,r,n)},this.processPes_=function(t,e,n){n.pid===this.programMapTable.video?n.streamType=_t.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=_t.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=t.subarray(e),this.trigger("data",n)}},Rt.prototype=new K,Rt.STREAM_TYPES={h264:27,adts:15},Ot=function(){var t=this,e={data:[],size:0},n={data:[],size:0},r={data:[],size:0},i=function(t,e){var n;e.packetLength=6+(t[4]<<8|t[5]),e.dataAlignmentIndicator=0!=(4&t[6]),n=t[7],192&n&&(e.pts=(14&t[9])<<27|(255&t[10])<<20|(254&t[11])<<12|(255&t[12])<<5|(254&t[13])>>>3,e.pts*=4,e.pts+=(6&t[13])>>>1,e.dts=e.pts,64&n&&(e.dts=(14&t[14])<<27|(255&t[15])<<20|(254&t[16])<<12|(255&t[17])<<5|(254&t[18])>>>3,e.dts*=4,e.dts+=(6&t[18])>>>1)),e.data=t.subarray(9+t[8])},o=function(e,n,r){var o,a=new Uint8Array(e.size),s={type:n},u=0,l=0,c=!1;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,u=0;u<e.data.length;u++)o=e.data[u],a.set(o.data,l),l+=o.data.byteLength;i(a,s),c="video"===n||s.packetLength<=e.size,(r||c)&&(e.size=0,e.data.length=0),c&&t.trigger("data",s)}};Ot.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,a;switch(i.streamType){case _t.H264_STREAM_TYPE:case _t.H264_STREAM_TYPE:t=e,a="video";break;case _t.ADTS_STREAM_TYPE:t=n,a="audio";break;case _t.METADATA_STREAM_TYPE:t=r,a="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&o(t,a,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]},n=i.programMapTable;null!==n.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),t.trigger("data",e)}})[i.type]()},this.flush=function(){o(e,"video"),o(n,"audio"),o(r,"timed-metadata"),this.trigger("done")}},Ot.prototype=new K;var jt={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:xt,TransportParseStream:Rt,ElementaryStream:Ot,TimestampRolloverStream:Mt,CaptionStream:At.CaptionStream,Cea608Stream:At.Cea608Stream,MetadataStream:Dt};for(var Pt in _t)_t.hasOwnProperty(Pt)&&(jt[Pt]=_t[Pt]);var Nt,Ut=jt,Bt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Nt=function(){var t;Nt.prototype.init.call(this),this.push=function(e){var n,r,i,o,a,s,u=0,l=0;if("audio"===e.type)for(t?(o=t,t=new Uint8Array(o.byteLength+e.data.byteLength),t.set(o),t.set(e.data,o.byteLength)):t=e.data;u+5<t.length;)if(255===t[u]&&240==(246&t[u+1])){if(r=2*(1&~t[u+1]),n=(3&t[u+3])<<11|t[u+4]<<3|(224&t[u+5])>>5,a=1024*(1+(3&t[u+6])),s=9e4*a/Bt[(60&t[u+2])>>>2],i=u+n,t.byteLength<i)return;if(this.trigger("data",{pts:e.pts+l*s,dts:e.dts+l*s,sampleCount:a,audioobjecttype:1+(t[u+2]>>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:Bt[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+r,i)}),t.byteLength===i)return void(t=void 0);l++,t=t.subarray(i)}else u++},this.flush=function(){this.trigger("done")}},Nt.prototype=new K;var Ft,Gt=Nt;Ft=function(t){var e=t.byteLength,n=0,r=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+r},this.loadWord=function(){var i=t.byteLength-e,o=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");o.set(t.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,e-=a},this.skipBits=function(t){var i;r>t?(n<<=t,r-=t):(t-=r,i=Math.floor(t/8),t-=8*i,e-=i,this.loadWord(),n<<=t,r-=t)},this.readBits=function(t){var i=Math.min(r,t),o=n>>>32-i;return r-=i,r>0?n<<=i:e>0&&this.loadWord(),i=t-i,i>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var t;for(t=0;t<r;++t)if(0!=(n&2147483648>>>t))return n<<=t,r-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var zt,Vt,Ht,Wt=Ft;Vt=function(){var t,e,n=0;Vt.prototype.init.call(this),this.push=function(r){var i;for(e?(i=new Uint8Array(e.byteLength+r.data.byteLength),i.set(e),i.set(r.data,e.byteLength),e=i):e=r.data;n<e.byteLength-3;n++)if(1===e[n+2]){t=n+5;break}for(;t<e.byteLength;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}n+3!==t-2&&this.trigger("data",e.subarray(n+3,t-2));do{t++}while(1!==e[t]&&t<e.length);n=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(n+3,t-2)),n=t-2,t+=3;break;default:t+=3}e=e.subarray(n),t-=n,n=0},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(n+3)),e=null,n=0,this.trigger("done")}},Vt.prototype=new K,Ht={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},zt=function(){var t,e,n,r,i,o,a,s=new Vt;zt.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,n=t.pts,r=t.dts,s.push(t))},s.on("data",function(a){var s={trackId:e,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",s)}),s.on("done",function(){t.trigger("done")}),this.flush=function(){s.flush()},a=function(t,e){var n,r,i=8,o=8;for(n=0;n<t;n++)0!==o&&(r=e.readExpGolomb(),o=(i+r+256)%256),i=0===o?i:o},i=function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n},o=function(t){var e,n,r,i,o,s,u,l,c,d,h,f,p,v=0,m=0,g=0,y=0,A=1;if(e=new Wt(t),n=e.readUnsignedByte(),i=e.readUnsignedByte(),r=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),Ht[n]&&(o=e.readUnsignedExpGolomb(),3===o&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==o?8:12,p=0;p<h;p++)e.readBoolean()&&(p<6?a(16,e):a(64,e));if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),u=e.readUnsignedExpGolomb(),p=0;p<u;p++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),l=e.readUnsignedExpGolomb(),c=e.readUnsignedExpGolomb(),d=e.readBits(1),0===d&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(v=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:f=[1,1];break;case 2:f=[12,11];break;case 3:f=[10,11];break;case 4:f=[16,11];break;case 5:f=[40,33];break;case 6:f=[24,11];break;case 7:f=[20,11];break;case 8:f=[32,11];break;case 9:f=[80,33];break;case 10:f=[18,11];break;case 11:f=[15,11];break;case 12:f=[64,33];break;case 13:f=[160,99];break;case 14:f=[4,3];break;case 15:f=[3,2];break;case 16:f=[2,1];break;case 255:f=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}f&&(A=f[0]/f[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*v-2*m)*A),height:(2-d)*(c+1)*16-2*g-2*y}}},zt.prototype=new K;var Qt,Yt={H264Stream:zt,NalByteStream:Vt};Qt=function(){var t=new Uint8Array,e=0;Qt.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.parseId3TagSize=function(t,e){var n=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?n+20:n+10},this.parseAdtsSize=function(t,e){var n=(224&t[e+5])>>5,r=t[e+4]<<3;return 6144&t[e+3]|r|n},this.push=function(n){var r,i,o,a,s=0,u=0;for(t.length?(a=t.length,t=new Uint8Array(n.byteLength+a),t.set(t.subarray(0,a)),t.set(n,a)):t=n;t.length-u>=3;)if(t[u]!=="I".charCodeAt(0)||t[u+1]!=="D".charCodeAt(0)||t[u+2]!=="3".charCodeAt(0))if(!0&t[u]&&240==(240&t[u+1])){if(t.length-u<7)break;if((s=this.parseAdtsSize(t,u))>t.length)break;o={type:"audio",data:t.subarray(u,u+s),pts:e,dts:e},this.trigger("data",o),u+=s}else u++;else{if(t.length-u<10)break;if((s=this.parseId3TagSize(t,u))>t.length)break;i={type:"timed-metadata",data:t.subarray(u,u+s)},this.trigger("data",i),u+=s}r=t.length-u,t=r>0?t.subarray(u):new Uint8Array}},Qt.prototype=new K;var qt,Kt,Xt,Zt,Jt,$t,te=Qt,ee=[33,16,5,32,164,27],ne=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=function(t){for(var e=[];t--;)e.push(0);return e},ie={96e3:[ee,[227,64],re(154),[56]],88200:[ee,[231],re(170),[56]],64e3:[ee,[248,192],re(240),[56]],48e3:[ee,[255,192],re(268),[55,148,128],re(54),[112]],44100:[ee,[255,192],re(268),[55,163,128],re(84),[112]],32e3:[ee,[255,192],re(268),[55,234],re(226),[112]],24e3:[ee,[255,192],re(268),[55,255,128],re(268),[111,112],re(126),[224]],16e3:[ee,[255,192],re(268),[55,255,128],re(268),[111,255],re(269),[223,108],re(195),[1,192]],12e3:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,253,128],re(259),[56]],11025:[ne,re(268),[3,127,248],re(268),[6,255,240],re(268),[13,255,224],re(268),[27,255,192],re(268),[55,175,128],re(108),[112]],8e3:[ne,re(268),[3,121,16],re(47),[7]]},oe=function(t){return Object.keys(t).reduce(function(e,n){return e[n]=new Uint8Array(t[n].reduce(function(t,e){return t.concat(e)},[])),e},{})}(ie);qt=function(t){return 9e4*t},Kt=function(t,e){return t*e},Xt=function(t){return t/9e4},Zt=function(t,e){return t/e},Jt=function(t,e){return qt(Zt(t,e))},$t=function(t,e){return Kt(Xt(t),e)};var ae,se,ue,le,ce,de,he,fe={secondsToVideoTs:qt,secondsToAudioTs:Kt,videoTsToSeconds:Xt,audioTsToSeconds:Zt,audioTsToVideoTs:Jt,videoTsToAudioTs:$t},pe=Yt.H264Stream,ve=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],me=["width","height","profileIdc","levelIdc","profileCompatibility"];ce=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},de=function(t,e){var n;if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},he=function(t){var e,n,r=0;for(e=0;e<t.length;e++)n=t[e],r+=n.data.byteLength;return r},se=function(t,e){var n=[],r=0,i=0,o=0,a=1/0;e=e||{},se.prototype.init.call(this),this.push=function(e){st.collectDtsInfo(t,e),t&&ve.forEach(function(n){t[n]=e[n]}),n.push(e)},this.setEarliestDts=function(e){i=e-t.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){a=t},this.setAudioAppendStart=function(t){o=t},this.flush=function(){var i,o,a,s;if(0===n.length)return void this.trigger("done","AudioSegmentStream");i=this.trimAdtsFramesByEarliestDts_(n),t.baseMediaDecodeTime=st.calculateTrackBaseMediaDecodeTime(t,e.keepOriginalTimestamps),this.prefixWithSilence_(t,i),t.samples=this.generateSampleTable_(i),a=V.mdat(this.concatenateFrameData_(i)),n=[],o=V.moof(r,[t]),s=new Uint8Array(o.byteLength+a.byteLength),r++,s.set(o),s.set(a,o.byteLength),st.clearDtsInfo(t),this.trigger("data",{track:t,boxes:s}),this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(t,e){var n,r,i,s=0,u=0,l=0,c=0;if(e.length&&(n=fe.audioTsToVideoTs(t.baseMediaDecodeTime,t.samplerate),s=Math.ceil(9e4/(t.samplerate/1024)),o&&a&&(u=n-Math.max(o,a),l=Math.floor(u/s),c=l*s),!(l<1||c>45e3))){for(r=oe[t.samplerate],r||(r=e[0].data),i=0;i<l;i++)e.splice(i,0,{data:r});t.baseMediaDecodeTime-=Math.floor(fe.videoTsToAudioTs(c,t.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(e){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},this.generateSampleTable_=function(t){var e,n,r=[];for(e=0;e<t.length;e++)n=t[e],r.push({size:n.data.byteLength,duration:1024});return r},this.concatenateFrameData_=function(t){var e,n,r=0,i=new Uint8Array(he(t));for(e=0;e<t.length;e++)n=t[e],i.set(n.data,r),r+=n.data.byteLength;return i}},se.prototype=new K,ae=function(t,e){var n,r,i=0,o=[],a=[];e=e||{},ae.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){st.collectDtsInfo(t,e),"seq_parameter_set_rbsp"!==e.nalUnitType||n||(n=e.config,t.sps=[e.data],me.forEach(function(e){t[e]=n[e]},this)),"pic_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,t.pps=[e.data]),o.push(e)},this.flush=function(){for(var n,r,s,u,l,c;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=rt.groupNalsIntoFrames(o),s=rt.groupFramesIntoGops(n),s[0][0].keyFrame||(r=this.getGopForFusion_(o[0],t),r?(s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=rt.extendFirstKeyFrame(s)),a.length){var d;if(!(d=e.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");st.clearDtsInfo(t),s=d}st.collectDtsInfo(t,s),t.samples=rt.generateSampleTable(s),l=V.mdat(rt.concatenateNalData(s)),t.baseMediaDecodeTime=st.calculateTrackBaseMediaDecodeTime(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map(function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}})),this.gopCache_.unshift({gop:s.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),u=V.moof(i,[t]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:t,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){st.clearDtsInfo(t),n=void 0,r=void 0},this.getGopForFusion_=function(e){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)o=this.gopCache_[a],i=o.gop,t.pps&&de(t.pps[0],o.pps[0])&&t.sps&&de(t.sps[0],o.sps[0])&&(i.dts<t.timelineStartInfo.dts||(n=e.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(t){var e,n,r,i,o,s,u,l;for(o=t.byteLength,s=t.nalCount,u=t.duration,e=n=0;e<a.length&&n<t.length&&(r=a[e],i=t[n],r.pts!==i.pts);)i.pts>r.pts?e++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?t:n===t.length?null:(l=t.slice(n),l.byteLength=o,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(t){var e,n,r,i,o,s;for(e=a.length-1,n=t.length-1,o=null,s=!1;e>=0&&n>=0;){if(r=a[e],i=t[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?e--:(e===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;var u;if(0===(u=s?n:o))return t;var l=t.slice(u),c=l.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(t){a=t}},ae.prototype=new K,le=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,le.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}},le.prototype=new K,le.prototype.flush=function(t){var e,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return void(++this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,me.forEach(function(t){a.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,ve.forEach(function(t){a.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=V.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)e=this.pendingCaptions[i],e.startTime=e.startPts-s,e.startTime/=9e4,e.endTime=e.endPts-s,e.endTime/=9e4,a.captionStreams[e.stream]=!0,a.captions.push(e);for(i=0;i<this.pendingMetadata.length;i++)n=this.pendingMetadata[i],n.cueTime=n.pts-s,n.cueTime/=9e4,a.metadata.push(n);a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},ue=function(t){var e,n,r=this,i=!0;ue.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};this.transmuxPipeline_=e,e.type="aac",e.metadataStream=new Ut.MetadataStream,e.aacStream=new te,e.audioTimestampRolloverStream=new Ut.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new Ut.TimestampRolloverStream("timed-metadata"),e.adtsStream=new Gt,e.coalesceStream=new le(t,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(i){"timed-metadata"!==i.type||e.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new se(n,t),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new Ut.MetadataStream,i.packetStream=new Ut.TransportPacketStream,i.parseStream=new Ut.TransportParseStream,i.elementaryStream=new Ut.ElementaryStream,i.videoTimestampRolloverStream=new Ut.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Ut.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Ut.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Gt,i.h264Stream=new pe,i.captionStream=new Ut.CaptionStream,i.coalesceStream=new le(t,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)e||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||(n=o.tracks[a],n.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(e=o.tracks[a],e.timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime);e&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new ae(e,t),i.videoSegmentStream.on("timelineStartInfo",function(t){n&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new se(n,t),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var r=this.transmuxPipeline_;this.baseMediaDecodeTime=t,n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,st.clearDtsInfo(n),n.timelineStartInfo.baseMediaDecodeTime=t,r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),e&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[],r.videoTimestampRolloverStream.discontinuity()),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,st.clearDtsInfo(e),r.captionStream.reset(),e.timelineStartInfo.baseMediaDecodeTime=t),r.timedMetadataTimestampRolloverStream&&r.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){e&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=ce(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ue.prototype=new K;var ge,ye,Ae={Transmuxer:ue,VideoSegmentStream:ae,AudioSegmentStream:se,AUDIO_PROPERTIES:ve,VIDEO_PROPERTIES:me},_e=Y.parseType,be=function(t){return new Date(1e3*t-20828448e5)},Te=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},Se=function(t){var e,n,r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=[];for(e=0;e+4<t.length;e+=n)if(n=r.getUint32(e),e+=4,n<=0)i.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&t[e]){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+t[e]&31)}return i},Ee={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:ge(t.subarray(78,t.byteLength))}},avcC:function(t){var e,n,r,i,o=new DataView(t.buffer,t.byteOffset,t.byteLength),a={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},s=31&t[5];for(r=6,i=0;i<s;i++)n=o.getUint16(r),r+=2,a.sps.push(new Uint8Array(t.subarray(r,r+n))),r+=n;for(e=t[r],r++,i=0;i<e;i++)n=o.getUint16(r),r+=2,a.pps.push(new Uint8Array(t.subarray(r,r+n))),r+=n;return a},btrt:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:e.getUint32(0),maxBitrate:e.getUint32(4),avgBitrate:e.getUint32(8)}},esds:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:31&t[8],decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={majorBrand:_e(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},r=8;r<t.byteLength;)n.compatibleBrands.push(_e(t.subarray(r,r+4))),r+=4;return n},dinf:function(t){return{boxes:ge(t)}},dref:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:ge(t.subarray(8))}},hdlr:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:_e(t.subarray(8,12)),name:""},r=8;for(r=24;r<t.byteLength;r++){if(0===t[r]){r++;break}n.name+=String.fromCharCode(t[r])}return n.name=decodeURIComponent(escape(n.name)),n},mdat:function(t){return{byteLength:t.byteLength,nals:Se(t)}},mdhd:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=4,i={version:n.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===i.version?(r+=4,i.creationTime=be(n.getUint32(r)),r+=8,i.modificationTime=be(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=8,i.duration=n.getUint32(r)):(i.creationTime=be(n.getUint32(r)),r+=4,i.modificationTime=be(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=4,i.duration=n.getUint32(r)),r+=4,e=n.getUint16(r),i.language+=String.fromCharCode(96+(e>>10)),i.language+=String.fromCharCode(96+((992&e)>>5)),i.language+=String.fromCharCode(96+(31&e)),i},mdia:function(t){return{boxes:ge(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:ge(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return t.byteLength>28&&(n.streamDescriptor=ge(t.subarray(28))[0]),n},moof:function(t){return{boxes:ge(t)}},moov:function(t){return{boxes:ge(t)}},mvex:function(t){return{boxes:ge(t)}},mvhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=be(e.getUint32(n)),n+=8,r.modificationTime=be(e.getUint32(n)),n+=4,r.timescale=e.getUint32(n),n+=8,r.duration=e.getUint32(n)):(r.creationTime=be(e.getUint32(n)),n+=4,r.modificationTime=be(e.getUint32(n)),n+=4,r.timescale=e.getUint32(n),n+=4,r.duration=e.getUint32(n)),n+=4,r.rate=e.getUint16(n)+e.getUint16(n+2)/16,n+=4,r.volume=e.getUint8(n)+e.getUint8(n+1)/8,n+=2,n+=2,n+=8,r.matrix=new Uint32Array(t.subarray(n,n+36)),n+=36,n+=24,r.nextTrackId=e.getUint32(n),r},pdin:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:e.getUint32(4),initialDelay:e.getUint32(8)}},sdtp:function(t){var e,n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]};for(e=4;e<t.byteLength;e++)n.samples.push({dependsOn:(48&t[e])>>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return n},sidx:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},i=n.getUint16(22);for(e=24;i;e+=12,i--)r.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&n.getUint32(e),subsegmentDuration:n.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&n.getUint32(e+8)});return r},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:ge(t)}},stco:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},i=n.getUint32(4);for(e=8;i;e+=4,i--)r.chunkOffsets.push(n.getUint32(e));return r},stsc:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=n.getUint32(4),i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;r;e+=12,r--)i.sampleToChunks.push({firstChunk:n.getUint32(e),samplesPerChunk:n.getUint32(e+4),sampleDescriptionIndex:n.getUint32(e+8)});return i},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:ge(t.subarray(8))}},stsz:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(e=12;e<t.byteLength;e+=4)r.entries.push(n.getUint32(e));return r},stts:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},i=n.getUint32(4);for(e=8;i;e+=8,i--)r.timeToSamples.push({sampleCount:n.getUint32(e),sampleDelta:n.getUint32(e+4)});return r},styp:function(t){return Ee.ftyp(t)},tfdt:function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]),e},tfhd:function(t){var e,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return e=8,i&&(e+=4,r.baseDataOffset=n.getUint32(12),e+=4),o&&(r.sampleDescriptionIndex=n.getUint32(e),e+=4),a&&(r.defaultSampleDuration=n.getUint32(e),e+=4),s&&(r.defaultSampleSize=n.getUint32(e),e+=4),u&&(r.defaultSampleFlags=n.getUint32(e)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},tkhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=be(e.getUint32(n)),n+=8,r.modificationTime=be(e.getUint32(n)),n+=4,r.trackId=e.getUint32(n),n+=4,n+=8,r.duration=e.getUint32(n)):(r.creationTime=be(e.getUint32(n)),n+=4,r.modificationTime=be(e.getUint32(n)),n+=4,r.trackId=e.getUint32(n),n+=4,n+=4,r.duration=e.getUint32(n)),n+=4,n+=8,r.layer=e.getUint16(n),n+=2,r.alternateGroup=e.getUint16(n),n+=2,r.volume=e.getUint8(n)+e.getUint8(n+1)/8,n+=2,n+=2,r.matrix=new Uint32Array(t.subarray(n,n+36)),n+=36,r.width=e.getUint16(n)+e.getUint16(n+2)/16,n+=4,r.height=e.getUint16(n)+e.getUint16(n+2)/16,r},traf:function(t){return{boxes:ge(t)}},trak:function(t){return{boxes:ge(t)}},trex:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:e.getUint32(4),defaultSampleDescriptionIndex:e.getUint32(8),defaultSampleDuration:e.getUint32(12),defaultSampleSize:e.getUint32(16),sampleDependsOn:3&t[20],sampleIsDependedOn:(192&t[21])>>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},r=new DataView(t.buffer,t.byteOffset,t.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),o&&c&&(e={flags:Te(t.subarray(d,d+4))},d+=4,a&&(e.duration=r.getUint32(d),d+=4),s&&(e.size=r.getUint32(d),d+=4),l&&(e.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(e),c--);c--;)e={},a&&(e.duration=r.getUint32(d),d+=4),s&&(e.size=r.getUint32(d),d+=4),u&&(e.flags=Te(t.subarray(d,d+4)),d+=4),l&&(e.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(e);return n},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}};ge=function(t){for(var e,n,r,i,o,a=0,s=[],u=new ArrayBuffer(t.length),l=new Uint8Array(u),c=0;c<t.length;++c)l[c]=t[c];for(e=new DataView(u);a<t.byteLength;)n=e.getUint32(a),r=_e(t.subarray(a+4,a+8)),i=n>1?a+n:t.byteLength,o=(Ee[r]||function(t){return{data:t}})(t.subarray(a+8,i)),o.size=n,o.type=r,s.push(o),a=i;return s},ye=function(t,e){var n;return e=e||0,n=new Array(2*e+1).join(" "),t.map(function(t,r){return n+t.type+"\n"+Object.keys(t).filter(function(t){return"type"!==t&&"boxes"!==t}).map(function(e){var r=n+" "+e+": ",i=t[e];if(i instanceof Uint8Array||i instanceof Uint32Array){var o=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(function(t){return" "+("00"+t.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return o?1===o.length?r+"<"+o.join("").slice(1)+">":r+"<\n"+o.map(function(t){return n+" "+t}).join("\n")+"\n"+n+" >":r+"<>"}return r+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:n+" "+t}).join("\n")}).join("\n")+(t.boxes?"\n"+ye(t.boxes,e+1):"")}).join("\n")};var we={inspect:ge,textify:ye,parseTfdt:Ee.tfdt,parseHdlr:Ee.hdlr,parseTfhd:Ee.tfhd,parseTrun:Ee.trun},ke=ht.discardEmulationPreventionBytes,Ce=At.CaptionStream,Le=function(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(n<i.size)return i;n-=i.size}return null},Ie=function(t,e,n){var r,i,o,a,s=new DataView(t.buffer,t.byteOffset,t.byteLength),u=[];for(i=0;i+4<t.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&t[i]){case 6:var l=t.subarray(i+1,i+1+o),c=Le(i,e);r={nalUnitType:"sei_rbsp",size:o,data:l,escapedRBSP:ke(l),trackId:n},c?(r.pts=c.pts,r.dts=c.dts,a=c):(r.pts=a.pts,r.dts=a.dts),u.push(r)}return u},xe=function(t,e,n){var r=e,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return t.forEach(function(t){var e=we.parseTrun(t),n=e.samples;n.forEach(function(t){void 0===t.duration&&(t.duration=i),void 0===t.size&&(t.size=o),t.trackId=a,t.dts=r,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=r+t.compositionTimeOffset,r+=t.duration}),s=s.concat(n)}),s},Re=function(t,e){var n=Y.findBox(t,["moof","traf"]),r=Y.findBox(t,["mdat"]),i={},o=[];return r.forEach(function(t,e){var r=n[e];o.push({mdat:t,traf:r})}),o.forEach(function(t){var n,r,o=t.mdat,a=t.traf,s=Y.findBox(a,["tfhd"]),u=we.parseTfhd(s[0]),l=u.trackId,c=Y.findBox(a,["tfdt"]),d=c.length>0?we.parseTfdt(c[0]).baseMediaDecodeTime:0,h=Y.findBox(a,["trun"]);e===l&&h.length>0&&(n=xe(h,d,u),r=Ie(o,n,l),i[l]||(i[l]=[]),i[l]=i[l].concat(r))}),i},De=function(t,e,n){var r;return e?(r=Re(t,e),{seiNals:r[e],timescale:n}):null},Me=function(){var t,e,n,r,i,o=!1;this.isInitialized=function(){return o},this.init=function(){t=new Ce,o=!0,t.on("data",function(t){t.startTime=t.startPts/r,t.endTime=t.endPts/r,i.captions.push(t),i.captionStreams[t.stream]=!0})},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"===(void 0===e?"undefined":Oe(e))&&0===Object.keys(e).length||n===t[0]&&r===e[n])},this.parse=function(t,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(!n||!r)return e.push(t),null;for(;e.length>0;){var u=e.shift();this.parse(u,o,a)}return null!==(s=De(t,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach(function(e){t.push(e)})},this.flushStream=function(){if(!this.isInitialized())return null;t.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){e=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},je=Me,Pe={generator:V,probe:Y,Transmuxer:Ae.Transmuxer,AudioSegmentStream:Ae.AudioSegmentStream,VideoSegmentStream:Ae.VideoSegmentStream,CaptionParser:je},Ne=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ue=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Be=function(t,e){e.on("data",function(e){var n=e.initSegment;e.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=e.data;e.data=r.buffer,t.postMessage({action:"data",segment:e,byteOffset:r.byteOffset,byteLength:r.byteLength},[e.data])}),e.captionStream&&e.captionStream.on("data",function(e){t.postMessage({action:"caption",data:e})}),e.on("done",function(e){t.postMessage({action:"done"})}),e.on("gopInfo",function(e){t.postMessage({action:"gopInfo",gopInfo:e})})},Fe=function(){function t(e,n){Ne(this,t),this.options=n||{},this.self=e,this.init()}return Ue(t,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Pe.Transmuxer(this.options),Be(this.self,this.transmuxer)}},{key:"push",value:function(t){var e=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(e)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(t){var e=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*e))}},{key:"setAudioAppendStart",value:function(t){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*t.appendStart))}},{key:"flush",value:function(t){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())}}]),t}();new function(t){t.onmessage=function(e){if("init"===e.data.action&&e.data.options)return void(this.messageHandlers=new Fe(t,e.data.options));this.messageHandlers||(this.messageHandlers=new Fe(t)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data)}}(n)}()}),fp={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},pp=function(t){return t.map(function(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(t,e,n){return"avc1."+("00"+Number(e).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})})},vp=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e={codecCount:0},n=void 0;return e.codecCount=t.split(",").length,e.codecCount=e.codecCount||2,n=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t),n&&(e.videoCodec=n[2],e.videoObjectTypeIndicator=n[3]),e.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t),e.audioProfile=e.audioProfile&&e.audioProfile[2],e},mp=function(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(t){return pp([t])[0]})},gp=function(t,e,n){return t+"/"+e+'; codecs="'+n.filter(function(t){return!!t}).join(", ")+'"'},yp=function(t){return t.segments&&t.segments.length&&t.segments[0].map?"mp4":"mp2t"},Ap=function(t){var e=t.attributes||{};return e.CODECS?vp(e.CODECS):fp},_p=function(t,e){if(!t.mediaGroups.AUDIO||!e)return null;var n=t.mediaGroups.AUDIO[e];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return vp(i.playlists[0].attributes.CODECS).audioProfile}return null},bp=function(t,e){var n=yp(e),r=Ap(e),i=e.attributes||{},o=!0,a=!1;if(!e)return[];if(t.mediaGroups.AUDIO&&i.AUDIO){var s=t.mediaGroups.AUDIO[i.AUDIO];if(s){a=!0,o=!1;for(var u in s)if(!s[u].uri&&!s[u].playlists){o=!0;break}}}a&&!r.audioProfile&&(o||(r.audioProfile=_p(t,i.AUDIO)),r.audioProfile||(le.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),r.audioProfile=fp.audioProfile));var l={};r.videoCodec&&(l.video=""+r.videoCodec+r.videoObjectTypeIndicator),r.audioProfile&&(l.audio="mp4a.40."+r.audioProfile);var c=gp("audio",n,[l.audio]),d=gp("video",n,[l.video]),h=gp("video",n,[l.video,l.audio]);return a?!o&&l.video?[d,c]:o||l.video?[h,c]:[c,c]:l.video?[h]:[c]},Tp=function(t){var e={type:"",parameters:{}},n=t.trim().split(";");return e.type=n.shift().trim(),n.forEach(function(t){var n=t.trim().split("=");if(n.length>1){var r=n[0].replace(/"/g,"").trim(),i=n[1].replace(/"/g,"").trim();e.parameters[r]=i}}),e},Sp=function(t){return/mp4a\.\d+.\d+/i.test(t)},Ep=function(t){return/avc1\.[\da-f]+/i.test(t)},wp=function(t,e,n){if(void 0===e||null===e||!t.length)return[];var r=Math.ceil(9e4*(e-n+3)),i=void 0;for(i=0;i<t.length&&!(t[i].pts>r);i++);return t.slice(i)},kp=function(t,e,n){if(!e.length)return t;if(n)return e.slice();var r=e[0].pts,i=0;for(i;i<t.length&&!(t[i].pts>=r);i++);return t.slice(0,i).concat(e)},Cp=function(t,e,n,r){for(var i=Math.ceil(9e4*(e-r)),o=Math.ceil(9e4*(n-r)),a=t.slice(),s=t.length;s--&&!(t[s].pts<=o););if(-1===s)return a;for(var u=s+1;u--&&!(t[u].pts<=i););return u=Math.max(u,0),a.splice(u,s-u+1),a},Lp=function(t,e,n){var r=null,i=null,o=0,a=[],s=[];if(!t&&!e)return le.createTimeRange();if(!t)return e.buffered;if(!e)return t.buffered;if(n)return t.buffered;if(0===t.buffered.length&&0===e.buffered.length)return le.createTimeRange();for(var u=t.buffered,l=e.buffered,c=u.length;c--;)a.push({time:u.start(c),type:"start"}),a.push({time:u.end(c),type:"end"});for(c=l.length;c--;)a.push({time:l.start(c),type:"start"}),a.push({time:l.end(c),type:"end"});for(a.sort(function(t,e){return t.time-e.time}),c=0;c<a.length;c++)"start"===a[c].type?2==++o&&(r=a[c].time):"end"===a[c].type&&1==--o&&(i=a[c].time),null!==r&&null!==i&&(s.push([r,i]),r=null,i=null);return le.createTimeRanges(s)},Ip=function(t,e){var n=t.addSourceBuffer(e),r=Object.create(null);r.updating=!1,r.realBuffer_=n;for(var i in n)!function(t){"function"==typeof n[t]?r[t]=function(){return n[t].apply(n,arguments)}:void 0===r[t]&&Object.defineProperty(r,t,{get:function(){return n[t]},set:function(e){return n[t]=e}})}(i);return r},xp=function(t){function e(t,n){Wh(this,e);var r=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,le.EventTarget));r.timestampOffset_=0,r.pendingBuffers_=[],r.bufferUpdating_=!1,r.mediaSource_=t,r.codecs_=n,r.audioCodec_=null,r.videoCodec_=null,r.audioDisabled_=!1,r.appendAudioInitSegment_=!0,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=le.browser.IE_VERSION>=11;var i={remux:!1,alignGopsAtEnd:r.safeAppend_};return r.codecs_.forEach(function(t){Sp(t)?r.audioCodec_=t:Ep(t)&&(r.videoCodec_=t)}),r.transmuxer_=new hp,r.transmuxer_.postMessage({action:"init",options:i}),r.transmuxer_.onmessage=function(t){return"data"===t.data.action?r.data_(t):"done"===t.data.action?r.done_(t):"gopInfo"===t.data.action?r.appendGopInfo_(t):void 0},Object.defineProperty(r,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(t){"number"==typeof t&&t>=0&&(this.timestampOffset_=t,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t}))}}),Object.defineProperty(r,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(t){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=t),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=t)}}),Object.defineProperty(r,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(r,"buffered",{get:function(){return Lp(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),r}return qh(e,t),Qh(e,[{key:"data_",value:function(t){var e=t.data.segment;e.data=new Uint8Array(e.data,t.data.byteOffset,t.data.byteLength),e.initSegment=new Uint8Array(e.initSegment.data,e.initSegment.byteOffset,e.initSegment.byteLength),Jf(this,this.mediaSource_,e),this.pendingBuffers_.push(e)}},{key:"done_",value:function(t){if("closed"===this.mediaSource_.readyState)return void(this.pendingBuffers_.length=0);this.processPendingSegments_()}},{key:"createRealSourceBuffers_",value:function(){var t=this,e=["audio","video"];e.forEach(function(n){if(t[n+"Codec_"]&&!t[n+"Buffer_"]){var r=null;if(t.mediaSource_[n+"Buffer_"])r=t.mediaSource_[n+"Buffer_"],r.updating=!1;else{var i=n+"Codec_",o=n+'/mp4;codecs="'+t[i]+'"';r=Ip(t.mediaSource_.nativeMediaSource_,o),t.mediaSource_[n+"Buffer_"]=r}t[n+"Buffer_"]=r,["update","updatestart","updateend"].forEach(function(i){r.addEventListener(i,function(){if("audio"!==n||!t.audioDisabled_)return"updateend"===i&&(t[n+"Buffer_"].updating=!1),e.every(function(e){return!("audio"!==e||!t.audioDisabled_)||n===e||!t[e+"Buffer_"]||!t[e+"Buffer_"].updating})?t.trigger(i):void 0})})}})}},{key:"appendBuffer",value:function(t){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var e=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:e.end(e.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:wp(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(t){this.gopBuffer_=kp(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(t,e){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(t,e),this.gopBuffer_=Cp(this.gopBuffer_,t,e,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(t,e)),$f(t,e,this.metadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)$f(t,e,this.inbandTextTracks_[n])}},{key:"processPendingSegments_",value:function(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};t=this.pendingBuffers_.reduce(function(t,e){var n=e.type,r=e.data,i=e.initSegment;return t[n].segments.push(r),t[n].bytes+=r.byteLength,t[n].initSegment=i,e.captions&&(t.captions=t.captions.concat(e.captions)),e.info&&(t[n].info=e.info),e.metadata&&(t.metadata=t.metadata.concat(e.metadata)),t},t),this.videoBuffer_||this.audioBuffer_||(0===t.video.bytes&&(this.videoCodec_=null),0===t.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),t.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info}),t.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:t.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(t.audio.segments.unshift(t.audio.initSegment),t.audio.bytes+=t.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var e=!1;this.videoBuffer_&&t.video.bytes?(t.video.segments.unshift(t.video.initSegment),t.video.bytes+=t.video.initSegment.byteLength,this.concatAndAppendSegments_(t.video,this.videoBuffer_),np(this,t.captions,t.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(e=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(t.audio,this.audioBuffer_),this.pendingBuffers_.length=0,e&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(t,e){var n=0,r=void 0;if(t.bytes){r=new Uint8Array(t.bytes),t.segments.forEach(function(t){r.set(t,n),n+=t.byteLength});try{e.updating=!0,e.appendBuffer(r)}catch(t){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:t.message,originalError:t})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}}]),e}(le.EventTarget),Rp=function(t){function e(){Wh(this,e);var t=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),n=void 0;t.nativeMediaSource_=new _e.MediaSource;for(n in t.nativeMediaSource_)n in e.prototype||"function"!=typeof t.nativeMediaSource_[n]||(t[n]=t.nativeMediaSource_[n].bind(t.nativeMediaSource_));return t.duration_=NaN,Object.defineProperty(t,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(t){if(this.duration_=t,t!==1/0)return void(this.nativeMediaSource_.duration=t)}}),Object.defineProperty(t,"seekable",{get:function(){return this.duration_===1/0?le.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(t,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(t,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),t.sourceBuffers=[],t.activeSourceBuffers_=[],t.updateActiveSourceBuffers_=function(){if(t.activeSourceBuffers_.length=0,1===t.sourceBuffers.length){var e=t.sourceBuffers[0];return e.appendAudioInitSegment_=!0,e.audioDisabled_=!e.audioCodec_,void t.activeSourceBuffers_.push(e)}for(var n=!1,r=!0,i=0;i<t.player_.audioTracks().length;i++){var o=t.player_.audioTracks()[i];if(o.enabled&&"main"!==o.kind){n=!0,r=!1;break}}t.sourceBuffers.forEach(function(e,i){if(e.appendAudioInitSegment_=!0,e.videoCodec_&&e.audioCodec_)e.audioDisabled_=n;else if(e.videoCodec_&&!e.audioCodec_)e.audioDisabled_=!0,r=!1;else if(!e.videoCodec_&&e.audioCodec_&&(e.audioDisabled_=i?r:!r,e.audioDisabled_))return;t.activeSourceBuffers_.push(e)})},t.onPlayerMediachange_=function(){t.sourceBuffers.forEach(function(t){t.appendAudioInitSegment_=!0})},t.onHlsReset_=function(){t.sourceBuffers.forEach(function(t){t.transmuxer_&&t.transmuxer_.postMessage({action:"resetCaptions"})})},t.onHlsSegmentTimeMapping_=function(e){t.sourceBuffers.forEach(function(t){return t.timeMapping_=e.mapping})},["sourceopen","sourceclose","sourceended"].forEach(function(t){this.nativeMediaSource_.addEventListener(t,this.trigger.bind(this))},t),t.on("sourceopen",function(e){var n=we.querySelector('[src="'+t.url_+'"]');n&&(t.player_=le(n.parentNode),t.player_.tech_.on("hls-reset",t.onHlsReset_),t.player_.tech_.on("hls-segment-time-mapping",t.onHlsSegmentTimeMapping_),t.player_.audioTracks&&t.player_.audioTracks()&&(t.player_.audioTracks().on("change",t.updateActiveSourceBuffers_),t.player_.audioTracks().on("addtrack",t.updateActiveSourceBuffers_),t.player_.audioTracks().on("removetrack",t.updateActiveSourceBuffers_)),t.player_.on("mediachange",t.onPlayerMediachange_))}),t.on("sourceended",function(e){for(var n=ep(t.duration),r=0;r<t.sourceBuffers.length;r++){var i=t.sourceBuffers[r],o=i.metadataTrack_&&i.metadataTrack_.cues;o&&o.length&&(o[o.length-1].endTime=n)}}),t.on("sourceclose",function(t){this.sourceBuffers.forEach(function(t){t.transmuxer_&&t.transmuxer_.terminate()}),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&(this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}),t}return qh(e,t),Qh(e,[{key:"addSeekableRange_",value:function(t,e){var n=void 0;if(this.duration!==1/0)throw n=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity"),n.name="InvalidStateError",n.code=11,n;(e>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=e)}},{key:"addSourceBuffer",value:function(t){var e=void 0,n=Tp(t);if(/^(video|audio)\/mp2t$/i.test(n.type)){var r=[];n.parameters&&n.parameters.codecs&&(r=n.parameters.codecs.split(","),r=pp(r),r=r.filter(function(t){return Sp(t)||Ep(t)})),0===r.length&&(r=["avc1.4d400d","mp4a.40.2"]),e=new xp(this,r),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),e.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else e=this.nativeMediaSource_.addSourceBuffer(t);return this.sourceBuffers.push(e),e}}]),e}(le.EventTarget),Op=0;le.mediaSources={};var Dp=function(t,e){var n=le.mediaSources[t];if(!n)throw new Error("Media Source not found (Video.js)");n.trigger({type:"sourceopen",swfId:e})},Mp=function(){return!!_e.MediaSource&&!!_e.MediaSource.isTypeSupported&&_e.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},jp=function(){if(this.MediaSource={open:Dp,supportsNativeMediaSources:Mp},Mp())return new Rp;throw new Error("Cannot use create a virtual MediaSource for this video")};jp.open=Dp,jp.supportsNativeMediaSources=Mp;var Pp={createObjectURL:function(t){var e=void 0;return t instanceof Rp?(e=_e.URL.createObjectURL(t.nativeMediaSource_),t.url_=e,e):t instanceof Rp?(e="blob:vjs-media-source/"+Op,Op++,le.mediaSources[e]=t,e):(e=_e.URL.createObjectURL(t),t.url_=e,e)}};le.MediaSource=jp,le.URL=Pp;var Np=le.EventTarget,Up=le.mergeOptions,Bp=function(t,e){for(var n=Up(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod}),r=0;r<e.playlists.length;r++){var i=rf(n,e.playlists[r]);i&&(n=i)}return tf(e,function(t,e,r,i){if(t.playlists&&t.playlists.length){var o=t.playlists[0].uri,a=rf(n,t.playlists[0]);a&&(n=a,n.mediaGroups[e][r][i].playlists[0]=n.playlists[o])}}),n},Fp=function(t){function e(t,n,r,i){Wh(this,e);var o=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(o.hls_=n,o.withCredentials=r,!t)throw new Error("A non-empty playlist URL or playlist is required");return o.on("minimumUpdatePeriod",function(){o.refreshXml_()}),o.on("mediaupdatetimeout",function(){o.refreshMedia_()}),"string"==typeof t?(o.srcUrl=t,o.state="HAVE_NOTHING",Kh(o)):(o.masterPlaylistLoader_=i,o.state="HAVE_METADATA",o.started=!0,o.media(t),_e.setTimeout(function(){o.trigger("loadedmetadata")},0),o)}return qh(e,t),Qh(e,[{key:"dispose",value:function(){this.stopRequest(),_e.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}},{key:"media",value:function(t){if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var e=this.state;if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}var n=!this.media_||t.uri!==this.media_.uri;this.state="HAVE_METADATA",n&&(this.media_&&this.trigger("mediachanging"),this.media_=t,this.refreshMedia_(),"HAVE_MASTER"!==e&&this.trigger("mediachange"))}},{key:"pause",value:function(){this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(){if(!this.started)return void this.start();this.trigger("loadedplaylist")}},{key:"parseMasterXml",value:function(){var t=Ls(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_});t.uri=this.srcUrl;for(var e=0;e<t.playlists.length;e++){var n="placeholder-uri-"+e;t.playlists[e].uri=n,t.playlists[n]=t.playlists[e]}return tf(t,function(e,n,r,i){if(e.playlists&&e.playlists.length){var o="placeholder-uri-"+n+"-"+r+"-"+i;e.playlists[0].uri=o,t.playlists[o]=e.playlists[0]}}),of(t),af(t),t}},{key:"start",value:function(){var t=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,n){if(t.request){if(t.request=null,e)return t.error={status:n.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.masterXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?t.masterLoaded_=Date.parse(n.responseHeaders.date):t.masterLoaded_=Date.now(),t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))}})}},{key:"syncClientServerClock_",value:function(t){var e=this,n=Is(this.masterXml_);return null===n?(this.clientOffset_=this.masterLoaded_-Date.now(),t()):"DIRECT"===n.method?(this.clientOffset_=n.value-Date.now(),t()):void(this.request=this.hls_.xhr({uri:Hh(this.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},function(r,i){if(e.request){if(r)return e.clientOffset_=e.masterLoaded_-Date.now(),t();var o=void 0;o="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):e.masterLoaded_:Date.parse(i.responseText),e.clientOffset_=o-Date.now(),t()}}))}},{key:"onClientServerClockSync_",value:function(){var t=this;this.master=this.parseMasterXml(),this.state="HAVE_MASTER",this.trigger("loadedplaylist"),this.media_||this.media(this.master.playlists[0]),_e.setTimeout(function(){t.trigger("loadedmetadata")},0),this.master.minimumUpdatePeriod&&_e.setTimeout(function(){t.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod)}},{key:"refreshXml_",value:function(){var t=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,n){if(t.request){if(t.request=null,e)return t.error={status:n.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.masterXml_=n.responseText;var r=t.parseMasterXml();t.master=Bp(t.master,r),_e.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(){var t=this,e=void 0,n=void 0;this.masterPlaylistLoader_?(e=this.masterPlaylistLoader_.master,n=this.masterPlaylistLoader_.parseMasterXml()):(e=this.master,n=this.parseMasterXml());var r=Bp(e,n);r?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=r:this.master=r,this.media_=r.playlists[this.media_.uri]):this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=_e.setTimeout(function(){t.trigger("mediaupdatetimeout")},sf(this.media(),!!r))),this.trigger("loadedplaylist")}}]),e}(Np),Gp=function(t){return le.log.debug?le.log.debug.bind(le,"VHS:",t+" >"):function(){}},zp=function(){function t(e,n,r,i){Wh(this,t),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=e,this.processedAppend_=!1,this.type_=r,this.mimeType_=n,this.logger_=Gp("SourceUpdater["+r+"]["+n+"]"),"closed"===e.readyState?e.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,n,i)):this.createSourceBuffer_(n,i)}return Qh(t,[{key:"createSourceBuffer_",value:function(t,e){var n=this;if(this.sourceBuffer_=this.mediaSource.addSourceBuffer(t),this.logger_("created SourceBuffer"),e&&(e.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2))return void e.on("sourcebufferadded",function(){n.start_()});this.start_()}},{key:"start_",value:function(){var t=this;this.started_=!0,this.onUpdateendCallback_=function(){var e=t.pendingCallback_;t.pendingCallback_=null,t.logger_("buffered ["+Kf(t.buffered())+"]"),e&&e(),t.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(t){var e=this;this.processedAppend_&&this.queueCallback_(function(){e.sourceBuffer_.abort()},t)}},{key:"appendBuffer",value:function(t,e){var n=this;this.processedAppend_=!0,this.queueCallback_(function(){n.sourceBuffer_.appendBuffer(t)},e)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:le.createTimeRanges()}},{key:"remove",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ve;this.processedAppend_&&this.queueCallback_(function(){n.logger_("remove ["+t+" => "+e+"]"),n.sourceBuffer_.remove(t,e)},r)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(t){var e=this;return void 0!==t&&(this.queueCallback_(function(){e.sourceBuffer_.timestampOffset=t}),this.timestampOffset_=t),this.timestampOffset_}},{key:"queueCallback_",value:function(t,e){this.callbacks_.push([t.bind(this),e]),this.runCallback_()}},{key:"runCallback_",value:function(){var t=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(t=this.callbacks_.shift(),this.pendingCallback_=t[1],t[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),t}(),Vp={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},Hp={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Wp=function(t){var e=void 0;return e=t.offset+t.length-1,"bytes="+t.offset+"-"+e},Qp=function(t){var e={};return t.byterange&&(e.Range=Wp(t.byterange)),e},Yp=function(t){t.forEach(function(t){t.abort()})},qp=function(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}},Kp=function(t){var e=t.target,n=Date.now()-e.requestTime,r={bandwidth:1/0,bytesReceived:0,roundTripTime:n||0};return r.bytesReceived=t.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r},Xp=function(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Hp.TIMEOUT,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Hp.ABORTED,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Hp.FAILURE,xhr:e}:null},Zp=function(t,e){return function(n,r){var i=r.response,o=Xp(n,r);if(o)return e(o,t);if(16!==i.byteLength)return e({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Hp.FAILURE,xhr:r},t);var a=new DataView(i);return t.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),e(null,t)}},Jp=function(t,e,n){return function(r,i){var o=i.response,a=Xp(r,i);return a?n(a,t):0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:Hp.FAILURE,xhr:i},t):(t.map.bytes=new Uint8Array(i.response),e.isInitialized()||e.init(),t.map.timescales=yu.timescale(t.map.bytes),t.map.videoTrackIds=yu.videoTrackIds(t.map.bytes),n(null,t))}},$p=function(t,e,n){return function(r,i){var o=i.response,a=Xp(r,i),s=void 0;return a?n(a,t):0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:Hp.FAILURE,xhr:i},t):(t.stats=qp(i),t.key?t.encryptedBytes=new Uint8Array(i.response):t.bytes=new Uint8Array(i.response),t.map&&t.map.bytes&&(e.isInitialized()||e.init(),(s=e.parse(t.bytes,t.map.videoTrackIds,t.map.timescales))&&s.captions&&(t.captionStreams=s.captionStreams,t.fmp4Captions=s.captions)),n(null,t))}},tv=function(t,e,n){var r=function r(i){if(i.data.source===e.requestId){t.removeEventListener("message",r);var o=i.data.decrypted;return e.bytes=new Uint8Array(o.bytes,o.byteOffset,o.byteLength),n(null,e)}};t.addEventListener("message",r),t.postMessage(Bf({source:e.requestId,encrypted:e.encryptedBytes,key:e.key.bytes,iv:e.key.iv}),[e.encryptedBytes.buffer,e.key.bytes.buffer])},ev=function(t){return t.reduce(function(t,e){return e.code>t.code?e:t})},nv=function(t,e,n){var r=[],i=0;return function(o,a){if(o&&(Yp(t),r.push(o)),(i+=1)===t.length){if(a.endOfAllRequests=Date.now(),r.length>0){var s=ev(r);return n(s,a)}return a.encryptedBytes?tv(e,a,n):n(null,a)}}},rv=function(t,e){return function(n){return t.stats=le.mergeOptions(t.stats,Kp(n)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),e(n,t)}},iv=function(t,e,n,r,i,o,a){var s=[],u=nv(s,n,a);if(i.key){var l=le.mergeOptions(e,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),c=Zp(i,u),d=t(l,c);s.push(d)}if(i.map&&!i.map.bytes){var h=le.mergeOptions(e,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Qp(i.map)}),f=Jp(i,r,u),p=t(h,f);s.push(p)}var v=le.mergeOptions(e,{uri:i.resolvedUri,responseType:"arraybuffer",headers:Qp(i)}),m=$p(i,r,u),g=t(v,m);return g.addEventListener("progress",rv(i,o)),s.push(g),function(){return Yp(s)}},ov=function(t,e){var n=void 0;return t?(n=_e.getComputedStyle(t),n?n[e]:""):""},av=function(t,e){var n=t.slice();t.sort(function(t,r){var i=e(t,r);return 0===i?n.indexOf(t)-n.indexOf(r):i})},sv=function(t,e){var n=void 0,r=void 0;return t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||_e.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||_e.Number.MAX_VALUE,n-r},uv=function(t,e){var n=void 0,r=void 0;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||_e.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||_e.Number.MAX_VALUE,n===r&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:n-r},lv=function(t,e,n,r){var i=t.playlists.map(function(t){var e=void 0,n=void 0,r=void 0;return e=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,n=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height,r=t.attributes.BANDWIDTH,r=r||_e.Number.MAX_VALUE,{bandwidth:r,width:e,height:n,playlist:t}});av(i,function(t,e){return t.bandwidth-e.bandwidth}),i=i.filter(function(t){return!Of.isIncompatible(t.playlist)});var o=i.filter(function(t){return Of.isEnabled(t.playlist)});o.length||(o=i.filter(function(t){return!Of.isDisabled(t.playlist)}));var a=o.filter(function(t){return t.bandwidth*Vp.BANDWIDTH_VARIANCE<e}),s=a[a.length-1],u=a.filter(function(t){return t.bandwidth===s.bandwidth})[0],l=a.filter(function(t){return t.width&&t.height});av(l,function(t,e){return t.width-e.width});var c=l.filter(function(t){return t.width===n&&t.height===r});s=c[c.length-1];var d=c.filter(function(t){return t.bandwidth===s.bandwidth})[0],h=void 0,f=void 0,p=void 0;d||(h=l.filter(function(t){return t.width>n||t.height>r}),f=h.filter(function(t){return t.width===h[0].width&&t.height===h[0].height}),s=f[f.length-1],p=f.filter(function(t){return t.bandwidth===s.bandwidth})[0]);var v=p||d||u||o[0]||i[0];return v?v.playlist:null},cv=function(){return lv(this.playlists.master,this.systemBandwidth,parseInt(ov(this.tech_.el(),"width"),10),parseInt(ov(this.tech_.el(),"height"),10))},dv=function(t){var e=t.master,n=t.currentTime,r=t.bandwidth,i=t.duration,o=t.segmentDuration,a=t.timeUntilRebuffer,s=t.currentTimeline,u=t.syncController,l=e.playlists.filter(function(t){return!Of.isIncompatible(t)}),c=l.filter(Of.isEnabled);c.length||(c=l.filter(function(t){return!Of.isDisabled(t)}));var d=c.filter(Of.hasAttribute.bind(null,"BANDWIDTH")),h=d.map(function(t){var e=u.getSyncPoint(t,i,s,n),l=e?1:2;return{playlist:t,rebufferingImpact:Of.estimateSegmentRequestTime(o,r,t)*l-a}}),f=h.filter(function(t){return t.rebufferingImpact<=0});return av(f,function(t,e){return sv(e.playlist,t.playlist)}),f.length?f[0]:(av(h,function(t,e){return t.rebufferingImpact-e.rebufferingImpact}),h[0]||null)},hv=function(){var t=this.playlists.master.playlists.filter(Of.isEnabled);return av(t,function(t,e){return sv(t,e)}),t.filter(function(t){return vp(t.attributes.CODECS).videoCodec})[0]||null},fv=function(t,e,n){for(var r in n)if(!t[r]){e.trigger({type:"usage",name:"hls-608"});var i=e.textTracks().getTrackById(r);t[r]=i||e.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}},pv=function(t){var e=t.inbandTextTracks,n=t.captionArray,r=t.timestampOffset;if(n){var i=window.WebKitDataCue||window.VTTCue;n.forEach(function(t){var n=t.stream,o=t.startTime,a=t.endTime;e[n]&&(o+=r,a+=r,e[n].addCue(new i(o,a,t.text)))})}},vv=function(t,e,n){if(!t||!e)return!1;var r=t.segments,i=n===r.length;return t.endList&&"open"===e.readyState&&i},mv=function(t){return"number"==typeof t&&isFinite(t)},gv=function(t,e,n){return"main"===t&&e&&n?n.containsAudio||n.containsVideo?e.containsVideo&&!n.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.containsVideo&&n.containsVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null},yv=function(t,e,n){var r=void 0;return r=t.length&&t.start(0)>0&&t.start(0)<e?t.start(0):e-30,Math.min(r,e-n)},Av=function(t){var e=t.segment,n=e.start,r=e.end,i=t.playlist,o=i.mediaSequence,a=i.id,s=i.segments,u=void 0===s?[]:s,l=t.mediaIndex,c=t.timeline;return["appending ["+l+"] of ["+o+", "+(o+u.length)+"] from playlist ["+a+"]","["+n+" => "+r+"] in timeline ["+c+"]"].join(" ")},_v=function(t){function e(t){Wh(this,e);var n=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=t.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.hasPlayed_=t.hasPlayed,n.currentTime_=t.currentTime,n.seekable_=t.seekable,n.seeking_=t.seeking,n.duration_=t.duration,n.mediaSource_=t.mediaSource,n.hls_=t.hls,n.loaderType_=t.loaderType,n.startingMedia_=void 0,n.segmentMetadataTrack_=t.segmentMetadataTrack,n.goalBufferLength_=t.goalBufferLength,n.sourceType_=t.sourceType,n.inbandTextTracks_=t.inbandTextTracks,n.state_="INIT",n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.mimeType_=null,n.sourceUpdater_=null,n.xhrOptions_=null,n.activeInitSegmentId_=null,n.initSegments_={},n.captionParser_=new Nd,n.decrypter_=t.decrypter,n.syncController_=t.syncController,n.syncPoint_={segmentIndex:0,time:0},n.syncController_.on("syncinfoupdate",function(){return n.trigger("syncinfoupdate")}),n.mediaSource_.addEventListener("sourceopen",function(){return n.ended_=!1}),n.fetchAtBuffer_=!1,n.logger_=Gp("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty(n,"state",{get:function(){return this.state_},set:function(t){t!==this.state_&&(this.logger_(this.state_+" -> "+t),this.state_=t)}}),n}return qh(e,t),Qh(e,[{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_(),this.captionParser_.reset()}},{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(t){return void 0!==t&&(this.error_=t),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():le.createTimeRanges()}},{key:"initSegment",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return null;var n=Ff(t),r=this.initSegments_[n];return e&&!r&&t.bytes&&(this.initSegments_[n]=r={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,timescales:t.timescales,videoTrackIds:t.videoTrackIds}),r||t}},{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 zp(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=e,this.hasPlayed_()||(t.syncInfo={mediaSequence:t.mediaSequence,time:0});var i=n?n.id:null;if(this.logger_("playlist update ["+i+" => "+t.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==t.uri)return void(null!==this.mediaIndex&&this.resyncLoader());var o=t.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex&&(this.mediaIndex-=o),r&&(r.mediaIndex-=o,r.mediaIndex>=0&&(r.segment=t.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,t)}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(_e.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(t,e){this.mimeType_||(this.mimeType_=t,this.sourceBufferEmitter_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(t){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_(),t),this.captionParser_.clearAllCaptions(),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(t,e,n){if(this.sourceUpdater_&&this.sourceUpdater_.remove(t,e,n),$f(t,e,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var r in this.inbandTextTracks_)$f(t,e,this.inbandTextTracks_[r])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&_e.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=_e.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&_e.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=_e.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 t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t){if(vv(this.playlist_,this.mediaSource_,t.mediaIndex))return void this.endOfStream();(t.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((t.timeline!==this.currentTimeline_||null!==t.startOfSegment&&t.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),t.timestampOffset=t.startOfSegment,this.captionParser_.clearAllCaptions()),this.loadSegment_(t))}}}},{key:"checkBuffer_",value:function(t,e,n,r,i,o){var a=0,s=void 0;t.length&&(a=t.end(t.length-1));var u=Math.max(0,a-i);if(!e.segments.length)return null;if(u>=this.goalBufferLength_())return null;if(!r&&u>=1)return null;if(null===o)return n=this.getSyncSegmentCandidate_(e),this.generateSegmentInfo_(e,n,null,!0);if(null!==n){var l=e.segments[n];return s=l&&l.end?l.end:a,this.generateSegmentInfo_(e,n+1,s,!1)}if(this.fetchAtBuffer_){var c=Of.getMediaInfoForTime(e,a,o.segmentIndex,o.time);n=c.mediaIndex,s=c.startTime}else{var d=Of.getMediaInfoForTime(e,i,o.segmentIndex,o.time);n=d.mediaIndex,s=d.startTime}return this.generateSegmentInfo_(e,n,s,!1)}},{key:"getSyncSegmentCandidate_",value:function(t){var e=this;if(-1===this.currentTimeline_)return 0;var n=t.segments.map(function(t,e){return{timeline:t.timeline,segmentIndex:e}}).filter(function(t){return t.timeline===e.currentTimeline_});return n.length?n[Math.min(n.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(t,e,n,r){if(e<0||e>=t.segments.length)return null;var i=t.segments[e];return{requestId:"segment-loader-"+Math.random(),uri:i.resolvedUri,mediaIndex:e,isSyncRequest:r,startOfSegment:n,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:i.timeline,duration:i.duration,segment:i}}},{key:"abortRequestEarly_",value:function(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return!1;var e=this.currentTime_(),n=t.bandwidth,r=this.pendingSegment_.duration,i=Of.estimateSegmentRequestTime(r,n,this.playlist_,t.bytesReceived),o=Xf(this.buffered_(),e,this.hls_.tech_.playbackRate())-1;if(i<=o)return!1;var a=dv({master:this.hls_.playlists.master,currentTime:e,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=i-o,u=s-a.rebufferingImpact,l=.5;return o<=1/30&&(l=1),!(!a.playlist||a.playlist.uri===this.playlist_.uri||u<l)&&(this.bandwidth=a.playlist.attributes.BANDWIDTH*Vp.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(t,e){this.pendingSegment_&&e.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(e.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(t){this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),t.abortRequests=iv(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(t),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(t){var e=yv(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);e>0&&this.remove(0,e)}},{key:"createSimplifiedSegmentObj_",value:function(t){var e=t.segment,n={resolvedUri:e.resolvedUri,byterange:e.byterange,requestId:t.requestId};if(e.key){var r=e.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);n.key={resolvedUri:e.key.resolvedUri,iv:r}}return e.map&&(n.map=this.initSegment(e.map)),n}},{key:"segmentRequestFinished_",value:function(t,e){if(this.mediaRequests+=1,e.stats&&(this.mediaBytesTransferred+=e.stats.bytesReceived,this.mediaTransferDuration+=e.stats.roundTripTime),!this.pendingSegment_)return void(this.mediaRequestsAborted+=1);if(e.requestId===this.pendingSegment_.requestId){if(t)return this.pendingSegment_=null,this.state="READY",t.code===Hp.ABORTED?void(this.mediaRequestsAborted+=1):(this.pause(),t.code===Hp.TIMEOUT?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(t),void this.trigger("error")));this.bandwidth=e.stats.bandwidth,this.roundTrip=e.stats.roundTripTime,e.map&&(e.map=this.initSegment(e.map,!0)),this.processSegmentResponse_(e)}}},{key:"processSegmentResponse_",value:function(t){var e=this.pendingSegment_;e.bytes=t.bytes,t.map&&(e.segment.map.bytes=t.map.bytes),e.endOfAllRequests=t.endOfAllRequests,t.fmp4Captions&&(fv(this.inbandTextTracks_,this.hls_.tech_,t.captionStreams),pv({inbandTextTracks:this.inbandTextTracks_,captionArray:t.fmp4Captions,timestampOffset:0}),this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){var t=this;if(!this.pendingSegment_)return void(this.state="READY");var e=this.pendingSegment_,n=e.segment,r=this.syncController_.probeSegmentInfo(e);void 0===this.startingMedia_&&r&&(r.containsAudio||r.containsVideo)&&(this.startingMedia_={containsAudio:r.containsAudio,containsVideo:r.containsVideo});var i=gv(this.loaderType_,this.startingMedia_,r);if(i)return this.error({message:i,blacklistDuration:1/0}),void this.trigger("error");if(e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==e.timestampOffset&&e.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(e.timestampOffset),this.trigger("timestampoffset"));var o=this.syncController_.mappingForTimeline(e.timeline);if(null!==o&&this.trigger({type:"segmenttimemapping",mapping:o}),this.state="APPENDING",n.map){var a=Ff(n.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==a){var s=this.initSegment(n.map);this.sourceUpdater_.appendBuffer(s.bytes,function(){t.activeInitSegmentId_=a})}}e.byteLength=e.bytes.byteLength,"number"==typeof n.start&&"number"==typeof n.end?this.mediaSecondsLoaded+=n.end-n.start:this.mediaSecondsLoaded+=n.duration,this.logger_(Av(e)),this.sourceUpdater_.appendBuffer(e.bytes,this.handleUpdateEnd_.bind(this))}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_,e=t.segment,n=null!==this.mediaIndex;if(this.pendingSegment_=null,this.recordThroughput_(t),this.addSegmentMetadataCue_(t),this.state="READY",this.mediaIndex=t.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate"),e.end&&this.currentTime_()-e.end>3*t.playlist.targetDuration)return void this.resetEverything();n&&this.trigger("bandwidthupdate"),this.trigger("progress"),vv(t.playlist,this.mediaSource_,t.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_()}},{key:"recordThroughput_",value:function(t){var e=this.throughput.rate,n=Date.now()-t.endOfAllRequests+1,r=Math.floor(t.byteLength/n*8*1e3);this.throughput.rate+=(r-e)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(t){if(this.segmentMetadataTrack_){var e=t.segment,n=e.start,r=e.end;if(mv(n)&&mv(r)){$f(n,r,this.segmentMetadataTrack_);var i=_e.WebKitDataCue||_e.VTTCue,o={bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:n,end:r},a=JSON.stringify(o),s=new i(n,r,a);s.value=o,this.segmentMetadataTrack_.addCue(s)}}}}]),e}(le.EventTarget),bv=function(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))},Tv=new Uint8Array("\n\n".split("").map(function(t){return t.charCodeAt(0)})),Sv=function(t){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Wh(this,e);var r=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.mediaSource_=null,r.subtitlesTrack_=null,r}return qh(e,t),Qh(e,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return le.createTimeRanges();var t=this.subtitlesTrack_.cues,e=t[0].startTime,n=t[t.length-1].startTime;return le.createTimeRanges([[e,n]])}},{key:"initSegment",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return null;var n=Ff(t),r=this.initSegments_[n];if(e&&!r&&t.bytes){var i=Tv.byteLength+t.bytes.byteLength,o=new Uint8Array(i);o.set(t.bytes),o.set(Tv,t.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:o}}return r||t}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(t){return void 0===t?this.subtitlesTrack_:(this.subtitlesTrack_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}},{key:"remove",value:function(t,e){$f(t,e,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var t=this;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=this.skipEmptySegments_(e)){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){var n=function(){t.state="READY",t.paused()||t.monitorBuffer_()};return this.syncController_.one("timestampoffset",n),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}},{key:"skipEmptySegments_",value:function(t){for(;t&&t.segment.empty;)t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest);return t}},{key:"handleSegment_",value:function(){var t=this;if(!this.pendingSegment_||!this.subtitlesTrack_)return void(this.state="READY");this.state="APPENDING";var e=this.pendingSegment_,n=e.segment;if("function"!=typeof _e.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var r=function(){t.handleSegment_()};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",function(){t.subtitlesTrack_.tech_.off("vttjsloaded",r),t.error({message:"Error loading vtt.js"}),t.state="READY",t.pause(),t.trigger("error")})}n.requested=!0;try{this.parseVTTCues_(e)}catch(t){return this.error({message:t.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(e,this.syncController_.timelines[e.timeline],this.playlist_),e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");e.byteLength=e.bytes.byteLength,this.mediaSecondsLoaded+=n.duration,e.cues.length&&this.remove(e.cues[0].endTime,e.cues[e.cues.length-1].endTime),e.cues.forEach(function(e){t.subtitlesTrack_.addCue(e)}),this.handleUpdateEnd_()}},{key:"parseVTTCues_",value:function(t){var e=void 0,n=!1;"function"==typeof _e.TextDecoder?e=new _e.TextDecoder("utf8"):(e=_e.WebVTT.StringDecoder(),n=!0);var r=new _e.WebVTT.Parser(_e,_e.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=t.cues.push.bind(t.cues),r.ontimestampmap=function(e){return t.timestampmap=e},r.onparsingerror=function(t){le.log.warn("Error encountered when parsing cues: "+t.message)},t.segment.map){var i=t.segment.map.bytes;n&&(i=bv(i)),r.parse(i)}var o=t.bytes;n&&(o=bv(o)),r.parse(o),r.flush()}},{key:"updateTimeMapping_",value:function(t,e,n){var r=t.segment;if(e){if(!t.cues.length)return void(r.empty=!0);var i=t.timestampmap,o=i.MPEGTS/9e4-i.LOCAL+e.mapping;if(t.cues.forEach(function(t){t.startTime+=o,t.endTime+=o}),!n.syncInfo){var a=t.cues[0].startTime,s=t.cues[t.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+t.mediaIndex,time:Math.min(a,s-r.duration)}}}}}]),e}(_v),Ev=function(t,e){for(var n=t.cues,r=0;r<n.length;r++){var i=n[r];if(e>=i.adStartTime&&e<=i.adEndTime)return i}return null},wv=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.segments)for(var r=n,i=void 0,o=0;o<t.segments.length;o++){var a=t.segments[o];if(i||(i=Ev(e,r+a.duration/2)),i){if("cueIn"in a){i.endTime=r,i.adEndTime=r,r+=a.duration,i=null;continue}if(r<i.endTime){r+=a.duration;continue}i.endTime+=a.duration}else if("cueOut"in a&&(i=new _e.VTTCue(r,r+a.duration,a.cueOut),i.adStartTime=r,i.adEndTime=r+parseFloat(a.cueOut),e.addCue(i)),"cueOutCont"in a){var s=void 0,u=void 0,l=a.cueOutCont.split("/").map(parseFloat),c=Xh(l,2);s=c[0],u=c[1],i=new _e.VTTCue(r,r+a.duration,""),i.adStartTime=r-s,i.adEndTime=i.adStartTime+u,e.addCue(i)}r+=a.duration}},kv=Rh.inspect,Cv=[{name:"VOD",run:function(t,e,n,r,i){return n!==1/0?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(t,e,n,r,i){if(!t.datetimeToDisplayTime)return null;var o=e.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3,d=c+t.datetimeToDisplayTime,h=Math.abs(i-d);if(null!==s&&s<h)break;s=h,a={time:d,segmentIndex:u}}}return a}},{name:"Segment",run:function(t,e,n,r,i){var o=e.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.timeline===r&&void 0!==l.start){var c=Math.abs(i-l.start);if(null!==s&&s<c)break;(!a||null===s||s>=c)&&(s=c,a={time:l.start,segmentIndex:u})}}return a}},{name:"Discontinuity",run:function(t,e,n,r,i){var o=null;if(i=i||0,e.discontinuityStarts&&e.discontinuityStarts.length)for(var a=null,s=0;s<e.discontinuityStarts.length;s++){var u=e.discontinuityStarts[s],l=e.discontinuitySequence+s+1,c=t.discontinuities[l];if(c){var d=Math.abs(i-c.time);if(null!==a&&a<d)break;(!o||null===a||a>=d)&&(a=d,o={time:c.time,segmentIndex:u})}}return o}},{name:"Playlist",run:function(t,e,n,r,i){return e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence}:null}}],Lv=function(t){function e(){Wh(this,e);var t=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.inspectCache_=void 0,t.timelines=[],t.discontinuities=[],t.datetimeToDisplayTime=null,t.logger_=Gp("SyncController"),t}return qh(e,t),Qh(e,[{key:"getSyncPoint",value:function(t,e,n,r){var i=this.runStrategies_(t,e,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null}},{key:"getExpiredTime",value:function(t,e){if(!t||!t.segments)return null;var n=this.runStrategies_(t,e,t.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+pf(t,r.segmentIndex,0))}},{key:"runStrategies_",value:function(t,e,n,r){for(var i=[],o=0;o<Cv.length;o++){var a=Cv[o],s=a.run(this,t,e,n,r);s&&(s.strategy=a.name,i.push({strategy:a.name,syncPoint:s}))}return i}},{key:"selectSyncPoint_",value:function(t,e){for(var n=t[0].syncPoint,r=Math.abs(t[0].syncPoint[e.key]-e.value),i=t[0].strategy,o=1;o<t.length;o++){var a=Math.abs(t[o].syncPoint[e.key]-e.value);a<r&&(r=a,n=t[o].syncPoint,i=t[o].strategy)}return this.logger_("syncPoint for ["+e.key+": "+e.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n}},{key:"saveExpiredSegmentInfo",value:function(t,e){for(var n=e.mediaSequence-t.mediaSequence,r=n-1;r>=0;r--){var i=t.segments[r];if(i&&void 0!==i.start){e.syncInfo={mediaSequence:t.mediaSequence+r,time:i.start},this.logger_("playlist refresh sync: [time:"+e.syncInfo.time+", mediaSequence: "+e.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var e=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-e}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(t){var e=t.segment,n=t.playlist,r=void 0;return r=e.map?this.probeMp4Segment_(t):this.probeTsSegment_(t),r&&this.calculateSegmentTimeMapping_(t,r)&&(this.saveDiscontinuitySyncInfo_(t),n.syncInfo||(n.syncInfo={mediaSequence:n.mediaSequence+t.mediaIndex,time:e.start})),r}},{key:"probeMp4Segment_",value:function(t){var e=t.segment,n=yu.timescale(e.map.bytes),r=yu.startTime(n,t.bytes);return null!==t.timestampOffset&&(t.timestampOffset-=r),{start:r,end:r+e.duration}}},{key:"probeTsSegment_",value:function(t){var e=kv(t.bytes,this.inspectCache_),n=void 0,r=void 0;return e?(e.video&&2===e.video.length?(this.inspectCache_=e.video[1].dts,n=e.video[0].dtsTime,r=e.video[1].dtsTime):e.audio&&2===e.audio.length&&(this.inspectCache_=e.audio[1].dts,n=e.audio[0].dtsTime,r=e.audio[1].dtsTime),{start:n,end:r,containsVideo:e.video&&2===e.video.length,containsAudio:e.audio&&2===e.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(t){return void 0===this.timelines[t]?null:this.timelines[t].time}},{key:"mappingForTimeline",value:function(t){return void 0===this.timelines[t]?null:this.timelines[t].mapping}},{key:"calculateSegmentTimeMapping_",value:function(t,e){var n=t.segment,r=this.timelines[t.timeline];if(null!==t.timestampOffset)r={time:t.startOfSegment,mapping:t.startOfSegment-e.start},this.timelines[t.timeline]=r,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": [time: "+r.time+"] [mapping: "+r.mapping+"]"),n.start=t.startOfSegment,n.end=e.end+r.mapping;else{if(!r)return!1;n.start=e.start+r.mapping,n.end=e.end+r.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(t){var e=t.playlist,n=t.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(e.discontinuityStarts&&e.discontinuityStarts.length)for(var r=0;r<e.discontinuityStarts.length;r++){var i=e.discontinuityStarts[r],o=e.discontinuitySequence+r+1,a=i-t.mediaIndex,s=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>s){var u=void 0;u=a<0?n.start-pf(e,t.mediaIndex,i):n.end+pf(e,t.mediaIndex+1,i),this.discontinuities[o]={time:u,accuracy:s}}}}}]),e}(le.EventTarget),Iv=new he("./decrypter-worker.worker.js",function(t,e){var n=this;!function(){function t(t){return t.subarray(0,t.byteLength-t[t.byteLength-1])}var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":Oe(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)},o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":Oe(e))&&"function"!=typeof e?t:e},a=function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],n=t[1],r=e[4],i=n[4],o=void 0,a=void 0,s=void 0,u=[],l=[],c=void 0,d=void 0,h=void 0,f=void 0,p=void 0,v=void 0;for(o=0;o<256;o++)l[(u[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!r[a];a^=c||1,s=l[s]||1)for(f=s^s<<1^s<<2^s<<3^s<<4,f=f>>8^255&f^99,r[a]=f,i[f]=a,h=u[d=u[c=u[a]]],v=16843009*h^65537*d^257*c^16843008*a,p=257*u[f]^16843008*f,o=0;o<4;o++)e[o][a]=p=p<<24^p>>>8,n[o][f]=v=v<<24^v>>>8;for(o=0;o<5;o++)e[o]=e[o].slice(0),n[o]=n[o].slice(0);return t},s=null,u=function(){function t(n){e(this,t),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 r=void 0,i=void 0,o=void 0,u=void 0,l=void 0,c=this._tables[0][4],d=this._tables[1],h=n.length,f=1;if(4!==h&&6!==h&&8!==h)throw new Error("Invalid aes key size");for(u=n.slice(0),l=[],this._key=[u,l],r=h;r<4*h+28;r++)o=u[r-1],(r%h==0||8===h&&r%h==4)&&(o=c[o>>>24]<<24^c[o>>16&255]<<16^c[o>>8&255]<<8^c[255&o],r%h==0&&(o=o<<8^o>>>24^f<<24,f=f<<1^283*(f>>7))),u[r]=u[r-h]^o;for(i=0;r;i++,r--)o=u[3&i?r:r-4],l[i]=r<=4||i<4?o:d[0][c[o>>>24]]^d[1][c[o>>16&255]]^d[2][c[o>>8&255]]^d[3][c[255&o]]}return t.prototype.decrypt=function(t,e,n,r,i,o){var a=this._key[1],s=t^a[0],u=r^a[1],l=n^a[2],c=e^a[3],d=void 0,h=void 0,f=void 0,p=a.length/4-2,v=void 0,m=4,g=this._tables[1],y=g[0],A=g[1],_=g[2],b=g[3],T=g[4];for(v=0;v<p;v++)d=y[s>>>24]^A[u>>16&255]^_[l>>8&255]^b[255&c]^a[m],h=y[u>>>24]^A[l>>16&255]^_[c>>8&255]^b[255&s]^a[m+1],f=y[l>>>24]^A[c>>16&255]^_[s>>8&255]^b[255&u]^a[m+2],c=y[c>>>24]^A[s>>16&255]^_[u>>8&255]^b[255&l]^a[m+3],m+=4,s=d,u=h,l=f;for(v=0;v<4;v++)i[(3&-v)+o]=T[s>>>24]<<24^T[u>>16&255]<<16^T[l>>8&255]<<8^T[255&c]^a[m++],d=s,s=u,u=l,l=c,c=d},t}(),l=function(){function t(){e(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var n=this.listeners[t].indexOf(e);return this.listeners[t].splice(n,1),n>-1},t.prototype.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var n=e.length,r=0;r<n;++r)e[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=e.length,a=0;a<o;++a)e[a].apply(this,i)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},t}(),c=function(t){function n(){e(this,n);var r=o(this,t.call(this,l));return r.jobs=[],r.delay=1,r.timeout_=null,r}return i(n,t),n.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},n}(l),d=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},h=function(t,e,n){var r=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),i=new u(Array.prototype.slice.call(e)),o=new Uint8Array(t.byteLength),a=new Int32Array(o.buffer),s=void 0,l=void 0,c=void 0,h=void 0,f=void 0,p=void 0,v=void 0,m=void 0,g=void 0;for(s=n[0],l=n[1],c=n[2],h=n[3],g=0;g<r.length;g+=4)f=d(r[g]),p=d(r[g+1]),v=d(r[g+2]),m=d(r[g+3]),i.decrypt(f,p,v,m,a,g),a[g]=d(a[g]^s),a[g+1]=d(a[g+1]^l),a[g+2]=d(a[g+2]^c),a[g+3]=d(a[g+3]^h),s=f,l=p,c=v,h=m;return o},f=function(){function n(r,i,o,a){e(this,n);var s=n.STEP,u=new Int32Array(r.buffer),l=new Uint8Array(r.byteLength),h=0;for(this.asyncStream_=new c,this.asyncStream_.push(this.decryptChunk_(u.subarray(h,h+s),i,o,l)),h=s;h<u.length;h+=s)o=new Uint32Array([d(u[h-4]),d(u[h-3]),d(u[h-2]),d(u[h-1])]),this.asyncStream_.push(this.decryptChunk_(u.subarray(h,h+s),i,o,l));this.asyncStream_.push(function(){a(null,t(l))})}return n.prototype.decryptChunk_=function(t,e,n,r){return function(){var i=h(t,e,n);r.set(i,t.byteOffset)}},r(n,null,[{key:"STEP",get:function(){return 32e3}}]),n}(),p=function(t){var e={};return Object.keys(t).forEach(function(n){var r=t[n];ArrayBuffer.isView(r)?e[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:e[n]=r}),e};new function(t){t.onmessage=function(e){var n=e.data,r=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),o=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new f(r,i,o,function(e,r){t.postMessage(p({source:n.source,decrypted:r}),[r.buffer])})}}(n)}()}),xv=function(t){var e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},Rv=function(t,e){t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Ov=function(t,e){e.activePlaylistLoader=t,t.load()},Dv=function(t,e){return function(){var n=e.segmentLoaders,r=n[t],i=n.main,o=e.mediaTypes[t],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(Rv(r,o),s){if(!s.playlistLoader)return void(u&&i.resetEverything());r.resyncLoader(),Ov(s.playlistLoader,o)}}},Mv=function(t,e){return function(){var n=e.segmentLoaders,r=n[t],i=n.main,o=e.mediaTypes[t],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(Rv(r,o),s){if(!s.playlistLoader)return void i.resetEverything();if(u===s.playlistLoader)return void Ov(s.playlistLoader,o);r.track&&r.track(a),r.resetEverything(),Ov(s.playlistLoader,o)}}},jv={AUDIO:function(t,e){return function(){var n=e.segmentLoaders[t],r=e.mediaTypes[t],i=e.blacklistCurrentPlaylist;Rv(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter(function(t){return t.default})[0]||a[0]).id,u=r.tracks[s];if(o===u)return void i({message:"Problem encountered loading the default audio track."});le.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var l in r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}},SUBTITLES:function(t,e){return function(){var n=e.segmentLoaders[t],r=e.mediaTypes[t];le.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Rv(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Pv={AUDIO:function(t,e,n){if(e){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[t];e.on("loadedmetadata",function(){var t=e.media();o.playlist(t,i),(!r.paused()||t.endList&&"none"!==r.preload())&&o.load()}),e.on("loadedplaylist",function(){o.playlist(e.media(),i),r.paused()||o.load()}),e.on("error",jv[t](t,n))}},SUBTITLES:function(t,e,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[t],a=n.mediaTypes[t];e.on("loadedmetadata",function(){var t=e.media();o.playlist(t,i),o.track(a.activeTrack()),(!r.paused()||t.endList&&"none"!==r.preload())&&o.load()}),e.on("loadedplaylist",function(){o.playlist(e.media(),i),r.paused()||o.load()}),e.on("error",jv[t](t,n))}},Nv=function(t,e){return function(n){return n.attributes[t]===e}},Uv=function(t){return function(e){return e.resolvedUri===t}},Bv={AUDIO:function(t,e){var n=e.hls,r=e.sourceType,i=e.segmentLoaders[t],o=e.requestOptions.withCredentials,a=e.master,s=a.mediaGroups,u=a.playlists,l=e.mediaTypes[t],c=l.groups,d=l.tracks,h=e.masterPlaylistLoader;s[t]&&0!==Object.keys(s[t]).length||(s[t]={main:{default:{default:!0}}});for(var f in s[t]){c[f]||(c[f]=[]);var p=u.filter(Nv(t,f));for(var v in s[t][f]){var m=s[t][f][v];p.filter(Uv(m.resolvedUri)).length&&delete m.resolvedUri;var g=void 0;if(g=m.resolvedUri?new uf(m.resolvedUri,n,o):m.playlists&&"dash"===r?new Fp(m.playlists[0],n,o,h):null,m=le.mergeOptions({id:v,playlistLoader:g},m),Pv[t](t,m.playlistLoader,e),c[f].push(m),void 0===d[v]){var y=new le.AudioTrack({id:v,kind:xv(m),enabled:!1,language:m.language,default:m.default,label:v});d[v]=y}}}i.on("error",jv[t](t,e))},SUBTITLES:function(t,e){var n=e.tech,r=e.hls,i=e.sourceType,o=e.segmentLoaders[t],a=e.requestOptions.withCredentials,s=e.master.mediaGroups,u=e.mediaTypes[t],l=u.groups,c=u.tracks,d=e.masterPlaylistLoader;for(var h in s[t]){l[h]||(l[h]=[]);for(var f in s[t][h])if(!s[t][h][f].forced){var p=s[t][h][f],v=void 0;if("hls"===i?v=new uf(p.resolvedUri,r,a):"dash"===i&&(v=new Fp(p.playlists[0],r,a,d)),p=le.mergeOptions({id:f,playlistLoader:v},p),Pv[t](t,p.playlistLoader,e),l[h].push(p),void 0===c[f]){var m=n.addRemoteTextTrack({id:f,kind:"subtitles",enabled:!1,language:p.language,label:f},!1).track;c[f]=m}}}o.on("error",jv[t](t,e))},"CLOSED-CAPTIONS":function(t,e){var n=e.tech,r=e.master.mediaGroups,i=e.mediaTypes[t],o=i.groups,a=i.tracks;for(var s in r[t]){o[s]||(o[s]=[]);for(var u in r[t][s]){var l=r[t][s][u];if(l.instreamId.match(/CC\d/)&&(o[s].push(le.mergeOptions({id:u},l)),void 0===a[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",enabled:!1,language:l.language,label:u},!1).track;a[u]=c}}}}},Fv=function(t,e){return function(n){var r=e.masterPlaylistLoader,i=e.mediaTypes[t].groups,o=r.media();if(!o)return null;var a=null;return o.attributes[t]&&(a=i[o.attributes[t]]),a=a||i.main,void 0===n?a:null===n?null:a.filter(function(t){return t.id===n.id})[0]||null}},Gv={AUDIO:function(t,e){return function(){var n=e.mediaTypes[t].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(t,e){return function(){var n=e.mediaTypes[t].tracks;for(var r in n)if("showing"===n[r].mode)return n[r];return null}}},zv=function(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){Bv[e](e,t)});var e=t.mediaTypes,n=t.masterPlaylistLoader,r=t.tech,i=t.hls;["AUDIO","SUBTITLES"].forEach(function(n){e[n].activeGroup=Fv(n,t),e[n].activeTrack=Gv[n](n,t),e[n].onGroupChanged=Dv(n,t),e[n].onTrackChanged=Mv(n,t)});var o=e.AUDIO.activeGroup(),a=(o.filter(function(t){return t.default})[0]||o[0]).id;e.AUDIO.tracks[a].enabled=!0,e.AUDIO.onTrackChanged(),n.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(t){return e[t].onGroupChanged()})});var s=function(){e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"hls-audio-change"})};r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),i.on("dispose",function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(var u in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[u])},Vv=function(){var t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:ve,activeTrack:ve,onGroupChanged:ve,onTrackChanged:ve}}),t},Hv=void 0,Wv=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Qv=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},Yv=function(t){function e(t){Wh(this,e);var n=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),r=t.url,i=t.withCredentials,o=t.tech,a=t.bandwidth,s=t.externHls,u=t.useCueTags,l=t.blacklistDuration,c=t.enableLowInitialPlaylist,d=t.sourceType,h=t.seekTo;if(!r)throw new Error("A non-empty playlist URL is required");Hv=s,n.withCredentials=i,n.tech_=o,n.hls_=o.hls,n.seekTo_=h,n.sourceType_=d,n.useCueTags_=u,n.blacklistDuration=l,n.enableLowInitialPlaylist=c,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:n.withCredentials,timeout:null},n.mediaTypes_=Vv(),n.mediaSource=new le.MediaSource,n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_.bind(n)),n.seekable_=le.createTimeRanges(),n.hasPlayed_=function(){return!1},n.syncController_=new Lv(t),n.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Iv,n.inbandTextTracks_={};var f={hls:n.hls_,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.mediaSource.duration},hasPlayed:function(){return n.hasPlayed_()},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:a,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new Fp(r,n.hls_,n.withCredentials):new uf(r,n.hls_,n.withCredentials),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new _v(le.mergeOptions(f,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new _v(le.mergeOptions(f,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new Sv(le.mergeOptions(f,{loaderType:"vtt"}),t),n.setupSegmentLoaderListeners_(),Wv.forEach(function(t){n[t+"_"]=Qv.bind(n,t)}),n.logger_=Gp("MPC"),n.masterPlaylistLoader_.load(),n}return qh(e,t),Qh(e,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=t.masterPlaylistLoader_.media(),n=1.5*t.masterPlaylistLoader_.targetDuration*1e3;Rf(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?t.requestOptions_.timeout=0:t.requestOptions_.timeout=n,e.endList&&"none"!==t.tech_.preload()&&(t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.mainSegmentLoader_.load()),zv({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,hls:t.hls_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)}),t.triggerPresenceUsage_(t.master(),e);try{t.setupSourceBuffers_()}catch(e){return le.log.warn("Failed to create SourceBuffers",e),t.mediaSource.endOfStream("decode")}t.setupFirstPlay(),t.trigger("selectedinitialmedia")}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var e=t.masterPlaylistLoader_.media();if(!e){t.excludeUnsupportedVariants_();var n=void 0;return t.enableLowInitialPlaylist&&(n=t.selectInitialPlaylist()),n||(n=t.selectPlaylist()),t.initialMedia_=n,void t.masterPlaylistLoader_.media(t.initialMedia_)}if(t.useCueTags_&&t.updateAdCues_(e),t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.updateDuration(),t.tech_.paused()||(t.mainSegmentLoader_.load(),t.audioSegmentLoader_&&t.audioSegmentLoader_.load()),!e.endList){var r=function(){var e=t.seekable();0!==e.length&&t.mediaSource.addSeekableRange_(e.start(0),e.end(0))};if(t.duration()!==1/0){var i=function e(){t.duration()===1/0?r():t.tech_.one("durationchange",e)};t.tech_.one("durationchange",i)}else r()}}),this.masterPlaylistLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){t.mainSegmentLoader_.abort(),t.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var e=t.masterPlaylistLoader_.media(),n=1.5*t.masterPlaylistLoader_.targetDuration*1e3;Rf(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?t.requestOptions_.timeout=0:t.requestOptions_.timeout=n,t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.mainSegmentLoader_.load(),t.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var e=t.masterPlaylistLoader_.media();t.stuckAtPlaylistEnd_(e)&&(t.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),t.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function(t,e){var n=t.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o]){var s=n.AUDIO[o][a];s.uri||(r=!1)}r&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),Hv.Playlist.isAes(e)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),Hv.Playlist.isFmp4(e)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&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 t=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var e=t.selectPlaylist(),n=t.masterPlaylistLoader_.media(),r=t.tech_.buffered(),i=r.length?r.end(r.length-1)-t.tech_.currentTime():0,o=t.bufferLowWaterLine();(!n.endList||t.duration()<Vp.MAX_BUFFER_LOW_WATER_LINE||e.attributes.BANDWIDTH<n.attributes.BANDWIDTH||i>=o)&&t.masterPlaylistLoader_.media(e),t.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){t.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){t.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){t.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){t.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(e){t.tech_.trigger({type:"hls-segment-time-mapping",mapping:e.mapping})}),this.audioSegmentLoader_.on("ended",function(){t.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:"smoothQualityChange_",value:function(){var t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var t=this,e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything(function(){le.browser.IE_VERSION||le.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.seekTo_(0),this.hasPlayed_()&&this.load();var t=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0)?this.seekTo_(t.end(t.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var t=this,e=this.masterPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_())return!1;if(!e.endList){var n=this.seekable();if(!n.length)return!1;if(le.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){t.trigger("firstplay"),t.seekTo_(n.end(0)),t.hasPlayed_=function(){return!0}}),!1;this.trigger("firstplay"),this.seekTo_(n.end(0))}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(t){return le.log.warn("Failed to create Source Buffers",t),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var t=this.tech_.play();void 0!==t&&"function"==typeof t.then&&t.then(null,function(t){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var t=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?t&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),t&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(t){if(!this.seekable().length)return!1;var e=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(null===e)return!1;var n=Hv.Playlist.playlistEnd(t,e),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var o=i.end(i.length-1);return o-r<=.1&&n-o<=.1}},{key:"blacklistCurrentPlaylist",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n=void 0,r=void 0;if(n=t.playlist||this.masterPlaylistLoader_.media(),e=e||t.blacklistDuration||this.blacklistDuration,!n){this.error=t;try{return this.mediaSource.endOfStream("network")}catch(t){return this.trigger("error")}}var i=1===this.masterPlaylistLoader_.master.playlists.filter(wf).length;return i?(le.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(i)):(n.excludeUntil=Date.now()+1e3*e,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),r=this.selectPlaylist(),le.log.warn("Problem encountered with the current HLS playlist."+(t.message?" "+t.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(r))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(t){var e=Qf(this.tech_.buffered(),t);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?e&&e.length?t:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:Hv.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var t=void 0,e=void 0;if(this.masterPlaylistLoader_){var n=this.masterPlaylistLoader_.media();if(n){var r=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(null!==r&&(t=Hv.Playlist.seekable(n,r),0!==t.length)){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(r=this.syncController_.getExpiredTime(n,this.mediaSource.duration)))return;if(e=Hv.Playlist.seekable(n,r),0===e.length)return}e?e.start(0)>t.end(0)||t.start(0)>e.end(0)?this.seekable_=t:this.seekable_=le.createTimeRanges([[e.start(0)>t.start(0)?e.start(0):t.start(0),e.end(0)<t.end(0)?e.end(0):t.end(0)]]):this.seekable_=t,this.logger_("seekable updated ["+Kf(this.seekable_)+"]"),this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){var t=this,e=this.mediaSource.duration,n=Hv.Playlist.duration(this.masterPlaylistLoader_.media()),r=this.tech_.buffered(),i=function e(){t.mediaSource.duration=n,t.tech_.trigger("durationchange"),t.mediaSource.removeEventListener("sourceopen",e)};r.length>0&&(n=Math.max(n,r.end(r.length-1))),e!==n&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",i):i())}},{key:"dispose",value:function(){var t=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(e){var n=t.mediaTypes_[e].groups;for(var r in n)n[r].forEach(function(t){t.playlistLoader&&t.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 t=this.masterPlaylistLoader_.media(),e=void 0;if(t&&"open"===this.mediaSource.readyState){if(e=bp(this.masterPlaylistLoader_.master,t),e.length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(e),this.excludeIncompatibleVariants_(t)}}},{key:"configureLoaderMimeTypes_",value:function(t){var e=t.length>1&&-1===t[0].indexOf(",")&&t[0]!==t[1]?new le.EventTarget:null;this.mainSegmentLoader_.mimeType(t[0],e),t[1]&&this.audioSegmentLoader_.mimeType(t[1],e)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach(function(t){t.attributes.CODECS&&_e.MediaSource&&_e.MediaSource.isTypeSupported&&!_e.MediaSource.isTypeSupported('video/mp4; codecs="'+mp(t.attributes.CODECS)+'"')&&(t.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(t){var e=2,n=null,r=void 0;t.attributes.CODECS&&(r=vp(t.attributes.CODECS),n=r.videoCodec,e=r.codecCount),this.master().playlists.forEach(function(t){var r={codecCount:2,videoCodec:null};t.attributes.CODECS&&(r=vp(t.attributes.CODECS)),r.codecCount!==e&&(t.excludeUntil=1/0),r.videoCodec!==n&&(t.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(t){var e=0,n=this.seekable();n.length&&(e=n.start(0)),wv(t,this.cueTagsTrack_,e)}},{key:"goalBufferLength",value:function(){var t=this.tech_.currentTime(),e=Vp.GOAL_BUFFER_LENGTH,n=Vp.GOAL_BUFFER_LENGTH_RATE,r=Math.max(e,Vp.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*n,r)}},{key:"bufferLowWaterLine",value:function(){var t=this.tech_.currentTime(),e=Vp.BUFFER_LOW_WATER_LINE,n=Vp.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(e,Vp.MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*n,r)}}]),e}(le.EventTarget),qv=function(t,e,n){return function(r){var i=t.master.playlists[e],o=Ef(i),a=wf(i);return void 0===r?a:(r?delete i.disabled:i.disabled=!0,r===a||o||(n(),r?t.trigger("renditionenabled"):t.trigger("renditiondisabled")),r)}},Kv=function t(e,n,r){Wh(this,t);var i=e.masterPlaylistController_.fastQualityChange_.bind(e.masterPlaylistController_);if(n.attributes.RESOLUTION){var o=n.attributes.RESOLUTION;this.width=o.width,this.height=o.height}this.bandwidth=n.attributes.BANDWIDTH,this.id=r,this.enabled=qv(e.playlists,n.uri,i)},Xv=function(t){var e=t.playlists;t.representations=function(){return e.master.playlists.filter(function(t){return!Ef(t)}).map(function(e,n){return new Kv(t,e,e.uri)})}},Zv=["seeking","seeked","pause","playing","error"],Jv=function(){function t(e){var n=this;Wh(this,t),this.tech_=e.tech,this.seekable=e.seekable,this.seekTo=e.seekTo,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Gp("PlaybackWatcher"),this.logger_("initialize");var r=function(){return n.monitorCurrentTime_()},i=function(){return n.techWaiting_()},o=function(){return n.cancelTimer_()},a=function(){return n.fixesBadSeeks_()};this.tech_.on("seekablechanged",a),this.tech_.on("waiting",i),this.tech_.on(Zv,o),this.tech_.on("canplay",r),this.dispose=function(){n.logger_("dispose"),n.tech_.off("seekablechanged",a),n.tech_.off("waiting",i),n.tech_.off(Zv,o),n.tech_.off("canplay",r),n.checkCurrentTimeTimeout_&&_e.clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}return Qh(t,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&_e.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=_e.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 t=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===t&&(!e.length||t+.1>=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var t=this.tech_.seeking(),e=this.seekable(),n=this.tech_.currentTime(),r=void 0;return t&&this.afterSeekableWindow_(e,n)&&(r=e.end(e.length-1)),t&&this.beforeSeekableWindow_(e,n)&&(r=e.start(0)+.1),void 0!==r&&(this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+Kf(e)+". Seeking to "+r+"."),this.seekTo(r),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var t=this.tech_.currentTime(),e=this.tech_.buffered(),n=Qf(e,t);return n.length&&t+3<=n.end(0)?(this.cancelTimer_(),this.seekTo(t),this.logger_("Stopped at "+t+" while inside a buffered region ["+n.start(0)+" -> "+n.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 t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(t,e)){var n=t.end(t.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.seekTo(n),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.buffered(),i=Yf(r,e);if(this.videoUnderflow_(i,r,e))return this.cancelTimer_(),this.seekTo(e),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(i.length>0){var o=i.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+o+", seeking to "+i.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,e),!0}return!1}},{key:"afterSeekableWindow_",value:function(t,e){return!!t.length&&e>t.end(t.length-1)+.1}},{key:"beforeSeekableWindow_",value:function(t,e){return!!(t.length&&t.start(0)>0&&e<t.start(0)-.1)}},{key:"videoUnderflow_",value:function(t,e,n){if(0===t.length){var r=this.gapFromVideoUnderflow_(e,n);if(r)return this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+n),!0}return!1}},{key:"skipTheGap_",value:function(t){var e=this.tech_.buffered(),n=this.tech_.currentTime(),r=Yf(e,n);this.cancelTimer_(),0!==r.length&&n===t&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",t,"nextRange start:",r.start(0)),this.seekTo(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(t,e){for(var n=qf(t),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(e-i<4&&e-i>2)return{start:i,end:o}}return null}}]),t}(),$v={errorInterval:30,getSource:function(t){return t(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},tm=function t(e,n){var r=0,i=0,o=le.mergeOptions($v,n);e.ready(function(){e.trigger({type:"usage",name:"hls-error-reload-initialized"})});var a=function(){i&&e.currentTime(i)},s=function(t){null!==t&&void 0!==t&&(i=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",a),e.src(t),e.trigger({type:"usage",name:"hls-error-reload"}),e.play())},u=function(){return Date.now()-r<1e3*o.errorInterval?void e.trigger({type:"usage",name:"hls-error-reload-canceled"}):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(e,s)):void le.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function t(){e.off("loadedmetadata",a),e.off("error",u),e.off("dispose",t)},c=function(n){l(),t(e,n)};e.on("error",u),e.on("dispose",l),e.reloadSourceOnError=c},em=function(t){tm(this,t)};le.use("*",function(t){return{setSource:function(t,e){e(null,t)},setCurrentTime:function(e){return t.vhs&&t.currentSource().src===t.vhs.source_.src&&t.vhs.setCurrentTime(e),e},play:function(){t.vhs&&t.currentSource().src===t.vhs.source_.src&&t.vhs.setCurrentTime(t.currentTime())}}});var nm={PlaylistLoader:uf,Playlist:Of,Decrypter:Vh,AsyncStream:Fh,decrypt:zh,utils:Hf,STANDARD_PLAYLIST_SELECTOR:cv,INITIAL_PLAYLIST_SELECTOR:hv,comparePlaylistBandwidth:sv,comparePlaylistResolution:uv,xhr:jf()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(t){Object.defineProperty(nm,t,{get:function(){return le.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),Vp[t]},set:function(e){if(le.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof e||e<0)return void le.log.warn("value of Hls."+t+" must be greater than or equal to 0");Vp[t]=e}})});var rm=function(t){return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(t)?"hls":/^application\/dash\+xml/i.test(t)?"dash":null},im=function(t,e){for(var n=e.media(),r=-1,i=0;i<t.length;i++)if(t[i].id===n.uri){r=i;break}t.selectedIndex_=r,t.trigger({selectedIndex:r,type:"change"})},om=function(t,e){e.representations().forEach(function(e){t.addQualityLevel(e)}),im(t,e.playlists)};nm.canPlaySource=function(){return le.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var am=function(t,e,n){if(!t)return t;var r={};for(var i in t)r[i]={audioContentType:'audio/mp4; codecs="'+n.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+e.attributes.CODECS+'"'},e.contentProtection&&e.contentProtection[i]&&e.contentProtection[i].pssh&&(r[i].pssh=e.contentProtection[i].pssh),"string"==typeof t[i]&&(r[i].url=t[i]);return le.mergeOptions(t,r)},sm=function(t){if("dash"===t.options_.sourceType){var e=le.players[t.tech_.options_.playerId];if(e.eme){var n=am(t.source_.keySystems,t.playlists.media(),t.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());n&&(e.currentSource().keySystems=n)}}};nm.supportsNativeHls=function(){var t=we.createElement("video");return!!le.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),nm.supportsNativeDash=function(){return!!le.getTech("Html5").isSupported()&&/maybe|probably/i.test(we.createElement("video").canPlayType("application/dash+xml"))}(),nm.supportsTypeNatively=function(t){return"hls"===t?nm.supportsNativeHls:"dash"===t&&nm.supportsNativeDash},nm.isSupported=function(){return le.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var um=le.getComponent("Component"),lm=function(t){function e(t,n,r){Wh(this,e);var i=Kh(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n,r.hls));if(n.options_&&n.options_.playerId){var o=le(n.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return le.log.warn("player.hls is deprecated. Use player.tech().hls instead."),n.trigger({type:"usage",name:"hls-player-access"}),i}}),o.vhs=i,o.dash=i}if(i.tech_=n,i.source_=t,i.stats={},i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(we,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(t){var e=we.fullscreenElement||we.webkitFullscreenElement||we.mozFullScreenElement||we.msFullscreenElement;e&&e.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()}),i.on(i.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),i.on(i.tech_,"play",i.play),i}return qh(e,t),Qh(e,[{key:"setOptions_",value:function(){var t=this;this.options_.withCredentials=this.options_.withCredentials||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=4194304),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&4194304===this.options_.bandwidth,["withCredentials","bandwidth"].forEach(function(e){void 0!==t.source_[e]&&(t.options_[e]=t.source_[e])}),this.bandwidth=this.options_.bandwidth}},{key:"src",value:function(t,e){var n=this;t&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=nm,this.options_.sourceType=rm(e),this.options_.seekTo=function(t){n.tech_.setCurrentTime(t),n.setCurrentTime(t)},this.masterPlaylistController_=new Yv(this.options_),this.playbackWatcher_=new Jv(le.mergeOptions(this.options_,{seekable:function(){return n.seekable()}})),this.masterPlaylistController_.on("error",function(){le.players[n.tech_.options_.playerId].error(n.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):nm.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=nm.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(t){this.masterPlaylistController_.selectPlaylist=t.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=t,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var t=1/(this.bandwidth||1),e=void 0;return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){le.log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return Zf(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Zf(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",function(){Xv(n),sm(n)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.tech_.ready(function(){return n.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(le.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var t=this,e=le.players[this.tech_.options_.playerId];e&&e.qualityLevels&&(this.qualityLevels_=e.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){om(t.qualityLevels_,t)}),this.playlists.on("mediachange",function(){im(t.qualityLevels_,t.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(t){this.masterPlaylistController_.setCurrentTime(t)}},{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(),Yh(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"dispose",this).call(this)}}]),e}(um),cm={name:"videojs-http-streaming",VERSION:"1.2.6",canHandleSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=le.mergeOptions(le.options,e);return cm.canPlayType(t.type,n)},handleSource:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=le.mergeOptions(le.options,n);return e.hls=new lm(t,e,r),e.hls.xhr=jf(),e.hls.src(t.src,t.type),e.hls},canPlayType:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=le.mergeOptions(le.options,e),r=n.hls.overrideNative,i=rm(t);return!i||nm.supportsTypeNatively(i)&&!r?"":"maybe"}};return void 0!==le.MediaSource&&void 0!==le.URL||(le.MediaSource=jp,le.URL=Pp),jp.supportsNativeMediaSources()&&le.getTech("Html5").registerSourceHandler(cm,0),le.HlsHandler=lm,le.HlsSourceHandler=cm,le.Hls=nm,le.use||le.registerComponent("Hls",nm),le.options.hls=le.options.hls||{},le.registerPlugin?le.registerPlugin("reloadSourceOnError",em):le.plugin("reloadSourceOnError",em),le}),function(){!function(t){var e=t&&t.videojs;e&&(e.CDN_VERSION="7.2.4")}(window)}(),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.flvjs=t()}}(function(){var t;return function(){function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){return i(e[a][1][t]||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}return t}()({1:[function(e,n,r){(function(i,o){!function(e,i){"object"==typeof r&&void 0!==n?n.exports=i():"function"==typeof t&&t.amd?t(i):e.ES6Promise=i()}(this,function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function n(t){return"function"==typeof t}function r(t){z=t}function a(t){V=t}function s(){return void 0!==G?function(){G(l)}:u()}function u(){var t=setTimeout;return function(){return t(l,1)}}function l(){for(var t=0;t<F;t+=2)(0,K[t])(K[t+1]),K[t]=void 0,K[t+1]=void 0;F=0}function c(t,e){var n=this,r=new this.constructor(h);void 0===r[Z]&&x(r);var i=n._state;if(i){var o=arguments[i-1];V(function(){return C(i,r,o,n._result)})}else E(n,r,t,e);return r}function d(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(h);return _(n,t),n}function h(){}function f(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function v(t){try{return t.then}catch(t){return et.error=t,et}}function m(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}function g(t,e,n){V(function(t){var r=!1,i=m(n,e,function(n){r||(r=!0,e!==n?_(t,n):T(t,n))},function(e){r||(r=!0,S(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,S(t,i))},t)}function y(t,e){e._state===$?T(t,e._result):e._state===tt?S(t,e._result):E(e,void 0,function(e){return _(t,e)},function(e){return S(t,e)})}function A(t,e,r){e.constructor===t.constructor&&r===c&&e.constructor.resolve===d?y(t,e):r===et?(S(t,et.error),et.error=null):void 0===r?T(t,e):n(r)?g(t,e,r):T(t,e)}function _(e,n){e===n?S(e,f()):t(n)?A(e,n,v(n)):T(e,n)}function b(t){t._onerror&&t._onerror(t._result),w(t)}function T(t,e){t._state===J&&(t._result=e,t._state=$,0!==t._subscribers.length&&V(w,t))}function S(t,e){t._state===J&&(t._state=tt,t._result=e,V(b,t))}function E(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+$]=n,i[o+tt]=r,0===o&&t._state&&V(w,t)}function w(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?C(n,r,i,o):i(o);t._subscribers.length=0}}function k(t,e){try{return t(e)}catch(t){return et.error=t,et}}function C(t,e,r,i){var o=n(r),a=void 0,s=void 0,u=void 0,l=void 0;if(o){if(a=k(r,i),a===et?(l=!0,s=a.error,a.error=null):u=!0,e===a)return void S(e,p())}else a=i,u=!0;e._state!==J||(o&&u?_(e,a):l?S(e,s):t===$?T(e,a):t===tt&&S(e,a))}function L(t,e){try{e(function(e){_(t,e)},function(e){S(t,e)})}catch(e){S(t,e)}}function I(){return nt++}function x(t){t[Z]=nt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function R(){return new Error("Array Methods must be provided an Array")}function O(t){return new rt(this,t).promise}function D(t){var e=this;return new e(B(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function M(t){var e=this,n=new e(h);return S(n,t),n}function j(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function P(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function N(){var t=void 0;if(void 0!==o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=it}var U=void 0;U=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var B=U,F=0,G=void 0,z=void 0,V=function(t,e){K[F]=t,K[F+1]=e,2===(F+=2)&&(z?z(l):X())},H="undefined"!=typeof window?window:void 0,W=H||{},Q=W.MutationObserver||W.WebKitMutationObserver,Y="undefined"==typeof self&&void 0!==i&&"[object process]"==={}.toString.call(i),q="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,K=new Array(1e3),X=void 0;X=Y?function(){return function(){return i.nextTick(l)}}():Q?function(){var t=0,e=new Q(l),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():q?function(){var t=new MessageChannel;return t.port1.onmessage=l,function(){return t.port2.postMessage(0)}}():void 0===H&&"function"==typeof e?function(){try{var t=Function("return this")().require("vertx");return G=t.runOnLoop||t.runOnContext,s()}catch(t){return u()}}():u();var Z=Math.random().toString(36).substring(2),J=void 0,$=1,tt=2,et={error:null},nt=0,rt=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(h),this.promise[Z]||x(this.promise),B(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&T(this.promise,this._result))):S(this.promise,R())}return t.prototype._enumerate=function(t){for(var e=0;this._state===J&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===d){var i=v(t);if(i===c&&t._state!==J)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===it){var o=new n(h);A(o,t,i),this._willSettleAt(o,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===J&&(this._remaining--,t===tt?S(r,n):this._result[e]=n),0===this._remaining&&T(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;E(t,void 0,function(t){return n._settledAt($,e,t)},function(t){return n._settledAt(tt,e,t)})},t}(),it=function(){function t(e){this[Z]=I(),this._result=this._state=void 0,this._subscribers=[],h!==e&&("function"!=typeof e&&j(),this instanceof t?L(this,e):P())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this,r=e.constructor;return n(t)?e.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}):e.then(t,t)},t}();return it.prototype.then=c,it.all=O,it.race=D,it.resolve=d,it.reject=M,it._setScheduler=r,it._setAsap=a,it._asap=V,it.polyfill=N,it.Promise=it,it})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],2:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),l=n.slice(),r=l.length,u=0;u<r;u++)l[u].apply(this,o);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],3:[function(t,e,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(d===setTimeout)return setTimeout(t,0);if((d===r||!d)&&setTimeout)return d=setTimeout,setTimeout(t,0);try{return d(t,0)}catch(e){try{return d.call(null,t,0)}catch(e){return d.call(this,t,0)}}}function a(t){if(h===clearTimeout)return clearTimeout(t);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){m&&p&&(m=!1,p.length?v=p.concat(v):g=-1,v.length&&u())}function u(){if(!m){var t=o(s);m=!0;for(var e=v.length;e;){for(p=v,v=[];++g<e;)p&&p[g].run();g=-1,e=v.length}p=null,m=!1,a(t)}}function l(t,e){this.fun=t,this.array=e}function c(){}var d,h,f=e.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:r}catch(t){d=r}try{h="function"==typeof clearTimeout?clearTimeout:i}catch(t){h=i}}();var p,v=[],m=!1,g=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];v.push(new l(t,e)),1!==v.length||m||o(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],4:[function(t,e,n){var r=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;e.exports=function(t,e){function n(t){m[t]=!0;for(var e in i[t][1]){var r=i[t][1][e];m[r]||n(r)}}for(var s,u=Object.keys(o),l=0,c=u.length;l<c;l++){var d=u[l],h=o[d].exports;if(h===t||h&&h.default===t){s=d;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var f={},l=0,c=u.length;l<c;l++){var d=u[l];f[d]=d}i[s]=["function(require,module,exports){"+t+"(self); }",f]}var p=Math.floor(Math.pow(16,8)*Math.random()).toString(16),v={};v[s]=s,i[p]=["function(require,module,exports){var f = require("+a(s)+");(f.default ? f.default : f)(self);}",v];var m={};n(p);var g="("+r+")({"+Object.keys(m).map(function(t){return a(t)+":["+i[t][0]+","+a(i[t][1])+"]"}).join(",")+"},{},["+a(p)+"])",y=window.URL||window.webkitURL||window.mozURL||window.msURL,A=new Blob([g],{type:"text/javascript"});if(e&&e.bare)return A;var _=y.createObjectURL(A),b=new Worker(_);return b.objectURL=_,b}},{}],5:[function(t,e,n){"use strict";function r(){return Object.assign({},i)}Object.defineProperty(n,"__esModule",{value:!0}),n.createDefaultConfig=r;var i=n.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0}},{}],6:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("../io/io-controller.js"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=t("../config.js"),u=function(){function t(){r(this,t)}return i(t,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var t=new a.default({},(0,s.createDefaultConfig)()),e=t.loaderType;return t.destroy(),"fetch-stream-loader"==e||"xhr-moz-chunked-loader"==e}},{key:"getNetworkLoaderTypeName",value:function(){var t=new a.default({},(0,s.createDefaultConfig)()),e=t.loaderType;return t.destroy(),e}},{key:"supportNativeMediaPlayback",value:function(e){void 0==t.videoElement&&(t.videoElement=window.document.createElement("video"));var n=t.videoElement.canPlayType(e);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var e={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return e.mseFlvPlayback=t.supportMSEH264Playback(),e.networkStreamIO=t.supportNetworkStreamIO(),e.networkLoaderName=t.getNetworkLoaderTypeName(),e.mseLiveFlvPlayback=e.mseFlvPlayback&&e.networkStreamIO,e.nativeMP4H264Playback=t.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeWebmVP8Playback=t.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=t.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e}}]),t}();n.default=u},{"../config.js":5,"../io/io-controller.js":23}],7:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return i(t,[{key:"isComplete",value:function(){var t=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,e=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&t&&e}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(t){if(null==this.keyframesIndex)return null;var e=this.keyframesIndex,n=this._search(e.times,t);return{index:n,milliseconds:e.times[n],fileposition:e.filepositions[n]}}},{key:"_search",value:function(t,e){var n=0,r=t.length-1,i=0,o=0,a=r;for(e<t[0]&&(n=0,o=a+1);o<=a;){if((i=o+Math.floor((a-o)/2))===r||e>=t[i]&&e<t[i+1]){n=i;break}t[i]<e?o=i+1:a=i-1}return n}}]),t}();n.default=o},{}],8:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n.SampleInfo=function t(e,n,i,o,a){r(this,t),this.dts=e,this.pts=n,this.duration=i,this.originalDts=o,this.isSyncPoint=a,this.fileposition=null},n.MediaSegmentInfo=function(){function t(){r(this,t),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return i(t,[{key:"appendSyncPoint",value:function(t){t.isSyncPoint=!0,this.syncPoints.push(t)}}]),t}(),n.IDRSampleList=function(){function t(){r(this,t),this._list=[]}return i(t,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(t){var e=this._list;0!==t.length&&(e.length>0&&t[0].originalDts<e[e.length-1].originalDts&&this.clear(),Array.prototype.push.apply(e,t))}},{key:"getLastSyncPointBeforeDts",value:function(t){if(0==this._list.length)return null;var e=this._list,n=0,r=e.length-1,i=0,o=0,a=r;for(t<e[0].dts&&(n=0,o=a+1);o<=a;){if((i=o+Math.floor((a-o)/2))===r||t>=e[i].dts&&t<e[i+1].dts){n=i;break}e[i].dts<t?o=i+1:a=i-1}return this._list[n]}}]),t}(),n.MediaSegmentInfoList=function(){function t(e){r(this,t),this._type=e,this._list=[],this._lastAppendLocation=-1}return i(t,[{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(t){var e=this._list;if(0===e.length)return-2;var n=e.length-1,r=0,i=0,o=n,a=0;if(t<e[0].originalBeginDts)return a=-1;for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||t>e[r].lastSample.originalDts&&t<e[r+1].originalBeginDts){a=r;break}e[r].originalBeginDts<t?i=r+1:o=r-1}return a}},{key:"_searchNearestSegmentAfter",value:function(t){return this._searchNearestSegmentBefore(t)+1}},{key:"append",value:function(t){var e=this._list,n=t,r=this._lastAppendLocation,i=0;-1!==r&&r<e.length&&n.originalBeginDts>=e[r].lastSample.originalDts&&(r===e.length-1||r<e.length-1&&n.originalBeginDts<e[r+1].originalBeginDts)?i=r+1:e.length>0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(t){var e=this._searchNearestSegmentBefore(t);return e>=0?this._list[e]:null}},{key:"getLastSampleBefore",value:function(t){var e=this.getLastSegmentBefore(t);return null!=e?e.lastSample:null}},{key:"getLastSyncPointBefore",value:function(t){for(var e=this._searchNearestSegmentBefore(t),n=this._list[e].syncPoints;0===n.length&&e>0;)e--,n=this._list[e].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),t}()},{}],9:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("events"),s=r(a),u=t("../utils/logger.js"),l=r(u),c=t("../utils/browser.js"),d=r(c),h=t("./mse-events.js"),f=r(h),p=t("./media-segment-info.js"),v=t("../utils/exception.js"),m=function(){function t(e){i(this,t),this.TAG="MSEController",this._config=e,this._emitter=new s.default,this._config.isLive&&void 0==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new p.IDRSampleList}return o(t,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"attachMediaElement",value:function(t){if(this._mediaSource)throw new v.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var e=this._mediaSource=new window.MediaSource;e.addEventListener("sourceopen",this.e.onSourceOpen),e.addEventListener("sourceended",this.e.onSourceEnded),e.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=t,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),t.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var t=this._mediaSource;for(var e in this._sourceBuffers){var n=this._pendingSegments[e];n.splice(0,n.length),this._pendingSegments[e]=null,this._pendingRemoveRanges[e]=null,this._lastInitSegments[e]=null;var r=this._sourceBuffers[e];if(r){if("closed"!==t.readyState){try{t.removeSourceBuffer(r)}catch(t){l.default.e(this.TAG,t.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[e]=null,this._sourceBuffers[e]=null}}if("open"===t.readyState)try{t.endOfStream()}catch(t){l.default.e(this.TAG,t.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(t,e){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(t),void this._pendingSegments[t.type].push(t);var n=t,r=""+n.container;n.codec&&n.codec.length>0&&(r+=";codecs="+n.codec);var i=!1;if(l.default.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[n.type]=n,r!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])l.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+r);else{i=!0;try{var o=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(r);o.addEventListener("error",this.e.onSourceBufferError),o.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(t){return l.default.e(this.TAG,t.message),void this._emitter.emit(f.default.ERROR,{code:t.code,msg:t.message})}}this._mimeTypes[n.type]=r}e||this._pendingSegments[n.type].push(n),i||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),d.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(t){var e=t;this._pendingSegments[e.type].push(e),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[e.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(t){for(var e in this._sourceBuffers)if(this._sourceBuffers[e]){var n=this._sourceBuffers[e];if("open"===this._mediaSource.readyState)try{n.abort()}catch(t){l.default.e(this.TAG,t.message)}this._idrList.clear();var r=this._pendingSegments[e];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var i=0;i<n.buffered.length;i++){var o=n.buffered.start(i),a=n.buffered.end(i);this._pendingRemoveRanges[e].push({start:o,end:a})}if(n.updating||this._doRemoveRanges(),d.default.safari){var s=this._lastInitSegments[e];s&&(this._pendingSegments[e].push(s),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var t=this._mediaSource,e=this._sourceBuffers;if(!t||"open"!==t.readyState)return void(t&&"closed"===t.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0));e.video&&e.video.updating||e.audio&&e.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,t.endOfStream())}},{key:"getNearestKeyframe",value:function(t){return this._idrList.getLastSyncPointBeforeDts(t)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var t=this._mediaElement.currentTime;for(var e in this._sourceBuffers){var n=this._sourceBuffers[e];if(n){var r=n.buffered;if(r.length>=1&&t-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var t=this._mediaElement.currentTime;for(var e in this._sourceBuffers){var n=this._sourceBuffers[e];if(n){for(var r=n.buffered,i=!1,o=0;o<r.length;o++){var a=r.start(o),s=r.end(o);if(a<=t&&t<s+3){if(t-a>=this._config.autoCleanupMaxBackwardDuration){i=!0;var u=t-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[e].push({start:a,end:u})}}else s<t&&(i=!0,this._pendingRemoveRanges[e].push({start:a,end:s}))}i&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var t=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(t.video&&t.video.updating||t.audio&&t.audio.updating)){var e=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(e)||n>e)&&(l.default.v(this.TAG,"Update MediaSource duration from "+e+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var t in this._pendingRemoveRanges)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating)for(var e=this._sourceBuffers[t],n=this._pendingRemoveRanges[t];n.length&&!e.updating;){var r=n.shift();e.remove(r.start,r.end)}}},{key:"_doAppendSegments",value:function(){var t=this._pendingSegments;for(var e in t)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating&&t[e].length>0){var n=t[e].shift();if(n.timestampOffset){var r=this._sourceBuffers[e].timestampOffset,i=n.timestampOffset/1e3,o=Math.abs(r-i);o>.1&&(l.default.v(this.TAG,"Update MPEG audio timestampOffset from "+r+" to "+i),this._sourceBuffers[e].timestampOffset=i),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[e].appendBuffer(n.data),this._isBufferFull=!1,"video"===e&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(t){this._pendingSegments[e].unshift(n),22===t.code?(this._isBufferFull||this._emitter.emit(f.default.BUFFER_FULL),this._isBufferFull=!0):(l.default.e(this.TAG,t.message),this._emitter.emit(f.default.ERROR,{code:t.code,msg:t.message}))}}}},{key:"_onSourceOpen",value:function(){if(l.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var t=this._pendingSourceBufferInit;t.length;){var e=t.shift();this.appendInitSegment(e,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(f.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){l.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){l.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var t=this._pendingSegments;return t.video.length>0||t.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var t=this._pendingRemoveRanges;return t.video.length>0||t.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(f.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(t){l.default.e(this.TAG,"SourceBuffer Error: "+t)}}]),t}();n.default=m},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./media-segment-info.js":8,"./mse-events.js":10,events:2}],10:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};n.default=r},{}],11:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("events"),s=r(a),u=t("../utils/logger.js"),l=r(u),c=t("../utils/logging-control.js"),d=r(c),h=t("./transmuxing-controller.js"),f=r(h),p=t("./transmuxing-events.js"),v=r(p),m=t("./transmuxing-worker.js"),g=r(m),y=t("./media-info.js"),A=r(y),_=function(){function e(n,r){if(i(this,e),this.TAG="Transmuxer",this._emitter=new s.default,r.enableWorker&&"undefined"!=typeof Worker)try{var o=t("webworkify");this._worker=o(g.default),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[n,r]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},d.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:d.default.getConfig()})}catch(t){l.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new f.default(n,r)}else this._controller=new f.default(n,r);if(this._controller){var a=this._controller;a.on(v.default.IO_ERROR,this._onIOError.bind(this)),a.on(v.default.DEMUX_ERROR,this._onDemuxError.bind(this)),a.on(v.default.INIT_SEGMENT,this._onInitSegment.bind(this)),a.on(v.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),a.on(v.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),a.on(v.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),a.on(v.default.MEDIA_INFO,this._onMediaInfo.bind(this)),a.on(v.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),a.on(v.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),a.on(v.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),a.on(v.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return o(e,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),d.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(t){this._worker?this._worker.postMessage({cmd:"seek",param:t}):this._controller.seek(t)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(t,e){var n=this;Promise.resolve().then(function(){n._emitter.emit(v.default.INIT_SEGMENT,t,e)})}},{key:"_onMediaSegment",value:function(t,e){var n=this;Promise.resolve().then(function(){n._emitter.emit(v.default.MEDIA_SEGMENT,t,e)})}},{key:"_onLoadingComplete",value:function(){var t=this;Promise.resolve().then(function(){t._emitter.emit(v.default.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var t=this;Promise.resolve().then(function(){t._emitter.emit(v.default.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(t){var e=this;Promise.resolve().then(function(){e._emitter.emit(v.default.MEDIA_INFO,t)})}},{key:"_onMetaDataArrived",value:function(t){var e=this;Promise.resolve().then(function(){e._emitter.emit(v.default.METADATA_ARRIVED,t)})}},{key:"_onScriptDataArrived",value:function(t){var e=this;Promise.resolve().then(function(){e._emitter.emit(v.default.SCRIPTDATA_ARRIVED,t)})}},{key:"_onStatisticsInfo",value:function(t){var e=this;Promise.resolve().then(function(){e._emitter.emit(v.default.STATISTICS_INFO,t)})}},{key:"_onIOError",value:function(t,e){var n=this;Promise.resolve().then(function(){n._emitter.emit(v.default.IO_ERROR,t,e)})}},{key:"_onDemuxError",value:function(t,e){var n=this;Promise.resolve().then(function(){n._emitter.emit(v.default.DEMUX_ERROR,t,e)})}},{key:"_onRecommendSeekpoint",value:function(t){var e=this;Promise.resolve().then(function(){e._emitter.emit(v.default.RECOMMEND_SEEKPOINT,t)})}},{key:"_onLoggingConfigChanged",value:function(t){this._worker&&this._worker.postMessage({cmd:"logging_config",param:t})}},{key:"_onWorkerMessage",value:function(t){var e=t.data,n=e.data;if("destroyed"===e.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(e.msg){case v.default.INIT_SEGMENT:case v.default.MEDIA_SEGMENT:this._emitter.emit(e.msg,n.type,n.data);break;case v.default.LOADING_COMPLETE:case v.default.RECOVERED_EARLY_EOF:this._emitter.emit(e.msg);break;case v.default.MEDIA_INFO:Object.setPrototypeOf(n,A.default.prototype),this._emitter.emit(e.msg,n);break;case v.default.METADATA_ARRIVED:case v.default.SCRIPTDATA_ARRIVED:case v.default.STATISTICS_INFO:this._emitter.emit(e.msg,n);break;case v.default.IO_ERROR:case v.default.DEMUX_ERROR:this._emitter.emit(e.msg,n.type,n.info);break;case v.default.RECOMMEND_SEEKPOINT:this._emitter.emit(e.msg,n);break;case"logcat_callback":l.default.emitter.emit("log",n.type,n.logcat)}}}]),e}();n.default=_},{"../utils/logger.js":41,"../utils/logging-control.js":42,"./media-info.js":7,"./transmuxing-controller.js":12,"./transmuxing-events.js":13,"./transmuxing-worker.js":14,events:2,webworkify:4}],12:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("events"),s=r(a),u=t("../utils/logger.js"),l=r(u),c=t("../utils/browser.js"),d=r(c),h=t("./media-info.js"),f=r(h),p=t("../demux/flv-demuxer.js"),v=r(p),m=t("../remux/mp4-remuxer.js"),g=r(m),y=t("../demux/demux-errors.js"),A=r(y),_=t("../io/io-controller.js"),b=r(_),T=t("./transmuxing-events.js"),S=r(T),E=(t("../io/loader.js"),function(){function t(e,n){i(this,t),this.TAG="TransmuxingController",this._emitter=new s.default,this._config=n,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),"boolean"!=typeof e.cors&&(e.cors=!0),"boolean"!=typeof e.withCredentials&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;var r=0;this._mediaDataSource.segments.forEach(function(t){t.timestampBase=r,r+=t.duration,t.cors=e.cors,t.withCredentials=e.withCredentials,n.referrerPolicy&&(t.referrerPolicy=n.referrerPolicy)}),isNaN(r)||this._mediaDataSource.duration===r||(this._mediaDataSource.duration=r),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return o(t,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(t,e){this._currentSegmentIndex=t;var n=this._mediaDataSource.segments[t],r=this._ioctl=new b.default(n,this._config,t);r.onError=this._onIOException.bind(this),r.onSeeked=this._onIOSeeked.bind(this),r.onComplete=this._onIOComplete.bind(this),r.onRedirect=this._onIORedirect.bind(this),r.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),e?this._demuxer.bindDataSource(this._ioctl):r.onDataArrival=this._onInitChunkArrival.bind(this),r.open(e)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(t){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var e=this._searchSegmentIndexContains(t);if(e===this._currentSegmentIndex){var n=this._mediaInfo.segments[e];if(void 0==n)this._pendingSeekTime=t;else{var r=n.getNearestKeyframe(t);this._remuxer.seek(r.milliseconds),this._ioctl.seek(r.fileposition),this._pendingResolveSeekPoint=r.milliseconds}}else{var i=this._mediaInfo.segments[e];if(void 0==i)this._pendingSeekTime=t,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(e);else{var o=i.getNearestKeyframe(t);this._internalAbort(),this._remuxer.seek(t),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[e].timestampBase,this._loadSegment(e,o.fileposition),this._pendingResolveSeekPoint=o.milliseconds,this._reportSegmentMediaInfo(e)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(t){for(var e=this._mediaDataSource.segments,n=e.length-1,r=0;r<e.length;r++)if(t<e[r].timestampBase){n=r-1;break}return n}},{key:"_onInitChunkArrival",value:function(t,e){var n=this,r=null,i=0;if(e>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,i=this._demuxer.parseChunks(t,e);else if((r=v.default.probe(t)).match){this._demuxer=new v.default(r,this._config),this._remuxer||(this._remuxer=new g.default(this._config));var o=this._mediaDataSource;void 0==o.duration||isNaN(o.duration)||(this._demuxer.overridedDuration=o.duration),"boolean"==typeof o.hasAudio&&(this._demuxer.overridedHasAudio=o.hasAudio),"boolean"==typeof o.hasVideo&&(this._demuxer.overridedHasVideo=o.hasVideo),this._demuxer.timestampBase=o.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),i=this._demuxer.parseChunks(t,e)}else r=null,l.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){n._internalAbort()}),this._emitter.emit(S.default.DEMUX_ERROR,A.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),i=0;return i}},{key:"_onMediaInfo",value:function(t){var e=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},t),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,f.default.prototype));var n=Object.assign({},t);Object.setPrototypeOf(n,f.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then(function(){var t=e._pendingSeekTime;e._pendingSeekTime=null,e.seek(t)})}},{key:"_onMetaDataArrived",value:function(t){this._emitter.emit(S.default.METADATA_ARRIVED,t)}},{key:"_onScriptDataArrived",value:function(t){this._emitter.emit(S.default.SCRIPTDATA_ARRIVED,t)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(t){var e=t,n=e+1;n<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(n)):(this._remuxer.flushStashedSamples(),this._emitter.emit(S.default.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(t){var e=this._ioctl.extraData;this._mediaDataSource.segments[e].redirectedURL=t}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(S.default.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(t,e){l.default.e(this.TAG,"IOException: type = "+t+", code = "+e.code+", msg = "+e.msg),this._emitter.emit(S.default.IO_ERROR,t,e),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(t,e){l.default.e(this.TAG,"DemuxException: type = "+t+", info = "+e),this._emitter.emit(S.default.DEMUX_ERROR,t,e)}},{key:"_onRemuxerInitSegmentArrival",value:function(t,e){this._emitter.emit(S.default.INIT_SEGMENT,t,e)}},{key:"_onRemuxerMediaSegmentArrival",value:function(t,e){if(null==this._pendingSeekTime&&(this._emitter.emit(S.default.MEDIA_SEGMENT,t,e),null!=this._pendingResolveSeekPoint&&"video"===t)){var n=e.info.syncPoints,r=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,d.default.safari&&n.length>0&&n[0].originalDts===r&&(r=n[0].pts),this._emitter.emit(S.default.RECOMMEND_SEEKPOINT,r)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(t){var e=this._mediaInfo.segments[t],n=Object.assign({},e);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(S.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var t={};t.url=this._ioctl.currentURL,t.hasRedirect=this._ioctl.hasRedirect,t.hasRedirect&&(t.redirectedURL=this._ioctl.currentRedirectedURL),t.speed=this._ioctl.currentSpeed,t.loaderType=this._ioctl.loaderType,t.currentSegmentIndex=this._currentSegmentIndex,t.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(S.default.STATISTICS_INFO,t)}}]),t}());n.default=E},{"../demux/demux-errors.js":16,"../demux/flv-demuxer.js":18,"../io/io-controller.js":23,"../io/loader.js":24,"../remux/mp4-remuxer.js":38,"../utils/browser.js":39,"../utils/logger.js":41,"./media-info.js":7,"./transmuxing-events.js":13,events:2}],13:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};n.default=r},{}],14:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var i=t("../utils/logger.js"),o=(r(i),t("../utils/logging-control.js")),a=r(o),s=t("../utils/polyfill.js"),u=r(s),l=t("./transmuxing-controller.js"),c=r(l),d=t("./transmuxing-events.js"),h=r(d),f=function(t){function e(e,n){var r={msg:h.default.INIT_SEGMENT,data:{type:e,data:n}};t.postMessage(r,[n.data])}function n(e,n){var r={msg:h.default.MEDIA_SEGMENT,data:{type:e,data:n}};t.postMessage(r,[n.data])}function r(){var e={msg:h.default.LOADING_COMPLETE};t.postMessage(e)}function i(){var e={msg:h.default.RECOVERED_EARLY_EOF};t.postMessage(e)}function o(e){var n={msg:h.default.MEDIA_INFO,data:e};t.postMessage(n)}function s(e){var n={msg:h.default.METADATA_ARRIVED,data:e};t.postMessage(n)}function l(e){var n={msg:h.default.SCRIPTDATA_ARRIVED,data:e};t.postMessage(n)}function d(e){var n={msg:h.default.STATISTICS_INFO,data:e};t.postMessage(n)}function f(e,n){t.postMessage({msg:h.default.IO_ERROR,data:{type:e,info:n}})}function p(e,n){t.postMessage({msg:h.default.DEMUX_ERROR,data:{type:e,info:n}})}function v(e){t.postMessage({msg:h.default.RECOMMEND_SEEKPOINT,data:e})}function m(e,n){t.postMessage({msg:"logcat_callback",data:{type:e,logcat:n}})}var g=null,y=m.bind(this);u.default.install(),t.addEventListener("message",function(u){switch(u.data.cmd){case"init":g=new c.default(u.data.param[0],u.data.param[1]),g.on(h.default.IO_ERROR,f.bind(this)),g.on(h.default.DEMUX_ERROR,p.bind(this)),g.on(h.default.INIT_SEGMENT,e.bind(this)),g.on(h.default.MEDIA_SEGMENT,n.bind(this)),g.on(h.default.LOADING_COMPLETE,r.bind(this)),g.on(h.default.RECOVERED_EARLY_EOF,i.bind(this)),g.on(h.default.MEDIA_INFO,o.bind(this)),g.on(h.default.METADATA_ARRIVED,s.bind(this)),g.on(h.default.SCRIPTDATA_ARRIVED,l.bind(this)),g.on(h.default.STATISTICS_INFO,d.bind(this)),g.on(h.default.RECOMMEND_SEEKPOINT,v.bind(this));break;case"destroy":g&&(g.destroy(),g=null),t.postMessage({msg:"destroyed"});break;case"start":g.start();break;case"stop":g.stop();break;case"seek":g.seek(u.data.param);break;case"pause":g.pause();break;case"resume":g.resume();break;case"logging_config":var m=u.data.param;a.default.applyConfig(m),!0===m.enableCallback?a.default.addLogListener(y):a.default.removeLogListener(y)}})};n.default=f},{"../utils/logger.js":41,"../utils/logging-control.js":42,"../utils/polyfill.js":43,"./transmuxing-controller.js":12,"./transmuxing-events.js":13}],15:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("../utils/logger.js"),s=r(a),u=t("../utils/utf8-conv.js"),l=r(u),c=t("../utils/exception.js"),d=function(){var t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]}(),h=function(){function t(){i(this,t)}return o(t,null,[{key:"parseScriptData",value:function(e,n,r){var i={};try{var o=t.parseValue(e,n,r),a=t.parseValue(e,n+o.size,r-o.size);i[o.data]=a.data}catch(t){s.default.e("AMF",t.toString())}return i}},{key:"parseObject",value:function(e,n,r){if(r<3)throw new c.IllegalStateException("Data not enough when parse ScriptDataObject");var i=t.parseString(e,n,r),o=t.parseValue(e,n+i.size,r-i.size),a=o.objectEnd;return{data:{name:i.data,value:o.data},size:i.size+o.size,objectEnd:a}}},{key:"parseVariable",value:function(e,n,r){return t.parseObject(e,n,r)}},{key:"parseString",value:function(t,e,n){if(n<2)throw new c.IllegalStateException("Data not enough when parse String");var r=new DataView(t,e,n),i=r.getUint16(0,!d),o=void 0;return o=i>0?(0,l.default)(new Uint8Array(t,e+2,i)):"",{data:o,size:2+i}}},{key:"parseLongString",value:function(t,e,n){if(n<4)throw new c.IllegalStateException("Data not enough when parse LongString");var r=new DataView(t,e,n),i=r.getUint32(0,!d),o=void 0;return o=i>0?(0,l.default)(new Uint8Array(t,e+4,i)):"",{data:o,size:4+i}}},{key:"parseDate",value:function(t,e,n){if(n<10)throw new c.IllegalStateException("Data size invalid when parse Date");var r=new DataView(t,e,n),i=r.getFloat64(0,!d);return i+=60*r.getInt16(8,!d)*1e3,{data:new Date(i),size:10}}},{key:"parseValue",value:function(e,n,r){if(r<1)throw new c.IllegalStateException("Data not enough when parse Value");var i=new DataView(e,n,r),o=1,a=i.getUint8(0),u=void 0,l=!1;try{switch(a){case 0:u=i.getFloat64(1,!d),o+=8;break;case 1:u=!!i.getUint8(1),o+=1;break;case 2:var h=t.parseString(e,n+1,r-1);u=h.data,o+=h.size;break;case 3:u={};var f=0;for(9==(16777215&i.getUint32(r-4,!d))&&(f=3);o<r-4;){var p=t.parseObject(e,n+o,r-o-f);if(p.objectEnd)break;u[p.data.name]=p.data.value,o+=p.size}o<=r-3&&9==(16777215&i.getUint32(o-1,!d))&&(o+=3);break;case 8:u={},o+=4;var v=0;for(9==(16777215&i.getUint32(r-4,!d))&&(v=3);o<r-8;){var m=t.parseVariable(e,n+o,r-o-v);if(m.objectEnd)break;u[m.data.name]=m.data.value,o+=m.size}o<=r-3&&9==(16777215&i.getUint32(o-1,!d))&&(o+=3);break;case 9:u=void 0,o=1,l=!0;break;case 10:u=[];var g=i.getUint32(1,!d);o+=4;for(var y=0;y<g;y++){var A=t.parseValue(e,n+o,r-o);u.push(A.data),o+=A.size}break;case 11:var _=t.parseDate(e,n+1,r-1);u=_.data,o+=_.size;break;case 12:var b=t.parseString(e,n+1,r-1);u=b.data,o+=b.size;break;default:o=r,s.default.w("AMF","Unsupported AMF value type "+a)}}catch(t){s.default.e("AMF",t.toString())}return{data:u,size:o,objectEnd:l}}}]),t}();n.default=h},{"../utils/exception.js":40,"../utils/logger.js":41,"../utils/utf8-conv.js":44}],16:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};n.default=r},{}],17:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("../utils/exception.js"),a=function(){function t(e){r(this,t),this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}return i(t,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var t=this._total_bytes-this._buffer_index;if(t<=0)throw new o.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var e=Math.min(4,t),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+e)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=e,this._current_word_bits_left=8*e}},{key:"readBits",value:function(t){if(t>32)throw new o.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(t<=this._current_word_bits_left){var e=this._current_word>>>32-t;return this._current_word<<=t,this._current_word_bits_left-=t,e}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=t-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(r,this._current_word_bits_left),a=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,n=n<<i|a}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var t=void 0;for(t=0;t<this._current_word_bits_left;t++)if(0!=(this._current_word&2147483648>>>t))return this._current_word<<=t,this._current_word_bits_left-=t,t;return this._fillCurrentWord(),t+this._skipLeadingZero()}},{key:"readUEG",value:function(){var t=this._skipLeadingZero();return this.readBits(t+1)-1}},{key:"readSEG",value:function(){var t=this.readUEG();return 1&t?t+1>>>1:-1*(t>>>1)}}]),t}();n.default=a},{"../utils/exception.js":40}],18:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}Object.defineProperty(n,"__esModule",{value:!0});var a="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},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=t("../utils/logger.js"),l=r(u),c=t("./amf-parser.js"),d=r(c),h=t("./sps-parser.js"),f=r(h),p=t("./demux-errors.js"),v=r(p),m=t("../core/media-info.js"),g=r(m),y=t("../utils/exception.js"),A=function(){function t(e,n){i(this,t),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=e.hasAudioTrack,this._hasVideo=e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new g.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]}()}return s(t,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(t){return t.onDataArrival=this.parseChunks.bind(this),this}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new g.default}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(e,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new y.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,i=this._littleEndian;if(0===n){if(!(e.byteLength>13))return 0;r=t.probe(e).dataOffset}for(this._firstParse&&(this._firstParse=!1,n+r!==this._dataOffset&&l.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(e,r).getUint32(0,!i)&&l.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);r<e.byteLength;){this._dispatch=!0;var o=new DataView(e,r);if(r+11+4>e.byteLength)break;var a=o.getUint8(0),s=16777215&o.getUint32(0,!i);if(r+11+s+4>e.byteLength)break;if(8===a||9===a||18===a){var u=o.getUint8(4),c=o.getUint8(5),d=o.getUint8(6),h=o.getUint8(7),f=d|c<<8|u<<16|h<<24;0!=(16777215&o.getUint32(7,!i))&&l.default.w(this.TAG,"Meet tag which has StreamID != 0!");var p=r+11;switch(a){case 8:this._parseAudioData(e,p,s,f);break;case 9:this._parseVideoData(e,p,s,f,n+r);break;case 18:this._parseScriptData(e,p,s)}var v=o.getUint32(11+s,!i);v!==11+s&&l.default.w(this.TAG,"Invalid PrevTagSize "+v),r+=11+s+4}else l.default.w(this.TAG,"Unsupported tag type "+a+", skipped"),r+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r}},{key:"_parseScriptData",value:function(t,e,n){var r=d.default.parseScriptData(t,e,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!==a(r.onMetaData))return void l.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&l.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var i=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},i)),"boolean"==typeof i.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=i.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof i.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=i.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof i.audiodatarate&&(this._mediaInfo.audioDataRate=i.audiodatarate),"number"==typeof i.videodatarate&&(this._mediaInfo.videoDataRate=i.videodatarate),"number"==typeof i.width&&(this._mediaInfo.width=i.width),"number"==typeof i.height&&(this._mediaInfo.height=i.height),"number"==typeof i.duration){if(!this._durationOverrided){var o=Math.floor(i.duration*this._timescale);this._duration=o,this._mediaInfo.duration=o}}else this._mediaInfo.duration=0;if("number"==typeof i.framerate){var s=Math.floor(1e3*i.framerate);if(s>0){var u=s/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=s,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=u}}if("object"===a(i.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var c=i.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(c),i.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=i,l.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(t){for(var e=[],n=[],r=1;r<t.times.length;r++){var i=this._timestampBase+Math.floor(1e3*t.times[r]);e.push(i),n.push(t.filepositions[r])}return{times:e,filepositions:n}}},{key:"_parseAudioData",value:function(t,e,n,r){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){var i=(this._littleEndian,new DataView(t,e,n)),o=i.getUint8(0),a=o>>>4;if(2!==a&&10!==a)return void this._onError(v.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a);var s=0,u=(12&o)>>>2;if(!(u>=0&&u<=4))return void this._onError(v.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u);s=this._flvSoundRateTable[u];var c=1&o,d=this._audioMetadata,h=this._audioTrack;if(d||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),d=this._audioMetadata={},d.type="audio",d.id=h.id,d.timescale=this._timescale,d.duration=this._duration,d.audioSampleRate=s,d.channelCount=0===c?1:2),10===a){var f=this._parseAACAudioData(t,e+1,n-1);if(void 0==f)return;if(0===f.packetType){d.config&&l.default.w(this.TAG,"Found another AudioSpecificConfig!");var p=f.data;d.audioSampleRate=p.samplingRate,d.channelCount=p.channelCount,d.codec=p.codec,d.originalCodec=p.originalCodec,d.config=p.config,d.refSampleDuration=1024/d.audioSampleRate*d.timescale,l.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",d);var m=this._mediaInfo;m.audioCodec=d.originalCodec,m.audioSampleRate=d.audioSampleRate,m.audioChannelCount=d.channelCount,m.hasVideo?null!=m.videoCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}else if(1===f.packetType){var g=this._timestampBase+r,y={unit:f.data,length:f.data.byteLength,dts:g,pts:g};h.samples.push(y),h.length+=f.data.length}else l.default.e(this.TAG,"Flv: Unsupported AAC data type "+f.packetType)}else if(2===a){if(!d.codec){var A=this._parseMP3AudioData(t,e+1,n-1,!0);if(void 0==A)return;d.audioSampleRate=A.samplingRate,d.channelCount=A.channelCount,d.codec=A.codec,d.originalCodec=A.originalCodec,d.refSampleDuration=1152/d.audioSampleRate*d.timescale,l.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",d);var _=this._mediaInfo;_.audioCodec=d.codec,_.audioSampleRate=d.audioSampleRate,_.audioChannelCount=d.channelCount,_.audioDataRate=A.bitRate,_.hasVideo?null!=_.videoCodec&&(_.mimeType='video/x-flv; codecs="'+_.videoCodec+","+_.audioCodec+'"'):_.mimeType='video/x-flv; codecs="'+_.audioCodec+'"',_.isComplete()&&this._onMediaInfo(_)}var b=this._parseMP3AudioData(t,e+1,n-1,!1);if(void 0==b)return;var T=this._timestampBase+r,S={unit:b,length:b.byteLength,dts:T,pts:T};h.samples.push(S),h.length+=b.length}}}},{key:"_parseAACAudioData",value:function(t,e,n){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");var r={},i=new Uint8Array(t,e,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(t,e+1,n-1):r.data=i.subarray(1),r}},{key:"_parseAACAudioSpecificConfig",value:function(t,e,n){var r=new Uint8Array(t,e,n),i=null,o=0,a=0,s=0,u=null;if(o=a=r[0]>>>3,(s=(7&r[0])<<1|r[1]>>>7)<0||s>=this._mpegSamplingRates.length)return void this._onError(v.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");var l=this._mpegSamplingRates[s],c=(120&r[1])>>>3;if(c<0||c>=8)return void this._onError(v.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration");5===o&&(u=(7&r[1])<<1|r[2]>>>7,r[2]);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?s>=6?(o=5,i=new Array(4),u=s-3):(o=2,i=new Array(2),u=s):-1!==d.indexOf("android")?(o=2,i=new Array(2),u=s):(o=5,u=s,i=new Array(4),s>=6?u=s-3:1===c&&(o=2,i=new Array(2),u=s)),i[0]=o<<3,i[0]|=(15&s)>>>1,i[1]=(15&s)<<7,i[1]|=(15&c)<<3,5===o&&(i[1]|=(15&u)>>>1,i[2]=(1&u)<<7,i[2]|=8,i[3]=0),{config:i,samplingRate:l,channelCount:c,codec:"mp4a.40."+o,originalCodec:"mp4a.40."+a}}},{key:"_parseMP3AudioData",value:function(t,e,n,r){if(n<4)return void l.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");var i=(this._littleEndian,new Uint8Array(t,e,n)),o=null;if(r){if(255!==i[0])return;var a=i[1]>>>3&3,s=(6&i[1])>>1,u=(240&i[2])>>>4,c=(12&i[2])>>>2,d=i[3]>>>6&3,h=3!==d?2:1,f=0,p=0;switch(a){case 0:f=this._mpegAudioV25SampleRateTable[c];break;case 2:f=this._mpegAudioV20SampleRateTable[c];break;case 3:f=this._mpegAudioV10SampleRateTable[c]}switch(s){case 1:u<this._mpegAudioL3BitRateTable.length&&(p=this._mpegAudioL3BitRateTable[u]);break;case 2:u<this._mpegAudioL2BitRateTable.length&&(p=this._mpegAudioL2BitRateTable[u]);break;case 3:u<this._mpegAudioL1BitRateTable.length&&(p=this._mpegAudioL1BitRateTable[u])}o={bitRate:p,samplingRate:f,channelCount:h,codec:"mp3",originalCodec:"mp3"}}else o=i;return o}},{key:"_parseVideoData",value:function(t,e,n,r,i){if(n<=1)return void l.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var o=new Uint8Array(t,e,n)[0],a=(240&o)>>>4,s=15&o;if(7!==s)return void this._onError(v.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+s);this._parseAVCVideoPacket(t,e+1,n-1,r,i,a)}}},{key:"_parseAVCVideoPacket",value:function(t,e,n,r,i,o){if(n<4)return void l.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");var a=this._littleEndian,s=new DataView(t,e,n),u=s.getUint8(0),c=16777215&s.getUint32(0,!a),d=c<<8>>8;if(0===u)this._parseAVCDecoderConfigurationRecord(t,e+4,n-4);else if(1===u)this._parseAVCVideoData(t,e+4,n-4,r,i,o,d);else if(2!==u)return void this._onError(v.default.FORMAT_ERROR,"Flv: Invalid video packet type "+u)}},{key:"_parseAVCDecoderConfigurationRecord",value:function(t,e,n){if(n<7)return void l.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");var r=this._videoMetadata,i=this._videoTrack,o=this._littleEndian,a=new DataView(t,e,n);r?void 0!==r.avcc&&l.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),r=this._videoMetadata={},r.type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration);var s=a.getUint8(0),u=a.getUint8(1);if(a.getUint8(2),a.getUint8(3),1!==s||0===u)return void this._onError(v.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");if(this._naluLengthSize=1+(3&a.getUint8(4)),3!==this._naluLengthSize&&4!==this._naluLengthSize)return void this._onError(v.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));var c=31&a.getUint8(5);if(0===c)return void this._onError(v.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");c>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+c);for(var d=6,h=0;h<c;h++){var p=a.getUint16(d,!o);if(d+=2,0!==p){var m=new Uint8Array(t,e+d,p);d+=p;var g=f.default.parseSPS(m);if(0===h){r.codecWidth=g.codec_size.width,r.codecHeight=g.codec_size.height,r.presentWidth=g.present_size.width,r.presentHeight=g.present_size.height,r.profile=g.profile_string,r.level=g.level_string,r.bitDepth=g.bit_depth,r.chromaFormat=g.chroma_format,r.sarRatio=g.sar_ratio,r.frameRate=g.frame_rate,!1!==g.frame_rate.fixed&&0!==g.frame_rate.fps_num&&0!==g.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var y=r.frameRate.fps_den,A=r.frameRate.fps_num;r.refSampleDuration=r.timescale*(y/A);for(var _=m.subarray(1,4),b="avc1.",T=0;T<3;T++){var S=_[T].toString(16);S.length<2&&(S="0"+S),b+=S}r.codec=b;var E=this._mediaInfo;E.width=r.codecWidth,E.height=r.codecHeight,E.fps=r.frameRate.fps,E.profile=r.profile,E.level=r.level,E.refFrames=g.ref_frames,E.chromaFormat=g.chroma_format_string,E.sarNum=r.sarRatio.width,E.sarDen=r.sarRatio.height,E.videoCodec=b,E.hasAudio?null!=E.audioCodec&&(E.mimeType='video/x-flv; codecs="'+E.videoCodec+","+E.audioCodec+'"'):E.mimeType='video/x-flv; codecs="'+E.videoCodec+'"',E.isComplete()&&this._onMediaInfo(E)}}}var w=a.getUint8(d);if(0===w)return void this._onError(v.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");w>1&&l.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+w),d++;for(var k=0;k<w;k++){var C=a.getUint16(d,!o);d+=2,0!==C&&(d+=C)}r.avcc=new Uint8Array(n),r.avcc.set(new Uint8Array(t,e,n),0),l.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",r)}},{key:"_parseAVCVideoData",value:function(t,e,n,r,i,o,a){for(var s=this._littleEndian,u=new DataView(t,e,n),c=[],d=0,h=0,f=this._naluLengthSize,p=this._timestampBase+r,v=1===o;h<n;){if(h+4>=n){l.default.w(this.TAG,"Malformed Nalu near timestamp "+p+", offset = "+h+", dataSize = "+n);break}var m=u.getUint32(h,!s);if(3===f&&(m>>>=8),m>n-f)return void l.default.w(this.TAG,"Malformed Nalus near timestamp "+p+", NaluSize > DataSize!");var g=31&u.getUint8(h+f);5===g&&(v=!0);var y=new Uint8Array(t,e+h,f+m),A={type:g,data:y};c.push(A),d+=y.byteLength,h+=f+m}if(c.length){var _=this._videoTrack,b={units:c,length:d,isKeyframe:v,dts:p,cts:a,pts:p+a};v&&(b.fileposition=i),_.samples.push(b),_.length+=d}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(t){this._onTrackMetadata=t}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(t){this._onMediaInfo=t}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(t){this._onMetaDataArrived=t}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(t){this._onScriptDataArrived=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(t){this._onDataAvailable=t}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(t){this._timestampBase=t}},{key:"overridedDuration",get:function(){return this._duration},set:function(t){this._durationOverrided=!0,this._duration=t,this._mediaInfo.duration=t}},{key:"overridedHasAudio",set:function(t){this._hasAudioFlagOverrided=!0,this._hasAudio=t,this._mediaInfo.hasAudio=t}},{key:"overridedHasVideo",set:function(t){this._hasVideoFlagOverrided=!0,this._hasVideo=t,this._mediaInfo.hasVideo=t}}],[{key:"probe",value:function(t){var e=new Uint8Array(t),n={match:!1};if(70!==e[0]||76!==e[1]||86!==e[2]||1!==e[3])return n;var r=(4&e[4])>>>2!=0,i=0!=(1&e[4]),a=o(e,5);return a<9?n:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:r,hasVideoTrack:i}}}]),t}();n.default=A},{"../core/media-info.js":7,"../utils/exception.js":40,"../utils/logger.js":41,"./amf-parser.js":15,"./demux-errors.js":16,"./sps-parser.js":19}],19:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("./exp-golomb.js"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){r(this,t)}return i(t,null,[{key:"_ebsp2rbsp",value:function(t){for(var e=t,n=e.byteLength,r=new Uint8Array(n),i=0,o=0;o<n;o++)o>=2&&3===e[o]&&0===e[o-1]&&0===e[o-2]||(r[i]=e[o],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(e){var n=t._ebsp2rbsp(e),r=new a.default(n);r.readByte();var i=r.readByte();r.readByte();var o=r.readByte();r.readUEG();var s=t.getProfileString(i),u=t.getLevelString(o),l=1,c=420,d=[0,420,422,444],h=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(l=r.readUEG(),3===l&&r.readBits(1),l<=3&&(c=d[l]),h=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var f=3!==l?8:12,p=0;p<f;p++)r.readBool()&&(p<6?t._skipScalingList(r,16):t._skipScalingList(r,64));r.readUEG();var v=r.readUEG();if(0===v)r.readUEG();else if(1===v){r.readBits(1),r.readSEG(),r.readSEG();for(var m=r.readUEG(),g=0;g<m;g++)r.readSEG()}var y=r.readUEG();r.readBits(1);var A=r.readUEG(),_=r.readUEG(),b=r.readBits(1);0===b&&r.readBits(1),r.readBits(1);var T=0,S=0,E=0,w=0;r.readBool()&&(T=r.readUEG(),S=r.readUEG(),E=r.readUEG(),w=r.readUEG());var k=1,C=1,L=0,I=!0,x=0,R=0;if(r.readBool()){if(r.readBool()){var O=r.readByte(),D=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];O>0&&O<16?(k=D[O-1],C=M[O-1]):255===O&&(k=r.readByte()<<8|r.readByte(),C=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var j=r.readBits(32),P=r.readBits(32);I=r.readBool(),x=P,R=2*j,L=x/R}}var N=1;1===k&&1===C||(N=k/C);var U=0,B=0;if(0===l)U=1,B=2-b;else{var F=3===l?1:2,G=1===l?2:1;U=F,B=G*(2-b)}var z=16*(A+1),V=16*(_+1)*(2-b);z-=(T+S)*U,V-=(E+w)*B;var H=Math.ceil(z*N);return r.destroy(),r=null,{profile_string:s,level_string:u,bit_depth:h,ref_frames:y,chroma_format:c,chroma_format_string:t.getChromaFormatString(c),frame_rate:{fixed:I,fps:L,fps_den:R,fps_num:x},sar_ratio:{width:k,height:C},codec_size:{width:z,height:V},present_size:{width:H,height:V}}}},{key:"_skipScalingList",value:function(t,e){for(var n=8,r=8,i=0,o=0;o<e;o++)0!==r&&(i=t.readSEG(),r=(n+i+256)%256),n=0===r?n:r}},{key:"getProfileString",value:function(t){switch(t){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(t){return(t/10).toFixed(1)}},{key:"getChromaFormatString",value:function(t){switch(t){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),t}();n.default=s},{"./exp-golomb.js":17}],20:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n=t;if(null==n||"object"!==(void 0===n?"undefined":s(n)))throw new T.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new T.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new p.default(n,e);default:return new m.default(n,e)}}function o(){return d.default.supportMSEH264Playback()}function a(){return d.default.getFeatureList()}Object.defineProperty(n,"__esModule",{value:!0});var s="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},u=t("./utils/polyfill.js"),l=r(u),c=t("./core/features.js"),d=r(c),h=t("./io/loader.js"),f=t("./player/flv-player.js"),p=r(f),v=t("./player/native-player.js"),m=r(v),g=t("./player/player-events.js"),y=r(g),A=t("./player/player-errors.js"),_=t("./utils/logging-control.js"),b=r(_),T=t("./utils/exception.js");l.default.install();var S={};S.createPlayer=i,S.isSupported=o,S.getFeatureList=a,S.BaseLoader=h.BaseLoader,S.LoaderStatus=h.LoaderStatus,S.LoaderErrors=h.LoaderErrors,S.Events=y.default,S.ErrorTypes=A.ErrorTypes,S.ErrorDetails=A.ErrorDetails,S.FlvPlayer=p.default,S.NativePlayer=m.default,S.LoggingControl=b.default,Object.defineProperty(S,"version",{enumerable:!0,get:function(){return"1.4.2"}}),n.default=S},{"./core/features.js":6,"./io/loader.js":24,"./player/flv-player.js":32,"./player/native-player.js":33,"./player/player-errors.js":34,"./player/player-events.js":35,"./utils/exception.js":40,"./utils/logging-control.js":42,"./utils/polyfill.js":43}],21:[function(t,e,n){"use strict";e.exports=t("./flv.js").default},{"./flv.js":20}],22:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(n,"__esModule",{value:!0});var s="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},u=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=t("../utils/logger.js"),d=(r(c),t("../utils/browser.js")),h=r(d),f=t("./loader.js"),p=t("../utils/exception.js"),v=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"fetch-stream-loader"));return r.TAG="FetchStreamLoader",r._seekHandler=t,r._config=n,r._needStash=!0,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}return a(e,t),l(e,null,[{key:"isSupported",value:function(){try{var t=h.default.msedge&&h.default.version.minor>=15048,e=!h.default.msedge||t;return self.fetch&&self.ReadableStream&&e}catch(t){return!1}}}]),l(e,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"open",value:function(t,e){var n=this;this._dataSource=t,this._range=e;var r=t.url;this._config.reuseRedirectedURL&&void 0!=t.redirectedURL&&(r=t.redirectedURL);var i=this._seekHandler.getConfig(r,e),o=new self.Headers;if("object"===s(i.headers)){var a=i.headers;for(var u in a)a.hasOwnProperty(u)&&o.append(u,a[u])}var l={method:"GET",headers:o,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===s(this._config.headers))for(var c in this._config.headers)o.append(c,this._config.headers[c]);!1===t.cors&&(l.mode="same-origin"),t.withCredentials&&(l.credentials="include"),t.referrerPolicy&&(l.referrerPolicy=t.referrerPolicy),this._status=f.LoaderStatus.kConnecting,self.fetch(i.url,l).then(function(t){if(n._requestAbort)return n._requestAbort=!1,void(n._status=f.LoaderStatus.kIdle);if(t.ok&&t.status>=200&&t.status<=299){if(t.url!==i.url&&n._onURLRedirect){var e=n._seekHandler.removeURLParameters(t.url);n._onURLRedirect(e)}var r=t.headers.get("Content-Length");return null!=r&&(n._contentLength=parseInt(r),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,t.body.getReader())}if(n._status=f.LoaderStatus.kError,!n._onError)throw new p.RuntimeException("FetchStreamLoader: Http code invalid, "+t.status+" "+t.statusText);n._onError(f.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}).catch(function(t){if(n._status=f.LoaderStatus.kError,!n._onError)throw t;n._onError(f.LoaderErrors.EXCEPTION,{code:-1,msg:t.message})})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(t){var e=this;return t.read().then(function(n){if(n.done)if(null!==e._contentLength&&e._receivedLength<e._contentLength){e._status=f.LoaderStatus.kError;var r=f.LoaderErrors.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!e._onError)throw new p.RuntimeException(i.msg);e._onError(r,i)}else e._status=f.LoaderStatus.kComplete,e._onComplete&&e._onComplete(e._range.from,e._range.from+e._receivedLength-1);else{if(!0===e._requestAbort)return e._requestAbort=!1,e._status=f.LoaderStatus.kComplete,t.cancel();e._status=f.LoaderStatus.kBuffering;var o=n.value.buffer,a=e._range.from+e._receivedLength;e._receivedLength+=o.byteLength,e._onDataArrival&&e._onDataArrival(o,a,e._receivedLength),e._pump(t)}}).catch(function(t){if(11!==t.code||!h.default.msedge){e._status=f.LoaderStatus.kError;var n=0,r=null;if(19!==t.code&&"network error"!==t.message||!(null===e._contentLength||null!==e._contentLength&&e._receivedLength<e._contentLength)?(n=f.LoaderErrors.EXCEPTION,r={code:t.code,msg:t.message}):(n=f.LoaderErrors.EARLY_EOF,r={code:t.code,msg:"Fetch stream meet Early-EOF"}),!e._onError)throw new p.RuntimeException(r.msg);e._onError(n,r)}})}}]),e}(f.BaseLoader);n.default=v},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],23:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("../utils/logger.js"),s=r(a),u=t("./speed-sampler.js"),l=r(u),c=t("./loader.js"),d=t("./fetch-stream-loader.js"),h=r(d),f=t("./xhr-moz-chunked-loader.js"),p=r(f),v=t("./xhr-msstream-loader.js"),m=(r(v),t("./xhr-range-loader.js")),g=r(m),y=t("./websocket-loader.js"),A=r(y),_=t("./range-seek-handler.js"),b=r(_),T=t("./param-seek-handler.js"),S=r(T),E=t("../utils/exception.js"),w=function(){function t(e,n,r){i(this,t),this.TAG="IOController",this._config=n,this._extraData=r,this._stashInitialSize=393216,void 0!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new l.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return o(t,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var t=this._config;if("range"===t.seekType)this._seekHandler=new b.default(this._config.rangeLoadZeroStart);else if("param"===t.seekType){var e=t.seekParamStart||"bstart",n=t.seekParamEnd||"bend";this._seekHandler=new S.default(e,n)}else{if("custom"!==t.seekType)throw new E.InvalidArgumentException("Invalid seekType in config: "+t.seekType);if("function"!=typeof t.customSeekHandler)throw new E.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new t.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=A.default;else if(h.default.isSupported())this._loaderClass=h.default;else if(p.default.isSupported())this._loaderClass=p.default;else{if(!g.default.isSupported())throw new E.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=g.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(t){this._currentRange={from:0,to:-1},t&&(this._currentRange.from=t),this._speedSampler.reset(),t||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var t=this._resumeFrom;this._resumeFrom=0,this._internalSeek(t,!0)}}},{key:"seek",value:function(t){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(t,!0)}},{key:"_internalSeek",value:function(t,e){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(e),this._loader.destroy(),this._loader=null;var n={from:t,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(t){if(!t||"string"!=typeof t||0===t.length)throw new E.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=t}},{key:"_expandBuffer",value:function(t){for(var e=this._stashSize;e+1048576<t;)e*=2;if((e+=1048576)!==this._bufferSize){var n=new ArrayBuffer(e);if(this._stashUsed>0){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,e).set(r,0)}this._stashBuffer=n,this._bufferSize=e}}},{key:"_normalizeSpeed",value:function(t){var e=this._speedNormalizeList,n=e.length-1,r=0,i=0,o=n;if(t<e[0])return e[0];for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||t>=e[r]&&t<e[r+1])return e[r];e[r]<t?i=r+1:o=r-1}}},{key:"_adjustStashSize",value:function(t){var e=0;(e=this._config.isLive?t:t<512?t:t>=512&&t<=1024?Math.floor(1.5*t):2*t)>8192&&(e=8192);var n=1024*e+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*e}},{key:"_dispatchChunks",value:function(t,e){return this._currentRange.to=e+t.byteLength-1,this._onDataArrival(t,e)}},{key:"_onURLRedirect",value:function(t){this._redirectedURL=t,this._onRedirect&&this._onRedirect(t)}},{key:"_onContentLengthKnown",value:function(t){t&&this._fullRequestFlag&&(this._totalLength=t,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(t,e,n){if(!this._onDataArrival)throw new E.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(t.byteLength);var r=this._speedSampler.lastSecondKBps;if(0!==r){var i=this._normalizeSpeed(r);this._speedNormalized!==i&&(this._speedNormalized=i,this._adjustStashSize(i))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=e),this._stashUsed+t.byteLength<=this._stashSize){var o=new Uint8Array(this._stashBuffer,0,this._stashSize);o.set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength}else{var a=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var s=this._stashBuffer.slice(0,this._stashUsed),u=this._dispatchChunks(s,this._stashByteStart);if(u<s.byteLength){if(u>0){var l=new Uint8Array(s,u);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=u}}else this._stashUsed=0,this._stashByteStart+=u;this._stashUsed+t.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+t.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength}else{var c=this._dispatchChunks(t,e);if(c<t.byteLength){var d=t.byteLength-c;d>this._bufferSize&&(this._expandBuffer(d),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(t,c),0),this._stashUsed+=d,this._stashByteStart=e+c}}}else if(0===this._stashUsed){var h=this._dispatchChunks(t,e);if(h<t.byteLength){var f=t.byteLength-h;f>this._bufferSize&&this._expandBuffer(f);var p=new Uint8Array(this._stashBuffer,0,this._bufferSize);p.set(new Uint8Array(t,h),0),this._stashUsed+=f,this._stashByteStart=e+h}}else{this._stashUsed+t.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+t.byteLength);var v=new Uint8Array(this._stashBuffer,0,this._bufferSize);v.set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength;var m=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(m<this._stashUsed&&m>0){var g=new Uint8Array(this._stashBuffer,m);v.set(g,0)}this._stashUsed-=m,this._stashByteStart+=m}}}},{key:"_flushStashBuffer",value:function(t){if(this._stashUsed>0){var e=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(e,this._stashByteStart),r=e.byteLength-n;if(n<e.byteLength){if(!t){if(n>0){var i=new Uint8Array(this._stashBuffer,0,this._bufferSize),o=new Uint8Array(e,n);i.set(o,0),this._stashUsed=o.byteLength,this._stashByteStart+=n}return 0}s.default.w(this.TAG,r+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,r}return 0}},{key:"_onLoaderComplete",value:function(t,e){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(t,e){switch(s.default.e(this.TAG,"Loader error, code = "+e.code+", msg = "+e.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,t=c.LoaderErrors.UNRECOVERABLE_EARLY_EOF),t){case c.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(s.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}t=c.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case c.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case c.LoaderErrors.CONNECTING_TIMEOUT:case c.LoaderErrors.HTTP_STATUS_CODE_INVALID:case c.LoaderErrors.EXCEPTION:}if(!this._onError)throw new E.RuntimeException("IOException: "+e.msg);this._onError(t,e)}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(t){this._extraData=t}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(t){this._onDataArrival=t}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(t){this._onSeeked=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onComplete",get:function(){return this._onComplete},set:function(t){this._onComplete=t}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(t){this._onRedirect=t}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(t){this._onRecoveredEarlyEof=t}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||void 0!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===g.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}}]),t}();n.default=w},{"../utils/exception.js":40,"../utils/logger.js":41,"./fetch-stream-loader.js":22,"./loader.js":24,"./param-seek-handler.js":25,"./range-seek-handler.js":26,"./speed-sampler.js":27,"./websocket-loader.js":28,"./xhr-moz-chunked-loader.js":29,"./xhr-msstream-loader.js":30,"./xhr-range-loader.js":31}],24:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.BaseLoader=n.LoaderErrors=n.LoaderStatus=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("../utils/exception.js"),a=n.LoaderStatus={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4};n.LoaderErrors={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},n.BaseLoader=function(){function t(e){r(this,t),this._type=e||"undefined",this._status=a.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return i(t,[{key:"destroy",value:function(){this._status=a.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===a.kConnecting||this._status===a.kBuffering}},{key:"open",value:function(t,e){throw new o.NotImplementedException("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new o.NotImplementedException("Unimplemented abstract function!")}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(t){this._onContentLengthKnown=t}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(t){this._onURLRedirect=t}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(t){this._onDataArrival=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onComplete",get:function(){return this._onComplete},set:function(t){this._onComplete=t}}]),t}()},{"../utils/exception.js":40}],25:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e,n){r(this,t),this._startName=e,this._endName=n}return i(t,[{key:"getConfig",value:function(t,e){var n=t;if(0!==e.from||-1!==e.to){var r=!0;-1===n.indexOf("?")&&(n+="?",r=!1),r&&(n+="&"),n+=this._startName+"="+e.from.toString(),-1!==e.to&&(n+="&"+this._endName+"="+e.to.toString())}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(t){var e=t.split("?")[0],n=void 0,r=t.indexOf("?");-1!==r&&(n=t.substring(r+1));var i="";if(void 0!=n&&n.length>0)for(var o=n.split("&"),a=0;a<o.length;a++){var s=o[a].split("="),u=a>0;s[0]!==this._startName&&s[0]!==this._endName&&(u&&(i+="&"),i+=o[a])}return 0===i.length?e:e+"?"+i}}]),t}();n.default=o},{}],26:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){r(this,t),this._zeroStart=e||!1}return i(t,[{key:"getConfig",value:function(t,e){var n={};if(0!==e.from||-1!==e.to){var r=void 0;r=-1!==e.to?"bytes="+e.from.toString()+"-"+e.to.toString():"bytes="+e.from.toString()+"-",n.Range=r}else this._zeroStart&&(n.Range="bytes=0-");return{url:t,headers:n}}},{key:"removeURLParameters",value:function(t){return t}}]),t}();n.default=o},{}],27:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return i(t,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(t){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=t,this._totalBytes+=t):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=t,this._totalBytes+=t):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=t,this._totalBytes+=t,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var t=(this._now()-this._lastCheckpoint)/1e3;return 0==t&&(t=1),this._intervalBytes/t/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var t=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/t/1024}}]),t}();n.default=o},{}],28:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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}function o(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)}Object.defineProperty(n,"__esModule",{value:!0});var a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=t("../utils/logger.js"),l=(function(t){t&&t.__esModule}(u),t("./loader.js")),c=t("../utils/exception.js"),d=function(t){function e(){r(this,e);var t=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"websocket-loader"));return t.TAG="WebSocketLoader",t._needStash=!0,t._ws=null,t._requestAbort=!1,t._receivedLength=0,t}return o(e,t),s(e,null,[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(t){return!1}}}]),s(e,[{key:"destroy",value:function(){this._ws&&this.abort(),a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"open",value:function(t){try{var e=this._ws=new self.WebSocket(t.url);e.binaryType="arraybuffer",e.onopen=this._onWebSocketOpen.bind(this),e.onclose=this._onWebSocketClose.bind(this),e.onmessage=this._onWebSocketMessage.bind(this),e.onerror=this._onWebSocketError.bind(this),this._status=l.LoaderStatus.kConnecting}catch(t){this._status=l.LoaderStatus.kError;var n={code:t.code,msg:t.message};if(!this._onError)throw new c.RuntimeException(n.msg);this._onError(l.LoaderErrors.EXCEPTION,n)}}},{key:"abort",value:function(){var t=this._ws;!t||0!==t.readyState&&1!==t.readyState||(this._requestAbort=!0,t.close()),this._ws=null,this._status=l.LoaderStatus.kComplete}},{key:"_onWebSocketOpen",value:function(t){this._status=l.LoaderStatus.kBuffering}},{key:"_onWebSocketClose",value:function(t){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(t){var e=this;if(t.data instanceof ArrayBuffer)this._dispatchArrayBuffer(t.data);else if(t.data instanceof Blob){var n=new FileReader;n.onload=function(){e._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(t.data)}else{this._status=l.LoaderStatus.kError;var r={code:-1,msg:"Unsupported WebSocket message type: "+t.data.constructor.name};if(!this._onError)throw new c.RuntimeException(r.msg);this._onError(l.LoaderErrors.EXCEPTION,r)}}},{key:"_dispatchArrayBuffer",value:function(t){var e=t,n=this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(t){this._status=l.LoaderStatus.kError;var e={code:t.code,msg:t.message};if(!this._onError)throw new c.RuntimeException(e.msg);this._onError(l.LoaderErrors.EXCEPTION,e)}}]),e}(l.BaseLoader);n.default=d},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],29:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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}function o(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)}Object.defineProperty(n,"__esModule",{value:!0});var a="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},s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t("../utils/logger.js"),c=function(t){return t&&t.__esModule?t:{default:t}}(l),d=t("./loader.js"),h=t("../utils/exception.js"),f=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"xhr-moz-chunked-loader"));return o.TAG="MozChunkedLoader",o._seekHandler=t,o._config=n,o._needStash=!0,o._xhr=null,o._requestAbort=!1,o._contentLength=null,o._receivedLength=0,o}return o(e,t),u(e,null,[{key:"isSupported",value:function(){try{var t=new XMLHttpRequest;return t.open("GET","https://example.com",!0),t.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===t.responseType}catch(t){return c.default.w("MozChunkedLoader",t.message),!1}}}]),u(e,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"open",value:function(t,e){this._dataSource=t,this._range=e;var n=t.url;this._config.reuseRedirectedURL&&void 0!=t.redirectedURL&&(n=t.redirectedURL);var r=this._seekHandler.getConfig(n,e);this._requestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="moz-chunked-arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onloadend=this._onLoadEnd.bind(this),i.onerror=this._onXhrError.bind(this),t.withCredentials&&(i.withCredentials=!0),"object"===a(r.headers)){var o=r.headers;for(var s in o)o.hasOwnProperty(s)&&i.setRequestHeader(s,o[s])}if("object"===a(this._config.headers)){var u=this._config.headers;for(var l in u)u.hasOwnProperty(l)&&i.setRequestHeader(l,u[l])}this._status=d.LoaderStatus.kConnecting,i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=d.LoaderStatus.kComplete}},{key:"_onReadyStateChange",value:function(t){var e=t.target;if(2===e.readyState){if(void 0!=e.responseURL&&e.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(e.responseURL);this._onURLRedirect(n)}if(0!==e.status&&(e.status<200||e.status>299)){if(this._status=d.LoaderStatus.kError,!this._onError)throw new h.RuntimeException("MozChunkedLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(d.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}else this._status=d.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(t){if(this._status!==d.LoaderStatus.kError){null===this._contentLength&&null!==t.total&&0!==t.total&&(this._contentLength=t.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var e=t.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(t){if(!0===this._requestAbort)return void(this._requestAbort=!1);this._status!==d.LoaderStatus.kError&&(this._status=d.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(t){this._status=d.LoaderStatus.kError;var e=0,n=null;if(this._contentLength&&t.loaded<this._contentLength?(e=d.LoaderErrors.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(e=d.LoaderErrors.EXCEPTION,n={code:-1,msg:t.constructor.name+" "+t.type}),!this._onError)throw new h.RuntimeException(n.msg);this._onError(e,n)}}]),e}(d.BaseLoader);n.default=f},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],30:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(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}function o(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)}Object.defineProperty(n,"__esModule",{value:!0});var a="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},s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=t("../utils/logger.js"),c=function(t){return t&&t.__esModule?t:{default:t}}(l),d=t("./loader.js"),h=t("../utils/exception.js"),f=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"xhr-msstream-loader"));return o.TAG="MSStreamLoader",o._seekHandler=t,o._config=n,o._needStash=!0,o._xhr=null,o._reader=null,o._totalRange=null,o._currentRange=null,o._currentRequestURL=null,o._currentRedirectedURL=null,o._contentLength=null,o._receivedLength=0,o._bufferLimit=16777216,o._lastTimeBufferSize=0,o._isReconnecting=!1,o}return o(e,t),u(e,null,[{key:"isSupported",value:function(){try{if(void 0===self.MSStream||void 0===self.MSStreamReader)return!1;var t=new XMLHttpRequest;return t.open("GET","https://example.com",!0),t.responseType="ms-stream","ms-stream"===t.responseType}catch(t){return c.default.w("MSStreamLoader",t.message),!1}}}]),u(e,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"open",value:function(t,e){this._internalOpen(t,e,!1)}},{key:"_internalOpen",value:function(t,e,n){this._dataSource=t,n?this._currentRange=e:this._totalRange=e;var r=t.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?r=this._currentRedirectedURL:void 0!=t.redirectedURL&&(r=t.redirectedURL));var i=this._seekHandler.getConfig(r,e);this._currentRequestURL=i.url;var o=this._reader=new self.MSStreamReader;o.onprogress=this._msrOnProgress.bind(this),o.onload=this._msrOnLoad.bind(this),o.onerror=this._msrOnError.bind(this);var s=this._xhr=new XMLHttpRequest;if(s.open("GET",i.url,!0),s.responseType="ms-stream",s.onreadystatechange=this._xhrOnReadyStateChange.bind(this),s.onerror=this._xhrOnError.bind(this),t.withCredentials&&(s.withCredentials=!0),"object"===a(i.headers)){var u=i.headers;for(var l in u)u.hasOwnProperty(l)&&s.setRequestHeader(l,u[l])}if("object"===a(this._config.headers)){var c=this._config.headers;for(var h in c)c.hasOwnProperty(h)&&s.setRequestHeader(h,c[h])}this._isReconnecting?this._isReconnecting=!1:this._status=d.LoaderStatus.kConnecting,s.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=d.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(1===this._reader.readyState&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(t){var e=t.target;if(2===e.readyState)if(e.status>=200&&e.status<=299){if(this._status=d.LoaderStatus.kBuffering,void 0!=e.responseURL){var n=this._seekHandler.removeURLParameters(e.responseURL);e.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var r=e.getResponseHeader("Content-Length");if(null!=r&&null==this._contentLength){var i=parseInt(r);i>0&&(this._contentLength=i,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=d.LoaderStatus.kError,!this._onError)throw new h.RuntimeException("MSStreamLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(d.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}else if(3===e.readyState&&e.status>=200&&e.status<=299){this._status=d.LoaderStatus.kBuffering;var o=e.response;this._reader.readAsArrayBuffer(o)}}},{key:"_xhrOnError",value:function(t){this._status=d.LoaderStatus.kError;var e=d.LoaderErrors.EXCEPTION,n={code:-1,msg:t.constructor.name+" "+t.type};if(!this._onError)throw new h.RuntimeException(n.msg);this._onError(e,n)}},{key:"_msrOnProgress",value:function(t){var e=t.target,n=e.result;if(null==n)return void this._doReconnectIfNeeded();var r=n.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=n.byteLength;var i=this._totalRange.from+this._receivedLength;this._receivedLength+=r.byteLength,this._onDataArrival&&this._onDataArrival(r,i,this._receivedLength),n.byteLength>=this._bufferLimit&&(c.default.v(this.TAG,"MSStream buffer exceeded max size near "+(i+r.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var t={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,t,!0)}}},{key:"_msrOnLoad",value:function(t){this._status=d.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(t){this._status=d.LoaderStatus.kError;var e=0,n=null;if(this._contentLength&&this._receivedLength<this._contentLength?(e=d.LoaderErrors.EARLY_EOF,n={code:-1,msg:"MSStream meet Early-Eof"}):(e=d.LoaderErrors.EARLY_EOF,n={code:-1,msg:t.constructor.name+" "+t.type}),!this._onError)throw new h.RuntimeException(n.msg);this._onError(e,n)}}]),e}(d.BaseLoader);n.default=f},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],31:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(n,"__esModule",{value:!0});var s="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},u=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=t("../utils/logger.js"),d=r(c),h=t("./speed-sampler.js"),f=r(h),p=t("./loader.js"),v=t("../utils/exception.js"),m=function(t){function e(t,n){i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,"xhr-range-loader"));return r.TAG="RangeLoader",r._seekHandler=t,r._config=n,r._needStash=!1,r._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],r._currentChunkSizeKB=384,r._currentSpeedNormalized=0,r._zeroSpeedChunkCount=0,r._xhr=null,r._speedSampler=new f.default,r._requestAbort=!1,r._waitForTotalLength=!1,r._totalLengthReceived=!1,r._currentRequestURL=null,r._currentRedirectedURL=null,r._currentRequestRange=null,r._totalLength=null,r._contentLength=null,r._receivedLength=0,r._lastTimeLoaded=0,r}return a(e,t),l(e,null,[{key:"isSupported",value:function(){try{var t=new XMLHttpRequest;return t.open("GET","https://example.com",!0),t.responseType="arraybuffer","arraybuffer"===t.responseType}catch(t){return d.default.w("RangeLoader",t.message),!1}}}]),l(e,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"open",value:function(t,e){this._dataSource=t,this._range=e,this._status=p.LoaderStatus.kConnecting;var n=!1;void 0!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var t=1024*this._currentChunkSizeKB,e=this._range.from+this._receivedLength,n=e+t;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:e,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(t,e){this._lastTimeLoaded=0;var n=t.url;this._config.reuseRedirectedURL&&(void 0!=this._currentRedirectedURL?n=this._currentRedirectedURL:void 0!=t.redirectedURL&&(n=t.redirectedURL));var r=this._seekHandler.getConfig(n,e);this._currentRequestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onload=this._onLoad.bind(this),i.onerror=this._onXhrError.bind(this),t.withCredentials&&(i.withCredentials=!0),"object"===s(r.headers)){var o=r.headers;for(var a in o)o.hasOwnProperty(a)&&i.setRequestHeader(a,o[a])}if("object"===s(this._config.headers)){var u=this._config.headers;for(var l in u)u.hasOwnProperty(l)&&i.setRequestHeader(l,u[l])}i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=p.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(t){var e=t.target;if(2===e.readyState){if(void 0!=e.responseURL){var n=this._seekHandler.removeURLParameters(e.responseURL);e.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(e.status>=200&&e.status<=299){if(this._waitForTotalLength)return;this._status=p.LoaderStatus.kBuffering}else{if(this._status=p.LoaderStatus.kError,!this._onError)throw new v.RuntimeException("RangeLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(p.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}}}},{key:"_onProgress",value:function(t){if(this._status!==p.LoaderStatus.kError){if(null===this._contentLength){var e=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,e=!0;var n=t.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,e)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=t.loaded-this._lastTimeLoaded;this._lastTimeLoaded=t.loaded,this._speedSampler.addBytes(r)}}},{key:"_normalizeSpeed",value:function(t){var e=this._chunkSizeKBList,n=e.length-1,r=0,i=0,o=n;if(t<e[0])return e[0];for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||t>=e[r]&&t<e[r+1])return e[r];e[r]<t?i=r+1:o=r-1}}},{key:"_onLoad",value:function(t){if(this._status!==p.LoaderStatus.kError){if(this._waitForTotalLength)return void(this._waitForTotalLength=!1);this._lastTimeLoaded=0;var e=this._speedSampler.lastSecondKBps;if(0===e&&++this._zeroSpeedChunkCount>=3&&(e=this._speedSampler.currentKBps),0!==e){var n=this._normalizeSpeed(e);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var r=t.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():o=!0,this._onDataArrival&&this._onDataArrival(r,i,this._receivedLength),o&&(this._status=p.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(t){this._status=p.LoaderStatus.kError;var e=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(e=p.LoaderErrors.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(e=p.LoaderErrors.EXCEPTION,n={code:-1,msg:t.constructor.name+" "+t.type}),!this._onError)throw new v.RuntimeException(n.msg);this._onError(e,n)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}}]),e}(p.BaseLoader);n.default=m},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24,"./speed-sampler.js":27}],32:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o="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},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("events"),u=r(s),l=t("../utils/logger.js"),c=r(l),d=t("../utils/browser.js"),h=r(d),f=t("./player-events.js"),p=r(f),v=t("../core/transmuxer.js"),m=r(v),g=t("../core/transmuxing-events.js"),y=r(g),A=t("../core/mse-controller.js"),_=r(A),b=t("../core/mse-events.js"),T=r(b),S=t("./player-errors.js"),E=t("../config.js"),w=t("../utils/exception.js"),k=function(){function t(e,n){if(i(this,t),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new u.default,this._config=(0,E.createDefaultConfig)(),"object"===(void 0===n?"undefined":o(n))&&Object.assign(this._config,n),"flv"!==e.type.toLowerCase())throw new w.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var r=h.default.chrome&&(h.default.version.major<50||50===h.default.version.major&&h.default.version.build<2661);this._alwaysSeekKeyframe=!!(r||h.default.msedge||h.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return a(t,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){var n=this;t===p.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then(function(){n._emitter.emit(p.default.MEDIA_INFO,n.mediaInfo)}):t===p.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then(function(){n._emitter.emit(p.default.STATISTICS_INFO,n.statisticsInfo)}),this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"attachMediaElement",value:function(t){var e=this;if(this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),t.addEventListener("seeking",this.e.onvSeeking),t.addEventListener("canplay",this.e.onvCanPlay),t.addEventListener("stalled",this.e.onvStalled),t.addEventListener("progress",this.e.onvProgress),this._msectl=new _.default(this._config),this._msectl.on(T.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(T.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(T.default.SOURCE_OPEN,function(){e._mseSourceOpened=!0,e._hasPendingLoad&&(e._hasPendingLoad=!1,e.load())}),this._msectl.on(T.default.ERROR,function(t){e._emitter.emit(p.default.ERROR,S.ErrorTypes.MEDIA_ERROR,S.ErrorDetails.MEDIA_MSE_ERROR,t)}),this._msectl.attachMediaElement(t),null!=this._pendingSeekTime)try{t.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var t=this;if(!this._mediaElement)throw new w.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new w.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened)return void(this._hasPendingLoad=!0);this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new m.default(this._mediaDataSource,this._config),this._transmuxer.on(y.default.INIT_SEGMENT,function(e,n){t._msectl.appendInitSegment(n)}),this._transmuxer.on(y.default.MEDIA_SEGMENT,function(e,n){if(t._msectl.appendMediaSegment(n),t._config.lazyLoad&&!t._config.isLive){var r=t._mediaElement.currentTime;n.info.endDts>=1e3*(r+t._config.lazyLoadMaxDuration)&&null==t._progressChecker&&(c.default.v(t.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),t._suspendTransmuxer())}}),this._transmuxer.on(y.default.LOADING_COMPLETE,function(){t._msectl.endOfStream(),t._emitter.emit(p.default.LOADING_COMPLETE)}),this._transmuxer.on(y.default.RECOVERED_EARLY_EOF,function(){t._emitter.emit(p.default.RECOVERED_EARLY_EOF)}),this._transmuxer.on(y.default.IO_ERROR,function(e,n){t._emitter.emit(p.default.ERROR,S.ErrorTypes.NETWORK_ERROR,e,n)}),this._transmuxer.on(y.default.DEMUX_ERROR,function(e,n){t._emitter.emit(p.default.ERROR,S.ErrorTypes.MEDIA_ERROR,e,{code:-1,msg:n})}),this._transmuxer.on(y.default.MEDIA_INFO,function(e){t._mediaInfo=e,t._emitter.emit(p.default.MEDIA_INFO,Object.assign({},e))}),this._transmuxer.on(y.default.METADATA_ARRIVED,function(e){t._emitter.emit(p.default.METADATA_ARRIVED,e)}),this._transmuxer.on(y.default.SCRIPTDATA_ARRIVED,function(e){t._emitter.emit(p.default.SCRIPTDATA_ARRIVED,e)}),this._transmuxer.on(y.default.STATISTICS_INFO,function(e){t._statisticsInfo=t._fillStatisticsInfo(e),t._emitter.emit(p.default.STATISTICS_INFO,Object.assign({},t._statisticsInfo))}),this._transmuxer.on(y.default.RECOMMEND_SEEKPOINT,function(e){t._mediaElement&&!t._config.accurateSeek&&(t._requestSetTime=!0,t._mediaElement.currentTime=e/1e3)}),this._transmuxer.open()}}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(t){if(t.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return t;var e=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):e=!1;return e&&(t.decodedFrames=n,t.droppedFrames=r),t}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var t=this._mediaElement.buffered,e=this._mediaElement.currentTime,n=0,r=0;r<t.length;r++){var i=t.start(r),o=t.end(r);if(i<=e&&e<o){n=o;break}}n>=e+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(c.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){c.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var t=this._mediaElement.currentTime,e=this._mediaElement.buffered,n=!1,r=0;r<e.length;r++){var i=e.start(r),o=e.end(r);if(t>=i&&t<o){t>=o-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(c.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(t){for(var e=this._mediaElement.buffered,n=0;n<e.length;n++){var r=e.start(n),i=e.end(n);if(t>=r&&t<i)return!0}return!1}},{key:"_internalSeek",value:function(t){var e=this._isTimepointBuffered(t),n=!1,r=0;if(t<1&&this._mediaElement.buffered.length>0){var i=this._mediaElement.buffered.start(0);(i<1&&t<i||h.default.safari)&&(n=!0,r=h.default.safari?.1:i)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=r;else if(e){if(this._alwaysSeekKeyframe){var o=this._msectl.getNearestKeyframe(Math.floor(1e3*t));this._requestSetTime=!0,this._mediaElement.currentTime=null!=o?o.dts/1e3:t}else this._requestSetTime=!0,this._mediaElement.currentTime=t;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(t),this._transmuxer.seek(Math.floor(1e3*t)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=t)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var t=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(t)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(t),this._transmuxer.seek(Math.floor(1e3*t)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=t))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(t){var e=this._mediaElement;if(t||!this._receivedCanPlay||e.readyState<2){var n=e.buffered;n.length>0&&e.currentTime<n.start(0)&&(c.default.w(this.TAG,"Playback seems stuck at "+e.currentTime+", seek to "+n.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=n.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(t){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(t){var e=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)return void(this._requestSetTime=!1);if(e<1&&n.length>0){var r=n.start(0);if(r<1&&e<r||h.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=h.default.safari?.1:r)}if(this._isTimepointBuffered(e)){if(this._alwaysSeekKeyframe){var i=this._msectl.getNearestKeyframe(Math.floor(1e3*e));null!=i&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3)}return void(null!=this._progressChecker&&this._checkProgressAndResume())}this._seekpointRecord={seekPoint:e,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(t){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(t){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(t){this._checkAndResumeStuckPlayback()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._internalSeek(t):this._pendingSeekTime=t}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}}]),t}();n.default=k},{"../config.js":5,"../core/mse-controller.js":9,"../core/mse-events.js":10,"../core/transmuxer.js":11,"../core/transmuxing-events.js":13,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./player-errors.js":34,"./player-events.js":35,events:2}],33:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o="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},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=t("events"),u=r(s),l=t("./player-events.js"),c=r(l),d=t("../config.js"),h=t("../utils/exception.js"),f=function(){function t(e,n){if(i(this,t),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new u.default,this._config=(0,d.createDefaultConfig)(),"object"===(void 0===n?"undefined":o(n))&&Object.assign(this._config,n),"flv"===e.type.toLowerCase())throw new h.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new h.InvalidArgumentException("NativePlayer("+e.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}return a(t,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){var n=this;t===c.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){n._emitter.emit(c.default.MEDIA_INFO,n.mediaInfo)}):t===c.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then(function(){n._emitter.emit(c.default.STATISTICS_INFO,n.statisticsInfo)}),this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"attachMediaElement",value:function(t){if(this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{t.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new h.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(t){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(c.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(c.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._mediaElement.currentTime=t:this._pendingSeekTime=t}},{key:"mediaInfo",get:function(){var t=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",e={mimeType:t+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var t={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return t;var e=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else void 0!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):e=!1;return e&&(t.decodedFrames=n,t.droppedFrames=r),t}}]),t}();n.default=f},{"../config.js":5,"../utils/exception.js":40,"./player-events.js":35,events:2}],34:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorDetails=n.ErrorTypes=void 0;var r=t("../io/loader.js"),i=t("../demux/demux-errors.js"),o=function(t){return t&&t.__esModule?t:{default:t}}(i);n.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},n.ErrorDetails={NETWORK_EXCEPTION:r.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:r.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:r.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:r.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:o.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:o.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:o.default.CODEC_UNSUPPORTED}},{"../demux/demux-errors.js":16,"../io/loader.js":24}],35:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};n.default=r},{}],36:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"getSilentFrame",value:function(t,e){if("mp4a.40.2"===t){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),t}();n.default=o},{}],37:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(){r(this,t)}return i(t,null,[{key:"init",value:function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var n=t.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=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]),n.HDLR_AUDIO=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]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(t){for(var e=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,o=0;o<i;o++)e+=r[o].byteLength;n=new Uint8Array(e),n[0]=e>>>24&255,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n.set(t,4);for(var a=8,s=0;s<i;s++)n.set(r[s],a),a+=r[s].byteLength;return n}},{key:"generateInitSegment",value:function(e){var n=t.box(t.types.ftyp,t.constants.FTYP),r=t.moov(e),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i}},{key:"moov",value:function(e){var n=t.mvhd(e.timescale,e.duration),r=t.trak(e),i=t.mvex(e);return t.box(t.types.moov,n,r,i)}},{key:"mvhd",value:function(e,n){return t.box(t.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,n>>>24&255,n>>>16&255,n>>>8&255,255&n,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]))}},{key:"trak",value:function(e){return t.box(t.types.trak,t.tkhd(e),t.mdia(e))}},{key:"tkhd",value:function(e){var n=e.id,r=e.duration,i=e.presentWidth,o=e.presentHeight;return t.box(t.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,o>>>8&255,255&o,0,0]))}},{key:"mdia",value:function(e){return t.box(t.types.mdia,t.mdhd(e),t.hdlr(e),t.minf(e))}},{key:"mdhd",value:function(e){var n=e.timescale,r=e.duration;return t.box(t.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(e){var n=null;return n="audio"===e.type?t.constants.HDLR_AUDIO:t.constants.HDLR_VIDEO,t.box(t.types.hdlr,n)}},{key:"minf",value:function(e){var n=null;return n="audio"===e.type?t.box(t.types.smhd,t.constants.SMHD):t.box(t.types.vmhd,t.constants.VMHD),t.box(t.types.minf,n,t.dinf(),t.stbl(e))}},{key:"dinf",value:function(){return t.box(t.types.dinf,t.box(t.types.dref,t.constants.DREF))}},{key:"stbl",value:function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.constants.STTS),t.box(t.types.stsc,t.constants.STSC),t.box(t.types.stsz,t.constants.STSZ),t.box(t.types.stco,t.constants.STCO))}},{key:"stsd",value:function(e){return"audio"===e.type?"mp3"===e.codec?t.box(t.types.stsd,t.constants.STSD_PREFIX,t.mp3(e)):t.box(t.types.stsd,t.constants.STSD_PREFIX,t.mp4a(e)):t.box(t.types.stsd,t.constants.STSD_PREFIX,t.avc1(e))}},{key:"mp3",value:function(e){var n=e.channelCount,r=e.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return t.box(t.types[".mp3"],i)}},{key:"mp4a",value:function(e){var n=e.channelCount,r=e.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return t.box(t.types.mp4a,i,t.esds(e))}},{key:"esds",value:function(e){var n=e.config||[],r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return t.box(t.types.esds,i)}},{key:"avc1",value:function(e){var n=e.avcc,r=e.codecWidth,i=e.codecHeight,o=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,r>>>8&255,255&r,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return t.box(t.types.avc1,o,t.box(t.types.avcC,n))}},{key:"mvex",value:function(e){return t.box(t.types.mvex,t.trex(e))}},{key:"trex",value:function(e){var n=e.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return t.box(t.types.trex,r)}},{key:"moof",value:function(e,n){return t.box(t.types.moof,t.mfhd(e.sequenceNumber),t.traf(e,n))}},{key:"mfhd",value:function(e){var n=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return t.box(t.types.mfhd,n)}},{key:"traf",value:function(e,n){var r=e.id,i=t.box(t.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),o=t.box(t.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=t.sdtp(e),s=t.trun(e,a.byteLength+16+16+8+16+8+8);return t.box(t.types.traf,i,o,s,a)}},{key:"sdtp",value:function(e){for(var n=e.samples||[],r=n.length,i=new Uint8Array(4+r),o=0;o<r;o++){var a=n[o].flags;i[o+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return t.box(t.types.sdtp,i)}},{key:"trun",value:function(e,n){var r=e.samples||[],i=r.length,o=12+16*i,a=new Uint8Array(o);n+=8+o,a.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s<i;s++){var u=r[s].duration,l=r[s].size,c=r[s].flags,d=r[s].cts;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return t.box(t.types.trun,a)}},{key:"mdat",value:function(e){return t.box(t.types.mdat,e)}}]),t}();o.init(),n.default=o},{}],38:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("../utils/logger.js"),s=r(a),u=t("./mp4-generator.js"),l=r(u),c=t("./aac-silent.js"),d=r(c),h=t("../utils/browser.js"),f=r(h),p=t("../core/media-segment-info.js"),v=t("../utils/exception.js"),m=function(){function t(e){i(this,t),this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new p.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new p.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!f.default.chrome||!(f.default.version.major<50||50===f.default.version.major&&f.default.version.build<2661)),this._fillSilentAfterSeek=f.default.msedge||f.default.msie,this._mp3UseMpegAudio=!f.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return o(t,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(t){return t.onDataAvailable=this.remux.bind(this),t.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(t){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(t,e){if(!this._onMediaSegment)throw new v.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(t,e),this._remuxVideo(e),this._remuxAudio(t)}},{key:"_onTrackMetadataReceived",value:function(t,e){var n=null,r="mp4",i=e.codec;if("audio"===t)this._audioMeta=e,"mp3"===e.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=l.default.generateInitSegment(e);else{if("video"!==t)return;this._videoMeta=e,n=l.default.generateInitSegment(e)}if(!this._onInitSegment)throw new v.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(t,{type:t,data:n.buffer,codec:i,container:t+"/"+r,mediaDuration:e.duration})}},{key:"_calculateDtsBase",value:function(t,e){this._dtsBaseInited||(t.samples&&t.samples.length&&(this._audioDtsBase=t.samples[0].dts),e.samples&&e.samples.length&&(this._videoDtsBase=e.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var t=this._videoStashedLastSample,e=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=t&&(n.samples.push(t),n.length=t.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=e&&(r.samples.push(e),r.length=e.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(r,!0)}},{key:"_remuxAudio",value:function(t,e){if(null!=this._audioMeta){var n=t,r=n.samples,i=void 0,o=-1,a=-1,u=this._audioMeta.refSampleDuration,c="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,h=this._dtsBaseInited&&void 0===this._audioNextDts,v=!1;if(r&&0!==r.length&&(1!==r.length||e)){var m=0,g=null,y=0;c?(m=0,y=n.length):(m=8,y=8+n.length);var A=null;if(r.length>1&&(A=r.pop(),y-=A.length),null!=this._audioStashedLastSample){var _=this._audioStashedLastSample;this._audioStashedLastSample=null,r.unshift(_),y+=_.length}null!=A&&(this._audioStashedLastSample=A);var b=r[0].dts-this._dtsBase;if(this._audioNextDts)i=b-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())i=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(v=!0);else{var T=this._audioSegmentInfoList.getLastSampleBefore(b);if(null!=T){var S=b-(T.originalDts+T.duration);S<=3&&(S=0);var E=T.dts+T.duration+S;i=b-E}else i=0}if(v){var w=b-i,k=this._videoSegmentInfoList.getLastSegmentBefore(b);if(null!=k&&k.beginDts<w){var C=d.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(C){var L=k.beginDts,I=w-k.beginDts;s.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+L+", duration: "+I),r.unshift({unit:C,dts:L,pts:L}),y+=C.byteLength}}else v=!1}for(var x=[],R=0;R<r.length;R++){var O=r[R],D=O.unit,M=O.dts-this._dtsBase,j=M-i;-1===o&&(o=j);var P=0;if(R!==r.length-1)P=r[R+1].dts-this._dtsBase-i-j;else if(null!=A){var N=A.dts-this._dtsBase-i;P=N-j}else P=x.length>=1?x[x.length-1].duration:Math.floor(u);var U=!1,B=null;if(P>1.5*u&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!f.default.safari){U=!0;var F=Math.abs(P-u),G=Math.ceil(F/u),z=j+u;s.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(j+P)+" ms, expected: "+(j+Math.round(u))+" ms, delta: "+Math.round(F)+" ms, generate: "+G+" frames");var V=d.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==V&&(s.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),V=D),B=[];for(var H=0;H<G;H++){var W=Math.round(z);if(B.length>0){var Q=B[B.length-1];Q.duration=W-Q.dts}var Y={dts:W,pts:W,cts:0,unit:V,size:V.byteLength,duration:0,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};B.push(Y),y+=Y.size,z+=u}var q=B[B.length-1];q.duration=j+P-q.dts,P=Math.round(u)}x.push({dts:j,pts:j,cts:0,unit:O.unit,size:O.unit.byteLength,duration:P,originalDts:M,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),U&&x.push.apply(x,B)}c?g=new Uint8Array(y):(g=new Uint8Array(y),g[0]=y>>>24&255,g[1]=y>>>16&255,g[2]=y>>>8&255,g[3]=255&y,g.set(l.default.types.mdat,4));for(var K=0;K<x.length;K++){var X=x[K].unit;g.set(X,m),m+=X.byteLength}var Z=x[x.length-1];a=Z.dts+Z.duration,this._audioNextDts=a;var J=new p.MediaSegmentInfo;J.beginDts=o,J.endDts=a,J.beginPts=o,J.endPts=a,J.originalBeginDts=x[0].originalDts,J.originalEndDts=Z.originalDts+Z.duration,J.firstSample=new p.SampleInfo(x[0].dts,x[0].pts,x[0].duration,x[0].originalDts,!1),J.lastSample=new p.SampleInfo(Z.dts,Z.pts,Z.duration,Z.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(J),n.samples=x,n.sequenceNumber++;var $=null;$=c?new Uint8Array:l.default.moof(n,o),n.samples=[],n.length=0;var tt={type:"audio",data:this._mergeBoxes($,g).buffer,sampleCount:x.length,info:J};c&&h&&(tt.timestampOffset=o),this._onMediaSegment("audio",tt)}}}},{key:"_remuxVideo",value:function(t,e){if(null!=this._videoMeta){var n=t,r=n.samples,i=void 0,o=-1,a=-1,s=-1,u=-1;if(r&&0!==r.length&&(1!==r.length||e)){var c=8,d=null,h=8+t.length,f=null;if(r.length>1&&(f=r.pop(),h-=f.length),null!=this._videoStashedLastSample){var v=this._videoStashedLastSample;this._videoStashedLastSample=null,r.unshift(v),h+=v.length}null!=f&&(this._videoStashedLastSample=f);var m=r[0].dts-this._dtsBase;if(this._videoNextDts)i=m-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())i=0;else{var g=this._videoSegmentInfoList.getLastSampleBefore(m);if(null!=g){var y=m-(g.originalDts+g.duration);y<=3&&(y=0);var A=g.dts+g.duration+y;i=m-A}else i=0}for(var _=new p.MediaSegmentInfo,b=[],T=0;T<r.length;T++){var S=r[T],E=S.dts-this._dtsBase,w=S.isKeyframe,k=E-i,C=S.cts,L=k+C;-1===o&&(o=k,s=L);var I=0;if(T!==r.length-1)I=r[T+1].dts-this._dtsBase-i-k;else if(null!=f){var x=f.dts-this._dtsBase-i;I=x-k}else I=b.length>=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(w){var R=new p.SampleInfo(k,L,I,S.dts,!0);R.fileposition=S.fileposition,_.appendSyncPoint(R)}b.push({dts:k,pts:L,cts:C,units:S.units,size:S.length,isKeyframe:w,duration:I,originalDts:E,flags:{isLeading:0,dependsOn:w?2:1,isDependedOn:w?1:0,hasRedundancy:0,isNonSync:w?0:1}})}d=new Uint8Array(h),d[0]=h>>>24&255,d[1]=h>>>16&255,d[2]=h>>>8&255,d[3]=255&h,d.set(l.default.types.mdat,4);for(var O=0;O<b.length;O++)for(var D=b[O].units;D.length;){var M=D.shift(),j=M.data;d.set(j,c),c+=j.byteLength}var P=b[b.length-1];if(a=P.dts+P.duration,u=P.pts+P.duration,this._videoNextDts=a,_.beginDts=o,_.endDts=a,_.beginPts=s,_.endPts=u,_.originalBeginDts=b[0].originalDts,_.originalEndDts=P.originalDts+P.duration,_.firstSample=new p.SampleInfo(b[0].dts,b[0].pts,b[0].duration,b[0].originalDts,b[0].isKeyframe),_.lastSample=new p.SampleInfo(P.dts,P.pts,P.duration,P.originalDts,P.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_),n.samples=b,n.sequenceNumber++,this._forceFirstIDR){var N=b[0].flags;N.dependsOn=2,N.isNonSync=0}var U=l.default.moof(n,o);n.samples=[],n.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(U,d).buffer,sampleCount:b.length,info:_})}}}},{key:"_mergeBoxes",value:function(t,e){var n=new Uint8Array(t.byteLength+e.byteLength);return n.set(t,0),n.set(e,t.byteLength),n}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(t){this._onInitSegment=t}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(t){this._onMediaSegment=t}}]),t}();n.default=m},{"../core/media-segment-info.js":8,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./aac-silent.js":36,"./mp4-generator.js":37}],39:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={};!function(){var t=self.navigator.userAgent.toLowerCase(),e=/(edge)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(chrome)[ \/]([\w.]+)/.exec(t)||/(iemobile)[\/]([\w.]+)/.exec(t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(t)||[],n=/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(windows phone)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(android)/.exec(t)||/(windows)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||[],i={browser:e[5]||e[3]||e[1]||"",version:e[2]||e[4]||"0",majorVersion:e[4]||e[2]||"0",platform:n[0]||""},o={};if(i.browser){o[i.browser]=!0;var a=i.majorVersion.split(".");o.version={major:parseInt(i.majorVersion,10),string:i.version},a.length>1&&(o.version.minor=parseInt(a[1],10)),a.length>2&&(o.version.build=parseInt(a[2],10))}i.platform&&(o[i.platform]=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),(o.rv||o.iemobile)&&(o.rv&&delete o.rv,i.browser="msie",o.msie=!0),o.edge&&(delete o.edge,i.browser="msedge",o.msedge=!0),o.opr&&(i.browser="opera",o.opera=!0),o.safari&&o.android&&(i.browser="android",o.android=!0),o.name=i.browser,o.platform=i.platform;for(var s in r)r.hasOwnProperty(s)&&delete r[s];Object.assign(r,o)}(),n.default=r},{}],40:[function(t,e,n){"use strict";function r(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}function i(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)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n.RuntimeException=function(){function t(e){o(this,t),this._message=e}return a(t,[{key:"toString",value:function(){return this.name+": "+this.message}},{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),t}();n.IllegalStateException=function(t){function e(t){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return i(e,t),a(e,[{key:"name",get:function(){return"IllegalStateException"}}]),e}(s),n.InvalidArgumentException=function(t){function e(t){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return i(e,t),a(e,[{key:"name",get:function(){return"InvalidArgumentException"}}]),e}(s),n.NotImplementedException=function(t){function e(t){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return i(e,t),a(e,[{key:"name",get:function(){return"NotImplementedException"}}]),e}(s)},{}],41:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("events"),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){r(this,t)}return i(t,null,[{key:"e",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+n;t.ENABLE_CALLBACK&&t.emitter.emit("log","error",r),t.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))}},{key:"i",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+n;t.ENABLE_CALLBACK&&t.emitter.emit("log","info",r),t.ENABLE_INFO&&(console.info?console.info(r):console.log(r))}},{key:"w",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+n;t.ENABLE_CALLBACK&&t.emitter.emit("log","warn",r),t.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))}},{key:"d",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+n;t.ENABLE_CALLBACK&&t.emitter.emit("log","debug",r),t.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))}},{key:"v",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+n;t.ENABLE_CALLBACK&&t.emitter.emit("log","verbose",r),t.ENABLE_VERBOSE&&console.log(r)}}]),t}();s.GLOBAL_TAG="flv.js",s.FORCE_GLOBAL_TAG=!1,s.ENABLE_ERROR=!0,s.ENABLE_INFO=!0,s.ENABLE_WARN=!0,s.ENABLE_DEBUG=!0,s.ENABLE_VERBOSE=!0,s.ENABLE_CALLBACK=!1,s.emitter=new a.default,n.default=s},{events:2}],42:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("events"),s=r(a),u=t("./logger.js"),l=r(u),c=function(){function t(){i(this,t)}return o(t,null,[{key:"getConfig",value:function(){return{globalTag:l.default.GLOBAL_TAG,forceGlobalTag:l.default.FORCE_GLOBAL_TAG,enableVerbose:l.default.ENABLE_VERBOSE,enableDebug:l.default.ENABLE_DEBUG,enableInfo:l.default.ENABLE_INFO,enableWarn:l.default.ENABLE_WARN,enableError:l.default.ENABLE_ERROR,enableCallback:l.default.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(t){l.default.GLOBAL_TAG=t.globalTag,l.default.FORCE_GLOBAL_TAG=t.forceGlobalTag,l.default.ENABLE_VERBOSE=t.enableVerbose,l.default.ENABLE_DEBUG=t.enableDebug,l.default.ENABLE_INFO=t.enableInfo,l.default.ENABLE_WARN=t.enableWarn,l.default.ENABLE_ERROR=t.enableError,l.default.ENABLE_CALLBACK=t.enableCallback}},{key:"_notifyChange",value:function(){var e=t.emitter;if(e.listenerCount("change")>0){var n=t.getConfig();e.emit("change",n)}}},{key:"registerListener",value:function(e){t.emitter.addListener("change",e)}},{key:"removeListener",value:function(e){t.emitter.removeListener("change",e)}},{key:"addLogListener",value:function(e){l.default.emitter.addListener("log",e),l.default.emitter.listenerCount("log")>0&&(l.default.ENABLE_CALLBACK=!0,t._notifyChange())}},{key:"removeLogListener",value:function(e){l.default.emitter.removeListener("log",e),0===l.default.emitter.listenerCount("log")&&(l.default.ENABLE_CALLBACK=!1,t._notifyChange())}},{key:"forceGlobalTag",get:function(){return l.default.FORCE_GLOBAL_TAG},set:function(e){l.default.FORCE_GLOBAL_TAG=e,t._notifyChange()}},{key:"globalTag",get:function(){return l.default.GLOBAL_TAG},set:function(e){l.default.GLOBAL_TAG=e,t._notifyChange()}},{key:"enableAll",get:function(){return l.default.ENABLE_VERBOSE&&l.default.ENABLE_DEBUG&&l.default.ENABLE_INFO&&l.default.ENABLE_WARN&&l.default.ENABLE_ERROR},set:function(e){l.default.ENABLE_VERBOSE=e,l.default.ENABLE_DEBUG=e,l.default.ENABLE_INFO=e,l.default.ENABLE_WARN=e,l.default.ENABLE_ERROR=e,t._notifyChange()}},{key:"enableDebug",get:function(){return l.default.ENABLE_DEBUG},set:function(e){l.default.ENABLE_DEBUG=e,t._notifyChange()}},{key:"enableVerbose",get:function(){return l.default.ENABLE_VERBOSE},set:function(e){l.default.ENABLE_VERBOSE=e,t._notifyChange()}},{key:"enableInfo",get:function(){return l.default.ENABLE_INFO},set:function(e){l.default.ENABLE_INFO=e,t._notifyChange()}},{key:"enableWarn",get:function(){return l.default.ENABLE_WARN},set:function(e){l.default.ENABLE_WARN=e,t._notifyChange()}},{key:"enableError",get:function(){return l.default.ENABLE_ERROR},set:function(e){l.default.ENABLE_ERROR=e,t._notifyChange()}}]),t}();c.emitter=new s.default,n.default=c},{"./logger.js":41,events:2}],43:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function e(){r(this,e)}return i(e,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Object.assign=Object.assign||function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e},"function"!=typeof self.Promise&&t("es6-promise").polyfill()}}]),e}();o.install(),n.default=o},{"es6-promise":1}],44:[function(t,e,n){"use strict";function r(t,e,n){var r=t;if(e+n<r.length){for(;n--;)if(128!=(192&r[++e]))return!1;return!0}return!1}function i(t){for(var e=[],n=t,i=0,o=t.length;i<o;)if(n[i]<128)e.push(String.fromCharCode(n[i])),++i;else{if(n[i]<192);else if(n[i]<224){if(r(n,i,1)){var a=(31&n[i])<<6|63&n[i+1];if(a>=128){e.push(String.fromCharCode(65535&a)),i+=2;continue}}}else if(n[i]<240){if(r(n,i,2)){var s=(15&n[i])<<12|(63&n[i+1])<<6|63&n[i+2];if(s>=2048&&55296!=(63488&s)){e.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(n[i]<248&&r(n,i,3)){var u=(7&n[i])<<18|(63&n[i+1])<<12|(63&n[i+2])<<6|63&n[i+3];if(u>65536&&u<1114112){u-=65536,e.push(String.fromCharCode(u>>>10|55296)),e.push(String.fromCharCode(1023&u|56320)),i+=4;continue}}e.push(String.fromCharCode(65533)),++i}return e.join("")}Object.defineProperty(n,"__esModule",{value:!0}),n.default=i},{}]},{},[21])(21)}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],e):t.videojsFlash=e(t.videojs)}(this,function(t){"use strict";function e(t){g[t]=function(){return this.el_.vjs_getProperty(t)}}t=t&&t.hasOwnProperty("default")?t.default:t;var n,r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};n="undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{};for(var i=n,o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=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)},s=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},u=t.getComponent("Tech"),l=t.dom,c=t.url,d=t.createTimeRange,h=t.mergeOptions,f=i&&i.navigator||{},p=function(t){function e(n,r){o(this,e);var a=s(this,t.call(this,n,r));return n.source&&a.ready(function(){this.setSource(n.source)},!0),n.startTime&&a.ready(function(){this.load(),this.play(),this.currentTime(n.startTime)},!0),i.videojs=i.videojs||{},i.videojs.Flash=i.videojs.Flash||{},i.videojs.Flash.onReady=e.onReady,i.videojs.Flash.onEvent=e.onEvent,i.videojs.Flash.onError=e.onError,a.on("seeked",function(){this.lastSeekTarget_=void 0}),a}return a(e,t),e.prototype.createEl=function(){var t=this.options_;t.swf||(t.swf="https://vjs.zencdn.net/swf/5.4.2/video-js.swf");var n=t.techId,r=h({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:t.autoplay,stretch:t.stretch||!1,fluent:t.fluent||!1,preload:t.preload,loop:t.loop,muted:t.muted},t.flashVars),i=h({wmode:"opaque",bgcolor:"#000000"},t.params),o=h({id:n,name:n,class:"vjs-tech"},t.attributes);return this.el_=e.embed(t.swf,r,i,o),this.el_.tech=this,this.el_},e.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},e.prototype.pause=function(){this.el_.vjs_pause()},e.prototype.src=function(t){return void 0===t?this.currentSrc():this.setSrc(t)},e.prototype.setSrc=function(t){var e=this;t=c.getAbsoluteURL(t),this.el_.vjs_src(t),this.autoplay()&&this.setTimeout(function(){return e.play()},0)},e.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},e.prototype.setCurrentTime=function(e){var n=this.seekable();n.length&&(e=e>n.start(0)?e:n.start(0),e=e<n.end(n.length-1)?e:n.end(n.length-1),this.lastSeekTarget_=e,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",e),t.prototype.setCurrentTime.call(this))},e.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},e.prototype.duration=function(){if(0===this.readyState())return NaN;var t=this.el_.vjs_getProperty("duration");return t>=0?t:1/0},e.prototype.load=function(){this.el_.vjs_load()},e.prototype.poster=function(){this.el_.vjs_getProperty("poster")},e.prototype.setPoster=function(){},e.prototype.seekable=function(){var t=this.duration();return 0===t?d():d(0,t)},e.prototype.buffered=function(){var t=this.el_.vjs_getProperty("buffered");return 0===t.length?d():d(t[0][0],t[0][1])},e.prototype.supportsFullScreen=function(){return!1},e.prototype.enterFullScreen=function(){return!1},e.prototype.getVideoPlaybackQuality=function(){var t=this.el_.vjs_getProperty("getVideoPlaybackQuality");return 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}(u),v=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","stretch","fluent","loop","controls","volume","muted","defaultMuted"],m=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"],g=p.prototype,y=0;y<v.length;y++)e(v[y]),function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);g["set"+e]=function(e){return this.el_.vjs_setProperty(t,e)}}(v[y]);for(var A=0;A<m.length;A++)e(m[A]);return p.isSupported=function(){return!!(t.browser.IS_CHROME&&!t.browser.IS_ANDROID||t.browser.IS_SAFARI&&!t.browser.IS_IOS)||p.version()[0]>=10},u.withSourceHandlers(p),p.nativeSourceHandler={},p.nativeSourceHandler.canPlayType=function(t){return t in p.formats?"maybe":""},p.nativeSourceHandler.canHandleSource=function(t,e){var n=void 0;return n=t.type?t.type.replace(/;.*/,"").toLowerCase():function(t){var e=c.getFileExtension(t);return e?"video/"+e:""}(t.src),p.nativeSourceHandler.canPlayType(n)},p.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},p.nativeSourceHandler.dispose=function(){},p.registerSourceHandler(p.nativeSourceHandler),p.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},p.onReady=function(t){var e=l.$("#"+t),n=e&&e.tech;n&&n.el()&&p.checkReady(n)},p.checkReady=function(t){t.el()&&(t.el().vjs_getProperty?t.triggerReady():this.setTimeout(function(){p.checkReady(t)},50))},p.onEvent=function(t,e){var n=l.$("#"+t).tech,r=Array.prototype.slice.call(arguments,2);n.setTimeout(function(){n.trigger(e,r)},1)},p.onError=function(t,e){var n=l.$("#"+t).tech;if("srcnotfound"===e)return n.error(4);"string"==typeof e?n.error("FLASH: "+e):(e.origin="flash",n.error(e))},p.version=function(){var t="0,0,0";try{t=new i.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(e){try{f.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(t=(f.plugins["Shockwave Flash 2.0"]||f.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(t){}}return t.split(",")},p.embed=function(t,e,n,r){var i=p.getEmbedCode(t,e,n,r);return l.createEl("div",{innerHTML:i}).childNodes[0]},p.getEmbedCode=function(t,e,n,r){var i="",o="",a="";return e&&Object.getOwnPropertyNames(e).forEach(function(t){i+=t+"="+e[t]+"&"}),n=h({movie:t,flashvars:i,allowScriptAccess:"always",allowNetworking:"all"},n),Object.getOwnPropertyNames(n).forEach(function(t){o+='<param name="'+t+'" value="'+n[t]+'" />'}),r=h({data:t,width:"100%",height:"100%"},r),Object.getOwnPropertyNames(r).forEach(function(t){a+=t+'="'+r[t]+'" '}),'<object type="application/x-shockwave-flash" '+a+">"+o+"</object>"},function(t){t.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},t.streamFromParts=function(t,e){return t+"&"+e},t.streamToParts=function(t){var e={connection:"",stream:""};if(!t)return e;var n=t.search(/&(?![\w-]+=)/),r=void 0;return-1!==n?r=n+1:0===(n=r=t.lastIndexOf("/")+1)&&(n=r=t.length),e.connection=t.substring(0,n),e.stream=t.substring(r,t.length),e},t.isStreamingType=function(e){return e in t.streamingFormats},t.RTMP_RE=/^rtmp[set]?:\/\//i,t.isStreamingSrc=function(e){return t.RTMP_RE.test(e)},t.rtmpSourceHandler={},t.rtmpSourceHandler.canPlayType=function(e){return t.isStreamingType(e)?"maybe":""},t.rtmpSourceHandler.canHandleSource=function(e,n){return t.rtmpSourceHandler.canPlayType(e.type)||(t.isStreamingSrc(e.src)?"maybe":"")},t.rtmpSourceHandler.handleSource=function(e,n,r){var i=t.streamToParts(e.src);n.setRtmpConnection(i.connection),n.setRtmpStream(i.stream)},t.registerSourceHandler(t.rtmpSourceHandler)}(p),u.getTech("Flash")?(t.log.warn("Not using videojs-flash as it appears to already be registered"),t.log.warn("videojs-flash should only be used with video.js@6 and above")):t.registerTech("Flash",p),p.VERSION="2.1.2",p}),function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("video.js"));else if("function"==typeof define&&define.amd)define(["video.js"],e);else{var n=e("object"==typeof exports?require("video.js"):t.videojs);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,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=2)}([function(t,e,n){!function(e,n){t.exports=function(){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.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="/dist/",e(e.s=8)}([function(t,e,n){"use strict";function r(){}function i(t,e){return e="["+t+"] > "+e}function o(t){var e=self.console[t];return e?function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];r[0]&&(r[0]=i(t,r[0])),e.apply(self.console,r)}:r}function a(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];n.forEach(function(e){l[e]=t[e]?t[e].bind(t):o(e)})}n.d(e,"a",function(){return c}),n.d(e,"b",function(){return d});var s="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},u={trace:r,debug:r,log:r,warn:r,info:r,error:r},l=u,c=function(t){if(!0===t||"object"===(void 0===t?"undefined":s(t))){a(t,"debug","log","info","warn","error");try{l.log()}catch(t){l=u}}else l=u},d=l},function(t,e,n){"use strict";e.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCH:"hlsLevelSwitch",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCH:"hlsAudioTrackSwitch",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"}},function(t,e,n){"use strict";n.d(e,"b",function(){return r}),n.d(e,"a",function(){return i});var r={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},i={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"b",function(){return o});var i=function(){function t(){r(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,n){for(var r=n,i=0;t.isHeader(e,n);)i+=10,i+=t._readSize(e,n+6),t.isFooter(e,n+10)&&(i+=10),n+=i;if(i>0)return e.subarray(r,r+i)},t._readSize=function(t,e){var n=0;return n=(127&t[e])<<21,n|=(127&t[e+1])<<14,n|=(127&t[e+2])<<7,n|=127&t[e+3]},t.getTimeStamp=function(e){for(var n=t.getID3Frames(e),r=0;r<n.length;r++){var i=n[r];if(t.isTimeStampFrame(i))return t._readTimeStamp(i)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t._getFrameData=function(e){var n=String.fromCharCode(e[0],e[1],e[2],e[3]),r=t._readSize(e,4);return{type:n,size:r,data:e.subarray(10,10+r)}},t.getID3Frames=function(e){for(var n=0,r=[];t.isHeader(e,n);){var i=t._readSize(e,n+6);n+=10;for(var o=n+i;n+8<o;){var a=t._getFrameData(e.subarray(n)),s=t._decodeFrame(a);s&&r.push(s),n+=a.size+10}t.isFooter(e,n)&&(n+=10)}return r},t._decodeFrame=function(e){return"PRIV"===e.type?t._decodePrivFrame(e):"T"===e.type[0]?t._decodeTextFrame(e):"W"===e.type[0]?t._decodeURLFrame(e):void 0},t._readTimeStamp=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),n=1&e[3],r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},t._decodePrivFrame=function(e){if(!(e.size<2)){var n=t._utf8ArrayToStr(e.data,!0),r=new Uint8Array(e.data.subarray(n.length+1));return{key:e.type,info:n,data:r.buffer}}},t._decodeTextFrame=function(e){if(!(e.size<2)){if("TXXX"===e.type){var n=1,r=t._utf8ArrayToStr(e.data.subarray(n));n+=r.length+1;var i=t._utf8ArrayToStr(e.data.subarray(n));return{key:e.type,info:r,data:i}}var o=t._utf8ArrayToStr(e.data.subarray(1));return{key:e.type,data:o}}},t._decodeURLFrame=function(e){if("WXXX"===e.type){if(e.size<2)return;var n=1,r=t._utf8ArrayToStr(e.data.subarray(n));n+=r.length+1;var i=t._utf8ArrayToStr(e.data.subarray(n));return{key:e.type,info:r,data:i}}var o=t._utf8ArrayToStr(e.data);return{key:e.type,data:o}},t._utf8ArrayToStr=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.length,r=void 0,i=void 0,o=void 0,a="",s=0;s<n;){if(0===(r=t[s++])&&e)return a;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:i=t[s++],a+=String.fromCharCode((31&r)<<6|63&i);break;case 14:i=t[s++],o=t[s++],a+=String.fromCharCode((15&r)<<12|(63&i)<<6|(63&o)<<0)}}return a},t}(),o=i._utf8ArrayToStr;e.a=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=function(){function t(e,n){r(this,t),this.subtle=e,this.aesIV=n}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),u=s,l=function(){function t(e,n){i(this,t),this.subtle=e,this.key=n}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),c=l,d=function(){function t(){o(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),n=new Uint32Array(4),r=0;r<4;r++)n[r]=e.getUint32(4*r);return n},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,n=this.subMix,r=n[0],i=n[1],o=n[2],a=n[3],s=this.invSubMix,u=s[0],l=s[1],c=s[2],d=s[3],h=new Uint32Array(256),f=0,p=0,v=0;for(v=0;v<256;v++)h[v]=v<128?v<<1:v<<1^283;for(v=0;v<256;v++){var m=p^p<<1^p<<2^p<<3^p<<4;m=m>>>8^255&m^99,t[f]=m,e[m]=f;var g=h[f],y=h[g],A=h[y],_=257*h[m]^16843008*m;r[f]=_<<24|_>>>8,i[f]=_<<16|_>>>16,o[f]=_<<8|_>>>24,a[f]=_,_=16843009*A^65537*y^257*g^16843008*f,u[m]=_<<24|_>>>8,l[m]=_<<16|_>>>16,c[m]=_<<8|_>>>24,d[m]=_,f?(f=g^h[h[h[A^g]]],p^=h[h[p]]):f=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),n=!0,r=0;r<e.length&&n;)n=e[r]===this.key[r],r++;if(!n){this.key=e;var i=this.keySize=e.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var o=this.ksRows=4*(i+6+1),a=void 0,s=void 0,u=this.keySchedule=new Uint32Array(o),l=this.invKeySchedule=new Uint32Array(o),c=this.sBox,d=this.rcon,h=this.invSubMix,f=h[0],p=h[1],v=h[2],m=h[3],g=void 0,y=void 0;for(a=0;a<o;a++)a<i?g=u[a]=e[a]:(y=g,a%i==0?(y=y<<8|y>>>24,y=c[y>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[255&y],y^=d[a/i|0]<<24):i>6&&a%i==4&&(y=c[y>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[255&y]),u[a]=g=(u[a-i]^y)>>>0);for(s=0;s<o;s++)a=o-s,y=3&s?u[a]:u[a-4],l[s]=s<4||a<=4?y:f[c[y>>>24]]^p[c[y>>>16&255]]^v[c[y>>>8&255]]^m[c[255&y]],l[s]=l[s]>>>0}},t.prototype.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},t.prototype.decrypt=function(t,e,n){for(var r,i,o=this.keySize+6,a=this.invKeySchedule,s=this.invSBox,u=this.invSubMix,l=u[0],c=u[1],d=u[2],h=u[3],f=this.uint8ArrayToUint32Array_(n),p=f[0],v=f[1],m=f[2],g=f[3],y=new Int32Array(t),A=new Int32Array(y.length),_=void 0,b=void 0,T=void 0,S=void 0,E=void 0,w=void 0,k=void 0,C=void 0,L=void 0,I=void 0,x=void 0,R=void 0,O=this.networkToHostOrderSwap;e<y.length;){for(L=O(y[e]),I=O(y[e+1]),x=O(y[e+2]),R=O(y[e+3]),E=L^a[0],w=R^a[1],k=x^a[2],C=I^a[3],r=4,i=1;i<o;i++)_=l[E>>>24]^c[w>>16&255]^d[k>>8&255]^h[255&C]^a[r],b=l[w>>>24]^c[k>>16&255]^d[C>>8&255]^h[255&E]^a[r+1],T=l[k>>>24]^c[C>>16&255]^d[E>>8&255]^h[255&w]^a[r+2],S=l[C>>>24]^c[E>>16&255]^d[w>>8&255]^h[255&k]^a[r+3],E=_,w=b,k=T,C=S,r+=4;_=s[E>>>24]<<24^s[w>>16&255]<<16^s[k>>8&255]<<8^s[255&C]^a[r],b=s[w>>>24]<<24^s[k>>16&255]<<16^s[C>>8&255]<<8^s[255&E]^a[r+1],T=s[k>>>24]<<24^s[C>>16&255]<<16^s[E>>8&255]<<8^s[255&w]^a[r+2],S=s[C>>>24]<<24^s[E>>16&255]<<16^s[w>>8&255]<<8^s[255&k]^a[r+3],r+=3,A[e]=O(_^p),A[e+1]=O(S^v),A[e+2]=O(T^m),A[e+3]=O(b^g),p=L,v=I,m=x,g=R,e+=4}return A.buffer},t.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}(),h=d,f=n(2),p=n(0),v=function(){function t(e,n){a(this,t),this.observer=e,this.config=n,this.logEnabled=!0;try{var r=crypto||self.crypto;this.subtle=r.subtle||r.webkitSubtle}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,n,r){var i=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(p.b.log("JS AES decrypt"),this.logEnabled=!1);var o=this.decryptor;o||(this.decryptor=o=new h),o.expandKey(e),r(o.decrypt(t,0,n))}else{this.logEnabled&&(p.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var a=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new c(a,e)),this.fastAesKey.expandKey().then(function(o){new u(a,n).decrypt(t,o).catch(function(o){i.onWebCryptoError(o,t,e,n,r)}).then(function(t){r(t)})}).catch(function(o){i.onWebCryptoError(o,t,e,n,r)})}},t.prototype.onWebCryptoError=function(t,e,n,r,i){this.config.enableSoftwareAES?(p.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,n,r,i)):(p.b.error("decrypting error : "+t.message),this.observer.trigger(Event.ERROR,{type:f.b.MEDIA_ERROR,details:f.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}();e.a=v},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,s,u,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,u=0;u<i;u++)l[u].apply(this,s);return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,a,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){!function(e){var n=/^((?:[^\/;?#]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/;?#]*)(.*)$/,i={buildAbsoluteURL:function(t,e,n){if(n=n||{},t=t.trim(),!(e=e.trim())){if(!n.alwaysNormalize)return t;var o=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");return o.path=i.normalizePath(o.path),i.buildURLFromParts(o)}var a=this.parseURL(e);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=i.normalizePath(a.path),i.buildURLFromParts(a)):e;var s=this.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=r.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(l.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;l.path=i.normalizePath(d)}else l.path=s.path,a.params||(l.params=s.params,a.query||(l.query=s.query));return null===l.path&&(l.path=n.alwaysNormalize?i.normalizePath(a.path):a.path),i.buildURLFromParts(l)},parseURL:function(t){var e=n.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(/(?:\/|^)\.(?=\/)/g,"");t.length!==(t=t.replace(/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};t.exports=i}()},function(t,e,n){"use strict";function r(t,e,n,r){var i,o,a,s,u,l=navigator.userAgent.toLowerCase(),c=r,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return i=1+((192&e[n+2])>>>6),(o=(60&e[n+2])>>>2)>d.length-1?void t.trigger(Event.ERROR,{type:w.b.MEDIA_ERROR,details:w.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o}):(s=(1&e[n+2])<<2,s|=(192&e[n+3])>>>6,C.b.log("manifest codec:"+r+",ADTS data:type:"+i+",sampleingIndex:"+o+"["+d[o]+"Hz],channelConfig:"+s),/firefox/i.test(l)?o>=6?(i=5,u=new Array(4),a=o-3):(i=2,u=new Array(2),a=o):-1!==l.indexOf("android")?(i=2,u=new Array(2),a=o):(i=5,u=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&o>=6?a=o-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(o>=6&&1===s||/vivaldi/i.test(l))||!r&&1===s)&&(i=2,u=new Array(2)),a=o)),u[0]=i<<3,u[0]|=(14&o)>>1,u[1]|=(1&o)<<7,u[1]|=s<<3,5===i&&(u[1]|=(14&a)>>1,u[2]=(1&a)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:d[o],channelCount:s,codec:"mp4a.40."+i,manifestCodec:c})}function i(t,e){return 255===t[e]&&240==(246&t[e+1])}function o(t,e){return 1&t[e+1]?7:9}function a(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function s(t,e){return!!(e+1<t.length&&i(t,e))}function u(t,e){if(e+1<t.length&&i(t,e)){var n=o(t,e),r=n;e+5<t.length&&(r=a(t,e));var s=e+r;if(s===t.length||s+1<t.length&&i(t,s))return!0}return!1}function l(t,e,n,i,o){if(!t.samplerate){var a=r(e,n,i,o);t.config=a.config,t.samplerate=a.samplerate,t.channelCount=a.channelCount,t.codec=a.codec,t.manifestCodec=a.manifestCodec,C.b.log("parsed codec:"+t.codec+",rate:"+a.samplerate+",nb channel:"+a.channelCount)}}function c(t){return 9216e4/t}function d(t,e,n,r,i){var s,u,l,c=t.length;if(s=o(t,e),u=a(t,e),(u-=s)>0&&e+s+u<=c)return l=n+r*i,{headerLength:s,frameLength:u,stamp:l}}function h(t,e,n,r,i){var o=c(t.samplerate),a=d(e,n,r,i,o);if(a){var s=a.stamp,u=a.headerLength,l=a.frameLength,h={unit:e.subarray(n+u,n+u+l),pts:s,dts:s};return t.samples.push(h),t.len+=l,{sample:h,length:l+u}}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var E=n(1),w=n(2),k=n(4),C=n(0),L=n(3),I=function(){function t(e,n,r){f(this,t),this.observer=e,this.config=r,this.remuxer=n}return t.prototype.resetInitSegment=function(t,e,n,r){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:r,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=L.a.getID3Data(t,0)||[],n=e.length,r=t.length;n<r;n++)if(u(t,n))return C.b.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,e,n,r){for(var i=this._audioTrack,o=L.a.getID3Data(t,0)||[],a=L.a.getTimeStamp(o),u=a?90*a:9e4*e,c=0,d=u,f=t.length,p=o.length,v=[{pts:d,dts:d,data:o}];p<f-1;)if(s(t,p)&&p+5<f){l(i,this.observer,t,p,i.manifestCodec);var m=h(i,t,p,u,c);if(!m){C.b.log("Unable to parse AAC frame");break}p+=m.length,d=m.sample.pts,c++}else L.a.isHeader(t,p)?(o=L.a.getID3Data(t,p),v.push({pts:d,dts:d,data:o}),p+=o.length):p++;this.remuxer.remux(i,{samples:[]},{samples:v,inputTimeScale:9e4},{samples:[]},e,n,r)},t.prototype.destroy=function(){},t}(),x=I,R=Math.pow(2,32)-1,O=function(){function t(e,n){p(this,t),this.observer=e,this.remuxer=n}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,n,r,i){if(e&&e.byteLength){var o=this.initData=t.parseInitSegment(e);null==n&&(n="mp4a.40.5"),null==r&&(r="avc1.42e01e");var a={};o.audio&&o.video?a.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:i?e:null}:(o.audio&&(a.audio={container:"audio/mp4",codec:n,initSegment:i?e:null}),o.video&&(a.video={container:"video/mp4",codec:r,initSegment:i?e:null})),this.observer.trigger(E.a.FRAG_PARSING_INIT_SEGMENT,{tracks:a})}else n&&(this.audioCodec=n),r&&(this.videoCodec=r)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var n=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return n<0?4294967296+n:n},t.writeUint32=function(t,e,n){t.data&&(e+=t.start,t=t.data),t[e]=n>>24,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n},t.findBox=function(e,n){var r,i,o,a,s,u,l,c=[];if(e.data?(u=e.start,a=e.end,e=e.data):(u=0,a=e.byteLength),!n.length)return null;for(r=u;r<a;)i=t.readUint32(e,r),o=t.bin2str(e.subarray(r+4,r+8)),l=i>1?r+i:a,o===n[0]&&(1===n.length?c.push({data:e,start:r+8,end:l}):(s=t.findBox({data:e,start:r+8,end:l},n.slice(1)),s.length&&(c=c.concat(s)))),r=l;return c},t.parseInitSegment=function(e){var n=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var r=t.findBox(e,["tkhd"])[0];if(r){var i=r.data[r.start],o=0===i?12:20,a=t.readUint32(r,o),s=t.findBox(e,["mdia","mdhd"])[0];if(s){i=s.data[s.start],o=0===i?12:20;var u=t.readUint32(s,o),l=t.findBox(e,["mdia","hdlr"])[0];if(l){var c=t.bin2str(l.data.subarray(l.start+8,l.start+12)),d={soun:"audio",vide:"video"}[c];if(d){var h=t.findBox(e,["mdia","minf","stbl","stsd"]);if(h.length){h=h[0];var f=t.bin2str(h.data.subarray(h.start+12,h.start+16));C.b.log("MP4Demuxer:"+d+":"+f+" found")}n[a]={timescale:u,type:d},n[d]={timescale:u,id:a}}}}}}),n},t.getStartDTS=function(e,n){var r,i,o;return r=t.findBox(n,["moof","traf"]),i=[].concat.apply([],r.map(function(n){return t.findBox(n,["tfhd"]).map(function(r){var i,o;return i=t.readUint32(r,4),o=e[i].timescale||9e4,t.findBox(n,["tfdt"]).map(function(e){var n,r;return n=e.data[e.start],r=t.readUint32(e,4),1===n&&(r*=Math.pow(2,32),r+=t.readUint32(e,8)),r})[0]/o})})),o=Math.min.apply(null,i),isFinite(o)?o:0},t.offsetStartDTS=function(e,n,r){t.findBox(n,["moof","traf"]).map(function(n){return t.findBox(n,["tfhd"]).map(function(i){var o=t.readUint32(i,4),a=e[o].timescale||9e4;t.findBox(n,["tfdt"]).map(function(e){var n=e.data[e.start],i=t.readUint32(e,4);if(0===n)t.writeUint32(e,4,i-r*a);else{i*=Math.pow(2,32),i+=t.readUint32(e,8),i-=r*a,i=Math.max(i,0);var o=Math.floor(i/(R+1)),s=Math.floor(i%(R+1));t.writeUint32(e,4,o),t.writeUint32(e,8,s)}})})})},t.prototype.append=function(e,n,r,i){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec),o=this.initData);var a=void 0,s=this.initPTS;if(void 0===s){var u=t.getStartDTS(o,e);this.initPTS=s=u-n,this.observer.trigger(E.a.INIT_PTS_FOUND,{initPTS:s})}t.offsetStartDTS(o,e,s),a=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,a,r,i,e)},t.prototype.destroy=function(){},t}(),D=O,M={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,n,r,i){if(!(n+24>e.length)){var o=this.parseHeader(e,n);if(o&&n+o.frameLength<=e.length){var a=9e4*o.samplesPerFrame/o.sampleRate,s=r+i*a,u={unit:e.subarray(n,n+o.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=o.channelCount,t.samplerate=o.sampleRate,t.samples.push(u),t.len+=o.frameLength,{sample:u,length:o.frameLength}}}},parseHeader:function(t,e){var n=t[e+1]>>3&3,r=t[e+1]>>1&3,i=t[e+2]>>4&15,o=t[e+2]>>2&3,a=t[e+2]>>1&1;if(1!==n&&0!==i&&15!==i&&3!==o){var s=3===n?3-r:3===r?3:4,u=1e3*M.BitratesMap[14*s+i-1],l=3===n?0:2===n?1:2,c=M.SamplingRateMap[3*l+o],d=t[e+3]>>6==3?1:2,h=M.SamplesCoefficients[n][r],f=M.BytesInSlot[r],p=8*h*f;return{sampleRate:c,channelCount:d,frameLength:parseInt(h*u/c+a,10)*f,samplesPerFrame:p}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1<t.length&&this.isHeaderPattern(t,e))},probe:function(t,e){if(e+1<t.length&&this.isHeaderPattern(t,e)){var n=this.parseHeader(t,e),r=4;n&&n.frameLength&&(r=n.frameLength);var i=e+r;if(i===t.length||i+1<t.length&&this.isHeaderPattern(t,i))return!0}return!1}},j=M,P=function(){function t(e){v(this,t),this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return t.prototype.loadWord=function(){var t=this.data,e=this.bytesAvailable,n=t.byteLength-e,r=new Uint8Array(4),i=Math.min(4,e);if(0===i)throw new Error("no bytes available");r.set(t.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.prototype.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),n=this.word>>>32-e;return t>32&&C.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?n<<e|this.readBits(e):n},t.prototype.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e,n,r=8,i=8;for(e=0;e<t;e++)0!==i&&(n=this.readEG(),i=(r+n+256)%256),r=0===i?r:i},t.prototype.readSPS=function(){var t,e,n,r,i,o,a,s=0,u=0,l=0,c=0,d=this.readUByte.bind(this),h=this.readBits.bind(this),f=this.readUEG.bind(this),p=this.readBoolean.bind(this),v=this.skipBits.bind(this),m=this.skipEG.bind(this),g=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(d(),t=d(),h(5),v(3),d(),g(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var A=f();if(3===A&&v(1),g(),g(),v(1),p())for(o=3!==A?8:12,a=0;a<o;a++)p()&&y(a<6?16:64)}g();var _=f();if(0===_)f();else if(1===_)for(v(1),m(),m(),e=f(),a=0;a<e;a++)m();g(),v(1),n=f(),r=f(),i=h(1),0===i&&v(1),v(1),p()&&(s=f(),u=f(),l=f(),c=f());var b=[1,1];if(p()&&p())switch(d()){case 1:b=[1,1];break;case 2:b=[12,11];break;case 3:b=[10,11];break;case 4:b=[16,11];break;case 5:b=[40,33];break;case 6:b=[24,11];break;case 7:b=[20,11];break;case 8:b=[32,11];break;case 9:b=[80,33];break;case 10:b=[18,11];break;case 11:b=[15,11];break;case 12:b=[64,33];break;case 13:b=[160,99];break;case 14:b=[4,3];break;case 15:b=[3,2];break;case 16:b=[2,1];break;case 255:b=[d()<<8|d(),d()<<8|d()]}return{width:Math.ceil(16*(n+1)-2*s-2*u),height:(2-i)*(r+1)*16-(i?2:4)*(l+c),pixelRatio:b}},t.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),N=P,U=function(){function t(e,n,r,i){m(this,t),this.decryptdata=r,this.discardEPB=i,this.decrypter=new k.a(e,n)}return t.prototype.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,e)},t.prototype.decryptAacSample=function(t,e,n,r){var i=t[e].unit,o=i.subarray(16,i.length-i.length%16),a=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),s=this;this.decryptBuffer(a,function(o){o=new Uint8Array(o),i.set(o,16),r||s.decryptAacSamples(t,e+1,n)})},t.prototype.decryptAacSamples=function(t,e,n){for(;;e++){if(e>=t.length)return void n();if(!(t[e].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(t,e,n,r),!r)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,n=new Int8Array(e),r=0,i=32;i<=t.length-16;i+=160,r+=16)n.set(t.subarray(i,i+16),r);return n},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var n=0,r=32;r<=t.length-16;r+=160,n+=16)t.set(e.subarray(n,n+16),r);return t},t.prototype.decryptAvcSample=function(t,e,n,r,i,o){var a=this.discardEPB(i.data),s=this.getAvcEncryptedData(a),u=this;this.decryptBuffer(s.buffer,function(s){i.data=u.getAvcDecryptedUnit(a,s),o||u.decryptAvcSamples(t,e,n+1,r)})},t.prototype.decryptAvcSamples=function(t,e,n,r){for(;;e++,n=0){if(e>=t.length)return void r();for(var i=t[e].units;!(n>=i.length);n++){var o=i[n];if(!(o.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(t,e,n,r,o,a),!a)return}}}},t}(),B=U,F={video:0,audio:1,id3:2,text:3},G=function(){function t(e,n,r,i){g(this,t),this.observer=e,this.config=r,this.typeSupported=i,this.remuxer=n,this.sampleAes=null}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new B(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(e){var n=t._syncOffset(e);return!(n<0||(n&&C.b.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),n=0;n<e;){if(71===t[n]&&71===t[n+188]&&71===t[n+376])return n;n++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:F[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:"video"===t?0:void 0,isAAC:"audio"===t||void 0,duration:"audio"===t?e:void 0}},t.prototype.resetInitSegment=function(e,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",i),this._audioTrack=t.createTrack("audio",i),this._id3Track=t.createTrack("id3",i),this._txtTrack=t.createTrack("text",i),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.prototype.resetTimeStamp=function(){},t.prototype.append=function(e,n,r,i){var o,a,s,u,l,c=e.length,d=!1;this.contiguous=r;var h=this.pmtParsed,f=this._avcTrack,p=this._audioTrack,v=this._id3Track,m=f.pid,g=p.pid,y=v.pid,A=this._pmtId,_=f.pesData,b=p.pesData,T=v.pesData,S=this._parsePAT,k=this._parsePMT,L=this._parsePES,I=this._parseAVCPES.bind(this),x=this._parseAACPES.bind(this),R=this._parseMPEGPES.bind(this),O=this._parseID3PES.bind(this),D=t._syncOffset(e);for(c-=(c+D)%188,o=D;o<c;o+=188)if(71===e[o]){if(a=!!(64&e[o+1]),s=((31&e[o+1])<<8)+e[o+2],(48&e[o+3])>>4>1){if((u=o+5+e[o+4])===o+188)continue}else u=o+4;switch(s){case m:a&&(_&&(l=L(_))&&I(l,!1),_={data:[],size:0}),_&&(_.data.push(e.subarray(u,o+188)),_.size+=o+188-u);break;case g:a&&(b&&(l=L(b))&&(p.isAAC?x(l):R(l)),b={data:[],size:0}),b&&(b.data.push(e.subarray(u,o+188)),b.size+=o+188-u);break;case y:a&&(T&&(l=L(T))&&O(l),T={data:[],size:0}),T&&(T.data.push(e.subarray(u,o+188)),T.size+=o+188-u);break;case 0:a&&(u+=e[u]+1),A=this._pmtId=S(e,u);break;case A:a&&(u+=e[u]+1);var M=k(e,u,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);m=M.avc,m>0&&(f.pid=m),g=M.audio,g>0&&(p.pid=g,p.isAAC=M.isAAC),y=M.id3,y>0&&(v.pid=y),d&&!h&&(C.b.log("reparse from beginning"),d=!1,o=D-188),h=this.pmtParsed=!0;break;case 17:case 8191:break;default:d=!0}}else this.observer.trigger(E.a.ERROR,{type:w.b.MEDIA_ERROR,details:w.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_&&(l=L(_))?(I(l,!0),f.pesData=null):f.pesData=_,b&&(l=L(b))?(p.isAAC?x(l):R(l),p.pesData=null):(b&&b.size&&C.b.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=b),T&&(l=L(T))?(O(l),v.pesData=null):v.pesData=T,null==this.sampleAes?this.remuxer.remux(p,f,v,this._txtTrack,n,r,i):this.decryptAndRemux(p,f,v,this._txtTrack,n,r,i)},t.prototype.decryptAndRemux=function(t,e,n,r,i,o,a){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,n,r,i,o,a)})}else this.decryptAndRemuxAvc(t,e,n,r,i,o,a)},t.prototype.decryptAndRemuxAvc=function(t,e,n,r,i,o,a){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,n,r,i,o,a)})}else this.remuxer.remux(t,e,n,r,i,o,a)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,n,r){var i,o,a,s,u={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=(15&t[e+1])<<8|t[e+2],o=e+3+i-4,a=(15&t[e+10])<<8|t[e+11],e+=12+a;e<o;){switch(s=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!r){C.b.log("unkown stream type:"+t[e]);break}case 15:-1===u.audio&&(u.audio=s);break;case 21:-1===u.id3&&(u.id3=s);break;case 219:if(!r){C.b.log("unkown stream type:"+t[e]);break}case 27:-1===u.avc&&(u.avc=s);break;case 3:case 4:n?-1===u.audio&&(u.audio=s,u.isAAC=!1):C.b.log("MPEG audio found, not supported in this browser for now");break;case 36:C.b.warn("HEVC stream type found, not supported for now");break;default:C.b.log("unkown stream type:"+t[e])}e+=5+((15&t[e+3])<<8|t[e+4])}return u},t.prototype._parsePES=function(t){var e,n,r,i,o,a,s,u,l=0,c=t.data;if(!t||0===t.size)return null;for(;c[0].length<19&&c.length>1;){var d=new Uint8Array(c[0].length+c[1].length);d.set(c[0]),d.set(c[1],c[0].length),c[0]=d,c.splice(1,1)}if(e=c[0],1===(e[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;n=e[7],192&n&&(a=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,a>4294967295&&(a-=8589934592),64&n?(s=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,s>4294967295&&(s-=8589934592),a-s>54e5&&(C.b.warn(Math.round((a-s)/9e4)+"s delta between PTS and DTS, align them"),a=s)):s=a),i=e[8],u=i+9,t.size-=u,o=new Uint8Array(t.size);for(var h=0,f=c.length;h<f;h++){e=c[h];var p=e.byteLength;if(u){if(u>p){u-=p;continue}e=e.subarray(u),p-=u,u=0}o.set(e,l),l+=p}return r&&(r-=i+3),{data:o,pts:a,dts:s,len:r}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var n=e.samples,r=n.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(r||this.contiguous)?(t.id=r,n.push(t)):e.dropped++}t.debug.length&&C.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var n,r,i,o=this,a=this._avcTrack,s=this._parseAVCNALu(t.data),u=this.avcSample,l=!1,c=this.pushAccesUnit.bind(this),d=function(t,e,n,r){return{key:t,pts:e,dts:n,units:[],debug:r}};t.data=null,u&&s.length&&!a.audFound&&(c(u,a),u=this.avcSample=d(!1,t.pts,t.dts,"")),s.forEach(function(e){switch(e.type){case 1:r=!0,u||(u=o.avcSample=d(!0,t.pts,t.dts,"")),u.frame=!0;var s=e.data;if(l&&s.length>4){var h=new N(s).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(u.key=!0)}break;case 5:r=!0,u||(u=o.avcSample=d(!0,t.pts,t.dts,"")),u.key=!0,u.frame=!0;break;case 6:r=!0,n=new N(o.discardEPB(e.data)),n.readUByte();for(var f=0,p=0,v=!1,m=0;!v&&n.bytesAvailable>1;){f=0;do{m=n.readUByte(),f+=m}while(255===m);p=0;do{m=n.readUByte(),p+=m}while(255===m);if(4===f&&0!==n.bytesAvailable){if(v=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var g=n.readUByte(),y=n.readUByte(),A=31&g,_=[g,y];for(i=0;i<A;i++)_.push(n.readUByte()),_.push(n.readUByte()),_.push(n.readUByte());o._insertSampleInOrder(o._txtTrack.samples,{type:3,pts:t.pts,bytes:_})}}else if(p<n.bytesAvailable)for(i=0;i<p;i++)n.readUByte()}break;case 7:if(r=!0,l=!0,!a.sps){n=new N(e.data);var b=n.readSPS();a.width=b.width,a.height=b.height,a.pixelRatio=b.pixelRatio,a.sps=[e.data],a.duration=o._duration;var T=e.data.subarray(1,4),S="avc1.";for(i=0;i<3;i++){var E=T[i].toString(16);E.length<2&&(E="0"+E),S+=E}a.codec=S}break;case 8:r=!0,a.pps||(a.pps=[e.data]);break;case 9:r=!1,a.audFound=!0,u&&c(u,a),u=o.avcSample=d(!1,t.pts,t.dts,"");break;case 12:r=!1;break;default:r=!1,u&&(u.debug+="unknown NAL "+e.type+" ")}u&&r&&u.units.push(e)}),e&&u&&(c(u,a),this.avcSample=null)},t.prototype._insertSampleInOrder=function(t,e){var n=t.length;if(n>0){if(e.pts>=t[n-1].pts)t.push(e);else for(var r=n-1;r>=0;r--)if(e.pts<t[r].pts){t.splice(r,0,e);break}}else t.push(e)},t.prototype._getLastNalUnit=function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.length){var n=this._avcTrack,r=n.samples;t=r[r.length-1]}if(t){var i=t.units;e=i[i.length-1]}return e},t.prototype._parseAVCNALu=function(t){var e,n,r,i,o,a=0,s=t.byteLength,u=this._avcTrack,l=u.naluState||0,c=l,d=[],h=-1;for(-1===l&&(h=0,o=31&t[0],l=0,a=1);a<s;)if(e=t[a++],l)if(1!==l)if(e)if(1===e){if(h>=0)r={data:t.subarray(h,a-l-1),type:o},d.push(r);else{var f=this._getLastNalUnit();if(f&&(c&&a<=4-c&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-c)),(n=a-l-1)>0)){var p=new Uint8Array(f.data.byteLength+n);p.set(f.data,0),p.set(t.subarray(0,n),f.data.byteLength),f.data=p}}a<s?(i=31&t[a],h=a,o=i,l=0):l=-1}else l=0;else l=3;else l=e?0:2;else l=e?0:1;if(h>=0&&l>=0&&(r={data:t.subarray(h,s),type:o,state:l},d.push(r)),0===d.length){var v=this._getLastNalUnit();if(v){var m=new Uint8Array(v.data.byteLength+t.byteLength);m.set(v.data,0),m.set(t,v.data.byteLength),v.data=m}}return u.naluState=l,d},t.prototype.discardEPB=function(t){for(var e,n,r=t.byteLength,i=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return t;e=r-i.length,n=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=t[a];return n},t.prototype._parseAACPES=function(t){var e,n,r,i,o,a=this._audioTrack,u=t.data,d=t.pts,f=this.aacOverFlow,p=this.aacLastPTS;if(f){var v=new Uint8Array(f.byteLength+u.byteLength);v.set(f,0),v.set(u,f.byteLength),u=v}for(r=0,o=u.length;r<o-1&&!s(u,r);r++);if(r){var m,g;if(r<o-1?(m="AAC PES did not start with ADTS header,offset:"+r,g=!1):(m="no ADTS header found in AAC PES",g=!0),C.b.warn("parsing error:"+m),this.observer.trigger(E.a.ERROR,{type:w.b.MEDIA_ERROR,details:w.a.FRAG_PARSING_ERROR,fatal:g,reason:m}),g)return}if(l(a,this.observer,u,r,this.audioCodec),n=0,e=c(a.samplerate),f&&p){var y=p+e;Math.abs(y-d)>1&&(C.b.log("AAC: align PTS for overlapping frames by "+Math.round((y-d)/90)),d=y)}for(;r<o;)if(s(u,r)&&r+5<o){var A=h(a,u,r,d,n);if(!A)break;r+=A.length,i=A.sample.pts,n++}else r++;f=r<o?u.subarray(r,o):null,this.aacOverFlow=f,this.aacLastPTS=i},t.prototype._parseMPEGPES=function(t){for(var e=t.data,n=e.length,r=0,i=0,o=t.pts;i<n;)if(j.isHeader(e,i)){var a=j.appendFrame(this._audioTrack,e,i,o,r);if(!a)break;i+=a.length,r++}else i++},t.prototype._parseID3PES=function(t){this._id3Track.samples.push(t)},t}(),z=G,V=function(){function t(e,n,r){y(this,t),this.observer=e,this.config=r,this.remuxer=n}return t.prototype.resetInitSegment=function(t,e,n,r){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:r,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e,n,r=L.a.getID3Data(t,0);if(r&&void 0!==L.a.getTimeStamp(r))for(e=r.length,n=Math.min(t.length-1,e+100);e<n;e++)if(j.probe(t,e))return C.b.log("MPEG Audio sync word found !"),!0;return!1},t.prototype.append=function(t,e,n,r){for(var i=L.a.getID3Data(t,0),o=L.a.getTimeStamp(i),a=o?90*o:9e4*e,s=i.length,u=t.length,l=0,c=0,d=this._audioTrack,h=[{pts:a,dts:a,data:i}];s<u;)if(j.isHeader(t,s)){var f=j.appendFrame(d,t,s,a,l);if(!f)break;s+=f.length,c=f.sample.pts,l++}else L.a.isHeader(t,s)?(i=L.a.getID3Data(t,s),h.push({pts:c,dts:c,data:i}),s+=i.length):s++;this.remuxer.remux(d,{samples:[]},{samples:h,inputTimeScale:9e4},{samples:[]},e,n,r)},t.prototype.destroy=function(){},t}(),H=V,W=function(){function t(){A(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}(),Q=W,Y=Math.pow(2,32)-1,q=function(){function t(){_(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var n=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]),r=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]);t.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=o,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,a,u,a,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,i))},t.box=function(t){for(var e,n=Array.prototype.slice.call(arguments,1),r=8,i=n.length,o=i;i--;)r+=n[i].byteLength;for(e=new Uint8Array(r),e[0]=r>>24&255,e[1]=r>>16&255,e[2]=r>>8&255,e[3]=255&r,e.set(t,4),i=0,r=8;i<o;i++)e.set(n[i],r),r+=n[i].byteLength;return e},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,n){n*=e;var r=Math.floor(n/(Y+1)),i=Math.floor(n%(Y+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,n,r){return t.box(t.types.moof,t.mfhd(e),t.traf(r,n))},t.moov=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trak(e[n]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(t.mvex(e)))},t.mvex=function(e){for(var n=e.length,r=[];n--;)r[n]=t.trex(e[n]);return t.box.apply(null,[t.types.mvex].concat(r))},t.mvhd=function(e,n){n*=e;var r=Math.floor(n/(Y+1)),i=Math.floor(n%(Y+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,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 t.box(t.types.mvhd,o)},t.sdtp=function(e){var n,r,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t.box(t.types.sdtp,o)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var n,r,i,o=[],a=[];for(n=0;n<e.sps.length;n++)r=e.sps[n],i=r.byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));for(n=0;n<e.pps.length;n++)r=e.pps[n],i=r.byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));var s=t.box(t.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|e.sps.length].concat(o).concat([e.pps.length]).concat(a))),u=e.width,l=e.height,c=e.pixelRatio[0],d=e.pixelRatio[1];return t.box(t.types.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,u>>8&255,255&u,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var n=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var n=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var n=e.id,r=e.duration*e.timescale,i=e.width,o=e.height,a=Math.floor(r/(Y+1)),s=Math.floor(r%(Y+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))},t.traf=function(e,n){var r=t.sdtp(e),i=e.id,o=Math.floor(n/(Y+1)),a=Math.floor(n%(Y+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,a>>24,a>>16&255,a>>8&255,255&a])),t.trun(e,r.length+16+20+8+16+8+8),r)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var n=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,n){var r,i,o,a,s,u,l=e.samples||[],c=l.length,d=12+16*c,h=new Uint8Array(d);for(n+=8+d,h.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)i=l[r],o=i.duration,a=i.size,s=i.flags,u=i.cts,h.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,u>>>24&255,u>>>16&255,u>>>8&255,255&u],12+16*r);return t.box(t.types.trun,h)},t.initSegment=function(e){t.types||t.init();var n,r=t.moov(e);return n=new Uint8Array(t.FTYP.byteLength+r.byteLength),n.set(t.FTYP),n.set(r,t.FTYP.byteLength),n},t}(),K=q,X=function(){function t(e,n,r,i){b(this,t),this.observer=e,this.config=n,this.typeSupported=r;var o=navigator.userAgent;this.isSafari=i&&i.indexOf("Apple")>-1&&o&&!o.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,n,r,i,o,a){if(this.ISGenerated||this.generateIS(t,e,i),this.ISGenerated){var s=t.samples.length,u=e.samples.length,l=i,c=i;if(s&&u){var d=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;l+=Math.max(0,d),c+=Math.max(0,-d)}if(s){t.timescale||(C.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,i));var h=this.remuxAudio(t,l,o,a);if(u){var f=void 0;h&&(f=h.endPTS-h.startPTS),e.timescale||(C.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,i)),this.remuxVideo(e,c,o,f,a)}}else{var p=void 0;u&&(p=this.remuxVideo(e,c,o,a)),p&&t.codec&&this.remuxEmptyAudio(t,l,o,p)}}n.samples.length&&this.remuxID3(n,i),r.samples.length&&this.remuxText(r,i),this.observer.trigger(E.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,n){var r,i,o=this.observer,a=t.samples,s=e.samples,u=this.typeSupported,l="audio/mp4",c={},d={tracks:c},h=void 0===this._initPTS;if(h&&(r=i=1/0),t.config&&a.length&&(t.timescale=t.samplerate,C.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(u.mpeg?(l="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),c.audio={container:l,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array:K.initSegment([t]),metadata:{channelCount:t.channelCount}},h&&(r=i=a[0].pts-t.inputTimeScale*n)),e.sps&&e.pps&&s.length){var f=e.inputTimeScale;e.timescale=f,c.video={container:"video/mp4",codec:e.codec,initSegment:K.initSegment([e]),metadata:{width:e.width,height:e.height}},h&&(r=Math.min(r,s[0].pts-f*n),i=Math.min(i,s[0].dts-f*n),this.observer.trigger(E.a.INIT_PTS_FOUND,{initPTS:r}))}Object.keys(c).length?(o.trigger(E.a.FRAG_PARSING_INIT_SEGMENT,d),this.ISGenerated=!0,h&&(this._initPTS=r,this._initDTS=i)):o.trigger(E.a.ERROR,{type:w.b.MEDIA_ERROR,details:w.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,n,r,i){var o,a,s,u,l,c,d,h=8,f=t.timescale,p=t.samples,v=[],m=p.length,g=this._PTSNormalize,y=this._initDTS,A=this.nextAvcDts,_=this.isSafari;_&&(n|=p.length&&A&&(i&&Math.abs(e-A/f)<.1||Math.abs(p[0].pts-A-y)<f/5)),n||(A=e*f),p.forEach(function(t){t.pts=g(t.pts-y,A),t.dts=g(t.dts-y,A)}),p.sort(function(t,e){var n=t.dts-e.dts,r=t.pts-e.pts;return n||r||t.id-e.id});var b=p.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(b<0){C.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(b/90)+" ms to overcome this issue");for(var T=0;T<p.length;T++)p[T].dts+=b}var S=p[0];l=Math.max(S.dts,0),u=Math.max(S.pts,0);var k=Math.round((l-A)/90);n&&k&&(k>1?C.b.log("AVC:"+k+" ms hole between fragments detected,filling it"):k<-1&&C.b.log("AVC:"+-k+" ms overlapping between fragments detected"),l=A,p[0].dts=l,u=Math.max(u-k,A),p[0].pts=u,C.b.log("Video/PTS/DTS adjusted: "+Math.round(u/90)+"/"+Math.round(l/90)+",delta:"+k+" ms")),S=p[p.length-1],d=Math.max(S.dts,0),c=Math.max(S.pts,0,d),_&&(o=Math.round((d-l)/(p.length-1)));for(var L=0,I=0,x=0;x<m;x++){for(var R=p[x],O=R.units,D=O.length,M=0,j=0;j<D;j++)M+=O[j].data.length;I+=M,L+=D,R.length=M,R.dts=_?l+x*o:Math.max(R.dts,l),R.pts=Math.max(R.pts,R.dts)}var P=I+4*L+8;try{a=new Uint8Array(P)}catch(t){return void this.observer.trigger(E.a.ERROR,{type:w.b.MUX_ERROR,details:w.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:P,reason:"fail allocating video mdat "+P})}var N=new DataView(a.buffer);N.setUint32(0,P),a.set(K.types.mdat,4);for(var U=0;U<m;U++){for(var B=p[U],F=B.units,G=0,z=void 0,V=0,H=F.length;V<H;V++){var W=F[V],Q=W.data,Y=W.data.byteLength;N.setUint32(h,Y),h+=4,a.set(Q,h),h+=Y,G+=4+Y}if(_)z=Math.max(0,o*Math.round((B.pts-B.dts)/o));else{if(U<m-1)o=p[U+1].dts-B.dts;else{var q=this.config,X=B.dts-p[U>0?U-1:U].dts;if(q.stretchShortVideoTrack){var Z=q.maxBufferHole,J=q.maxSeekHole,$=Math.floor(Math.min(Z,J)*f),tt=(r?u+r*f:this.nextAudioPts)-B.pts;tt>$?(o=tt-X,o<0&&(o=X),C.b.log("It is approximately "+tt/90+" ms to the next segment; using duration "+o/90+" ms for the last video frame.")):o=X}else o=X}z=Math.round(B.pts-B.dts)}v.push({size:G,duration:o,cts:z,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:B.key?2:1,isNonSync:B.key?0:1}})}this.nextAvcDts=d+o;var et=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,v.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var nt=v[0].flags;nt.dependsOn=2,nt.isNonSync=0}t.samples=v,s=K.moof(t.sequenceNumber++,l,t),t.samples=[];var rt={data1:s,data2:a,startPTS:u/f,endPTS:(c+o)/f,startDTS:l/f,endDTS:this.nextAvcDts/f,type:"video",nb:v.length,dropped:et};return this.observer.trigger(E.a.FRAG_PARSING_DATA,rt),rt},t.prototype.remuxAudio=function(t,e,n,r){var i,o,a,s,u,l,c,d=t.inputTimeScale,h=t.timescale,f=d/h,p=t.isAAC?1024:1152,v=p*f,m=this._PTSNormalize,g=this._initDTS,y=!t.isAAC&&this.typeSupported.mpeg,A=t.samples,_=[],b=this.nextAudioPts;if(n|=A.length&&b&&(r&&Math.abs(e-b/d)<.1||Math.abs(A[0].pts-b-g)<20*v),A.forEach(function(t){t.pts=t.dts=m(t.pts-g,e*d)}),A=A.filter(function(t){return t.pts>=0}),0!==A.length){if(n||(b=r?e*d:A[0].pts),t.isAAC)for(var T=this.config.maxAudioFramesDrift,S=0,k=b;S<A.length;){var L,I=A[S],x=I.pts;L=x-k;var R=Math.abs(1e3*L/d);if(L<=-T*v)C.b.warn("Dropping 1 audio frame @ "+(k/d).toFixed(3)+"s due to "+Math.round(R)+" ms overlap."),A.splice(S,1),t.len-=I.unit.length;else if(L>=T*v&&R<1e4&&k){var O=Math.round(L/v);C.b.warn("Injecting "+O+" audio frame @ "+(k/d).toFixed(3)+"s due to "+Math.round(1e3*L/d)+" ms gap.");for(var D=0;D<O;D++){var M=Math.max(k,0);a=Q.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),a||(C.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),a=I.unit.subarray()),A.splice(S,0,{unit:a,pts:M,dts:M}),t.len+=a.length,k+=v,S++}I.pts=I.dts=k,k+=v,S++}else Math.abs(L),I.pts=I.dts=k,k+=v,S++}for(var j=0,P=A.length;j<P;j++){var N=A[j],U=N.unit,B=N.pts;if(void 0!==c)o.duration=Math.round((B-c)/f);else{var F=Math.round(1e3*(B-b)/d),G=0;if(n&&t.isAAC&&F){if(F>0&&F<1e4)G=Math.round((B-b)/v),C.b.log(F+" ms hole between AAC samples detected,filling it"),G>0&&(a=Q.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),a||(a=U.subarray()),t.len+=G*a.length);else if(F<-12){C.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(b/d).toFixed(3)+"s/"+(B/d).toFixed(3)+"s/"+-F+"ms"),t.len-=U.byteLength;continue}B=b}if(l=B,!(t.len>0))return;var z=y?t.len:t.len+8;i=y?0:8;try{s=new Uint8Array(z)}catch(t){return void this.observer.trigger(E.a.ERROR,{type:w.b.MUX_ERROR,details:w.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:z,reason:"fail allocating audio mdat "+z})}y||(new DataView(s.buffer).setUint32(0,z),s.set(K.types.mdat,4));for(var V=0;V<G;V++)a=Q.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),a||(C.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),a=U.subarray()),s.set(a,i),i+=a.byteLength,o={size:a.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},_.push(o)}s.set(U,i);var H=U.byteLength;i+=H,o={size:H,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},_.push(o),c=B}var W=0,Y=_.length;if(Y>=2&&(W=_[Y-2].duration,o.duration=W),Y){this.nextAudioPts=b=c+f*W,t.len=0,t.samples=_,u=y?new Uint8Array:K.moof(t.sequenceNumber++,l/f,t),t.samples=[];var q=l/d,X=b/d,Z={data1:u,data2:s,startPTS:q,endPTS:X,startDTS:q,endDTS:X,type:"audio",nb:Y};return this.observer.trigger(E.a.FRAG_PARSING_DATA,Z),Z}return null}},t.prototype.remuxEmptyAudio=function(t,e,n,r){var i=t.inputTimeScale,o=t.samplerate?t.samplerate:i,a=i/o,s=this.nextAudioPts,u=(void 0!==s?s:r.startDTS*i)+this._initDTS,l=r.endDTS*i+this._initDTS,c=1024*a,d=Math.ceil((l-u)/c),h=Q.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(C.b.warn("remux empty Audio"),!h)return void C.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var f=[],p=0;p<d;p++){var v=u+p*c;f.push({unit:h,pts:v,dts:v}),t.len+=h.length}t.samples=f,this.remuxAudio(t,e,n)},t.prototype.remuxID3=function(t,e){var n,r=t.samples.length,i=t.inputTimeScale,o=this._initPTS,a=this._initDTS;if(r){for(var s=0;s<r;s++)n=t.samples[s],n.pts=(n.pts-o)/i,n.dts=(n.dts-a)/i;this.observer.trigger(E.a.FRAG_PARSING_METADATA,{samples:t.samples})}t.samples=[],e=e},t.prototype.remuxText=function(t,e){t.samples.sort(function(t,e){return t.pts-e.pts});var n,r=t.samples.length,i=t.inputTimeScale,o=this._initPTS;if(r){for(var a=0;a<r;a++)n=t.samples[a],n.pts=(n.pts-o)/i;this.observer.trigger(E.a.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[],e=e},t.prototype._PTSNormalize=function(t,e){var n;if(void 0===e)return t;for(n=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=n;return t},t}(),Z=X,J=function(){function t(e){T(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,n,r,i,o,a,s){var u=this.observer,l="";t&&(l+="audio"),e&&(l+="video"),u.trigger(E.a.FRAG_PARSING_DATA,{data1:s,startPTS:i,startDTS:i,type:l,nb:1,dropped:0}),u.trigger(E.a.FRAG_PARSED)},t}(),$=J,tt=function(){function t(e,n,r,i){S(this,t),this.observer=e,this.typeSupported=n,this.config=r,this.vendor=i}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,n,r,i,o,a,s,u,l,c,d){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var h=this.decrypter;null==h&&(h=this.decrypter=new k.a(this.observer,this.config));var f,p=this;try{f=performance.now()}catch(t){f=Date.now()}h.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var h;try{h=performance.now()}catch(t){h=Date.now()}p.observer.trigger(E.a.FRAG_DECRYPTED,{stats:{tstart:f,tdecrypt:h}}),p.pushDecrypted(new Uint8Array(t),e,new Uint8Array(n),r,i,o,a,s,u,l,c,d)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(n),r,i,o,a,s,u,l,c,d)},t.prototype.pushDecrypted=function(t,e,n,r,i,o,a,s,u,l,c,d){var h=this.demuxer;if(!h||a&&!this.probe(t)){for(var f=this.observer,p=this.typeSupported,v=this.config,m=[{demux:z,remux:Z},{demux:D,remux:$},{demux:x,remux:Z},{demux:H,remux:Z}],g=0,y=m.length;g<y;g++){var A=m[g],_=A.demux.probe;if(_(t)){var b=this.remuxer=new A.remux(f,v,p,this.vendor);h=new A.demux(f,b,v,p),this.probe=_;break}}if(!h)return void f.trigger(E.a.ERROR,{type:w.b.MEDIA_ERROR,details:w.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=h}var T=this.remuxer;(a||s)&&(h.resetInitSegment(n,r,i,l),T.resetInitSegment()),a&&(h.resetTimeStamp(d),T.resetTimeStamp(d)),"function"==typeof h.setDecryptData&&h.setDecryptData(e),h.append(t,o,u,c)},t}();e.a=tt},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){var n=Gt[e];return!!n&&!0===n[t.slice(0,4)]}function a(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}function s(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}function u(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)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)return null;for(var n=null,r=0;r<t.length;r++){var i=t[r];i.id===e&&(n=i)}return n}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(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}function f(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)}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(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}function m(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)}function g(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e,n){var r=t[e],i=t[n],o=i.startPTS;isNaN(o)?i.start=n>e?r.start+r.duration:Math.max(r.start-i.duration,0):n>e?(r.duration=o-r.start,r.duration<0&&Dt.b.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(i.duration=r.start-o,i.duration<0&&Dt.b.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!"))}function _(t,e,n,r,i,o){var a=n;if(!isNaN(e.startPTS)){var s=Math.abs(e.startPTS-n);isNaN(e.deltaPTS)?e.deltaPTS=s:e.deltaPTS=Math.max(s,e.deltaPTS),a=Math.max(n,e.startPTS),n=Math.min(n,e.startPTS),r=Math.max(r,e.endPTS),i=Math.min(i,e.startDTS),o=Math.max(o,e.endDTS)}var u=n-e.start;e.start=e.startPTS=n,e.maxStartPTS=a,e.endPTS=r,e.startDTS=i,e.endDTS=o,e.duration=r-n;var l=e.sn;if(!t||l<t.startSN||l>t.endSN)return 0;var c,d,h;for(c=l-t.startSN,d=t.fragments,d[c]=e,h=c;h>0;h--)A(d,h,h-1);for(h=c;h<d.length-1;h++)A(d,h,h+1);return t.PTSKnown=!0,u}function b(t,e){var n,r=Math.max(t.startSN,e.startSN)-e.startSN,i=Math.min(t.endSN,e.endSN)-e.startSN,o=e.startSN-t.startSN,a=t.fragments,s=e.fragments,u=0;if(i<r)return void(e.PTSKnown=!1);for(var l=r;l<=i;l++){var c=a[o+l],d=s[l];d&&c&&(u=c.cc-d.cc,isNaN(c.startPTS)||(d.start=d.startPTS=c.startPTS,d.endPTS=c.endPTS,d.duration=c.duration,d.backtracked=c.backtracked,d.dropped=c.dropped,n=d))}if(u)for(Dt.b.log("discontinuity sliding from playlist, take drift into account"),l=0;l<s.length;l++)s[l].cc+=u;if(n)_(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS);else if(o>=0&&o<a.length){var h=a[o].start;for(l=0;l<s.length;l++)s[l].start+=h}e.PTSKnown=t.PTSKnown}function T(t,e){for(var n=null,r=0;r<t.length;r+=1){var i=t[r];if(i&&i.cc===e){n=i;break}}return n}function S(t,e){return ee.search(t,function(t){return t.cc<e?1:t.cc>e?-1:0})}function E(t,e,n){var r=!1;return e&&e.details&&n&&(n.endCC>n.startCC||t&&t.cc<n.startCC)&&(r=!0),r}function w(t,e){var n=t.fragments,r=e.fragments;if(!r.length||!n.length)return void Dt.b.log("No fragments to align");var i=T(n,r[0].cc);return!i||i&&!i.startPTS?void Dt.b.log("No frag in previous level to align on"):i}function k(t,e){e.fragments.forEach(function(e){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}),e.PTSKnown=!0}function C(t,e,n){if(E(t,e,n)){var r=w(e.details,n);r&&(Dt.b.log("Adjusting PTS using last level due to CC increase within current level"),k(r.start,n))}if(!1===n.PTSKnown&&e&&e.details){var i=e.details.programDateTime,o=n.programDateTime,a=(o-i)/1e3+e.details.fragments[0].start;isNaN(a)||(Dt.b.log("adjusting PTS using programDateTime delta, sliding:"+a.toFixed(3)),k(a,n))}}function L(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(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}function x(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)}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(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}function D(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)}function M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(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}function P(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)}function N(){var t=g(),e=window.SourceBuffer||window.WebKitSourceBuffer,n=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!n&&!!r}function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(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}function z(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)}function V(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(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}function W(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)}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y(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}function q(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)}function K(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(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}function Z(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)}function J(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(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}function et(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)}function nt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rt(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}function it(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)}function ot(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new Ke,this.regionList=[]}function at(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 st(){this.values=Object.create(null)}function ut(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length){var s=a[0],u=a[1];e(s,u)}}}function lt(t,e,n){function r(){var e=at(t);if(null===e)throw new Error("Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function i(){t=t.replace(/^\s+/,"")}var o=t;if(i(),e.startTime=r(),i(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);t=t.substr(3),i(),e.endTime=r(),i(),function(t,e){var r=new st;ut(t,function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),a=o[0];r.integer(t,a),r.percent(t,a)&&r.set("snapToLines",!1),r.alt(t,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start",Ze,"end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start",Ze,"end","line-left","line-right","auto"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start",Ze,"end","left","right"])}},/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===Xe.line&&(i=-1),e.line=i,e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align",Ze);var o=r.get("position","auto");"auto"===o&&50===Xe.position&&(o="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=o}(t,e)}function ct(t){return t.replace(/<br(?: \/)?>/gi,"\n")}function dt(t,e,n,r){for(var i,o,a,s,u,l=window.VTTCue||window.TextTrackCue,c=0;c<r.rows.length;c++)if(i=r.rows[c],a=!0,s=0,u="",!i.isEmpty()){for(var d=0;d<i.chars.length;d++)i.chars[d].uchar.match(/\s/)&&a?s++:(u+=i.chars[d].uchar,a=!1);i.cueStartTime=e,e===n&&(n+=1e-4),o=new l(e,n,ct(u.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?o.line=c+1:o.line=c>7?c-2:c+1,o.align="left",o.position=Math.max(0,Math.min(100,s/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(o)}}function ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vt(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}function mt(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)}function gt(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}function yt(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function At(t,e,n,r){return Math.min(e,r)-Math.max(t,n)}function _t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bt(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}function Tt(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)}function St(t){for(var e=[],n=0;n<t.length;n++)"subtitles"===t[n].kind&&e.push(t[n]);return e}function Et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wt(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}function kt(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)}function Ct(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var Lt={};n.d(Lt,"newCue",function(){return dt});var It=n(6),xt=n.n(It),Rt=n(1),Ot=n(2),Dt=n(0),Mt="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},jt=function(){function t(e){r(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];this.handledEvents=i,this.useGenericHandler=!0,this.registerListeners()}return t.prototype.destroy=function(){this.unregisterListeners()},t.prototype.isEventHandler=function(){return"object"===Mt(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent},t.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if("hlsEventGeneric"===t)throw new Error("Forbidden event name: "+t);this.hls.on(t,this.onEvent)},this)},t.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)},this)},t.prototype.onEvent=function(t,e){this.onEventGeneric(t,e)},t.prototype.onEventGeneric=function(t,e){var n=function(t,e){var n="on"+t.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,e)};try{n.call(this,t,e).call()}catch(e){Dt.b.error("internal error happened while processing "+t+":"+e.message),this.hls.trigger(Rt.a.ERROR,{type:Ot.b.OTHER_ERROR,details:Ot.a.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}},t}(),Pt=jt,Nt=/^(\d+)x(\d+)$/,Ut=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,Bt=function(){function t(e){i(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var n in e)e.hasOwnProperty(n)&&(this[n]=e[n])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var n=new Uint8Array(e.length/2),r=0;r<e.length/2;r++)n[r]=parseInt(e.slice(2*r,2*r+2),16);return n}return null},t.prototype.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=Nt.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,n={};for(Ut.lastIndex=0;null!==(e=Ut.exec(t));){var r=e[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[e[1]]=r}return n},t}(),Ft=Bt,Gt={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}},zt=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Vt=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,Ht=/#EXT-X-MEDIA:(.*)/g,Wt=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),Qt=function(){function t(){l(this,t),this.method=null,this.key=null,this.iv=null,this._uri=null}return zt(t,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=xt.a.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),t}(),Yt=function(){function t(){l(this,t),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[]}return t.prototype.createInitializationVector=function(t){for(var e=new Uint8Array(16),n=12;n<16;n++)e[n]=t>>8*(15-n)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var n=t;return t&&t.method&&t.uri&&!t.iv&&(n=new Qt,n.method=t.method,n.baseuri=t.baseuri,n.reluri=t.reluri,n.iv=this.createInitializationVector(e)),n},t.prototype.cloneObj=function(t){return JSON.parse(JSON.stringify(t))},zt(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=xt.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange){var t=this._byteRange=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var n=this.lastByteRangeEndOffset;t[0]=n||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0]}}return this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}]),t}(),qt=function(t){function e(n){l(this,e);var r=s(this,t.call(this,n,Rt.a.MANIFEST_LOADING,Rt.a.LEVEL_LOADING,Rt.a.AUDIO_TRACK_LOADING,Rt.a.SUBTITLE_TRACK_LOADING));return r.loaders={},r}return u(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},Pt.prototype.destroy.call(this)},e.prototype.onManifestLoading=function(t){this.load(t.url,{type:"manifest"})},e.prototype.onLevelLoading=function(t){this.load(t.url,{type:"level",level:t.level,id:t.id})},e.prototype.onAudioTrackLoading=function(t){this.load(t.url,{type:"audioTrack",id:t.id})},e.prototype.onSubtitleTrackLoading=function(t){this.load(t.url,{type:"subtitleTrack",id:t.id})},e.prototype.load=function(t,e){var n=this.loaders[e.type];if(void 0!==n){var r=n.context;if(r&&r.url===t)return void Dt.b.trace("playlist request ongoing");Dt.b.warn("abort previous loader for type:"+e.type),n.abort()}var i=this.hls.config,o=void 0,a=void 0,s=void 0,u=void 0;"manifest"===e.type?(o=i.manifestLoadingMaxRetry,a=i.manifestLoadingTimeOut,s=i.manifestLoadingRetryDelay,u=i.manifestLoadingMaxRetryTimeout):"level"===e.type?(o=0,a=i.levelLoadingTimeOut):(o=i.levelLoadingMaxRetry,a=i.levelLoadingTimeOut,s=i.levelLoadingRetryDelay,u=i.levelLoadingMaxRetryTimeout,Dt.b.log("loading playlist for "+e.type+" "+(e.level||e.id))),n=this.loaders[e.type]=e.loader=void 0!==i.pLoader?new i.pLoader(i):new i.loader(i),e.url=t,e.responseType="";var l=void 0,c=void 0;l={timeout:a,maxRetry:o,retryDelay:s,maxRetryDelay:u},c={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},n.load(e,l,c)},e.prototype.resolve=function(t,e){return xt.a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},e.prototype.parseMasterPlaylist=function(t,e){var n=[],r=void 0;for(Vt.lastIndex=0;null!=(r=Vt.exec(t));){var i={},a=i.attrs=new Ft(r[1]);i.url=this.resolve(r[2],e);var s=a.decimalResolution("RESOLUTION");s&&(i.width=s.width,i.height=s.height),i.bitrate=a.decimalInteger("AVERAGE-BANDWIDTH")||a.decimalInteger("BANDWIDTH"),i.name=a.NAME,function(t,e){["video","audio"].forEach(function(n){var r=t.filter(function(t){return o(t,n)});if(r.length){var i=r.filter(function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)});e[n+"Codec"]=i.length>0?i[0]:r[0],t=t.filter(function(t){return-1===r.indexOf(t)})}}),e.unknownCodecs=t}([].concat((a.CODECS||"").split(/[ ,]+/)),i),i.videoCodec&&-1!==i.videoCodec.indexOf("avc1")&&(i.videoCodec=this.avc1toavcoti(i.videoCodec)),n.push(i)}return n},e.prototype.parseMasterPlaylistMedia=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=void 0,o=[],a=0;for(Ht.lastIndex=0;null!==(i=Ht.exec(t));){var s={},u=new Ft(i[1]);if(u.TYPE===n){if(s.groupId=u["GROUP-ID"],s.name=u.NAME,s.type=n,s.default="YES"===u.DEFAULT,s.autoselect="YES"===u.AUTOSELECT,s.forced="YES"===u.FORCED,u.URI&&(s.url=this.resolve(u.URI,e)),s.lang=u.LANGUAGE,s.name||(s.name=s.lang),r.length){var l=c(r,s.groupId);s.audioCodec=l?l.codec:r[0].codec}s.id=a++,o.push(s)}}return o},e.prototype.avc1toavcoti=function(t){var e,n=t.split(".");return n.length>2?(e=n.shift()+".",e+=parseInt(n.shift()).toString(16),e+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):e=t,e},e.prototype.parseLevelPlaylist=function(t,e,n,r){var i,o,a=0,s=0,u={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},l=new Qt,c=0,d=null,h=new Yt;for(Wt.lastIndex=0;null!==(i=Wt.exec(t));){var f=i[1];if(f){h.duration=parseFloat(f);var p=(" "+i[2]).slice(1);h.title=p||null,h.tagList.push(p?["INF",f,p]:["INF",f])}else if(i[3]){if(!isNaN(h.duration)){var v=a++;h.type=r,h.start=s,h.levelkey=l,h.sn=v,h.level=n,h.cc=c,h.baseurl=e,h.relurl=(" "+i[3]).slice(1),u.fragments.push(h),d=h,s+=h.duration,h=new Yt}}else if(i[4]){if(h.rawByteRange=(" "+i[4]).slice(1),d){var m=d.byteRangeEndOffset;m&&(h.lastByteRangeEndOffset=m)}}else if(i[5])h.rawProgramDateTime=(" "+i[5]).slice(1),h.tagList.push(["PROGRAM-DATE-TIME",h.rawProgramDateTime]),void 0===u.programDateTime&&(u.programDateTime=new Date(new Date(Date.parse(i[5]))-1e3*s));else{for(i=i[0].match(/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/),o=1;o<i.length&&void 0===i[o];o++);var g=(" "+i[o+1]).slice(1),y=(" "+i[o+2]).slice(1);switch(i[o]){case"#":h.tagList.push(y?[g,y]:[g]);break;case"PLAYLIST-TYPE":u.type=g.toUpperCase();break;case"MEDIA-SEQUENCE":a=u.startSN=parseInt(g);break;case"TARGETDURATION":u.targetduration=parseFloat(g);break;case"VERSION":u.version=parseInt(g);break;case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"DIS":c++,h.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":c=parseInt(g);break;case"KEY":var A=g,_=new Ft(A),b=_.enumeratedString("METHOD"),T=_.URI,S=_.hexadecimalInteger("IV");b&&(l=new Qt,T&&["AES-128","SAMPLE-AES"].indexOf(b)>=0&&(l.method=b,l.baseuri=e,l.reluri=T,l.key=null,l.iv=S));break;case"START":var E=g,w=new Ft(E),k=w.decimalFloatingPoint("TIME-OFFSET");isNaN(k)||(u.startTimeOffset=k);break;case"MAP":var C=new Ft(g);h.relurl=C.URI,h.rawByteRange=C.BYTERANGE,h.baseurl=e,h.level=n,h.type=r,h.sn="initSegment",u.initSegment=h,h=new Yt;break;default:Dt.b.warn("line parsed but not handled: "+i)}}}return h=d,h&&!h.relurl&&(u.fragments.pop(),s-=h.duration),u.totalduration=s,u.averagetargetduration=s/u.fragments.length,u.endSN=a-1,u.startCC=u.fragments[0]?u.fragments[0].cc:0,u.endCC=c,u},e.prototype.loadsuccess=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t.data,o=t.url,a=n.type,s=n.id,u=n.level,l=this.hls;if(this.loaders[a]=void 0,void 0!==o&&0!==o.indexOf("data:")||(o=n.url),e.tload=performance.now(),0===i.indexOf("#EXTM3U"))if(i.indexOf("#EXTINF:")>0){var c="audioTrack"!==a&&"subtitleTrack"!==a,d=isNaN(u)?isNaN(s)?0:s:u,h=this.parseLevelPlaylist(i,o,d,"audioTrack"===a?"audio":"subtitleTrack"===a?"subtitle":"main");h.tload=e.tload,"manifest"===a&&l.trigger(Rt.a.MANIFEST_LOADED,{levels:[{url:o,details:h}],audioTracks:[],url:o,stats:e,networkDetails:r}),e.tparsed=performance.now(),h.targetduration?c?l.trigger(Rt.a.LEVEL_LOADED,{details:h,level:u||0,id:s||0,stats:e,networkDetails:r}):"audioTrack"===a?l.trigger(Rt.a.AUDIO_TRACK_LOADED,{details:h,id:s,stats:e,networkDetails:r}):"subtitleTrack"===a&&l.trigger(Rt.a.SUBTITLE_TRACK_LOADED,{details:h,id:s,stats:e,networkDetails:r}):l.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:Ot.a.MANIFEST_PARSING_ERROR,fatal:!0,url:o,reason:"invalid targetduration",networkDetails:r})}else{var f=this.parseMasterPlaylist(i,o);if(f.length){var p=f.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),v=this.parseMasterPlaylistMedia(i,o,"AUDIO",p),m=this.parseMasterPlaylistMedia(i,o,"SUBTITLES");if(v.length){var g=!1;v.forEach(function(t){t.url||(g=!0)}),!1===g&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(Dt.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),v.unshift({type:"main",name:"main"}))}l.trigger(Rt.a.MANIFEST_LOADED,{levels:f,audioTracks:v,subtitles:m,url:o,stats:e,networkDetails:r})}else l.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:Ot.a.MANIFEST_PARSING_ERROR,fatal:!0,url:o,reason:"no level found in manifest",networkDetails:r})}else l.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:Ot.a.MANIFEST_PARSING_ERROR,fatal:!0,url:o,reason:"no EXTM3U delimiter",networkDetails:r})},e.prototype.loaderror=function(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=e.loader;switch(e.type){case"manifest":n=Ot.a.MANIFEST_LOAD_ERROR,r=!0;break;case"level":n=Ot.a.LEVEL_LOAD_ERROR,r=!1;break;case"audioTrack":n=Ot.a.AUDIO_TRACK_LOAD_ERROR,r=!1}o&&(o.abort(),this.loaders[e.type]=void 0),this.hls.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:n,fatal:r,url:o.url,loader:o,response:t,context:e,networkDetails:i})},e.prototype.loadtimeout=function(t,e){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=e.loader;switch(e.type){case"manifest":n=Ot.a.MANIFEST_LOAD_TIMEOUT,r=!0;break;case"level":n=Ot.a.LEVEL_LOAD_TIMEOUT,r=!1;break;case"audioTrack":n=Ot.a.AUDIO_TRACK_LOAD_TIMEOUT,r=!1}o&&(o.abort(),this.loaders[e.type]=void 0),this.hls.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:n,fatal:r,url:o.url,loader:o,context:e,networkDetails:i})},e}(Pt),Kt=qt,Xt=function(t){function e(n){d(this,e);var r=h(this,t.call(this,n,Rt.a.FRAG_LOADING));return r.loaders={},r}return f(e,t),e.prototype.destroy=function(){var t=this.loaders;for(var e in t){var n=t[e];n&&n.destroy()}this.loaders={},Pt.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,n=e.type,r=this.loaders[n],i=this.hls.config;e.loaded=0,r&&(Dt.b.warn("abort previous fragment loader for type:"+n),r.abort()),r=this.loaders[n]=e.loader=void 0!==i.fLoader?new i.fLoader(i):new i.loader(i);var o=void 0,a=void 0,s=void 0;o={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var u=e.byteRangeStartOffset,l=e.byteRangeEndOffset;isNaN(u)||isNaN(l)||(o.rangeStart=u,o.rangeEnd=l),a={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},s={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},r.load(o,a,s)},e.prototype.loadsuccess=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t.data,o=n.frag;o.loader=void 0,this.loaders[o.type]=void 0,this.hls.trigger(Rt.a.FRAG_LOADED,{payload:i,frag:o,stats:e,networkDetails:r})},e.prototype.loaderror=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:Ot.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:n})},e.prototype.loadtimeout=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:Ot.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:n})},e.prototype.loadprogress=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=e.frag;i.loaded=t.loaded,this.hls.trigger(Rt.a.FRAG_LOAD_PROGRESS,{frag:i,stats:t,networkDetails:r})},e}(Pt),Zt=Xt,Jt=function(t){function e(n){p(this,e);var r=v(this,t.call(this,n,Rt.a.KEY_LOADING));return r.loaders={},r.decryptkey=null,r.decrypturl=null,r}return m(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},Pt.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,n=e.type,r=this.loaders[n],i=e.decryptdata,o=i.uri;if(o!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;r&&(Dt.b.warn("abort previous key loader for type:"+n),r.abort()),e.loader=this.loaders[n]=new a.loader(a),this.decrypturl=o,this.decryptkey=null;var s=void 0,u=void 0,l=void 0;s={url:o,frag:e,responseType:"arraybuffer"},u={timeout:a.fragLoadingTimeOut,maxRetry:a.fragLoadingMaxRetry,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(s,u,l)}else this.decryptkey&&(i.key=this.decryptkey,this.hls.trigger(Rt.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,n){var r=n.frag;this.decryptkey=r.decryptdata.key=new Uint8Array(t.data),r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(Rt.a.KEY_LOADED,{frag:r})},e.prototype.loaderror=function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:Ot.a.KEY_LOAD_ERROR,fatal:!1,frag:n,response:t})},e.prototype.loadtimeout=function(t,e){var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Rt.a.ERROR,{type:Ot.b.NETWORK_ERROR,details:Ot.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}(Pt),$t=Jt,te={search:function(t,e){for(var n=0,r=t.length-1,i=null,o=null;n<=r;){i=(n+r)/2|0,o=t[i];var a=e(o);if(a>0)n=i+1;else{if(!(a<0))return o;r=i-1}}return null}},ee=te,ne={isBuffered:function(t,e){try{if(t)for(var n=t.buffered,r=0;r<n.length;r++)if(e>=n.start(r)&&e<=n.end(r))return!0}catch(t){}return!1},bufferInfo:function(t,e,n){try{if(t){var r,i=t.buffered,o=[];for(r=0;r<i.length;r++)o.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(o,e,n)}}catch(t){}return{len:0,start:e,end:e,nextStart:void 0}},bufferedInfo:function(t,e,n){var r,i,o,a,s,u=[];for(t.sort(function(t,e){return t.start-e.start||e.end-t.end}),s=0;s<t.length;s++){var l=u.length;if(l){var c=u[l-1].end;t[s].start-c<n?t[s].end>c&&(u[l-1].end=t[s].end):u.push(t[s])}else u.push(t[s])}for(s=0,r=0,i=o=e;s<u.length;s++){var d=u[s].start,h=u[s].end;if(e+n>=d&&e<h)i=d,o=h,r=o-e;else if(e+n<d){a=d;break}}return{len:r,start:i,end:o,nextStart:a}}},re=ne,ie=n(7),oe=n(5),ae=n.n(oe),se=n(9),ue=n.n(se),le=g(),ce=function(){function t(e,n){y(this,t),this.hls=e,this.id=n;var r=this.observer=new ae.a,i=e.config;r.trigger=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];r.emit.apply(r,[t,t].concat(n))},r.off=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];r.removeListener.apply(r,[t].concat(n))};var o=function(t,n){n=n||{},n.frag=this.frag,n.id=this.id,e.trigger(t,n)}.bind(this);r.on(Rt.a.FRAG_DECRYPTED,o),r.on(Rt.a.FRAG_PARSING_INIT_SEGMENT,o),r.on(Rt.a.FRAG_PARSING_DATA,o),r.on(Rt.a.FRAG_PARSED,o),r.on(Rt.a.ERROR,o),r.on(Rt.a.FRAG_PARSING_METADATA,o),r.on(Rt.a.FRAG_PARSING_USERDATA,o),r.on(Rt.a.INIT_PTS_FOUND,o);var a={mp4:le.isTypeSupported("video/mp4"),mpeg:le.isTypeSupported("audio/mpeg"),mp3:le.isTypeSupported('audio/mp4; codecs="mp3"')},s=navigator.vendor;if(i.enableWorker&&"undefined"!=typeof Worker){Dt.b.log("demuxing in webworker");var u=void 0;try{u=this.w=ue()(10),this.onwmsg=this.onWorkerMessage.bind(this),u.addEventListener("message",this.onwmsg),u.onerror=function(t){e.trigger(Rt.a.ERROR,{type:Ot.b.OTHER_ERROR,details:Ot.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},u.postMessage({cmd:"init",typeSupported:a,vendor:s,id:n,config:JSON.stringify(i)})}catch(t){Dt.b.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),u&&URL.revokeObjectURL(u.objectURL),this.demuxer=new ie.a(r,a,i,s),this.w=void 0}}else this.demuxer=new ie.a(r,a,i,s)}return t.prototype.destroy=function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var e=this.demuxer;e&&(e.destroy(),this.demuxer=null)}var n=this.observer;n&&(n.removeAllListeners(),this.observer=null)},t.prototype.push=function(t,e,n,r,i,o,a,s){var u=this.w,l=isNaN(i.startDTS)?i.start:i.startDTS,c=i.decryptdata,d=this.frag,h=!(d&&i.cc===d.cc),f=!(d&&i.level===d.level),p=d&&i.sn===d.sn+1,v=!f&&p;if(h&&Dt.b.log(this.id+":discontinuity detected"),f&&Dt.b.log(this.id+":switch detected"),this.frag=i,u)u.postMessage({cmd:"demux",data:t,decryptdata:c,initSegment:e,audioCodec:n,videoCodec:r,timeOffset:l,discontinuity:h,trackSwitch:f,contiguous:v,duration:o,accurateTimeOffset:a,defaultInitPTS:s},t instanceof ArrayBuffer?[t]:[]);else{var m=this.demuxer;m&&m.push(t,c,e,n,r,l,h,f,v,o,a,s)}},t.prototype.onWorkerMessage=function(t){var e=t.data,n=this.hls;switch(e.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case Rt.a.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data2&&(e.data.data2=new Uint8Array(e.data2));default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,n.trigger(e.event,e.data)}},t}(),de=ce,he={toString:function(t){for(var e="",n=t.length,r=0;r<n;r++)e+="["+t.start(r).toFixed(3)+","+t.end(r).toFixed(3)+"]";return e}},fe=he,pe=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),ve={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},me=function(t){function e(n){L(this,e);var r=I(this,t.call(this,n,Rt.a.MEDIA_ATTACHED,Rt.a.MEDIA_DETACHING,Rt.a.MANIFEST_LOADING,Rt.a.MANIFEST_PARSED,Rt.a.LEVEL_LOADED,Rt.a.KEY_LOADED,Rt.a.FRAG_LOADED,Rt.a.FRAG_LOAD_EMERGENCY_ABORTED,Rt.a.FRAG_PARSING_INIT_SEGMENT,Rt.a.FRAG_PARSING_DATA,Rt.a.FRAG_PARSED,Rt.a.ERROR,Rt.a.AUDIO_TRACK_SWITCHING,Rt.a.AUDIO_TRACK_SWITCHED,Rt.a.BUFFER_CREATED,Rt.a.BUFFER_APPENDED,Rt.a.BUFFER_FLUSHED));return r.config=n.config,r.audioCodecSwap=!1,r.ticks=0,r._state=ve.STOPPED,r.ontick=r.tick.bind(r),r}return x(e,t),e.prototype.destroy=function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),Pt.prototype.destroy.call(this),this.state=ve.STOPPED},e.prototype.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(r=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}e>0&&-1===t&&(Dt.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=ve.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=ve.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=ve.STOPPED,this.forceStartLoad=!1},e.prototype.tick=function(){1==++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){switch(this.state){case ve.ERROR:break;case ve.BUFFER_FLUSHING:this.fragLoadError=0;break;case ve.IDLE:this._doTickIdle();break;case ve.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=ve.IDLE);break;case ve.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),n=this.retryDate;(!n||e>=n||this.media&&this.media.seeking)&&(Dt.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=ve.IDLE);break;case ve.ERROR:case ve.STOPPED:case ve.FRAG_LOADING:case ve.PARSING:case ve.PARSED:case ve.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&e.startFragPrefetch)){var r=void 0;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=t.nextLoadLevel,o=this.levels[i];if(o){var a=o.bitrate,s=void 0;s=a?Math.max(8*e.maxBufferSize/a,e.maxBufferLength):e.maxBufferLength,s=Math.min(s,e.maxMaxBufferLength);var u=re.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,e.maxBufferHole),l=u.len;if(!(l>=s)){Dt.b.trace("buffer length of "+l.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=i;var c=o.details;if(void 0===c||!0===c.live&&this.levelLastLoaded!==i)return void(this.state=ve.WAITING_LEVEL);var d=this.fragPrevious;if(!c.live&&d&&!d.backtracked&&d.sn===c.endSN&&!u.nextStart&&Math.min(n.duration,d.start+d.duration)-Math.max(u.end,d.start)<=Math.max(.2,d.duration)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(Rt.a.BUFFER_EOS,h),void(this.state=ve.ENDED)}this._fetchPayloadOrEos(r,u,c)}}}},e.prototype._fetchPayloadOrEos=function(t,e,n){var r=this.fragPrevious,i=this.level,o=n.fragments,a=o.length;if(0!==a){var s=o[0].start,u=o[a-1].start+o[a-1].duration,l=e.end,c=void 0;if(n.initSegment&&!n.initSegment.data)c=n.initSegment;else if(n.live){var d=this.config.initialLiveManifestSize;if(a<d)return void Dt.b.warn("Can not start playback of a level, reason: not enough fragments "+a+" < "+d);if(null===(c=this._ensureFragmentAtLivePoint(n,l,s,u,r,o,a)))return}else l<s&&(c=o[0]);c||(c=this._findFragment(s,r,a,o,l,u,n)),c&&this._loadFragmentOrKey(c,i,n,t,l)}},e.prototype._ensureFragmentAtLivePoint=function(t,e,n,r,i,o,a){var s=this.hls.config,u=this.media,l=void 0,c=void 0!==s.liveMaxLatencyDuration?s.liveMaxLatencyDuration:s.liveMaxLatencyDurationCount*t.targetduration;if(e<Math.max(n-s.maxFragLookUpTolerance,r-c)){var d=this.liveSyncPosition=this.computeLivePosition(n,t);Dt.b.log("buffer end: "+e.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+d.toFixed(3)),e=d,u&&u.readyState&&u.duration>d&&(u.currentTime=d),this.nextLoadPosition=d}if(t.PTSKnown&&e>r&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(i){var h=i.sn+1;if(h>=t.startSN&&h<=t.endSN){var f=o[h-t.startSN];i.cc===f.cc&&(l=f,Dt.b.log("live playlist, switching playlist, load frag with next SN: "+l.sn))}l||(l=ee.search(o,function(t){return i.cc-t.cc}))&&Dt.b.log("live playlist, switching playlist, load frag with same CC: "+l.sn)}l||(l=o[Math.min(a-1,Math.round(a/2))],Dt.b.log("live playlist, switching playlist, unknown, load middle frag : "+l.sn))}return l},e.prototype._findFragment=function(t,e,n,r,i,o,a){var s=this.hls.config,u=void 0,l=void 0,c=s.maxFragLookUpTolerance,d=e?r[e.sn-r[0].sn+1]:void 0,h=function(t){var e=Math.min(c,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-e<=i?1:t.start-e>i&&t.start?-1:0};if(i<o?(i>o-c&&(c=0),l=d&&!h(d)?d:ee.search(r,h)):l=r[n-1],l){u=l;var f=u.sn-a.startSN,p=e&&u.level===e.level,v=r[f-1],m=r[f+1];if(e&&u.sn===e.sn)if(p&&!u.backtracked)if(u.sn<a.endSN){var g=e.deltaPTS;g&&g>s.maxBufferHole&&e.dropped&&f?(u=v,Dt.b.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this"),e.loadCounter--):(u=m,Dt.b.log("SN just loaded, load next one: "+u.sn))}else u=null;else u.backtracked&&(m&&m.backtracked?(Dt.b.warn("Already backtracked from fragment "+m.sn+", will not backtrack to fragment "+u.sn+". Loading fragment "+m.sn),u=m):(Dt.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),u.dropped=0,v?(v.loadCounter&&v.loadCounter--,u=v,u.backtracked=!0):f&&(u=null)))}return u},e.prototype._loadFragmentOrKey=function(t,e,n,r,i){var o=this.hls,a=o.config;if(!t.decryptdata||null==t.decryptdata.uri||null!=t.decryptdata.key){if(Dt.b.log("Loading "+t.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+e+", currentTime:"+r.toFixed(3)+",bufferEnd:"+i.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,t.loadCounter){t.loadCounter++;var s=a.fragLoadingLoopThreshold;if(t.loadCounter>s&&Math.abs(this.fragLoadIdx-t.loadIdx)<s)return void o.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:t})}else t.loadCounter=1;return t.loadIdx=this.fragLoadIdx,t.autoLevel=o.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.fragCurrent=t,this.startFragRequested=!0,isNaN(t.sn)||t.bitrateTest||(this.nextLoadPosition=t.start+t.duration),o.trigger(Rt.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new de(o,"main")),void(this.state=ve.FRAG_LOADING)}Dt.b.log("Loading key for "+t.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+e),this.state=ve.KEY_LOADING,o.trigger(Rt.a.KEY_LOADING,{frag:t})},e.prototype.getBufferedFrag=function(t){return ee.search(this._bufferedFrags,function(e){return t<e.startPTS?-1:t>e.endPTS?1:0})},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t,e,n=this.media;if(n&&n.readyState&&!1===n.seeking&&(e=n.currentTime,e>n.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),re.isBuffered(n,e)?t=this.getBufferedFrag(e):re.isBuffered(n,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var r=t;if(r!==this.fragPlaying){this.hls.trigger(Rt.a.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(Rt.a.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}},e.prototype.immediateLevelSwitch=function(){if(Dt.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,re.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e=void 0,n=void 0,r=void 0;if(void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),n=this.getBufferedFrag(t.currentTime),n&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),t.paused)e=0;else{var i=this.hls.nextLoadLevel,o=this.levels[i],a=this.fragLastKbps;e=a&&this.fragCurrent?this.fragCurrent.duration*o.bitrate/(1e3*a)+1:0}if((r=this.getBufferedFrag(t.currentTime+e))&&(r=this.followingBufferedFrag(r))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(r.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=ve.BUFFER_FLUSHING;var n={startOffset:t,endOffset:e};this.altAudio&&(n.type="video"),this.hls.trigger(Rt.a.BUFFER_FLUSHING,n)},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(Dt.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0,t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,n=this.config;isNaN(e)||Dt.b.log("media seeking to "+e.toFixed(3));var r=this.mediaBuffer?this.mediaBuffer:t,i=re.bufferInfo(r,e,this.config.maxBufferHole);if(this.state===ve.FRAG_LOADING){var o=this.fragCurrent;if(0===i.len&&o){var a=n.maxFragLookUpTolerance,s=o.start-a,u=o.start+o.duration+a;e<s||e>u?(o.loader&&(Dt.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=ve.IDLE):Dt.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===ve.ENDED&&(0===i.len&&(this.fragPrevious=0),this.state=ve.IDLE);t&&(this.lastCurrentTime=e),this.state!==ve.FRAG_LOADING&&void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*n.fragLoadingLoopThreshold),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;isNaN(e)||Dt.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){Dt.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){Dt.b.log("trigger BUFFER_RESET"),this.hls.trigger(Rt.a.BUFFER_RESET),this._bufferedFrags=[],this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e,n=!1,r=!1;t.levels.forEach(function(t){(e=t.audioCodec)&&(-1!==e.indexOf("mp4a.40.2")&&(n=!0),-1!==e.indexOf("mp4a.40.5")&&(r=!0))}),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&Dt.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,n=t.level,r=this.levels[this.levelLastLoaded],i=this.levels[n],o=e.totalduration,a=0;if(Dt.b.log("level "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+o),e.live){var s=i.details;s&&e.fragments.length>0?(b(s,e),a=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(a,s),e.PTSKnown&&!isNaN(a)?Dt.b.log("live playlist sliding:"+a.toFixed(3)):(Dt.b.log("live playlist - outdated PTS, unknown sliding"),C(this.fragPrevious,r,e))):(Dt.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,C(this.fragPrevious,r,e))}else e.PTSKnown=!1;if(i.details=e,this.levelLastLoaded=n,this.hls.trigger(Rt.a.LEVEL_UPDATED,{details:e,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var u=e.startTimeOffset;isNaN(u)?e.live?(this.startPosition=this.computeLivePosition(a,e),Dt.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(u<0&&(Dt.b.log("negative start time offset "+u+", count from end of last fragment"),u=a+o+u),Dt.b.log("start time offset found in playlist, adjust startPosition to "+u),this.startPosition=u),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===ve.WAITING_LEVEL&&(this.state=ve.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===ve.KEY_LOADING&&(this.state=ve.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,n=t.frag;if(this.state===ve.FRAG_LOADING&&e&&"main"===n.type&&n.level===e.level&&n.sn===e.sn){var r=t.stats,i=this.levels[e.level],o=i.details;if(Dt.b.log("Loaded "+e.sn+" of ["+o.startSN+" ,"+o.endSN+"],level "+e.level),this.bitrateTest=!1,this.stats=r,!0===n.bitrateTest&&this.hls.nextLoadLevel)this.state=ve.IDLE,this.startFragRequested=!1,r.tparsed=r.tbuffered=performance.now(),this.hls.trigger(Rt.a.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.tick();else if("initSegment"===n.sn)this.state=ve.IDLE,r.tparsed=r.tbuffered=performance.now(),o.initSegment.data=t.payload,this.hls.trigger(Rt.a.FRAG_BUFFERED,{stats:r,frag:e,id:"main"}),this.tick();else{this.state=ve.PARSING;var a=o.totalduration,s=e.level,u=e.sn,l=this.config.defaultAudioCodec||i.audioCodec;this.audioCodecSwap&&(Dt.b.log("swapping playlist audio codec"),void 0===l&&(l=this.lastAudioCodec),l&&(l=-1!==l.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,Dt.b.log("Parsing "+u+" of ["+o.startSN+" ,"+o.endSN+"],level "+s+", cc "+e.cc);var c=this.demuxer;c||(c=this.demuxer=new de(this.hls,"main"));var d=this.media,h=d&&d.seeking,f=!h&&(o.PTSKnown||!o.live),p=o.initSegment?o.initSegment.data:[];c.push(t.payload,p,l,i.videoCodec,e,a,f,void 0)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,n=t.frag;if(e&&"main"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===ve.PARSING){var r,i,o=t.tracks;if(o.audio&&this.altAudio&&delete o.audio,i=o.audio){var a=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();a&&this.audioCodecSwap&&(Dt.b.log("swapping playlist audio codec"),a=-1!==a.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&-1===s.indexOf("firefox")&&(a="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==i.container&&(a="mp4a.40.2",Dt.b.log("Android: force audio codec to "+a)),i.levelCodec=a,i.id=t.id}i=o.video,i&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=t.id),this.hls.trigger(Rt.a.BUFFER_CODECS,o);for(r in o){i=o[r],Dt.b.log("main track:"+r+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var u=i.initSegment;u&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(Rt.a.BUFFER_APPENDING,{type:r,data:u,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,n=this.fragCurrent,r=t.frag;if(n&&"main"===t.id&&r.sn===n.sn&&r.level===n.level&&("audio"!==t.type||!this.altAudio)&&this.state===ve.PARSING){var i=this.levels[this.level],o=n;if(isNaN(t.endPTS)&&(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),Dt.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(o.dropped=t.dropped,o.dropped)if(o.backtracked)Dt.b.warn("Already backtracked on this fragment, appending with the gap");else{var a=i.details;if(!a||o.sn!==a.startSN)return Dt.b.warn("missing video frame(s), backtracking fragment"),o.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=ve.IDLE,this.fragPrevious=o,void this.tick();Dt.b.warn("missing video frame(s) on first frag, appending with gap")}else o.backtracked=!1;var s=_(i.details,o,t.startPTS,t.endPTS,t.startDTS,t.endDTS),u=this.hls;u.trigger(Rt.a.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:s,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(n){n&&n.length&&e.state===ve.PARSING&&(e.appended=!0,e.pendingBuffering=!0,u.trigger(Rt.a.BUFFER_APPENDING,{type:t.type,data:n,parent:"main",content:"data"}))}),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,n=t.frag;e&&"main"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===ve.PARSING&&(this.stats.tparsed=performance.now(),this.state=ve.PARSED,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,n=t.id;if(!e){if(this.mediaBuffer!==this.media){Dt.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(Dt.b.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=ve.IDLE}var i=this.hls;i.trigger(Rt.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(Rt.a.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,n=!!this.hls.audioTracks[e].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(Dt.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,n=void 0,r=void 0,i=!1;for(var o in e){var a=e[o];"main"===a.id?(r=o,n=a,"video"===o&&(this.videoBuffer=e[o].buffer)):i=!0}i&&n?(Dt.b.log("alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==ve.PARSING&&e!==ve.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==ve.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;Dt.b.log("main buffered : "+fe.toString(e.buffered));var n=this._bufferedFrags.filter(function(t){return re.isBuffered(e,(t.startPTS+t.endPTS)/2)});n.push(t),this._bufferedFrags=n.sort(function(t,e){return t.startPTS-e.startPTS}),this.fragPrevious=t;var r=this.stats;r.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*r.total/(r.tbuffered-r.tfirst)),this.hls.trigger(Rt.a.FRAG_BUFFERED,{stats:r,frag:t,id:"main"}),this.state=ve.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var n=!!this.media&&re.isBuffered(this.media,this.media.currentTime)&&re.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case Ot.a.FRAG_LOAD_ERROR:case Ot.a.FRAG_LOAD_TIMEOUT:case Ot.a.KEY_LOAD_ERROR:case Ot.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var r=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);e.loadCounter=0,Dt.b.warn("mediaController: frag loading failed, retry in "+r+" ms"),this.retryDate=performance.now()+r,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=ve.FRAG_LOADING_WAITING_RETRY}else Dt.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=ve.ERROR;break;case Ot.a.FRAG_LOOP_LOADING_ERROR:t.fatal||(n?(this._reduceMaxBufferLength(e.duration),this.state=ve.IDLE):e.autoLevel&&0!==e.level||(t.fatal=!0,this.state=ve.ERROR));break;case Ot.a.LEVEL_LOAD_ERROR:case Ot.a.LEVEL_LOAD_TIMEOUT:this.state!==ve.ERROR&&(t.fatal?(this.state=ve.ERROR,Dt.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==ve.WAITING_LEVEL||(this.state=ve.IDLE));break;case Ot.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==ve.PARSING&&this.state!==ve.PARSED||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=ve.IDLE):(Dt.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,Dt.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*e.fragLoadingLoopThreshold))},e.prototype._checkBuffer=function(){var t=this.media,e=this.config;if(t&&t.readyState){var n=t.currentTime,r=this.mediaBuffer?this.mediaBuffer:t,i=r.buffered;if(!this.loadedmetadata&&i.length){this.loadedmetadata=!0;var o=t.seeking?n:this.startPosition,a=re.isBuffered(r,o),s=i.start(0),u=!a&&Math.abs(o-s)<e.maxSeekHole;(n!==o||u)&&(Dt.b.log("target start position:"+o),u&&(o=s,Dt.b.log("target start position not buffered, seek to buffered.start(0) "+o)),Dt.b.log("adjust currentTime from "+n+" to "+o),t.currentTime=o)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var l=re.bufferInfo(t,n,0),c=!(t.paused||t.ended||0===t.buffered.length),d=n!==this.lastCurrentTime;if(d)this.stallReported&&(Dt.b.warn("playback not stuck anymore @"+n+", after "+Math.round(performance.now()-this.stalled)+"ms"),this.stallReported=!1),this.stalled=void 0,this.nudgeRetry=0;else if(c){var h=performance.now(),f=this.hls;if(this.stalled){var p=h-this.stalled,v=l.len,m=this.nudgeRetry||0;if(v<=.5&&p>1e3*e.lowBufferWatchdogPeriod){this.stallReported||(this.stallReported=!0,Dt.b.warn("playback stalling in low buffer @"+n),f.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}));var g=l.nextStart,y=g-n;if(g&&y<e.maxSeekHole&&y>0){this.nudgeRetry=++m;var A=m*e.nudgeOffset;Dt.b.log("adjust currentTime from "+t.currentTime+" to next buffered @ "+g+" + nudge "+A),t.currentTime=g+A,this.stalled=void 0,f.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,hole:g+A-n})}}else if(v>.5&&p>1e3*e.highBufferWatchdogPeriod)if(this.stallReported||(this.stallReported=!0,Dt.b.warn("playback stalling in high buffer @"+n),f.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:v})),this.stalled=void 0,this.nudgeRetry=++m,m<e.nudgeMaxRetry){var _=t.currentTime,b=_+m*e.nudgeOffset;Dt.b.log("adjust currentTime from "+_+" to "+b),t.currentTime=b,f.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else Dt.b.error("still stuck in high buffer @"+n+" after "+e.nudgeMaxRetry+", raise fatal error"),f.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_STALLED_ERROR,fatal:!0})}else this.stalled=h,this.stallReported=!1}}}},e.prototype.onFragLoadEmergencyAborted=function(){this.state=ve.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},e.prototype.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;this._bufferedFrags=this._bufferedFrags.filter(function(e){return re.isBuffered(t,(e.startPTS+e.endPTS)/2)}),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.state=ve.IDLE,this.fragPrevious=null},e.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},e.prototype.computeLivePosition=function(t,e){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-n)},pe(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,Dt.b.log("main stream:"+e+"->"+t),this.hls.trigger(Rt.a.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(Pt),ge=me,ye=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Ae=function(t){function e(n){R(this,e);var r=O(this,t.call(this,n,Rt.a.MANIFEST_LOADED,Rt.a.LEVEL_LOADED,Rt.a.FRAG_LOADED,Rt.a.ERROR));return r.canload=!1,r.currentLevelIndex=null,r.manualLevelIndex=-1,r.timer=null,r}return D(e,t),e.prototype.destroy=function(){this.cleanTimer(),this.manualLevelIndex=-1},e.prototype.cleanTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.startLoad=function(){var t=this._levels;this.canload=!0,this.levelRetryCount=0,t&&t.forEach(function(t){t.loadError=0;var e=t.details;e&&e.live&&(t.details=void 0)}),null!==this.timer&&this.loadLevel()},e.prototype.stopLoad=function(){this.canload=!1},e.prototype.onManifestLoaded=function(t){var e=[],n=void 0,r={},i=null,o=!1,s=!1,u=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),l=[];if(t.levels.forEach(function(t){t.loadError=0,t.fragmentError=!1,o=o||!!t.videoCodec,s=s||!!t.audioCodec||!(!t.attrs||!t.attrs.AUDIO),!0===u&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0),i=r[t.bitrate],void 0===i?(t.url=[t.url],t.urlId=0,r[t.bitrate]=t,e.push(t)):i.url.push(t.url)}),!0===o&&!0===s&&(e=e.filter(function(t){return!!t.videoCodec})),e=e.filter(function(t){var e=t.audioCodec,n=t.videoCodec;return(!e||a(e))&&(!n||a(n))}),t.audioTracks&&(l=t.audioTracks.filter(function(t){return!t.audioCodec||a(t.audioCodec,"audio")})),e.length>0){n=e[0].bitrate,e.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=e;for(var c=0;c<e.length;c++)if(e[c].bitrate===n){this._firstLevel=c,Dt.b.log("manifest loaded,"+e.length+" level(s) found, first bitrate:"+n);break}this.hls.trigger(Rt.a.MANIFEST_PARSED,{levels:e,audioTracks:l,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:o,altAudio:l.length>0})}else this.hls.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,n=this.hls;if(t>=0&&t<e.length){if(this.cleanTimer(),this.currentLevelIndex!==t){Dt.b.log("switching to level "+t),this.currentLevelIndex=t;var r=e[t];r.level=t,n.trigger(Rt.a.LEVEL_SWITCH,r),n.trigger(Rt.a.LEVEL_SWITCHING,r)}var i=e[t],o=i.details;if(!o||!0===o.live){var a=i.urlId;n.trigger(Rt.a.LEVEL_LOADING,{url:i.url[a],level:t,id:a})}}else n.trigger(Rt.a.ERROR,{type:Ot.b.OTHER_ERROR,details:Ot.a.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})},e.prototype.onError=function(t){if(!0===t.fatal)return void(t.type===Ot.b.NETWORK_ERROR&&this.cleanTimer());var e=!1,n=!1,r=void 0;switch(t.details){case Ot.a.FRAG_LOAD_ERROR:case Ot.a.FRAG_LOAD_TIMEOUT:case Ot.a.FRAG_LOOP_LOADING_ERROR:case Ot.a.KEY_LOAD_ERROR:case Ot.a.KEY_LOAD_TIMEOUT:r=t.frag.level,n=!0;break;case Ot.a.LEVEL_LOAD_ERROR:case Ot.a.LEVEL_LOAD_TIMEOUT:r=t.context.level,e=!0;break;case Ot.a.REMUX_ALLOC_ERROR:r=t.level,e=!0}void 0!==r&&this.recoverLevel(t,r,e,n)},e.prototype.recoverLevel=function(t,e,n,r){var i=this,o=this.hls.config,a=t.details,s=this._levels[e],u=void 0,l=void 0,c=void 0;if(s.loadError++,s.fragmentError=r,!0===n){if(!(this.levelRetryCount+1<=o.levelLoadingMaxRetry))return Dt.b.error("level controller, cannot recover from "+a+" error"),this.currentLevelIndex=null,this.cleanTimer(),void(t.fatal=!0);l=Math.min(Math.pow(2,this.levelRetryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout),this.timer=setTimeout(function(){return i.loadLevel()},l),t.levelRetry=!0,this.levelRetryCount++,Dt.b.warn("level controller, "+a+", retry in "+l+" ms, current retry count is "+this.levelRetryCount)}!0!==n&&!0!==r||(u=s.url.length,u>1&&s.loadError<u?(Dt.b.warn("level controller, "+a+" for level "+e+": switching to redundant stream id "+s.urlId),s.urlId=(s.urlId+1)%u,s.details=void 0):-1===this.manualLevelIndex?(c=0===e?this._levels.length-1:e-1,Dt.b.warn("level controller, "+a+": switch to "+c),this.hls.nextAutoLevel=this.currentLevelIndex=c):!0===r&&(Dt.b.warn("level controller, "+a+": reload a fragment"),this.currentLevelIndex=null))},e.prototype.onFragLoaded=function(t){var e=t.frag;if(void 0!==e&&"main"===e.type){var n=this._levels[e.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},e.prototype.onLevelLoaded=function(t){var e=this,n=t.level;if(n===this.currentLevelIndex){var r=this._levels[n];!1===r.fragmentError&&(r.loadError=0,this.levelRetryCount=0);var i=t.details;if(i.live){var o=1e3*(i.averagetargetduration?i.averagetargetduration:i.targetduration),a=r.details;a&&i.endSN===a.endSN&&(o/=2,Dt.b.log("same live playlist, reload twice faster")),o-=performance.now()-t.stats.trequest,o=Math.max(1e3,Math.round(o)),Dt.b.log("live playlist, reload in "+o+" ms"),this.timer=setTimeout(function(){return e.loadLevel()},o)}else this.cleanTimer()}},e.prototype.loadLevel=function(){var t=void 0,e=void 0;null!==this.currentLevelIndex&&!0===this.canload&&void 0!==(t=this._levels[this.currentLevelIndex])&&t.url.length>0&&(e=t.urlId,this.hls.trigger(Rt.a.LEVEL_LOADING,{url:t.url[e],level:this.currentLevelIndex,id:e}))},ye(e,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&void 0!==e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(Pt),_e=Ae,be=n(3),Te=function(t){function e(n){M(this,e);var r=j(this,t.call(this,n,Rt.a.MEDIA_ATTACHED,Rt.a.MEDIA_DETACHING,Rt.a.FRAG_PARSING_METADATA));return r.id3Track=void 0,r.media=void 0,r}return P(e,t),e.prototype.destroy=function(){Pt.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){this.media=void 0},e.prototype.onFragParsingMetadata=function(t){var e=t.frag,n=t.samples;this.id3Track||(this.id3Track=this.media.addTextTrack("metadata","id3"),this.id3Track.mode="hidden");for(var r=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,i=0;i<n.length;i++){var o=be.a.getID3Frames(n[i].data);if(o){var a=n[i].pts,s=i<n.length-1?n[i+1].pts:e.endPTS;a===s&&(s+=1e-4);for(var u=0;u<o.length;u++){var l=o[u];if(!be.a.isTimeStampFrame(l)){var c=new r(a,s,"");c.value=l,this.id3Track.addCue(c)}}}}},e}(Pt),Se=Te,Ee=function(){function t(e){U(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return t.prototype.sample=function(t,e){var n=Math.pow(this.alpha_,t);this.estimate_=e*(1-n)+n*this.estimate_,this.totalWeight_+=t},t.prototype.getTotalWeight=function(){return this.totalWeight_},t.prototype.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}(),we=Ee,ke=function(){function t(e,n,r,i){B(this,t),this.hls=e,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new we(n),this.fast_=new we(r)}return t.prototype.sample=function(t,e){t=Math.max(t,this.minDelayMs_);var n=8e3*e/t,r=t/1e3;this.fast_.sample(r,n),this.slow_.sample(r,n)},t.prototype.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}(),Ce=ke,Le=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Ie=function(t){function e(n){F(this,e);var r=G(this,t.call(this,n,Rt.a.FRAG_LOADING,Rt.a.FRAG_LOADED,Rt.a.FRAG_BUFFERED,Rt.a.ERROR));return r.lastLoadedFragLevel=0,r._nextAutoLevel=-1,r.hls=n,r.timer=null,r._bwEstimator=null,r.onCheck=r._abandonRulesCheck.bind(r),r}return z(e,t),e.prototype.destroy=function(){this.clearTimer(),Pt.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag;if("main"===e.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this._bwEstimator){var n=this.hls,r=t.frag.level,i=n.levels[r].details.live,o=n.config,a=void 0,s=void 0;i?(a=o.abrEwmaFastLive,s=o.abrEwmaSlowLive):(a=o.abrEwmaFastVoD,s=o.abrEwmaSlowVoD),this._bwEstimator=new Ce(n,s,a,o.abrEwmaDefaultEstimate)}this.fragCurrent=e}},e.prototype._abandonRulesCheck=function(){var t=this.hls,e=t.media,n=this.fragCurrent,r=n.loader,i=t.minAutoLevel;if(!r||r.stats&&r.stats.aborted)return Dt.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var o=r.stats;if(e&&o&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&n.autoLevel&&n.level){var a=performance.now()-o.trequest,s=Math.abs(e.playbackRate);if(a>500*n.duration/s){var u=t.levels,l=Math.max(1,o.bw?o.bw/8:1e3*o.loaded/a),c=u[n.level],d=c.realBitrate?Math.max(c.realBitrate,c.bitrate):c.bitrate,h=o.total?o.total:Math.max(o.loaded,Math.round(n.duration*d/8)),f=e.currentTime,p=(h-o.loaded)/l,v=(re.bufferInfo(e,f,t.config.maxBufferHole).end-f)/s;if(v<2*n.duration/s&&p>v){var m=void 0,g=void 0;for(g=n.level-1;g>i;g--){var y=u[g].realBitrate?Math.max(u[g].realBitrate,u[g].bitrate):u[g].bitrate;if((m=n.duration*y/(6.4*l))<v)break}m<p&&(Dt.b.warn("loading too slow, abort fragment loading and switch to level "+g+":fragLoadedDelay["+g+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+m.toFixed(1)+"<"+p.toFixed(1)+":"+v.toFixed(1)),t.nextLoadLevel=g,this._bwEstimator.sample(a,o.loaded),r.abort(),this.clearTimer(),t.trigger(Rt.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:o}))}}}},e.prototype.onFragLoaded=function(t){var e=t.frag;if("main"===e.type&&!isNaN(e.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[e.level],r=(n.loaded?n.loaded.bytes:0)+t.stats.loaded,i=(n.loaded?n.loaded.duration:0)+t.frag.duration;n.loaded={bytes:r,duration:i},n.realBitrate=Math.round(8*r/i)}if(t.frag.bitrateTest){var o=t.stats;o.tparsed=o.tbuffered=o.tload,this.onFragBuffered(t)}}},e.prototype.onFragBuffered=function(t){var e=t.stats,n=t.frag;if(!(!0===e.aborted||1!==n.loadCounter||"main"!==n.type||isNaN(n.sn)||n.bitrateTest&&e.tload!==e.tbuffered)){var r=e.tparsed-e.trequest;Dt.b.log("latency/loading/parsing/append/kbps:"+Math.round(e.tfirst-e.trequest)+"/"+Math.round(e.tload-e.tfirst)+"/"+Math.round(e.tparsed-e.tload)+"/"+Math.round(e.tbuffered-e.tparsed)+"/"+Math.round(8*e.loaded/(e.tbuffered-e.trequest))),this._bwEstimator.sample(r,e.loaded),e.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}},e.prototype.onError=function(t){switch(t.details){case Ot.a.FRAG_LOAD_ERROR:case Ot.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},e.prototype.clearTimer=function(){clearInterval(this.timer),this.timer=null},e.prototype._findBestLevel=function(t,e,n,r,i,o,a,s,u){for(var l=i;l>=r;l--){var c=u[l],d=c.details,h=d?d.totalduration/d.fragments.length:e,f=!!d&&d.live,p=void 0;p=l<=t?a*n:s*n;var v=u[l].realBitrate?Math.max(u[l].realBitrate,u[l].bitrate):u[l].bitrate,m=v*h/p;if(Dt.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+l+"/"+Math.round(p)+"/"+v+"/"+h+"/"+o+"/"+m),p>v&&(!m||f&&!this.bitrateTestDelay||m<o))return l}return-1},Le(e,[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this._bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var n=this._nextABRAutoLevel;return-1!==t&&(n=Math.min(t,n)),n},set:function(t){this._nextAutoLevel=t}},{key:"_nextABRAutoLevel",get:function(){var t=this.hls,e=t.maxAutoLevel,n=t.levels,r=t.config,i=t.minAutoLevel,o=t.media,a=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,u=o?o.currentTime:0,l=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,c=this._bwEstimator?this._bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,d=(re.bufferInfo(o,u,r.maxBufferHole).end-u)/l,h=this._findBestLevel(a,s,c,i,e,d,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(h>=0)return h;Dt.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var f=s?Math.min(s,r.maxStarvationDelay):r.maxStarvationDelay,p=r.abrBandWidthFactor,v=r.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(f=(s?Math.min(s,r.maxLoadingDelay):r.maxLoadingDelay)-m,Dt.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),p=v=1)}return h=this._findBestLevel(a,s,c,i,e,d+f,p,v,n),Math.max(h,0)}}]),e}(Pt),xe=Ie,Re=g(),Oe=function(t){function e(n){V(this,e);var r=H(this,t.call(this,n,Rt.a.MEDIA_ATTACHING,Rt.a.MEDIA_DETACHING,Rt.a.MANIFEST_PARSED,Rt.a.BUFFER_RESET,Rt.a.BUFFER_APPENDING,Rt.a.BUFFER_CODECS,Rt.a.BUFFER_EOS,Rt.a.BUFFER_FLUSHING,Rt.a.LEVEL_PTS_UPDATED,Rt.a.LEVEL_UPDATED));return r._msDuration=null,r._levelDuration=null,r._live=null,r._objectUrl=null,r.onsbue=r.onSBUpdateEnd.bind(r),r.onsbe=r.onSBUpdateError.bind(r),r.pendingTracks={},r.tracks={},r}return W(e,t),e.prototype.destroy=function(){Pt.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,n=this.tracks.audio;if("audio"===e&&n&&"audio/mpeg"===n.container){var r=this.sourceBuffer.audio;if(Math.abs(r.timestampOffset-t.start)>.1){var i=r.updating;try{r.abort()}catch(t){i=!0,Dt.b.warn("can not abort audio buffer: "+t)}i?this.audioTimestampOffset=t.start:(Dt.b.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+t.start),r.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,n=t.video||t.levels.length&&t.audio,r=0;t.altAudio&&(e||n)&&(r=(e?1:0)+(n?1:0),Dt.b.log(r+" sourceBuffer(s) expected")),this.sourceBufferNb=r},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var n=this.mediaSource=new Re;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),n.addEventListener("sourceopen",this.onmso),n.addEventListener("sourceended",this.onmse),n.addEventListener("sourceclose",this.onmsc),e.src=URL.createObjectURL(n),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){Dt.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){Dt.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):Dt.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(Rt.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){Dt.b.log("media source opened"),this.hls.trigger(Rt.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){Dt.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){Dt.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;Dt.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,n=this.segments.reduce(function(t,n){return n.parent===e?t+1:t},0);this.hls.trigger(Rt.a.BUFFER_APPENDED,{parent:e,pending:n}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){Dt.b.error("sourceBuffer error:",t),this.hls.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var n=t[e];try{this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this.onsbue),n.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},e.prototype.onBufferCodecs=function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var n=this.mediaSource;n&&"open"===n.readyState&&this.checkPendingTracks()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,n=this.mediaSource;for(var r in t)if(!e[r]){var i=t[r],o=i.levelCodec||i.codec,a=i.container+";codecs="+o;Dt.b.log("creating sourceBuffer("+a+")");try{var s=e[r]=n.addSourceBuffer(a);s.addEventListener("updateend",this.onsbue),s.addEventListener("error",this.onsbe),this.tracks[r]={codec:o,container:i.container},i.buffer=s}catch(t){Dt.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:a})}}this.hls.trigger(Rt.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){Dt.b.error("sourceBuffer error:",t.event),this.hls.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,n=t.type;for(var r in e)n&&r!==n||e[r].ended||(e[r].ended=!0,Dt.b.log(r+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(!e||"open"!==e.readyState)return void(this._needsEos=!1);for(var n in t){var r=t[n];if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}Dt.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){Dt.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t=this.hls.config,e=void 0;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer)if(!0===this.sourceBuffer[n].updating)return;e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(Dt.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||e===1/0||isNaN(e))&&(Dt.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,n=this.sourceBuffer;try{for(var r in n)e+=n[r].buffered.length}catch(t){Dt.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(Rt.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,n=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void Dt.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(n&&n.length){var r=n.shift();try{var i=r.type,o=e[i];o?o.updating?n.unshift(r):(o.ended=!1,this.parent=r.parent,o.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){Dt.b.error("error while trying to append buffer:"+e.message),n.unshift(r);var a={type:Ot.b.MEDIA_ERROR,parent:r.parent};if(22===e.code)return this.segments=[],a.details=Ot.a.BUFFER_FULL_ERROR,a.fatal=!1,void t.trigger(Rt.a.ERROR,a);if(this.appendError?this.appendError++:this.appendError=1,a.details=Ot.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry)return Dt.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),n=[],a.fatal=!0,void t.trigger(Rt.a.ERROR,a);a.fatal=!1,t.trigger(Rt.a.ERROR,a)}}}},e.prototype.flushBuffer=function(t,e,n){var r,i,o,a,s,u,l=this.sourceBuffer;if(Object.keys(l).length){if(Dt.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter<this.appended){for(var c in l)if(!n||c===n){if(r=l[c],r.ended=!1,r.updating)return Dt.b.warn("cannot flush, sb updating in progress"),!1;try{for(i=0;i<r.buffered.length;i++)if(o=r.buffered.start(i),a=r.buffered.end(i),-1!==navigator.userAgent.toLowerCase().indexOf("firefox")&&e===Number.POSITIVE_INFINITY?(s=t,u=e):(s=Math.max(o,t),u=Math.min(a,e)),Math.min(u,a)-s>.5)return this.flushBufferCounter++,Dt.b.log("flush "+c+" ["+s+","+u+"], of ["+o+","+a+"], pos:"+this.media.currentTime),r.remove(s,u),!1}catch(t){Dt.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else Dt.b.warn("abort flushing too many retries");Dt.b.log("buffer flushed")}return!0},e}(Pt),De=Oe,Me=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),je=function(t){function e(n){return Q(this,e),Y(this,t.call(this,n,Rt.a.FPS_DROP_LEVEL_CAPPING,Rt.a.MEDIA_ATTACHING,Rt.a.MANIFEST_PARSED))}return q(e,t),e.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))},e.prototype.onFpsDropLevelCapping=function(t){e.isLevelAllowed(t.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(t.droppedLevel)},e.prototype.onMediaAttaching=function(t){this.media=t.media instanceof HTMLVideoElement?t.media:null},e.prototype.onManifestParsed=function(t){var e=this.hls;this.restrictedLevels=[],e.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=t.levels,e.firstLevel=this.getMaxLevel(t.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},e.prototype.detectPlayerSize=function(){if(this.media){var t=this.levels?this.levels.length:0;if(t){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t-1),e.autoLevelCapping>this.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var n=this;if(!this.levels)return-1;var r=this.levels.filter(function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t});return e.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)},e.isLevelAllowed=function(t){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,n){if(!t||t&&!t.length)return-1;for(var r=t.length-1,i=0;i<t.length;i+=1){var o=t[i];if((o.width>=e||o.height>=n)&&function(t,e){return!e||t.width!==e.width||t.height!==e.height}(o,t[i+1])){r=i;break}}return r},Me(e,[{key:"mediaWidth",get:function(){var t=void 0,n=this.media;return n&&(t=n.width||n.clientWidth||n.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,n=this.media;return n&&(t=n.height||n.clientHeight||n.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(Pt),Pe=je,Ne=function(t){function e(n){return K(this,e),X(this,t.call(this,n,Rt.a.MEDIA_ATTACHING))}return Z(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;e.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod))},e.prototype.checkFPS=function(t,e,n){var r=performance.now();if(e){if(this.lastTime){var i=r-this.lastTime,o=n-this.lastDroppedFrames,a=e-this.lastDecodedFrames,s=1e3*o/i,u=this.hls;if(u.trigger(Rt.a.FPS_DROP,{currentDropped:o,currentDecoded:a,totalDroppedFrames:n}),s>0&&o>u.config.fpsDroppedMonitoringThreshold*a){var l=u.currentLevel;Dt.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=l)&&(l-=1,u.trigger(Rt.a.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:u.currentLevel}),u.autoLevelCapping=l,u.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(Pt),Ue=Ne,Be=function(){function t(e){J(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.prototype.load=function(t,e,n){this.context=t,this.config=e,this.callbacks=n,this.stats={trequest:performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},t.prototype.loadInternal=function(){var t,e=this.context;t=this.loader=new XMLHttpRequest;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(t,e.url)}catch(n){t.open("GET",e.url,!0),r(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(n){return void this.callbacks.onError({code:t.status,text:n.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,n=e.readyState,r=this.stats,i=this.context,o=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(performance.now(),r.trequest)),4===n){var a=e.status;if(a>=200&&a<300){r.tload=Math.max(r.tfirst,performance.now());var s=void 0,u=void 0;"arraybuffer"===i.responseType?(s=e.response,u=s.byteLength):(s=e.responseText,u=s.length),r.loaded=r.total=u;var l={url:e.responseURL,data:s};this.callbacks.onSuccess(l,r,i,e)}else r.retry>=o.maxRetry||a>=400&&a<499?(Dt.b.error(a+" while loading "+i.url),this.callbacks.onError({code:a,text:e.statusText},i,e)):(Dt.b.warn(a+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),o.timeout)},t.prototype.loadtimeout=function(){Dt.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,n=this.stats;n.loaded=t.loaded,t.lengthComputable&&(n.total=t.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,e)},t}(),Fe=Be,Ge=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),ze=function(t){function e(n){$(this,e);var r=tt(this,t.call(this,n,Rt.a.MANIFEST_LOADING,Rt.a.MANIFEST_PARSED,Rt.a.AUDIO_TRACK_LOADED,Rt.a.ERROR));return r.ticks=0,r.ontick=r.tick.bind(r),r}return et(e,t),e.prototype.destroy=function(){this.cleanTimer(),Pt.prototype.destroy.call(this)},e.prototype.cleanTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.tick=function(){1==++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){this.updateTrack(this.trackId)},e.prototype.onError=function(t){t.fatal&&t.type===Ot.b.NETWORK_ERROR&&this.cleanTimer()},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestParsed=function(t){var e=this,n=t.audioTracks||[],r=!1;this.tracks=n,this.hls.trigger(Rt.a.AUDIO_TRACKS_UPDATED,{audioTracks:n});var i=0;n.forEach(function(t){if(t.default&&!r)return e.audioTrack=i,void(r=!0);i++}),!1===r&&n.length&&(Dt.b.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)},e.prototype.onAudioTrackLoaded=function(t){t.id<this.tracks.length&&(Dt.b.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*t.details.targetduration)),!t.details.live&&this.timer&&this.cleanTimer())},e.prototype.setAudioTrackInternal=function(t){if(t>=0&&t<this.tracks.length){this.cleanTimer(),this.trackId=t,Dt.b.log("switching to audioTrack "+t);var e=this.tracks[t],n=this.hls,r=e.type,i=e.url,o={id:t,type:r,url:i};n.trigger(Rt.a.AUDIO_TRACK_SWITCH,o),n.trigger(Rt.a.AUDIO_TRACK_SWITCHING,o);var a=e.details;!i||void 0!==a&&!0!==a.live||(Dt.b.log("(re)loading playlist for audioTrack "+t),n.trigger(Rt.a.AUDIO_TRACK_LOADING,{url:i,id:t}))}},e.prototype.updateTrack=function(t){if(t>=0&&t<this.tracks.length){this.cleanTimer(),this.trackId=t,Dt.b.log("updating audioTrack "+t);var e=this.tracks[t],n=e.url,r=e.details;!n||void 0!==r&&!0!==r.live||(Dt.b.log("(re)loading playlist for audioTrack "+t),this.hls.trigger(Rt.a.AUDIO_TRACK_LOADING,{url:n,id:t}))}},Ge(e,[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.trackId===t&&void 0!==this.tracks[t].details||this.setAudioTrackInternal(t)}}]),e}(Pt),Ve=ze,He=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),We={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS"},Qe=function(t){function e(n){nt(this,e);var r=rt(this,t.call(this,n,Rt.a.MEDIA_ATTACHED,Rt.a.MEDIA_DETACHING,Rt.a.AUDIO_TRACKS_UPDATED,Rt.a.AUDIO_TRACK_SWITCHING,Rt.a.AUDIO_TRACK_LOADED,Rt.a.KEY_LOADED,Rt.a.FRAG_LOADED,Rt.a.FRAG_PARSING_INIT_SEGMENT,Rt.a.FRAG_PARSING_DATA,Rt.a.FRAG_PARSED,Rt.a.ERROR,Rt.a.BUFFER_RESET,Rt.a.BUFFER_CREATED,Rt.a.BUFFER_APPENDED,Rt.a.BUFFER_FLUSHED,Rt.a.INIT_PTS_FOUND));return r.config=n.config,r.audioCodecSwap=!1,r.ticks=0,r._state=We.STOPPED,r.ontick=r.tick.bind(r),r.initPTS=[],r.waitingFragment=null,r.videoTrackCC=null,r}return it(e,t),e.prototype.destroy=function(){this.stopLoad(),this.timer&&(clearInterval(this.timer),this.timer=null),Pt.prototype.destroy.call(this),this.state=We.STOPPED},e.prototype.onInitPtsFound=function(t){var e=t.id,n=t.frag.cc,r=t.initPTS;"main"===e&&(this.initPTS[n]=r,this.videoTrackCC=n,Dt.b.log("InitPTS for cc:"+n+" found from video track:"+r),this.state===We.WAITING_INIT_PTS&&this.tick())},e.prototype.startLoad=function(t){if(this.tracks){var e=this.lastCurrentTime;this.stopLoad(),this.timer||(this.timer=setInterval(this.ontick,100)),this.fragLoadError=0,e>0&&-1===t?(Dt.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=We.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=We.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=We.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=We.STOPPED},e.prototype.tick=function(){1==++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){var t,e,n,r=this.hls,i=r.config;switch(this.state){case We.ERROR:case We.PAUSED:case We.BUFFER_FLUSHING:break;case We.STARTING:this.state=We.WAITING_TRACK,this.loadedmetadata=!1;break;case We.IDLE:var o=this.tracks;if(!o)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var a=this.mediaBuffer?this.mediaBuffer:this.media,s=this.videoBuffer?this.videoBuffer:this.media,u=re.bufferInfo(a,t,i.maxBufferHole),l=re.bufferInfo(s,t,i.maxBufferHole),c=u.len,d=u.end,h=this.fragPrevious,f=Math.max(i.maxBufferLength,l.len),p=this.audioSwitch,v=this.trackId;if((c<f||p)&&v<o.length){if(void 0===(n=o[v].details)){this.state=We.WAITING_TRACK;break}if(!p&&!n.live&&h&&h.sn===n.endSN&&!u.nextStart&&(!this.media.seeking||this.media.duration-d<h.duration/2)){this.hls.trigger(Rt.a.BUFFER_EOS,{type:"audio"}),this.state=We.ENDED;break}var m=n.fragments,g=m.length,y=m[0].start,A=m[g-1].start+m[g-1].duration,_=void 0;if(p)if(n.live&&!n.PTSKnown)Dt.b.log("switching audiotrack, live stream, unknown PTS,load first fragment"),d=0;else if(d=t,n.PTSKnown&&t<y){if(!(u.end>y||u.nextStart))return;Dt.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=y+.05}if(n.initSegment&&!n.initSegment.data)_=n.initSegment;else if(d<=y){if(_=m[0],null!==this.videoTrackCC&&_.cc!==this.videoTrackCC&&(_=S(m,this.videoTrackCC)),n.live&&_.loadIdx&&_.loadIdx===this.fragLoadIdx){var b=u.nextStart?u.nextStart:y;return Dt.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(b+.05)),void(this.media.currentTime=b+.05)}}else{var T=void 0,E=i.maxFragLookUpTolerance,w=h?m[h.sn-m[0].sn+1]:void 0,k=function(t){var e=Math.min(E,t.duration);return t.start+t.duration-e<=d?1:t.start-e>d&&t.start?-1:0};d<A?(d>A-E&&(E=0),T=w&&!k(w)?w:ee.search(m,k)):T=m[g-1],T&&(_=T,y=T.start,h&&_.level===h.level&&_.sn===h.sn&&(_.sn<n.endSN?(_=m[_.sn+1-n.startSN],Dt.b.log("SN just loaded, load next one: "+_.sn)):_=null))}if(_)if(_.decryptdata&&null!=_.decryptdata.uri&&null==_.decryptdata.key)Dt.b.log("Loading key for "+_.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+v),this.state=We.KEY_LOADING,r.trigger(Rt.a.KEY_LOADING,{frag:_});else{if(Dt.b.log("Loading "+_.sn+", cc: "+_.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+v+", currentTime:"+t+",bufferEnd:"+d.toFixed(3)),void 0!==this.fragLoadIdx?this.fragLoadIdx++:this.fragLoadIdx=0,_.loadCounter){_.loadCounter++;var C=i.fragLoadingLoopThreshold;if(_.loadCounter>C&&Math.abs(this.fragLoadIdx-_.loadIdx)<C)return void r.trigger(Rt.a.ERROR,{type:Ot.b.MEDIA_ERROR,details:Ot.a.FRAG_LOOP_LOADING_ERROR,fatal:!1,frag:_})}else _.loadCounter=1;_.loadIdx=this.fragLoadIdx,this.fragCurrent=_,this.startFragRequested=!0,isNaN(_.sn)||(this.nextLoadPosition=_.start+_.duration),r.trigger(Rt.a.FRAG_LOADING,{frag:_}),this.state=We.FRAG_LOADING}}break;case We.WAITING_TRACK:(e=this.tracks[this.trackId])&&e.details&&(this.state=We.IDLE);break;case We.FRAG_LOADING_WAITING_RETRY:var L=performance.now(),I=this.retryDate;a=this.media;var x=a&&a.seeking;(!I||L>=I||x)&&(Dt.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=We.IDLE);break;case We.WAITING_INIT_PTS:var R=this.videoTrackCC;if(void 0===this.initPTS[R])break;var O=this.waitingFragment;if(O){var D=O.frag.cc;R!==D?(e=this.tracks[this.trackId],e.details&&e.details.live&&(Dt.b.warn("Waiting fragment CC ("+D+") does not match video track CC ("+R+")"),this.waitingFragment=null,this.state=We.IDLE)):(this.state=We.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=We.IDLE;break;case We.STOPPED:case We.FRAG_LOADING:case We.PARSING:case We.PARSED:case We.ENDED:}},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(Dt.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.tracks;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.loadCounter=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===We.ENDED&&(this.state=We.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){Dt.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=We.PAUSED,this.waitingFragment=null,e?this.timer||(this.timer=setInterval(this.ontick,100)):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=We.IDLE,void 0!==this.fragLoadIdx&&(this.fragLoadIdx+=2*this.config.fragLoadingLoopThreshold)),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,n=t.id,r=this.tracks[n],i=e.totalduration,o=0;if(Dt.b.log("track "+n+" loaded ["+e.startSN+","+e.endSN+"],duration:"+i),e.live){var a=r.details;a&&e.fragments.length>0?(b(a,e),o=e.fragments[0].start,e.PTSKnown?Dt.b.log("live audio playlist sliding:"+o.toFixed(3)):Dt.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,Dt.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(r.details=e,!this.startFragRequested){if(-1===this.startPosition){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(Dt.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===We.WAITING_TRACK&&(this.state=We.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===We.KEY_LOADING&&(this.state=We.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,n=t.frag;if(this.state===We.FRAG_LOADING&&e&&"audio"===n.type&&n.level===e.level&&n.sn===e.sn){var r=this.tracks[this.trackId],i=r.details,o=i.totalduration,a=e.level,s=e.sn,u=e.cc,l=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",c=this.stats=t.stats;if("initSegment"===s)this.state=We.IDLE,c.tparsed=c.tbuffered=performance.now(),i.initSegment.data=t.payload,this.hls.trigger(Rt.a.FRAG_BUFFERED,{stats:c,frag:e,id:"audio"}),this.tick();else{this.state=We.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new de(this.hls,"audio"));var d=this.initPTS[u],h=i.initSegment?i.initSegment.data:[];i.initSegment||void 0!==d?(this.pendingBuffering=!0,Dt.b.log("Demuxing "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.demuxer.push(t.payload,h,l,null,e,o,!1,d)):(Dt.b.log("unknown video PTS for continuity counter "+u+", waiting for video PTS before demuxing audio frag "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+a),this.waitingFragment=t,this.state=We.WAITING_INIT_PTS)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,n=t.frag;if(e&&"audio"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===We.PARSING){var r=t.tracks,i=void 0;if(r.video&&delete r.video,i=r.audio){i.levelCodec=i.codec,i.id=t.id,this.hls.trigger(Rt.a.BUFFER_CODECS,r),Dt.b.log("audio track:audio,container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var o=i.initSegment;if(o){var a={type:"audio",data:o,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[a]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(Rt.a.BUFFER_APPENDING,a))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,n=this.fragCurrent,r=t.frag;if(n&&"audio"===t.id&&"audio"===t.type&&r.sn===n.sn&&r.level===n.level&&this.state===We.PARSING){var i=this.trackId,o=this.tracks[i],a=this.hls;isNaN(t.endPTS)&&(t.endPTS=t.startPTS+n.duration,t.endDTS=t.startDTS+n.duration),Dt.b.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),_(o.details,n,t.startPTS,t.endPTS);var s=this.audioSwitch,u=this.media,l=!1;if(s&&u)if(u.readyState){var c=u.currentTime;Dt.b.log("switching audio track : currentTime:"+c),c>=t.startPTS&&(Dt.b.log("switching audio track : flushing all audio"),this.state=We.BUFFER_FLUSHING,a.trigger(Rt.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),l=!0,this.audioSwitch=!1,a.trigger(Rt.a.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,a.trigger(Rt.a.AUDIO_TRACK_SWITCHED,{id:i});var d=this.pendingData;this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&d.push({type:t.type,data:e,parent:"audio",content:"data"})}),!l&&d.length&&(d.forEach(function(t){e.state===We.PARSING&&(e.pendingBuffering=!0,e.hls.trigger(Rt.a.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,n=t.frag;e&&"audio"===t.id&&n.sn===e.sn&&n.level===e.level&&this.state===We.PARSING&&(this.stats.tparsed=performance.now(),this.state=We.PARSED,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==We.PARSING&&e!==We.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==We.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,n=this.hls;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),n.trigger(Rt.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;Dt.b.log("audio buffered : "+fe.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(Rt.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=We.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case Ot.a.FRAG_LOAD_ERROR:case Ot.a.FRAG_LOAD_TIMEOUT:if(!t.fatal){var n=this.fragLoadError;n?n++:n=1;var r=this.config;if(n<=r.fragLoadingMaxRetry){this.fragLoadError=n,e.loadCounter=0;var i=Math.min(Math.pow(2,n-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);Dt.b.warn("audioStreamController: frag loading failed, retry in "+i+" ms"),this.retryDate=performance.now()+i,this.state=We.FRAG_LOADING_WAITING_RETRY}else Dt.b.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=We.ERROR}break;case Ot.a.FRAG_LOOP_LOADING_ERROR:case Ot.a.AUDIO_TRACK_LOAD_ERROR:case Ot.a.AUDIO_TRACK_LOAD_TIMEOUT:case Ot.a.KEY_LOAD_ERROR:case Ot.a.KEY_LOAD_TIMEOUT:this.state!==We.ERROR&&(this.state=t.fatal?We.ERROR:We.IDLE,Dt.b.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."));break;case Ot.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===We.PARSING||this.state===We.PARSED)){var o=this.mediaBuffer,a=this.media.currentTime;if(o&&re.isBuffered(o,a)&&re.isBuffered(o,a+.5)){var s=this.config;s.maxMaxBufferLength>=s.maxBufferLength&&(s.maxMaxBufferLength/=2,Dt.b.warn("audio:reduce max buffer length to "+s.maxMaxBufferLength+"s"),this.fragLoadIdx+=2*s.fragLoadingLoopThreshold),this.state=We.IDLE}else Dt.b.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=We.BUFFER_FLUSHING,this.hls.trigger(Rt.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(Dt.b.log("appending pending audio data on Buffer Flushed"),e.forEach(function(e){t.hls.trigger(Rt.a.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=We.PARSED):(this.state=We.IDLE,this.fragPrevious=null,this.tick())},He(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,Dt.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(Pt),Ye=Qe,qe=function(){function t(t){return"string"==typeof t&&!!o[t.toLowerCase()]&&t.toLowerCase()}function e(t){return"string"==typeof t&&!!a[t.toLowerCase()]&&t.toLowerCase()}function n(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function r(r,o,a){var s=this,u=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),l={};u?s=document.createElement("custom"):l.enumerable=!0,s.hasBeenReset=!1;var c="",d=!1,h=r,f=o,p=a,v=null,m="",g=!0,y="auto",A="start",_=50,b="middle",T=50,S="middle";if(Object.defineProperty(s,"id",n({},l,{get:function(){return c},set:function(t){c=""+t}})),Object.defineProperty(s,"pauseOnExit",n({},l,{get:function(){return d},set:function(t){d=!!t}})),Object.defineProperty(s,"startTime",n({},l,{get:function(){return h},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");h=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",n({},l,{get:function(){return f},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",n({},l,{get:function(){return p},set:function(t){p=""+t,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",n({},l,{get:function(){return v},set:function(t){v=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",n({},l,{get:function(){return m},set:function(e){var n=t(e);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");m=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",n({},l,{get:function(){return g},set:function(t){g=!!t,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",n({},l,{get:function(){return y},set:function(t){if("number"!=typeof t&&t!==i)throw new SyntaxError("An invalid number or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",n({},l,{get:function(){return A},set:function(t){var n=e(t);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");A=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",n({},l,{get:function(){return _},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",n({},l,{get:function(){return b},set:function(t){var n=e(t);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");b=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",n({},l,{get:function(){return T},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");T=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",n({},l,{get:function(){return S},set:function(t){var n=e(t);if(!n)throw new SyntaxError("An invalid or illegal string was specified.");S=n,this.hasBeenReset=!0}})),s.displayState=void 0,u)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var i="auto",o={"":!0,lr:!0,rl:!0},a={start:!0,middle:!0,end:!0,left:!0,right:!0};return r.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},r}(),Ke=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};st.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<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var Xe=new qe(0,0,0),Ze="middle"===Xe.align?"middle":"center";ot.prototype={parse:function(t){function e(){var t=n.buffer,e=0;for(t=ct(t);e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var r=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,n.buffer=t.substr(e),r}var n=this;t&&(n.buffer+=n.decoder.decode(t,{stream:!0}));try{var r;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;r=e();var i=r.match(/^()?WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var o=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(o?o=!1:r=e(),n.state){case"HEADER":/:/.test(r)?function(t){ut(t,function(t,e){switch(t){case"Region":console.log("parse region",e)}},/:/)}(r):r||(n.state="ID");continue;case"NOTE":r||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){n.state="NOTE";break}if(!r)continue;if(n.cue=new qe(0,0,""),n.state="CUE",-1===r.indexOf("--\x3e")){n.cue.id=r;continue}case"CUE":try{lt(r,n.cue,n.regionList)}catch(t){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var a=-1!==r.indexOf("--\x3e");if(!r||a&&(o=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=r;continue;case"BADCUE":r||(n.state="ID");continue}}}catch(t){"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Error("Malformed WebVTT signature.")}catch(t){throw t}return t.onflush&&t.onflush(),this}};var Je=ot,$e={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},tn=function(t){var e=t;return $e.hasOwnProperty(t)&&(e=$e[t]),String.fromCharCode(e)},en=15,nn=100,rn={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},on={17:2,18:4,21:6,22:8,23:10,19:13,20:15},an={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},sn={25:2,26:4,29:6,30:8,31:10,27:13,28:15},un=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],ln={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(t){this.time=t},log:function(t,e){var n=this.verboseFilter[t];this.verboseLevel>=n&&console.log(this.time+" ["+t+"] "+e)}},cn=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].toString(16));return e},dn=function(){function t(e,n,r,i,o){ht(this,t),this.foreground=e||"white",this.underline=n||!1,this.italics=r||!1,this.background=i||"black",this.flash=o||!1}return t.prototype.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.prototype.setStyles=function(t){for(var e=["foreground","underline","italics","background","flash"],n=0;n<e.length;n++){var r=e[n];t.hasOwnProperty(r)&&(this[r]=t[r])}},t.prototype.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.prototype.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},t.prototype.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},t.prototype.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),hn=function(){function t(e,n,r,i,o,a){ht(this,t),this.uchar=e||" ",this.penState=new dn(n,r,i,o,a)}return t.prototype.reset=function(){this.uchar=" ",this.penState.reset()},t.prototype.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},t.prototype.setPenState=function(t){this.penState.copy(t)},t.prototype.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},t.prototype.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},t.prototype.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),fn=function(){function t(){ht(this,t),this.chars=[];for(var e=0;e<nn;e++)this.chars.push(new hn);this.pos=0,this.currPenState=new dn}return t.prototype.equals=function(t){for(var e=!0,n=0;n<nn;n++)if(!this.chars[n].equals(t.chars[n])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<nn;e++)this.chars[e].copy(t.chars[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<nn;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},t.prototype.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(ln.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>nn&&(ln.log("ERROR","Too large cursor position "+this.pos),this.pos=nn)},t.prototype.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var n=this.pos+1;n<e+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(e)},t.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.prototype.insertChar=function(t){t>=144&&this.backSpace();var e=tn(t);if(this.pos>=nn)return void ln.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1)},t.prototype.clearFromPos=function(t){var e;for(e=t;e<nn;e++)this.chars[e].reset()},t.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.prototype.getTextString=function(){for(var t=[],e=!0,n=0;n<nn;n++){var r=this.chars[n].uchar;" "!==r&&(e=!1),t.push(r)}return e?"":t.join("")},t.prototype.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),pn=function(){function t(){ht(this,t),this.rows=[];for(var e=0;e<en;e++)this.rows.push(new fn);this.currRow=en-1,this.nrRollUpRows=null,this.reset()}return t.prototype.reset=function(){for(var t=0;t<en;t++)this.rows[t].clear();this.currRow=en-1},t.prototype.equals=function(t){for(var e=!0,n=0;n<en;n++)if(!this.rows[n].equals(t.rows[n])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<en;e++)this.rows[e].copy(t.rows[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<en;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},t.prototype.backSpace=function(){this.rows[this.currRow].backSpace()},t.prototype.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.prototype.insertChar=function(t){this.rows[this.currRow].insertChar(t)},t.prototype.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},t.prototype.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},t.prototype.setCursor=function(t){ln.log("INFO","setCursor: "+t),this.rows[this.currRow].setCursor(t)},t.prototype.setPAC=function(t){ln.log("INFO","pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var n=0;n<en;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var o=i.rows[r].cueStartTime;if(o&&o<ln.time)for(var a=0;a<this.nrRollUpRows;a++)this.rows[e-this.nrRollUpRows+a+1].copy(i.rows[r+a])}}this.currRow=e;var s=this.rows[this.currRow];if(null!==t.indent){var u=t.indent,l=Math.max(u-1,0);s.setCursor(t.indent),t.color=s.chars[l].penState.foreground}var c={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(c)},t.prototype.setBkgData=function(t){ln.log("INFO","bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},t.prototype.setRollUpRows=function(t){this.nrRollUpRows=t},t.prototype.rollUp=function(){if(null===this.nrRollUpRows)return void ln.log("DEBUG","roll_up but nrRollUpRows not set yet");ln.log("TEXT",this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),ln.log("INFO","Rolling up")},t.prototype.getDisplayText=function(t){t=t||!1;for(var e=[],n="",r=-1,i=0;i<en;i++){var o=this.rows[i].getTextString();o&&(r=i+1,t?e.push("Row "+r+": '"+o+"'"):e.push(o.trim()))}return e.length>0&&(n=t?"["+e.join(" | ")+"]":e.join("\n")),n},t.prototype.getTextAndFormat=function(){return this.rows},t}(),vn=function(){function t(e,n){ht(this,t),this.chNr=e,this.outputFilter=n,this.mode=null,this.verbose=0,this.displayedMemory=new pn,this.nonDisplayedMemory=new pn,this.lastOutputScreen=new pn,this.currRollUpRow=this.displayedMemory.rows[en-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[en-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,ln.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},t.prototype.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";ln.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(ln.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.prototype.ccRCL=function(){ln.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.prototype.ccBS=function(){ln.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.prototype.ccAOF=function(){},t.prototype.ccAON=function(){},t.prototype.ccDER=function(){ln.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.prototype.ccRU=function(t){ln.log("INFO","RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},t.prototype.ccFON=function(){ln.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.prototype.ccRDC=function(){ln.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.prototype.ccTR=function(){ln.log("INFO","TR"),this.setMode("MODE_TEXT")},t.prototype.ccRTD=function(){ln.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.prototype.ccEDM=function(){ln.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.prototype.ccCR=function(){ln.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.prototype.ccENM=function(){ln.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.prototype.ccEOC=function(){if(ln.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,ln.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.prototype.ccTO=function(t){ln.log("INFO","TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},t.prototype.ccMIDROW=function(t){var e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{var n=Math.floor(t/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=r[n]}ln.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=ln.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),mn=function(){function t(e,n,r){ht(this,t),this.field=e||1,this.outputs=[n,r],this.channels=[new vn(1,n),new vn(2,r)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var n,r,i,o=!1;this.lastTime=t,ln.setTime(t);for(var a=0;a<e.length;a+=2)if(r=127&e[a],i=127&e[a+1],0!==r||0!==i){if(ln.log("DATA","["+cn([e[a],e[a+1]])+"] -> ("+cn([r,i])+")"),n=this.parseCmd(r,i),n||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(o=this.parseChars(r,i)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(o)}else ln.log("WARNING","No channel found yet. TEXT-MODE?");n?this.dataCounters.cmd+=2:o?this.dataCounters.char+=2:(this.dataCounters.other+=2,ln.log("WARNING","Couldn't parse cleaned data "+cn([r,i])+" orig: "+cn([e[a],e[a+1]])))}else this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var n=null,r=(20===t||28===t)&&32<=e&&e<=47,i=(23===t||31===t)&&33<=e&&e<=35;if(!r&&!i)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,ln.log("DEBUG","Repeated command ("+cn([t,e])+") is dropped"),!0;n=20===t||23===t?1:2;var o=this.channels[n-1];return 20===t||28===t?32===e?o.ccRCL():33===e?o.ccBS():34===e?o.ccAOF():35===e?o.ccAON():36===e?o.ccDER():37===e?o.ccRU(2):38===e?o.ccRU(3):39===e?o.ccRU(4):40===e?o.ccFON():41===e?o.ccRDC():42===e?o.ccTR():43===e?o.ccRTD():44===e?o.ccEDM():45===e?o.ccCR():46===e?o.ccENM():47===e&&o.ccEOC():o.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0},t.prototype.parseMidrow=function(t,e){var n=null;return(17===t||25===t)&&32<=e&&e<=47&&((n=17===t?1:2)!==this.currChNr?(ln.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[n-1].ccMIDROW(e),ln.log("DEBUG","MIDROW ("+cn([t,e])+")"),!0))},t.prototype.parsePAC=function(t,e){var n=null,r=null,i=(17<=t&&t<=23||25<=t&&t<=31)&&64<=e&&e<=127,o=(16===t||24===t)&&64<=e&&e<=95;if(!i&&!o)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=t<=23?1:2,r=64<=e&&e<=95?1===n?rn[t]:an[t]:1===n?on[t]:sn[t];var a=this.interpretPAC(r,e);return this.channels[n-1].setPAC(a),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=n,!0},t.prototype.interpretPAC=function(t,e){var n=e,r={color:null,italics:!1,indent:null,underline:!1,row:t};return n=e>95?e-96:e-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.prototype.parseChars=function(t,e){var n=null,r=null,i=null;if(t>=25?(n=2,i=t-8):(n=1,i=t),17<=i&&i<=19){var o=e;o=17===i?e+80:18===i?e+112:e+144,ln.log("INFO","Special char '"+tn(o)+"' in channel "+n),r=[o]}else 32<=t&&t<=127&&(r=0===e?[t]:[t,e]);if(r){var a=cn(r);ln.log("DEBUG","Char codes = "+a.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r},t.prototype.parseBackgroundAttributes=function(t,e){var n,r,i,o,a=(16===t||24===t)&&32<=e&&e<=47,s=(23===t||31===t)&&45<=e&&e<=47;return!(!a&&!s||(n={},16===t||24===t?(r=Math.floor((e-32)/2),n.background=un[r],e%2==1&&(n.background=n.background+"_semi")):45===e?n.background="transparent":(n.foreground="black",47===e&&(n.underline=!0)),i=t<24?1:2,o=this.channels[i-1],o.setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,0))},t.prototype.reset=function(){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].reset();this.lastCmdA=null,this.lastCmdB=null},t.prototype.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].cueSplitAtTime(t)},t}(),gn=mn,yn=function(){function t(e,n){ft(this,t),this.timelineController=e,this.track=n,this.startTime=null,this.endTime=null,this.screen=null}return t.prototype.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues("textTrack"+this.track,this.startTime,this.endTime,this.screen),this.startTime=null)},t.prototype.newCue=function(t,e,n){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=n,this.timelineController.createCaptionsTrack(this.track)},t}(),An=yn,_n=function(t,e,n){return t.substr(n||0,e.length)===e},bn=function(t){var e=parseInt(t.substr(-3)),n=parseInt(t.substr(-6,2)),r=parseInt(t.substr(-9,2)),i=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;return isNaN(e)||isNaN(n)||isNaN(r)||isNaN(i)?-1:(e+=1e3*n,e+=6e4*r,e+=36e5*i)},Tn=function(t){for(var e=5381,n=t.length;n;)e=33*e^t.charCodeAt(--n);return(e>>>0).toString()},Sn=function(t,e,n){var r=t[e],i=t[r.prevCC];if(!i||!i.new&&r.new)return t.ccOffset=t.presentationOffset=r.start,void(r.new=!1);for(;i&&i.new;)t.ccOffset+=r.start-i.start,r.new=!1,r=i,i=t[r.prevCC];t.presentationOffset=n},En={parse:function(t,e,n,r,i,o){var a=Object(be.b)(new Uint8Array(t)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),s="00:00.000",u=0,l=0,c=0,d=[],h=void 0,f=!0,p=new Je;p.oncue=function(t){var e=n[r],i=n.ccOffset;e&&e.new&&(void 0!==l?i=n.ccOffset=e.start:Sn(n,r,c)),c&&(i=c+n.ccOffset-n.presentationOffset),t.startTime+=i-l,t.endTime+=i-l,t.id=Tn(t.startTime.toString())+Tn(t.endTime.toString())+Tn(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&d.push(t)},p.onparsingerror=function(t){h=t},p.onflush=function(){if(h&&o)return void o(h);i(d)},a.forEach(function(t){if(f){if(_n(t,"X-TIMESTAMP-MAP=")){f=!1,t.substr(16).split(",").forEach(function(t){_n(t,"LOCAL:")?s=t.substr(6):_n(t,"MPEGTS:")&&(u=parseInt(t.substr(7)))});try{e=e<0?e+8589934592:e,u-=e,l=bn(s)/1e3,c=u/9e4,-1===l&&(h=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){h=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(f=!1)}p.parse(t+"\n")}),p.flush()}},wn=En,kn=function(t){function e(n){pt(this,e);var r=vt(this,t.call(this,n,Rt.a.MEDIA_ATTACHING,Rt.a.MEDIA_DETACHING,Rt.a.FRAG_PARSING_USERDATA,Rt.a.FRAG_DECRYPTED,Rt.a.MANIFEST_LOADING,Rt.a.MANIFEST_LOADED,Rt.a.FRAG_LOADED,Rt.a.LEVEL_SWITCHING,Rt.a.INIT_PTS_FOUND));if(r.hls=n,r.config=n.config,r.enabled=!0,r.Cues=n.config.cueHandler,r.textTracks=[],r.tracks=[],r.unparsedVttFrags=[],r.initPTS=void 0,r.cueRanges=[],r.config.enableCEA708Captions){var i=new An(r,1),o=new An(r,2);r.cea608Parser=new gn(0,i,o)}return r}return mt(e,t),e.prototype.addCues=function(t,e,n,r){for(var i=this.cueRanges,o=!1,a=i.length;a--;){var s=i[a],u=At(s[0],s[1],e,n);if(u>=0&&(s[0]=Math.min(s[0],e),s[1]=Math.max(s[1],n),o=!0,u/(n-e)>.5))return}o||i.push([e,n]),this.Cues.newCue(this[t],e,n,r)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(t){e.onFragLoaded(t)}),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var n=0;n<e.textTracks.length;n++){var r=e.textTracks[n],i="textTrack"+t;if(!0===r[i])return r}return null},e.prototype.sendAddTrackEvent=function(t,e){var n=null;try{n=new window.Event("addtrack")}catch(t){n=document.createEvent("Event"),n.initEvent("addtrack",!1,!1)}n.track=t,e.dispatchEvent(n)},e.prototype.createCaptionsTrack=function(t){var e="textTrack"+t;if(!this[e]){var n=this.getExistingTrack(t);if(n)this[e]=n,gt(this[e]),this.sendAddTrackEvent(this[e],this.media);else{var r=this.createTextTrack("captions",this.config["captionsTextTrack"+t+"Label"],this.config.captionsTextTrack1LanguageCode);r&&(r[e]=!0,this[e]=r)}}},e.prototype.createTextTrack=function(t,e,n){var r=this.media;if(r)return r.addTextTrack(t,e,n)},e.prototype.destroy=function(){Pt.prototype.destroy.call(this)},e.prototype.onMediaAttaching=function(t){this.media=t.media,this._cleanTracks()},e.prototype.onMediaDetaching=function(){gt(this.textTrack1),gt(this.textTrack2)},e.prototype.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0},this._cleanTracks()},e.prototype._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var n=0;n<e.length;n++)gt(e[n])}},e.prototype.onManifestLoaded=function(t){var e=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=void 0,this.cueRanges=[],this.config.enableWebVTT){this.tracks=t.subtitles||[];var n=this.media?this.media.textTracks:[];this.tracks.forEach(function(t,r){var i=void 0;if(r<n.length){var o=n[r];yt(o,t)&&(i=o)}i||(i=e.createTextTrack("subtitles",t.name,t.lang)),i.mode=t.default?"showing":"hidden",e.textTracks.push(i)})}},e.prototype.onLevelSwitching=function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions},e.prototype.onFragLoaded=function(t){var e=t.frag,n=t.payload;if("main"===e.type){var r=e.sn;if(r!==this.lastSn+1){var i=this.cea608Parser;i&&i.reset()}this.lastSn=r}else if("subtitle"===e.type)if(n.byteLength){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);var o=e.decryptdata;null!=o&&null!=o.key&&"AES-128"===o.method||this._parseVTTs(e,n)}else this.hls.trigger(Rt.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})},e.prototype._parseVTTs=function(t,e){var n=this.vttCCs;n[t.cc]||(n[t.cc]={start:t.start,prevCC:this.prevCC,new:!0},this.prevCC=t.cc);var r=this.textTracks,i=this.hls;wn.parse(e,this.initPTS,n,t.cc,function(e){var n=r[t.trackId];e.forEach(function(t){if(!n.cues.getCueById(t.id))try{n.addCue(t)}catch(r){var e=new window.TextTrackCue(t.startTime,t.endTime,t.text);e.id=t.id,n.addCue(e)}}),i.trigger(Rt.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(e){Dt.b.log("Failed to parse VTT cue: "+e),i.trigger(Rt.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})})},e.prototype.onFragDecrypted=function(t){var e=t.payload,n=t.frag;if("subtitle"===n.type){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);this._parseVTTs(n,e)}},e.prototype.onFragParsingUserdata=function(t){if(this.enabled&&this.config.enableCEA708Captions)for(var e=0;e<t.samples.length;e++){var n=this.extractCea608Data(t.samples[e].bytes);this.cea608Parser.addData(t.samples[e].pts,n)}},e.prototype.extractCea608Data=function(t){for(var e,n,r,i,o,a=31&t[0],s=2,u=[],l=0;l<a;l++)e=t[s++],n=127&t[s++],r=127&t[s++],i=0!=(4&e),o=3&e,0===n&&0===r||i&&0===o&&(u.push(n),u.push(r));return u},e}(Pt),Cn=kn,Ln=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),In=function(t){function e(n){_t(this,e);var r=bt(this,t.call(this,n,Rt.a.MEDIA_ATTACHED,Rt.a.MEDIA_DETACHING,Rt.a.MANIFEST_LOADING,Rt.a.MANIFEST_LOADED,Rt.a.SUBTITLE_TRACK_LOADED));return r.tracks=[],r.trackId=-1,r.media=void 0,r.subtitleDisplay=!1,r}return Tt(e,t),e.prototype._onTextTracksChanged=function(){if(this.media){for(var t=-1,e=St(this.media.textTracks),n=0;n<e.length;n++)"showing"===e[n].mode&&(t=n);this.subtitleTrack=t}},e.prototype.destroy=function(){Pt.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){var e=this;this.media=t.media,this.media&&(void 0!==this.queuedDefaultTrack&&(this.subtitleTrack=this.queuedDefaultTrack,delete this.queuedDefaultTrack),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){e.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},e.prototype.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.media=void 0)},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestLoaded=function(t){var e=this,n=t.subtitles||[];this.tracks=n,this.trackId=-1,this.hls.trigger(Rt.a.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach(function(t){t.default&&(e.media?e.subtitleTrack=t.id:e.queuedDefaultTrack=t.id)})},e.prototype.onTick=function(){var t=this.trackId,e=this.tracks[t];if(e){var n=e.details;void 0!==n&&!0!==n.live||(Dt.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(Rt.a.SUBTITLE_TRACK_LOADING,{url:e.url,id:t}))}},e.prototype.onSubtitleTrackLoaded=function(t){var e=this;t.id<this.tracks.length&&(Dt.b.log("subtitle track "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval(function(){e.onTick()},1e3*t.details.targetduration,this)),!t.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))},e.prototype.setSubtitleTrackInternal=function(t){if(!(t<-1||t>=this.tracks.length)){this.timer&&(clearInterval(this.timer),this.timer=null);var e=St(this.media.textTracks);if(-1!==this.trackId&&this.subtitleDisplay&&(e[this.trackId].mode="hidden"),this.trackId=t,Dt.b.log("switching to subtitle track "+t),this.hls.trigger(Rt.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t){var n=this.tracks[t];this.subtitleDisplay&&(e[t].mode="showing");var r=n.details;void 0!==r&&!0!==r.live||(Dt.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(Rt.a.SUBTITLE_TRACK_LOADING,{url:n.url,id:t}))}}},Ln(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&this.setSubtitleTrackInternal(t)}}]),e}(Pt),xn=In,Rn=n(4),On={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},Dn=function(t){function e(n){Et(this,e);var r=wt(this,t.call(this,n,Rt.a.MEDIA_ATTACHED,Rt.a.ERROR,Rt.a.KEY_LOADED,Rt.a.FRAG_LOADED,Rt.a.SUBTITLE_TRACKS_UPDATED,Rt.a.SUBTITLE_TRACK_SWITCH,Rt.a.SUBTITLE_TRACK_LOADED,Rt.a.SUBTITLE_FRAG_PROCESSED));return r.config=n.config,r.vttFragSNsProcessed={},r.vttFragQueues=void 0,r.currentlyProcessing=null,r.state=On.STOPPED,r.currentTrackId=-1,r.ticks=0,r.decrypter=new Rn.a(n.observer,n.config),r}return kt(e,t),e.prototype.destroy=function(){Pt.prototype.destroy.call(this),this.state=On.STOPPED},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach(function(e){t.vttFragQueues[e.id]=[]})},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(Rt.a.FRAG_LOADING,{frag:t}),this.state=On.FRAG_LOADING}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=On.IDLE,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=On.IDLE},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.tick=function(){var t=this;1==++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(function(){t.tick()},1),this.ticks=0)},e.prototype.doTick=function(){var t=this;switch(this.state){case On.IDLE:var e=this.tracks,n=this.currentTrackId,r=this.vttFragSNsProcessed[n],i=this.vttFragQueues[n],o=this.currentlyProcessing?this.currentlyProcessing.sn:-1,a=function(t){return r.indexOf(t.sn)>-1},s=function(t){return i.some(function(e){return e.sn===t.sn})};if(!e)break;var u;if(n<e.length&&(u=e[n].details),void 0===u)break;u.fragments.forEach(function(e){a(e)||e.sn===o||s(e)||(e.decryptdata&&null!=e.decryptdata.uri&&null==e.decryptdata.key?(Dt.b.log("Loading key for "+e.sn),t.state=On.KEY_LOADING,t.hls.trigger(Rt.a.KEY_LOADING,{frag:e})):(e.trackId=n,i.push(e),t.nextFrag()))})}},e.prototype.onSubtitleTracksUpdated=function(t){var e=this;Dt.b.log("subtitle tracks updated"),this.tracks=t.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(t){e.vttFragSNsProcessed[t.id]=[]})},e.prototype.onSubtitleTrackSwitch=function(t){this.currentTrackId=t.id,this.clearVttFragQueues()},e.prototype.onSubtitleTrackLoaded=function(){this.tick()},e.prototype.onKeyLoaded=function(){this.state===On.KEY_LOADING&&(this.state=On.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,n=t.frag.decryptdata,r=t.frag,i=this.hls;if(this.state===On.FRAG_LOADING&&e&&"subtitle"===t.frag.type&&e.sn===t.frag.sn&&t.payload.byteLength>0&&null!=n&&null!=n.key&&"AES-128"===n.method){var o;try{o=performance.now()}catch(t){o=Date.now()}this.decrypter.decrypt(t.payload,n.key.buffer,n.iv.buffer,function(t){var e;try{e=performance.now()}catch(t){e=Date.now()}i.trigger(Rt.a.FRAG_DECRYPTED,{frag:r,payload:t,stats:{tstart:o,tdecrypt:e}})})}},e}(Pt),Mn=Dn,jn={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,maxSeekHole:2,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,fragLoadingLoopThreshold:3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Fe,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,fetchSetup:void 0,abrController:xe,bufferController:De,capLevelController:Pe,fpsController:Ue,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0};jn.subtitleStreamController=Mn,jn.subtitleTrackController=xn,jn.timelineController=Cn,jn.cueHandler=Lt,jn.enableCEA708Captions=!0,jn.enableWebVTT=!0,jn.captionsTextTrack1Label="English",jn.captionsTextTrack1LanguageCode="en",jn.captionsTextTrack2Label="Spanish",jn.captionsTextTrack2LanguageCode="es",jn.audioStreamController=Ye,jn.audioTrackController=Ve;var Pn=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Nn=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ct(this,t);var r=t.DefaultConfig;if((n.liveSyncDurationCount||n.liveMaxLatencyDurationCount)&&(n.liveSyncDuration||n.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var i in r)i in n||(n[i]=r[i]);if(void 0!==n.liveMaxLatencyDurationCount&&n.liveMaxLatencyDurationCount<=n.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==n.liveMaxLatencyDuration&&(n.liveMaxLatencyDuration<=n.liveSyncDuration||void 0===n.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(Dt.a)(n.debug),this.config=n,this._autoLevelCapping=-1;var o=this.observer=new ae.a;o.trigger=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit.apply(o,[t,t].concat(n))},o.off=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.removeListener.apply(o,[t].concat(n))},this.on=o.on.bind(o),this.off=o.off.bind(o),this.trigger=o.trigger.bind(o);var a=this.abrController=new n.abrController(this),s=new n.bufferController(this),u=new n.capLevelController(this),l=new n.fpsController(this),c=new Kt(this),d=new Zt(this),h=new $t(this),f=new Se(this),p=this.levelController=new _e(this),v=this.streamController=new ge(this),m=[p,v],g=n.audioStreamController;g&&m.push(new g(this)),this.networkControllers=m;var y=[c,d,h,a,s,u,l,f];if(g=n.audioTrackController){var A=new g(this);this.audioTrackController=A,y.push(A)}if(g=n.subtitleTrackController){var _=new g(this);this.subtitleTrackController=_,y.push(_)}[n.subtitleStreamController,n.timelineController].forEach(function(t){t&&y.push(new t(e))}),this.coreComponents=y}return t.isSupported=function(){return N()},Pn(t,null,[{key:"version",get:function(){return"0.8.9"}},{key:"Events",get:function(){return Rt.a}},{key:"ErrorTypes",get:function(){return Ot.b}},{key:"ErrorDetails",get:function(){return Ot.a}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:jn},set:function(e){t.defaultConfig=e}}]),t.prototype.destroy=function(){Dt.b.log("destroy"),this.trigger(Rt.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(t){t.destroy()}),this.url=null,this.observer.removeAllListeners(),this._autoLevelCapping=-1},t.prototype.attachMedia=function(t){Dt.b.log("attachMedia"),this.media=t,this.trigger(Rt.a.MEDIA_ATTACHING,{media:t})},t.prototype.detachMedia=function(){Dt.b.log("detachMedia"),this.trigger(Rt.a.MEDIA_DETACHING),this.media=null},t.prototype.loadSource=function(t){t=xt.a.buildAbsoluteURL(window.location.href,t,{alwaysNormalize:!0}),Dt.b.log("loadSource:"+t),this.url=t,this.trigger(Rt.a.MANIFEST_LOADING,{url:t})},t.prototype.startLoad=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;Dt.b.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},t.prototype.stopLoad=function(){Dt.b.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},t.prototype.swapAudioCodec=function(){Dt.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){Dt.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},Pn(t,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){Dt.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){Dt.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){Dt.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){Dt.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){Dt.b.log("set startLevel:"+t);var e=this;-1!==t&&(t=Math.max(t,e.minAutoLevel)),e.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){Dt.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this,e=t.levels,n=t.config.minAutoBitrate,r=e?e.length:0,i=0;i<r;i++)if((e[i].realBitrate?Math.max(e[i].realBitrate,e[i].bitrate):e[i].bitrate)>n)return i;return 0}},{key:"maxAutoLevel",get:function(){var t=this,e=t.levels,n=t.autoLevelCapping;return-1===n&&e&&e.length?e.length-1:n}},{key:"nextAutoLevel",get:function(){var t=this;return Math.min(Math.max(t.abrController.nextAutoLevel,t.minAutoLevel),t.maxAutoLevel)},set:function(t){var e=this;e.abrController.nextAutoLevel=Math.max(e.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=Nn},function(t,e,n){function r(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={};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.oe=function(t){throw console.error(t),t};var r=e(e.s=ENTRY_MODULE);return r.default||r}function i(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(t){var e=[],n=t.toString(),r=n.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!r)return e;for(var o,a=r[1],s=new RegExp("(\\\\n|\\W)"+i(a)+"\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\w|/|@]+).*?\\)","g");o=s.exec(n);)e.push(o[3]);return e}function a(t,e){for(var n=[e],r=[],i={};n.length;){var a=n.pop();if(!i[a]&&t[a]){i[a]=!0,r.push(a);var s=o(t[a]);n=n.concat(s)}}return r}t.exports=function(t,e){e=e||{};var i=n.m,o=e.all?Object.keys(i):a(i,t),s="("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o.map(function(t){return JSON.stringify(t)+": "+i[t].toString()}).join(",")+"})(self);",u=new window.Blob([s],{type:"text/javascript"});if(e.bare)return u;var l=window.URL||window.webkitURL||window.mozURL||window.msURL,c=l.createObjectURL(u),d=new window.Worker(c);return d.objectURL=c,d}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7),i=n(1),o=n(0),a=n(5),s=n.n(a),u=function(t){var e=new s.a;e.trigger=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t,t].concat(r))},e.off=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.removeListener.apply(e,[t].concat(r))};var n=function(e,n){t.postMessage({event:e,data:n})};t.addEventListener("message",function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);t.demuxer=new r.a(e,a.typeSupported,s,a.vendor);try{Object(o.a)(!0===s.debug)}catch(t){console.warn("demuxerWorker: unable to enable logs")}n("init",null);break;case"demux":t.demuxer.push(a.data,a.decryptdata,a.initSegment,a.audioCodec,a.videoCodec,a.timeOffset,a.discontinuity,a.trackSwitch,a.contiguous,a.duration,a.accurateTimeOffset,a.defaultInitPTS)}}),e.on(i.a.FRAG_DECRYPTED,n),e.on(i.a.FRAG_PARSING_INIT_SEGMENT,n),e.on(i.a.FRAG_PARSED,n),e.on(i.a.ERROR,n),e.on(i.a.FRAG_PARSING_METADATA,n),e.on(i.a.FRAG_PARSING_USERDATA,n),e.on(i.a.INIT_PTS_FOUND,n),e.on(i.a.FRAG_PARSING_DATA,function(e,n){var r=[],i={event:e,data:n};n.data1&&(i.data1=n.data1.buffer,r.push(n.data1.buffer),delete n.data1),n.data2&&(i.data2=n.data2.buffer,r.push(n.data2.buffer),delete n.data2),t.postMessage(i,r)})};e.default=u}]).default}()}()},function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e){function n(){var t=null,e=null;return function(){var n=Date.now();!t||n-t>2e3?(t=n,s.recoverMediaError()):!e||n-e>2e3?(e=n,s.swapAudioCodec(),s.recoverMediaError()):console.error("Error loading media: File could not be played")}}var r=e.options_,o=e.el(),a=null,s=this.hls=new i(r.hlsjsConfig),u=n(),l=n();o.addEventListener("error",function(t){var e=t.currentTarget.error;e.code===e.MEDIA_ERR_DECODE?l():console.error("Error loading media: File could not be played")}),this.dispose=function(){s.destroy()},this.duration=function(){return a||o.duration||0},s.on(i.Events.LEVEL_LOADED,function(t,e){a=e.details.live?1/0:e.details.totalduration}),s.on(i.Events.ERROR,function(t,e){if(e.fatal)switch(e.type){case i.ErrorTypes.NETWORK_ERROR:s.startLoad();break;case i.ErrorTypes.MEDIA_ERROR:u();break;default:console.error("Error loading media: File could not be played")}}),Object.keys(i.Events).forEach(function(t){var n=i.Events[t];s.on(n,function(t,r){e.trigger(n,r)})}),e.featuresNativeTextTracks||(Object.defineProperty(o,"textTracks",{value:e.textTracks,writable:!1}),o.addTextTrack=function(){return e.addTextTrack.apply(e,arguments)}),s.attachMedia(o),s.loadSource(t.src)}var i=n(0);window.Hls||(window.Hls=i);var o=/^application\/(x-mpegURL|vnd\.apple\.mpegURL)$/i,a=/\.m3u8/i,s={canHandleSource:function(t){return t.skipContribHlsJs?"":o.test(t.type)?"probably":a.test(t.src)?"maybe":""},handleSource:function(t,e){return new r(t,e)},canPlayType:function(t){return o.test(t)?"probably":""}};if(i.isSupported()){var u=n(1);if(u=u&&u.default||u){var l=u.getTech&&u.getTech("Html5");(l=l||u.getComponent&&u.getComponent("Html5"))&&l.registerSourceHandler(s,0)}else console.warn("videojs-contrib-hls.js: Couldn't find find window.videojs nor require('video.js')")}}])}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.videojsFlvjs=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){return i(e[a][1][t]||t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){(function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(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}function i(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)}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},s="undefined"!=typeof window?window.videojs:void 0!==t?t.videojs:null,u=function(t){return t&&t.__esModule?t:{default:t}}(s),l=u.default.getTech("Html5"),c=u.default.mergeOptions||u.default.util.mergeOptions,d={mediaDataSource:{},config:{}},h=function(t){function n(t,i){return e(this,n),t=c(d,t),r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,i))}return i(n,t),o(n,[{key:"setSrc",value:function(t){this.flvPlayer&&(this.flvPlayer.detachMediaElement(),this.flvPlayer.destroy());var e=this.options_.mediaDataSource,n=this.options_.config;e.type=void 0===e.type?"flv":e.type,e.url=t,this.flvPlayer=window.flvjs.createPlayer(e,n),this.flvPlayer.attachMediaElement(this.el_),this.flvPlayer.load()}},{key:"dispose",value:function(){this.flvPlayer&&(this.flvPlayer.detachMediaElement(),this.flvPlayer.destroy()),a(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"dispose",this).call(this)}}]),n}(l);h.isSupported=function(){return window.flvjs&&window.flvjs.isSupported()},h.formats={"video/flv":"FLV","video/x-flv":"FLV"},h.canPlayType=function(t){return h.isSupported()&&t in h.formats?"maybe":""},h.canPlaySource=function(t,e){return h.canPlayType(t.type)},h.VERSION="0.2.0",u.default.registerTech("Flvjs",h),n.default=h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}),function(){"use strict";var t=null;t=void 0===window.videojs&&"function"==typeof require?require("video.js"):window.videojs,function(t,e){function n(t,e,n,r){return o={label:n,sources:e},"function"==typeof r?r(t,e,n):t.src(e.map(function(t){return{src:t.src,type:t.type,res:t.res}}))}var r,i={},o={},a={},s=e.getComponent("MenuItem"),u=e.extend(s,{constructor:function(t,e,n,r){this.onClickListener=n,this.label=r,s.call(this,t,e),this.src=e.src,this.on("click",this.onClick),this.on("touchstart",this.onClick),e.initialySelected&&(this.showAsLabel(),this.selected(!0),this.addClass("vjs-selected"))},showAsLabel:function(){this.label&&(this.label.innerHTML=this.options_.label)},onClick:function(t){this.onClickListener(this);var e=this.player_.currentTime(),r=this.player_.paused();this.showAsLabel(),this.addClass("vjs-selected"),r||this.player_.bigPlayButton.hide(),"function"!=typeof t&&"function"==typeof this.options_.customSourcePicker&&(t=this.options_.customSourcePicker);var i="loadeddata";"Youtube"!==this.player_.techName_&&"none"===this.player_.preload()&&"Flash"!==this.player_.techName_&&(i="timeupdate"),n(this.player_,this.src,this.options_.label,t),this.player_.one(i,function(){this.player_.currentTime(e),this.player_.handleTechSeeked_(),this.player_.trigger("resolutionchange")})}}),l=e.getComponent("MenuButton"),c=e.extend(l,{constructor:function(t,n,r,i){if(this.sources=n.sources,this.label=i,this.label.innerHTML=n.initialySelectedLabel,l.call(this,t,n,r),this.controlText("Quality"),r.dynamicLabel)this.el().appendChild(i);else{var o=document.createElement("span");e.dom.addClass(o,"vjs-resolution-button-staticlabel"),this.el().appendChild(o)}},createItems:function(){var t=[],e=this.sources&&this.sources.label||{},n=function(e){t.map(function(t){t.selected(t===e),t.removeClass("vjs-selected")})};for(var r in e)e.hasOwnProperty(r)&&(t.push(new u(this.player_,{label:r,src:e[r],initialySelected:r===this.options_.initialySelectedLabel,customSourcePicker:this.options_.customSourcePicker},n,this.label)),a[r]=t[t.length-1]);return t}});r=function(t){function r(t,e){return t.res&&e.res?+e.res-+t.res:0}function s(t){var e={label:{},res:{},type:{}};return t.map(function(t){u(e,"label",t),u(e,"res",t),u(e,"type",t),l(e,"label",t),l(e,"res",t),l(e,"type",t)}),e}function u(t,e,n){null==t[e][n[e]]&&(t[e][n[e]]=[])}function l(t,e,n){t[e][n[e]].push(n)}function d(t,e){var n=f.default,r="";return"high"===n?(n=e[0].res,r=e[0].label):"low"!==n&&null!=n&&t.res[n]?t.res[n]&&(r=t.res[n][0].label):(n=e[e.length-1].res,r=e[e.length-1].label),{res:n,label:r,sources:t.res[n]}}function h(t){t.tech_.ytPlayer.setPlaybackQuality("default"),t.tech_.ytPlayer.addEventListener("onPlaybackQualityChange",function(){t.trigger("resolutionchange")}),t.one("play",function(){var e=t.tech_.ytPlayer.getAvailableQualityLevels(),n={highres:{res:1080,label:"1080",yt:"highres"},hd1080:{res:1080,label:"1080",yt:"hd1080"},hd720:{res:720,label:"720",yt:"hd720"},large:{res:480,label:"480",yt:"large"},medium:{res:360,label:"360",yt:"medium"},small:{res:240,label:"240",yt:"small"},tiny:{res:144,label:"144",yt:"tiny"},auto:{res:0,label:"auto",yt:"default"}},r=[];e.map(function(e){r.push({src:t.src().src,type:t.src().type,label:n[e].label,res:n[e].res,_yt:n[e].yt})}),m=s(r);var i=function(e,n,r){return t.tech_.ytPlayer.setPlaybackQuality(n[0]._yt),t},o={label:"auto",res:0,sources:m.label.auto},a=new c(t,{sources:m,initialySelectedLabel:o.label,initialySelectedRes:o.res,customSourcePicker:i},f,v);a.el().classList.add("vjs-resolution-button"),t.controlBar.resolutionSwitcher=t.controlBar.addChild(a)})}var f=e.mergeOptions(i,t),p=this,v=document.createElement("span"),m={};e.dom.addClass(v,"vjs-resolution-button-label"),p.updateSrc=function(t){if(!t)return p.src();p.controlBar.resolutionSwitcher&&(p.controlBar.resolutionSwitcher.dispose(),delete p.controlBar.resolutionSwitcher),t=t.sort(r),m=s(t);var i=d(m,t),o=new c(p,{sources:m,initialySelectedLabel:i.label,initialySelectedRes:i.res,customSourcePicker:f.customSourcePicker},f,v);return e.dom.addClass(o.el(),"vjs-resolution-button"),p.controlBar.resolutionSwitcher=p.controlBar.el_.insertBefore(o.el_,p.controlBar.getChild("fullscreenToggle").el_),p.controlBar.resolutionSwitcher.dispose=function(){this.parentNode.removeChild(this)},n(p,i.sources,i.label)},p.currentResolution=function(t,e){return null==t?o:(null!=a[t]&&a[t].onClick(e),p)},p.getGroupedSrc=function(){return m},p.ready(function(){p.options_.sources.length>1&&p.updateSrc(p.options_.sources),"Youtube"===p.techName_&&h(p)})},e.registerPlugin("videoJsResolutionSwitcher",r)}(window,t)}(),function(t,e){"undefined"!=typeof window&&window.videojs?e(window.videojs):"function"==typeof define&&define.amd?define("videojs-hotkeys",["video.js"],function(t){return e(t.default||t)}):"undefined"!=typeof module&&module.exports&&(module.exports=e(require("video.js")))}(0,function(t){"use strict";"undefined"!=typeof window&&(window.videojs_hotkeys={version:"0.2.22"});var e=function(e){function n(t){return 32===t.which||179===t.which}function r(t){return 37===t.which||177===t.which}function i(t){return 39===t.which||176===t.which}function o(t){return 38===t.which}function a(t){return 40===t.which}function s(t){return 77===t.which}function u(t){return 70===t.which}function l(t){return"function"==typeof m?m(t):m}var c=this,d=c.el(),h=document,f={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:n,rewindKey:r,forwardKey:i,volumeUpKey:o,volumeDownKey:a,muteKey:s,fullscreenKey:u,customKeys:{}},p=t.mergeOptions||t.util.mergeOptions;e=p(f,e||{});var v=e.volumeStep,m=e.seekStep,g=e.enableMute,y=e.enableVolumeScroll,A=e.enableFullscreen,_=e.enableNumbers,b=e.enableJogStyle,T=e.alwaysCaptureHotkeys,S=e.enableModifiersForNumbers,E=e.enableInactiveFocus,w=e.skipInitialFocus;d.hasAttribute("tabIndex")||d.setAttribute("tabIndex","-1"),d.style.outline="none",!T&&c.autoplay()||w||c.one("play",function(){d.focus()}),E&&c.on("userinactive",function(){var t=function(){clearTimeout(e)},e=setTimeout(function(){c.off("useractive",t);var e=h.activeElement,n=d.querySelector(".vjs-control-bar");e&&e.parentElement==n&&d.focus()},10);c.one("useractive",t)}),c.on("play",function(){var t=d.querySelector(".iframeblocker");t&&""===t.style.display&&(t.style.display="block",t.style.bottom="39px")});var k=function(t){var n,r,i=t.which,o=t.preventDefault,a=c.duration();if(c.controls()){var s=h.activeElement;if(T||s==d||s==d.querySelector(".vjs-tech")||s==d.querySelector(".vjs-control-bar")||s==d.querySelector(".iframeblocker"))switch(I(t,c)){case 1:o(),T&&t.stopPropagation(),c.paused()?c.play():c.pause();break;case 2:n=!c.paused(),o(),n&&c.pause(),r=c.currentTime()-l(t),r<=0&&(r=0),c.currentTime(r),n&&c.play();break;case 3:n=!c.paused(),o(),n&&c.pause(),r=c.currentTime()+l(t),r>=a&&(r=n?a-.001:a),c.currentTime(r),n&&c.play();break;case 5:o(),b?(r=c.currentTime()-1,c.currentTime()<=1&&(r=0),c.currentTime(r)):c.volume(c.volume()-v);break;case 4:o(),b?(r=c.currentTime()+1,r>=a&&(r=a),c.currentTime(r)):c.volume(c.volume()+v);break;case 6:g&&c.muted(!c.muted());break;case 7:A&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen());break;default:if((i>47&&i<59||i>95&&i<106)&&(S||!(t.metaKey||t.ctrlKey||t.altKey))&&_){var u=48;i>95&&(u=96);var f=i-u;o(),c.currentTime(c.duration()*f*.1)}for(var p in e.customKeys){var m=e.customKeys[p];m&&m.key&&m.handler&&m.key(t)&&(o(),m.handler(c,e,t))}}}},C=function(t){if(c.controls()){var e=t.relatedTarget||t.toElement||h.activeElement;e!=d&&e!=d.querySelector(".vjs-tech")&&e!=d.querySelector(".iframeblocker")||A&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen())}},L=function(t){if(c.controls()){var e=h.activeElement;if((T||e==d||e==d.querySelector(".vjs-tech")||e==d.querySelector(".iframeblocker")||e==d.querySelector(".vjs-control-bar"))&&y){t=window.event||t;var n=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail));t.preventDefault(),1==n?c.volume(c.volume()+v):-1==n&&c.volume(c.volume()-v)}}},I=function(t,n){return e.playPauseKey(t,n)?1:e.rewindKey(t,n)?2:e.forwardKey(t,n)?3:e.volumeUpKey(t,n)?4:e.volumeDownKey(t,n)?5:e.muteKey(t,n)?6:e.fullscreenKey(t,n)?7:void 0};return c.on("keydown",k),c.on("dblclick",C),c.on("mousewheel",L),c.on("DOMMouseScroll",L),this};(t.registerPlugin||t.plugin)("hotkeys",e)}),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={};e.m=t,e.c=n,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=0)}({"+8RM":function(t,e){t.exports="data:font/ttf;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI9JUk9AAABfAAAAFZjbWFw59e3twAAAdwAAAFwZ2x5ZjuR1XQAAANUAAABCGhlYWQXkug7AAAA4AAAADZoaGVhCPUEugAAALwAAAAkaG10eAk3AAAAAAHUAAAACGxvY2EAhAAAAAADTAAAAAZtYXhwAREAYAAAARgAAAAgbmFtZT5U/n0AAARcAAACbXBvc3Tm7Ml9AAAGzAAAADEAAQAAA4D/gABcBTcAAAAABRcAAQAAAAAAAAAAAAAAAAAAAAIAAQAAAAEAAJn9rONfDzz1AAsEAAAAAADZrlIfAAAAANmuUh8AAP+RBRcDbwAAAAgAAgAAAAAAAAABAAAAAgBUAAUAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQScAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5q/mrwOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAU3AAAAAAAFAAAAAwAAACwAAAAEAAABVAABAAAAAABOAAMAAQAAACwAAwAKAAABVAAEACIAAAAEAAQAAQAA5q///wAA5q///wAAAAEABAAAAAEAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAABwAAAAAAAAAAQAA5q8AAOavAAAAAQAAAAAAhAAAAAUAAP+RBRcDbwAXAC8AOwBHAFMAAAEjJyYjISIPASMOAQcRHgEXIT4BNxEuAQMUBiMhIiYnET4BOwEyPwEhFxY7ATIWFQUOAQceARc+ATcuAQMuASc+ATceARcOAQEjDgEUFjsBMjY0JgSmoFYKDv4JDgpYnzA/AgI/MAQUMD8BAT8DGhP77BQZAQEZFK4OClcB2lcKDq4TGv3JZIMDA4RjY4QDA4RjR14CAl5HR14CAl4BfUMOExMOQw4TEwMKWgoKWgFAMf1rMEABAUAwApUwQfz6FBoaFAKVFBsKWloKGxRbAoRkY4QCAoRjZIT+cgFfRkdfAQFfR0ZfAbwBEh0TEx0SAAAAAAAAEgDeAAEAAAAAAAAAFQAAAAEAAAAAAAEACAAVAAEAAAAAAAIABwAdAAEAAAAAAAMACAAkAAEAAAAAAAQACAAsAAEAAAAAAAUACwA0AAEAAAAAAAYACAA/AAEAAAAAAAoAKwBHAAEAAAAAAAsAEwByAAMAAQQJAAAAKgCFAAMAAQQJAAEAEACvAAMAAQQJAAIADgC/AAMAAQQJAAMAEADNAAMAAQQJAAQAEADdAAMAAQQJAAUAFgDtAAMAAQQJAAYAEAEDAAMAAQQJAAoAVgETAAMAAQQJAAsAJgFpCkNyZWF0ZWQgYnkgaWNvbmZvbnQKaWNvbmZvbnRSZWd1bGFyaWNvbmZvbnRpY29uZm9udFZlcnNpb24gMS4waWNvbmZvbnRHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQAKAEMAcgBlAGEAdABlAGQAIABiAHkAIABpAGMAbwBuAGYAbwBuAHQACgBpAGMAbwBuAGYAbwBuAHQAUgBlAGcAdQBsAGEAcgBpAGMAbwBuAGYAbwBuAHQAaQBjAG8AbgBmAG8AbgB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMABpAGMAbwBuAGYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgECAQMAB3BpY3R1cmUAAAAAAA=="},"+HiE":function(t,e,n){"use strict";var r=n("a6t1"),i=n("d0hO");t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},"+TFK":function(t,e,n){"use strict";var r=n("gfI6"),i=n("kziU")(4);r(r.P+r.F*!n("OiX5")([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},"+d6U":function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},"+yct":function(t,e,n){var r=n("a6t1"),i=n("GuN7");t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},"+zHq":function(t,e,n){"use strict";var r=n("gfI6"),i=n("I5ZQ"),o=n("zySG"),a=n("tg2m");n("itn3")&&r(r.P+n("mEn9"),"Object",{__defineGetter__:function(t,e){a.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},"/4o9":function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n("gfI6"),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},"/7vx":function(t,e,n){n("F6kW")("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},"/GCA":function(t,e,n){var r=n("gfI6");r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},"/TTR":function(t,e,n){var r=n("g38Z");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0};i.transform=void 0;n("uOJK")(r,i);r.locals&&(t.exports=r.locals)},"/Uj3":function(t,e,n){"use strict";var r=n("gfI6"),i=n("1o3W")(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n("OiX5")(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},"/Z3B":function(t,e,n){n("Fknn"),t.exports=n("oqL4").RegExp.escape},"/q/b":function(t,e,n){var r=n("gfI6");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},"/r/u":function(t,e,n){"use strict";var r=n("gfI6"),i=n("zySG"),o=n("I5ZQ"),a=n("wrr7"),s=[].sort,u=[1,2,3];r(r.P+r.F*(a(function(){u.sort(void 0)})||!a(function(){u.sort(null)})||!n("OiX5")(s)),"Array",{sort:function(t){return void 0===t?s.call(o(this)):s.call(o(this),i(t))}})},"/zMr":function(t,e,n){var r=n("gfI6");r(r.S,"Math",{log1p:n("+d6U")})},0:function(t,e,n){n("briU"),t.exports=n("8liJ")},"0BM2":function(t,e){e.f=Object.getOwnPropertySymbols},"0KQi":function(t,e,n){var r=n("gfI6"),i=n("wl1Y"),o=n("zySG"),a=n("TVvA"),s=n("SWzD"),u=n("wrr7"),l=n("ILqf"),c=(n("cegO").Reflect||{}).construct,d=u(function(){function t(){}return!(c(function(){},[],t)instanceof t)}),h=!u(function(){c(function(){})});r(r.S+r.F*(d||h),"Reflect",{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(h&&!d)return c(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(l.apply(t,r))}var u=n.prototype,f=i(s(u)?u:Object.prototype),p=Function.apply.call(t,f,e);return s(p)?p:f}})},"0O7Q":function(t,e,n){"use strict";var r=n("gfI6"),i=n("oE9M");r(r.P+r.F*n("j+m8")("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"0eGa":function(t,e,n){var r=n("SWzD");t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},"0hmV":function(t,e,n){"use strict";var r=n("cegO"),i=n("iNHF"),o=n("itn3"),a=n("gfI6"),s=n("xVER"),u=n("w8es").KEY,l=n("wrr7"),c=n("zS5q"),d=n("gJRO"),h=n("2eo7"),f=n("e5pe"),p=n("yMXV"),v=n("KLS5"),m=n("jaLz"),g=n("yiIW"),y=n("TVvA"),A=n("SWzD"),_=n("I5ZQ"),b=n("rWQF"),T=n("oAFy"),S=n("VMkr"),E=n("wl1Y"),w=n("YeNM"),k=n("4PQM"),C=n("0BM2"),L=n("tg2m"),I=n("rmpa"),x=k.f,R=L.f,O=w.f,D=r.Symbol,M=r.JSON,j=M&&M.stringify,P=f("_hidden"),N=f("toPrimitive"),U={}.propertyIsEnumerable,B=c("symbol-registry"),F=c("symbols"),G=c("op-symbols"),z=Object.prototype,V="function"==typeof D&&!!C.f,H=r.QObject,W=!H||!H.prototype||!H.prototype.findChild,Q=o&&l(function(){return 7!=E(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=x(z,e);r&&delete z[e],R(t,e,n),r&&t!==z&&R(z,e,r)}:R,Y=function(t){var e=F[t]=E(D.prototype);return e._k=t,e},q=V&&"symbol"==typeof D.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof D},K=function(t,e,n){return t===z&&K(G,e,n),y(t),e=T(e,!0),y(n),i(F,e)?(n.enumerable?(i(t,P)&&t[P][e]&&(t[P][e]=!1),n=E(n,{enumerable:S(0,!1)})):(i(t,P)||R(t,P,S(1,{})),t[P][e]=!0),Q(t,e,n)):R(t,e,n)},X=function(t,e){y(t);for(var n,r=m(e=b(e)),i=0,o=r.length;o>i;)K(t,n=r[i++],e[n]);return t},Z=function(t,e){return void 0===e?E(t):X(E(t),e)},J=function(t){var e=U.call(this,t=T(t,!0));return!(this===z&&i(F,t)&&!i(G,t))&&(!(e||!i(this,t)||!i(F,t)||i(this,P)&&this[P][t])||e)},$=function(t,e){if(t=b(t),e=T(e,!0),t!==z||!i(F,e)||i(G,e)){var n=x(t,e);return!n||!i(F,e)||i(t,P)&&t[P][e]||(n.enumerable=!0),n}},tt=function(t){for(var e,n=O(b(t)),r=[],o=0;n.length>o;)i(F,e=n[o++])||e==P||e==u||r.push(e);return r},et=function(t){for(var e,n=t===z,r=O(n?G:b(t)),o=[],a=0;r.length>a;)!i(F,e=r[a++])||n&&!i(z,e)||o.push(F[e]);return o};V||(D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(G,n),i(this,P)&&i(this[P],t)&&(this[P][t]=!1),Q(this,t,S(1,n))};return o&&W&&Q(z,t,{configurable:!0,set:e}),Y(t)},s(D.prototype,"toString",function(){return this._k}),k.f=$,L.f=K,n("hoJM").f=w.f=tt,n("bdbX").f=J,C.f=et,o&&!n("9v1L")&&s(z,"propertyIsEnumerable",J,!0),p.f=function(t){return Y(f(t))}),a(a.G+a.W+a.F*!V,{Symbol:D});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)f(nt[rt++]);for(var it=I(f.store),ot=0;it.length>ot;)v(it[ot++]);a(a.S+a.F*!V,"Symbol",{for:function(t){return i(B,t+="")?B[t]:B[t]=D(t)},keyFor:function(t){if(!q(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!V,"Object",{create:Z,defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:$,getOwnPropertyNames:tt,getOwnPropertySymbols:et});var at=l(function(){C.f(1)});a(a.S+a.F*at,"Object",{getOwnPropertySymbols:function(t){return C.f(_(t))}}),M&&a(a.S+a.F*(!V||l(function(){var t=D();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(A(e)||void 0!==t)&&!q(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!q(e))return e}),r[1]=e,j.apply(M,r)}}),D.prototype[N]||n("QHaH")(D.prototype,N,D.prototype.valueOf),d(D,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},"0khM":function(t,e,n){"use strict";var r=n("gfI6"),i=n("wrr7"),o=n("JKZW"),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},"1Qv+":function(t,e,n){var r=n("gfI6");r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},"1Um1":function(t,e,n){var r=n("gfI6");r(r.S,"Math",{fround:n("LoOQ")})},"1b0Z":function(t,e,n){var r,i,o,a=n("nZZV"),s=n("xHbQ"),u=n("66qq"),l=n("Mx4w"),c=n("cegO"),d=c.process,h=c.setImmediate,f=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,g={},y=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},A=function(t){y.call(t.data)};h&&f||(h=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++m]=function(){s("function"==typeof t?t:Function(t),e)},r(m),m},f=function(t){delete g[t]},"process"==n("mwya")(d)?r=function(t){d.nextTick(a(y,t,1))}:v&&v.now?r=function(t){v.now(a(y,t,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=A,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(t){c.postMessage(t+"","*")},c.addEventListener("message",A,!1)):r="onreadystatechange"in l("script")?function(t){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:h,clear:f}},"1o3W":function(t,e,n){var r=n("rWQF"),i=n("GuN7"),o=n("Qfht");t.exports=function(t){return function(e,n,a){var s,u=r(e),l=i(u.length),c=o(a,l);if(t&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},"1zWp":function(t,e,n){var r=n("xVER");t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},"2DdT":function(t,e,n){"use strict";n("f9UI")("strike",function(t){return function(){return t(this,"strike","","")}})},"2Ml6":function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,qAcAAAAHAAABAAIAAAAAAAIABQMAAAAAAAABAJABAAAAAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAe7f9mQAAAAAAAAAAAAAAAAAAAAAAABAAaQBjAG8AbgBmAG8AbgB0AAAADgBSAGUAZwB1AGwAYQByAAAAFgBWAGUAcgBzAGkAbwBuACAAMQAuADAAAAAQAGkAYwBvAG4AZgBvAG4AdAAAAAAAAAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI9JUk9AAABfAAAAFZjbWFw59e3twAAAdwAAAFwZ2x5ZjuR1XQAAANUAAABCGhlYWQXkug7AAAA4AAAADZoaGVhCPUEugAAALwAAAAkaG10eAk3AAAAAAHUAAAACGxvY2EAhAAAAAADTAAAAAZtYXhwAREAYAAAARgAAAAgbmFtZT5U/n0AAARcAAACbXBvc3Tm7Ml9AAAGzAAAADEAAQAAA4D/gABcBTcAAAAABRcAAQAAAAAAAAAAAAAAAAAAAAIAAQAAAAEAAJn9t3tfDzz1AAsEAAAAAADZrlIfAAAAANmuUh8AAP+RBRcDbwAAAAgAAgAAAAAAAAABAAAAAgBUAAUAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQScAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5q/mrwOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAU3AAAAAAAFAAAAAwAAACwAAAAEAAABVAABAAAAAABOAAMAAQAAACwAAwAKAAABVAAEACIAAAAEAAQAAQAA5q///wAA5q///wAAAAEABAAAAAEAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAABwAAAAAAAAAAQAA5q8AAOavAAAAAQAAAAAAhAAAAAUAAP+RBRcDbwAXAC8AOwBHAFMAAAEjJyYjISIPASMOAQcRHgEXIT4BNxEuAQMUBiMhIiYnET4BOwEyPwEhFxY7ATIWFQUOAQceARc+ATcuAQMuASc+ATceARcOAQEjDgEUFjsBMjY0JgSmoFYKDv4JDgpYnzA/AgI/MAQUMD8BAT8DGhP77BQZAQEZFK4OClcB2lcKDq4TGv3JZIMDA4RjY4QDA4RjR14CAl5HR14CAl4BfUMOExMOQw4TEwMKWgoKWgFAMf1rMEABAUAwApUwQfz6FBoaFAKVFBsKWloKGxRbAoRkY4QCAoRjZIT+cgFfRkdfAQFfR0ZfAbwBEh0TEx0SAAAAAAAAEgDeAAEAAAAAAAAAFQAAAAEAAAAAAAEACAAVAAEAAAAAAAIABwAdAAEAAAAAAAMACAAkAAEAAAAAAAQACAAsAAEAAAAAAAUACwA0AAEAAAAAAAYACAA/AAEAAAAAAAoAKwBHAAEAAAAAAAsAEwByAAMAAQQJAAAAKgCFAAMAAQQJAAEAEACvAAMAAQQJAAIADgC/AAMAAQQJAAMAEADNAAMAAQQJAAQAEADdAAMAAQQJAAUAFgDtAAMAAQQJAAYAEAEDAAMAAQQJAAoAVgETAAMAAQQJAAsAJgFpCkNyZWF0ZWQgYnkgaWNvbmZvbnQKaWNvbmZvbnRSZWd1bGFyaWNvbmZvbnRpY29uZm9udFZlcnNpb24gMS4waWNvbmZvbnRHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQAKAEMAcgBlAGEAdABlAGQAIABiAHkAIABpAGMAbwBuAGYAbwBuAHQACgBpAGMAbwBuAGYAbwBuAHQAUgBlAGcAdQBsAGEAcgBpAGMAbwBuAGYAbwBuAHQAaQBjAG8AbgBmAG8AbgB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMABpAGMAbwBuAGYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgECAQMAB3BpY3R1cmUAAAAAAA=="},"2eo7":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"2mJW":function(t,e,n){var r=n("gfI6"),i=n("1b0Z");r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},"2o3U":function(t,e,n){"use strict";var r=n("cegO"),i=n("gfI6"),o=n("xVER"),a=n("1zWp"),s=n("w8es"),u=n("9MqD"),l=n("hhx3"),c=n("SWzD"),d=n("wrr7"),h=n("UVvP"),f=n("gJRO"),p=n("r84E");t.exports=function(t,e,n,v,m,g){var y=r[t],A=y,_=m?"set":"add",b=A&&A.prototype,T={},S=function(t){var e=b[t];o(b,t,"delete"==t?function(t){return!(g&&!c(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!c(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!c(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof A&&(g||b.forEach&&!d(function(){(new A).entries().next()}))){var E=new A,w=E[_](g?{}:-0,1)!=E,k=d(function(){E.has(1)}),C=h(function(t){new A(t)}),L=!g&&d(function(){for(var t=new A,e=5;e--;)t[_](e,e);return!t.has(-0)});C||(A=e(function(e,n){l(e,A,t);var r=p(new y,e,A);return void 0!=n&&u(n,m,r[_],r),r}),A.prototype=b,b.constructor=A),(k||L)&&(S("delete"),S("has"),m&&S("get")),(L||w)&&S(_),g&&b.clear&&delete b.clear}else A=v.getConstructor(e,t,m,_),a(A.prototype,n),s.NEED=!0;return f(A,t),T[t]=A,i(i.G+i.W+i.F*(A!=y),T),g||v.setStrong(A,t,m),A}},"2sCs":function(t,e,n){t.exports=n("rBbO")},"3Tiu":function(t,e,n){var r=n("gfI6"),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,u=0;a<s;)n=i(arguments[a++]),u<n?(r=u/n,o=o*r*r+1,u=n):n>0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},"46Yf":function(t,e){t.exports=function(t,e,n,r,i,o){var a,s=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(a=t,s=t.default);var l="function"==typeof s?s.options:s;e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId=i);var c;if(o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):r&&(c=r),c){var d=l.functional,h=d?l.render:l.beforeCreate;d?(l._injectStyles=c,l.render=function(t,e){return c.call(e),h(t,e)}):l.beforeCreate=h?[].concat(h,c):[c]}return{esModule:a,exports:s,options:l}}},"48WC":function(t,e,n){"use strict";var r=n("/TTR"),i=(n.n(r),n("kGlO")),o=(n.n(i),n("GC9N")),a=(n.n(o),n("2sCs")),s=n.n(a),u=n("8ZH7");n.n(u);videojs.options.flash.swf="EasyPlayer.swf",videojs.options.techOrder=["html5","flash"],videojs.browser.IE_VERSION&&videojs.browser.IE_VERSION<11&&(videojs.options.techOrder=["flash","html5"]),e.a={name:"easy-player",data:function(){return{playerUrl:"",typeFlv:!0,player:null,timer:0,snapFromOutside:!1,resolutionName:{sd:"标清",hd:"高清",fhd:"超清",yh:"原画"},isWaiting:!1,timers:null,loadNumber:0}},props:{videoUrl:{type:String,default:""},videoTitle:{type:String,default:""},snapUrl:{default:""},poster:{default:""},autoplay:{type:Boolean,default:!0},live:{type:Boolean,default:!1},snapdownload:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},currentTime:{type:Number,default:0},timeout:{type:Number,default:20},alt:{type:String,default:"无信号"},muted:{type:Boolean,default:!1},aspect:{type:String,default:"16:9"},fluent:{type:Boolean,default:!0},stretch:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},speed:{type:Boolean,default:!0},showCustomButton:{type:Boolean,default:!0},isresolution:{type:Boolean,default:!1},resolution:{type:String,default:""},resolutiondefault:{type:String,default:"hd"},debug:{type:Boolean,default:!1},videoBufferSize:{type:Number,default:204800},audioBufferSize:{type:Number,default:131072},pauseWhenHidden:{type:Boolean,default:!0}},beforeDestroy:function(){this.destroyVideoJS()},deactivated:function(){this.destroyVideoJS()},watch:{videoUrl:function(t){this.destroyVideoJS(),this.initVideoJS(),this.playerUrl=t},playerUrl:function(t){this.destroyVideoJS(),this.initVideoJS()},fluent:function(t){this.destroyVideoJS(),this.initVideoJS()},snapdownload:function(t){this.destroyVideoJS(),this.initVideoJS()},stretch:function(t){this.destroyVideoJS(),this.initVideoJS()},loop:function(t){this.destroyVideoJS(),this.initVideoJS()},currentTime:function(t){this.player&&this.player.currentTime(t)}},mounted:function(){this._fluent=this.fluent,this._stretch=this.stretch,this.initVideoJS()},computed:{videoType:function(){var t="video/mp4";return this.rtmp?t="rtmp/mp4":this.m3u8?t="application/x-mpegURL":this.flv&&(t="video/x-flv"),t},videoWrapperStyle:function(){if("100%"==this.aspect)return{width:"100%",height:"100%"};var t=this.aspect.split(":"),e=parseInt(t[0])||16;return{paddingBottom:(parseInt(t[1])||9)/e*100+"%",position:"relative",margin:"0 auto",overflow:"hidden"}},rtmp:function(){return 0==(this.src||"").indexOf("rtmp")},http:function(){return!/\.flv.*$/.test(this.src||"")&&0==(this.src||"").indexOf("http")},ws:function(){return!/\.flv.*$/.test(this.src||"")&&0==(this.src||"").indexOf("ws")},mp4:function(){return/\.mp4.*$/.test(this.src||"")},m3u8:function(){return/\.m3u8.*$/.test(this.src||"")},flv:function(){return/\.flv.*$/.test(this.src||"")},src:function(){var t=this;if(!this.videoUrl)return"";var e=new XMLHttpRequest;return e.open("GET",this.videoUrl),e.onreadystatechange=function(){/\.flv.*$/.test(e.responseURL||"")&&t.typeFlv?(t.playerUrl=e.responseURL,t.typeFlv=!1):/\.m3u8.*$/.test(e.responseURL||"")&&(t.playerUrl=e.responseURL)},e.abort(),0===this.playerUrl.indexOf("/")?location.protocol+"//"+location.host+this.playerUrl:this.playerUrl},videoHtml:function(){return this.src?this.rtmp||this.http||this.flv?'<video class="video-js vjs-default-skin vjs-big-play-centered" style="width: 100%; height: 100%; '+(this._stretch?"object-fit: fill;":"")+'" controls preload="none" poster="'+(this.poster||this.snapUrl)+'" '+(this.muted?"muted":"")+" "+(this.loop?"loop":"")+'>\n\t\t\t\t\t\t\t<source src="'+this.src+'" type="'+this.videoType+'"></source>\n\t\t\t\t\t\t\t\t<p class="vjs-no-js">\n\t\t\t\t\t\t\t\t\tTo view this video please enable JavaScript, and consider upgrading to a web browser that\n\t\t\t\t\t\t\t\t\t<a href="http://videojs.com/html5-video-support/" target="_blank">\n\t\t\t\t\t\t\t\t\t\tsupports HTML5 video\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</video>':'<canvas style="width: 100%; height: 100%;"></canvas>':'<div class="alt">\n\t\t\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<td>'+this.alt+"</td>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t</div>"}},methods:{myTimer:function(){this.isWaiting&&(this.destroyVideoJS(),this.initVideoJS())},isMobile:function(){return videojs.browser.IS_IOS||videojs.browser.IS_ANDROID},loadResolutionlist:function(t){if(this.isresolution){for(var e,n=this.resolution.split(","),r=[],i=0;i<n.length;i++)n[i]==this.resolutiondefault&&i,e="yh"==n[i]?this.playerUrl:this.playerUrl.replace(".m3u8","_"+n[i]+".m3u8"),r.push({src:e,type:this.videoType,label:this.resolutionName[n[i]],res:n[i]});t.updateSrc(r)}},addSnapButtonJS:function(){var t=this,e=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],document.createElement("button"));e.className="vjs-control vjs-button",e.type="button",e.title="快照",e.innerHTML='<span class="iconfont icon-jietu" onClick="snapclick()"></span>';var n=this.player.controlBar.el_,r=this.player.controlBar.el_.getElementsByClassName("vjs-fullscreen-control")[0];n.insertBefore(e,r),e.addEventListener("click",function(){t.savePic()})},buttonVideoJS:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this.rtmp||videojs.browser.IE_VERSION&&this.flv){var n=this.fluent;if(this.player.tech_.setFluent(n),this.showCustomButton){var r=this.player.controlBar.addChild("button");r.el_.innerText=this.fluent?"流畅":"极速",r.el_.title=this.fluent?"切换极速播放":"切换流畅播放",r.on("click",function(){n=!n,r.el_.innerText=n?"流畅":"极速",r.el_.title=n?"切换极速播放":"切换流畅播放",t.player.tech_.setFluent(n)})}}var i=this.stretch,o=navigator.userAgent.indexOf("Edge")>-1;if((!videojs.browser.IE_VERSION&&!o||videojs.browser.IE_VERSION&&this.flv)&&(void 0==e?this.player.tech_.setStretch(i):document.getElementById(e.playerId).children[0].setAttribute("style","width: 100%; height: 100%;"+(i?"object-fit:fill;":"")),this.showCustomButton&&!this.isMobile())){var a=this.player.controlBar.addChild("button");a.el_.innerText=this.stretch?"拉伸":"标准",a.el_.title=this.stretch?"切换标准显示":"切换拉伸显示",a.on("click",function(){i=!i,a.el_.innerText=i?"拉伸":"标准",a.el_.title=i?"切换标准显示":"切换拉伸显示",void 0==e?t.player.tech_.setStretch(i):document.getElementById(e.playerId).children[0].setAttribute("style","width: 100%; height: 100%;"+(i?"object-fit:fill;":""))})}},destroyVideoJS:function(){this.player&&this.player.dispose&&(this.player.dispose(),this.player=null),this.player&&this.player.destroy&&(this.player.destroy(),this.player=null),this.timer&&(clearInterval(this.timer),this.timer=0),this.$el.querySelector(".video-inner").innerHTML="",this.$emit("update:loading",!1)},getCurrentTime:function(){return this.player&&"function"==typeof this.player.currentTime?this.player.currentTime():-1},initVideoJS:function(){var t=this;this.$el.querySelector(".video-inner").innerHTML=this.videoHtml;var e=this.$el.querySelector("video");if(this.src)if(this.rtmp||videojs.browser.IE_VERSION&&this.flv){var n=document.title,r={notSupportedMessage:"您的浏览器没有安装或开启Flash",tech:["flash"],autoplay:this.autoplay,stretch:this.stretch,fluent:this.fluent,controlBar:{volumePanel:{inline:!1}}},i={playbackRates:[.5,1,1.5,2,4],notSupportedMessage:"您的浏览器没有安装或开启Flash",tech:["flash"],autoplay:this.autoplay,stretch:this.stretch,fluent:this.fluent,controlBar:{volumePanel:{inline:!1}}};this.live?this.player=videojs(e,r):this.speed?this.player=videojs(e,i):this.player=videojs(e,r),this.player.one("ready",function(){t.$emit("update:loading",!1),document.title=n,t.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),t.player.on("ended",function(){t.$emit("ended")}),t.player.on("timeupdate",function(){t.$emit("timeupdate",t.player.currentTime())}),t.player.on("pause",function(){t.$emit("pause",t.player.currentTime())}),t.player.on("playing",function(){t.$emit("play",t.player.currentTime())}),t.player.on("snap",function(e,n){t.saveFile(n)}),0==t.loadNumber?(t.addSnapButtonJS(e),t.buttonVideoJS(e),t.loadNumber=t.loadNumber+1):t.loadNumber=t.loadNumber+1}),document.title=n,this.player.on("error",function(e){var e=t.$el.querySelector(".vjs-error .vjs-error-display .vjs-modal-dialog-content");e.innerHTML="<a href='http://www.adobe.com/go/getflashplayer' target='_blank'>"+e.textContent+"</a>"})}else if(this.http){var i={autoplay:this.autoplay,controlBar:{volumePanel:{inline:!1}},plugins:{videoJsResolutionSwitcher:{default:this.resolutiondefault,dynamicLabel:!0}}},o={autoplay:this.autoplay,controlBar:{volumePanel:{inline:!1}}},a={autoplay:this.autoplay,playbackRates:[.5,1,1.5,2,4],controlBar:{volumePanel:{inline:!1}},plugins:{videoJsResolutionSwitcher:{default:this.resolutiondefault,dynamicLabel:!0}}},u={autoplay:this.autoplay,controlBar:{volumePanel:{inline:!1}},playbackRates:[.5,1,1.5,2,4]},l=(new Date).getTime();this.$emit("update:loading",!0),this.timer=setInterval(function(){var n=(new Date).getTime();if(t.timeout>0&&n-l>1e3*t.timeout)return clearInterval(t.timer),t.timer=0,t.$emit("update:loading",!1),void t.$emit("message",{type:"error",message:"加载播放资源失败"});s.a.head(t.src).then(function(n){clearInterval(t.timer),t.timer=0;var r=document.title;t.live?t.isresolution?(-1==t.resolution.indexOf(t.resolutiondefault)&&(t.resolutiondefault="yh"),t.player=videojs(e,i,function(){})):t.player=videojs(e,o,function(){}):t.isresolution?(-1==t.resolution.indexOf(t.resolutiondefault)&&(t.resolutiondefault="yh"),t.speed?t.player=videojs(e,a,function(){}):t.player=videojs(e,i,function(){})):t.speed?t.player=videojs(e,u,function(){}):t.player=videojs(e,o,function(){}),t.loadResolutionlist(t.player),t.player.one("ready",function(){t.$emit("update:loading",!1),document.title=r,t.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),t.player.on("ended",function(){t.$emit("ended")}),t.player.on("timeupdate",function(){t.$emit("timeupdate",t.player.currentTime())}),t.player.on("pause",function(){t.$emit("pause",t.player.currentTime())}),t.player.on("playing",function(){t.$emit("play",t.player.currentTime())}),t.player.on("snap",function(e,n){t.saveFile(n)}),0==t.loadNumber?(t.addSnapButtonJS(e),t.buttonVideoJS(e),t.loadNumber=t.loadNumber+1):t.loadNumber=t.loadNumber+1}),document.title=r,t.player&&t.player.reloadSourceOnError(),t.player&&t.currentTime>0&&(videojs.browser.IE_VERSION?t.player.on("loadeddata",function(){setTimeout(function(){t.player.currentTime(t.currentTime)},500)}):t.player.currentTime(t.currentTime))}).catch(function(t){console.log(t)})},500)}else if(this.ws)this.player=new EPlayer.Player(this.src,{canvas:this.$el.querySelector(".video-inner canvas"),pauseWhenHidden:this.pauseWhenHidden,audio:!this.muted,videoBufferSize:this.videoBufferSize,audioBufferSize:this.audioBufferSize}),this.muted||document.body.addEventListener("touchstart",function(){t.player.audioOut.unlock(function(){console.log("audio unlock")})});else if(this.flv){this.debug||(flvjs.LoggingControl.enableWarn=!1,flvjs.LoggingControl.enableInfo=!1,flvjs.LoggingControl.enableVerbose=!1,flvjs.LoggingControl.enableDebug=!1);var c={type:"flv",isLive:this.live,url:this.src,withCredentials:!1};void 0!=this.hasaudio&&(c.hasAudio=this.hasaudio),void 0!=this.hasvideo&&(c.hasVideo=this.hasvideo);var r={techOrder:["html5","flvjs"],autoplay:this.autoplay,controlBar:{volumePanel:{inline:!1}},flvjs:{mediaDataSource:c,config:{enableWorker:!0,enableStashBuffer:!1,lazyLoadMaxDuration:180,stashInitialSize:1024,reuseRedirectedURL:!0}}},i={playbackRates:[.5,1,1.5,2,4],techOrder:["html5","flvjs"],autoplay:this.autoplay,controlBar:{volumePanel:{inline:!1}},flvjs:{mediaDataSource:c,config:{enableWorker:!0,enableStashBuffer:!1,lazyLoadMaxDuration:180,stashInitialSize:1024,reuseRedirectedURL:!0}}};this.live?this.player=videojs(e,r):this.speed?this.player=videojs(e,i):this.player=videojs(e,r),this.player.one("ready",function(){t.$emit("update:loading",!1),t._stretch&&(t.player.tech_.el_.style.objectFit="fill"),t.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),t.player.muted(t.muted),t.player.on("canplay",function(){t.autoplay&&t.player.tech_.flvPlayer.play().catch(function(){})}),t.player.on("timeupdate",function(){t.$emit("timeupdate",t.player.currentTime())}),t.player.on("ended",function(){t.$emit("ended"),t.live&&(t.isWaiting=!0,t.timers=setInterval(t.myTimer,1e3))}),t.player.on("pause",function(){t.$emit("pause",t.player.currentTime())}),t.player.on("playing",function(){t.isWaiting=!1,t.isWaiting||clearInterval(t.timers),t.$emit("play",t.player.currentTime())}),t.player.on("snap",function(e,n){t.saveFile(n)}),0==t.loadNumber?(t.addSnapButtonJS(e),t.buttonVideoJS(e),t.loadNumber=t.loadNumber+1):t.loadNumber=t.loadNumber+1})}},savePic:function(t){var e=new Date,n=e.getFullYear(),r=e.getMonth()+1,i=e.getDate(),o=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),t="EasyPlayer"+n+r+i+o+a+s+".png",u="png";switch(t){case t.indexOf("png")>-1:u="png";break;case t.indexOf("jpg")>-1:u="jpg";break;case t.indexOf("jpeg")>-1:u="jpeg";break;case t.indexOf("bmp")>-1:u="bmp";break;case t.indexOf("gif")>-1:u="gif";break;default:u="png"}var l,c=this.player.el_.children[0];if(c&&c.tagName.toUpperCase()==="object".toUpperCase())l=c.vjs_snap();else{var d=window.canvas=document.createElement("canvas");d.width=c.videoWidth,d.height=c.videoHeight,d.getContext("2d").drawImage(c,0,0,d.width,d.height),l=d.toDataURL("image/"+u)}for(var h=l.split(","),f=h[0].match(/:(.*?);/)[1],p=atob(h[1]),v=p.length,m=new Uint8Array(v);v--;)m[v]=p.charCodeAt(v);var g=new Blob([m],{type:f}),y=window.URL.createObjectURL(g),A=document.createElement("a");if(A.style.display="none",1==this.snapdownload)A.href=y,A.download=t,A.click();else{A.href="javascript:void(0)";window.open().location=y}document.body.appendChild(A),setTimeout(function(){document.body.removeChild(A),window.URL.revokeObjectURL(y)},1e3)}}}},"4D6G":function(t,e,n){var r=n("gfI6"),i=n("kUA4"),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},"4PQM":function(t,e,n){var r=n("bdbX"),i=n("VMkr"),o=n("rWQF"),a=n("oAFy"),s=n("iNHF"),u=n("xLTs"),l=Object.getOwnPropertyDescriptor;e.f=n("itn3")?l:function(t,e){if(t=o(t),e=a(e,!0),u)try{return l(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},"4k54":function(t,e,n){n("tcJl")("WeakSet")},"4wT+":function(t,e,n){"use strict";var r=n("gfI6"),i=n("kziU")(1);r(r.P+r.F*!n("OiX5")([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},"5HlJ":function(t,e,n){"use strict";var r=n("gfI6"),i=n("cy3O"),o=n("I5ZQ"),a=n("GuN7"),s=n("a6t1"),u=n("VVhn");r(r.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=a(e.length),r=u(e,0);return i(r,e,e,n,0,void 0===t?1:s(t)),r}}),n("I/ou")("flatten")},"5QUR":function(t,e,n){var r=n("gfI6"),i=n("FBI6");r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},"5SCX":function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function r(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},"5Srp":function(t,e,n){"use strict";var r=n("gvuQ"),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},"5a9c":function(t,e,n){n("ow6B")("getOwnPropertyNames",function(){return n("YeNM").f})},"5b+E":function(t,e,n){var r=n("gfI6"),i=n("8zsY");r(r.G+r.F*(parseInt!=i),{parseInt:i})},"5dkQ":function(t,e,n){"use strict";var r=n("tg2m").f,i=n("wl1Y"),o=n("1zWp"),a=n("nZZV"),s=n("hhx3"),u=n("9MqD"),l=n("MLcW"),c=n("F/oR"),d=n("eAo0"),h=n("itn3"),f=n("w8es").fastKey,p=n("0eGa"),v=h?"_s":"size",m=function(t,e){var n,r=f(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,l){var c=t(function(t,r){s(t,c,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=r&&u(r,n,t[l],t)});return o(c.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=p(this,e),r=m(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(t){p(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!m(p(this,e),t)}}),h&&r(c.prototype,"size",{get:function(){return p(this,e)[v]}}),c},def:function(t,e,n){var r,i,o=m(t,e);return o?o.v=n:(t._l=o={i:i=f(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:m,setStrong:function(t,e,n){l(t,e,function(t,n){this._t=p(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?c(0,n.k):"values"==e?c(0,n.v):c(0,[n.k,n.v]):(t._t=void 0,c(1))},n?"entries":"values",!n,!0),d(e)}}},"5p4y":function(t,e){t.exports=function(t,e){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],u=o[2],l=o[3],c={id:t+":"+i,css:s,media:u,sourceMap:l};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}},"5vIH":function(t,e,n){"use strict";var r=n("gfI6"),i=n("rWQF"),o=n("a6t1"),a=n("GuN7"),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n("OiX5")(s)),"Array",{lastIndexOf:function(t){if(u)return s.apply(this,arguments)||0;var e=i(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},"5zKf":function(t,e,n){var r=n("6jds"),i=n("e5pe")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},"66qq":function(t,e,n){var r=n("cegO").document;t.exports=r&&r.documentElement},"68ub":function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n("DkjP");r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},"6J/E":function(t,e,n){var r=n("SWzD");n("ow6B")("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},"6Tw+":function(t,e,n){"use strict";var r,i,o,a,s=n("9v1L"),u=n("cegO"),l=n("nZZV"),c=n("gOH0"),d=n("gfI6"),h=n("SWzD"),f=n("zySG"),p=n("hhx3"),v=n("9MqD"),m=n("sPDH"),g=n("1b0Z").set,y=n("mVC9")(),A=n("rLr5"),_=n("Z0qp"),b=n("BEkf"),T=n("QG95"),S=u.TypeError,E=u.process,w=E&&E.versions,k=w&&w.v8||"",C=u.Promise,L="process"==c(E),I=function(){},x=i=A.f,R=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n("e5pe")("species")]=function(t){t(I,I)};return(L||"function"==typeof PromiseRejectionEvent)&&t.then(I)instanceof e&&0!==k.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(t){}}(),O=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},D=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var r=t._v,i=1==t._s,o=0;n.length>o;)!function(e){var n,o,a,s=i?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(i||(2==t._h&&P(t),t._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),a=!0)),n===e.promise?l(S("Promise-chain cycle")):(o=O(n))?o.call(n,u,l):u(n)):l(r)}catch(t){c&&!a&&c.exit(),l(t)}}(n[o++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){g.call(u,function(){var e,n,r,i=t._v,o=j(t);if(o&&(e=_(function(){L?E.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=L||j(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},P=function(t){g.call(u,function(){var e;L?E.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),D(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=O(t))?y(function(){var r={_w:n,_d:!1};try{e.call(t,l(U,r,1),l(N,r,1))}catch(t){N.call(r,t)}}):(n._v=t,n._s=1,D(n,!1))}catch(t){N.call({_w:n,_d:!1},t)}}};R||(C=function(t){p(this,C,"Promise","_h"),f(t),r.call(this);try{t(l(U,this,1),l(N,this,1))}catch(t){N.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("1zWp")(C.prototype,{then:function(t,e){var n=x(m(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=L?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&D(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=l(U,t,1),this.reject=l(N,t,1)},A.f=x=function(t){return t===C||t===a?new o(t):i(t)}),d(d.G+d.W+d.F*!R,{Promise:C}),n("gJRO")(C,"Promise"),n("eAo0")("Promise"),a=n("oqL4").Promise,d(d.S+d.F*!R,"Promise",{reject:function(t){var e=x(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!R),"Promise",{resolve:function(t){return T(s&&this===a?C:this,t)}}),d(d.S+d.F*!(R&&n("UVvP")(function(t){C.all(t).catch(I)})),"Promise",{all:function(t){var e=this,n=x(e),r=n.resolve,i=n.reject,o=_(function(){var n=[],o=0,a=1;v(t,!1,function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=x(e),r=n.reject,i=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},"6jds":function(t,e){t.exports={}},"6v9O":function(t,e,n){t.exports=n("zS5q")("native-function-to-string",Function.toString)},"77LP":function(t,e,n){"use strict";var r=n("gOH0"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"7Adc":function(t,e,n){(function(t){function r(t,e){this._id=t,this._clearFn=e}var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;e.setTimeout=function(){return new r(o.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n("AYvJ"),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n("mFPK"))},"7BBv":function(t,e,n){n("YzBQ")("WeakMap")},"7afX":function(t,e,n){"use strict";n("T/J3")("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},"7mmP":function(t,e,n){"use strict";n("f9UI")("big",function(t){return function(){return t(this,"big","","")}})},"86Y3":function(t,e,n){"use strict";var r=n("TVvA"),i=n("G9Pl"),o=n("77LP");n("NILh")("search",1,function(t,e,n,a){return[function(n){var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=r(t),u=String(this),l=s.lastIndex;i(l,0)||(s.lastIndex=0);var c=o(s,u);return i(s.lastIndex,l)||(s.lastIndex=l),null===c?-1:c.index}]})},"8NP9":function(t,e,n){"use strict";function r(t,e,n){var r,i,o,a=new Array(n),s=8*n-e-1,u=(1<<s)-1,l=u>>1,c=23===e?U(2,-24)-U(2,-77):0,d=0,h=t<0||0===t&&1/t<0?1:0;for(t=N(t),t!=t||t===j?(i=t!=t?1:0,r=u):(r=B(F(t)/G),t*(o=U(2,-r))<1&&(r--,o*=2),t+=r+l>=1?c/o:c*U(2,1-l),t*o>=2&&(r++,o/=2),r+l>=u?(i=0,r=u):r+l>=1?(i=(t*o-1)*U(2,e),r+=l):(i=t*U(2,l-1)*U(2,e),r=0));e>=8;a[d++]=255&i,i/=256,e-=8);for(r=r<<e|i,s+=e;s>0;a[d++]=255&r,r/=256,s-=8);return a[--d]|=128*h,a}function i(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,a=o>>1,s=i-7,u=n-1,l=t[u--],c=127&l;for(l>>=7;s>0;c=256*c+t[u],u--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===c)c=1-a;else{if(c===o)return r?NaN:l?-j:j;r+=U(2,e),c-=a}return(l?-1:1)*r*U(2,c-e)}function o(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function s(t){return[255&t,t>>8&255]}function u(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function l(t){return r(t,52,8)}function c(t){return r(t,23,4)}function d(t,e,n){k(t[I],e,{get:function(){return this[n]}})}function h(t,e,n,r){var i=+n,o=E(i);if(o+e>t[V])throw M(x);var a=t[z]._b,s=o+t[H],u=a.slice(s,s+e);return r?u:u.reverse()}function f(t,e,n,r,i,o){var a=+n,s=E(a);if(s+e>t[V])throw M(x);for(var u=t[z]._b,l=s+t[H],c=r(+i),d=0;d<e;d++)u[l+d]=c[o?d:e-d-1]}var p=n("cegO"),v=n("itn3"),m=n("9v1L"),g=n("dwEP"),y=n("QHaH"),A=n("1zWp"),_=n("wrr7"),b=n("hhx3"),T=n("a6t1"),S=n("GuN7"),E=n("+yct"),w=n("hoJM").f,k=n("tg2m").f,C=n("eNpo"),L=n("gJRO"),I="prototype",x="Wrong index!",R=p.ArrayBuffer,O=p.DataView,D=p.Math,M=p.RangeError,j=p.Infinity,P=R,N=D.abs,U=D.pow,B=D.floor,F=D.log,G=D.LN2,z=v?"_b":"buffer",V=v?"_l":"byteLength",H=v?"_o":"byteOffset";if(g.ABV){if(!_(function(){R(1)})||!_(function(){new R(-1)})||_(function(){return new R,new R(1.5),new R(NaN),"ArrayBuffer"!=R.name})){R=function(t){return b(this,R),new P(E(t))};for(var W,Q=R[I]=P[I],Y=w(P),q=0;Y.length>q;)(W=Y[q++])in R||y(R,W,P[W]);m||(Q.constructor=R)}var K=new O(new R(2)),X=O[I].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||A(O[I],{setInt8:function(t,e){X.call(this,t,e<<24>>24)},setUint8:function(t,e){X.call(this,t,e<<24>>24)}},!0)}else R=function(t){b(this,R,"ArrayBuffer");var e=E(t);this._b=C.call(new Array(e),0),this[V]=e},O=function(t,e,n){b(this,O,"DataView"),b(t,R,"DataView");var r=t[V],i=T(e);if(i<0||i>r)throw M("Wrong offset!");if(n=void 0===n?r-i:S(n),i+n>r)throw M("Wrong length!");this[z]=t,this[H]=i,this[V]=n},v&&(d(R,"byteLength","_l"),d(O,"buffer","_b"),d(O,"byteLength","_l"),d(O,"byteOffset","_o")),A(O[I],{getInt8:function(t){return h(this,1,t)[0]<<24>>24},getUint8:function(t){return h(this,1,t)[0]},getInt16:function(t){var e=h(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=h(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return o(h(this,4,t,arguments[1]))},getUint32:function(t){return o(h(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return i(h(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return i(h(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){f(this,1,t,a,e)},setUint8:function(t,e){f(this,1,t,a,e)},setInt16:function(t,e){f(this,2,t,s,e,arguments[2])},setUint16:function(t,e){f(this,2,t,s,e,arguments[2])},setInt32:function(t,e){f(this,4,t,u,e,arguments[2])},setUint32:function(t,e){f(this,4,t,u,e,arguments[2])},setFloat32:function(t,e){f(this,4,t,c,e,arguments[2])},setFloat64:function(t,e){f(this,8,t,l,e,arguments[2])}});L(R,"ArrayBuffer"),L(O,"DataView"),y(O[I],g.VIEW,!0),e.ArrayBuffer=R,e.DataView=O},"8P34":function(t,e,n){"use strict";n("f9UI")("bold",function(t){return function(){return t(this,"b","","")}})},"8PBV":function(t,e,n){"use strict";var r=n("1zWp"),i=n("w8es").getWeak,o=n("TVvA"),a=n("SWzD"),s=n("hhx3"),u=n("9MqD"),l=n("kziU"),c=n("iNHF"),d=n("0eGa"),h=l(5),f=l(6),p=0,v=function(t){return t._l||(t._l=new m)},m=function(){this.a=[]},g=function(t,e){return h(t.a,function(t){return t[0]===e})};m.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=f(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=p++,t._l=void 0,void 0!=r&&u(r,n,t[o],t)});return r(l.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).delete(t):n&&c(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).has(t):n&&c(n,this._i)}}),l},def:function(t,e,n){var r=i(o(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},"8ZH7":function(t,e,n){(function(e){t.exports=e.EPlayer=n("BfnK")}).call(e,n("mFPK"))},"8bZh":function(t,e,n){"use strict";var r=n("gvuQ");t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},"8liJ":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("P01y"),i=n.n(r),o=n("duxV"),a=(n.n(o),n("v8Lx")),s=n("ytBe");i.a.use(a.a),i.a.customElement(s.a.name,s.a)},"8vkE":function(t,e,n){"use strict";var r=n("gfI6"),i=n("kziU")(2);r(r.P+r.F*!n("OiX5")([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},"8yaX":function(t,e,n){"use strict";var r=n("gfI6"),i=n("GuN7"),o=n("oE9M"),a="".startsWith;r(r.P+r.F*n("j+m8")("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},"8zsY":function(t,e,n){var r=n("cegO").parseInt,i=n("T/J3").trim,o=n("agPX"),a=/^[-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},"9Amk":function(t,e,n){var r=n("gfI6");r(r.S,"Math",{sign:n("lfgq")})},"9C+T":function(t,e,n){var r=n("gfI6"),i=n("TVvA"),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},"9MqD":function(t,e,n){var r=n("nZZV"),i=n("z6NM"),o=n("5zKf"),a=n("TVvA"),s=n("GuN7"),u=n("a+E/"),l={},c={},e=t.exports=function(t,e,n,d,h){var f,p,v,m,g=h?function(){return t}:u(t),y=r(n,d,e?2:1),A=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(f=s(t.length);f>A;A++)if((m=e?y(a(p=t[A])[0],p[1]):y(t[A]))===l||m===c)return m}else for(v=g.call(t);!(p=v.next()).done;)if((m=i(v,y,p.value,e))===l||m===c)return m};e.BREAK=l,e.RETURN=c},"9NgK":function(t,e,n){n("F6kW")("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},"9WD1":function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},"9dSf":function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiID4KPCEtLQoyMDEzLTktMzA6IENyZWF0ZWQuCi0tPgo8c3ZnPgo8bWV0YWRhdGE+CkNyZWF0ZWQgYnkgaWNvbmZvbnQKPC9tZXRhZGF0YT4KPGRlZnM+Cgo8Zm9udCBpZD0iaWNvbmZvbnQiIGhvcml6LWFkdi14PSIxMDI0IiA+CiAgPGZvbnQtZmFjZQogICAgZm9udC1mYW1pbHk9Imljb25mb250IgogICAgZm9udC13ZWlnaHQ9IjUwMCIKICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIgogICAgdW5pdHMtcGVyLWVtPSIxMDI0IgogICAgYXNjZW50PSI4OTYiCiAgICBkZXNjZW50PSItMTI4IgogIC8+CiAgICA8bWlzc2luZy1nbHlwaCAvPgogICAgCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iamlldHUiIHVuaWNvZGU9IiYjNTg5NTA7IiBkPSJNOTcyLjY0MDEyNSA1OS43NTMzMThoLTM0LjE3MzMwMlY3NDMuNDE5MjA0YzAgMTguODg1MjQ2LTE1LjM4Nzk3OCAzNC4xNzMzMDItMzQuMjczMjI0IDM0LjE3MzMwMkgxNTIuMjgxMDNWODYzLjAyNTc2MUMxNTEuNDgxNjU1IDg4MS4zMTE0NzUgMTM2LjM5MzQ0MyA4OTUuODAwMTU2IDExOC4xMDc3MjggODk1LjgwMDE1NiA5OS43MjIwOTIgODk1LjgwMDE1NiA4NC42MzM4OCA4ODEuMzExNDc1IDgzLjgzNDUwNCA4NjMuMDI1NzYxdi04NS41MzMxNzdINDkuNjYxMjAyYy0xOC4wODU4Ny0xLjA5OTE0MS0zMi4xNzQ4NjMtMTYuMDg3NDMyLTMyLjE3NDg2My0zNC4xNzMzMDJzMTQuMDg4OTkzLTMzLjA3NDE2MSAzMi4xNzQ4NjMtMzQuMTczMzAyaDM0LjE3MzMwMnYtNjgzLjY2NTg4NmMwLTE4Ljg4NTI0NiAxNS4zODc5NzgtMzQuMTczMzAyIDM0LjI3MzIyNC0zNC4xNzMzMDJoNzUyLjAxMjQ5MVYtOTQuMjI2Mzg2YzAuNzk5Mzc1LTE4LjI4NTcxNCAxNS44ODc1ODgtMzIuNzc0Mzk1IDM0LjE3MzMwMi0zMi43NzQzOTUgMTguMjg1NzE0IDAgMzMuMzczOTI3IDE0LjM4ODc1OSAzNC4xNzMzMDIgMzIuNzc0Mzk1djg1LjUzMzE3OEg5NzIuNjQwMTI1YzE4LjA4NTg3IDEuMDk5MTQxIDMyLjE3NDg2MyAxNi4wODc0MzIgMzIuMTc0ODYzIDM0LjE3MzMwMi0wLjA5OTkyMiAxOC4xODU3OTItMTQuMTg4OTE1IDMzLjE3NDA4My0zMi4xNzQ4NjMgMzQuMjczMjI0eiBtLTgyMC4zNTkwOTUgMHY2NDkuNDkyNTg0aDcxNy44MzkxODl2LTY0OS40OTI1ODRIMTUyLjI4MTAzeiBtMCAwTTI3MS44ODc1ODggNTM4LjI3OTQ2OWMtMC43OTkzNzUtMjQuODgwNTYyIDEyLjA5MDU1NC00OC4yNjIyOTUgMzMuNTczNzctNjAuOTUyMzgxIDIxLjQ4MzIxNi0xMi42OTAwODYgNDguMTYyMzczLTEyLjY5MDA4NiA2OS41NDU2NjggMCAyMS40ODMyMTYgMTIuNjkwMDg2IDM0LjI3MzIyNCAzNi4wNzE4MTkgMzMuNTczNzcgNjAuOTUyMzgxLTEuMDk5MTQxIDM2Ljk3MTExNi0zMS4zNzU0ODggNjYuMjQ4MjQ0LTY4LjM0NjYwNCA2Ni4yNDgyNDQtMzYuOTcxMTE2IDAuMDk5OTIyLTY3LjI0NzQ2My0yOS4yNzcxMjctNjguMzQ2NjA0LTY2LjI0ODI0NHpNODE3Ljc2MTEyNCAxNjkuODY3MjkxTDcxNi4zNDAzNTkgNDQwLjk1NTUwNGMtMi4zOTgxMjYgNi42OTQ3Ny04LjQ5MzM2NSAxMS4zOTExMDEtMTUuNTg3ODIyIDExLjk5MDYzMi03LjA5NDQ1NyAwLjg5OTI5Ny0xNC4wODg5OTMtMi4yOTgyMDUtMTcuOTg1OTQ4LTguMjkzNTIxTDU2Ny45NTYyODQgMjY5LjI4OTYxN2MtNS4yOTU4NjMtNy45OTM3NTUtMTUuNjg3NzQ0LTEwLjc5MTU2OS0yNC4xODExMDgtNi41OTQ4NDdMMzQ3LjEyODgwNiAzNTguMjIwMTQxYy04LjU5MzI4NiA0LjI5NjY0My0xOC44ODUyNDYgMS40OTg4MjktMjQuMTgxMTA5LTYuNDk0OTI2bC0xMTYuOTA4NjY1LTE3OC4yNjA3MzRjLTMuNzk3MDM0LTUuNTk1NjI4LTQuMDk2Nzk5LTEyLjg4OTkzLTAuNTk5NTMyLTE4LjY4NTQwMiAzLjI5NzQyNC01Ljk5NTMxNiA5LjY5MjQyOC05LjU5MjUwNiAxNi40ODcxMi05LjQ5MjU4NGg1NzguMDQ4NGM2LjA5NTIzOC0wLjA5OTkyMiAxMS44OTA3MSAyLjc5NzgxNCAxNS4zODc5NzggNy43OTM5MTEgMy42OTcxMTIgNC43OTYyNTMgNC40OTY0ODcgMTEuMTkxMjU3IDIuMzk4MTI2IDE2Ljc4Njg4NXogbTAgMCIgIGhvcml6LWFkdi14PSIxMDI0IiAvPgoKICAgIAoKCiAgPC9mb250Pgo8L2RlZnM+PC9zdmc+Cg=="},"9v1L":function(t,e){t.exports=!1},AHac:function(t,e,n){var r=n("hoJM"),i=n("0BM2"),o=n("TVvA"),a=n("cegO").Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},AYvJ:function(t,e,n){(function(t,e){!function(t,n){"use strict";function r(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var r={callback:t,args:e};return l[u]=r,s(u),u++}function i(t){delete l[t]}function o(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}function a(t){if(c)setTimeout(a,0,t);else{var e=l[t];if(e){c=!0;try{o(e)}finally{i(t),c=!1}}}}if(!t.setImmediate){var s,u=1,l={},c=!1,d=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?function(){s=function(t){e.nextTick(function(){a(t)})}}():function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?function(){var e="setImmediate$"+Math.random()+"$",n=function(n){n.source===t&&"string"==typeof n.data&&0===n.data.indexOf(e)&&a(+n.data.slice(e.length))};t.addEventListener?t.addEventListener("message",n,!1):t.attachEvent("onmessage",n),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():d&&"onreadystatechange"in d.createElement("script")?function(){var t=d.documentElement;s=function(e){var n=d.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),h.setImmediate=r,h.clearImmediate=i}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n("mFPK"),n("V0EG"))},Anv2:function(t,e,n){var r=n("gfI6"),i=n("Lv1y")(!1);r(r.S,"Object",{values:function(t){return i(t)}})},"B9+s":function(t,e,n){var r=n("GuN7"),i=n("+HiE"),o=n("d0hO");t.exports=function(t,e,n,a){var s=String(o(t)),u=s.length,l=void 0===n?" ":String(n),c=r(e);if(c<=u||""==l)return s;var d=c-u,h=i.call(l,Math.ceil(d/l.length));return h.length>d&&(h=h.slice(0,d)),a?h+s:s+h}},BEkf:function(t,e,n){var r=n("cegO"),i=r.navigator;t.exports=i&&i.userAgent||""},BFKx:function(t,e,n){n("eAo0")("Array")},BIFY:function(t,e,n){"use strict";n("f9UI")("fixed",function(t){return function(){return t(this,"tt","","")}})},BJD5:function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n("gvuQ");t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var a=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},BfnK:function(t,e){var n="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={Player:null,VideoElement:null,BitBuffer:null,Source:{},Demuxer:{},Decoder:{},Renderer:{},AudioOutput:{},Now:function(){return window.performance?window.performance.now()/1e3:Date.now()/1e3},CreateVideoElements:function(){for(var t=document.querySelectorAll(".eplayer"),e=0;e<t.length;e++)new r.VideoElement(t[e])},Fill:function(t,e){if(t.fill)t.fill(e);else for(var n=0;n<t.length;n++)t[n]=e}};"complete"===document.readyState?r.CreateVideoElements():document.addEventListener("DOMContentLoaded",r.CreateVideoElements),r.VideoElement=function(){"use strict";var t=function t(e){var n=e.dataset.url;if(!n)throw"VideoElement has no `data-url` attribute";var i=function(t,e){for(var n in e)t.style[n]=e[n]};this.container=e,i(this.container,{display:"inline-block",position:"relative",minWidth:"80px",minHeight:"80px"}),this.canvas=document.createElement("canvas"),this.canvas.width=960,this.canvas.height=540,i(this.canvas,{display:"block",width:"100%"}),this.container.appendChild(this.canvas),this.playButton=document.createElement("div"),this.playButton.innerHTML=t.PLAY_BUTTON,i(this.playButton,{zIndex:2,position:"absolute",top:"0",bottom:"0",left:"0",right:"0",maxWidth:"75px",maxHeight:"75px",margin:"auto",opacity:"0.7",cursor:"pointer"}),this.container.appendChild(this.playButton);var o={canvas:this.canvas};for(var a in e.dataset)try{o[a]=JSON.parse(e.dataset[a])}catch(t){o[a]=e.dataset[a]}if(this.player=new r.Player(n,o),e.playerInstance=this.player,!o.poster||o.autoplay||this.player.options.streaming||(o.decodeFirstFrame=!1,this.poster=new Image,this.poster.src=o.poster,this.poster.addEventListener("load",this.posterLoaded),i(this.poster,{display:"block",zIndex:1,position:"absolute",top:0,left:0,bottom:0,right:0}),this.container.appendChild(this.poster)),this.player.options.streaming||this.container.addEventListener("click",this.onClick.bind(this)),(o.autoplay||this.player.options.streaming)&&(this.playButton.style.display="none"),this.player.audioOut&&!this.player.audioOut.unlocked){var s=this.container;(o.autoplay||this.player.options.streaming)&&(this.unmuteButton=document.createElement("div"),this.unmuteButton.innerHTML=t.UNMUTE_BUTTON,i(this.unmuteButton,{zIndex:2,position:"absolute",bottom:"10px",right:"20px",width:"75px",height:"75px",margin:"auto",opacity:"0.7",cursor:"pointer"}),this.container.appendChild(this.unmuteButton),s=this.unmuteButton),this.unlockAudioBound=this.onUnlockAudio.bind(this,s),s.addEventListener("touchstart",this.unlockAudioBound,!1),s.addEventListener("click",this.unlockAudioBound,!0)}};return t.prototype.onUnlockAudio=function(t,e){this.unmuteButton&&(e.preventDefault(),e.stopPropagation()),this.player.audioOut.unlock(function(){this.unmuteButton&&(this.unmuteButton.style.display="none"),t.removeEventListener("touchstart",this.unlockAudioBound),t.removeEventListener("click",this.unlockAudioBound)}.bind(this))},t.prototype.onClick=function(t){this.player.isPlaying?(this.player.pause(),this.playButton.style.display="block"):(this.player.play(),this.playButton.style.display="none",this.poster&&(this.poster.style.display="none"))},t.PLAY_BUTTON='<svg style="max-width: 75px; max-height: 75px;" viewBox="0 0 200 200" alt="Play video"><circle cx="100" cy="100" r="90" fill="none" stroke-width="15" stroke="#fff"/><polygon points="70, 55 70, 145 145, 100" fill="#fff"/></svg>',t.UNMUTE_BUTTON='<svg style="max-width: 75px; max-height: 75px;" viewBox="0 0 75 75"><polygon class="audio-speaker" stroke="none" fill="#fff" points="39,13 22,28 6,28 6,47 21,47 39,62 39,13"/><g stroke="#fff" stroke-width="5"><path d="M 49,50 69,26"/><path d="M 69,50 49,26"/></g></svg>',t}(),r.Player=function(){"use strict";var t=function(t,e){this.options=e||{},e.source?(this.source=new e.source(t,e),e.streaming=!!this.source.streaming):t.match(/^wss?:\/\//)?(this.source=new r.Source.WebSocket(t,e),e.streaming=!0):!1!==e.progressive?(this.source=new r.Source.AjaxProgressive(t,e),e.streaming=!1):(this.source=new r.Source.Ajax(t,e),e.streaming=!1),this.maxAudioLag=e.maxAudioLag||.25,this.loop=!1!==e.loop,this.autoplay=!!e.autoplay||e.streaming,this.demuxer=new r.Demuxer.TS(e),this.source.connect(this.demuxer),!1!==e.video&&(this.video=new r.Decoder.MPEG1Video(e),this.renderer=!e.disableGl&&r.Renderer.WebGL.IsSupported()?new r.Renderer.WebGL(e):new r.Renderer.Canvas2D(e),this.demuxer.connect(r.Demuxer.TS.STREAM.VIDEO_1,this.video),this.video.connect(this.renderer)),!1!==e.audio&&r.AudioOutput.WebAudio.IsSupported()&&(this.audio=new r.Decoder.MP2Audio(e),this.audioOut=new r.AudioOutput.WebAudio(e),this.demuxer.connect(r.Demuxer.TS.STREAM.AUDIO_1,this.audio),this.audio.connect(this.audioOut)),Object.defineProperty(this,"currentTime",{get:this.getCurrentTime,set:this.setCurrentTime}),Object.defineProperty(this,"volume",{get:this.getVolume,set:this.setVolume}),this.unpauseOnShow=!1,!1!==e.pauseWhenHidden&&document.addEventListener("visibilitychange",this.showHide.bind(this)),this.source.start(),this.autoplay&&this.play()};return t.prototype.showHide=function(t){"hidden"===document.visibilityState?(this.unpauseOnShow=this.wantsToPlay,this.pause()):this.unpauseOnShow&&this.play()},t.prototype.play=function(t){this.animationId=requestAnimationFrame(this.update.bind(this)),this.wantsToPlay=!0},t.prototype.pause=function(t){cancelAnimationFrame(this.animationId),this.wantsToPlay=!1,this.isPlaying=!1,this.audio&&this.audio.canPlay&&(this.audioOut.stop(),this.seek(this.currentTime))},t.prototype.getVolume=function(){return this.audioOut?this.audioOut.volume:0},t.prototype.setVolume=function(t){this.audioOut&&(this.audioOut.volume=t)},t.prototype.stop=function(t){this.pause(),this.seek(0),this.video&&!1!==this.options.decodeFirstFrame&&this.video.decode()},t.prototype.destroy=function(){this.pause(),this.source.destroy(),this.renderer.destroy(),this.audioOut.destroy()},t.prototype.seek=function(t){var e=this.audio&&this.audio.canPlay?this.audio.startTime:this.video.startTime;this.video&&this.video.seek(t+e),this.audio&&this.audio.seek(t+e),this.startTime=r.Now()-t},t.prototype.getCurrentTime=function(){return this.audio&&this.audio.canPlay?this.audio.currentTime-this.audio.startTime:this.video.currentTime-this.video.startTime},t.prototype.setCurrentTime=function(t){this.seek(t)},t.prototype.update=function(){if(this.animationId=requestAnimationFrame(this.update.bind(this)),!this.source.established)return void(this.renderer&&this.renderer.renderProgress(this.source.progress));this.isPlaying||(this.isPlaying=!0,this.startTime=r.Now()-this.currentTime),this.options.streaming?this.updateForStreaming():this.updateForStaticFile()},t.prototype.updateForStreaming=function(){if(this.video&&this.video.decode(),this.audio){var t=!1;do{this.audioOut.enqueuedTime>this.maxAudioLag&&(this.audioOut.resetEnqueuedTime(),this.audioOut.enabled=!1),t=this.audio.decode()}while(t);this.audioOut.enabled=!0}},t.prototype.updateForStaticFile=function(){var t=!1,e=0;if(this.audio&&this.audio.canPlay){for(;!t&&this.audio.decodedTime-this.audio.currentTime<.25;)t=!this.audio.decode();this.video&&this.video.currentTime<this.audio.currentTime&&(t=!this.video.decode()),e=this.demuxer.currentTime-this.audio.currentTime}else if(this.video){var n=r.Now()-this.startTime+this.video.startTime,i=n-this.video.currentTime,o=1/this.video.frameRate;this.video&&i>0&&(i>2*o&&(this.startTime+=i),t=!this.video.decode()),e=this.demuxer.currentTime-n}this.source.resume(e),t&&this.source.completed&&(this.loop?this.seek(0):this.pause())},t}(),r.BitBuffer=function(){"use strict";var t=function t(e,r){"object"==(void 0===e?"undefined":n(e))?(this.bytes=e instanceof Uint8Array?e:new Uint8Array(e),this.byteLength=this.bytes.length):(this.bytes=new Uint8Array(e||1048576),this.byteLength=0),this.mode=r||t.MODE.EXPAND,this.index=0};return t.prototype.resize=function(t){var e=new Uint8Array(t);0!==this.byteLength&&(this.byteLength=Math.min(this.byteLength,t),e.set(this.bytes,0,this.byteLength)),this.bytes=e,this.index=Math.min(this.index,this.byteLength<<3)},t.prototype.evict=function(t){var e=this.index>>3,n=this.bytes.length-this.byteLength;if(this.index===this.byteLength<<3||t>n+e)return this.byteLength=0,void(this.index=0);0!==e&&(this.bytes.copyWithin?this.bytes.copyWithin(0,e,this.byteLength):this.bytes.set(this.bytes.subarray(e,this.byteLength)),this.byteLength=this.byteLength-e,this.index-=e<<3)},t.prototype.write=function(e){var r="object"==n(e[0]),i=0,o=this.bytes.length-this.byteLength;if(r)for(var i=0,a=0;a<e.length;a++)i+=e[a].byteLength;else i=e.byteLength;if(i>o)if(this.mode===t.MODE.EXPAND){var s=Math.max(2*this.bytes.length,i-o);this.resize(s)}else this.evict(i);if(r)for(var a=0;a<e.length;a++)this.appendSingleBuffer(e[a]);else this.appendSingleBuffer(e)},t.prototype.appendSingleBuffer=function(t){t=t instanceof Uint8Array?t:new Uint8Array(t),this.bytes.set(t,this.byteLength),this.byteLength+=t.length},t.prototype.findNextStartCode=function(){for(var t=this.index+7>>3;t<this.byteLength;t++)if(0==this.bytes[t]&&0==this.bytes[t+1]&&1==this.bytes[t+2])return this.index=t+4<<3,this.bytes[t+3];return this.index=this.byteLength<<3,-1},t.prototype.findStartCode=function(t){for(var e=0;;)if((e=this.findNextStartCode())===t||-1===e)return e;return-1},t.prototype.nextBytesAreStartCode=function(){var t=this.index+7>>3;return t>=this.byteLength||0==this.bytes[t]&&0==this.bytes[t+1]&&1==this.bytes[t+2]},t.prototype.peek=function(t){for(var e=this.index,n=0;t;){var r=this.bytes[e>>3],i=8-(7&e),o=i<t?i:t,a=i-o;n=n<<o|(r&255>>8-o<<a)>>a,e+=o,t-=o}return n},t.prototype.read=function(t){var e=this.peek(t);return this.index+=t,e},t.prototype.skip=function(t){return this.index+=t},t.prototype.rewind=function(t){this.index=Math.max(this.index-t,0)},t.prototype.has=function(t){return(this.byteLength<<3)-this.index>=t},t.MODE={EVICT:1,EXPAND:2},t}(),r.Source.Ajax=function(){"use strict";var t=function(t,e){this.url=t,this.destination=null,this.request=null,this.completed=!1,this.established=!1,this.progress=0};return t.prototype.connect=function(t){this.destination=t},t.prototype.start=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){this.request.readyState===this.request.DONE&&200===this.request.status&&this.onLoad(this.request.response)}.bind(this),this.request.onprogress=this.onProgress.bind(this),this.request.open("GET",this.url),this.request.responseType="arraybuffer",this.request.send()},t.prototype.resume=function(t){},t.prototype.destroy=function(){this.request.abort()},t.prototype.onProgress=function(t){this.progress=t.loaded/t.total},t.prototype.onLoad=function(t){this.established=!0,this.completed=!0,this.progress=1,this.destination&&this.destination.write(t)},t}(),r.Source.AjaxProgressive=function(){"use strict";var t=function(t,e){this.url=t,this.destination=null,this.request=null,this.completed=!1,this.established=!1,this.progress=0,this.fileSize=0,this.loadedSize=0,this.chunkSize=e.chunkSize||1048576,this.isLoading=!1,this.loadStartTime=0,this.throttled=!1!==e.throttled,this.aborted=!1};return t.prototype.connect=function(t){this.destination=t},t.prototype.start=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){this.request.readyState===this.request.DONE&&(this.fileSize=parseInt(this.request.getResponseHeader("Content-Length")),this.loadNextChunk())}.bind(this),this.request.onprogress=this.onProgress.bind(this),this.request.open("HEAD",this.url),this.request.send()},t.prototype.resume=function(t){!this.isLoading&&this.throttled&&8*this.loadTime+2>t&&this.loadNextChunk()},t.prototype.destroy=function(){this.request.abort(),this.aborted=!0},t.prototype.loadNextChunk=function(){var t=this.loadedSize,e=Math.min(this.loadedSize+this.chunkSize-1,this.fileSize-1);if(t>=this.fileSize||this.aborted)return void(this.completed=!0);this.isLoading=!0,this.loadStartTime=r.Now(),this.request=new XMLHttpRequest,this.request.onreadystatechange=function(){this.request.readyState===this.request.DONE&&this.request.status>=200&&this.request.status<300?this.onChunkLoad(this.request.response):this.request.readyState===this.request.DONE&&this.loadFails++<3&&this.loadNextChunk()}.bind(this),0===t&&(this.request.onprogress=this.onProgress.bind(this)),this.request.open("GET",this.url+"?"+t+"-"+e),this.request.setRequestHeader("Range","bytes="+t+"-"+e),this.request.responseType="arraybuffer",this.request.send()},t.prototype.onProgress=function(t){this.progress=t.loaded/t.total},t.prototype.onChunkLoad=function(t){this.established=!0,this.progress=1,this.loadedSize+=t.byteLength,this.loadFails=0,this.isLoading=!1,this.destination&&this.destination.write(t),this.loadTime=r.Now()-this.loadStartTime,this.throttled||this.loadNextChunk()},t}(),r.Source.WebSocket=function(){"use strict";var t=function(t,e){this.url=t,this.options=e,this.socket=null,this.callbacks={connect:[],data:[]},this.destination=null,this.reconnectInterval=void 0!==e.reconnectInterval?e.reconnectInterval:5,this.shouldAttemptReconnect=!!this.reconnectInterval,this.completed=!1,this.established=!1,this.progress=0,this.reconnectTimeoutId=0};return t.prototype.connect=function(t){this.destination=t},t.prototype.destroy=function(){clearTimeout(this.reconnectTimeoutId),this.shouldAttemptReconnect=!1,this.socket.close()},t.prototype.start=function(){this.shouldAttemptReconnect=!!this.reconnectInterval,this.progress=0,this.established=!1,this.socket=new WebSocket(this.url,this.options.protocols||null),this.socket.binaryType="arraybuffer",this.socket.onmessage=this.onMessage.bind(this),this.socket.onopen=this.onOpen.bind(this),this.socket.onerror=this.onClose.bind(this),this.socket.onclose=this.onClose.bind(this)},t.prototype.resume=function(t){},t.prototype.onOpen=function(){this.progress=1,this.established=!0},t.prototype.onClose=function(){this.shouldAttemptReconnect&&(clearTimeout(this.reconnectTimeoutId),this.reconnectTimeoutId=setTimeout(function(){this.start()}.bind(this),1e3*this.reconnectInterval))},t.prototype.onMessage=function(t){this.destination&&this.destination.write(t.data)},t}(),r.Demuxer.TS=function(){"use strict";var t=function(t){this.bits=null,this.leftoverBytes=null,this.guessVideoFrameEnd=!0,this.pidsToStreamIds={},this.pesPacketInfo={},this.startTime=0,this.currentTime=0};return t.prototype.connect=function(t,e){this.pesPacketInfo[t]={destination:e,currentLength:0,totalLength:0,pts:0,buffers:[]}},t.prototype.write=function(t){if(this.leftoverBytes){var e=t.byteLength+this.leftoverBytes.byteLength;this.bits=new r.BitBuffer(e),this.bits.write([this.leftoverBytes,t])}else this.bits=new r.BitBuffer(t);for(;this.bits.has(1504)&&this.parsePacket(););var n=this.bits.byteLength-(this.bits.index>>3);this.leftoverBytes=n>0?this.bits.bytes.subarray(this.bits.index>>3):null},t.prototype.parsePacket=function(){if(71!==this.bits.read(8)&&!this.resync())return!1;var t=187+(this.bits.index>>3),e=(this.bits.read(1),this.bits.read(1)),n=(this.bits.read(1),this.bits.read(13)),r=(this.bits.read(2),this.bits.read(2)),i=(this.bits.read(4),this.pidsToStreamIds[n]);if(e&&i){var o=this.pesPacketInfo[i];o&&o.currentLength&&this.packetComplete(o)}if(1&r){if(2&r){var a=this.bits.read(8);this.bits.skip(a<<3)}if(e&&this.bits.nextBytesAreStartCode()){this.bits.skip(24),i=this.bits.read(8),this.pidsToStreamIds[n]=i;var s=this.bits.read(16);this.bits.skip(8);var u=this.bits.read(2);this.bits.skip(6);var l=this.bits.read(8),c=this.bits.index+(l<<3),o=this.pesPacketInfo[i];if(o){var d=0;if(2&u){this.bits.skip(4);var h=this.bits.read(3);this.bits.skip(1);var f=this.bits.read(15);this.bits.skip(1);var p=this.bits.read(15);this.bits.skip(1),d=(1073741824*h+32768*f+p)/9e4,this.currentTime=d,-1===this.startTime&&(this.startTime=d)}var v=s?s-l-3:0;this.packetStart(o,d,v)}this.bits.index=c}if(i){var o=this.pesPacketInfo[i];if(o){var m=this.bits.index>>3,g=this.packetAddData(o,m,t),y=!e&&2&r;(g||this.guessVideoFrameEnd&&y)&&this.packetComplete(o)}}}return this.bits.index=t<<3,!0},t.prototype.resync=function(){if(!this.bits.has(9024))return!1;for(var t=this.bits.index>>3,e=0;e<187;e++)if(71===this.bits.bytes[t+e]){for(var n=!0,r=1;r<5;r++)if(71!==this.bits.bytes[t+e+188*r]){n=!1;break}if(n)return this.bits.index=t+e+1<<3,!0}return console.warn("EPlayer: Possible garbage data. Skipping."),this.bits.skip(1496),!1},t.prototype.packetStart=function(t,e,n){t.totalLength=n,t.currentLength=0,t.pts=e},t.prototype.packetAddData=function(t,e,n){return t.buffers.push(this.bits.bytes.subarray(e,n)),t.currentLength+=n-e,0!==t.totalLength&&t.currentLength>=t.totalLength},t.prototype.packetComplete=function(t){t.destination.write(t.pts,t.buffers),t.totalLength=0,t.currentLength=0,t.buffers=[]},t.STREAM={PACK_HEADER:186,SYSTEM_HEADER:187,PROGRAM_MAP:188,PRIVATE_1:189,PADDING:190,PRIVATE_2:191,AUDIO_1:192,VIDEO_1:224,DIRECTORY:255},t}(),r.Decoder.Base=function(){"use strict";var t=function(t){this.destination=null,this.canPlay=!1,this.collectTimestamps=!t.streaming,this.timestamps=[],this.timestampIndex=0,this.startTime=0,this.decodedTime=0,Object.defineProperty(this,"currentTime",{get:this.getCurrentTime})};return t.prototype.connect=function(t){this.destination=t},t.prototype.write=function(t,e){this.collectTimestamps&&(0===this.timestamps.length&&(this.startTime=t,this.decodedTime=t),this.timestamps.push({index:this.bits.byteLength<<3,time:t})),this.bits.write(e),this.canPlay=!0},t.prototype.seek=function(t){if(this.collectTimestamps){this.timestampIndex=0;for(var e=0;e<this.timestamps.length&&!(this.timestamps[e].time>t);e++)this.timestampIndex=e;var n=this.timestamps[this.timestampIndex];n?(this.bits.index=n.index,this.decodedTime=n.time):(this.bits.index=0,this.decodedTime=this.startTime)}},t.prototype.decode=function(){this.advanceDecodedTime(0)},t.prototype.advanceDecodedTime=function(t){if(this.collectTimestamps){for(var e=-1,n=this.timestampIndex;n<this.timestamps.length&&!(this.timestamps[n].index>this.bits.index);n++)e=n;if(-1!==e&&e!==this.timestampIndex)return this.timestampIndex=e,void(this.decodedTime=this.timestamps[this.timestampIndex].time)}this.decodedTime+=t},t.prototype.getCurrentTime=function(){return this.decodedTime},t}(),r.Decoder.MPEG1Video=function(){"use strict";var t=function(t){r.Decoder.Base.call(this,t);var e=t.videoBufferSize||524288,n=t.streaming?r.BitBuffer.MODE.EVICT:r.BitBuffer.MODE.EXPAND;this.bits=new r.BitBuffer(e,n),this.customIntraQuantMatrix=new Uint8Array(64),this.customNonIntraQuantMatrix=new Uint8Array(64),this.blockData=new Int32Array(64),this.currentFrame=0,this.decodeFirstFrame=!1!==t.decodeFirstFrame};return t.prototype=Object.create(r.Decoder.Base.prototype),t.prototype.constructor=t,t.prototype.write=function(e,n){if(r.Decoder.Base.prototype.write.call(this,e,n),!this.hasSequenceHeader){if(-1===this.bits.findStartCode(t.START.SEQUENCE))return!1;this.decodeSequenceHeader(),this.decodeFirstFrame&&this.decode()}},t.prototype.decode=function(){return!!this.hasSequenceHeader&&(-1===this.bits.findStartCode(t.START.PICTURE)?(this.bits.byteLength,this.bits.index,!1):(this.decodePicture(),this.advanceDecodedTime(1/this.frameRate),!0))},t.prototype.readHuffman=function(t){var e=0;do{e=t[e+this.bits.read(1)]}while(e>=0&&0!==t[e]);return t[e+2]},t.prototype.frameRate=30,t.prototype.decodeSequenceHeader=function(){var e=this.bits.read(12),n=this.bits.read(12);if(this.bits.skip(4),this.frameRate=t.PICTURE_RATE[this.bits.read(4)],this.bits.skip(30),e===this.width&&n===this.height||(this.width=e,this.height=n,this.initBuffers(),this.destination&&this.destination.resize(e,n)),this.bits.read(1)){for(var r=0;r<64;r++)this.customIntraQuantMatrix[t.ZIG_ZAG[r]]=this.bits.read(8);this.intraQuantMatrix=this.customIntraQuantMatrix}if(this.bits.read(1)){for(var r=0;r<64;r++){var i=t.ZIG_ZAG[r];this.customNonIntraQuantMatrix[i]=this.bits.read(8)}this.nonIntraQuantMatrix=this.customNonIntraQuantMatrix}this.hasSequenceHeader=!0},t.prototype.initBuffers=function(){this.intraQuantMatrix=t.DEFAULT_INTRA_QUANT_MATRIX,this.nonIntraQuantMatrix=t.DEFAULT_NON_INTRA_QUANT_MATRIX,this.mbWidth=this.width+15>>4,this.mbHeight=this.height+15>>4,this.mbSize=this.mbWidth*this.mbHeight,this.codedWidth=this.mbWidth<<4,this.codedHeight=this.mbHeight<<4,this.codedSize=this.codedWidth*this.codedHeight,this.halfWidth=this.mbWidth<<3,this.halfHeight=this.mbHeight<<3,this.currentY=new Uint8ClampedArray(this.codedSize),this.currentY32=new Uint32Array(this.currentY.buffer),this.currentCr=new Uint8ClampedArray(this.codedSize>>2),this.currentCr32=new Uint32Array(this.currentCr.buffer),this.currentCb=new Uint8ClampedArray(this.codedSize>>2),this.currentCb32=new Uint32Array(this.currentCb.buffer),this.forwardY=new Uint8ClampedArray(this.codedSize),this.forwardY32=new Uint32Array(this.forwardY.buffer),this.forwardCr=new Uint8ClampedArray(this.codedSize>>2),this.forwardCr32=new Uint32Array(this.forwardCr.buffer),this.forwardCb=new Uint8ClampedArray(this.codedSize>>2),this.forwardCb32=new Uint32Array(this.forwardCb.buffer)},t.prototype.currentY=null,t.prototype.currentCr=null,t.prototype.currentCb=null,t.prototype.pictureType=0,t.prototype.forwardY=null,t.prototype.forwardCr=null,t.prototype.forwardCb=null,t.prototype.fullPelForward=!1,t.prototype.forwardFCode=0,t.prototype.forwardRSize=0,t.prototype.forwardF=0,t.prototype.decodePicture=function(e){if(this.currentFrame++,this.bits.skip(10),this.pictureType=this.bits.read(3),this.bits.skip(16),!(this.pictureType<=0||this.pictureType>=t.PICTURE_TYPE.B)){if(this.pictureType===t.PICTURE_TYPE.PREDICTIVE){if(this.fullPelForward=this.bits.read(1),this.forwardFCode=this.bits.read(3),0===this.forwardFCode)return;this.forwardRSize=this.forwardFCode-1,this.forwardF=1<<this.forwardRSize}var n=0;do{n=this.bits.findNextStartCode()}while(n===t.START.EXTENSION||n===t.START.USER_DATA);for(;n>=t.START.SLICE_FIRST&&n<=t.START.SLICE_LAST;)this.decodeSlice(255&n),n=this.bits.findNextStartCode();if(-1!==n&&this.bits.rewind(32),this.destination&&this.destination.render(this.currentY,this.currentCr,this.currentCb),this.pictureType===t.PICTURE_TYPE.INTRA||this.pictureType===t.PICTURE_TYPE.PREDICTIVE){var r=this.forwardY,i=this.forwardY32,o=this.forwardCr,a=this.forwardCr32,s=this.forwardCb,u=this.forwardCb32;this.forwardY=this.currentY,this.forwardY32=this.currentY32,this.forwardCr=this.currentCr,this.forwardCr32=this.currentCr32,this.forwardCb=this.currentCb,this.forwardCb32=this.currentCb32,this.currentY=r,this.currentY32=i,this.currentCr=o,this.currentCr32=a,this.currentCb=s,this.currentCb32=u}}},t.prototype.quantizerScale=0,t.prototype.sliceBegin=!1,t.prototype.decodeSlice=function(t){for(this.sliceBegin=!0,this.macroblockAddress=(t-1)*this.mbWidth-1,this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0,this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.quantizerScale=this.bits.read(5);this.bits.read(1);)this.bits.skip(8);do{this.decodeMacroblock()}while(!this.bits.nextBytesAreStartCode())},t.prototype.macroblockAddress=0,t.prototype.mbRow=0,t.prototype.mbCol=0,t.prototype.macroblockType=0,t.prototype.macroblockIntra=!1,t.prototype.macroblockMotFw=!1,t.prototype.motionFwH=0,t.prototype.motionFwV=0,t.prototype.motionFwHPrev=0,t.prototype.motionFwVPrev=0,t.prototype.decodeMacroblock=function(){for(var e=0,n=this.readHuffman(t.MACROBLOCK_ADDRESS_INCREMENT);34===n;)n=this.readHuffman(t.MACROBLOCK_ADDRESS_INCREMENT);for(;35===n;)e+=33,n=this.readHuffman(t.MACROBLOCK_ADDRESS_INCREMENT);if(e+=n,this.sliceBegin)this.sliceBegin=!1,this.macroblockAddress+=e;else{if(this.macroblockAddress+e>=this.mbSize)return;for(e>1&&(this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.pictureType===t.PICTURE_TYPE.PREDICTIVE&&(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0));e>1;)this.macroblockAddress++,this.mbRow=this.macroblockAddress/this.mbWidth|0,this.mbCol=this.macroblockAddress%this.mbWidth,this.copyMacroblock(this.motionFwH,this.motionFwV,this.forwardY,this.forwardCr,this.forwardCb),e--;this.macroblockAddress++}this.mbRow=this.macroblockAddress/this.mbWidth|0,this.mbCol=this.macroblockAddress%this.mbWidth;var r=t.MACROBLOCK_TYPE[this.pictureType];this.macroblockType=this.readHuffman(r),this.macroblockIntra=1&this.macroblockType,this.macroblockMotFw=8&this.macroblockType,0!=(16&this.macroblockType)&&(this.quantizerScale=this.bits.read(5)),this.macroblockIntra?(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0):(this.dcPredictorY=128,this.dcPredictorCr=128,this.dcPredictorCb=128,this.decodeMotionVectors(),this.copyMacroblock(this.motionFwH,this.motionFwV,this.forwardY,this.forwardCr,this.forwardCb));for(var i=0!=(2&this.macroblockType)?this.readHuffman(t.CODE_BLOCK_PATTERN):this.macroblockIntra?63:0,o=0,a=32;o<6;o++)0!=(i&a)&&this.decodeBlock(o),a>>=1},t.prototype.decodeMotionVectors=function(){var e,n,r=0;this.macroblockMotFw?(e=this.readHuffman(t.MOTION),0!==e&&1!==this.forwardF?(r=this.bits.read(this.forwardRSize),n=(Math.abs(e)-1<<this.forwardRSize)+r+1,e<0&&(n=-n)):n=e,this.motionFwHPrev+=n,this.motionFwHPrev>(this.forwardF<<4)-1?this.motionFwHPrev-=this.forwardF<<5:this.motionFwHPrev<-this.forwardF<<4&&(this.motionFwHPrev+=this.forwardF<<5),this.motionFwH=this.motionFwHPrev,this.fullPelForward&&(this.motionFwH<<=1),e=this.readHuffman(t.MOTION),0!==e&&1!==this.forwardF?(r=this.bits.read(this.forwardRSize),n=(Math.abs(e)-1<<this.forwardRSize)+r+1,e<0&&(n=-n)):n=e,this.motionFwVPrev+=n,this.motionFwVPrev>(this.forwardF<<4)-1?this.motionFwVPrev-=this.forwardF<<5:this.motionFwVPrev<-this.forwardF<<4&&(this.motionFwVPrev+=this.forwardF<<5),this.motionFwV=this.motionFwVPrev,this.fullPelForward&&(this.motionFwV<<=1)):this.pictureType===t.PICTURE_TYPE.PREDICTIVE&&(this.motionFwH=this.motionFwHPrev=0,this.motionFwV=this.motionFwVPrev=0)},t.prototype.copyMacroblock=function(t,e,n,r,i){var o,a,s,u,l,c,d,h,f,p=this.currentY32,v=this.currentCb32,m=this.currentCr32;o=this.codedWidth,a=o-16,s=t>>1,u=e>>1,l=1==(1&t),c=1==(1&e),d=((this.mbRow<<4)+u)*o+(this.mbCol<<4)+s,h=this.mbRow*o+this.mbCol<<2,f=h+(o<<2);var g,y,A,_;if(l)if(c)for(;h<f;){for(y=n[d]+n[d+o],d++,g=0;g<4;g++)A=n[d]+n[d+o],d++,_=y+A+2>>2&255,y=n[d]+n[d+o],d++,_|=y+A+2<<6&65280,A=n[d]+n[d+o],d++,_|=y+A+2<<14&16711680,y=n[d]+n[d+o],d++,_|=y+A+2<<22&4278190080,p[h++]=_;h+=a>>2,d+=a-1}else for(;h<f;){for(y=n[d++],g=0;g<4;g++)A=n[d++],_=y+A+1>>1&255,y=n[d++],_|=y+A+1<<7&65280,A=n[d++],_|=y+A+1<<15&16711680,y=n[d++],_|=y+A+1<<23&4278190080,p[h++]=_;h+=a>>2,d+=a-1}else if(c)for(;h<f;){for(g=0;g<4;g++)_=n[d]+n[d+o]+1>>1&255,d++,_|=n[d]+n[d+o]+1<<7&65280,d++,_|=n[d]+n[d+o]+1<<15&16711680,d++,_|=n[d]+n[d+o]+1<<23&4278190080,d++,p[h++]=_;h+=a>>2,d+=a}else for(;h<f;){for(g=0;g<4;g++)_=n[d],d++,_|=n[d]<<8,d++,_|=n[d]<<16,d++,_|=n[d]<<24,d++,p[h++]=_;h+=a>>2,d+=a}o=this.halfWidth,a=o-8,s=t/2>>1,u=e/2>>1,l=1==(t/2&1),c=1==(e/2&1),d=((this.mbRow<<3)+u)*o+(this.mbCol<<3)+s,h=this.mbRow*o+this.mbCol<<1,f=h+(o<<1);var b,T,S,E,w,k;if(l)if(c)for(;h<f;){for(b=r[d]+r[d+o],E=i[d]+i[d+o],d++,g=0;g<2;g++)T=r[d]+r[d+o],w=i[d]+i[d+o],d++,S=b+T+2>>2&255,k=E+w+2>>2&255,b=r[d]+r[d+o],E=i[d]+i[d+o],d++,S|=b+T+2<<6&65280,k|=E+w+2<<6&65280,T=r[d]+r[d+o],w=i[d]+i[d+o],d++,S|=b+T+2<<14&16711680,k|=E+w+2<<14&16711680,b=r[d]+r[d+o],E=i[d]+i[d+o],d++,S|=b+T+2<<22&4278190080,k|=E+w+2<<22&4278190080,m[h]=S,v[h]=k,h++;h+=a>>2,d+=a-1}else for(;h<f;){for(b=r[d],E=i[d],d++,g=0;g<2;g++)T=r[d],w=i[d++],S=b+T+1>>1&255,k=E+w+1>>1&255,b=r[d],E=i[d++],S|=b+T+1<<7&65280,k|=E+w+1<<7&65280,T=r[d],w=i[d++],S|=b+T+1<<15&16711680,k|=E+w+1<<15&16711680,b=r[d],E=i[d++],S|=b+T+1<<23&4278190080,k|=E+w+1<<23&4278190080,m[h]=S,v[h]=k,h++;h+=a>>2,d+=a-1}else if(c)for(;h<f;){for(g=0;g<2;g++)S=r[d]+r[d+o]+1>>1&255,k=i[d]+i[d+o]+1>>1&255,d++,S|=r[d]+r[d+o]+1<<7&65280,k|=i[d]+i[d+o]+1<<7&65280,d++,S|=r[d]+r[d+o]+1<<15&16711680,k|=i[d]+i[d+o]+1<<15&16711680,d++,S|=r[d]+r[d+o]+1<<23&4278190080,k|=i[d]+i[d+o]+1<<23&4278190080,d++,m[h]=S,v[h]=k,h++;h+=a>>2,d+=a}else for(;h<f;){for(g=0;g<2;g++)S=r[d],k=i[d],d++,S|=r[d]<<8,k|=i[d]<<8,d++,S|=r[d]<<16,k|=i[d]<<16,d++,S|=r[d]<<24,k|=i[d]<<24,d++,m[h]=S,v[h]=k,h++;h+=a>>2,d+=a}},t.prototype.dcPredictorY=0,t.prototype.dcPredictorCr=0,t.prototype.dcPredictorCb=0,t.prototype.blockData=null,t.prototype.decodeBlock=function(e){var n,i=0;if(this.macroblockIntra){var o,a;if(e<4?(o=this.dcPredictorY,a=this.readHuffman(t.DCT_DC_SIZE_LUMINANCE)):(o=4===e?this.dcPredictorCr:this.dcPredictorCb,a=this.readHuffman(t.DCT_DC_SIZE_CHROMINANCE)),a>0){var s=this.bits.read(a);this.blockData[0]=0!=(s&1<<a-1)?o+s:o+(-1<<a|s+1)}else this.blockData[0]=o;e<4?this.dcPredictorY=this.blockData[0]:4===e?this.dcPredictorCr=this.blockData[0]:this.dcPredictorCb=this.blockData[0],this.blockData[0]<<=8,n=this.intraQuantMatrix,i=1}else n=this.nonIntraQuantMatrix;for(var u=0;;){var l=0,c=this.readHuffman(t.DCT_COEFF);if(1===c&&i>0&&0===this.bits.read(1))break;65535===c?(l=this.bits.read(6),u=this.bits.read(8),0===u?u=this.bits.read(8):128===u?u=this.bits.read(8)-256:u>128&&(u-=256)):(l=c>>8,u=255&c,this.bits.read(1)&&(u=-u)),i+=l;var d=t.ZIG_ZAG[i];i++,u<<=1,this.macroblockIntra||(u+=u<0?-1:1),u=u*this.quantizerScale*n[d]>>4,0==(1&u)&&(u-=u>0?1:-1),u>2047?u=2047:u<-2048&&(u=-2048),this.blockData[d]=u*t.PREMULTIPLIER_MATRIX[d]}var h,f,p;e<4?(h=this.currentY,p=this.codedWidth-8,f=this.mbRow*this.codedWidth+this.mbCol<<4,0!=(1&e)&&(f+=8),0!=(2&e)&&(f+=this.codedWidth<<3)):(h=4===e?this.currentCb:this.currentCr,p=(this.codedWidth>>1)-8,f=(this.mbRow*this.codedWidth<<2)+(this.mbCol<<3)),this.macroblockIntra?1===i?(t.CopyValueToDestination(this.blockData[0]+128>>8,h,f,p),this.blockData[0]=0):(t.IDCT(this.blockData),t.CopyBlockToDestination(this.blockData,h,f,p),r.Fill(this.blockData,0)):1===i?(t.AddValueToDestination(this.blockData[0]+128>>8,h,f,p),this.blockData[0]=0):(t.IDCT(this.blockData),t.AddBlockToDestination(this.blockData,h,f,p),r.Fill(this.blockData,0)),i=0},t.CopyBlockToDestination=function(t,e,n,r){for(var i=0;i<64;i+=8,n+=r+8)e[n+0]=t[i+0],e[n+1]=t[i+1],e[n+2]=t[i+2],e[n+3]=t[i+3],e[n+4]=t[i+4],e[n+5]=t[i+5],e[n+6]=t[i+6],e[n+7]=t[i+7]},t.AddBlockToDestination=function(t,e,n,r){for(var i=0;i<64;i+=8,n+=r+8)e[n+0]+=t[i+0],e[n+1]+=t[i+1],e[n+2]+=t[i+2],e[n+3]+=t[i+3],e[n+4]+=t[i+4],e[n+5]+=t[i+5],e[n+6]+=t[i+6],e[n+7]+=t[i+7]},t.CopyValueToDestination=function(t,e,n,r){for(var i=0;i<64;i+=8,n+=r+8)e[n+0]=t,e[n+1]=t,e[n+2]=t,e[n+3]=t,e[n+4]=t,e[n+5]=t,e[n+6]=t,e[n+7]=t},t.AddValueToDestination=function(t,e,n,r){for(var i=0;i<64;i+=8,n+=r+8)e[n+0]+=t,e[n+1]+=t,e[n+2]+=t,e[n+3]+=t,e[n+4]+=t,e[n+5]+=t,e[n+6]+=t,e[n+7]+=t},t.IDCT=function(t){for(var e,n,r,i,o,a,s,u,l,c,d,h,f,p,v,m,g,y,A=0;A<8;++A)e=t[32+A],n=t[16+A]+t[48+A],r=t[40+A]-t[24+A],a=t[8+A]+t[56+A],s=t[24+A]+t[40+A],i=t[8+A]-t[56+A],o=a+s,u=t[0+A],f=(473*i-196*r+128>>8)-o,l=f-(362*(a-s)+128>>8),c=u-e,d=(362*(t[16+A]-t[48+A])+128>>8)-n,h=u+e,p=c+d,v=h+n,m=c-d,g=h-n,y=-l-(473*r+196*i+128>>8),t[0+A]=o+v,t[8+A]=f+p,t[16+A]=m-l,t[24+A]=g-y,t[32+A]=g+y,t[40+A]=l+m,t[48+A]=p-f,t[56+A]=v-o;for(var A=0;A<64;A+=8)e=t[4+A],n=t[2+A]+t[6+A],r=t[5+A]-t[3+A],a=t[1+A]+t[7+A],s=t[3+A]+t[5+A],i=t[1+A]-t[7+A],o=a+s,u=t[0+A],f=(473*i-196*r+128>>8)-o,l=f-(362*(a-s)+128>>8),c=u-e,d=(362*(t[2+A]-t[6+A])+128>>8)-n,h=u+e,p=c+d,v=h+n,m=c-d,g=h-n,y=-l-(473*r+196*i+128>>8),t[0+A]=o+v+128>>8,t[1+A]=f+p+128>>8,t[2+A]=m-l+128>>8,t[3+A]=g-y+128>>8,t[4+A]=g+y+128>>8,t[5+A]=l+m+128>>8,t[6+A]=p-f+128>>8,t[7+A]=v-o+128>>8},t.PICTURE_RATE=[0,23.976,24,25,29.97,30,50,59.94,60,0,0,0,0,0,0,0],t.ZIG_ZAG=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t.DEFAULT_INTRA_QUANT_MATRIX=new Uint8Array([8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83]),t.DEFAULT_NON_INTRA_QUANT_MATRIX=new Uint8Array([16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16]),t.PREMULTIPLIER_MATRIX=new Uint8Array([32,44,42,38,32,25,17,9,44,62,58,52,44,35,24,12,42,58,55,49,42,33,23,12,38,52,49,44,38,30,20,10,32,44,42,38,32,25,17,9,25,35,33,30,25,20,14,7,17,24,23,20,17,14,9,5,9,12,12,10,9,7,5,2]),t.MACROBLOCK_ADDRESS_INCREMENT=new Int16Array([3,6,0,9,12,0,0,0,1,15,18,0,21,24,0,27,30,0,33,36,0,0,0,3,0,0,2,39,42,0,45,48,0,0,0,5,0,0,4,51,54,0,57,60,0,0,0,7,0,0,6,63,66,0,69,72,0,75,78,0,81,84,0,-1,87,0,-1,90,0,93,96,0,99,102,0,105,108,0,111,114,0,0,0,9,0,0,8,117,120,0,123,126,0,129,132,0,135,138,0,0,0,15,0,0,14,0,0,13,0,0,12,0,0,11,0,0,10,141,-1,0,-1,144,0,147,150,0,153,156,0,159,162,0,165,168,0,171,174,0,177,180,0,183,-1,0,-1,186,0,189,192,0,195,198,0,201,204,0,207,210,0,213,216,0,219,222,0,0,0,21,0,0,20,0,0,19,0,0,18,0,0,17,0,0,16,0,0,35,0,0,34,0,0,33,0,0,32,0,0,31,0,0,30,0,0,29,0,0,28,0,0,27,0,0,26,0,0,25,0,0,24,0,0,23,0,0,22]),t.MACROBLOCK_TYPE_INTRA=new Int8Array([3,6,0,-1,9,0,0,0,1,0,0,17]),t.MACROBLOCK_TYPE_PREDICTIVE=new Int8Array([3,6,0,9,12,0,0,0,10,15,18,0,0,0,2,21,24,0,0,0,8,27,30,0,33,36,0,-1,39,0,0,0,18,0,0,26,0,0,1,0,0,17]),t.MACROBLOCK_TYPE_B=new Int8Array([3,6,0,9,15,0,12,18,0,24,21,0,0,0,12,27,30,0,0,0,14,39,42,0,36,33,0,0,0,4,0,0,6,54,48,0,45,51,0,0,0,8,0,0,10,-1,57,0,0,0,1,60,63,0,0,0,30,0,0,17,0,0,22,0,0,26]),t.MACROBLOCK_TYPE=[null,t.MACROBLOCK_TYPE_INTRA,t.MACROBLOCK_TYPE_PREDICTIVE,t.MACROBLOCK_TYPE_B],t.CODE_BLOCK_PATTERN=new Int16Array([6,3,0,9,18,0,12,15,0,24,33,0,36,39,0,27,21,0,30,42,0,60,57,0,54,48,0,69,51,0,81,75,0,63,84,0,45,66,0,72,78,0,0,0,60,105,120,0,132,144,0,114,108,0,126,141,0,87,93,0,117,96,0,0,0,32,135,138,0,99,123,0,129,102,0,0,0,4,90,111,0,0,0,8,0,0,16,0,0,44,150,168,0,0,0,28,0,0,52,0,0,62,183,177,0,156,180,0,0,0,1,165,162,0,0,0,61,0,0,56,171,174,0,0,0,2,0,0,40,153,186,0,0,0,48,192,189,0,147,159,0,0,0,20,0,0,12,240,249,0,0,0,63,231,225,0,195,219,0,252,198,0,0,0,24,0,0,36,0,0,3,207,261,0,243,237,0,204,213,0,210,234,0,201,228,0,216,222,0,258,255,0,264,246,0,-1,282,0,285,291,0,0,0,33,0,0,9,318,330,0,306,348,0,0,0,5,0,0,10,279,267,0,0,0,6,0,0,18,0,0,17,0,0,34,339,357,0,309,312,0,270,276,0,327,321,0,351,354,0,303,297,0,294,288,0,300,273,0,342,345,0,315,324,0,336,333,0,363,375,0,0,0,41,0,0,14,0,0,21,372,366,0,360,369,0,0,0,11,0,0,19,0,0,7,0,0,35,0,0,13,0,0,50,0,0,49,0,0,58,0,0,37,0,0,25,0,0,45,0,0,57,0,0,26,0,0,29,0,0,38,0,0,53,0,0,23,0,0,43,0,0,46,0,0,42,0,0,22,0,0,54,0,0,51,0,0,15,0,0,30,0,0,39,0,0,47,0,0,55,0,0,27,0,0,59,0,0,31]),t.MOTION=new Int16Array([3,6,0,12,9,0,0,0,0,18,15,0,24,21,0,0,0,-1,0,0,1,27,30,0,36,33,0,0,0,2,0,0,-2,42,45,0,48,39,0,60,54,0,0,0,3,0,0,-3,51,57,0,-1,69,0,81,75,0,78,63,0,72,66,0,96,84,0,87,93,0,-1,99,0,108,105,0,0,0,-4,90,102,0,0,0,4,0,0,-7,0,0,5,111,123,0,0,0,-5,0,0,7,114,120,0,126,117,0,0,0,-6,0,0,6,153,162,0,150,147,0,135,138,0,156,141,0,129,159,0,132,144,0,0,0,10,0,0,9,0,0,8,0,0,-8,171,198,0,0,0,-9,180,192,0,168,183,0,165,186,0,174,189,0,0,0,-10,177,195,0,0,0,12,0,0,16,0,0,13,0,0,14,0,0,11,0,0,15,0,0,-16,0,0,-12,0,0,-14,0,0,-15,0,0,-11,0,0,-13]),t.DCT_DC_SIZE_LUMINANCE=new Int8Array([6,3,0,18,15,0,9,12,0,0,0,1,0,0,2,27,24,0,21,30,0,0,0,0,36,33,0,0,0,4,0,0,3,39,42,0,0,0,5,0,0,6,48,45,0,51,-1,0,0,0,7,0,0,8]),t.DCT_DC_SIZE_CHROMINANCE=new Int8Array([6,3,0,12,9,0,18,15,0,24,21,0,0,0,2,0,0,1,0,0,0,30,27,0,0,0,3,36,33,0,0,0,4,42,39,0,0,0,5,48,45,0,0,0,6,51,-1,0,0,0,7,0,0,8]),t.DCT_COEFF=new Int32Array([3,6,0,12,9,0,0,0,1,21,24,0,18,15,0,39,27,0,33,30,0,42,36,0,0,0,257,60,66,0,54,63,0,48,57,0,0,0,513,51,45,0,0,0,2,0,0,3,81,75,0,87,93,0,72,78,0,96,90,0,0,0,1025,69,84,0,0,0,769,0,0,258,0,0,1793,0,0,65535,0,0,1537,111,108,0,0,0,1281,105,102,0,117,114,0,99,126,0,120,123,0,156,150,0,162,159,0,144,147,0,129,135,0,138,132,0,0,0,2049,0,0,4,0,0,514,0,0,2305,153,141,0,165,171,0,180,168,0,177,174,0,183,186,0,0,0,2561,0,0,3329,0,0,6,0,0,259,0,0,5,0,0,770,0,0,2817,0,0,3073,228,225,0,201,210,0,219,213,0,234,222,0,216,231,0,207,192,0,204,189,0,198,195,0,243,261,0,273,240,0,246,237,0,249,258,0,279,276,0,252,255,0,270,282,0,264,267,0,0,0,515,0,0,260,0,0,7,0,0,1026,0,0,1282,0,0,4097,0,0,3841,0,0,3585,315,321,0,333,342,0,312,291,0,375,357,0,288,294,0,-1,369,0,285,303,0,318,363,0,297,306,0,339,309,0,336,348,0,330,300,0,372,345,0,351,366,0,327,354,0,360,324,0,381,408,0,417,420,0,390,378,0,435,438,0,384,387,0,0,0,2050,396,402,0,465,462,0,0,0,8,411,399,0,429,432,0,453,414,0,426,423,0,0,0,10,0,0,9,0,0,11,0,0,5377,0,0,1538,0,0,771,0,0,5121,0,0,1794,0,0,4353,0,0,4609,0,0,4865,444,456,0,0,0,1027,459,450,0,0,0,261,393,405,0,0,0,516,447,441,0,516,519,0,486,474,0,510,483,0,504,498,0,471,537,0,507,501,0,522,513,0,534,531,0,468,477,0,492,495,0,549,546,0,525,528,0,0,0,263,0,0,2562,0,0,2306,0,0,5633,0,0,5889,0,0,6401,0,0,6145,0,0,1283,0,0,772,0,0,13,0,0,12,0,0,14,0,0,15,0,0,517,0,0,6657,0,0,262,540,543,0,480,489,0,588,597,0,0,0,27,609,555,0,606,603,0,0,0,19,0,0,22,591,621,0,0,0,18,573,576,0,564,570,0,0,0,20,552,582,0,0,0,21,558,579,0,0,0,23,612,594,0,0,0,25,0,0,24,600,615,0,0,0,31,0,0,30,0,0,28,0,0,29,0,0,26,0,0,17,0,0,16,567,618,0,561,585,0,654,633,0,0,0,37,645,648,0,0,0,36,630,636,0,0,0,34,639,627,0,663,666,0,657,624,0,651,642,0,669,660,0,0,0,35,0,0,267,0,0,40,0,0,268,0,0,266,0,0,32,0,0,264,0,0,265,0,0,38,0,0,269,0,0,270,0,0,33,0,0,39,0,0,7937,0,0,6913,0,0,7681,0,0,4098,0,0,7425,0,0,7169,0,0,271,0,0,274,0,0,273,0,0,272,0,0,1539,0,0,2818,0,0,3586,0,0,3330,0,0,3074,0,0,3842]),t.PICTURE_TYPE={INTRA:1,PREDICTIVE:2,B:3},t.START={SEQUENCE:179,SLICE_FIRST:1,SLICE_LAST:175,PICTURE:0,EXTENSION:181,USER_DATA:178},t}(),r.Decoder.MP2Audio=function(){"use strict";var t=function t(e){r.Decoder.Base.call(this,e);var n=e.audioBufferSize||131072,i=e.streaming?r.BitBuffer.MODE.EVICT:r.BitBuffer.MODE.EXPAND;this.bits=new r.BitBuffer(n,i),this.left=new Float32Array(1152),this.right=new Float32Array(1152),this.sampleRate=44100,this.D=new Float32Array(1024),this.D.set(t.SYNTHESIS_WINDOW,0),this.D.set(t.SYNTHESIS_WINDOW,512),this.V=new Float32Array(1024),this.U=new Int32Array(32),this.VPos=0,this.allocation=[new Array(32),new Array(32)],this.scaleFactorInfo=[new Uint8Array(32),new Uint8Array(32)],this.scaleFactor=[new Array(32),new Array(32)],this.sample=[new Array(32),new Array(32)];for(var o=0;o<2;o++)for(var a=0;a<32;a++)this.scaleFactor[o][a]=[0,0,0],this.sample[o][a]=[0,0,0]};return t.prototype=Object.create(r.Decoder.Base.prototype),t.prototype.constructor=t,t.prototype.decode=function(){var t=this.bits.index>>3;if(t>=this.bits.byteLength)return!1;var e=this.decodeFrame(this.left,this.right);return this.bits.index=t+e<<3,!!e&&(this.destination&&this.destination.play(this.sampleRate,this.left,this.right),this.advanceDecodedTime(this.left.length/this.sampleRate),!0)},t.prototype.getCurrentTime=function(){var t=this.destination?this.destination.enqueuedTime:0;return this.decodedTime-t},t.prototype.decodeFrame=function(e,n){var i=this.bits.read(11),o=this.bits.read(2),a=this.bits.read(2),s=!this.bits.read(1);if(i!==t.FRAME_SYNC||o!==t.VERSION.MPEG_1||a!==t.LAYER.II)return 0;var u=this.bits.read(4)-1;if(u>13)return 0;var l=this.bits.read(2),c=t.SAMPLE_RATE[l];if(3===l)return 0;o===t.VERSION.MPEG_2&&(l+=4,u+=14);var d=this.bits.read(1),h=(this.bits.read(1),this.bits.read(2)),f=0;h===t.MODE.JOINT_STEREO?f=this.bits.read(2)+1<<2:(this.bits.skip(2),f=h===t.MODE.MONO?0:32),this.bits.skip(4),s&&this.bits.skip(16);var p=t.BIT_RATE[u],c=t.SAMPLE_RATE[l],v=144e3*p/c+d|0,m=0,g=0;if(o===t.VERSION.MPEG_2)m=2,g=30;else{var y=h===t.MODE.MONO?0:1,A=t.QUANT_LUT_STEP_1[y][u];m=t.QUANT_LUT_STEP_2[A][l],g=63&m,m>>=6}f>g&&(f=g);for(var _=0;_<f;_++)this.allocation[0][_]=this.readAllocation(_,m),this.allocation[1][_]=this.readAllocation(_,m);for(var _=f;_<g;_++)this.allocation[0][_]=this.allocation[1][_]=this.readAllocation(_,m);for(var b=h===t.MODE.MONO?1:2,_=0;_<g;_++){for(T=0;T<b;T++)this.allocation[T][_]&&(this.scaleFactorInfo[T][_]=this.bits.read(2));h===t.MODE.MONO&&(this.scaleFactorInfo[1][_]=this.scaleFactorInfo[0][_])}for(var _=0;_<g;_++){for(var T=0;T<b;T++)if(this.allocation[T][_]){var S=this.scaleFactor[T][_];switch(this.scaleFactorInfo[T][_]){case 0:S[0]=this.bits.read(6),S[1]=this.bits.read(6),S[2]=this.bits.read(6);break;case 1:S[0]=S[1]=this.bits.read(6),S[2]=this.bits.read(6);break;case 2:S[0]=S[1]=S[2]=this.bits.read(6);break;case 3:S[0]=this.bits.read(6),S[1]=S[2]=this.bits.read(6)}}h===t.MODE.MONO&&(this.scaleFactor[1][_][0]=this.scaleFactor[0][_][0],this.scaleFactor[1][_][1]=this.scaleFactor[0][_][1],this.scaleFactor[1][_][2]=this.scaleFactor[0][_][2])}for(var E=0,w=0;w<3;w++)for(var k=0;k<4;k++){for(var _=0;_<f;_++)this.readSamples(0,_,w),this.readSamples(1,_,w);for(var _=f;_<g;_++)this.readSamples(0,_,w),this.sample[1][_][0]=this.sample[0][_][0],this.sample[1][_][1]=this.sample[0][_][1],this.sample[1][_][2]=this.sample[0][_][2];for(var _=g;_<32;_++)this.sample[0][_][0]=0,this.sample[0][_][1]=0,this.sample[0][_][2]=0,this.sample[1][_][0]=0,this.sample[1][_][1]=0,this.sample[1][_][2]=0;for(var C=0;C<3;C++){this.VPos=this.VPos-64&1023;for(var T=0;T<2;T++){t.MatrixTransform(this.sample[T],C,this.V,this.VPos),r.Fill(this.U,0);for(var L=512-(this.VPos>>1),I=this.VPos%128>>1;I<1024;){for(var x=0;x<32;++x)this.U[x]+=this.D[L++]*this.V[I++];I+=96,L+=32}for(I=1120-I,L-=480;I<1024;){for(var x=0;x<32;++x)this.U[x]+=this.D[L++]*this.V[I++];I+=96,L+=32}for(var R=0===T?e:n,O=0;O<32;O++)R[E+O]=this.U[O]/2147418112}E+=32}}return this.sampleRate=c,v},t.prototype.readAllocation=function(e,n){var r=t.QUANT_LUT_STEP_3[n][e],i=t.QUANT_LUT_STEP4[15&r][this.bits.read(r>>4)];return i?t.QUANT_TAB[i-1]:0},t.prototype.readSamples=function(e,n,r){var i=this.allocation[e][n],o=this.scaleFactor[e][n][r],a=this.sample[e][n],s=0;if(!i)return void(a[0]=a[1]=a[2]=0);if(63===o)o=0;else{var u=o/3|0;o=t.SCALEFACTOR_BASE[o%3]+(1<<u>>1)>>u}var l=i.levels;i.group?(s=this.bits.read(i.bits),a[0]=s%l,s=s/l|0,a[1]=s%l,a[2]=s/l|0):(a[0]=this.bits.read(i.bits),a[1]=this.bits.read(i.bits),a[2]=this.bits.read(i.bits));var c=65536/(l+1)|0;l=(l+1>>1)-1,s=(l-a[0])*c,a[0]=s*(o>>12)+(s*(4095&o)+2048>>12)>>12,s=(l-a[1])*c,a[1]=s*(o>>12)+(s*(4095&o)+2048>>12)>>12,s=(l-a[2])*c,a[2]=s*(o>>12)+(s*(4095&o)+2048>>12)>>12},t.MatrixTransform=function(t,e,n,r){var i,o,a,s,u,l,c,d,h,f,p,v,m,g,y,A,_,b,T,S,E,w,k,C,L,I,x,R,O,D,M,j,P;i=t[0][e]+t[31][e],o=.500602998235*(t[0][e]-t[31][e]),a=t[1][e]+t[30][e],s=.505470959898*(t[1][e]-t[30][e]),u=t[2][e]+t[29][e],l=.515447309923*(t[2][e]-t[29][e]),c=t[3][e]+t[28][e],d=.53104259109*(t[3][e]-t[28][e]),h=t[4][e]+t[27][e],f=.553103896034*(t[4][e]-t[27][e]),p=t[5][e]+t[26][e],v=.582934968206*(t[5][e]-t[26][e]),m=t[6][e]+t[25][e],g=.622504123036*(t[6][e]-t[25][e]),y=t[7][e]+t[24][e],A=.674808341455*(t[7][e]-t[24][e]),_=t[8][e]+t[23][e],b=.744536271002*(t[8][e]-t[23][e]),T=t[9][e]+t[22][e],S=.839349645416*(t[9][e]-t[22][e]),E=t[10][e]+t[21][e],w=.972568237862*(t[10][e]-t[21][e]),k=t[11][e]+t[20][e],C=1.16943993343*(t[11][e]-t[20][e]),L=t[12][e]+t[19][e],I=1.48416461631*(t[12][e]-t[19][e]),x=t[13][e]+t[18][e],R=2.05778100995*(t[13][e]-t[18][e]),O=t[14][e]+t[17][e],D=3.40760841847*(t[14][e]-t[17][e]),M=t[15][e]+t[16][e],j=10.1900081235*(t[15][e]-t[16][e]),P=i+M,M=.502419286188*(i-M),i=a+O,O=.52249861494*(a-O),a=u+x,x=.566944034816*(u-x),u=c+L,L=.64682178336*(c-L),c=h+k,k=.788154623451*(h-k),h=p+E,E=1.06067768599*(p-E),p=m+T,T=1.72244709824*(m-T),m=y+_,_=5.10114861869*(y-_),y=P+m,m=.509795579104*(P-m),P=i+p,i=.601344886935*(i-p),p=a+h,h=.899976223136*(a-h),a=u+c,c=2.56291544774*(u-c),u=y+a,y=.541196100146*(y-a),a=P+p,p=1.30656296488*(P-p),P=u+a,u=.707106781187*(u-a),a=y+p,y=.707106781187*(y-p),a+=y,p=m+c,m=.541196100146*(m-c),c=i+h,h=1.30656296488*(i-h),i=p+c,c=.707106781187*(p-c),p=m+h,m=.707106781187*(m-h),p+=m,i+=p,p+=c,c+=m,h=M+_,M=.509795579104*(M-_),_=O+T,O=.601344886935*(O-T),T=x+E,E=.899976223136*(x-E),x=L+k,k=2.56291544774*(L-k),L=h+x,h=.541196100146*(h-x),x=_+T,T=1.30656296488*(_-T),_=L+x,x=.707106781187*(L-x),L=h+T,T=.707106781187*(h-T),L+=T,h=M+k,M=.541196100146*(M-k),k=O+E,E=1.30656296488*(O-E),O=h+k,k=.707106781187*(h-k),h=M+E,M=.707106781187*(M-E),h+=M,O+=h,h+=k,k+=M,_+=O,O+=L,L+=h,h+=x,x+=k,k+=T,T+=M,E=o+j,o=.502419286188*(o-j),j=s+D,s=.52249861494*(s-D),D=l+R,R=.566944034816*(l-R),l=d+I,d=.64682178336*(d-I),I=f+C,f=.788154623451*(f-C),C=v+w,w=1.06067768599*(v-w),v=g+S,S=1.72244709824*(g-S),g=A+b,A=5.10114861869*(A-b),b=E+g,g=.509795579104*(E-g),E=j+v,j=.601344886935*(j-v),v=D+C,C=.899976223136*(D-C),D=l+I,I=2.56291544774*(l-I),l=b+D,b=.541196100146*(b-D),D=E+v,v=1.30656296488*(E-v),E=l+D,D=.707106781187*(l-D),l=b+v,v=.707106781187*(b-v),l+=v,b=g+I,I=.541196100146*(g-I),g=j+C,C=1.30656296488*(j-C),j=b+g,g=.707106781187*(b-g),b=I+C,C=.707106781187*(I-C),b+=C,j+=b,b+=g,I=g+C,g=o+A,o=.509795579104*(o-A),A=s+S,s=.601344886935*(s-S),S=R+w,w=.899976223136*(R-w),R=d+f,f=2.56291544774*(d-f),d=g+R,g=.541196100146*(g-R),R=A+S,S=1.30656296488*(A-S),A=d+R,R=.707106781187*(d-R),d=g+S,S=.707106781187*(g-S),d+=S,g=o+f,o=.541196100146*(o-f),f=s+w,w=1.30656296488*(s-w),s=g+f,f=.707106781187*(g-f),g=o+w,o=.707106781187*(o-w),g+=o,s+=g,g+=f,f+=o,A+=s,s+=d,d+=g,g+=R,R+=f,f+=S,S+=o,E+=A,A+=j,j+=s,s+=l,l+=d,d+=b;b+=g,g+=D,D+=R,R+=I,I+=f,f+=v,v+=S,S+=C,C+=o,n[r+48]=-P,n[r+49]=n[r+47]=-E,n[r+50]=n[r+46]=-_,n[r+51]=n[r+45]=-A,n[r+52]=n[r+44]=-i,n[r+53]=n[r+43]=-j,n[r+54]=n[r+42]=-O,n[r+55]=n[r+41]=-s,n[r+56]=n[r+40]=-a,n[r+57]=n[r+39]=-l,n[r+58]=n[r+38]=-L,n[r+59]=n[r+37]=-d,n[r+60]=n[r+36]=-p,n[r+61]=n[r+35]=-b,n[r+62]=n[r+34]=-h,n[r+63]=n[r+33]=-g,n[r+32]=-u,n[r+0]=u,n[r+31]=-D,n[r+1]=D,n[r+30]=-x,n[r+2]=x,n[r+29]=-R,n[r+3]=R,n[r+28]=-c,n[r+4]=c,n[r+27]=-I,n[r+5]=I,n[r+26]=-k,n[r+6]=k,n[r+25]=-f,n[r+7]=f,n[r+24]=-y,n[r+8]=y,n[r+23]=-v,n[r+9]=v,n[r+22]=-T,n[r+10]=T,n[r+21]=-S,n[r+11]=S,n[r+20]=-m,n[r+12]=m,n[r+19]=-C,n[r+13]=C,n[r+18]=-M,n[r+14]=M,n[r+17]=-o,n[r+15]=o,n[r+16]=0},t.FRAME_SYNC=2047,t.VERSION={MPEG_2_5:0,MPEG_2:2,MPEG_1:3},t.LAYER={III:1,II:2,I:3},t.MODE={STEREO:0,JOINT_STEREO:1,DUAL_CHANNEL:2,MONO:3},t.SAMPLE_RATE=new Uint16Array([44100,48e3,32e3,0,22050,24e3,16e3,0]),t.BIT_RATE=new Uint16Array([32,48,56,64,80,96,112,128,160,192,224,256,320,384,8,16,24,32,40,48,56,64,80,96,112,128,144,160]),t.SCALEFACTOR_BASE=new Uint32Array([33554432,26632170,21137968]),t.SYNTHESIS_WINDOW=new Float32Array([0,-.5,-.5,-.5,-.5,-.5,-.5,-1,-1,-1,-1,-1.5,-1.5,-2,-2,-2.5,-2.5,-3,-3.5,-3.5,-4,-4.5,-5,-5.5,-6.5,-7,-8,-8.5,-9.5,-10.5,-12,-13,-14.5,-15.5,-17.5,-19,-20.5,-22.5,-24.5,-26.5,-29,-31.5,-34,-36.5,-39.5,-42.5,-45.5,-48.5,-52,-55.5,-58.5,-62.5,-66,-69.5,-73.5,-77,-80.5,-84.5,-88,-91.5,-95,-98,-101,-104,106.5,109,111,112.5,113.5,114,114,113.5,112,110.5,107.5,104,100,94.5,88.5,81.5,73,63.5,53,41.5,28.5,14.5,-1,-18,-36,-55.5,-76.5,-98.5,-122,-147,-173.5,-200.5,-229.5,-259.5,-290.5,-322.5,-355.5,-389.5,-424,-459.5,-495.5,-532,-568.5,-605,-641.5,-678,-714,-749,-783.5,-817,-849,-879.5,-908.5,-935,-959.5,-981,-1000.5,-1016,-1028.5,-1037.5,-1042.5,-1043.5,-1040,-1031.5,1018.5,1e3,976,946.5,911,869.5,822,767.5,707,640,565.5,485,397,302.5,201,92.5,-22.5,-144,-272.5,-407,-547.5,-694,-846,-1003,-1165,-1331.5,-1502,-1675.5,-1852.5,-2031.5,-2212.5,-2394,-2576.5,-2758.5,-2939.5,-3118.5,-3294.5,-3467.5,-3635.5,-3798.5,-3955,-4104.5,-4245.5,-4377.5,-4499,-4609.5,-4708,-4792.5,-4863.5,-4919,-4958,-4979.5,-4983,-4967.5,-4931.5,-4875,-4796,-4694.5,-4569.5,-4420,-4246,-4046,-3820,-3567,3287,2979.5,2644,2280.5,1888,1467.5,1018.5,541,35,-499,-1061,-1650,-2266.5,-2909,-3577,-4270,-4987.5,-5727.5,-6490,-7274,-8077.5,-8899.5,-9739,-10594.5,-11464.5,-12347,-13241,-14144.5,-15056,-15973.5,-16895.5,-17820,-18744.5,-19668,-20588,-21503,-22410.5,-23308.5,-24195,-25068.5,-25926.5,-26767,-27589,-28389,-29166.5,-29919,-30644.5,-31342,-32009.5,-32645,-33247,-33814.5,-34346,-34839.5,-35295,-35710,-36084.5,-36417.5,-36707.5,-36954,-37156.5,-37315,-37428,-37496,37519,37496,37428,37315,37156.5,36954,36707.5,36417.5,36084.5,35710,35295,34839.5,34346,33814.5,33247,32645,32009.5,31342,30644.5,29919,29166.5,28389,27589,26767,25926.5,25068.5,24195,23308.5,22410.5,21503,20588,19668,18744.5,17820,16895.5,15973.5,15056,14144.5,13241,12347,11464.5,10594.5,9739,8899.5,8077.5,7274,6490,5727.5,4987.5,4270,3577,2909,2266.5,1650,1061,499,-35,-541,-1018.5,-1467.5,-1888,-2280.5,-2644,-2979.5,3287,3567,3820,4046,4246,4420,4569.5,4694.5,4796,4875,4931.5,4967.5,4983,4979.5,4958,4919,4863.5,4792.5,4708,4609.5,4499,4377.5,4245.5,4104.5,3955,3798.5,3635.5,3467.5,3294.5,3118.5,2939.5,2758.5,2576.5,2394,2212.5,2031.5,1852.5,1675.5,1502,1331.5,1165,1003,846,694,547.5,407,272.5,144,22.5,-92.5,-201,-302.5,-397,-485,-565.5,-640,-707,-767.5,-822,-869.5,-911,-946.5,-976,-1e3,1018.5,1031.5,1040,1043.5,1042.5,1037.5,1028.5,1016,1000.5,981,959.5,935,908.5,879.5,849,817,783.5,749,714,678,641.5,605,568.5,532,495.5,459.5,424,389.5,355.5,322.5,290.5,259.5,229.5,200.5,173.5,147,122,98.5,76.5,55.5,36,18,1,-14.5,-28.5,-41.5,-53,-63.5,-73,-81.5,-88.5,-94.5,-100,-104,-107.5,-110.5,-112,-113.5,-114,-114,-113.5,-112.5,-111,-109,106.5,104,101,98,95,91.5,88,84.5,80.5,77,73.5,69.5,66,62.5,58.5,55.5,52,48.5,45.5,42.5,39.5,36.5,34,31.5,29,26.5,24.5,22.5,20.5,19,17.5,15.5,14.5,13,12,10.5,9.5,8.5,8,7,6.5,5.5,5,4.5,4,3.5,3.5,3,2.5,2.5,2,2,1.5,1.5,1,1,1,1,.5,.5,.5,.5,.5,.5]),t.QUANT_LUT_STEP_1=[[0,0,1,1,1,2,2,2,2,2,2,2,2,2],[0,0,0,0,0,0,1,1,1,2,2,2,2,2]],t.QUANT_TAB={A:91,B:94,C:8,D:12},t.QUANT_LUT_STEP_2=[[t.QUANT_TAB.C,t.QUANT_TAB.C,t.QUANT_TAB.D],[t.QUANT_TAB.A,t.QUANT_TAB.A,t.QUANT_TAB.A],[t.QUANT_TAB.B,t.QUANT_TAB.A,t.QUANT_TAB.B]],t.QUANT_LUT_STEP_3=[[68,68,52,52,52,52,52,52,52,52,52,52],[67,67,67,66,66,66,66,66,66,66,66,49,49,49,49,49,49,49,49,49,49,49,49,32,32,32,32,32,32,32],[69,69,69,69,52,52,52,52,52,52,52,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36]],t.QUANT_LUT_STEP4=[[0,1,2,17],[0,1,2,3,4,5,6,17],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17],[0,1,3,5,6,7,8,9,10,11,12,13,14,15,16,17],[0,1,2,4,5,6,7,8,9,10,11,12,13,14,15,17],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]],t.QUANT_TAB=[{levels:3,group:1,bits:5},{levels:5,group:1,bits:7},{levels:7,group:0,bits:3},{levels:9,group:1,bits:10},{levels:15,group:0,bits:4},{levels:31,group:0,bits:5},{levels:63,group:0,bits:6},{levels:127,group:0,bits:7},{levels:255,group:0,bits:8},{levels:511,group:0,bits:9},{levels:1023,group:0,bits:10},{levels:2047,group:0,bits:11},{levels:4095,group:0,bits:12},{levels:8191,group:0,bits:13},{levels:16383,group:0,bits:14},{levels:32767,group:0,bits:15},{levels:65535,group:0,bits:16}],t}(),r.Renderer.WebGL=function(){"use strict";var t=function t(e){this.canvas=e.canvas||document.createElement("canvas"),this.width=this.canvas.width,this.height=this.canvas.height,this.enabled=!0;var n={preserveDrawingBuffer:!!e.preserveDrawingBuffer,alpha:!1,depth:!1,stencil:!1,antialias:!1};if(this.gl=this.canvas.getContext("webgl",n)||this.canvas.getContext("experimental-webgl",n),!this.gl)throw new Error("Failed to get WebGL Context");var r=this.gl,i=null;this.vertexBuffer=r.createBuffer();var o=new Float32Array([0,0,0,1,1,0,1,1]);r.bindBuffer(r.ARRAY_BUFFER,this.vertexBuffer),r.bufferData(r.ARRAY_BUFFER,o,r.STATIC_DRAW),this.program=this.createProgram(t.SHADER.VERTEX_IDENTITY,t.SHADER.FRAGMENT_YCRCB_TO_RGBA),i=r.getAttribLocation(this.program,"vertex"),r.enableVertexAttribArray(i),r.vertexAttribPointer(i,2,r.FLOAT,!1,0,0),this.textureY=this.createTexture(0,"textureY"),this.textureCb=this.createTexture(1,"textureCb"),this.textureCr=this.createTexture(2,"textureCr"),this.loadingProgram=this.createProgram(t.SHADER.VERTEX_IDENTITY,t.SHADER.FRAGMENT_LOADING),i=r.getAttribLocation(this.loadingProgram,"vertex"),r.enableVertexAttribArray(i),r.vertexAttribPointer(i,2,r.FLOAT,!1,0,0),this.shouldCreateUnclampedViews=!this.allowsClampedTextureData()};return t.prototype.destroy=function(){var t=this.gl;t.deleteTexture(this.textureY),t.deleteTexture(this.textureCb),t.deleteTexture(this.textureCr),t.deleteProgram(this.program),t.deleteProgram(this.loadingProgram),t.deleteBuffer(this.vertexBuffer)},t.prototype.resize=function(t,e){this.width=0|t,this.height=0|e,this.canvas.width=this.width,this.canvas.height=this.height,this.gl.useProgram(this.program),this.gl.viewport(0,0,this.width,this.height)},t.prototype.createTexture=function(t,e){var n=this.gl,r=n.createTexture();return n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.uniform1i(n.getUniformLocation(this.program,e),t),r},t.prototype.createProgram=function(t,e){var n=this.gl,r=n.createProgram();return n.attachShader(r,this.compileShader(n.VERTEX_SHADER,t)),n.attachShader(r,this.compileShader(n.FRAGMENT_SHADER,e)),n.linkProgram(r),n.useProgram(r),r},t.prototype.compileShader=function(t,e){var n=this.gl,r=n.createShader(t);if(n.shaderSource(r,e),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS))throw new Error(n.getShaderInfoLog(r));return r},t.prototype.allowsClampedTextureData=function(){var t=this.gl,e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.LUMINANCE,1,1,0,t.LUMINANCE,t.UNSIGNED_BYTE,new Uint8ClampedArray([0])),0===t.getError()},t.prototype.renderProgress=function(t){var e=this.gl;e.useProgram(this.loadingProgram);var n=e.getUniformLocation(this.loadingProgram,"progress");e.uniform1f(n,t),e.drawArrays(e.TRIANGLE_STRIP,0,4)},t.prototype.render=function(t,e,n){if(this.enabled){var r=this.gl,i=this.width+15>>4<<4,o=this.height,a=i>>1,s=o>>1;this.shouldCreateUnclampedViews&&(t=new Uint8Array(t.buffer),e=new Uint8Array(e.buffer),n=new Uint8Array(n.buffer)),r.useProgram(this.program),this.updateTexture(r.TEXTURE0,this.textureY,i,o,t),this.updateTexture(r.TEXTURE1,this.textureCb,a,s,e),this.updateTexture(r.TEXTURE2,this.textureCr,a,s,n),r.drawArrays(r.TRIANGLE_STRIP,0,4)}},t.prototype.updateTexture=function(t,e,n,r,i){var o=this.gl;o.activeTexture(t),o.bindTexture(o.TEXTURE_2D,e),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,n,r,0,o.LUMINANCE,o.UNSIGNED_BYTE,i)},t.IsSupported=function(){try{if(!window.WebGLRenderingContext)return!1;var t=document.createElement("canvas");return!(!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}},t.SHADER={FRAGMENT_YCRCB_TO_RGBA:["precision mediump float;","uniform sampler2D textureY;","uniform sampler2D textureCb;","uniform sampler2D textureCr;","varying vec2 texCoord;","mat4 rec601 = mat4(","1.16438, 0.00000, 1.59603, -0.87079,","1.16438, -0.39176, -0.81297, 0.52959,","1.16438, 2.01723, 0.00000, -1.08139,","0, 0, 0, 1",");","void main() {","float y = texture2D(textureY, texCoord).r;","float cb = texture2D(textureCb, texCoord).r;","float cr = texture2D(textureCr, texCoord).r;","gl_FragColor = vec4(y, cr, cb, 1.0) * rec601;","}"].join("\n"),FRAGMENT_LOADING:["precision mediump float;","uniform float progress;","varying vec2 texCoord;","void main() {","float c = ceil(progress-(1.0-texCoord.y));","gl_FragColor = vec4(c,c,c,1);","}"].join("\n"),VERTEX_IDENTITY:["attribute vec2 vertex;","varying vec2 texCoord;","void main() {","texCoord = vertex;","gl_Position = vec4((vertex * 2.0 - 1.0) * vec2(1, -1), 0.0, 1.0);","}"].join("\n")},t}(),r.Renderer.Canvas2D=function(){"use strict";var t=function(t){this.canvas=t.canvas||document.createElement("canvas"),this.width=this.canvas.width,this.height=this.canvas.height,this.enabled=!0,this.context=this.canvas.getContext("2d")};return t.prototype.destroy=function(){},t.prototype.resize=function(t,e){this.width=0|t,this.height=0|e,this.canvas.width=this.width,this.canvas.height=this.height,this.imageData=this.context.getImageData(0,0,this.width,this.height),r.Fill(this.imageData.data,255)},t.prototype.renderProgress=function(t){var e=this.canvas.width,n=this.canvas.height,r=this.context;r.fillStyle="#222",r.fillRect(0,0,e,n),r.fillStyle="#fff",r.fillRect(0,n-n*t,e,n*t)},t.prototype.render=function(t,e,n){this.YCbCrToRGBA(t,e,n,this.imageData.data),this.context.putImageData(this.imageData,0,0)},t.prototype.YCbCrToRGBA=function(t,e,n,r){if(this.enabled)for(var i,o,a,s,u,l=this.width+15>>4<<4,c=l>>1,d=0,h=l,f=l+(l-this.width),p=0,v=c-(this.width>>1),m=0,g=4*this.width,y=4*this.width,A=this.width>>1,_=this.height>>1,b=0;b<_;b++){for(var T=0;T<A;T++){i=e[p],o=n[p],p++,a=i+(103*i>>8)-179,s=(88*o>>8)-44+(183*i>>8)-91,u=o+(198*o>>8)-227;var S=t[d++],E=t[d++];r[m]=S+a,r[m+1]=S-s,r[m+2]=S+u,r[m+4]=E+a,r[m+5]=E-s,r[m+6]=E+u,m+=8;var w=t[h++],k=t[h++];r[g]=w+a,r[g+1]=w-s,r[g+2]=w+u,r[g+4]=k+a,r[g+5]=k-s,r[g+6]=k+u,g+=8}d+=f,h+=f,m+=y,g+=y,p+=v}},t}(),r.AudioOutput.WebAudio=function(){"use strict";var t=function t(e){this.context=t.CachedContext=t.CachedContext||new(window.AudioContext||window.webkitAudioContext),this.gain=this.context.createGain(),this.destination=this.gain,this.gain.connect(this.context.destination),this.context._connections=(this.context._connections||0)+1,this.startTime=0,this.buffer=null,this.wallclockStartTime=0,this.volume=1,this.enabled=!0,this.unlocked=!t.NeedsUnlocking(),Object.defineProperty(this,"enqueuedTime",{get:this.getEnqueuedTime})};return t.prototype.destroy=function(){this.gain.disconnect(),0==--this.context._connections&&(this.context.close(),t.CachedContext=null)},t.prototype.play=function(t,e,n){if(this.enabled){if(!this.unlocked){var i=r.Now();return this.wallclockStartTime<i&&(this.wallclockStartTime=i),void(this.wallclockStartTime+=e.length/t)}this.gain.gain.value=this.volume;var o=this.context.createBuffer(2,e.length,t);o.getChannelData(0).set(e),o.getChannelData(1).set(n);var a=this.context.createBufferSource();a.buffer=o,a.connect(this.destination);var s=this.context.currentTime,u=o.duration;this.startTime<s&&(this.startTime=s,this.wallclockStartTime=r.Now()),a.start(this.startTime),this.startTime+=u,this.wallclockStartTime+=u}},t.prototype.stop=function(){this.gain.gain.value=0},t.prototype.getEnqueuedTime=function(){return Math.max(this.wallclockStartTime-r.Now(),0)},t.prototype.resetEnqueuedTime=function(){this.startTime=this.context.currentTime,this.wallclockStartTime=r.Now()},t.prototype.unlock=function(t){if(this.unlocked)return void(t&&t());this.unlockCallback=t;var e=this.context.createBuffer(1,1,22050),n=this.context.createBufferSource();n.buffer=e,n.connect(this.destination),n.start(0),setTimeout(this.checkIfUnlocked.bind(this,n,0),0)},t.prototype.checkIfUnlocked=function(t,e){t.playbackState===t.PLAYING_STATE||t.playbackState===t.FINISHED_STATE?(this.unlocked=!0,this.unlockCallback&&(this.unlockCallback(),this.unlockCallback=null)):e<10&&setTimeout(this.checkIfUnlocked.bind(this,t,e+1),100)},t.NeedsUnlocking=function(){return/iPhone|iPad|iPod/i.test(navigator.userAgent)},t.IsSupported=function(){return window.AudioContext||window.webkitAudioContext},t.CachedContext=null,t}(),t.exports=r},BkJT:function(t,e){function n(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},BmKr:function(t,e,n){"use strict";var r=n("gfI6"),i=n("B9+s"),o=n("BEkf"),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},BmkF:function(t,e,n){n("F6kW")("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},BzCt:function(t,e,n){"use strict";var r=n("gvuQ"),i=n("T6bJ"),o=n("BJD5"),a=n("5Srp"),s=n("8bZh"),u=n("xxJ0"),l="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n("ehz/");t.exports=function(t){return new Promise(function(e,c){var d=t.data,h=t.headers;r.isFormData(d)&&delete h["Content-Type"];var f=new XMLHttpRequest,p="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in f||s(t.url)||(f=new window.XDomainRequest,p="onload",v=!0,f.onprogress=function(){},f.ontimeout=function(){}),t.auth){var m=t.auth.username||"",g=t.auth.password||"";h.Authorization="Basic "+l(m+":"+g)}if(f.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f[p]=function(){if(f&&(4===f.readyState||v)&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?f.response:f.responseText,o={data:r,status:1223===f.status?204:f.status,statusText:1223===f.status?"No Content":f.statusText,headers:n,config:t,request:f};i(e,c,o),f=null}},f.onerror=function(){c(u("Network Error",t,null,f)),f=null},f.ontimeout=function(){c(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var y=n("h1nK"),A=(t.withCredentials||s(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;A&&(h[t.xsrfHeaderName]=A)}if("setRequestHeader"in f&&r.forEach(h,function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete h[e]:f.setRequestHeader(e,t)}),t.withCredentials&&(f.withCredentials=!0),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){f&&(f.abort(),c(t),f=null)}),void 0===d&&(d=null),f.send(d)})}},C3vs:function(t,e,n){"use strict";var r=n("gfI6"),i=n("TVvA"),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n("cKpp")(o,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},C9ZO:function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},CCmj:function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=n("OywI"),a=r.has,s=r.key,u=function(t,e,n){if(a(t,e,n))return!0;var r=o(e);return null!==r&&u(t,r,n)};r.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},CViW:function(t,e,n){"use strict";var r=n("gfI6"),i=n("1o3W")(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("I/ou")("includes")},CmXC:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},CrgY:function(t,e,n){var r=n("gfI6"),i=n("AHac"),o=n("rWQF"),a=n("4PQM"),s=n("YHjO");r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),u=a.f,l=i(r),c={},d=0;l.length>d;)void 0!==(n=u(r,e=l[d++]))&&s(c,e,n);return c}})},CxM1:function(t,e,n){var r=n("gfI6");r(r.S,"System",{global:n("cegO")})},D5V7:function(t,e,n){"use strict";var r,i=n("cegO"),o=n("kziU")(0),a=n("xVER"),s=n("w8es"),u=n("oonW"),l=n("8PBV"),c=n("SWzD"),d=n("0eGa"),h=n("0eGa"),f=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,v=Object.isExtensible,m=l.ufstore,g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(c(t)){var e=p(t);return!0===e?m(d(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return l.def(d(this,"WeakMap"),t,e)}},A=t.exports=n("2o3U")("WeakMap",g,y,l,!0,!0);h&&f&&(r=l.getConstructor(g,"WeakMap"),u(r.prototype,y),s.NEED=!0,o(["delete","has","get","set"],function(t){var e=A.prototype,n=e[t];a(e,t,function(e,i){if(c(e)&&!v(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},DTOj:function(t,e,n){var r=n("SWzD"),i=n("TVvA"),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("nZZV")(Function.call,n("4PQM").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},DbJg:function(t,e,n){var r=n("gfI6");r(r.S,"Object",{is:n("G9Pl")})},DkjP:function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},EBZH:function(t,e,n){"use strict";var r=n("utu9")(!0);n("MLcW")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},EW1H:function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n("gvuQ"),o=n("cx5j"),a=n("eoZI"),s=n("XL/d"),u=n("LD7k"),l=n("cQJ/");t.exports=function(t){return r(t),t.baseURL&&!u(t.url)&&(t.url=l(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},EZEp:function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},Eszt:function(t,e,n){var r=n("SWzD"),i=n("mwya"),o=n("e5pe")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},"F/oR":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},F246:function(t,e,n){var r=n("gfI6"),i=n("oTJo");r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},F6kW:function(t,e,n){"use strict";if(n("itn3")){var r=n("9v1L"),i=n("cegO"),o=n("wrr7"),a=n("gfI6"),s=n("dwEP"),u=n("8NP9"),l=n("nZZV"),c=n("hhx3"),d=n("VMkr"),h=n("QHaH"),f=n("1zWp"),p=n("a6t1"),v=n("GuN7"),m=n("+yct"),g=n("Qfht"),y=n("oAFy"),A=n("iNHF"),_=n("gOH0"),b=n("SWzD"),T=n("I5ZQ"),S=n("5zKf"),E=n("wl1Y"),w=n("OywI"),k=n("hoJM").f,C=n("a+E/"),L=n("2eo7"),I=n("e5pe"),x=n("kziU"),R=n("1o3W"),O=n("sPDH"),D=n("cQil"),M=n("6jds"),j=n("UVvP"),P=n("eAo0"),N=n("eNpo"),U=n("ftLj"),B=n("tg2m"),F=n("4PQM"),G=B.f,z=F.f,V=i.RangeError,H=i.TypeError,W=i.Uint8Array,Q=Array.prototype,Y=u.ArrayBuffer,q=u.DataView,K=x(0),X=x(2),Z=x(3),J=x(4),$=x(5),tt=x(6),et=R(!0),nt=R(!1),rt=D.values,it=D.keys,ot=D.entries,at=Q.lastIndexOf,st=Q.reduce,ut=Q.reduceRight,lt=Q.join,ct=Q.sort,dt=Q.slice,ht=Q.toString,ft=Q.toLocaleString,pt=I("iterator"),vt=I("toStringTag"),mt=L("typed_constructor"),gt=L("def_constructor"),yt=s.CONSTR,At=s.TYPED,_t=s.VIEW,bt=x(1,function(t,e){return kt(O(t,t[gt]),e)}),Tt=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),St=!!W&&!!W.prototype.set&&o(function(){new W(1).set({})}),Et=function(t,e){var n=p(t);if(n<0||n%e)throw V("Wrong offset!");return n},wt=function(t){if(b(t)&&At in t)return t;throw H(t+" is not a typed array!")},kt=function(t,e){if(!(b(t)&&mt in t))throw H("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return Lt(O(t,t[gt]),e)},Lt=function(t,e){for(var n=0,r=e.length,i=kt(t,r);r>n;)i[n]=e[n++];return i},It=function(t,e,n){G(t,e,{get:function(){return this._d[n]}})},xt=function(t){var e,n,r,i,o,a,s=T(t),u=arguments.length,c=u>1?arguments[1]:void 0,d=void 0!==c,h=C(s);if(void 0!=h&&!S(h)){for(a=h.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(d&&u>2&&(c=l(c,arguments[2],2)),e=0,n=v(s.length),i=kt(this,n);n>e;e++)i[e]=d?c(s[e],e):s[e];return i},Rt=function(){for(var t=0,e=arguments.length,n=kt(this,e);e>t;)n[t]=arguments[t++];return n},Ot=!!W&&o(function(){ft.call(new W(1))}),Dt=function(){return ft.apply(Ot?dt.call(wt(this)):wt(this),arguments)},Mt={copyWithin:function(t,e){return U.call(wt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return J(wt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(wt(this),arguments)},filter:function(t){return Ct(this,X(wt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(wt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(wt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){K(wt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(wt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(wt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return lt.apply(wt(this),arguments)},lastIndexOf:function(t){return at.apply(wt(this),arguments)},map:function(t){return bt(wt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(wt(this),arguments)},reduceRight:function(t){return ut.apply(wt(this),arguments)},reverse:function(){for(var t,e=this,n=wt(e).length,r=Math.floor(n/2),i=0;i<r;)t=e[i],e[i++]=e[--n],e[n]=t;return e},some:function(t){return Z(wt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ct.call(wt(this),t)},subarray:function(t,e){var n=wt(this),r=n.length,i=g(t,r);return new(O(n,n[gt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?r:g(e,r))-i))}},jt=function(t,e){return Ct(this,dt.call(wt(this),t,e))},Pt=function(t){wt(this);var e=Et(arguments[1],1),n=this.length,r=T(t),i=v(r.length),o=0;if(i+e>n)throw V("Wrong length!");for(;o<i;)this[e+o]=r[o++]},Nt={entries:function(){return ot.call(wt(this))},keys:function(){return it.call(wt(this))},values:function(){return rt.call(wt(this))}},Ut=function(t,e){return b(t)&&t[At]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Bt=function(t,e){return Ut(t,e=y(e,!0))?d(2,t[e]):z(t,e)},Ft=function(t,e,n){return!(Ut(t,e=y(e,!0))&&b(n)&&A(n,"value"))||A(n,"get")||A(n,"set")||n.configurable||A(n,"writable")&&!n.writable||A(n,"enumerable")&&!n.enumerable?G(t,e,n):(t[e]=n.value,t)};yt||(F.f=Bt,B.f=Ft),a(a.S+a.F*!yt,"Object",{getOwnPropertyDescriptor:Bt,defineProperty:Ft}),o(function(){ht.call({})})&&(ht=ft=function(){return lt.call(this)});var Gt=f({},Mt);f(Gt,Nt),h(Gt,pt,Nt.values),f(Gt,{slice:jt,set:Pt,constructor:function(){},toString:ht,toLocaleString:Dt}),It(Gt,"buffer","b"),It(Gt,"byteOffset","o"),It(Gt,"byteLength","l"),It(Gt,"length","e"),G(Gt,vt,{get:function(){return this[At]}}),t.exports=function(t,e,n,u){u=!!u;var l=t+(u?"Clamped":"")+"Array",d="get"+t,f="set"+t,p=i[l],g=p||{},y=p&&w(p),A=!p||!s.ABV,T={},S=p&&p.prototype,C=function(t,n){var r=t._d;return r.v[d](n*e+r.o,Tt)},L=function(t,n,r){var i=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[f](n*e+i.o,r,Tt)},I=function(t,e){G(t,e,{get:function(){return C(this,e)},set:function(t){return L(this,e,t)},enumerable:!0})};A?(p=n(function(t,n,r,i){c(t,p,l,"_d");var o,a,s,u,d=0,f=0;if(b(n)){if(!(n instanceof Y||"ArrayBuffer"==(u=_(n))||"SharedArrayBuffer"==u))return At in n?Lt(p,n):xt.call(p,n);o=n,f=Et(r,e);var g=n.byteLength;if(void 0===i){if(g%e)throw V("Wrong length!");if((a=g-f)<0)throw V("Wrong length!")}else if((a=v(i)*e)+f>g)throw V("Wrong length!");s=a/e}else s=m(n),a=s*e,o=new Y(a);for(h(t,"_d",{b:o,o:f,l:a,e:s,v:new q(o)});d<s;)I(t,d++)}),S=p.prototype=E(Gt),h(S,"constructor",p)):o(function(){p(1)})&&o(function(){new p(-1)})&&j(function(t){new p,new p(null),new p(1.5),new p(t)},!0)||(p=n(function(t,n,r,i){c(t,p,l);var o;return b(n)?n instanceof Y||"ArrayBuffer"==(o=_(n))||"SharedArrayBuffer"==o?void 0!==i?new g(n,Et(r,e),i):void 0!==r?new g(n,Et(r,e)):new g(n):At in n?Lt(p,n):xt.call(p,n):new g(m(n))}),K(y!==Function.prototype?k(g).concat(k(y)):k(g),function(t){t in p||h(p,t,g[t])}),p.prototype=S,r||(S.constructor=p));var x=S[pt],R=!!x&&("values"==x.name||void 0==x.name),O=Nt.values;h(p,mt,!0),h(S,At,l),h(S,_t,!0),h(S,gt,p),(u?new p(1)[vt]==l:vt in S)||G(S,vt,{get:function(){return l}}),T[l]=p,a(a.G+a.W+a.F*(p!=g),T),a(a.S,l,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*o(function(){g.of.call(p,1)}),l,{from:xt,of:Rt}),"BYTES_PER_ELEMENT"in S||h(S,"BYTES_PER_ELEMENT",e),a(a.P,l,Mt),P(l),a(a.P+a.F*St,l,{set:Pt}),a(a.P+a.F*!R,l,Nt),r||S.toString==ht||(S.toString=ht),a(a.P+a.F*o(function(){new p(1).slice()}),l,{slice:jt}),a(a.P+a.F*(o(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!o(function(){S.toLocaleString.call([1,2])})),l,{toLocaleString:Dt}),M[l]=R?x:O,r||R||h(S,pt,O)}}else t.exports=function(){}},FBI6:function(t,e,n){"use strict";var r=n("wrr7"),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},FBct:function(t,e,n){"use strict";n("T/J3")("trim",function(t){return function(){return t(this,3)}})},FIqI:function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=c[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(o(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(o(n.parts[i]));c[n.id]={id:n.id,refs:1,parts:a}}}}function i(){var t=document.createElement("style");return t.type="text/css",d.appendChild(t),t}function o(t){var e,n,r=document.querySelector("style["+g+'~="'+t.id+'"]');if(r){if(p)return v;r.parentNode.removeChild(r)}if(y){var o=f++;r=h||(h=i()),e=a.bind(null,r,o,!1),n=a.bind(null,r,o,!0)}else r=i(),e=s.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function a(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=A(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function s(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),m.ssrId&&t.setAttribute(g,e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=n("5p4y"),c={},d=u&&(document.head||document.getElementsByTagName("head")[0]),h=null,f=0,p=!1,v=function(){},m=null,g="data-vue-ssr-id",y="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n,i){p=n,m=i||{};var o=l(t,e);return r(o),function(e){for(var n=[],i=0;i<o.length;i++){var a=o[i],s=c[a.id];s.refs--,n.push(s)}e?(o=l(t,e),r(o)):o=[];for(var i=0;i<n.length;i++){var s=n[i];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete c[s.id]}}}};var A=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},FQFZ:function(t,e,n){var r=n("gfI6"),i=n("cegO").isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},"Fa+6":function(t,e,n){n("tcJl")("Set")},Fknn:function(t,e,n){var r=n("gfI6"),i=n("yZ2d")(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},G5hg:function(t,e,n){for(var r=n("cQil"),i=n("rmpa"),o=n("xVER"),a=n("cegO"),s=n("QHaH"),u=n("6jds"),l=n("e5pe"),c=l("iterator"),d=l("toStringTag"),h=u.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(f),v=0;v<p.length;v++){var m,g=p[v],y=f[g],A=a[g],_=A&&A.prototype;if(_&&(_[c]||s(_,c,h),_[d]||s(_,d,g),u[g]=h,y))for(m in r)_[m]||o(_,m,r[m],!0)}},G9Pl:function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},GC9N:function(t,e,n){var r=n("Wl3t");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0};i.transform=void 0;n("uOJK")(r,i);r.locals&&(t.exports=r.locals)},GbjT:function(t,e,n){n("F6kW")("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},Gky4:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},GtiV:function(t,e,n){"use strict";n("f9UI")("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},GuN7:function(t,e,n){var r=n("a6t1"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},Hdxi:function(t,e,n){"use strict";var r=n("TVvA"),i=n("I5ZQ"),o=n("GuN7"),a=n("a6t1"),s=n("K/q9"),u=n("77LP"),l=Math.max,c=Math.min,d=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,f=/\$([$&`']|\d\d?)/g,p=function(t){return void 0===t?t:String(t)};n("NILh")("replace",2,function(t,e,n,v){function m(t,e,r,o,a,s){var u=r+t.length,l=o.length,c=f;return void 0!==a&&(a=i(a),c=h),n.call(s,c,function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":s=a[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>l){var h=d(c/10);return 0===h?n:h<=l?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):n}s=o[c-1]}return void 0===s?"":s})}return[function(r,i){var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=v(n,t,this,e);if(i.done)return i.value;var d=r(t),h=String(this),f="function"==typeof e;f||(e=String(e));var g=d.global;if(g){var y=d.unicode;d.lastIndex=0}for(var A=[];;){var _=u(d,h);if(null===_)break;if(A.push(_),!g)break;""===String(_[0])&&(d.lastIndex=s(h,o(d.lastIndex),y))}for(var b="",T=0,S=0;S<A.length;S++){_=A[S];for(var E=String(_[0]),w=l(c(a(_.index),h.length),0),k=[],C=1;C<_.length;C++)k.push(p(_[C]));var L=_.groups;if(f){var I=[E].concat(k,w,h);void 0!==L&&I.push(L);var x=String(e.apply(void 0,I))}else x=m(E,h,w,k,L,e);w>=T&&(b+=h.slice(T,w)+x,T=w+E.length)}return b+h.slice(T)}]})},HrFV:function(t,e,n){n("KLS5")("asyncIterator")},HtwL:function(t,e,n){var r=n("SWzD");n("ow6B")("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},"I/ou":function(t,e,n){var r=n("e5pe")("unscopables"),i=Array.prototype;void 0==i[r]&&n("QHaH")(i,r,{}),t.exports=function(t){i[r][t]=!0}},I5ZQ:function(t,e,n){var r=n("d0hO");t.exports=function(t){return Object(r(t))}},IKeO:function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},ILqf:function(t,e,n){"use strict";var r=n("zySG"),i=n("SWzD"),o=n("xHbQ"),a=[].slice,s={},u=function(t,e,n){if(!(e in s)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?u(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(s.prototype=e.prototype),s}},"Ipd+":function(t,e,n){"use strict";var r=n("Eszt"),i=n("TVvA"),o=n("sPDH"),a=n("K/q9"),s=n("GuN7"),u=n("77LP"),l=n("pRlG"),c=n("wrr7"),d=Math.min,h=[].push,f="length",p=!c(function(){RegExp(4294967295,"y")});n("NILh")("split",2,function(t,e,n,c){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[f]||2!="ab".split(/(?:ab)*/)[f]||4!=".".split(/(.?)(.?)/)[f]||".".split(/()()/)[f]>1||"".split(/.?/)[f]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,a,s,u=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,p=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,c+"g");(o=l.call(v,i))&&!((a=v.lastIndex)>d&&(u.push(i.slice(d,o.index)),o[f]>1&&o.index<i[f]&&h.apply(u,o.slice(1)),s=o[0][f],d=a,u[f]>=p));)v.lastIndex===o.index&&v.lastIndex++;return d===i[f]?!s&&v.test("")||u.push(""):u.push(i.slice(d)),u[f]>p?u.slice(0,p):u}:"0".split(void 0,0)[f]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,i,r):v.call(String(i),n,r)},function(t,e){var r=c(v,t,this,e,v!==n);if(r.done)return r.value;var l=i(t),h=String(this),f=o(l,RegExp),m=l.unicode,g=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(p?"y":"g"),y=new f(p?l:"^(?:"+l.source+")",g),A=void 0===e?4294967295:e>>>0;if(0===A)return[];if(0===h.length)return null===u(y,h)?[h]:[];for(var _=0,b=0,T=[];b<h.length;){y.lastIndex=p?b:0;var S,E=u(y,p?h:h.slice(b));if(null===E||(S=d(s(y.lastIndex+(p?0:b)),h.length))===_)b=a(h,b,m);else{if(T.push(h.slice(_,b)),T.length===A)return T;for(var w=1;w<=E.length-1;w++)if(T.push(E[w]),T.length===A)return T;b=_=S}}return T.push(h.slice(_)),T}]})},Isxj:function(t,e,n){var r=n("gfI6");r(r.G,{global:n("cegO")})},"J+2W":function(t,e,n){"use strict";var r=n("nZZV"),i=n("gfI6"),o=n("I5ZQ"),a=n("z6NM"),s=n("5zKf"),u=n("GuN7"),l=n("YHjO"),c=n("a+E/");i(i.S+i.F*!n("UVvP")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,d,h=o(t),f="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v,g=0,y=c(h);if(m&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==y||f==Array&&s(y))for(e=u(h.length),n=new f(e);e>g;g++)l(n,g,m?v(h[g],g):h[g]);else for(d=y.call(h),n=new f;!(i=d.next()).done;g++)l(n,g,m?a(d,v,[i.value,g],!0):i.value);return n.length=g,n}})},JKZW:function(t,e,n){var r=n("mwya");t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},JLFJ:function(t,e){t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r}},JbZK:function(t,e,n){var r=n("gfI6"),i=n("4PQM").f,o=n("TVvA");r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},Jcpa:function(t,e,n){"use strict";var r=n("gfI6"),i=n("kziU")(3);r(r.P+r.F*!n("OiX5")([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},JcxT:function(t,e,n){var r=n("gfI6");r(r.S,"Number",{isInteger:n("kUA4")})},JnCZ:function(t,e,n){var r=n("zySG"),i=n("I5ZQ"),o=n("KQ6G"),a=n("GuN7");t.exports=function(t,e,n,s,u){r(e);var l=i(t),c=o(l),d=a(l.length),h=u?d-1:0,f=u?-1:1;if(n<2)for(;;){if(h in c){s=c[h],h+=f;break}if(h+=f,u?h<0:d<=h)throw TypeError("Reduce of empty array with no initial value")}for(;u?h>=0:d>h;h+=f)h in c&&(s=e(s,c[h],h,l));return s}},"K/q9":function(t,e,n){"use strict";var r=n("utu9")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},KDiV:function(t,e,n){"use strict";var r=n("gfI6"),i=n("YHjO");r(r.S+r.F*n("wrr7")(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},KLS5:function(t,e,n){var r=n("cegO"),i=n("oqL4"),o=n("9v1L"),a=n("yMXV"),s=n("tg2m").f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},KQ6G:function(t,e,n){var r=n("mwya");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},Ke3X:function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,i(n),o(r))}})},LD7k:function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},LRTj:function(t,e,n){"use strict";var r=n("gfI6"),i=n("dwEP"),o=n("8NP9"),a=n("TVvA"),s=n("Qfht"),u=n("GuN7"),l=n("SWzD"),c=n("cegO").ArrayBuffer,d=n("sPDH"),h=o.ArrayBuffer,f=o.DataView,p=i.ABV&&c.isView,v=h.prototype.slice,m=i.VIEW;r(r.G+r.W+r.F*(c!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||l(t)&&m in t}}),r(r.P+r.U+r.F*n("wrr7")(function(){return!new h(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(d(this,h))(u(i-r)),l=new f(this),c=new f(o),p=0;r<i;)c.setUint8(p++,l.getUint8(r++));return o}}),n("eAo0")("ArrayBuffer")},LoOQ:function(t,e,n){var r=n("lfgq"),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126),l=function(t){return t+1/o-1/o};t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),c=r(t);return i<u?c*l(i/u/a)*u*a:(e=(1+a/o)*i,n=e-(e-i),n>s||n!=n?c*(1/0):c*n)}},Lv1y:function(t,e,n){var r=n("itn3"),i=n("rmpa"),o=n("rWQF"),a=n("bdbX").f;t.exports=function(t){return function(e){for(var n,s=o(e),u=i(s),l=u.length,c=0,d=[];l>c;)n=u[c++],r&&!a.call(s,n)||d.push(t?[n,s[n]]:s[n]);return d}}},M07D:function(t,e,n){var r=n("gfI6"),i=n("TVvA"),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},MLcW:function(t,e,n){"use strict";var r=n("9v1L"),i=n("gfI6"),o=n("xVER"),a=n("QHaH"),s=n("6jds"),u=n("cKpp"),l=n("gJRO"),c=n("OywI"),d=n("e5pe")("iterator"),h=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,n,p,v,m,g){u(n,e,p);var y,A,_,b=function(t){if(!h&&t in w)return w[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},T=e+" Iterator",S="values"==v,E=!1,w=t.prototype,k=w[d]||w["@@iterator"]||v&&w[v],C=k||b(v),L=v?S?b("entries"):C:void 0,I="Array"==e?w.entries||k:k;if(I&&(_=c(I.call(new t)))!==Object.prototype&&_.next&&(l(_,T,!0),r||"function"==typeof _[d]||a(_,d,f)),S&&k&&"values"!==k.name&&(E=!0,C=function(){return k.call(this)}),r&&!g||!h&&!E&&w[d]||a(w,d,C),s[e]=C,s[T]=f,v)if(y={values:S?C:b("values"),keys:m?C:b("keys"),entries:L},g)for(A in y)A in w||o(w,A,y[A]);else i(i.P+i.F*(h||E),e,y);return y}},MR0D:function(t,e,n){n("KLS5")("observable")},MZ4E:function(t,e,n){"use strict";n("f9UI")("sub",function(t){return function(){return t(this,"sub","","")}})},Mx4w:function(t,e,n){var r=n("SWzD"),i=n("cegO").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},N85c:function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8IS0tDQoyMDEzLTktMzA6IENyZWF0ZWQuDQotLT4NCjxzdmc+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IGljb25mb250DQo8L21ldGFkYXRhPg0KPGRlZnM+DQoNCjxmb250IGlkPSJpY29uZm9udCIgaG9yaXotYWR2LXg9IjEwMjQiID4NCiAgPGZvbnQtZmFjZQ0KICAgIGZvbnQtZmFtaWx5PSJpY29uZm9udCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAvPg0KICAgIDxtaXNzaW5nLWdseXBoIC8+DQogICAgDQogICAgPGdseXBoIGdseXBoLW5hbWU9InBpY3R1cmUiIHVuaWNvZGU9IiYjNTkwNTU7IiBkPSJNMTE5MC4wMjE1NjUgNzc3Ljc5NDc4M2gtMTU5LjYxMDQzNUw5NDMuODE2MzQ4IDg2Ny45NTEzMDRhMzMuNjEzOTEzIDMzLjYxMzkxMyAwIDAgMS0yNC4wODYyNjEgMTAuMjRINDE2LjcyMzQ3OGEzMy40ODAzNDggMzMuNDgwMzQ4IDAgMCAxLTIzLjk5NzIxNy0xMC4xOTU0NzhMMzA1LjM3NDYwOSA3NzcuNzk0NzgzaC0xNTkuODMzMDQ0QzgzLjM0NDY5NiA3NzcuNzk0NzgzIDMzLjM5MTMwNCA3MjYuOTUwOTU3IDMzLjM5MTMwNCA2NjQuMzUzMzkxdi02NjEuMTQ3ODI2YzAtNjIuMzMwNDM1IDUwLjE3Ni0xMTMuMzk2ODcgMTEyLjIzOTMwNS0xMTMuMzk2ODY5SDExOTAuMDY2MDg3YzYyLjAxODc4MyAwIDExMi4yMzkzMDQgNTAuOTMyODcgMTEyLjIzOTMwNCAxMTMuMzk2ODY5VjY2NC4zNTMzOTFjLTAuMDQ0NTIyIDYyLjM3NDk1Ny01MC4yMjA1MjIgMTEzLjQ0MTM5MS0xMTIuMjgzODI2IDExMy40NDEzOTJ6IG00NS40NTY2OTYtNzc0LjU4OTIxOGMwLTI1LjgyMjYwOS0yMC41MjQ1MjItNDYuNjE0MjYxLTQ1LjQ1NjY5Ni00Ni42MTQyNjFIMTQ1LjYzMDYwOWMtMjQuODg3NjUyIDAtNDUuNDU2Njk2IDIwLjg4MDY5Ni00NS40NTY2OTYgNDYuNjE0MjYxVjY2NC4zNTMzOTFjMCAyNS45NTYxNzQgMjAuMzQ2NDM1IDQ2LjY1ODc4MyA0NS4zNjc2NTIgNDYuNjU4NzgzaDE3My45OTA5NTdhMzMuNDgwMzQ4IDMzLjQ4MDM0OCAwIDAgMSAyMy45OTcyMTcgMTAuMTk1NDc4TDQzMC44ODEzOTEgODExLjQwODY5Nmg0NzQuNjAxNzM5bDg2LjYzOTMwNS05MC4xNTY1MjJjNi4zMjIwODctNi41NDQ2OTYgMTUuMDAzODI2LTEwLjI0IDI0LjA4NjI2MS0xMC4yNGgxNzMuODEyODY5YzI0LjkzMjE3NCAwIDQ1LjQ1NjY5Ni0yMC45MjUyMTcgNDUuNDU2Njk2LTQ2LjY1ODc4M3YtNjYxLjE0NzgyNnpNNjY3LjgyNjA4NyA1NzMuMjE3MzkxYTIzMy43MzkxMyAyMzMuNzM5MTMgMCAxIDEgMC4wNDQ1MjItNDY3LjUyMjc4MkEyMzMuNzM5MTMgMjMzLjczOTEzIDAgMCAxIDY2Ny44MjYwODcgNTczLjIxNzM5MXogbTAtNDAwLjY5NTY1MmExNjYuOTU2NTIyIDE2Ni45NTY1MjIgMCAxIDAgMCAzMzMuOTEzMDQ0IDE2Ni45NTY1MjIgMTY2Ljk1NjUyMiAwIDAgMCAwLTMzMy45MTMwNDR6TTExMTkuODk5ODI2IDYxNy43MzkxM2gtNjYuNzgyNjA5YTMzLjM5MTMwNCAzMy4zOTEzMDQgMCAwIDEgMC02Ni43ODI2MDhoNjYuNzgyNjA5YTMzLjM5MTMwNCAzMy4zOTEzMDQgMCAwIDEgMCA2Ni43ODI2MDh6IiAgaG9yaXotYWR2LXg9IjEzMzUiIC8+DQoNCiAgICANCg0KDQogIDwvZm9udD4NCjwvZGVmcz48L3N2Zz4NCg=="},NAB6:function(t,e,n){var r=n("SWzD"),i=n("w8es").onFreeze;n("ow6B")("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},NDuc:function(t,e,n){var r=n("gfI6"),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},"NEX+":function(t,e,n){var r=n("gfI6"),i=n("C9ZO"),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},NEon:function(t,e,n){n("F6kW")("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},NGsY:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},NHQf:function(t,e,n){e=t.exports=n("BkJT")(void 0),e.push([t.i,"@font-face{font-family:iconfont;src:url("+n("2Ml6")+");src:url("+n("2Ml6")+'?#iefix) format("embedded-opentype"),url("data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAM0AAsAAAAABwAAAALlAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAqCCIIEATYCJAMICwYABCAFhG0HMRsrBsgOJQlBwgDgAQVABA/3o+b92qr05kxcStsLoGsu8cMTaZDm4/1fnfZtF5UyqJ0B2ClNiIqcsPIUFRCOYCTcblgBaKbtpntZOJx2PcA7oFzuPxhg/DXA/7BPViCBecPYTQQO4TyBct1SSOtqUyv4yIBpgbgyG4fAJ6eQtaSHUqGoWZt9kPbBU2nyTH6EN/z78c98+JDIUyBr67LWABU/b8MoZd49r5cigDnfZZAjxSSQEXu1hg2KDExSlAcBD/1gX+nBz9tuN2Xs9o9HEAWQWgk6VcY9MTHrVosSkLn3/j3gflQUeWtrJXjmU9R+Evk9D2tFD55hjwvPc0M/vkz0vPhmfP4KCnl+Lcbz3HWd7kVkh3/bCT7vKtg+v2p9/brt7duON286Ea9d0LLUihgjOr4yf7V5/+sL1xoIutzWdSbgX8CZjq5Lf/8EnUj88zeM7xV4IrBsGbKLsLehYY3PlBPKZtgt1dbe9aG94x63Qs+G5Z0QaXFJJvLw0tKwBKnUJg/LJM3eUaHvQqqVVFWhgopTpdorph9WP0uK76+uDkju6lMB8HCQR6bsf//Gs/83fg4Elvwv1WXgx63mRM7qZwKld2UM/m5Fng/IW2w2CCQZWioDiT2ed11WrhwPoFnqfRkraXoVXSjNMS1IlOiCVKlBZIadhFyFRSiUWoJyE/SbKzTgFJGVYdyKAqHWbUhU+wSpWo+RGfYz5Jr9gkJtKFDuIEL3rDAcZlTN6ZCgBjw8gc2EOTSkFkikN1PjiG2IZ9kc3065y+zGmdOzxbCeOiifY4Fr1JglhIY1zuxYVS6jNhvDTs4slIg0kxDOovSZy7o3pRFmB2QNRw0RKANs2ATMjGAcNNpcQKXPN6OMRtgM4S11A8p2FOdiHhzLlCajB1IvcPSqu5drXEYZZREEDabhGDtMVXSUDQYYzFk/yoIihDSmET6nIulaI62vIG19kf3rtkA5IE0CDk2V3JmJGOEUAAAAAA==") format("woff2"),url('+n("sHTV")+') format("woff"),url('+n("+8RM")+') format("truetype"),url('+n("N85c")+'#iconfont) format("svg")}.iconfont{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-picture:before{content:"\\E6AF"}',""])},NILh:function(t,e,n){"use strict";n("gyCy");var r=n("xVER"),i=n("QHaH"),o=n("wrr7"),a=n("d0hO"),s=n("e5pe"),u=n("pRlG"),l=s("species"),c=!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var h=s(t),f=!o(function(){var e={};return e[h]=function(){return 7},7!=""[t](e)}),p=f?!o(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[l]=function(){return n}),n[h](""),!e}):void 0;if(!f||!p||"replace"===t&&!c||"split"===t&&!d){var v=/./[h],m=n(a,h,""[t],function(t,e,n,r,i){return e.exec===u?f&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),g=m[0],y=m[1];r(String.prototype,t,g),i(RegExp.prototype,h,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},NQr8:function(t,e,n){"use strict";function r(t){this.defaults=t,this.interceptors={request:new a,response:new a}}var i=n("XL/d"),o=n("gvuQ"),a=n("gvu/"),s=n("EW1H");r.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),t=o.merge(i,this.defaults,{method:"get"},t),t.method=t.method.toLowerCase();var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head","options"],function(t){r.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},NYjz:function(t,e,n){"use strict";var r=n("gfI6"),i=n("d0hO"),o=n("GuN7"),a=n("Eszt"),s=n("xTMV"),u=RegExp.prototype,l=function(t,e){this._r=t,this._s=e};n("cKpp")(l,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new l(r,e)}})},OIH2:function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},OJKp:function(t,e,n){"use strict";var r=n("gfI6"),i=n("rWQF"),o=[].join;r(r.P+r.F*(n("KQ6G")!=Object||!n("OiX5")(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},OOnA:function(t,e,n){var r=n("gfI6"),i=n("oTJo");r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},OV3h:function(t,e,n){n("itn3")&&"g"!=/./g.flags&&n("tg2m").f(RegExp.prototype,"flags",{configurable:!0,get:n("xTMV")})},OiX5:function(t,e,n){"use strict";var r=n("wrr7");t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},Otb4:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},OywI:function(t,e,n){var r=n("iNHF"),i=n("I5ZQ"),o=n("SU1L")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},P01y:function(t,e,n){"use strict";(function(e,n){function r(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function o(t){return!0===t}function a(t){return!1===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function u(t){return null!==t&&"object"==typeof t}function l(t){return"[object Object]"===no.call(t)}function c(t){return"[object RegExp]"===no.call(t)}function d(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function h(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}function v(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}function m(t,e){return oo.call(t,e)}function g(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function y(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function A(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function _(t,e){for(var n in e)t[n]=e[n];return t}function b(t){for(var e={},n=0;n<t.length;n++)t[n]&&_(e,t[n]);return e}function T(t,e,n){}function S(t,e){if(t===e)return!0;var n=u(t),r=u(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every(function(t,n){return S(t,e[n])});if(i||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every(function(n){return S(t[n],e[n])})}catch(t){return!1}}function E(t,e){for(var n=0;n<t.length;n++)if(S(t[n],e))return n;return-1}function w(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function k(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function C(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function L(t){if(!yo.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}function I(t){return"function"==typeof t&&/native code/.test(t.toString())}function x(t){Bo.target&&Fo.push(Bo.target),Bo.target=t}function R(){Bo.target=Fo.pop()}function O(t){return new Go(void 0,void 0,void 0,String(t))}function D(t,e){var n=t.componentOptions,r=new Go(t.tag,t.data,t.children,t.text,t.elm,t.context,n,t.asyncFactory);return r.ns=t.ns,r.isStatic=t.isStatic,r.key=t.key,r.isComment=t.isComment,r.fnContext=t.fnContext,r.fnOptions=t.fnOptions,r.fnScopeId=t.fnScopeId,r.isCloned=!0,e&&(t.children&&(r.children=M(t.children,!0)),n&&n.children&&(n.children=M(n.children,!0))),r}function M(t,e){for(var n=t.length,r=new Array(n),i=0;i<n;i++)r[i]=D(t[i],e);return r}function j(t,e,n){t.__proto__=e}function P(t,e,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];C(t,o,e[o])}}function N(t,e){if(u(t)&&!(t instanceof Go)){var n;return m(t,"__ob__")&&t.__ob__ instanceof qo?n=t.__ob__:Yo.shouldConvert&&!Mo()&&(Array.isArray(t)||l(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new qo(t)),e&&n&&n.vmCount++,n}}function U(t,e,n,r,i){var o=new Bo,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,u=a&&a.set,l=!i&&N(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return Bo.target&&(o.depend(),l&&(l.dep.depend(),Array.isArray(e)&&G(e))),e},set:function(e){var r=s?s.call(t):n;e===r||e!==e&&r!==r||(u?u.call(t,e):n=e,l=!i&&N(e),o.notify())}})}}function B(t,e,n){if(Array.isArray(t)&&d(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(U(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function F(t,e){if(Array.isArray(t)&&d(e))return void t.splice(e,1);var n=t.__ob__;t._isVue||n&&n.vmCount||m(t,e)&&(delete t[e],n&&n.dep.notify())}function G(t){for(var e=void 0,n=0,r=t.length;n<r;n++)e=t[n],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&G(e)}function z(t,e){if(!e)return t;for(var n,r,i,o=Object.keys(e),a=0;a<o.length;a++)n=o[a],r=t[n],i=e[n],m(t,n)?l(r)&&l(i)&&z(r,i):B(t,n,i);return t}function V(t,e,n){return n?function(){var r="function"==typeof e?e.call(n,n):e,i="function"==typeof t?t.call(n,n):t;return r?z(r,i):i}:e?t?function(){return z("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function H(t,e){return e?t?t.concat(e):Array.isArray(e)?e:[e]:t}function W(t,e,n,r){var i=Object.create(t||null);return e?_(i,e):i}function Q(t,e){var n=t.props;if(n){var r,i,o,a={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o=so(i),a[o]={type:null});else if(l(n))for(var s in n)i=n[s],o=so(s),a[o]=l(i)?i:{type:i};t.props=a}}function Y(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(l(n))for(var o in n){var a=n[o];r[o]=l(a)?_({from:o},a):{from:a}}}}function q(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"==typeof r&&(e[n]={bind:r,update:r})}}function K(t,e,n){function r(r){var i=Ko[r]||Jo;u[r]=i(t[r],e[r],n,r)}"function"==typeof e&&(e=e.options),Q(e,n),Y(e,n),q(e);var i=e.extends;if(i&&(t=K(t,i,n)),e.mixins)for(var o=0,a=e.mixins.length;o<a;o++)t=K(t,e.mixins[o],n);var s,u={};for(s in t)r(s);for(s in e)m(t,s)||r(s);return u}function X(t,e,n,r){if("string"==typeof n){var i=t[e];if(m(i,n))return i[n];var o=so(n);if(m(i,o))return i[o];var a=uo(o);if(m(i,a))return i[a];return i[n]||i[o]||i[a]}}function Z(t,e,n,r){var i=e[t],o=!m(n,t),a=n[t];if(tt(Boolean,i.type)&&(o&&!m(i,"default")?a=!1:tt(String,i.type)||""!==a&&a!==co(t)||(a=!0)),void 0===a){a=J(r,i,t);var s=Yo.shouldConvert;Yo.shouldConvert=!0,N(a),Yo.shouldConvert=s}return a}function J(t,e,n){if(m(e,"default")){var r=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"==typeof r&&"Function"!==$(e.type)?r.call(t):r}}function $(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function tt(t,e){if(!Array.isArray(e))return $(e)===$(t);for(var n=0,r=e.length;n<r;n++)if($(e[n])===$(t))return!0;return!1}function et(t,e,n){if(e)for(var r=e;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{var a=!1===i[o].call(r,t,e,n);if(a)return}catch(t){nt(t,r,"errorCaptured hook")}}nt(t,e,n)}function nt(t,e,n){if(go.errorHandler)try{return go.errorHandler.call(null,t,e,n)}catch(t){rt(t,null,"config.errorHandler")}rt(t,e,n)}function rt(t,e,n){if(!_o&&!bo||"undefined"==typeof console)throw t;console.error(t)}function it(){ta=!1;var t=$o.slice(0);$o.length=0;for(var e=0;e<t.length;e++)t[e]()}function ot(t){return t._withTask||(t._withTask=function(){ea=!0;var e=t.apply(null,arguments);return ea=!1,e})}function at(t,e){var n;if($o.push(function(){if(t)try{t.call(e)}catch(t){et(t,e,"nextTick")}else n&&n(e)}),ta||(ta=!0,ea?Zo():Xo()),!t&&"undefined"!=typeof Promise)return new Promise(function(t){n=t})}function st(t){ut(t,aa),aa.clear()}function ut(t,e){var n,r,i=Array.isArray(t);if((i||u(t))&&!Object.isFrozen(t)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(i)for(n=t.length;n--;)ut(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)ut(t[r[n]],e)}}function lt(t){function e(){var t=arguments,n=e.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),i=0;i<r.length;i++)r[i].apply(null,t)}return e.fns=t,e}function ct(t,e,n,i,o){var a,s,u,l;for(a in t)s=t[a],u=e[a],l=sa(a),r(s)||(r(u)?(r(s.fns)&&(s=t[a]=lt(s)),n(l.name,s,l.once,l.capture,l.passive,l.params)):s!==u&&(u.fns=s,t[a]=u));for(a in e)r(t[a])&&(l=sa(a),i(l.name,e[a],l.capture))}function dt(t,e,n){function a(){n.apply(this,arguments),v(s.fns,a)}t instanceof Go&&(t=t.data.hook||(t.data.hook={}));var s,u=t[e];r(u)?s=lt([a]):i(u.fns)&&o(u.merged)?(s=u,s.fns.push(a)):s=lt([u,a]),s.merged=!0,t[e]=s}function ht(t,e,n){var o=e.options.props;if(!r(o)){var a={},s=t.attrs,u=t.props;if(i(s)||i(u))for(var l in o){var c=co(l);ft(a,u,l,c,!0)||ft(a,s,l,c,!1)}return a}}function ft(t,e,n,r,o){if(i(e)){if(m(e,n))return t[n]=e[n],o||delete e[n],!0;if(m(e,r))return t[n]=e[r],o||delete e[r],!0}return!1}function pt(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}function vt(t){return s(t)?[O(t)]:Array.isArray(t)?gt(t):void 0}function mt(t){return i(t)&&i(t.text)&&a(t.isComment)}function gt(t,e){var n,a,u,l,c=[];for(n=0;n<t.length;n++)a=t[n],r(a)||"boolean"==typeof a||(u=c.length-1,l=c[u],Array.isArray(a)?a.length>0&&(a=gt(a,(e||"")+"_"+n),mt(a[0])&&mt(l)&&(c[u]=O(l.text+a[0].text),a.shift()),c.push.apply(c,a)):s(a)?mt(l)?c[u]=O(l.text+a):""!==a&&c.push(O(a)):mt(a)&&mt(l)?c[u]=O(l.text+a.text):(o(t._isVList)&&i(a.tag)&&r(a.key)&&i(e)&&(a.key="__vlist"+e+"_"+n+"__"),c.push(a)));return c}function yt(t,e){return(t.__esModule||Po&&"Module"===t[Symbol.toStringTag])&&(t=t.default),u(t)?e.extend(t):t}function At(t,e,n,r,i){var o=Vo();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:r,tag:i},o}function _t(t,e,n){if(o(t.error)&&i(t.errorComp))return t.errorComp;if(i(t.resolved))return t.resolved;if(o(t.loading)&&i(t.loadingComp))return t.loadingComp;if(!i(t.contexts)){var a=t.contexts=[n],s=!0,l=function(){for(var t=0,e=a.length;t<e;t++)a[t].$forceUpdate()},c=w(function(n){t.resolved=yt(n,e),s||l()}),d=w(function(e){i(t.errorComp)&&(t.error=!0,l())}),h=t(c,d);return u(h)&&("function"==typeof h.then?r(t.resolved)&&h.then(c,d):i(h.component)&&"function"==typeof h.component.then&&(h.component.then(c,d),i(h.error)&&(t.errorComp=yt(h.error,e)),i(h.loading)&&(t.loadingComp=yt(h.loading,e),0===h.delay?t.loading=!0:setTimeout(function(){r(t.resolved)&&r(t.error)&&(t.loading=!0,l())},h.delay||200)),i(h.timeout)&&setTimeout(function(){r(t.resolved)&&d(null)},h.timeout))),s=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(n)}function bt(t){return t.isComment&&t.asyncFactory}function Tt(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(i(n)&&(i(n.componentOptions)||bt(n)))return n}}function St(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&kt(t,e)}function Et(t,e,n){n?oa.$once(t,e):oa.$on(t,e)}function wt(t,e){oa.$off(t,e)}function kt(t,e,n){oa=t,ct(e,n||{},Et,wt,t),oa=void 0}function Ct(t,e){var n={};if(!t)return n;for(var r=0,i=t.length;r<i;r++){var o=t[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==e&&o.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,u=n[s]||(n[s]=[]);"template"===o.tag?u.push.apply(u,o.children||[]):u.push(o)}}for(var l in n)n[l].every(Lt)&&delete n[l];return n}function Lt(t){return t.isComment&&!t.asyncFactory||" "===t.text}function It(t,e){e=e||{};for(var n=0;n<t.length;n++)Array.isArray(t[n])?It(t[n],e):e[t[n].key]=t[n].fn;return e}function xt(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}function Rt(t,e,n){t.$el=e,t.$options.render||(t.$options.render=Vo),Pt(t,"beforeMount");var r;return r=function(){t._update(t._render(),n)},new ma(t,r,T,null,!0),n=!1,null==t.$vnode&&(t._isMounted=!0,Pt(t,"mounted")),t}function Ot(t,e,n,r,i){var o=!!(i||t.$options._renderChildren||r.data.scopedSlots||t.$scopedSlots!==eo);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=i,t.$attrs=r.data&&r.data.attrs||eo,t.$listeners=n||eo,e&&t.$options.props){Yo.shouldConvert=!1;for(var a=t._props,s=t.$options._propKeys||[],u=0;u<s.length;u++){var l=s[u];a[l]=Z(l,t.$options.props,e,t)}Yo.shouldConvert=!0,t.$options.propsData=e}if(n){var c=t.$options._parentListeners;t.$options._parentListeners=n,kt(t,n,c)}o&&(t.$slots=Ct(i,r.context),t.$forceUpdate())}function Dt(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Mt(t,e){if(e){if(t._directInactive=!1,Dt(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Mt(t.$children[n]);Pt(t,"activated")}}function jt(t,e){if(!(e&&(t._directInactive=!0,Dt(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)jt(t.$children[n]);Pt(t,"deactivated")}}function Pt(t,e){var n=t.$options[e];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(t)}catch(n){et(n,t,e+" hook")}t._hasHookEvent&&t.$emit("hook:"+e)}function Nt(){pa=la.length=ca.length=0,da={},ha=fa=!1}function Ut(){fa=!0;var t,e;for(la.sort(function(t,e){return t.id-e.id}),pa=0;pa<la.length;pa++)t=la[pa],e=t.id,da[e]=null,t.run();var n=ca.slice(),r=la.slice();Nt(),Gt(n),Bt(r),jo&&go.devtools&&jo.emit("flush")}function Bt(t){for(var e=t.length;e--;){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&Pt(r,"updated")}}function Ft(t){t._inactive=!1,ca.push(t)}function Gt(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Mt(t[e],!0)}function zt(t){var e=t.id;if(null==da[e]){if(da[e]=!0,fa){for(var n=la.length-1;n>pa&&la[n].id>t.id;)n--;la.splice(n+1,0,t)}else la.push(t);ha||(ha=!0,at(Ut))}}function Vt(t,e,n){ga.get=function(){return this[e][n]},ga.set=function(t){this[e][n]=t},Object.defineProperty(t,n,ga)}function Ht(t){t._watchers=[];var e=t.$options;e.props&&Wt(t,e.props),e.methods&&Zt(t,e.methods),e.data?Qt(t):N(t._data={},!0),e.computed&&qt(t,e.computed),e.watch&&e.watch!==Io&&Jt(t,e.watch)}function Wt(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[],o=!t.$parent;Yo.shouldConvert=o;for(var a in e)!function(o){i.push(o);var a=Z(o,e,n,t);U(r,o,a),o in t||Vt(t,"_props",o)}(a);Yo.shouldConvert=!0}function Qt(t){var e=t.$options.data;e=t._data="function"==typeof e?Yt(e,t):e||{},l(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);i--;){var o=n[i];r&&m(r,o)||k(o)||Vt(t,"_data",o)}N(e,!0)}function Yt(t,e){try{return t.call(e,e)}catch(t){return et(t,e,"data()"),{}}}function qt(t,e){var n=t._computedWatchers=Object.create(null),r=Mo();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;r||(n[i]=new ma(t,a||T,T,ya)),i in t||Kt(t,i,o)}}function Kt(t,e,n){var r=!Mo();"function"==typeof n?(ga.get=r?Xt(e):n,ga.set=T):(ga.get=n.get?r&&!1!==n.cache?Xt(e):n.get:T,ga.set=n.set?n.set:T),Object.defineProperty(t,e,ga)}function Xt(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Bo.target&&e.depend(),e.value}}function Zt(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?T:y(e[n],t)}function Jt(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)$t(t,n,r[i]);else $t(t,n,r)}}function $t(t,e,n,r){return l(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function te(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}function ee(t){var e=ne(t.$options.inject,t);e&&(Yo.shouldConvert=!1,Object.keys(e).forEach(function(n){U(t,n,e[n])}),Yo.shouldConvert=!0)}function ne(t,e){if(t){for(var n=Object.create(null),r=Po?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),i=0;i<r.length;i++){for(var o=r[i],a=t[o].from,s=e;s;){if(s._provided&&a in s._provided){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var u=t[o].default;n[o]="function"==typeof u?u.call(e):u}}return n}}function re(t,e){var n,r,o,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,o=t.length;r<o;r++)n[r]=e(t[r],r);else if("number"==typeof t)for(n=new Array(t),r=0;r<t;r++)n[r]=e(r+1,r);else if(u(t))for(a=Object.keys(t),n=new Array(a.length),r=0,o=a.length;r<o;r++)s=a[r],n[r]=e(t[s],s,r);return i(n)&&(n._isVList=!0),n}function ie(t,e,n,r){var i,o=this.$scopedSlots[t];if(o)n=n||{},r&&(n=_(_({},r),n)),i=o(n)||e;else{var a=this.$slots[t];a&&(a._rendered=!0),i=a||e}var s=n&&n.slot;return s?this.$createElement("template",{slot:s},i):i}function oe(t){return X(this.$options,"filters",t,!0)||fo}function ae(t,e,n,r){var i=go.keyCodes[e]||n;return i?Array.isArray(i)?-1===i.indexOf(t):i!==t:r?co(r)!==e:void 0}function se(t,e,n,r,i){if(n)if(u(n)){Array.isArray(n)&&(n=b(n));var o;for(var a in n)!function(a){if("class"===a||"style"===a||io(a))o=t;else{var s=t.attrs&&t.attrs.type;o=r||go.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}if(!(a in o)&&(o[a]=n[a],i)){(t.on||(t.on={}))["update:"+a]=function(t){n[a]=t}}}(a)}else;return t}function ue(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e?Array.isArray(r)?M(r):D(r):(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),ce(r,"__static__"+t,!1),r)}function le(t,e,n){return ce(t,"__once__"+e+(n?"_"+n:""),!0),t}function ce(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!=typeof t[r]&&de(t[r],e+"_"+r,n);else de(t,e,n)}function de(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function he(t,e){if(e)if(l(e)){var n=t.on=t.on?_({},t.on):{};for(var r in e){var i=n[r],o=e[r];n[r]=i?[].concat(i,o):o}}else;return t}function fe(t){t._o=le,t._n=f,t._s=h,t._l=re,t._t=ie,t._q=S,t._i=E,t._m=ue,t._f=oe,t._k=ae,t._b=se,t._v=O,t._e=Vo,t._u=It,t._g=he}function pe(t,e,n,r,i){var a=i.options;this.data=t,this.props=e,this.children=n,this.parent=r,this.listeners=t.on||eo,this.injections=ne(a.inject,r),this.slots=function(){return Ct(n,r)};var s=Object.create(r),u=o(a._compiled),l=!u;u&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=t.scopedSlots||eo),a._scopeId?this._c=function(t,e,n,i){var o=Te(s,t,e,n,i,l);return o&&(o.fnScopeId=a._scopeId,o.fnContext=r),o}:this._c=function(t,e,n,r){return Te(s,t,e,n,r,l)}}function ve(t,e,n,r,o){var a=t.options,s={},u=a.props;if(i(u))for(var l in u)s[l]=Z(l,u,e||eo);else i(n.attrs)&&me(s,n.attrs),i(n.props)&&me(s,n.props);var c=new pe(n,s,o,r,t),d=a.render.call(null,c._c,c);return d instanceof Go&&(d.fnContext=r,d.fnOptions=a,n.slot&&((d.data||(d.data={})).slot=n.slot)),d}function me(t,e){for(var n in e)t[so(n)]=e[n]}function ge(t,e,n,a,s){if(!r(t)){var l=n.$options._base;if(u(t)&&(t=l.extend(t)),"function"==typeof t){var c;if(r(t.cid)&&(c=t,void 0===(t=_t(c,l,n))))return At(c,e,n,a,s);e=e||{},Ce(t),i(e.model)&&be(t.options,e);var d=ht(e,t,s);if(o(t.options.functional))return ve(t,d,e,n,a);var h=e.on;if(e.on=e.nativeOn,o(t.options.abstract)){var f=e.slot;e={},f&&(e.slot=f)}Ae(e);var p=t.options.name||s;return new Go("vue-component-"+t.cid+(p?"-"+p:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:d,listeners:h,tag:s,children:a},c)}}}function ye(t,e,n,r){var o={_isComponent:!0,parent:e,_parentVnode:t,_parentElm:n||null,_refElm:r||null},a=t.data.inlineTemplate;return i(a)&&(o.render=a.render,o.staticRenderFns=a.staticRenderFns),new t.componentOptions.Ctor(o)}function Ae(t){t.hook||(t.hook={});for(var e=0;e<_a.length;e++){var n=_a[e],r=t.hook[n],i=Aa[n];t.hook[n]=r?_e(i,r):i}}function _e(t,e){return function(n,r,i,o){t(n,r,i,o),e(n,r,i,o)}}function be(t,e){var n=t.model&&t.model.prop||"value",r=t.model&&t.model.event||"input";(e.props||(e.props={}))[n]=e.model.value;var o=e.on||(e.on={});i(o[r])?o[r]=[e.model.callback].concat(o[r]):o[r]=e.model.callback}function Te(t,e,n,r,i,a){return(Array.isArray(n)||s(n))&&(i=r,r=n,n=void 0),o(a)&&(i=Ta),Se(t,e,n,r,i)}function Se(t,e,n,r,o){if(i(n)&&i(n.__ob__))return Vo();if(i(n)&&i(n.is)&&(e=n.is),!e)return Vo();Array.isArray(r)&&"function"==typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),o===Ta?r=vt(r):o===ba&&(r=pt(r));var a,s;if("string"==typeof e){var u;s=t.$vnode&&t.$vnode.ns||go.getTagNamespace(e),a=go.isReservedTag(e)?new Go(go.parsePlatformTagName(e),n,r,void 0,void 0,t):i(u=X(t.$options,"components",e))?ge(u,n,t,r,e):new Go(e,n,r,void 0,void 0,t)}else a=ge(e,n,t,r);return i(a)?(s&&Ee(a,s),a):Vo()}function Ee(t,e,n){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,n=!0),i(t.children))for(var a=0,s=t.children.length;a<s;a++){var u=t.children[a];i(u.tag)&&(r(u.ns)||o(n))&&Ee(u,e,n)}}function we(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,r=n&&n.context;t.$slots=Ct(e._renderChildren,r),t.$scopedSlots=eo,t._c=function(e,n,r,i){return Te(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Te(t,e,n,r,i,!0)};var i=n&&n.data;U(t,"$attrs",i&&i.attrs||eo,null,!0),U(t,"$listeners",e._parentListeners||eo,null,!0)}function ke(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r,n._parentElm=e._parentElm,n._refElm=e._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}function Ce(t){var e=t.options;if(t.super){var n=Ce(t.super);if(n!==t.superOptions){t.superOptions=n;var r=Le(t);r&&_(t.extendOptions,r),e=t.options=K(n,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function Le(t){var e,n=t.options,r=t.extendOptions,i=t.sealedOptions;for(var o in n)n[o]!==i[o]&&(e||(e={}),e[o]=Ie(n[o],r[o],i[o]));return e}function Ie(t,e,n){if(Array.isArray(t)){var r=[];n=Array.isArray(n)?n:[n],e=Array.isArray(e)?e:[e];for(var i=0;i<t.length;i++)(e.indexOf(t[i])>=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}function xe(t){this._init(t)}function Re(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=A(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function Oe(t){t.mixin=function(t){return this.options=K(this.options,t),this}}function De(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=K(n.options,t),a.super=n,a.options.props&&Me(a),a.options.computed&&je(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,vo.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=_({},a.options),i[r]=a,a}}function Me(t){var e=t.options.props;for(var n in e)Vt(t.prototype,"_props",n)}function je(t){var e=t.options.computed;for(var n in e)Kt(t.prototype,n,e[n])}function Pe(t){vo.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&l(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Ne(t){return t&&(t.Ctor.options.name||t.tag)}function Ue(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!c(t)&&t.test(e)}function Be(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=Ne(a.componentOptions);s&&!e(s)&&Fe(n,o,r,i)}}}function Fe(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,v(n,e)}function Ge(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=ze(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=ze(e,n.data));return Ve(e.staticClass,e.class)}function ze(t,e){return{staticClass:He(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Ve(t,e){return i(t)||i(e)?He(t,We(e)):""}function He(t,e){return t?e?t+" "+e:t:e||""}function We(t){return Array.isArray(t)?Qe(t):u(t)?Ye(t):"string"==typeof t?t:""}function Qe(t){for(var e,n="",r=0,o=t.length;r<o;r++)i(e=We(t[r]))&&""!==e&&(n&&(n+=" "),n+=e);return n}function Ye(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}function qe(t){return Ya(t)?"svg":"math"===t?"math":void 0}function Ke(t){if(!_o)return!0;if(Ka(t))return!1;if(t=t.toLowerCase(),null!=Xa[t])return Xa[t];var e=document.createElement(t);return t.indexOf("-")>-1?Xa[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Xa[t]=/HTMLUnknownElement/.test(e.toString())}function Xe(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function Ze(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Je(t,e){return document.createElementNS(Wa[t],e)}function $e(t){return document.createTextNode(t)}function tn(t){return document.createComment(t)}function en(t,e,n){t.insertBefore(e,n)}function nn(t,e){t.removeChild(e)}function rn(t,e){t.appendChild(e)}function on(t){return t.parentNode}function an(t){return t.nextSibling}function sn(t){return t.tagName}function un(t,e){t.textContent=e}function ln(t,e,n){t.setAttribute(e,n)}function cn(t,e){var n=t.data.ref;if(n){var r=t.context,i=t.componentInstance||t.elm,o=r.$refs;e?Array.isArray(o[n])?v(o[n],i):o[n]===i&&(o[n]=void 0):t.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}function dn(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&i(t.data)===i(e.data)&&hn(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function hn(t,e){if("input"!==t.tag)return!0;var n,r=i(n=t.data)&&i(n=n.attrs)&&n.type,o=i(n=e.data)&&i(n=n.attrs)&&n.type;return r===o||Za(r)&&Za(o)}function fn(t,e,n){var r,o,a={};for(r=e;r<=n;++r)o=t[r].key,i(o)&&(a[o]=r);return a}function pn(t,e){(t.data.directives||e.data.directives)&&vn(t,e)}function vn(t,e){var n,r,i,o=t===ts,a=e===ts,s=mn(t.data.directives,t.context),u=mn(e.data.directives,e.context),l=[],c=[];for(n in u)r=s[n],i=u[n],r?(i.oldValue=r.value,yn(i,"update",e,t),i.def&&i.def.componentUpdated&&c.push(i)):(yn(i,"bind",e,t),i.def&&i.def.inserted&&l.push(i));if(l.length){var d=function(){for(var n=0;n<l.length;n++)yn(l[n],"inserted",e,t)};o?dt(e,"insert",d):d()}if(c.length&&dt(e,"postpatch",function(){for(var n=0;n<c.length;n++)yn(c[n],"componentUpdated",e,t)}),!o)for(n in s)u[n]||yn(s[n],"unbind",t,t,a)}function mn(t,e){var n=Object.create(null);if(!t)return n;var r,i;for(r=0;r<t.length;r++)i=t[r],i.modifiers||(i.modifiers=rs),n[gn(i)]=i,i.def=X(e.$options,"directives",i.name,!0);return n}function gn(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function yn(t,e,n,r,i){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,r,i)}catch(r){et(r,n.context,"directive "+t.name+" "+e+" hook")}}function An(t,e){var n=e.componentOptions;if(!(i(n)&&!1===n.Ctor.options.inheritAttrs||r(t.data.attrs)&&r(e.data.attrs))){var o,a,s=e.elm,u=t.data.attrs||{},l=e.data.attrs||{};i(l.__ob__)&&(l=e.data.attrs=_({},l));for(o in l)a=l[o],u[o]!==a&&_n(s,o,a);(Eo||ko)&&l.value!==u.value&&_n(s,"value",l.value);for(o in u)r(l[o])&&(za(o)?s.removeAttributeNS(Ga,Va(o)):Ba(o)||s.removeAttribute(o))}}function _n(t,e,n){if(Fa(e))Ha(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n));else if(Ba(e))t.setAttribute(e,Ha(n)||"false"===n?"false":"true");else if(za(e))Ha(n)?t.removeAttributeNS(Ga,Va(e)):t.setAttributeNS(Ga,e,n);else if(Ha(n))t.removeAttribute(e);else{if(Eo&&!wo&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}function bn(t,e){var n=e.elm,o=e.data,a=t.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Ge(e),u=n._transitionClasses;i(u)&&(s=He(s,We(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}function Tn(t){function e(){(a||(a=[])).push(t.slice(p,i).trim()),p=i+1}var n,r,i,o,a,s=!1,u=!1,l=!1,c=!1,d=0,h=0,f=0,p=0;for(i=0;i<t.length;i++)if(r=n,n=t.charCodeAt(i),s)39===n&&92!==r&&(s=!1);else if(u)34===n&&92!==r&&(u=!1);else if(l)96===n&&92!==r&&(l=!1);else if(c)47===n&&92!==r&&(c=!1);else if(124!==n||124===t.charCodeAt(i+1)||124===t.charCodeAt(i-1)||d||h||f){switch(n){case 34:u=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:f++;break;case 41:f--;break;case 91:h++;break;case 93:h--;break;case 123:d++;break;case 125:d--}if(47===n){for(var v=i-1,m=void 0;v>=0&&" "===(m=t.charAt(v));v--);m&&ss.test(m)||(c=!0)}}else void 0===o?(p=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==p&&e(),a)for(i=0;i<a.length;i++)o=Sn(o,a[i]);return o}function Sn(t,e){var n=e.indexOf("(");return n<0?'_f("'+e+'")('+t+")":'_f("'+e.slice(0,n)+'")('+t+","+e.slice(n+1)}function En(t){console.error("[Vue compiler]: "+t)}function wn(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function kn(t,e,n){(t.props||(t.props=[])).push({name:e,value:n}),t.plain=!1}function Cn(t,e,n){(t.attrs||(t.attrs=[])).push({name:e,value:n}),t.plain=!1}function Ln(t,e,n){t.attrsMap[e]=n,t.attrsList.push({name:e,value:n})}function In(t,e,n,r,i,o){(t.directives||(t.directives=[])).push({name:e,rawName:n,value:r,arg:i,modifiers:o}),t.plain=!1}function xn(t,e,n,r,i,o){r=r||eo,r.capture&&(delete r.capture,e="!"+e),r.once&&(delete r.once,e="~"+e),r.passive&&(delete r.passive,e="&"+e),"click"===e&&(r.right?(e="contextmenu",delete r.right):r.middle&&(e="mouseup"));var a;r.native?(delete r.native,a=t.nativeEvents||(t.nativeEvents={})):a=t.events||(t.events={});var s={value:n};r!==eo&&(s.modifiers=r);var u=a[e];Array.isArray(u)?i?u.unshift(s):u.push(s):a[e]=u?i?[s,u]:[u,s]:s,t.plain=!1}function Rn(t,e,n){var r=On(t,":"+e)||On(t,"v-bind:"+e);if(null!=r)return Tn(r);if(!1!==n){var i=On(t,e);if(null!=i)return JSON.stringify(i)}}function On(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var i=t.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===e){i.splice(o,1);break}return n&&delete t.attrsMap[e],r}function Dn(t,e,n){var r=n||{},i=r.number,o=r.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=Mn(e,a);t.model={value:"("+e+")",expression:'"'+e+'"',callback:"function ($$v) {"+s+"}"}}function Mn(t,e){var n=jn(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function jn(t){if(Ca=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Ca-1)return xa=t.lastIndexOf("."),xa>-1?{exp:t.slice(0,xa),key:'"'+t.slice(xa+1)+'"'}:{exp:t,key:null};for(La=t,xa=Ra=Oa=0;!Nn();)Ia=Pn(),Un(Ia)?Fn(Ia):91===Ia&&Bn(Ia);return{exp:t.slice(0,Ra),key:t.slice(Ra+1,Oa)}}function Pn(){return La.charCodeAt(++xa)}function Nn(){return xa>=Ca}function Un(t){return 34===t||39===t}function Bn(t){var e=1;for(Ra=xa;!Nn();)if(t=Pn(),Un(t))Fn(t);else if(91===t&&e++,93===t&&e--,0===e){Oa=xa;break}}function Fn(t){for(var e=t;!Nn()&&(t=Pn())!==e;);}function Gn(t,e,n){Da=n;var r=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return Dn(t,r,i),!1;if("select"===o)Hn(t,r,i);else if("input"===o&&"checkbox"===a)zn(t,r,i);else if("input"===o&&"radio"===a)Vn(t,r,i);else if("input"===o||"textarea"===o)Wn(t,r,i);else if(!go.isReservedTag(o))return Dn(t,r,i),!1;return!0}function zn(t,e,n){var r=n&&n.number,i=Rn(t,"value")||"null",o=Rn(t,"true-value")||"true",a=Rn(t,"false-value")||"false";kn(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),xn(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+e+"=$$a.concat([$$v]))}else{$$i>-1&&("+e+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+Mn(e,"$$c")+"}",null,!0)}function Vn(t,e,n){var r=n&&n.number,i=Rn(t,"value")||"null";i=r?"_n("+i+")":i,kn(t,"checked","_q("+e+","+i+")"),xn(t,"change",Mn(e,i),null,!0)}function Hn(t,e,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+Mn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),xn(t,"change",o,null,!0)}function Wn(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,u=!o&&"range"!==r,l=o?"change":"range"===r?us:"input",c="$event.target.value";s&&(c="$event.target.value.trim()"),a&&(c="_n("+c+")");var d=Mn(e,c);u&&(d="if($event.target.composing)return;"+d),kn(t,"value","("+e+")"),xn(t,l,d,null,!0),(s||a)&&xn(t,"blur","$forceUpdate()")}function Qn(t){if(i(t[us])){var e=Eo?"change":"input";t[e]=[].concat(t[us],t[e]||[]),delete t[us]}i(t[ls])&&(t.change=[].concat(t[ls],t.change||[]),delete t[ls])}function Yn(t,e,n){var r=Ma;return function i(){null!==t.apply(null,arguments)&&Kn(e,i,n,r)}}function qn(t,e,n,r,i){e=ot(e),n&&(e=Yn(e,t,r)),Ma.addEventListener(t,e,xo?{capture:r,passive:i}:r)}function Kn(t,e,n,r){(r||Ma).removeEventListener(t,e._withTask||e,n)}function Xn(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},i=t.data.on||{};Ma=e.elm,Qn(n),ct(n,i,qn,Kn,e.context),Ma=void 0}}function Zn(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,o,a=e.elm,s=t.data.domProps||{},u=e.data.domProps||{};i(u.__ob__)&&(u=e.data.domProps=_({},u));for(n in s)r(u[n])&&(a[n]="");for(n in u){if(o=u[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=o;var l=r(o)?"":String(o);Jn(a,l)&&(a.value=l)}else a[n]=o}}}function Jn(t,e){return!t.composing&&("OPTION"===t.tagName||$n(t,e)||tr(t,e))}function $n(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}function tr(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return f(n)!==f(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}function er(t){var e=nr(t.style);return t.staticStyle?_(t.staticStyle,e):e}function nr(t){return Array.isArray(t)?b(t):"string"==typeof t?hs(t):t}function rr(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=er(i.data))&&_(r,n);(n=er(t.data))&&_(r,n);for(var o=t;o=o.parent;)o.data&&(n=er(o.data))&&_(r,n);return r}function ir(t,e){var n=e.data,o=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(o.staticStyle)&&r(o.style))){var a,s,u=e.elm,l=o.staticStyle,c=o.normalizedStyle||o.style||{},d=l||c,h=nr(e.data.style)||{};e.data.normalizedStyle=i(h.__ob__)?_({},h):h;var f=rr(e,!0);for(s in d)r(f[s])&&vs(u,s,"");for(s in f)(a=f[s])!==d[s]&&vs(u,s,null==a?"":a)}}function or(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ar(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function sr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&_(e,As(t.name||"v")),_(e,t),e}return"string"==typeof t?As(t):void 0}}function ur(t){Cs(function(){Cs(t)})}function lr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),or(t,e))}function cr(t,e){t._transitionClasses&&v(t._transitionClasses,e),ar(t,e)}function dr(t,e,n){var r=hr(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===bs?Es:ks,u=0,l=function(){t.removeEventListener(s,c),n()},c=function(e){e.target===t&&++u>=a&&l()};setTimeout(function(){u<a&&l()},o+1),t.addEventListener(s,c)}function hr(t,e){var n,r=window.getComputedStyle(t),i=r[Ss+"Delay"].split(", "),o=r[Ss+"Duration"].split(", "),a=fr(i,o),s=r[ws+"Delay"].split(", "),u=r[ws+"Duration"].split(", "),l=fr(s,u),c=0,d=0;return e===bs?a>0&&(n=bs,c=a,d=o.length):e===Ts?l>0&&(n=Ts,c=l,d=u.length):(c=Math.max(a,l),n=c>0?a>l?bs:Ts:null,d=n?n===bs?o.length:u.length:0),{type:n,timeout:c,propCount:d,hasTransform:n===bs&&Ls.test(r[Ss+"Property"])}}function fr(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,n){return pr(e)+pr(t[n])}))}function pr(t){return 1e3*Number(t.slice(0,-1))}function vr(t,e){var n=t.elm;i(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var o=sr(t.data.transition);if(!r(o)&&!i(n._enterCb)&&1===n.nodeType){for(var a=o.css,s=o.type,l=o.enterClass,c=o.enterToClass,d=o.enterActiveClass,h=o.appearClass,p=o.appearToClass,v=o.appearActiveClass,m=o.beforeEnter,g=o.enter,y=o.afterEnter,A=o.enterCancelled,_=o.beforeAppear,b=o.appear,T=o.afterAppear,S=o.appearCancelled,E=o.duration,k=ua,C=ua.$vnode;C&&C.parent;)C=C.parent,k=C.context;var L=!k._isMounted||!t.isRootInsert;if(!L||b||""===b){var I=L&&h?h:l,x=L&&v?v:d,R=L&&p?p:c,O=L?_||m:m,D=L&&"function"==typeof b?b:g,M=L?T||y:y,j=L?S||A:A,P=f(u(E)?E.enter:E),N=!1!==a&&!wo,U=yr(D),B=n._enterCb=w(function(){N&&(cr(n,R),cr(n,x)),B.cancelled?(N&&cr(n,I),j&&j(n)):M&&M(n),n._enterCb=null});t.data.show||dt(t,"insert",function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),D&&D(n,B)}),O&&O(n),N&&(lr(n,I),lr(n,x),ur(function(){lr(n,R),cr(n,I),B.cancelled||U||(gr(P)?setTimeout(B,P):dr(n,s,B))})),t.data.show&&(e&&e(),D&&D(n,B)),N||U||B()}}}function mr(t,e){function n(){S.cancelled||(t.data.show||((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),p&&p(o),_&&(lr(o,c),lr(o,h),ur(function(){lr(o,d),cr(o,c),S.cancelled||b||(gr(T)?setTimeout(S,T):dr(o,l,S))})),v&&v(o,S),_||b||S())}var o=t.elm;i(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var a=sr(t.data.transition);if(r(a)||1!==o.nodeType)return e();if(!i(o._leaveCb)){var s=a.css,l=a.type,c=a.leaveClass,d=a.leaveToClass,h=a.leaveActiveClass,p=a.beforeLeave,v=a.leave,m=a.afterLeave,g=a.leaveCancelled,y=a.delayLeave,A=a.duration,_=!1!==s&&!wo,b=yr(v),T=f(u(A)?A.leave:A),S=o._leaveCb=w(function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),_&&(cr(o,d),cr(o,h)),S.cancelled?(_&&cr(o,c),g&&g(o)):(e(),m&&m(o)),o._leaveCb=null});y?y(n):n()}}function gr(t){return"number"==typeof t&&!isNaN(t)}function yr(t){if(r(t))return!1;var e=t.fns;return i(e)?yr(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Ar(t,e){!0!==e.data.show&&vr(e)}function _r(t,e,n){br(t,e,n),(Eo||ko)&&setTimeout(function(){br(t,e,n)},0)}function br(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,u=t.options.length;s<u;s++)if(a=t.options[s],i)o=E(r,Sr(a))>-1,a.selected!==o&&(a.selected=o);else if(S(Sr(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Tr(t,e){return e.every(function(e){return!S(e,t)})}function Sr(t){return"_value"in t?t._value:t.value}function Er(t){t.target.composing=!0}function wr(t){t.target.composing&&(t.target.composing=!1,kr(t.target,"input"))}function kr(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Cr(t){return!t.componentInstance||t.data&&t.data.transition?t:Cr(t.componentInstance._vnode)}function Lr(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Lr(Tt(e.children)):t}function Ir(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[so(o)]=i[o];return e}function xr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Rr(t){for(;t=t.parent;)if(t.data.transition)return!0}function Or(t,e){return e.key===t.key&&e.tag===t.tag}function Dr(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Mr(t){t.data.newPos=t.elm.getBoundingClientRect()}function jr(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function Pr(t,e){var n=e?Hs(e):zs;if(n.test(t)){for(var r,i,o,a=[],s=[],u=n.lastIndex=0;r=n.exec(t);){i=r.index,i>u&&(s.push(o=t.slice(u,i)),a.push(JSON.stringify(o)));var l=Tn(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),u=i+r[0].length}return u<t.length&&(s.push(o=t.slice(u)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}function Nr(t,e){var n=(e.warn,On(t,"class"));n&&(t.staticClass=JSON.stringify(n));var r=Rn(t,"class",!1);r&&(t.classBinding=r)}function Ur(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}function Br(t,e){var n=(e.warn,On(t,"style"));if(n){t.staticStyle=JSON.stringify(hs(n))}var r=Rn(t,"style",!1);r&&(t.styleBinding=r)}function Fr(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}function Gr(t,e){var n=e?Tu:bu;return t.replace(n,function(t){return _u[t]})}function zr(t,e){function n(e){c+=e,t=t.substring(e)}function r(t,n,r){var i,s;if(null==n&&(n=c),null==r&&(r=c),t&&(s=t.toLowerCase()),t)for(i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var u=a.length-1;u>=i;u--)e.end&&e.end(a[u].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var i,o,a=[],s=e.expectHTML,u=e.isUnaryTag||ho,l=e.canBeLeftOpenTag||ho,c=0;t;){if(i=t,o&&yu(o)){var d=0,h=o.toLowerCase(),f=Au[h]||(Au[h]=new RegExp("([\\s\\S]*?)(</"+h+"[^>]*>)","i")),p=t.replace(f,function(t,n,r){return d=r.length,yu(h)||"noscript"===h||(n=n.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Eu(h,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});c+=t.length-p.length,t=p,r(h,c-d,c)}else{var v=t.indexOf("<");if(0===v){if(iu.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(ou.test(t)){var g=t.indexOf("]>");if(g>=0){n(g+2);continue}}var y=t.match(ru);if(y){n(y[0].length);continue}var A=t.match(nu);if(A){var _=c;n(A[0].length),r(A[1],_,c);continue}var b=function(){var e=t.match(tu);if(e){var r={tagName:e[1],attrs:[],start:c};n(e[0].length);for(var i,o;!(i=t.match(eu))&&(o=t.match(Zs));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=c,r}}();if(b){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&Xs(n)&&r(o),l(n)&&o===n&&r(n));for(var c=u(n)||!!i,d=t.attrs.length,h=new Array(d),f=0;f<d;f++){var p=t.attrs[f];au&&-1===p[0].indexOf('""')&&(""===p[3]&&delete p[3],""===p[4]&&delete p[4],""===p[5]&&delete p[5]);var v=p[3]||p[4]||p[5]||"",m="a"===n&&"href"===p[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;h[f]={name:p[1],value:Gr(v,m)}}c||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:h}),o=n),e.start&&e.start(n,h,c,t.start,t.end)}(b),Eu(o,t)&&n(1);continue}}var T=void 0,S=void 0,E=void 0;if(v>=0){for(S=t.slice(v);!(nu.test(S)||tu.test(S)||iu.test(S)||ou.test(S)||(E=S.indexOf("<",1))<0);)v+=E,S=t.slice(v);T=t.substring(0,v),n(v)}v<0&&(T=t,t=""),e.chars&&T&&e.chars(T)}if(t===i){e.chars&&e.chars(t);break}}r()}function Vr(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:ui(e),parent:n,children:[]}}function Hr(t,e){function n(t){t.pre&&(s=!1),hu(t.tag)&&(u=!1);for(var n=0;n<du.length;n++)du[n](t,e)}su=e.warn||En,hu=e.isPreTag||ho,fu=e.mustUseProp||ho,pu=e.getTagNamespace||ho,lu=wn(e.modules,"transformNode"),cu=wn(e.modules,"preTransformNode"),du=wn(e.modules,"postTransformNode"),uu=e.delimiters;var r,i,o=[],a=!1!==e.preserveWhitespace,s=!1,u=!1;return zr(t,{warn:su,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,a,l){var c=i&&i.ns||pu(t);Eo&&"svg"===c&&(a=di(a));var d=Vr(t,a,i);c&&(d.ns=c),ci(d)&&!Mo()&&(d.forbidden=!0);for(var h=0;h<cu.length;h++)d=cu[h](d,e)||d;if(s||(Wr(d),d.pre&&(s=!0)),hu(d.tag)&&(u=!0),s?Qr(d):d.processed||(Xr(d),Jr(d),ni(d),Yr(d,e)),r?o.length||r.if&&(d.elseif||d.else)&&ei(r,{exp:d.elseif,block:d}):r=d,i&&!d.forbidden)if(d.elseif||d.else)$r(d,i);else if(d.slotScope){i.plain=!1;var f=d.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[f]=d}else i.children.push(d),d.parent=i;l?n(d):(i=d,o.push(d))},end:function(){var t=o[o.length-1],e=t.children[t.children.length-1];e&&3===e.type&&" "===e.text&&!u&&t.children.pop(),o.length-=1,i=o[o.length-1],n(t)},chars:function(t){if(i&&(!Eo||"textarea"!==i.tag||i.attrsMap.placeholder!==t)){var e=i.children;if(t=u||t.trim()?li(i)?t:Du(t):a&&e.length?" ":""){var n;!s&&" "!==t&&(n=Pr(t,uu))?e.push({type:2,expression:n.expression,tokens:n.tokens,text:t}):" "===t&&e.length&&" "===e[e.length-1].text||e.push({type:3,text:t})}}},comment:function(t){i.children.push({type:3,text:t,isComment:!0})}}),r}function Wr(t){null!=On(t,"v-pre")&&(t.pre=!0)}function Qr(t){var e=t.attrsList.length;if(e)for(var n=t.attrs=new Array(e),r=0;r<e;r++)n[r]={name:t.attrsList[r].name,value:JSON.stringify(t.attrsList[r].value)};else t.pre||(t.plain=!0)}function Yr(t,e){qr(t),t.plain=!t.key&&!t.attrsList.length,Kr(t),ri(t),ii(t);for(var n=0;n<lu.length;n++)t=lu[n](t,e)||t;oi(t)}function qr(t){var e=Rn(t,"key");e&&(t.key=e)}function Kr(t){var e=Rn(t,"ref");e&&(t.ref=e,t.refInFor=ai(t))}function Xr(t){var e;if(e=On(t,"v-for")){var n=Zr(e);n&&_(t,n)}}function Zr(t){var e=t.match(Cu);if(e){var n={};n.for=e[2].trim();var r=e[1].trim().replace(Iu,""),i=r.match(Lu);return i?(n.alias=r.replace(Lu,""),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r,n}}function Jr(t){var e=On(t,"v-if");if(e)t.if=e,ei(t,{exp:e,block:t});else{null!=On(t,"v-else")&&(t.else=!0);var n=On(t,"v-else-if");n&&(t.elseif=n)}}function $r(t,e){var n=ti(e.children);n&&n.if&&ei(n,{exp:t.elseif,block:t})}function ti(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}function ei(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function ni(t){null!=On(t,"v-once")&&(t.once=!0)}function ri(t){if("slot"===t.tag)t.slotName=Rn(t,"name");else{var e;"template"===t.tag?(e=On(t,"scope"),t.slotScope=e||On(t,"slot-scope")):(e=On(t,"slot-scope"))&&(t.slotScope=e);var n=Rn(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,"template"===t.tag||t.slotScope||Cn(t,"slot",n))}}function ii(t){var e;(e=Rn(t,"is"))&&(t.component=e),null!=On(t,"inline-template")&&(t.inlineTemplate=!0)}function oi(t){var e,n,r,i,o,a,s,u=t.attrsList;for(e=0,n=u.length;e<n;e++)if(r=i=u[e].name,o=u[e].value,ku.test(r))if(t.hasBindings=!0,a=si(r),a&&(r=r.replace(Ou,"")),Ru.test(r))r=r.replace(Ru,""),o=Tn(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=so(r))&&(r="innerHTML")),a.camel&&(r=so(r)),a.sync&&xn(t,"update:"+so(r),Mn(o,"$event"))),s||!t.component&&fu(t.tag,t.attrsMap.type,r)?kn(t,r,o):Cn(t,r,o);else if(wu.test(r))r=r.replace(wu,""),xn(t,r,o,a,!1,su);else{r=r.replace(ku,"");var l=r.match(xu),c=l&&l[1];c&&(r=r.slice(0,-(c.length+1))),In(t,r,i,o,c,a)}else{Cn(t,r,JSON.stringify(o)),!t.component&&"muted"===r&&fu(t.tag,t.attrsMap.type,r)&&kn(t,r,"true")}}function ai(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}function si(t){var e=t.match(Ou);if(e){var n={};return e.forEach(function(t){n[t.slice(1)]=!0}),n}}function ui(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}function li(t){return"script"===t.tag||"style"===t.tag}function ci(t){return"style"===t.tag||"script"===t.tag&&(!t.attrsMap.type||"text/javascript"===t.attrsMap.type)}function di(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Mu.test(r.name)||(r.name=r.name.replace(ju,""),e.push(r))}return e}function hi(t,e){if("input"===t.tag){var n=t.attrsMap;if(n["v-model"]&&(n["v-bind:type"]||n[":type"])){var r=Rn(t,"type"),i=On(t,"v-if",!0),o=i?"&&("+i+")":"",a=null!=On(t,"v-else",!0),s=On(t,"v-else-if",!0),u=fi(t);Xr(u),Ln(u,"type","checkbox"),Yr(u,e),u.processed=!0,u.if="("+r+")==='checkbox'"+o,ei(u,{exp:u.if,block:u});var l=fi(t);On(l,"v-for",!0),Ln(l,"type","radio"),Yr(l,e),ei(u,{exp:"("+r+")==='radio'"+o,block:l});var c=fi(t);return On(c,"v-for",!0),Ln(c,":type",r),Yr(c,e),ei(u,{exp:i,block:c}),a?u.else=!0:s&&(u.elseif=s),u}}}function fi(t){return Vr(t.tag,t.attrsList.slice(),t.parent)}function pi(t,e){e.value&&kn(t,"textContent","_s("+e.value+")")}function vi(t,e){e.value&&kn(t,"innerHTML","_s("+e.value+")")}function mi(t,e){t&&(vu=Fu(e.staticKeys||""),mu=e.isReservedTag||ho,yi(t),Ai(t,!1))}function gi(t){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))}function yi(t){if(t.static=_i(t),1===t.type){if(!mu(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];yi(r),r.static||(t.static=!1)}if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++){var a=t.ifConditions[i].block;yi(a),a.static||(t.static=!1)}}}function Ai(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Ai(t.children[n],e||!!t.for);if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++)Ai(t.ifConditions[i].block,e)}}function _i(t){return 2!==t.type&&(3===t.type||!(!t.pre&&(t.hasBindings||t.if||t.for||ro(t.tag)||!mu(t.tag)||bi(t)||!Object.keys(t).every(vu))))}function bi(t){for(;t.parent;){if(t=t.parent,"template"!==t.tag)return!1;if(t.for)return!0}return!1}function Ti(t,e,n){var r=e?"nativeOn:{":"on:{";for(var i in t)r+='"'+i+'":'+Si(i,t[i])+",";return r.slice(0,-1)+"}"}function Si(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return Si(t,e)}).join(",")+"]";var n=zu.test(e.value),r=Gu.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(Wu[s])o+=Wu[s],Vu[s]&&a.push(s);else if("exact"===s){var u=e.modifiers;o+=Hu(["ctrl","shift","alt","meta"].filter(function(t){return!u[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(s);a.length&&(i+=Ei(a)),o&&(i+=o);return"function($event){"+i+(n?e.value+"($event)":r?"("+e.value+")($event)":e.value)+"}"}return n||r?e.value:"function($event){"+e.value+"}"}function Ei(t){return"if(!('button' in $event)&&"+t.map(wi).join("&&")+")return null;"}function wi(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=Vu[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key)"}function ki(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function Ci(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}}function Li(t,e){var n=new Yu(e);return{render:"with(this){return "+(t?Ii(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ii(t,e){if(t.staticRoot&&!t.staticProcessed)return xi(t,e);if(t.once&&!t.onceProcessed)return Ri(t,e);if(t.for&&!t.forProcessed)return Mi(t,e);if(t.if&&!t.ifProcessed)return Oi(t,e);if("template"!==t.tag||t.slotTarget){if("slot"===t.tag)return Yi(t,e);var n;if(t.component)n=qi(t.component,t,e);else{var r=t.plain?void 0:ji(t,e),i=t.inlineTemplate?null:Gi(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<e.transforms.length;o++)n=e.transforms[o](t,n);return n}return Gi(t,e)||"void 0"}function xi(t,e){return t.staticProcessed=!0,e.staticRenderFns.push("with(this){return "+Ii(t,e)+"}"),"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Ri(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Oi(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ii(t,e)+","+e.onceId+++","+n+")":Ii(t,e)}return xi(t,e)}function Oi(t,e,n,r){return t.ifProcessed=!0,Di(t.ifConditions.slice(),e,n,r)}function Di(t,e,n,r){function i(t){return n?n(t,e):t.once?Ri(t,e):Ii(t,e)}if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+i(o.block)+":"+Di(t,e,n,r):""+i(o.block)}function Mi(t,e,n,r){var i=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Ii)(t,e)+"})"}function ji(t,e){var n="{",r=Pi(t,e);r&&(n+=r+","),t.key&&(n+="key:"+t.key+","),t.ref&&(n+="ref:"+t.ref+","),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'+t.tag+'",');for(var i=0;i<e.dataGenFns.length;i++)n+=e.dataGenFns[i](t);if(t.attrs&&(n+="attrs:{"+Ki(t.attrs)+"},"),t.props&&(n+="domProps:{"+Ki(t.props)+"},"),t.events&&(n+=Ti(t.events,!1,e.warn)+","),t.nativeEvents&&(n+=Ti(t.nativeEvents,!0,e.warn)+","),t.slotTarget&&!t.slotScope&&(n+="slot:"+t.slotTarget+","),t.scopedSlots&&(n+=Ui(t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=Ni(t,e);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Pi(t,e){var n=t.directives;if(n){var r,i,o,a,s="directives:[",u=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var l=e.directives[o.name];l&&(a=!!l(t,o,e.warn)),a&&(u=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return u?s.slice(0,-1)+"]":void 0}}function Ni(t,e){var n=t.children[0];if(1===n.type){var r=Li(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}function Ui(t,e){return"scopedSlots:_u(["+Object.keys(t).map(function(n){return Bi(n,t[n],e)}).join(",")+"])"}function Bi(t,e,n){return e.for&&!e.forProcessed?Fi(t,e,n):"{key:"+t+",fn:function("+String(e.slotScope)+"){return "+("template"===e.tag?e.if?e.if+"?"+(Gi(e,n)||"undefined")+":undefined":Gi(e,n)||"undefined":Ii(e,n))+"}}"}function Fi(t,e,n){var r=e.for,i=e.alias,o=e.iterator1?","+e.iterator1:"",a=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+r+"),function("+i+o+a+"){return "+Bi(t,e,n)+"})"}function Gi(t,e,n,r,i){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(r||Ii)(a,e);var s=n?zi(o,e.maybeComponent):0,u=i||Hi;return"["+o.map(function(t){return u(t,e)}).join(",")+"]"+(s?","+s:"")}}function zi(t,e){for(var n=0,r=0;r<t.length;r++){var i=t[r];if(1===i.type){if(Vi(i)||i.ifConditions&&i.ifConditions.some(function(t){return Vi(t.block)})){n=2;break}(e(i)||i.ifConditions&&i.ifConditions.some(function(t){return e(t.block)}))&&(n=1)}}return n}function Vi(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function Hi(t,e){return 1===t.type?Ii(t,e):3===t.type&&t.isComment?Qi(t):Wi(t)}function Wi(t){return"_v("+(2===t.type?t.expression:Xi(JSON.stringify(t.text)))+")"}function Qi(t){return"_e("+JSON.stringify(t.text)+")"}function Yi(t,e){var n=t.slotName||'"default"',r=Gi(t,e),i="_t("+n+(r?","+r:""),o=t.attrs&&"{"+t.attrs.map(function(t){return so(t.name)+":"+t.value}).join(",")+"}",a=t.attrsMap["v-bind"];return!o&&!a||r||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}function qi(t,e,n){var r=e.inlineTemplate?null:Gi(e,n,!0);return"_c("+t+","+ji(e,n)+(r?","+r:"")+")"}function Ki(t){for(var e="",n=0;n<t.length;n++){var r=t[n];e+='"'+r.name+'":'+Xi(r.value)+","}return e.slice(0,-1)}function Xi(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Zi(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),T}}function Ji(t){var e=Object.create(null);return function(n,r,i){r=_({},r);r.warn;delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(e[o])return e[o];var a=t(n,r),s={},u=[];return s.render=Zi(a.render,u),s.staticRenderFns=a.staticRenderFns.map(function(t){return Zi(t,u)}),e[o]=s}}function $i(t){return gu=gu||document.createElement("div"),gu.innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',gu.innerHTML.indexOf(" ")>0}function to(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}var eo=Object.freeze({}),no=Object.prototype.toString,ro=p("slot,component",!0),io=p("key,ref,slot,slot-scope,is"),oo=Object.prototype.hasOwnProperty,ao=/-(\w)/g,so=g(function(t){return t.replace(ao,function(t,e){return e?e.toUpperCase():""})}),uo=g(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),lo=/\B([A-Z])/g,co=g(function(t){return t.replace(lo,"-$1").toLowerCase()}),ho=function(t,e,n){return!1},fo=function(t){return t},po="data-server-rendered",vo=["component","directive","filter"],mo=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],go={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:ho,isReservedAttr:ho,isUnknownElement:ho,getTagNamespace:T,parsePlatformTagName:fo,mustUseProp:ho,_lifecycleHooks:mo},yo=/[^\w.$]/,Ao="__proto__"in{},_o="undefined"!=typeof window,bo="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,To=bo&&WXEnvironment.platform.toLowerCase(),So=_o&&window.navigator.userAgent.toLowerCase(),Eo=So&&/msie|trident/.test(So),wo=So&&So.indexOf("msie 9.0")>0,ko=So&&So.indexOf("edge/")>0,Co=So&&So.indexOf("android")>0||"android"===To,Lo=So&&/iphone|ipad|ipod|ios/.test(So)||"ios"===To,Io=(So&&/chrome\/\d+/.test(So),{}.watch),xo=!1;if(_o)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){xo=!0}}),window.addEventListener("test-passive",null,Ro)}catch(t){}var Oo,Do,Mo=function(){return void 0===Oo&&(Oo=!_o&&void 0!==e&&"server"===e.process.env.VUE_ENV),Oo},jo=_o&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Po="undefined"!=typeof Symbol&&I(Symbol)&&"undefined"!=typeof Reflect&&I(Reflect.ownKeys);Do="undefined"!=typeof Set&&I(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var No=T,Uo=0,Bo=function(){this.id=Uo++,this.subs=[]};Bo.prototype.addSub=function(t){this.subs.push(t)},Bo.prototype.removeSub=function(t){v(this.subs,t)},Bo.prototype.depend=function(){Bo.target&&Bo.target.addDep(this)},Bo.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},Bo.target=null;var Fo=[],Go=function(t,e,n,r,i,o,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},zo={child:{configurable:!0}};zo.child.get=function(){return this.componentInstance},Object.defineProperties(Go.prototype,zo);var Vo=function(t){void 0===t&&(t="");var e=new Go;return e.text=t,e.isComment=!0,e},Ho=Array.prototype,Wo=Object.create(Ho);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Ho[t];C(Wo,t,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var Qo=Object.getOwnPropertyNames(Wo),Yo={shouldConvert:!0},qo=function(t){if(this.value=t,this.dep=new Bo,this.vmCount=0,C(t,"__ob__",this),Array.isArray(t)){(Ao?j:P)(t,Wo,Qo),this.observeArray(t)}else this.walk(t)};qo.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)U(t,e[n],t[e[n]])},qo.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)N(t[e])};var Ko=go.optionMergeStrategies;Ko.data=function(t,e,n){return n?V(t,e,n):e&&"function"!=typeof e?t:V(t,e)},mo.forEach(function(t){Ko[t]=H}),vo.forEach(function(t){Ko[t+"s"]=W}),Ko.watch=function(t,e,n,r){if(t===Io&&(t=void 0),e===Io&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var i={};_(i,t);for(var o in e){var a=i[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ko.props=Ko.methods=Ko.inject=Ko.computed=function(t,e,n,r){if(!t)return e;var i=Object.create(null);return _(i,t),e&&_(i,e),i},Ko.provide=V;var Xo,Zo,Jo=function(t,e){return void 0===e?t:e},$o=[],ta=!1,ea=!1;if(void 0!==n&&I(n))Zo=function(){n(it)};else if("undefined"==typeof MessageChannel||!I(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())Zo=function(){setTimeout(it,0)};else{var na=new MessageChannel,ra=na.port2;na.port1.onmessage=it,Zo=function(){ra.postMessage(1)}}if("undefined"!=typeof Promise&&I(Promise)){var ia=Promise.resolve();Xo=function(){ia.then(it),Lo&&setTimeout(T)}}else Xo=Zo;var oa,aa=new Do,sa=g(function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var n="~"===t.charAt(0);t=n?t.slice(1):t;var r="!"===t.charAt(0);return t=r?t.slice(1):t,{name:t,once:n,capture:r,passive:e}}),ua=null,la=[],ca=[],da={},ha=!1,fa=!1,pa=0,va=0,ma=function(t,e,n,r,i){this.vm=t,i&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++va,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Do,this.newDepIds=new Do,this.expression="","function"==typeof e?this.getter=e:(this.getter=L(e),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};ma.prototype.get=function(){x(this);var t,e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;et(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&st(t),R(),this.cleanupDeps()}return t},ma.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},ma.prototype.cleanupDeps=function(){for(var t=this,e=this.deps.length;e--;){var n=t.deps[e];t.newDepIds.has(n.id)||n.removeSub(t)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},ma.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():zt(this)},ma.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||u(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){et(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},ma.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},ma.prototype.depend=function(){for(var t=this,e=this.deps.length;e--;)t.deps[e].depend()},ma.prototype.teardown=function(){var t=this;if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var e=this.deps.length;e--;)t.deps[e].removeSub(t);this.active=!1}};var ga={enumerable:!0,configurable:!0,get:T,set:T},ya={lazy:!0};fe(pe.prototype);var Aa={init:function(t,e,n,r){if(!t.componentInstance||t.componentInstance._isDestroyed){(t.componentInstance=ye(t,ua,n,r)).$mount(e?t.elm:void 0,e)}else if(t.data.keepAlive){var i=t;Aa.prepatch(i,i)}},prepatch:function(t,e){var n=e.componentOptions;Ot(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e=t.context,n=t.componentInstance;n._isMounted||(n._isMounted=!0,Pt(n,"mounted")),t.data.keepAlive&&(e._isMounted?Ft(n):Mt(n,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?jt(e,!0):e.$destroy())}},_a=Object.keys(Aa),ba=1,Ta=2,Sa=0;!function(t){t.prototype._init=function(t){var e=this;e._uid=Sa++,e._isVue=!0,t&&t._isComponent?ke(e,t):e.$options=K(Ce(e.constructor),t||{},e),e._renderProxy=e,e._self=e,xt(e),St(e),we(e),Pt(e,"beforeCreate"),ee(e),Ht(e),te(e),Pt(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(xe),function(t){var e={};e.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=B,t.prototype.$delete=F,t.prototype.$watch=function(t,e,n){var r=this;if(l(e))return $t(r,t,e,n);n=n||{},n.user=!0;var i=new ma(r,t,e,n);return n.immediate&&e.call(r,i.value),function(){i.teardown()}}}(xe),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this,i=this;if(Array.isArray(t))for(var o=0,a=t.length;o<a;o++)r.$on(t[o],n);else(i._events[t]||(i._events[t]=[])).push(n),e.test(t)&&(i._hasHookEvent=!0);return i},t.prototype.$once=function(t,e){function n(){r.$off(t,n),e.apply(r,arguments)}var r=this;return n.fn=e,r.$on(t,n),r},t.prototype.$off=function(t,e){var n=this,r=this;if(!arguments.length)return r._events=Object.create(null),r;if(Array.isArray(t)){for(var i=0,o=t.length;i<o;i++)n.$off(t[i],e);return r}var a=r._events[t];if(!a)return r;if(!e)return r._events[t]=null,r;if(e)for(var s,u=a.length;u--;)if((s=a[u])===e||s.fn===e){a.splice(u,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?A(n):n;for(var r=A(arguments,1),i=0,o=n.length;i<o;i++)try{n[i].apply(e,r)}catch(n){et(n,e,'event handler for "'+t+'"')}}return e}}(xe),function(t){t.prototype._update=function(t,e){var n=this;n._isMounted&&Pt(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=ua;ua=n,n._vnode=t,i?n.$el=n.__patch__(i,t):(n.$el=n.__patch__(n.$el,t,e,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentElm=n.$options._refElm=null),ua=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){var t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Pt(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||v(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Pt(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(xe),function(t){fe(t.prototype),t.prototype.$nextTick=function(t){return at(t,this)},t.prototype._render=function(){var t=this,e=t.$options,n=e.render,r=e._parentVnode;if(t._isMounted)for(var i in t.$slots){var o=t.$slots[i];(o._rendered||o[0]&&o[0].elm)&&(t.$slots[i]=M(o,!0))}t.$scopedSlots=r&&r.data.scopedSlots||eo,t.$vnode=r;var a;try{a=n.call(t._renderProxy,t.$createElement)}catch(e){et(e,t,"render"),a=t._vnode}return a instanceof Go||(a=Vo()),a.parent=r,a}}(xe);var Ea=[String,RegExp,Array],wa={name:"keep-alive",abstract:!0,props:{include:Ea,exclude:Ea,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){var t=this;for(var e in t.cache)Fe(t.cache,e,t.keys)},watch:{include:function(t){Be(this,function(e){return Ue(t,e)})},exclude:function(t){Be(this,function(e){return!Ue(t,e)})}},render:function(){var t=this.$slots.default,e=Tt(t),n=e&&e.componentOptions;if(n){var r=Ne(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!Ue(o,r))||a&&r&&Ue(a,r))return e;var s=this,u=s.cache,l=s.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;u[c]?(e.componentInstance=u[c].componentInstance,v(l,c),l.push(c)):(u[c]=e,l.push(c),this.max&&l.length>parseInt(this.max)&&Fe(u,l[0],l,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},ka={KeepAlive:wa};!function(t){var e={};e.get=function(){return go},Object.defineProperty(t,"config",e),t.util={warn:No,extend:_,mergeOptions:K,defineReactive:U},t.set=B,t.delete=F,t.nextTick=at,t.options=Object.create(null),vo.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,_(t.options.components,ka),Re(t),Oe(t),De(t),Pe(t)}(xe),Object.defineProperty(xe.prototype,"$isServer",{get:Mo}),Object.defineProperty(xe.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),xe.version="2.5.13";var Ca,La,Ia,xa,Ra,Oa,Da,Ma,ja,Pa=p("style,class"),Na=p("input,textarea,option,select,progress"),Ua=function(t,e,n){return"value"===n&&Na(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Ba=p("contenteditable,draggable,spellcheck"),Fa=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ga="http://www.w3.org/1999/xlink",za=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Va=function(t){return za(t)?t.slice(6,t.length):""},Ha=function(t){return null==t||!1===t},Wa={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Qa=p("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Ya=p("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),qa=function(t){return"pre"===t},Ka=function(t){return Qa(t)||Ya(t)},Xa=Object.create(null),Za=p("text,number,password,search,email,tel,url"),Ja=Object.freeze({createElement:Ze,createElementNS:Je,createTextNode:$e,createComment:tn,insertBefore:en,removeChild:nn,appendChild:rn,parentNode:on,nextSibling:an,tagName:sn,setTextContent:un,setAttribute:ln}),$a={create:function(t,e){cn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(cn(t,!0),cn(e))},destroy:function(t){cn(t,!0)}},ts=new Go("",{},[]),es=["create","activate","update","remove","destroy"],ns={create:pn,update:pn,destroy:function(t){pn(t,ts)}},rs=Object.create(null),is=[$a,ns],os={create:An,update:An},as={create:bn,update:bn},ss=/[\w).+\-_$\]]/,us="__r",ls="__c",cs={create:Xn,update:Xn},ds={create:Zn,update:Zn},hs=g(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}),fs=/^--/,ps=/\s*!important$/,vs=function(t,e,n){if(fs.test(e))t.style.setProperty(e,n);else if(ps.test(n))t.style.setProperty(e,n.replace(ps,""),"important");else{var r=gs(e);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)t.style[r]=n[i];else t.style[r]=n}},ms=["Webkit","Moz","ms"],gs=g(function(t){if(ja=ja||document.createElement("div").style,"filter"!==(t=so(t))&&t in ja)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<ms.length;n++){var r=ms[n]+e;if(r in ja)return r}}),ys={create:ir,update:ir},As=g(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),_s=_o&&!wo,bs="transition",Ts="animation",Ss="transition",Es="transitionend",ws="animation",ks="animationend";_s&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ss="WebkitTransition",Es="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ws="WebkitAnimation",ks="webkitAnimationEnd"));var Cs=_o?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()},Ls=/\b(transform|all)(,|$)/,Is=_o?{create:Ar,activate:Ar,remove:function(t,e){!0!==t.data.show?mr(t,e):e()}}:{},xs=[os,as,cs,ds,ys,Is],Rs=xs.concat(is),Os=function(t){function e(t){return new Go(R.tagName(t).toLowerCase(),{},[],void 0,t)}function n(t,e){function n(){0==--n.listeners&&a(t)}return n.listeners=e,n}function a(t){var e=R.parentNode(t);i(e)&&R.removeChild(e,t)}function u(t,e,n,r,a){if(t.isRootInsert=!a,!l(t,e,n,r)){var s=t.data,u=t.children,c=t.tag;i(c)?(t.elm=t.ns?R.createElementNS(t.ns,c):R.createElement(c,t),g(t),f(t,u,e),i(s)&&m(t,e),h(n,t.elm,r)):o(t.isComment)?(t.elm=R.createComment(t.text),h(n,t.elm,r)):(t.elm=R.createTextNode(t.text),h(n,t.elm,r))}}function l(t,e,n,r){var a=t.data;if(i(a)){var s=i(t.componentInstance)&&a.keepAlive;if(i(a=a.hook)&&i(a=a.init)&&a(t,!1,n,r),i(t.componentInstance))return c(t,e),o(s)&&d(t,e,n,r),!0}}function c(t,e){i(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(m(t,e),g(t)):(cn(t),e.push(t))}function d(t,e,n,r){for(var o,a=t;a.componentInstance;)if(a=a.componentInstance._vnode,i(o=a.data)&&i(o=o.transition)){for(o=0;o<I.activate.length;++o)I.activate[o](ts,a);e.push(a);break}h(n,t.elm,r)}function h(t,e,n){i(t)&&(i(n)?n.parentNode===t&&R.insertBefore(t,e,n):R.appendChild(t,e))}function f(t,e,n){if(Array.isArray(e))for(var r=0;r<e.length;++r)u(e[r],n,t.elm,null,!0);else s(t.text)&&R.appendChild(t.elm,R.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return i(t.tag)}function m(t,e){for(var n=0;n<I.create.length;++n)I.create[n](ts,t);C=t.data.hook,i(C)&&(i(C.create)&&C.create(ts,t),i(C.insert)&&e.push(t))}function g(t){var e;if(i(e=t.fnScopeId))R.setAttribute(t.elm,e,"");else for(var n=t;n;)i(e=n.context)&&i(e=e.$options._scopeId)&&R.setAttribute(t.elm,e,""),n=n.parent;i(e=ua)&&e!==t.context&&e!==t.fnContext&&i(e=e.$options._scopeId)&&R.setAttribute(t.elm,e,"")}function y(t,e,n,r,i,o){for(;r<=i;++r)u(n[r],o,t,e)}function A(t){var e,n,r=t.data;if(i(r))for(i(e=r.hook)&&i(e=e.destroy)&&e(t),e=0;e<I.destroy.length;++e)I.destroy[e](t);if(i(e=t.children))for(n=0;n<t.children.length;++n)A(t.children[n])}function _(t,e,n,r){for(;n<=r;++n){var o=e[n];i(o)&&(i(o.tag)?(b(o),A(o)):a(o.elm))}}function b(t,e){if(i(e)||i(t.data)){var r,o=I.remove.length+1;for(i(e)?e.listeners+=o:e=n(t.elm,o),i(r=t.componentInstance)&&i(r=r._vnode)&&i(r.data)&&b(r,e),r=0;r<I.remove.length;++r)I.remove[r](t,e);i(r=t.data.hook)&&i(r=r.remove)?r(t,e):e()}else a(t.elm)}function T(t,e,n,o,a){for(var s,l,c,d,h=0,f=0,p=e.length-1,v=e[0],m=e[p],g=n.length-1,A=n[0],b=n[g],T=!a;h<=p&&f<=g;)r(v)?v=e[++h]:r(m)?m=e[--p]:dn(v,A)?(E(v,A,o),v=e[++h],A=n[++f]):dn(m,b)?(E(m,b,o),m=e[--p],b=n[--g]):dn(v,b)?(E(v,b,o),T&&R.insertBefore(t,v.elm,R.nextSibling(m.elm)),v=e[++h],b=n[--g]):dn(m,A)?(E(m,A,o),T&&R.insertBefore(t,m.elm,v.elm),m=e[--p],A=n[++f]):(r(s)&&(s=fn(e,h,p)),l=i(A.key)?s[A.key]:S(A,e,h,p),r(l)?u(A,o,t,v.elm):(c=e[l],dn(c,A)?(E(c,A,o),e[l]=void 0,T&&R.insertBefore(t,c.elm,v.elm)):u(A,o,t,v.elm)),A=n[++f]);h>p?(d=r(n[g+1])?null:n[g+1].elm,y(t,d,n,f,g,o)):f>g&&_(t,e,h,p)}function S(t,e,n,r){for(var o=n;o<r;o++){var a=e[o];if(i(a)&&dn(t,a))return o}}function E(t,e,n,a){if(t!==e){var s=e.elm=t.elm;if(o(t.isAsyncPlaceholder))return void(i(e.asyncFactory.resolved)?k(t.elm,e,n):e.isAsyncPlaceholder=!0);if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))return void(e.componentInstance=t.componentInstance);var u,l=e.data;i(l)&&i(u=l.hook)&&i(u=u.prepatch)&&u(t,e);var c=t.children,d=e.children;if(i(l)&&v(e)){for(u=0;u<I.update.length;++u)I.update[u](t,e);i(u=l.hook)&&i(u=u.update)&&u(t,e)}r(e.text)?i(c)&&i(d)?c!==d&&T(s,c,d,n,a):i(d)?(i(t.text)&&R.setTextContent(s,""),y(s,null,d,0,d.length-1,n)):i(c)?_(s,c,0,c.length-1):i(t.text)&&R.setTextContent(s,""):t.text!==e.text&&R.setTextContent(s,e.text),i(l)&&i(u=l.hook)&&i(u=u.postpatch)&&u(t,e)}}function w(t,e,n){if(o(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r<e.length;++r)e[r].data.hook.insert(e[r])}function k(t,e,n,r){var a,s=e.tag,u=e.data,l=e.children;if(r=r||u&&u.pre,e.elm=t,o(e.isComment)&&i(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(i(u)&&(i(a=u.hook)&&i(a=a.init)&&a(e,!0),i(a=e.componentInstance)))return c(e,n),!0;if(i(s)){if(i(l))if(t.hasChildNodes())if(i(a=u)&&i(a=a.domProps)&&i(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var d=!0,h=t.firstChild,p=0;p<l.length;p++){if(!h||!k(h,l[p],n,r)){d=!1;break}h=h.nextSibling}if(!d||h)return!1}else f(e,l,n);if(i(u)){var v=!1;for(var g in u)if(!O(g)){v=!0,m(e,n);break}!v&&u.class&&st(u.class)}}else t.data!==e.text&&(t.data=e.text);return!0}var C,L,I={},x=t.modules,R=t.nodeOps;for(C=0;C<es.length;++C)for(I[es[C]]=[],L=0;L<x.length;++L)i(x[L][es[C]])&&I[es[C]].push(x[L][es[C]]);var O=p("attrs,class,staticClass,staticStyle,key");return function(t,n,a,s,l,c){if(r(n))return void(i(t)&&A(t));var d=!1,h=[];if(r(t))d=!0,u(n,h,l,c);else{var f=i(t.nodeType);if(!f&&dn(t,n))E(t,n,h,s);else{if(f){if(1===t.nodeType&&t.hasAttribute(po)&&(t.removeAttribute(po),a=!0),o(a)&&k(t,n,h))return w(n,h,!0),t;t=e(t)}var p=t.elm,m=R.parentNode(p);if(u(n,h,p._leaveCb?null:m,R.nextSibling(p)),i(n.parent))for(var g=n.parent,y=v(n);g;){for(var b=0;b<I.destroy.length;++b)I.destroy[b](g);if(g.elm=n.elm,y){for(var T=0;T<I.create.length;++T)I.create[T](ts,g);var S=g.data.hook.insert;if(S.merged)for(var C=1;C<S.fns.length;C++)S.fns[C]()}else cn(g);g=g.parent}i(m)?_(m,[t],0,0):i(t.tag)&&A(t)}}return w(n,h,d),n.elm}}({nodeOps:Ja,modules:Rs});wo&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&kr(t,"input")});var Ds={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?dt(n,"postpatch",function(){Ds.componentUpdated(t,e,n)}):_r(t,e,n.context),t._vOptions=[].map.call(t.options,Sr)):("textarea"===n.tag||Za(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("change",wr),Co||(t.addEventListener("compositionstart",Er),t.addEventListener("compositionend",wr)),wo&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){_r(t,e,n.context);var r=t._vOptions,i=t._vOptions=[].map.call(t.options,Sr);if(i.some(function(t,e){return!S(t,r[e])})){(t.multiple?e.value.some(function(t){return Tr(t,i)}):e.value!==e.oldValue&&Tr(e.value,i))&&kr(t,"change")}}}},Ms={bind:function(t,e,n){var r=e.value;n=Cr(n);var i=n.data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,vr(n,function(){t.style.display=o})):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;r!==e.oldValue&&(n=Cr(n),n.data&&n.data.transition?(n.data.show=!0,r?vr(n,function(){t.style.display=t.__vOriginalDisplay}):mr(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}},js={model:Ds,show:Ms},Ps={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Ns={name:"transition",props:Ps,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag||bt(t)}),n.length)){var r=this.mode,i=n[0];if(Rr(this.$vnode))return i;var o=Lr(i);if(!o)return i;if(this._leaving)return xr(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var u=(o.data||(o.data={})).transition=Ir(this),l=this._vnode,c=Lr(l);if(o.data.directives&&o.data.directives.some(function(t){return"show"===t.name})&&(o.data.show=!0),c&&c.data&&!Or(o,c)&&!bt(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var d=c.data.transition=_({},u);if("out-in"===r)return this._leaving=!0,dt(d,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),xr(t,i);if("in-out"===r){if(bt(o))return l;var h,f=function(){h()};dt(u,"afterEnter",f),dt(u,"enterCancelled",f),dt(d,"delayLeave",function(t){h=t})}}return i}}},Us=_({tag:String,moveClass:String},Ps);delete Us.mode;var Bs={props:Us,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Ir(this),s=0;s<i.length;s++){var u=i[s];if(u.tag)if(null!=u.key&&0!==String(u.key).indexOf("__vlist"))o.push(u),n[u.key]=u,(u.data||(u.data={})).transition=a;else;}if(r){for(var l=[],c=[],d=0;d<r.length;d++){var h=r[d];h.data.transition=a,h.data.pos=h.elm.getBoundingClientRect(),n[h.key]?l.push(h):c.push(h)}this.kept=t(e,null,l),this.removed=c}return t(e,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Dr),t.forEach(Mr),t.forEach(jr),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var n=t.elm,r=n.style;lr(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Es,n._moveCb=function t(r){r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Es,t),n._moveCb=null,cr(n,e))})}}))},methods:{hasMove:function(t,e){if(!_s)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){ar(n,t)}),or(n,e),n.style.display="none",this.$el.appendChild(n);var r=hr(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}},Fs={Transition:Ns,TransitionGroup:Bs};xe.config.mustUseProp=Ua,xe.config.isReservedTag=Ka,xe.config.isReservedAttr=Pa,xe.config.getTagNamespace=qe,xe.config.isUnknownElement=Ke,_(xe.options.directives,js),_(xe.options.components,Fs),xe.prototype.__patch__=_o?Os:T,xe.prototype.$mount=function(t,e){return t=t&&_o?Xe(t):void 0,Rt(this,t,e)},xe.nextTick(function(){go.devtools&&jo&&jo.emit("init",xe)},0);var Gs,zs=/\{\{((?:.|\n)+?)\}\}/g,Vs=/[-.*+?^${}()|[\]\/\\]/g,Hs=g(function(t){var e=t[0].replace(Vs,"\\$&"),n=t[1].replace(Vs,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}),Ws={staticKeys:["staticClass"],transformNode:Nr,genData:Ur},Qs={staticKeys:["staticStyle"],transformNode:Br,genData:Fr},Ys={decode:function(t){return Gs=Gs||document.createElement("div"),Gs.innerHTML=t,Gs.textContent}},qs=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),Ks=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Xs=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Zs=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Js="[a-zA-Z_][\\w\\-\\.]*",$s="((?:"+Js+"\\:)?"+Js+")",tu=new RegExp("^<"+$s),eu=/^\s*(\/?)>/,nu=new RegExp("^<\\/"+$s+"[^>]*>"),ru=/^<!DOCTYPE [^>]+>/i,iu=/^<!--/,ou=/^<!\[/,au=!1;"x".replace(/x(.)?/g,function(t,e){au=""===e});var su,uu,lu,cu,du,hu,fu,pu,vu,mu,gu,yu=p("script,style,textarea",!0),Au={},_u={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t"},bu=/&(?:lt|gt|quot|amp);/g,Tu=/&(?:lt|gt|quot|amp|#10|#9);/g,Su=p("pre,textarea",!0),Eu=function(t,e){return t&&Su(t)&&"\n"===e[0]},wu=/^@|^v-on:/,ku=/^v-|^@|^:/,Cu=/(.*?)\s+(?:in|of)\s+(.*)/,Lu=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Iu=/^\(|\)$/g,xu=/:(.*)$/,Ru=/^:|^v-bind:/,Ou=/\.[^.]+/g,Du=g(Ys.decode),Mu=/^xmlns:NS\d+/,ju=/^NS\d+:/,Pu={preTransformNode:hi},Nu=[Ws,Qs,Pu],Uu={model:Gn,text:pi,html:vi},Bu={expectHTML:!0,modules:Nu,directives:Uu,isPreTag:qa,isUnaryTag:qs,mustUseProp:Ua,canBeLeftOpenTag:Ks,isReservedTag:Ka,getTagNamespace:qe,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Nu)},Fu=g(gi),Gu=/^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,zu=/^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/,Vu={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Hu=function(t){return"if("+t+")return null;"},Wu={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Hu("$event.target !== $event.currentTarget"),ctrl:Hu("!$event.ctrlKey"),shift:Hu("!$event.shiftKey"),alt:Hu("!$event.altKey"),meta:Hu("!$event.metaKey"),left:Hu("'button' in $event && $event.button !== 0"),middle:Hu("'button' in $event && $event.button !== 1"),right:Hu("'button' in $event && $event.button !== 2")},Qu={on:ki,bind:Ci,cloak:T},Yu=function(t){this.options=t,this.warn=t.warn||En,this.transforms=wn(t.modules,"transformCode"),this.dataGenFns=wn(t.modules,"genData"),this.directives=_(_({},Qu),t.directives);var e=t.isReservedTag||ho;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]},qu=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(t){return function(e){function n(n,r){var i=Object.create(e),o=[],a=[];if(i.warn=function(t,e){(e?a:o).push(t)},r){r.modules&&(i.modules=(e.modules||[]).concat(r.modules)),r.directives&&(i.directives=_(Object.create(e.directives||null),r.directives));for(var s in r)"modules"!==s&&"directives"!==s&&(i[s]=r[s])}var u=t(n,i);return u.errors=o,u.tips=a,u}return{compile:n,compileToFunctions:Ji(n)}}}(function(t,e){var n=Hr(t.trim(),e);!1!==e.optimize&&mi(n,e);var r=Li(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}})),Ku=qu(Bu),Xu=Ku.compileToFunctions,Zu=!!_o&&$i(!1),Ju=!!_o&&$i(!0),$u=g(function(t){var e=Xe(t);return e&&e.innerHTML}),tl=xe.prototype.$mount;xe.prototype.$mount=function(t,e){if((t=t&&Xe(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=$u(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=to(t));if(r){var i=Xu(r,{shouldDecodeNewlines:Zu,shouldDecodeNewlinesForHref:Ju,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return tl.call(this,t,e)},xe.compile=Xu,t.exports=xe}).call(e,n("mFPK"),n("7Adc").setImmediate)},QG95:function(t,e,n){var r=n("TVvA"),i=n("SWzD"),o=n("rLr5");t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},QHaH:function(t,e,n){var r=n("tg2m"),i=n("VMkr");t.exports=n("itn3")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"QXC+":function(t,e,n){"use strict";var r=n("gOH0"),i={};i[n("e5pe")("toStringTag")]="z",i+""!="[object z]"&&n("xVER")(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},QZad:function(t,e,n){var r=n("gfI6"),i=n("C9ZO"),o=Math.exp;r(r.S+r.F*n("wrr7")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},Qfht:function(t,e,n){var r=n("a6t1"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},Qn2X:function(t,e,n){"use strict";var r=n("gfI6"),i=n("JnCZ");r(r.P+r.F*!n("OiX5")([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},QnZ5:function(t,e,n){"use strict";var r=n("gfI6"),i=n("I5ZQ"),o=n("oAFy"),a=n("OywI"),s=n("4PQM").f;n("itn3")&&r(r.P+n("mEn9"),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.get}while(n=a(n))}})},S4Rs:function(t,e,n){"use strict";var r=n("gfI6"),i=n("JnCZ");r(r.P+r.F*!n("OiX5")([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},SM6r:function(t,e,n){var r=n("gfI6"),i=n("8zsY");r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},SU1L:function(t,e,n){var r=n("zS5q")("keys"),i=n("2eo7");t.exports=function(t){return r[t]||(r[t]=i(t))}},SWzD:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},ScTW:function(t,e,n){function r(t,e){var n,s,c=arguments.length<3?t:arguments[2];return l(t)===c?t[e]:(n=i.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(c):void 0:u(s=o(t))?r(s,e,c):void 0}var i=n("4PQM"),o=n("OywI"),a=n("iNHF"),s=n("gfI6"),u=n("SWzD"),l=n("TVvA");s(s.S,"Reflect",{get:r})},SolS:function(t,e,n){var r=n("tg2m").f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n("itn3")&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},"T/J3":function(t,e,n){var r=n("gfI6"),i=n("d0hO"),o=n("wrr7"),a=n("agPX"),s="["+a+"]",u="
",l=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),d=function(t,e,n){var i={},s=o(function(){return!!a[t]()||u[t]()!=u}),l=i[t]=s?e(h):a[t];n&&(i[n]=l),r(r.P+r.F*s,"String",i)},h=d.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(c,"")),t};t.exports=d},T3jQ:function(t,e,n){var r=n("gfI6"),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},T6bJ:function(t,e,n){"use strict";var r=n("xxJ0");t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},TVvA:function(t,e,n){var r=n("SWzD");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"Tif/":function(t,e,n){var r=n("4PQM"),i=n("gfI6"),o=n("TVvA");i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},U7cF:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},UHXL:function(t,e,n){n("0hmV"),n("xD/q"),n("lBJ1"),n("aDNY"),n("u3FZ"),n("ouAI"),n("iRVo"),n("5a9c"),n("NAB6"),n("aAWK"),n("dti3"),n("HtwL"),n("6J/E"),n("nxrp"),n("rAfE"),n("DbJg"),n("XUlC"),n("QXC+"),n("yuY9"),n("SolS"),n("zj9o"),n("5b+E"),n("OOnA"),n("p2Mr"),n("fZsd"),n("0khM"),n("sQnt"),n("FQFZ"),n("JcxT"),n("r0GY"),n("4D6G"),n("/q/b"),n("bkRA"),n("F246"),n("SM6r"),n("ZJLm"),n("/4o9"),n("T3jQ"),n("mBMy"),n("WqSu"),n("pG7L"),n("rUnP"),n("1Um1"),n("3Tiu"),n("qzlX"),n("1Qv+"),n("/zMr"),n("kIwm"),n("9Amk"),n("QZad"),n("NEX+"),n("NGsY"),n("YMr2"),n("lADi"),n("FBct"),n("EBZH"),n("myai"),n("z7zz"),n("0O7Q"),n("XXY9"),n("8yaX"),n("zwQ0"),n("7mmP"),n("iEjH"),n("8P34"),n("BIFY"),n("GtiV"),n("nI7M"),n("aCqb"),n("n/8r"),n("p97+"),n("2DdT"),n("MZ4E"),n("s0IB"),n("m5/z"),n("w3a7"),n("5QUR"),n("YGq4"),n("bhfE"),n("gxSk"),n("J+2W"),n("KDiV"),n("OJKp"),n("yebT"),n("/r/u"),n("tHJW"),n("4wT+"),n("8vkE"),n("Jcpa"),n("+TFK"),n("S4Rs"),n("Qn2X"),n("/Uj3"),n("5vIH"),n("aedT"),n("q7et"),n("XigM"),n("W3Yr"),n("BFKx"),n("cQil"),n("xg1l"),n("gyCy"),n("wp+L"),n("OV3h"),n("r6Xj"),n("Hdxi"),n("86Y3"),n("Ipd+"),n("6Tw+"),n("Y5LL"),n("lvyX"),n("D5V7"),n("V82c"),n("LRTj"),n("hiq5"),n("9NgK"),n("NEon"),n("XLA2"),n("jsdI"),n("BmkF"),n("GbjT"),n("oq3O"),n("/7vx"),n("mZNK"),n("tRWF"),n("0KQi"),n("re2z"),n("JbZK"),n("C3vs"),n("ScTW"),n("Tif/"),n("Z1kH"),n("oT/z"),n("M07D"),n("m8yH"),n("9C+T"),n("sHA+"),n("pZXB"),n("CViW"),n("qZDO"),n("5HlJ"),n("x/L1"),n("BmKr"),n("cuQq"),n("7afX"),n("bhRX"),n("NYjz"),n("HrFV"),n("MR0D"),n("CrgY"),n("Anv2"),n("XmAz"),n("+zHq"),n("gjVD"),n("QnZ5"),n("oRMj"),n("jyXR"),n("ZzBg"),n("zsfk"),n("Fa+6"),n("x4De"),n("4k54"),n("n7jv"),n("wZyz"),n("7BBv"),n("aBlr"),n("Isxj"),n("CxM1"),n("hi6e"),n("CmXC"),n("Otb4"),n("dhA6"),n("ircs"),n("/GCA"),n("olX4"),n("mphW"),n("U7cF"),n("NDuc"),n("ryWk"),n("uVds"),n("Gky4"),n("v4VH"),n("XPcr"),n("Ke3X"),n("pVdI"),n("lMaF"),n("odjh"),n("fDj0"),n("w1AD"),n("CCmj"),n("9WD1"),n("xFCy"),n("t8M9"),n("jEE8"),n("qbas"),n("2mJW"),n("G5hg"),t.exports=n("oqL4")},UVvP:function(t,e,n){var r=n("e5pe")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},V0EG:function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(d===clearTimeout)return clearTimeout(t);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){v&&f&&(v=!1,f.length?p=f.concat(p):m=-1,p.length&&s())}function s(){if(!v){var t=i(a);v=!0;for(var e=p.length;e;){for(f=p,p=[];++m<e;)f&&f[m].run();m=-1,e=p.length}f=null,v=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function l(){}var c,d,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(t){d=r}}();var f,p=[],v=!1,m=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];p.push(new u(t,e)),1!==p.length||v||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=l,h.addListener=l,h.once=l,h.off=l,h.removeListener=l,h.removeAllListeners=l,h.emit=l,h.prependListener=l,h.prependOnceListener=l,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},V82c:function(t,e,n){"use strict";var r=n("8PBV"),i=n("0eGa");n("2o3U")("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},VMkr:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},VVhn:function(t,e,n){var r=n("qWof");t.exports=function(t,e){return new(r(t))(e)}},W3Yr:function(t,e,n){"use strict";var r=n("gfI6"),i=n("kziU")(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("I/ou")(o)},Wl3t:function(t,e,n){e=t.exports=n("BkJT")(void 0),e.push([t.i,"@font-face{font-family:iconfont;src:url("+n("beNQ")+");src:url("+n("beNQ")+'#iefix) format("embedded-opentype"),url("data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAANEAAsAAAAABuQAAAL4AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcAqBcIFdATYCJAMICwYABCAFhG0HLxsCBsi+QDy2BxVxik7NZN3bE+0WlfLq7xt/sw4o0CQI4vv9fnuufZX0HXFJbo2QKJ3kkaQhQyh4ZDrNQnv3v9ZmTwwLdbB23riEWcLryvwVnx08i0UtzULkUS2UIzRC5ulVKwrTRCMPkqMnB/l2swMe+NsJ8nbbfzEmSUmrWhJNhyB3V/0ijCjAgIOWQRAAJxltE1DTGLM0z2ZMVtNbIRXdeTnG6XXT+UoTDs4nQABoG92lrmqHhzJH/3M5vbsKKJD5gXJce9OkXoBxQAGOuTmRAikAbhi74AWuhoCggjqtL65vQYVhdxIg27V1qBQcDMPCfsI1jAxyEP581DOcRJ+Xb1aBYgs7a2kuWDD9Zp2oPDyoAIG5nA5g40CDZoCBjMbAgjxhxLxgoKACjpUu+Ob/gQo56p+HVHZqGEAOMp6J6bEe9ZcKgAEOzAE2J+0LrrHWBp7WlH0XRLV3xxeP2r3B6ocK/h1jcJrYqdR/P2+TNbOvp/2IfadXj/wfdx6Wt3bXwcZDR/tPNXbPg+H34ap7K/e/qr0c2Rn7SeaS75UHOk+5V+Od0e3xH51ad0muXp2X2FclTb44tzZl4W3Rbuzxc3yufBwY7z3Hb3mtk7W7nmkAeIifwM/9DgPfHo70H0wAX28U2zwkw0yA/xaMgl/JHFhmDLatVKExGyPKnNIt5gQFgUewJel3qiRz3xHhl7l7k08+A82vGjWEZrBCusHxG4OgJkvjQ1JYnkQBjc4AiLhnUKKeQIv7RA2hD1bWHzjx8hC0kdwZQ2pzawOTLmShcYyuGUfKVUstTt8gez/QOc+OSDvEmevGTmt7ObxEEfESfbIDuyuiUHEc4iJYj4IgxoRjj0xpOiJJr9V21PSkphmHUDOFEZ0gFmQ4hlymWEQF1UWt8v4NxLYvoOOOkjr9DsIybv2oo6k9AF0SRINKHuWczAFblxAKUlgshBaBjgROIIaS5mYeYhJNzgRfoqeFKqmhgub2ovDv1gBBtlQlp0GwyyXZBwA=") format("woff2"),url('+n("YXC1")+') format("woff"),url('+n("iyJ0")+') format("truetype"),url('+n("9dSf")+'#iconfont) format("svg")}.iconfont{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-jietu:before{content:"\\E646"}',""])},WqSu:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},"XL/d":function(t,e,n){"use strict";(function(e){function r(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var i=n("gvuQ"),o=n("vyL3"),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n("BzCt"):void 0!==e&&(t=n("BzCt")),t}(),transformRequest:[function(t,e){return o(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(r(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s}).call(e,n("V0EG"))},XLA2:function(t,e,n){n("F6kW")("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},XPcr:function(t,e,n){"use strict";var r=n("gfI6"),i=n("rLr5"),o=n("Z0qp");r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},XUlC:function(t,e,n){var r=n("gfI6");r(r.S,"Object",{setPrototypeOf:n("DTOj").set})},XXY9:function(t,e,n){var r=n("gfI6");r(r.P,"String",{repeat:n("+HiE")})},XigM:function(t,e,n){"use strict";var r=n("gfI6"),i=n("kziU")(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("I/ou")("find")},XmAz:function(t,e,n){var r=n("gfI6"),i=n("Lv1y")(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},Y5LL:function(t,e,n){"use strict";var r=n("5dkQ"),i=n("0eGa");t.exports=n("2o3U")("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},YGq4:function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n("xVER")(r,"toString",function(){var t=o.call(this);return t===t?i.call(this):"Invalid Date"})},YHjO:function(t,e,n){"use strict";var r=n("tg2m"),i=n("VMkr");t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},YMr2:function(t,e,n){var r=n("gfI6"),i=n("Qfht"),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},YXC1:function(t,e){t.exports="data:font/woff;base64,d09GRgABAAAAAASYAAsAAAAABuQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8vEg4Y21hcAAAAYAAAABLAAABcOdutnxnbHlmAAABzAAAAOcAAADw7HqFeGhlYWQAAAK0AAAALwAAADYYdi55aGhlYQAAAuQAAAAcAAAAJAfeA4NobXR4AAADAAAAAAgAAAAICAAAAGxvY2EAAAMIAAAABgAAAAYAeAAAbWF4cAAAAxAAAAAgAAAAIAESAFhuYW1lAAADMAAAAUUAAAJtPlT+fXBvc3QAAAR4AAAAHgAAAC/gemZ7eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeuT1zY27438AQw9zA0AAUZgTJAQDoFQxveJxjYGBgZWBgYAZiHSBmYWBgDGFgZAABP6AoI1icmYELLM7CoARWwwISf+b2/z+MBPJZwCQDIxvDKOABkzJQHjisIJiBEQDUFgqBAHicHYy/SgNBGMS/2T02nIe7uf02SeEfsnfsHVokcBcPBE1hqa2xtfMFgmiZ1mexEeztLPURfAPBB/CMl8Aw8BtmhhTReiW/5YoCHdExNXRJV0QhT2dF6U8myFRvkGu44ahOO/ODQ1TNOeo5ZkVIfepZdckc2yrkBAYaUxTKQA1rXzWl/MjZtH3wPiPT1urMafHToct1an/fxGdbPcL6MLaiOC2Fv4tGahlp9d7bje5VkoiLnUSeiWfDWGz2N9ur9lpvmFkv4PYcxFP7gC8ec6eDEP6WMImIX5SUt1Kq15j7MdE/jUklSAB4nGNgZGBgAGLPBX3K8fw2Xxm4WRhA4NbqUjsE/b+BhYG5AcjlYGACiQIAF1kJywB4nGNgZGBgbvjfwBDDwgACQJKRARUwAQBHCAJrBAAAAAQAAAAAAAAAAHgAAAABAAAAAgBMAAYAAAAAAAIAAAAKAAoAAAD/AAAAAAAAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAiZGJkZmBNSsztaSUgQEADR0CPAAA"},YeNM:function(t,e,n){var r=n("rWQF"),i=n("hoJM").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},YzBQ:function(t,e,n){"use strict";var r=n("gfI6"),i=n("zySG"),o=n("nZZV"),a=n("9MqD");t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,u=arguments[1];return i(this),e=void 0!==u,e&&i(u),void 0==t?new this:(n=[],e?(r=0,s=o(u,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},Z0qp:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},Z1kH:function(t,e,n){var r=n("gfI6"),i=n("OywI"),o=n("TVvA");r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},ZJLm:function(t,e,n){var r=n("gfI6"),i=n("+d6U"),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},ZzBg:function(t,e,n){var r=n("gfI6");r(r.P+r.R,"Set",{toJSON:n("it19")("Set")})},"a+E/":function(t,e,n){var r=n("gOH0"),i=n("e5pe")("iterator"),o=n("6jds");t.exports=n("oqL4").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},a6t1:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},aAWK:function(t,e,n){var r=n("SWzD"),i=n("w8es").onFreeze;n("ow6B")("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},aBlr:function(t,e,n){n("YzBQ")("WeakSet")},aCqb:function(t,e,n){"use strict";n("f9UI")("italics",function(t){return function(){return t(this,"i","","")}})},aDNY:function(t,e,n){var r=n("gfI6");r(r.S+r.F*!n("itn3"),"Object",{defineProperties:n("iqoQ")})},aedT:function(t,e,n){var r=n("gfI6");r(r.P,"Array",{copyWithin:n("ftLj")}),n("I/ou")("copyWithin")},agPX:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},bdbX:function(t,e){e.f={}.propertyIsEnumerable},beNQ:function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,jAcAAOQGAAABAAIAAAAAAAIABQMAAAAAAAABAJABAAAAAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAQ5igSQAAAAAAAAAAAAAAAAAAAAAAABAAaQBjAG8AbgBmAG8AbgB0AAAADgBSAGUAZwB1AGwAYQByAAAAFgBWAGUAcgBzAGkAbwBuACAAMQAuADAAAAAQAGkAYwBvAG4AZgBvAG4AdAAAAAAAAAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI8vEg4AAABfAAAAFZjbWFw5262fAAAAdwAAAFwZ2x5Zux6hXgAAANUAAAA8GhlYWQYdi55AAAA4AAAADZoaGVhB94DgwAAALwAAAAkaG10eAgAAAAAAAHUAAAACGxvY2EAeAAAAAADTAAAAAZtYXhwARIAWAAAARgAAAAgbmFtZT5U/n0AAAREAAACbXBvc3TgemZ7AAAGtAAAAC8AAQAAA4D/gABcBAAAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAIAAQAAAAEAAEmgmENfDzz1AAsEAAAAAADaq3U+AAAAANqrdT4AAP+ABAADgAAAAAgAAgAAAAAAAAABAAAAAgBMAAYAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQQAAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5kbmRgOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAQAAAAAAAAFAAAAAwAAACwAAAAEAAABVAABAAAAAABOAAMAAQAAACwAAwAKAAABVAAEACIAAAAEAAQAAQAA5kb//wAA5kb//wAAAAEABAAAAAEAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAABwAAAAAAAAAAQAA5kYAAOZGAAAAAQAAAAAAeAAAAAYAAP+AA+0DgAAlACkAKgA2AEoASwAAJSMRNCYnITUuASIGBxUjDgEUFhczERQWFyEVHgEyNj0BMz4BNCYlESERIRMGHgEyPgE1LgEiBgEDLgEPAQ4BLwEmBg8BBhYzITI2JwPNIxMP/RABExwTASIOEhIOIhQOAvABExwUIw4REvy+As79MngBEiElIBICJjknAiFmBBcGcwQOBsUHDQR1BgsLAkIKCwM8AqsPEwFVDhISDlYBExwTAf1UDhMBVQ4TEw5VARQbFAECif13Ad4TIBMTIBMdJSX+cwEPCwIJsAYDA18DAwazCRMQCQAAAAAAEgDeAAEAAAAAAAAAFQAAAAEAAAAAAAEACAAVAAEAAAAAAAIABwAdAAEAAAAAAAMACAAkAAEAAAAAAAQACAAsAAEAAAAAAAUACwA0AAEAAAAAAAYACAA/AAEAAAAAAAoAKwBHAAEAAAAAAAsAEwByAAMAAQQJAAAAKgCFAAMAAQQJAAEAEACvAAMAAQQJAAIADgC/AAMAAQQJAAMAEADNAAMAAQQJAAQAEADdAAMAAQQJAAUAFgDtAAMAAQQJAAYAEAEDAAMAAQQJAAoAVgETAAMAAQQJAAsAJgFpCkNyZWF0ZWQgYnkgaWNvbmZvbnQKaWNvbmZvbnRSZWd1bGFyaWNvbmZvbnRpY29uZm9udFZlcnNpb24gMS4waWNvbmZvbnRHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQAKAEMAcgBlAGEAdABlAGQAIABiAHkAIABpAGMAbwBuAGYAbwBuAHQACgBpAGMAbwBuAGYAbwBuAHQAUgBlAGcAdQBsAGEAcgBpAGMAbwBuAGYAbwBuAHQAaQBjAG8AbgBmAG8AbgB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMABpAGMAbwBuAGYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgECAQMABWppZXR1AAAA"},bhRX:function(t,e,n){"use strict";n("T/J3")("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},bhfE:function(t,e,n){var r=n("e5pe")("toPrimitive"),i=Date.prototype;r in i||n("QHaH")(i,r,n("i4ge"))},bkRA:function(t,e,n){var r=n("gfI6");r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},briU:function(t,e,n){"use strict";(function(t){function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n("UHXL"),n("sQRx"),n("/Z3B"),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&e(Array,t,Function.call.bind([][t]))})}).call(e,n("mFPK"))},cKpp:function(t,e,n){"use strict";var r=n("wl1Y"),i=n("VMkr"),o=n("gJRO"),a={};n("QHaH")(a,n("e5pe")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},"cQJ/":function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},cQil:function(t,e,n){"use strict";var r=n("I/ou"),i=n("F/oR"),o=n("6jds"),a=n("rWQF");t.exports=n("MLcW")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cegO:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},cuQq:function(t,e,n){"use strict";var r=n("gfI6"),i=n("B9+s"),o=n("BEkf"),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},cx5j:function(t,e,n){"use strict";var r=n("gvuQ");t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},cy3O:function(t,e,n){"use strict";function r(t,e,n,l,c,d,h,f){for(var p,v,m=c,g=0,y=!!h&&s(h,f,3);g<l;){if(g in n){if(p=y?y(n[g],g,e):n[g],v=!1,o(p)&&(v=p[u],v=void 0!==v?!!v:i(p)),v&&d>0)m=r(t,e,p,a(p.length),m,d-1)-1;else{if(m>=9007199254740991)throw TypeError();t[m]=p}m++}g++}return m}var i=n("yiIW"),o=n("SWzD"),a=n("GuN7"),s=n("nZZV"),u=n("e5pe")("isConcatSpreadable");t.exports=r},d0hO:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},dhA6:function(t,e,n){var r=n("gfI6"),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},dti3:function(t,e,n){var r=n("SWzD"),i=n("w8es").onFreeze;n("ow6B")("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},duxV:function(t,e){!function(t,e){"use strict";function n(){var t=k.splice(0,k.length);for(Kt=0;t.length;)t.shift().call(null,t.shift())}function r(t,e){for(var n=0,r=t.length;n<r;n++)v(t[n],e)}function i(t){for(var e,n=0,r=t.length;n<r;n++)e=t[n],D(e,it[a(e)])}function o(t){return function(e){Pt(e)&&(v(e,t),ot.length&&r(e.querySelectorAll(ot),t))}}function a(t){var e=Gt.call(t,"is"),n=t.nodeName.toUpperCase(),r=st.call(rt,e?tt+e.toUpperCase():$+n);return e&&-1<r&&!s(n,e)?-1:r}function s(t,e){return-1<ot.indexOf(t+'[is="'+e+'"]')}function u(t){var e=t.currentTarget,n=t.attrChange,r=t.attrName,i=t.target,o=t[Y]||2,a=t[K]||3;ee&&(!i||i===e)&&e[G]&&"style"!==r&&(t.prevValue!==t.newValue||""===t.newValue&&(n===o||n===a))&&e[G](r,n===o?null:t.prevValue,n===a?null:t.newValue)}function l(t){var e=o(t);return function(t){k.push(e,t.target),Kt&&clearTimeout(Kt),Kt=setTimeout(n,1)}}function c(t){te&&(te=!1,t.currentTarget.removeEventListener(Z,c)),ot.length&&r((t.target||S).querySelectorAll(ot),t.detail===B?B:N),Mt&&f()}function d(t,e){var n=this;Ht.call(n,t,e),C.call(n,{target:n})}function h(t,e){Rt(t,e),x?x.observe(t,Yt):($t&&(t.setAttribute=d,t[j]=I(t),t[P](J,C)),t[P](X,u)),t[W]&&ee&&(t.created=!0,t[W](),t.created=!1)}function f(){for(var t,e=0,n=Nt.length;e<n;e++)t=Nt[e],at.contains(t)||(n--,Nt.splice(e--,1),v(t,B))}function p(t){throw new Error("A "+t+" type is already registered")}function v(t,e){var n,r,i=a(t);-1<i&&(O(t,it[i]),i=0,e!==N||t[N]?e===B&&!t[B]&&(t[N]=!1,t[B]=!0,r="disconnected",i=1):(t[B]=!1,t[N]=!0,r="connected",i=1,Mt&&st.call(Nt,t)<0&&Nt.push(t)),i&&(n=t[e+U]||t[r+U])&&n.call(t))}function m(){}function g(t,e,n){var r=n&&n[F]||"",i=e.prototype,o=xt(i),a=e.observedAttributes||ht,s={prototype:o};jt(o,W,{value:function(){if(wt)wt=!1;else if(!this[At]){this[At]=!0,new e(this),i[W]&&i[W].call(this);var t=kt[Lt.get(e)];(!bt||t.create.length>1)&&_(this)}}}),jt(o,G,{value:function(t){-1<st.call(a,t)&&i[G].apply(this,arguments)}}),i[V]&&jt(o,z,{value:i[V]}),i[H]&&jt(o,Q,{value:i[H]}),r&&(s[F]=r),t=t.toUpperCase(),kt[t]={constructor:e,create:r?[r,It(t)]:[t]},Lt.set(e,t),S[M](t.toLowerCase(),s),b(t),Ct[t].r()}function y(t){var e=kt[t.toUpperCase()];return e&&e.constructor}function A(t){return"string"==typeof t?t:t&&t.is||""}function _(t){for(var e,n=t[G],r=n?t.attributes:ht,i=r.length;i--;)e=r[i],n.call(t,e.name||e.nodeName,null,e.value||e.nodeValue)}function b(t){return t=t.toUpperCase(),t in Ct||(Ct[t]={},Ct[t].p=new Et(function(e){Ct[t].r=e})),Ct[t].p}function T(){_t&&delete t.customElements,dt(t,"customElements",{configurable:!0,value:new m}),dt(t,"CustomElementRegistry",{configurable:!0,value:m});for(var e=w.get(/^HTML[A-Z]*[a-z]/),n=e.length;n--;function(e){var n=t[e];if(n){t[e]=function(t){var e,r;return t||(t=this),t[At]||(wt=!0,e=kt[Lt.get(t.constructor)],r=bt&&1===e.create.length,t=r?Reflect.construct(n,ht,e.constructor):S.createElement.apply(S,e.create),t[At]=!0,wt=!1,r||_(t)),t},t[e].prototype=n.prototype;try{n.prototype.constructor=t[e]}catch(r){yt=!0,dt(n,At,{value:t[e]})}}}(e[n]));S.createElement=function(t,e){var n=A(e);return n?Qt.call(this,t,It(n)):Qt.call(this,t)},Xt||(Jt=!0,S[M](""))}var S=t.document,E=t.Object,w=function(t){var e,n,r,i,o=/^[A-Z]+[a-z]/,a=function(t){var e,n=[];for(e in u)t.test(e)&&n.push(e);return n},s=function(t,e){(e=e.toLowerCase())in u||(u[t]=(u[t]||[]).concat(e),u[e]=u[e.toUpperCase()]=t)},u=(E.create||E)(null),l={};for(n in t)for(i in t[n])for(r=t[n][i],u[i]=r,e=0;e<r.length;e++)u[r[e].toLowerCase()]=u[r[e].toUpperCase()]=i;return l.get=function(t){return"string"==typeof t?u[t]||(o.test(t)?[]:""):a(t)},l.set=function(t,e){return o.test(t)?s(t,e):s(e,t),l},l}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});"object"!=typeof e&&(e={type:e||"auto"});var k,C,L,I,x,R,O,D,M="registerElement",j="__"+M+(1e5*t.Math.random()>>0),P="addEventListener",N="attached",U="Callback",B="detached",F="extends",G="attributeChanged"+U,z=N+U,V="connected"+U,H="disconnected"+U,W="created"+U,Q=B+U,Y="ADDITION",q="MODIFICATION",K="REMOVAL",X="DOMAttrModified",Z="DOMContentLoaded",J="DOMSubtreeModified",$="<",tt="=",et=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,nt=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],rt=[],it=[],ot="",at=S.documentElement,st=rt.indexOf||function(t){for(var e=this.length;e--&&this[e]!==t;);return e},ut=E.prototype,lt=ut.hasOwnProperty,ct=ut.isPrototypeOf,dt=E.defineProperty,ht=[],ft=E.getOwnPropertyDescriptor,pt=E.getOwnPropertyNames,vt=E.getPrototypeOf,mt=E.setPrototypeOf,gt=!!E.__proto__,yt=!1,At="__dreCEv1",_t=t.customElements,bt=!/^force/.test(e.type)&&!!(_t&&_t.define&&_t.get&&_t.whenDefined),Tt=E.create||E,St=t.Map||function(){var t,e=[],n=[];return{get:function(t){return n[st.call(e,t)]},set:function(r,i){t=st.call(e,r),t<0?n[e.push(r)-1]=i:n[t]=i}}},Et=t.Promise||function(t){function e(t){for(r=!0;n.length;)n.shift()(t)}var n=[],r=!1,i={catch:function(){return i},then:function(t){return n.push(t),r&&setTimeout(e,1),i}};return t(e),i},wt=!1,kt=Tt(null),Ct=Tt(null),Lt=new St,It=function(t){return t.toLowerCase()},xt=E.create||function t(e){return e?(t.prototype=e,new t):this},Rt=mt||(gt?function(t,e){return t.__proto__=e,t}:pt&&ft?function(){function t(t,e){for(var n,r=pt(e),i=0,o=r.length;i<o;i++)n=r[i],lt.call(t,n)||dt(t,n,ft(e,n))}return function(e,n){do{t(e,n)}while((n=vt(n))&&!ct.call(n,e));return e}}():function(t,e){for(var n in e)t[n]=e[n];return t}),Ot=t.MutationObserver||t.WebKitMutationObserver,Dt=(t.HTMLElement||t.Element||t.Node).prototype,Mt=!ct.call(Dt,at),jt=Mt?function(t,e,n){return t[e]=n.value,t}:dt,Pt=Mt?function(t){return 1===t.nodeType}:function(t){return ct.call(Dt,t)},Nt=Mt&&[],Ut=Dt.attachShadow,Bt=Dt.cloneNode,Ft=Dt.dispatchEvent,Gt=Dt.getAttribute,zt=Dt.hasAttribute,Vt=Dt.removeAttribute,Ht=Dt.setAttribute,Wt=S.createElement,Qt=Wt,Yt=Ot&&{attributes:!0,characterData:!0,attributeOldValue:!0},qt=Ot||function(t){$t=!1,at.removeEventListener(X,qt)},Kt=0,Xt=M in S&&!/^force-all/.test(e.type),Zt=!0,Jt=!1,$t=!0,te=!0,ee=!0;if(Xt||(mt||gt?(O=function(t,e){ct.call(e,t)||h(t,e)},D=h):(O=function(t,e){t[j]||(t[j]=E(!0),h(t,e))},D=O),Mt?($t=!1,function(){var t=ft(Dt,P),e=t.value,n=function(t){var e=new CustomEvent(X,{bubbles:!0});e.attrName=t,e.prevValue=Gt.call(this,t),e.newValue=null,e[K]=e.attrChange=2,Vt.call(this,t),Ft.call(this,e)},r=function(t,e){var n=zt.call(this,t),r=n&&Gt.call(this,t),i=new CustomEvent(X,{bubbles:!0});Ht.call(this,t,e),i.attrName=t,i.prevValue=n?r:null,i.newValue=e,n?i[q]=i.attrChange=1:i[Y]=i.attrChange=0,Ft.call(this,i)},i=function(t){var e,n=t.currentTarget,r=n[j],i=t.propertyName;r.hasOwnProperty(i)&&(r=r[i],e=new CustomEvent(X,{bubbles:!0}),e.attrName=r.name,e.prevValue=r.value||null,e.newValue=r.value=n[i]||null,null==e.prevValue?e[Y]=e.attrChange=0:e[q]=e.attrChange=1,Ft.call(n,e))};t.value=function(t,o,a){t===X&&this[G]&&this.setAttribute!==r&&(this[j]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,e.call(this,"propertychange",i)),e.call(this,t,o,a)},dt(Dt,P,t)}()):Ot||(at[P](X,qt),at.setAttribute(j,1),at.removeAttribute(j),$t&&(C=function(t){var e,n,r,i=this;if(i===t.target){e=i[j],i[j]=n=I(i);for(r in n){if(!(r in e))return L(0,i,r,e[r],n[r],Y);if(n[r]!==e[r])return L(1,i,r,e[r],n[r],q)}for(r in e)if(!(r in n))return L(2,i,r,e[r],n[r],K)}},L=function(t,e,n,r,i,o){var a={attrChange:t,currentTarget:e,attrName:n,prevValue:r,newValue:i};a[o]=t,u(a)},I=function(t){for(var e,n,r={},i=t.attributes,o=0,a=i.length;o<a;o++)e=i[o],"setAttribute"!==(n=e.name)&&(r[n]=e.value);return r})),S[M]=function(t,e){if(n=t.toUpperCase(),Zt&&(Zt=!1,Ot?(x=function(t,e){function n(t,e){for(var n=0,r=t.length;n<r;e(t[n++]));}return new Ot(function(r){for(var i,o,a,s=0,u=r.length;s<u;s++)i=r[s],"childList"===i.type?(n(i.addedNodes,t),n(i.removedNodes,e)):(o=i.target,ee&&o[G]&&"style"!==i.attributeName&&(a=Gt.call(o,i.attributeName))!==i.oldValue&&o[G](i.attributeName,i.oldValue,a))})}(o(N),o(B)),R=function(t){return x.observe(t,{childList:!0,subtree:!0}),t},R(S),Ut&&(Dt.attachShadow=function(){return R(Ut.apply(this,arguments))})):(k=[],S[P]("DOMNodeInserted",l(N)),S[P]("DOMNodeRemoved",l(B))),S[P](Z,c),S[P]("readystatechange",c),Dt.cloneNode=function(t){var e=Bt.call(this,!!t),n=a(e);return-1<n&&D(e,it[n]),t&&ot.length&&i(e.querySelectorAll(ot)),e}),Jt)return Jt=!1;if(-2<st.call(rt,tt+n)+st.call(rt,$+n)&&p(t),!et.test(n)||-1<st.call(nt,n))throw new Error("The type "+t+" is invalid");var n,s,u=function(){return h?S.createElement(f,n):S.createElement(f)},d=e||ut,h=lt.call(d,F),f=h?e[F].toUpperCase():n;return h&&-1<st.call(rt,$+f)&&p(f),s=rt.push((h?tt:$)+n)-1,ot=ot.concat(ot.length?",":"",h?f+'[is="'+t.toLowerCase()+'"]':f),u.prototype=it[s]=lt.call(d,"prototype")?d.prototype:xt(Dt),ot.length&&r(S.querySelectorAll(ot),N),u},S.createElement=Qt=function(t,e){var n=A(e),r=n?Wt.call(S,t,It(n)):Wt.call(S,t),i=""+t,o=st.call(rt,(n?tt:$)+(n||i).toUpperCase()),a=-1<o;return n&&(r.setAttribute("is",n=n.toLowerCase()),a&&(a=s(i.toUpperCase(),n))),ee=!S.createElement.innerHTMLHelper,a&&D(r,it[o]),r}),m.prototype={constructor:m,define:bt?function(t,e,n){if(n)g(t,e,n);else{var r=t.toUpperCase();kt[r]={constructor:e,create:[r]},Lt.set(e,r),_t.define(t,e)}}:g,get:bt?function(t){return _t.get(t)||y(t)}:y,whenDefined:bt?function(t){return Et.race([_t.whenDefined(t),b(t)])}:b},!_t||/^force/.test(e.type))T();else if(!e.noBuiltIn)try{!function(e,n,r){if(n[F]="a",e.prototype=xt(HTMLAnchorElement.prototype),e.prototype.constructor=e,t.customElements.define(r,e,n),Gt.call(S.createElement("a",{is:r}),"is")!==r||bt&&Gt.call(new e,"is")!==r)throw n}(function t(){return Reflect.construct(HTMLAnchorElement,[],t)},{},"document-register-element-a")}catch(t){T()}if(!e.noBuiltIn)try{Wt.call(S,"a","a")}catch(t){It=function(t){return{is:t.toLowerCase()}}}}(window)},dwEP:function(t,e,n){for(var r,i=n("cegO"),o=n("QHaH"),a=n("2eo7"),s=a("typed_array"),u=a("view"),l=!(!i.ArrayBuffer||!i.DataView),c=l,d=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(r=i[h[d++]])?(o(r.prototype,s,!0),o(r.prototype,u,!0)):c=!1;t.exports={ABV:l,CONSTR:c,TYPED:s,VIEW:u}},dx02:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e5pe:function(t,e,n){var r=n("zS5q")("wks"),i=n("2eo7"),o=n("cegO").Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},eAo0:function(t,e,n){"use strict";var r=n("cegO"),i=n("tg2m"),o=n("itn3"),a=n("e5pe")("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},eNpo:function(t,e,n){"use strict";var r=n("I5ZQ"),i=n("Qfht"),o=n("GuN7");t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)e[s++]=t;return e}},"ehz/":function(t,e,n){"use strict";function r(){this.message="String contains an invalid character"}function i(t){for(var e,n,i=String(t),a="",s=0,u=o;i.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&e>>8-s%1*8)){if((n=i.charCodeAt(s+=.75))>255)throw new r;e=e<<8|n}return a}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=i},eoZI:function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},f9UI:function(t,e,n){var r=n("gfI6"),i=n("wrr7"),o=n("d0hO"),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},fDj0:function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},fX4y:function(t,e,n){var r=n("Y5LL"),i=n("gfI6"),o=n("zS5q")("metadata"),a=o.store||(o.store=new(n("D5V7"))),s=function(t,e,n){var i=a.get(t);if(!i){if(!n)return;a.set(t,i=new r)}var o=i.get(e);if(!o){if(!n)return;i.set(e,o=new r)}return o},u=function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},l=function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},c=function(t,e,n,r){s(n,r,!0).set(t,e)},d=function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},h=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},f=function(t){i(i.S,"Reflect",t)};t.exports={store:a,map:s,has:u,get:l,set:c,keys:d,key:h,exp:f}},fZsd:function(t,e,n){"use strict";var r=n("gfI6"),i=n("a6t1"),o=n("JKZW"),a=n("+HiE"),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",d=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*l[n],l[n]=r%1e7,r=u(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=l[e],l[e]=u(n/t),n=n%t*1e7},f=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==l[t]){var n=String(l[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)},v=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n("wrr7")(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,u=o(this,c),l=i(t),m="",g="0";if(l<0||l>20)throw RangeError(c);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(m="-",u=-u),u>1e-21)if(e=v(u*p(2,69,1))-69,n=e<0?u*p(2,-e,1):u/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(d(0,n),r=l;r>=7;)d(1e7,0),r-=7;for(d(p(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<<r),d(1,1),h(2),g=f()}else d(0,n),d(1<<-e,0),g=f()+a.call("0",l);return l>0?(s=g.length,g=m+(s<=l?"0."+a.call("0",l-s)+g:g.slice(0,s-l)+"."+g.slice(s-l))):g=m+g,g}})},ftLj:function(t,e,n){"use strict";var r=n("I5ZQ"),i=n("Qfht"),o=n("GuN7");t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),u=i(e,a),l=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===l?a:i(l,a))-u,a-s),d=1;for(u<s&&s<u+c&&(d=-1,u+=c-1,s+=c-1);c-- >0;)u in n?n[s]=n[u]:delete n[s],s+=d,u+=d;return n}},g38Z:function(t,e,n){e=t.exports=n("BkJT")(void 0),e.push([t.i,'.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABBIAAsAAAAAGoQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3RY21hcAAAAYQAAADQAAADIjn098ZnbHlmAAACVAAACv4AABEIAwnSw2hlYWQAAA1UAAAAKgAAADYUHzoRaGhlYQAADYAAAAAbAAAAJA4DByFobXR4AAANnAAAAA8AAACE4AAAAGxvY2EAAA2sAAAARAAAAEQ9NEHGbWF4cAAADfAAAAAfAAAAIAEyAIFuYW1lAAAOEAAAASUAAAIK1cf1oHBvc3QAAA84AAABDwAAAZ5AAl/0eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGQ7xTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGBHcRdyA4RZgQRAC4HCwEAAHic7dFprsIgAEXhg8U61XmeWcBb1FuQP4w7ZQXK5boMm3yclFDSANAHmuKviBBeBPQ8ymyo8w3jOh/5r2ui5nN6v8sYNJb3WMdeWRvLji0DhozKdxM6psyYs2DJijUbtuzYc+DIiTMXrty4k8oGLb+n0xCe37ekM7Z66j1DbUy3l6PpHnLfdLO5NdSBoQ4NdWSoY9ON54mhdqa/y1NDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUJORPqkhTd54nJ1YDXBU1RV+576/JBs2bPYPkrDZt5vsJrv53V/I5mclhGDCTwgGBQQSTEji4hCkYIAGd4TGIWFAhV0RQTpWmQp1xv6hA4OTOlNr2zFANbHUYbq2OtNCpViRqsk+e+7bTQAhzti8vPfuPffcc88959zznbcMMPjHD/KDDGEY0ABpYX384NhlomIYlo4JISGEY9mMh2FSidYiqkEUphtNYDSY/dXg9023l4DdxlqUl0chuZRhncJKrsCQHIwcGuwfnhMIzBnuH4Sym+1D2zaGjheXlhYfD238z80mKYMmvJ5XeOTzd8z9eujbMxJNhu4C9xPE/bCMiDuSNIWgkTQwBE55hLSAE7ZwhrHLnAHZOGV/kmBGTiNjZxzI77Hb7Hqjz68TjT6vh+5JT/cCIkqS0D6CqPf5jX4Qjdx5j6vlDfZM4aZFdbVXIxtOlJaP/WottMnH6CJQ3bTiue3PrY23HjnChtuamxwvvzFjxkPrNj3z0tG9T561HDYf6OgmRWvlY3JQHoQb8ltV2Yet7YfWctEjR1AtxS/cSX6U4alf6NJEBQ7YKg9wrXQKd0IeZCb2ux75Uhh1Un+Nz+9LTOE7PK777nN5xqdTneTBhCbx446mZrhnUkrCz2YhA9dSMxaG0SYmT8hi9ZPu1E94PJYQSH6LRmhxec7Q7ZeXntgQuVpbh+a4qWNsckVyTdn0P7o7DpgPW84+uRcq0BITflBikGdUjAZ9wYBVI3mtrNvr9kpg1UsaK6t3690aoorC1lg0GpMH2HAMtkZjsSi5Ig9ESVosOh7GQfLjKNLvKpMKkLSKNFAka710GdgSi8oDMSoNhqjkKBXTgn3swtaxyzGkUzIzae9RtLdWkSlZ1KDX6EzgllzV4NV4SoDFSOGD4+HCeQUF8wrZ5Hs8zIb5EaVxy8DYFTbMCJPnLIWZxugZE2NlivC0gc1qEQUR8jEKgZcAXeH18BiCgl5nlHh0CrjB4Hb5fX4gb0J7c9PuHVsfgkx2n/vTY/JV8kn8PGxf7faOZ8qX8JVByuIf4whk9sqXli2hvPJV9hrp0hY7l8r2x37ydaVsb4xvXv/47v2NjfCl8m5oRDJclFMoE1yk0Uh1Te4/m8lFXe9qBZD0EkheicebXvzI2PLCuoKCukLuhPIeKwaHPEouxw3kMqaIUXDQ1p0mip+MyCORSCQaoUsnY1VZ38nUTrG21WvVo4f1OsEJFhvSfAFwGfT8VHRMeAVUpwLOoLzjT/REIj3O3FhuURE+nERF+0pTId5Fyxv5sfwGyg4O+my4vZv0sZm7oeQlFZORiB+tG0MweVNraeitl7yxiPIHTk4/diVxs94o5lEYishB2iAtkchEnsActoEpx44Fo8XnsQMaA22BlqC20RmhBKzYojZyYaxg+JggMc4HHY2m+L9EkWSYljirOisrO7d3VorxzyZ6Vc4lJqITAu1b2wOBdrLElAP+bFc2eGaZFVbkmJktv5uT6Jlz5D/MnBFor6ig/JPnRViBsV3LNKGGqB1ChJ0tgQywlVLFJIuQgTFttwkiKxhyQdAZMdMYtSaoAewqfvXVYPAbDT6/1mez85YS8FSDywQ6NfAnef6FNEGMilnppyvn5rB6tTyq1pOceRWnp2WJEZFXHeX5oyoem1nTTgdqc4heDY7bOeKz63vnz+/dRx+s31Ht2JGanQ5seirfWJL9tjozU/12TnEjn5oux9OzU3ckGbBzBwNOyk69JykKH0n/0LM9A72tuwM3zQpIRu4AxiToseEpgPOmbROyFe9/X2yeUvoUsCyEvjcgs7fpWP3/aKlFN0+6HFUe6D9HFz/XPwBlN9tTqNyZjFJ8UO2RUT5/h4CptCctEyeisnOyXjALEp7dXKaQKf6O7IMnGjNNACRMLxqdYJX8eMLvmmd68D+ayBLyKKYZwYxDt/GNhzETDJ05Qxlyi3pi3/Z93ndYVSumgj0V/KkIFlO6+1K3fF2+3g0q+YtuSIf0bvmLqV09nnobI6hwcjIP8aPCKayjsF5JBY3LaKAeRLSyYB1h81oTwe9SlPMkXB7G0mfL9q71gaqqwPqu67QRKS1+ObTx+sbQy9QV2OQHEScGkdFBeT7v7qisqqrs6N52i78/R+6S0qQONVj26agOVoswCyQWIV5D86vH53bxNUeXV0K+XZaHv/nm/KsHhOvylwsWnJX/HE8l/4WCv5x+l5n08z6UU8bUMa3MBpSmM7F63AxntdC9eBCKEZW9Hr+ABNqtxgAQrSbMtmrW7lKQuoSgBhSrTazWVU2QAKWY8wiiuhqFmQgWJBgoXiuWIm42N7hqZbBsgXz52O5P5uSvaNgFGnOuvsRw8I8Laha91wMvDuxqWFheN7/8GVtTltdS83DQsXRmqc5ZtcJXEVrlV2doTWk5+Yunm71dG5f55m/qY0MjI93vv9/NfpxXV9sUXrxy2fbNy1or65cOlDRnOoKFeeXcbw42H/bNDT5Qs3flgs31gWC1lD1nfUV/X7NdCnSUdHY2e8afzfKsqZ5ZljfDqjLOmk3UebNXB+aHArPYDRs+/HDDxeT5DiP+sFg7OpRaVQMGBV89PpeBdj22hCE0Uub0UqwLrNWsG0cuyadgLXTeR5rbO4+3c/vl15cur2nRq+TXCQDcS3SO+s6ak+e5/eMS+1dw3btu3YG2tvFL8XdIZvdjdW6TO/4B7IdrZWVPmctm5/59AgsPItTSbCiIBr2OqIGzmu20SMKAS7yqwGBUfGfgjDYlLLDeF0SfcLB2LSx8flT+08/kzz6yOj96rft4rpTjdPQcmLd47uKibbDq7ZSz/XtbH2nN717Nd62rU+c8Icevvv7I09wA6WvjVcafb+FsbNG+ZQ80Rn6ZZsvrP7teP2dzTdoETvNhjCmsr8FID2sJ69VYvdUcxk4AzYRlKcaE38eXNRlfW9H1as9i6acLHp1XpuNB5K7DIvkX08y1ZYvh3KfWaiCzH+ztrSDmD7LuX73x/mJelB8Yj39t8nhNQJJ2CAthpoFGLsGgtSOCJooCGoaJAMTjSWHVZ08YAa1Fg9lPI5U6DOsGVjDasJeZZ+YyhfCwfOzCxlBA69M9XLXtza7H/rav+9Tjq5xNi0wpKQIRNO4Lrzz7yp5QVYM6Jd/oc1Uvn/mQhhuWh6ENXoS2YTZ8QT42bF5d/559zp5r0Uff2VnR2tdf2/WCOd2cO0Mw6qpWPnvxpV0nrt5fZd2yItc199GWe8vlNfNDq+CH/7yAAnB9hn7T4QO4c1g9ScxsZgmzntnE/IDGndtHMw69lFwoCnYsMGx+rBp8JSBqdLzBr9QRPq/PbhWMWFtQZp1xguy/haw3TEHm3TWAnxFWQQWgt7M5OV0lCz1VRYucpWliy7z6Zd4urwPIyeZQqli2Lgg7szJV09PysATbOQtYIrB2YzbkJYkGgJ0m4AjPUap1pvYu1K9qr97z0Yl3p332b2LYB78ncYIlRkau/8GObSsOlZancACE5d5ily+c2+7h5Yj4lqhVmXXB+iXLfvdqSgqfKtQvfHDV0OnvQR1qhw42XS/vkvsh/hXcrDFP0a+SJNIomEfD1nsrYGO+1bgTOJhM8Hv6ek+7vVglxuSRwoKn17S937bm6YJCeSSG0Op1n+7tE37tcZ/p7dsTv4EUrGpDbWueKigsLHhqTVsoEj+JU0kaSjnj9tz8/gryQWwJ9BcJXBC/7smO+I/IFURJetFPrdt5WcoL6DbEJaygI8CTHfQTjf40ofD+DwalTqIAAHicY2BkYGAA4uByr8R4fpuvDNzsDCBw7f/3LmSanREszsHABKIAKi0J7gAAeJxjYGRgYGcAARD5/z87IwMjAypQBAAtgwI4AHicY2BgYGAfYAwAOkQA4QAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhHicY2BkYGBQZChlYGcAASYg5gJCBob/YD4DABfTAbQAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2PyXLCMBBE3YCNDWEL2ffk7o8S8oCnkCVHC5C/jzBQlUP6IHVPzYyekl5y0iL5X5/ooY8BUmQYIkeBEca4wgRTzDDHAtdY4ga3uMM9HvCIJzzjBa94wzs+8ImvZNAq8TM+HqVkKxWlrQiOxjujQkNlEzyNzl6Z/cU2XF06at7U83VQyklLpEvSnuzsb+HAPnPfQVgaupa1Jlu4sPLsFblcitaz0dHU0ZF1qatjZ1+aTXYCmp6u0gSvWNPyHLtFZ+ZeXWVSaEkqs3T8S74WklbGbNNNq4LL4+CWKtZDv2cfX8l8aFbKFhEnJnJ+IULFpqwoQnNHlHaVQtPBl+ypmbSWdmyC61KS/AKZC3Y+AA==) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\\F101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\\F102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\\F103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\\F104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\\F105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\\F106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\\F107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\\F108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\\F109"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\\F10A"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\\F10B"}.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\\F10C"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\\F10D"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\\F10E"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\\F10F"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\\F110"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before{content:"\\F111"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\\F112"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\\F113"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\\F114"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\\F115"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\\F116"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\\F117"}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:"\\F118"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\\F119"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\\F11A"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\\F11B"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\\F11C"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\\F11D"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\\F11E"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\\F11F"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\\F120"}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-4-3,.video-js.vjs-16-9,.video-js.vjs-fluid{width:100%;max-width:100%;height:0}.video-js.vjs-16-9{padding-top:56.25%}.video-js.vjs-4-3{padding-top:75%}.video-js.vjs-fill,.video-js .vjs-tech{width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen{width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.5em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.75em;margin-left:-1.5em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;top:-.333333333333333em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel .vjs-volume-control:hover,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control,.video-js .vjs-volume-panel:hover .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:hover.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:9em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3.5em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;visibility:visible;opacity:1;position:relative;transition:none}.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{position:absolute;bottom:3em;left:.5em}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster{display:block}.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-no-flex .vjs-current-time,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control .vjs-icon-placeholder{cursor:pointer;flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{-webkit-transform:translateY(-3em);transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{-webkit-transform:translateY(-1.5em);transform:translateY(-1.5em)}.video-js .vjs-fullscreen-control{cursor:pointer;flex:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:0s linear .3s forwards vjs-spinner-show;animation:0s linear .3s forwards vjs-spinner-show}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes vjs-spinner-spin{to{-webkit-transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\\F10D";font-size:1.5em;line-height:inherit}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \\F11D";font-size:1.5em;line-height:inherit}.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer{flex:auto}.video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer{width:auto}.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-descriptions-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button .vjs-audio-button,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-audio-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-descriptions-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-audio-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-descriptions-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider,.video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control{display:none}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto}.vjs-text-track-settings .vjs-track-settings-colors{display:block;grid-column:1;grid-row:1}.vjs-text-track-settings .vjs-track-settings-font{grid-column:2;grid-row:1}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:2;grid-row:2}}.vjs-track-setting>select{margin-right:5px}.vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}.vjs-text-track-settings fieldset span{display:inline-block}.vjs-text-track-settings legend{color:#fff;margin:0 0 5px}.vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px;padding:0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;visibility:hidden}',""])},gJRO:function(t,e,n){var r=n("tg2m").f,i=n("iNHF"),o=n("e5pe")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},gOH0:function(t,e,n){var r=n("mwya"),i=n("e5pe")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},gfI6:function(t,e,n){var r=n("cegO"),i=n("oqL4"),o=n("QHaH"),a=n("xVER"),s=n("nZZV"),u=function(t,e,n){var l,c,d,h,f=t&u.F,p=t&u.G,v=t&u.S,m=t&u.P,g=t&u.B,y=p?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,A=p?i:i[e]||(i[e]={}),_=A.prototype||(A.prototype={});p&&(n=e);for(l in n)c=!f&&y&&void 0!==y[l],d=(c?y:n)[l],h=g&&c?s(d,r):m&&"function"==typeof d?s(Function.call,d):d,y&&a(y,l,d,t&u.U),A[l]!=d&&o(A,l,h),m&&_[l]!=d&&(_[l]=d)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},gjVD:function(t,e,n){"use strict";var r=n("gfI6"),i=n("I5ZQ"),o=n("zySG"),a=n("tg2m");n("itn3")&&r(r.P+n("mEn9"),"Object",{__defineSetter__:function(t,e){a.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},"gvu/":function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n("gvuQ");r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},gvuQ:function(t,e,n){"use strict";function r(t){return"[object Array]"===E.call(t)}function i(t){return"[object ArrayBuffer]"===E.call(t)}function o(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"==typeof t}function u(t){return"number"==typeof t}function l(t){return void 0===t}function c(t){return null!==t&&"object"==typeof t}function d(t){return"[object Date]"===E.call(t)}function h(t){return"[object File]"===E.call(t)}function f(t){return"[object Blob]"===E.call(t)}function p(t){return"[object Function]"===E.call(t)}function v(t){return c(t)&&p(t.pipe)}function m(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function g(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function y(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function A(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}function _(){function t(t,n){"object"==typeof e[n]&&"object"==typeof t?e[n]=_(e[n],t):e[n]=t}for(var e={},n=0,r=arguments.length;n<r;n++)A(arguments[n],t);return e}function b(t,e,n){return A(e,function(e,r){t[r]=n&&"function"==typeof e?T(e,n):e}),t}var T=n("IKeO"),S=n("5SCX"),E=Object.prototype.toString;t.exports={isArray:r,isArrayBuffer:i,isBuffer:S,isFormData:o,isArrayBufferView:a,isString:s,isNumber:u,isObject:c,isUndefined:l,isDate:d,isFile:h,isBlob:f,isFunction:p,isStream:v,isURLSearchParams:m,isStandardBrowserEnv:y,forEach:A,merge:_,extend:b,trim:g}},gxSk:function(t,e,n){var r=n("gfI6");r(r.S,"Array",{isArray:n("yiIW")})},gyCy:function(t,e,n){"use strict";var r=n("pRlG");n("gfI6")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},h1nK:function(t,e,n){"use strict";var r=n("gvuQ");t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},hURc:function(t,e,n){var r=n("t7x0");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("FIqI")("ba251c00",r,!0,{})},hhx3:function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},hi6e:function(t,e,n){var r=n("gfI6"),i=n("mwya");r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},hiq5:function(t,e,n){var r=n("gfI6");r(r.G+r.W+r.F*!n("dwEP").ABV,{DataView:n("8NP9").DataView})},hoJM:function(t,e,n){var r=n("owGv"),i=n("dx02").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},i4ge:function(t,e,n){"use strict";var r=n("TVvA"),i=n("oAFy");t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},iEjH:function(t,e,n){"use strict";n("f9UI")("blink",function(t){return function(){return t(this,"blink","","")}})},iNHF:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},iRVo:function(t,e,n){var r=n("I5ZQ"),i=n("rmpa");n("ow6B")("keys",function(){return function(t){return i(r(t))}})},iqoQ:function(t,e,n){var r=n("tg2m"),i=n("TVvA"),o=n("rmpa");t.exports=n("itn3")?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},ircs:function(t,e,n){var r=n("gfI6"),i=n("JLFJ"),o=n("LoOQ");r(r.S,"Math",{fscale:function(t,e,n,r,a){return o(i(t,e,n,r,a))}})},it19:function(t,e,n){var r=n("gOH0"),i=n("sigr");t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},itn3:function(t,e,n){t.exports=!n("wrr7")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},iyJ0:function(t,e){t.exports="data:font/ttf;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9TLzI8vEg4AAABfAAAAFZjbWFw5262fAAAAdwAAAFwZ2x5Zux6hXgAAANUAAAA8GhlYWQYdi55AAAA4AAAADZoaGVhB94DgwAAALwAAAAkaG10eAgAAAAAAAHUAAAACGxvY2EAeAAAAAADTAAAAAZtYXhwARIAWAAAARgAAAAgbmFtZT5U/n0AAAREAAACbXBvc3TgemZ7AAAGtAAAAC8AAQAAA4D/gABcBAAAAAAABAAAAQAAAAAAAAAAAAAAAAAAAAIAAQAAAAEAAEmgjiNfDzz1AAsEAAAAAADaq3U+AAAAANqrdT4AAP+ABAADgAAAAAgAAgAAAAAAAAABAAAAAgBMAAYAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKAB4ALAABREZMVAAIAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAAAAQQAAZAABQAIAokCzAAAAI8CiQLMAAAB6wAyAQgAAAIABQMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUGZFZABA5kbmRgOA/4AAXAOAAIAAAAABAAAAAAAABAAAAAQAAAAAAAAFAAAAAwAAACwAAAAEAAABVAABAAAAAABOAAMAAQAAACwAAwAKAAABVAAEACIAAAAEAAQAAQAA5kb//wAA5kb//wAAAAEABAAAAAEAAAEGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAABwAAAAAAAAAAQAA5kYAAOZGAAAAAQAAAAAAeAAAAAYAAP+AA+0DgAAlACkAKgA2AEoASwAAJSMRNCYnITUuASIGBxUjDgEUFhczERQWFyEVHgEyNj0BMz4BNCYlESERIRMGHgEyPgE1LgEiBgEDLgEPAQ4BLwEmBg8BBhYzITI2JwPNIxMP/RABExwTASIOEhIOIhQOAvABExwUIw4REvy+As79MngBEiElIBICJjknAiFmBBcGcwQOBsUHDQR1BgsLAkIKCwM8AqsPEwFVDhISDlYBExwTAf1UDhMBVQ4TEw5VARQbFAECif13Ad4TIBMTIBMdJSX+cwEPCwIJsAYDA18DAwazCRMQCQAAAAAAEgDeAAEAAAAAAAAAFQAAAAEAAAAAAAEACAAVAAEAAAAAAAIABwAdAAEAAAAAAAMACAAkAAEAAAAAAAQACAAsAAEAAAAAAAUACwA0AAEAAAAAAAYACAA/AAEAAAAAAAoAKwBHAAEAAAAAAAsAEwByAAMAAQQJAAAAKgCFAAMAAQQJAAEAEACvAAMAAQQJAAIADgC/AAMAAQQJAAMAEADNAAMAAQQJAAQAEADdAAMAAQQJAAUAFgDtAAMAAQQJAAYAEAEDAAMAAQQJAAoAVgETAAMAAQQJAAsAJgFpCkNyZWF0ZWQgYnkgaWNvbmZvbnQKaWNvbmZvbnRSZWd1bGFyaWNvbmZvbnRpY29uZm9udFZlcnNpb24gMS4waWNvbmZvbnRHZW5lcmF0ZWQgYnkgc3ZnMnR0ZiBmcm9tIEZvbnRlbGxvIHByb2plY3QuaHR0cDovL2ZvbnRlbGxvLmNvbQAKAEMAcgBlAGEAdABlAGQAIABiAHkAIABpAGMAbwBuAGYAbwBuAHQACgBpAGMAbwBuAGYAbwBuAHQAUgBlAGcAdQBsAGEAcgBpAGMAbwBuAGYAbwBuAHQAaQBjAG8AbgBmAG8AbgB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMABpAGMAbwBuAGYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgECAQMABWppZXR1AAAA"},"j+m8":function(t,e,n){var r=n("e5pe")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},jEE8:function(t,e,n){"use strict";var r=n("gfI6"),i=n("cegO"),o=n("oqL4"),a=n("mVC9")(),s=n("e5pe")("observable"),u=n("zySG"),l=n("TVvA"),c=n("hhx3"),d=n("1zWp"),h=n("QHaH"),f=n("9MqD"),p=f.RETURN,v=function(t){return null==t?void 0:u(t)},m=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},y=function(t){g(t)||(t._o=void 0,m(t))},A=function(t,e){l(t),this._c=void 0,this._o=t,t=new _(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(e){return void t.error(e)}g(this)&&m(this)};A.prototype=d({},{unsubscribe:function(){y(this)}});var _=function(t){this._s=t};_.prototype=d({},{next:function(t){var e=this._s;if(!g(e)){var n=e._o;try{var r=v(n.next);if(r)return r.call(n,t)}catch(t){try{y(e)}finally{throw t}}}},error:function(t){var e=this._s;if(g(e))throw t;var n=e._o;e._o=void 0;try{var r=v(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{m(e)}finally{throw t}}return m(e),t},complete:function(t){var e=this._s;if(!g(e)){var n=e._o;e._o=void 0;try{var r=v(n.complete);t=r?r.call(n,t):void 0}catch(t){try{m(e)}finally{throw t}}return m(e),t}}});var b=function(t){c(this,b,"Observable","_f")._f=u(t)};d(b.prototype,{subscribe:function(t){return new A(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)(function(n,r){u(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})})}}),d(b,{from:function(t){var e="function"==typeof this?this:b,n=v(l(t)[s]);if(n){var r=l(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(f(t,!1,function(t){if(e.next(t),n)return p})===p)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:b)(function(t){var e=!1;return a(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),h(b.prototype,s,function(){return this}),r(r.G,{Observable:b}),n("eAo0")("Observable")},jaLz:function(t,e,n){var r=n("rmpa"),i=n("0BM2"),o=n("bdbX");t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,l=0;s.length>l;)u.call(t,a=s[l++])&&e.push(a);return e}},jsdI:function(t,e,n){n("F6kW")("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},jyXR:function(t,e,n){var r=n("gfI6");r(r.P+r.R,"Map",{toJSON:n("it19")("Map")})},kGlO:function(t,e,n){var r=n("NHQf");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0};i.transform=void 0;n("uOJK")(r,i);r.locals&&(t.exports=r.locals)},kIwm:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},kUA4:function(t,e,n){var r=n("SWzD"),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},kziU:function(t,e,n){var r=n("nZZV"),i=n("KQ6G"),o=n("I5ZQ"),a=n("GuN7"),s=n("VVhn");t.exports=function(t,e){var n=1==t,u=2==t,l=3==t,c=4==t,d=6==t,h=5==t||d,f=e||s;return function(e,s,p){for(var v,m,g=o(e),y=i(g),A=r(s,p,3),_=a(y.length),b=0,T=n?f(e,_):u?f(e,0):void 0;_>b;b++)if((h||b in y)&&(v=y[b],m=A(v,b,g),t))if(n)T[b]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:T.push(v)}else if(c)return!1;return d?-1:l||c?c:T}}},lADi:function(t,e,n){var r=n("gfI6"),i=n("rWQF"),o=n("GuN7");r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},lBJ1:function(t,e,n){var r=n("gfI6");r(r.S+r.F*!n("itn3"),"Object",{defineProperty:n("tg2m").f})},lMaF:function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=n("OywI"),a=r.has,s=r.get,u=r.key,l=function(t,e,n){if(a(t,e,n))return s(t,e,n);var r=o(e);return null!==r?l(t,r,n):void 0};r.exp({getMetadata:function(t,e){return l(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},lfgq:function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},lvyX:function(t,e,n){"use strict";var r=n("5dkQ"),i=n("0eGa");t.exports=n("2o3U")("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},"m5/z":function(t,e,n){var r=n("gfI6");r(r.S,"Date",{now:function(){return(new Date).getTime()}})},m8yH:function(t,e,n){var r=n("gfI6");r(r.S,"Reflect",{ownKeys:n("AHac")})},mBMy:function(t,e,n){var r=n("gfI6"),i=n("lfgq");r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},mEn9:function(t,e,n){"use strict";t.exports=n("9v1L")||!n("wrr7")(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n("cegO")[t]})},mFPK:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},mVC9:function(t,e,n){var r=n("cegO"),i=n("1b0Z").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n("mwya")(a);t.exports=function(){var t,e,n,l=function(){var r,i;for(u&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(l)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(l)}}else n=function(){i.call(r,l)};else{var d=!0,h=document.createTextNode("");new o(l).observe(h,{characterData:!0}),n=function(){h.data=d=!d}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},mZNK:function(t,e,n){n("F6kW")("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},mphW:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>16,s=r>>16,u=(a*o>>>0)+(i*o>>>16);return a*s+(u>>16)+((i*s>>>0)+(65535&u)>>16)}})},mwya:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},myai:function(t,e,n){"use strict";var r=n("gfI6"),i=n("utu9")(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},"n/8r":function(t,e,n){"use strict";n("f9UI")("link",function(t){return function(e){return t(this,"a","href",e)}})},n7jv:function(t,e,n){n("YzBQ")("Map")},nI7M:function(t,e,n){"use strict";n("f9UI")("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},nZZV:function(t,e,n){var r=n("zySG");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},nxrp:function(t,e,n){var r=n("SWzD");n("ow6B")("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},oAFy:function(t,e,n){var r=n("SWzD");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},oE9M:function(t,e,n){var r=n("Eszt"),i=n("d0hO");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},oRMj:function(t,e,n){"use strict";var r=n("gfI6"),i=n("I5ZQ"),o=n("oAFy"),a=n("OywI"),s=n("4PQM").f;n("itn3")&&r(r.P+n("mEn9"),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.set}while(n=a(n))}})},"oT/z":function(t,e,n){var r=n("gfI6");r(r.S,"Reflect",{has:function(t,e){return e in t}})},oTJo:function(t,e,n){var r=n("cegO").parseFloat,i=n("T/J3").trim;t.exports=1/r(n("agPX")+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},odjh:function(t,e,n){var r=n("lvyX"),i=n("sigr"),o=n("fX4y"),a=n("TVvA"),s=n("OywI"),u=o.keys,l=o.key,c=function(t,e){var n=u(t,e),o=s(t);if(null===o)return n;var a=c(o,e);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return c(a(t),arguments.length<2?void 0:l(arguments[1]))}})},olX4:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},oonW:function(t,e,n){"use strict";var r=n("itn3"),i=n("rmpa"),o=n("0BM2"),a=n("bdbX"),s=n("I5ZQ"),u=n("KQ6G"),l=Object.assign;t.exports=!l||n("wrr7")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=r})?function(t,e){for(var n=s(t),l=arguments.length,c=1,d=o.f,h=a.f;l>c;)for(var f,p=u(arguments[c++]),v=d?i(p).concat(d(p)):i(p),m=v.length,g=0;m>g;)f=v[g++],r&&!h.call(p,f)||(n[f]=p[f]);return n}:l},oq3O:function(t,e,n){n("F6kW")("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},oqL4:function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},ouAI:function(t,e,n){var r=n("I5ZQ"),i=n("OywI");n("ow6B")("getPrototypeOf",function(){return function(t){return i(r(t))}})},ow6B:function(t,e,n){var r=n("gfI6"),i=n("oqL4"),o=n("wrr7");t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},owGv:function(t,e,n){var r=n("iNHF"),i=n("rWQF"),o=n("1o3W")(!1),a=n("SU1L")("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,l=[];for(n in s)n!=a&&r(s,n)&&l.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(l,n)||l.push(n));return l}},p2Mr:function(t,e,n){"use strict";var r=n("cegO"),i=n("iNHF"),o=n("mwya"),a=n("r84E"),s=n("oAFy"),u=n("wrr7"),l=n("hoJM").f,c=n("4PQM").f,d=n("tg2m").f,h=n("T/J3").trim,f=r.Number,p=f,v=f.prototype,m="Number"==o(n("wl1Y")(v)),g="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=g?e.trim():h(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),l=0,c=u.length;l<c;l++)if((a=u.charCodeAt(l))<48||a>i)return NaN;return parseInt(u,r)}}return+e};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof f&&(m?u(function(){v.valueOf.call(n)}):"Number"!=o(n))?a(new p(y(e)),n,f):y(e)};for(var A,_=n("itn3")?l(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),b=0;_.length>b;b++)i(p,A=_[b])&&!i(f,A)&&d(f,A,c(p,A));f.prototype=v,v.constructor=f,n("xVER")(r,"Number",f)}},"p97+":function(t,e,n){"use strict";n("f9UI")("small",function(t){return function(){return t(this,"small","","")}})},pG7L:function(t,e,n){var r=n("gfI6"),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},pRlG:function(t,e,n){"use strict";var r=n("xTMV"),i=RegExp.prototype.exec,o=String.prototype.replace,a=i,s=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),u=void 0!==/()??/.exec("")[1];(s||u)&&(a=function(t){var e,n,a,l,c=this;return u&&(n=new RegExp("^"+c.source+"$(?!\\s)",r.call(c))),s&&(e=c.lastIndex),a=i.call(c,t),s&&a&&(c.lastIndex=c.global?a.index+a[0].length:e),u&&a&&a.length>1&&o.call(a[0],n,function(){for(l=1;l<arguments.length-2;l++)void 0===arguments[l]&&(a[l]=void 0)}),a}),t.exports=a},pVdI:function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=s.get(e);return u.delete(n),!!u.size||s.delete(e)}})},pZXB:function(t,e,n){var r=n("gfI6"),i=n("DTOj");i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},q7et:function(t,e,n){var r=n("gfI6");r(r.P,"Array",{fill:n("eNpo")}),n("I/ou")("fill")},qWof:function(t,e,n){var r=n("SWzD"),i=n("yiIW"),o=n("e5pe")("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},qZDO:function(t,e,n){"use strict";var r=n("gfI6"),i=n("cy3O"),o=n("I5ZQ"),a=n("GuN7"),s=n("zySG"),u=n("VVhn");r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return s(t),e=a(r.length),n=u(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n("I/ou")("flatMap")},qbas:function(t,e,n){var r=n("cegO"),i=n("gfI6"),o=n("BEkf"),a=[].slice,s=/MSIE .\./.test(o),u=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},qzlX:function(t,e,n){var r=n("gfI6"),i=Math.imul;r(r.S+r.F*n("wrr7")(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},r0GY:function(t,e,n){var r=n("gfI6");r(r.S,"Number",{isNaN:function(t){return t!=t}})},r6Xj:function(t,e,n){"use strict";var r=n("TVvA"),i=n("GuN7"),o=n("K/q9"),a=n("77LP");n("NILh")("match",1,function(t,e,n,s){return[function(n){var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var u=r(t),l=String(this);if(!u.global)return a(u,l);var c=u.unicode;u.lastIndex=0;for(var d,h=[],f=0;null!==(d=a(u,l));){var p=String(d[0]);h[f]=p,""===p&&(u.lastIndex=o(l,i(u.lastIndex),c)),f++}return 0===f?null:h}]})},r84E:function(t,e,n){var r=n("SWzD"),i=n("DTOj").set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},rAfE:function(t,e,n){var r=n("gfI6");r(r.S+r.F,"Object",{assign:n("oonW")})},rBbO:function(t,e,n){"use strict";function r(t){var e=new a(t),n=o(a.prototype.request,e);return i.extend(n,a.prototype,e),i.extend(n,e),n}var i=n("gvuQ"),o=n("IKeO"),a=n("NQr8"),s=n("XL/d"),u=r(s);u.Axios=a,u.create=function(t){return r(i.merge(s,t))},u.Cancel=n("DkjP"),u.CancelToken=n("68ub"),u.isCancel=n("eoZI"),u.all=function(t){return Promise.all(t)},u.spread=n("EZEp"),t.exports=u,t.exports.default=u},rLr5:function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=i(e),this.reject=i(n)}var i=n("zySG");t.exports.f=function(t){return new r(t)}},rUnP:function(t,e,n){var r=n("gfI6"),i=n("C9ZO");r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},rWQF:function(t,e,n){var r=n("KQ6G"),i=n("d0hO");t.exports=function(t){return r(i(t))}},re2z:function(t,e,n){var r=n("tg2m"),i=n("gfI6"),o=n("TVvA"),a=n("oAFy");i(i.S+i.F*n("wrr7")(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){o(t),e=a(e,!0),o(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},rmpa:function(t,e,n){var r=n("owGv"),i=n("dx02");t.exports=Object.keys||function(t){return r(t,i)}},ryWk:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{scale:n("JLFJ")})},s0IB:function(t,e,n){"use strict";n("f9UI")("sup",function(t){return function(){return t(this,"sup","","")}})},"sHA+":function(t,e,n){function r(t,e,n){var u,h,f=arguments.length<4?t:arguments[3],p=o.f(c(t),e);if(!p){if(d(h=a(t)))return r(h,e,n,f);p=l(0)}if(s(p,"value")){if(!1===p.writable||!d(f))return!1;if(u=o.f(f,e)){if(u.get||u.set||!1===u.writable)return!1;u.value=n,i.f(f,e,u)}else i.f(f,e,l(0,n));return!0}return void 0!==p.set&&(p.set.call(f,n),!0)}var i=n("tg2m"),o=n("4PQM"),a=n("OywI"),s=n("iNHF"),u=n("gfI6"),l=n("VMkr"),c=n("TVvA"),d=n("SWzD");u(u.S,"Reflect",{set:r})},sHTV:function(t,e){t.exports="data:font/woff;base64,d09GRgABAAAAAASwAAsAAAAABwAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY9JUk9Y21hcAAAAYAAAABLAAABcOfXt7dnbHlmAAABzAAAAPkAAAEIO5HVdGhlYWQAAALIAAAALwAAADYXkug7aGhlYQAAAvgAAAAeAAAAJAj1BLpobXR4AAADGAAAAAgAAAAICTcAAGxvY2EAAAMgAAAABgAAAAYAhAAAbWF4cAAAAygAAAAgAAAAIAERAGBuYW1lAAADSAAAAUUAAAJtPlT+fXBvc3QAAASQAAAAIAAAADHm7Ml9eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkmcM4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDg8W/9sPXPD/waGGOYGhgagMCNIDgArIA3deJxjYGBgZWBgYAZiHSBmYWBgDGFgZAABP6AoI1icmYELLM7CoARWwwISf7b+/38YCeSzgEkGRjaGUcADJmWgPHBYQTADIwDU5wwlAHicHYtBSsNAGIX/N9NYnMVIOtOGplSIgWRXRxFdFJqI0BxAsBKhWSQ7F4J7V84FXHStK5c9gRfwCp7BE6itTtx873+P7yeP6PfJC/gdBXRIUyrokghxmsTRwR5iia6/jyCa4cyfgOsdNyepP8MUxxmiYOBy0Pec5iwnOWeC1B2uSrT/ulVOT5LO68uVkNtdKa6fTcZYZjraZEDGQ/X9qYfAUK+lWOBjIeRahZv35pFzW9e2ZbFkbFn8Ew8XUinZgotSiBL50ebW5EBu2Mqc/3zpMNRspUeiLMVI3zDb1JYxWzd2e49qXlRAVcwrvKE3VmrcI6I/6dgx8wAAAHicY2BkYGAA4pl/1zyO57f5ysDNwgACN9cFySPo/xNZxZnzgVwOBiaQKABRNwruAHicY2BkYGBu+N/AEMNqzgAErOIMjAyogAkATkoCuwAABAAAAAU3AAAAAAAAAIQAAAABAAAAAgBUAAUAAAAAAAIAAAAKAAoAAAD/AAAAAAAAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAiZGJkZmBvSAzuaS0KJWBAQAUyAMZ"},sPDH:function(t,e,n){var r=n("TVvA"),i=n("zySG"),o=n("e5pe")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},sQRx:function(t,e,n){(function(e){!function(e){"use strict";function n(t,e,n,r){var o=e&&e.prototype instanceof i?e:i,a=Object.create(o.prototype),s=new f(r||[]);return a._invoke=l(t,n,s),a}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function i(){}function o(){}function a(){}function s(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function u(t){function n(e,i,o,a){var s=r(t[e],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&y.call(l,"__await")?Promise.resolve(l.__await).then(function(t){n("next",t,o,a)},function(t){n("throw",t,o,a)}):Promise.resolve(l).then(function(t){u.value=t,o(u)},a)}a(s.arg)}function i(t,e){function r(){return new Promise(function(r,i){n(t,e,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n));var o;this._invoke=i}function l(t,e,n){var i=w;return function(o,a){if(i===C)throw new Error("Generator is already running");if(i===L){if("throw"===o)throw a;return v()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=c(s,n);if(u){if(u===I)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===w)throw i=L,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=C;var l=r(t,e,n);if("normal"===l.type){if(i=n.done?L:k,l.arg===I)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=L,n.method="throw",n.arg=l.arg)}}}function c(t,e){var n=t.iterator[e.method];if(n===m){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=m,c(t,e),"throw"===e.method))return I;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return I}var i=r(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,I;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=m),e.delegate=null,I):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,I)}function d(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function f(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(d,this),this.reset(!0)}function p(t){if(t){var e=t[_];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(y.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=m,e.done=!0,e};return r.next=r}}return{next:v}}function v(){return{value:m,done:!0}}var m,g=Object.prototype,y=g.hasOwnProperty,A="function"==typeof Symbol?Symbol:{},_=A.iterator||"@@iterator",b=A.asyncIterator||"@@asyncIterator",T=A.toStringTag||"@@toStringTag",S="object"==typeof t,E=e.regeneratorRuntime;if(E)return void(S&&(t.exports=E));E=e.regeneratorRuntime=S?t.exports:{},E.wrap=n;var w="suspendedStart",k="suspendedYield",C="executing",L="completed",I={},x={};x[_]=function(){return this};var R=Object.getPrototypeOf,O=R&&R(R(p([])));O&&O!==g&&y.call(O,_)&&(x=O);var D=a.prototype=i.prototype=Object.create(x);o.prototype=D.constructor=a,a.constructor=o,a[T]=o.displayName="GeneratorFunction",E.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===o||"GeneratorFunction"===(e.displayName||e.name))},E.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,T in t||(t[T]="GeneratorFunction")),t.prototype=Object.create(D),t},E.awrap=function(t){return{__await:t}},s(u.prototype),u.prototype[b]=function(){return this},E.AsyncIterator=u,E.async=function(t,e,r,i){var o=new u(n(t,e,r,i));return E.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},s(D),D[T]="Generator",D[_]=function(){return this},D.toString=function(){return"[object Generator]"},E.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},E.values=p,f.prototype={constructor:f,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(h),!t)for(var e in this)"t"===e.charAt(0)&&y.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=m)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return o.type="throw",o.arg=t,n.next=e,r&&(n.method="next",n.arg=m),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return e(i.catchLoc,!0);if(this.prev<i.finallyLoc)return e(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return e(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return e(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,I):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),I},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),I}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;h(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:p(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=m),I}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,n("mFPK"))},sQnt:function(t,e,n){var r=n("gfI6");r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},sigr:function(t,e,n){var r=n("9MqD");t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},t7x0:function(t,e,n){e=t.exports=n("BkJT")(void 0),e.push([t.i,'.video-wrapper .live .vjs-progress-control{visibility:hidden}.video-wrapper .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.video-wrapper .vjs-button>.vjs-icon-placeholder:before{line-height:30px}.video-wrapper .video-js .vjs-play-progress:before{top:-.43em}.video-wrapper .live .vjs-remaining-time{display:none}.video-wrapper .alt{position:absolute;left:0;top:0;right:0;bottom:0;background:#000;color:#fff;text-align:center}.video-wrapper .alt>table{width:100%;height:100%}.video-wrapper .alt>table tr>td{vertical-align:middle}.video-wrapper .video-title{position:absolute;top:5px;right:5px;color:#fff;background-color:hsla(0,0%,50%,.5);border-radius:2px;padding:2px 5px;max-width:120px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.video-wrapper .video-js .vjs-control-bar .vjs-button{cursor:pointer}@media screen and (min-device-width:1920px) and (-webkit-min-device-pixel-ratio:0){.video-wrapper .video-js .vjs-control-bar .vjs-control:before{padding-top:.15em}}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\\F108";line-height:2}.vjs-button>.vjs-icon-placeholder:before{line-height:2;font-size:1.8em}.vjs-resolution-button .vjs-resolution-button-staticlabel:before{font-family:iconfont!important;font-size:1.8em;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vjs-resolution-button .vjs-resolution-button-label{font-size:1em;line-height:3em;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;box-sizing:inherit;font-family:Arial,Helvetica,sans-serif}.vjs-resolution-button ul.vjs-menu-content{width:4em!important}.vjs-resolution-button .vjs-menu{left:0}.vjs-resolution-button .vjs-menu li{text-transform:none;font-size:1em;font-family:Arial,Helvetica,sans-serif}.vjs-playback-rate .vjs-playback-rate-value,.vjs-snapshot-button .vjs-control-content{font-size:1em;line-height:3em;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;box-sizing:inherit;font-family:Arial,Helvetica,sans-serif}',""])},t8M9:function(t,e,n){var r=n("gfI6"),i=n("mVC9")(),o=n("cegO").process,a="process"==n("mwya")(o);r(r.G,{asap:function(t){var e=a&&o.domain;i(e?e.bind(t):t)}})},tHJW:function(t,e,n){"use strict";var r=n("gfI6"),i=n("kziU")(0),o=n("OiX5")([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},tRWF:function(t,e,n){var r=n("gfI6"),i=n("zySG"),o=n("TVvA"),a=(n("cegO").Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n("wrr7")(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=i(t),u=o(n);return a?a(r,e,u):s.call(r,e,u)}})},tcJl:function(t,e,n){"use strict";var r=n("gfI6");t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},tg2m:function(t,e,n){var r=n("TVvA"),i=n("xLTs"),o=n("oAFy"),a=Object.defineProperty;e.f=n("itn3")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},u3FZ:function(t,e,n){var r=n("rWQF"),i=n("4PQM").f;n("ow6B")("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},uOJK:function(t,e,n){function r(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=p[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(c(r.parts[o],e))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(c(r.parts[o],e));p[r.id]={id:r.id,refs:1,parts:a}}}}function i(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s=o[1],u=o[2],l=o[3],c={css:s,media:u,sourceMap:l};r[a]?r[a].parts.push(c):n.push(r[a]={id:a,parts:[c]})}return n}function o(t,e){var n=m(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=A[A.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),A.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=m(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,i)}}function a(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=A.indexOf(t);e>=0&&A.splice(e,1)}function s(t){var e=document.createElement("style");return t.attrs.type="text/css",l(e,t.attrs),o(t,e),e}function u(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",l(e,t.attrs),o(t,e),e}function l(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function c(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var l=y++;n=g||(g=s(e)),r=d.bind(null,n,l,!1),i=d.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(e),r=f.bind(null,n,e),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),r=h.bind(null,n),i=function(){a(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function d(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function f(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=_(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var p={},v=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),m=function(t){var e={};return function(n){if(void 0===e[n]){var r=t.call(this,n);if(r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[n]=r}return e[n]}}(function(t){return document.querySelector(t)}),g=null,y=0,A=[],_=n("udGk");t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=v()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=i(t,e);return r(n,e),function(t){for(var o=[],a=0;a<n.length;a++){var s=n[a],u=p[s.id];u.refs--,o.push(u)}if(t){r(i(t,e),e)}for(var a=0;a<o.length;a++){var u=o[a];if(0===u.refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete p[u.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},uVds:function(t,e,n){var r=n("gfI6");r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>>16,s=r>>>16,u=(a*o>>>0)+(i*o>>>16);return a*s+(u>>>16)+((i*s>>>0)+(65535&u)>>>16)}})},udGk:function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return t;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}},utu9:function(t,e,n){var r=n("a6t1"),i=n("d0hO");t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),l=s.length;return u<0||u>=l?t?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536)}}},v4VH:function(t,e,n){"use strict";var r=n("gfI6"),i=n("oqL4"),o=n("cegO"),a=n("sPDH"),s=n("QG95");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},v8Lx:function(t,e,n){"use strict";function r(t,e){return t.__proto__=e,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}function s(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}function u(t){function e(){!0===c.shadow&&HTMLElement.prototype.attachShadow&&this.attachShadow({mode:"open"}),"function"==typeof c.constructorCallback&&c.constructorCallback.call(this)}function n(){"function"==typeof c.connectedCallback&&c.connectedCallback.call(this)}function r(){"function"==typeof c.disconnectedCallback&&c.disconnectedCallback.call(this)}function u(t,e,n){"function"==typeof c.attributeChangedCallback&&c.attributeChangedCallback.call(this,t,e,n)}function l(t,e){var n=customElements.get(t);return void 0!==n?n:customElements.define(t,e)}var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"!=typeof customElements){if(S){var d=function(t){function n(t){var r;i(this,n);var a=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),s=t?HTMLElement.call(t):a;return e.call(s),r=s,o(a,r)}return a(n,t),E(n,null,[{key:"observedAttributes",get:function(){return c.observedAttributes||[]}}]),n}(s);return d.prototype.connectedCallback=n,d.prototype.disconnectedCallback=r,d.prototype.attributeChangedCallback=u,l(t,d),d}var h=function(t){var n=t?HTMLElement.call(t):this;return e.call(n),n};return h.observedAttributes=c.observedAttributes||[],h.prototype=Object.create(HTMLElement.prototype,{constructor:{configurable:!0,writable:!0,value:h}}),h.prototype.connectedCallback=n,h.prototype.disconnectedCallback=r,h.prototype.attributeChangedCallback=u,l(t,h),h}}function l(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function c(t,e){if(null===t||void 0===t)return e!==Boolean&&void 0;var n=t,r=["true","false"].indexOf(t)>-1,i=parseFloat(n,10),o=!isNaN(i)&&isFinite(n)&&"string"==typeof n&&!n.match(/^0+[^.]\d*$/g);return e&&e!==Boolean&&(void 0===n?"undefined":I(n))!==e?n=e(t):r||e===Boolean?n=""===n||"true"===n:o&&(n=i),n}function d(t,e){if(t&&t.length)t.forEach(function(t){var n=k(t);-1===e.camelCase.indexOf(n)&&e.camelCase.push(n)});else if(t&&"object"===(void 0===t?"undefined":I(t)))for(var n in t){var r=k(n);-1===e.camelCase.indexOf(r)&&e.camelCase.push(r),t[r]&&t[r].type&&(e.types[n]=[].concat(t[r].type)[0])}}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={camelCase:[],hyphenate:[],types:{}};if(t.mixins&&t.mixins.forEach(function(t){d(t.props,e)}),t.extends&&t.extends.props){d(t.extends.props,e)}return d(t.props,e),e.camelCase.forEach(function(t){e.hyphenate.push(L(t))}),e}function f(t,e){e.camelCase.forEach(function(n,r){Object.defineProperty(t,n,{get:function(){return this.__vue_custom_element__[n]},set:function(t){if("object"!==(void 0===t?"undefined":I(t))&&"function"!=typeof t||!this.__vue_custom_element__){var n=e.types[e.camelCase[r]];this.setAttribute(e.hyphenate[r],c(t,n))}else{var i=e.camelCase[r];this.__vue_custom_element__[i]=t}}})})}function p(t,e,n){var r=e.propsData||{};return n.hyphenate.forEach(function(e,i){var o=n.camelCase[i],a=t.attributes[e]||t[o],s=null;n.types[o]&&(s=n.types[o]),a instanceof Attr?r[o]=c(a.value,s):void 0!==a&&(r[o]=a)}),r}function v(t){var e={};return l(t.attributes).forEach(function(t){e["vue-slot"===t.nodeName?"slot":t.nodeName]=t.nodeValue}),e}function m(t){if(t.childNodes.length)return t.childNodes;if(t.content&&t.content.childNodes&&t.content.childNodes.length)return t.content.childNodes;var e=document.createElement("div");return e.innerHTML=t.innerHTML,e.childNodes}function g(t,e,n){var r=m(e),i=l(r).map(function(e){return"#text"===e.nodeName?e.nodeValue:t(e.tagName,{attrs:v(e),domProps:{innerHTML:e.innerHTML}})});return n.slot=e.id,t("template",n,i)}function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n=[];return l(t).forEach(function(t){if("#text"===t.nodeName)t.nodeValue.trim()&&n.push(e("span",t.nodeValue));else if("#comment"!==t.nodeName){var r=v(t),i={attrs:r,domProps:{innerHTML:""===t.innerHTML?t.innerText:t.innerHTML}};r.slot&&(i.slot=r.slot,r.slot=void 0);var o="TEMPLATE"===t.tagName?g(e,t,i):e(t.tagName,i);n.push(o)}}),n}function A(t,e){var n={bubbles:!1,cancelable:!1,detail:e},r=void 0;return"function"==typeof window.CustomEvent?r=new CustomEvent(t,n):(r=document.createEvent("CustomEvent"),r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail)),r}function _(t,e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=A(e,[].concat(r));t.dispatchEvent(o)}function b(t,e,n,r,i){if(!t.__vue_custom_element__){var o=function(){this.$emit=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];_.apply(void 0,[t].concat(r)),this.__proto__&&(e=this.__proto__.$emit).call.apply(e,[this].concat(r))}},a=e.util.extend({},n),s=p(t,a,r),u=e.version&&parseInt(e.version.split(".")[0],10)||0;if(a.beforeCreate=[].concat(a.beforeCreate||[],o),a._compiled){var l={},c=a._Ctor;c&&(l=Object.keys(c).map(function(t){return c[t]})[0].options),l.beforeCreate=a.beforeCreate}var d=void 0;if(u>=2){var h=t.cloneNode(!0).childNodes;d={propsData:s,props:r.camelCase,computed:{reactiveProps:function(){var t=this,e={};return r.camelCase.forEach(function(n){void 0!==t[n]&&(e[n]=t[n])}),e}},render:function(t){var e={props:this.reactiveProps};return t(a,e,y(h,t))}}}else if(1===u)d=a,d.propsData=s;else{d=a;var v={};Object.keys(s).forEach(function(t){v[t]={default:s[t]}}),d.props=v}var m=u>=2?"<div></div>":("<div>"+t.innerHTML+"</div>").replace(/vue-slot=/g,"slot=");if(i.shadow&&t.shadowRoot?(t.shadowRoot.innerHTML=m,d.el=t.shadowRoot.children[0]):(t.innerHTML=m,d.el=t.children[0]),f(t,r),"function"==typeof i.beforeCreateVueInstance&&(d=i.beforeCreateVueInstance(d)||d),t.__vue_custom_element__=new e(d),t.__vue_custom_element_props__=r,t.getVueInstance=function(){var e=t.__vue_custom_element__;return e.$children.length?e.$children[0]:e},i.shadow&&i.shadowCss&&t.shadowRoot){var g=document.createElement("style");g.type="text/css",g.appendChild(document.createTextNode(i.shadowCss)),t.shadowRoot.appendChild(g)}t.removeAttribute("vce-cloak"),t.setAttribute("vce-ready",""),_(t,"vce-ready")}}function T(t){t.customElement=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i="function"==typeof n,o=i&&{props:r.props||[]},a=h(i?o:n);return u(e,{constructorCallback:function(){"function"==typeof r.constructorCallback&&r.constructorCallback.call(this)},connectedCallback:function(){var o=this,s=i&&n(),u=s&&s.then&&"function"==typeof s.then;if("function"==typeof r.connectedCallback&&r.connectedCallback.call(this),i&&!u)throw new Error("Async component "+e+" do not returns Promise");this.__detached__||(u?s.then(function(e){var n=h(e);b(o,t,e,n,r),"function"==typeof r.vueInstanceCreatedCallback&&r.vueInstanceCreatedCallback.call(o)}):(b(this,t,n,a,r),"function"==typeof r.vueInstanceCreatedCallback&&r.vueInstanceCreatedCallback.call(this))),this.__detached__=!1},disconnectedCallback:function(){var t=this;this.__detached__=!0,"function"==typeof r.disconnectedCallback&&r.disconnectedCallback.call(this),null!==r.destroyTimeout&&setTimeout(function(){t.__detached__&&t.__vue_custom_element__&&(t.__detached__=!1,t.__vue_custom_element__.$destroy(!0),delete t.__vue_custom_element__,delete t.__vue_custom_element_props__)},r.destroyTimeout||3e3)},attributeChangedCallback:function(t,e,n){if(this.__vue_custom_element__&&void 0!==n){var i=k(t);"function"==typeof r.attributeChangedCallback&&r.attributeChangedCallback.call(this,t,e,n);var o=this.__vue_custom_element_props__.types[i];this.__vue_custom_element__[i]=c(n,o)}},observedAttributes:a.hyphenate,shadow:!!r.shadow&&!!HTMLElement.prototype.attachShadow})}}Object.setPrototypeOf=Object.setPrototypeOf||r;var S=(r.bind(Object),function(){return"undefined"!=typeof Symbol&&"undefined"!=typeof Reflect&&"undefined"!=typeof Proxy&&!Object.isSealed(Proxy)}()),E=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.setPrototypeOf(s.prototype,HTMLElement.prototype),Object.setPrototypeOf(s,HTMLElement);var w=/-(\w)/g,k=function(t){return t.replace(w,function(t,e){return e?e.toUpperCase():""})},C=/([^-])([A-Z])/g,L=function(t){return t.replace(C,"$1-$2").replace(C,"$1-$2").toLowerCase()},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};"undefined"!=typeof window&&window.Vue&&(window.Vue.use(T),T.installed&&(T.installed=!1)),e.a=T},vyL3:function(t,e,n){"use strict";var r=n("gvuQ");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},w1AD:function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:a(arguments[1]))}})},w3a7:function(t,e,n){"use strict";var r=n("gfI6"),i=n("I5ZQ"),o=n("oAFy");r(r.P+r.F*n("wrr7")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},w8es:function(t,e,n){var r=n("2eo7")("meta"),i=n("SWzD"),o=n("iNHF"),a=n("tg2m").f,s=0,u=Object.isExtensible||function(){return!0},l=!n("wrr7")(function(){return u(Object.preventExtensions({}))}),c=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},d=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";c(t)}return t[r].i},h=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;c(t)}return t[r].w},f=function(t){return l&&p.NEED&&u(t)&&!o(t,r)&&c(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:d,getWeak:h,onFreeze:f}},wZyz:function(t,e,n){n("YzBQ")("Set")},wl1Y:function(t,e,n){var r=n("TVvA"),i=n("iqoQ"),o=n("dx02"),a=n("SU1L")("IE_PROTO"),s=function(){},u=function(){var t,e=n("Mx4w")("iframe"),r=o.length;for(e.style.display="none",n("66qq").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},"wp+L":function(t,e,n){"use strict";n("OV3h");var r=n("TVvA"),i=n("xTMV"),o=n("itn3"),a=/./.toString,s=function(t){n("xVER")(RegExp.prototype,"toString",t,!0)};n("wrr7")(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},wrr7:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"x/L1":function(t,e,n){"use strict";var r=n("gfI6"),i=n("utu9")(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},x4De:function(t,e,n){n("tcJl")("WeakMap")},"xD/q":function(t,e,n){var r=n("gfI6");r(r.S,"Object",{create:n("wl1Y")})},xFCy:function(t,e,n){var r=n("fX4y"),i=n("TVvA"),o=n("zySG"),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:o)(n),a(r))}}})},xHbQ:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},xLTs:function(t,e,n){t.exports=!n("itn3")&&!n("wrr7")(function(){return 7!=Object.defineProperty(n("Mx4w")("div"),"a",{get:function(){return 7}}).a})},xTMV:function(t,e,n){"use strict";var r=n("TVvA");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},xVER:function(t,e,n){var r=n("cegO"),i=n("QHaH"),o=n("iNHF"),a=n("2eo7")("src"),s=n("6v9O"),u=(""+s).split("toString");n("oqL4").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(l&&(o(n,a)||i(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},xg1l:function(t,e,n){var r=n("cegO"),i=n("r84E"),o=n("tg2m").f,a=n("hoJM").f,s=n("Eszt"),u=n("xTMV"),l=r.RegExp,c=l,d=l.prototype,h=/a/g,f=/a/g,p=new l(h)!==h;if(n("itn3")&&(!p||n("wrr7")(function(){return f[n("e5pe")("match")]=!1,l(h)!=h||l(f)==f||"/a/i"!=l(h,"i")}))){l=function(t,e){var n=this instanceof l,r=s(t),o=void 0===e;return!n&&r&&t.constructor===l&&o?t:i(p?new c(r&&!o?t.source:t,e):c((r=t instanceof l)?t.source:t,r&&o?u.call(t):e),n?this:d,l)};for(var v=a(c),m=0;v.length>m;)!function(t){t in l||o(l,t,{configurable:!0,get:function(){return c[t]},set:function(e){c[t]=e}})}(v[m++]);d.constructor=l,l.prototype=d,n("xVER")(r,"RegExp",l)}n("eAo0")("RegExp")},xxJ0:function(t,e,n){"use strict";var r=n("OIH2");t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},yMXV:function(t,e,n){e.f=n("e5pe")},yZ2d:function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},yebT:function(t,e,n){"use strict";var r=n("gfI6"),i=n("66qq"),o=n("mwya"),a=n("Qfht"),s=n("GuN7"),u=[].slice;r(r.P+r.F*n("wrr7")(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=a(t,n),l=a(e,n),c=s(l-i),d=new Array(c),h=0;h<c;h++)d[h]="String"==r?this.charAt(i+h):this[i+h];return d}})},yiIW:function(t,e,n){var r=n("mwya");t.exports=Array.isArray||function(t){return"Array"==r(t)}},ymdI:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"player-wrapper"},[n("div",{staticClass:"video-wrapper",style:t.videoWrapperStyle},[n("div",{staticClass:"video-inner",class:{live:t.live},staticStyle:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}}),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.videoTitle,expression:"videoTitle"}],staticClass:"video-title",attrs:{title:t.videoTitle}},[t._v(t._s(t.videoTitle))])])])},i=[],o={render:r,staticRenderFns:i};e.a=o},ytBe:function(t,e,n){"use strict";function r(t){n("hURc")}var i=n("48WC"),o=n("ymdI"),a=n("46Yf"),s=r,u=a(i.a,o.a,!1,s,null,null);e.a=u.exports},yuY9:function(t,e,n){var r=n("gfI6");r(r.P,"Function",{bind:n("ILqf")})},z6NM:function(t,e,n){var r=n("TVvA");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},z7zz:function(t,e,n){"use strict";var r=n("gfI6"),i=n("GuN7"),o=n("oE9M"),a="".endsWith;r(r.P+r.F*n("j+m8")("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),s=void 0===n?r:Math.min(i(n),r),u=String(t);return a?a.call(e,u,s):e.slice(s-u.length,s)===u}})},zS5q:function(t,e,n){var r=n("oqL4"),i=n("cegO"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("9v1L")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},zj9o:function(t,e,n){"use strict";var r=n("SWzD"),i=n("OywI"),o=n("e5pe")("hasInstance"),a=Function.prototype;o in a||n("tg2m").f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},zsfk:function(t,e,n){n("tcJl")("Map")},zwQ0:function(t,e,n){"use strict";n("f9UI")("anchor",function(t){return function(e){return t(this,"a","name",e)}})},zySG:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}}}); |